diff --git a/clients/client-account/.gitignore b/clients/client-account/.gitignore new file mode 100644 index 0000000000000..54f14c9aef253 --- /dev/null +++ b/clients/client-account/.gitignore @@ -0,0 +1,9 @@ +/node_modules/ +/build/ +/coverage/ +/docs/ +/dist-* +*.tsbuildinfo +*.tgz +*.log +package-lock.json diff --git a/clients/client-account/.npmignore b/clients/client-account/.npmignore new file mode 100644 index 0000000000000..b7ff81137c4ad --- /dev/null +++ b/clients/client-account/.npmignore @@ -0,0 +1,4 @@ +/coverage/ +/docs/ +tsconfig.test.json +*.tsbuildinfo diff --git a/clients/client-account/LICENSE b/clients/client-account/LICENSE new file mode 100644 index 0000000000000..f9e0c8672bca6 --- /dev/null +++ b/clients/client-account/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-2021 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-account/README.md b/clients/client-account/README.md new file mode 100644 index 0000000000000..a3258d79578cb --- /dev/null +++ b/clients/client-account/README.md @@ -0,0 +1,203 @@ +# @aws-sdk/client-account + +[![NPM version](https://img.shields.io/npm/v/@aws-sdk/client-account/latest.svg)](https://www.npmjs.com/package/@aws-sdk/client-account) +[![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/client-account.svg)](https://www.npmjs.com/package/@aws-sdk/client-account) + +## Description + +AWS SDK for JavaScript Account Client for Node.js, Browser and React Native. + +

Operations for Amazon Web Services Account Management

+ +## Installing + +To install the this package, simply type add or install @aws-sdk/client-account +using your favorite package manager: + +- `npm install @aws-sdk/client-account` +- `yarn add @aws-sdk/client-account` +- `pnpm add @aws-sdk/client-account` + +## Getting Started + +### Import + +The AWS SDK is modulized by clients and commands. +To send a request, you only need to import the `AccountClient` and +the commands you need, for example `DeleteAlternateContactCommand`: + +```js +// ES5 example +const { AccountClient, DeleteAlternateContactCommand } = require("@aws-sdk/client-account"); +``` + +```ts +// ES6+ example +import { AccountClient, DeleteAlternateContactCommand } from "@aws-sdk/client-account"; +``` + +### 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 AccountClient({ region: "REGION" }); + +const params = { + /** input parameters */ +}; +const command = new DeleteAlternateContactCommand(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) => { + // proccess 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-account"; +const client = new AWS.Account({ region: "REGION" }); + +// async/await. +try { + const data = await client.deleteAlternateContact(params); + // process data. +} catch (error) { + // error handling. +} + +// Promises. +client + .deleteAlternateContact(params) + .then((data) => { + // process data. + }) + .catch((error) => { + // error handling. + }); + +// callbacks. +client.deleteAlternateContact(params, (err, data) => { + // proccess 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-account` 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. diff --git a/clients/client-account/jest.config.js b/clients/client-account/jest.config.js new file mode 100644 index 0000000000000..02eed352c6a86 --- /dev/null +++ b/clients/client-account/jest.config.js @@ -0,0 +1,4 @@ +module.exports = { + preset: "ts-jest", + testMatch: ["**/*.spec.ts", "!**/*.browser.spec.ts", "!**/*.integ.spec.ts"], +}; diff --git a/clients/client-account/package.json b/clients/client-account/package.json new file mode 100644 index 0000000000000..376b6b532ce5a --- /dev/null +++ b/clients/client-account/package.json @@ -0,0 +1,91 @@ +{ + "name": "@aws-sdk/client-account", + "description": "AWS SDK for JavaScript Account Client for Node.js, Browser and React Native", + "version": "3.0.0", + "scripts": { + "build": "yarn build:cjs && yarn build:es && yarn build:types", + "build:cjs": "tsc -p tsconfig.json", + "build:docs": "yarn clean:docs && typedoc ./", + "build:es": "tsc -p tsconfig.es.json", + "build:types": "tsc -p tsconfig.types.json", + "clean": "yarn clean:dist && yarn clean:docs", + "clean:dist": "rimraf ./dist-*", + "clean:docs": "rimraf ./docs", + "downlevel-dts": "downlevel-dts dist-types dist-types/ts3.4", + "test": "jest --coverage --passWithNoTests" + }, + "main": "./dist-cjs/index.js", + "types": "./dist-types/index.d.ts", + "module": "./dist-es/index.js", + "sideEffects": false, + "dependencies": { + "@aws-crypto/sha256-browser": "^1.1.0", + "@aws-crypto/sha256-js": "^1.1.0", + "@aws-sdk/client-sts": "3.34.0", + "@aws-sdk/config-resolver": "3.34.0", + "@aws-sdk/credential-provider-node": "3.34.0", + "@aws-sdk/fetch-http-handler": "3.34.0", + "@aws-sdk/hash-node": "3.34.0", + "@aws-sdk/invalid-dependency": "3.34.0", + "@aws-sdk/middleware-content-length": "3.34.0", + "@aws-sdk/middleware-host-header": "3.34.0", + "@aws-sdk/middleware-logger": "3.34.0", + "@aws-sdk/middleware-retry": "3.34.0", + "@aws-sdk/middleware-serde": "3.34.0", + "@aws-sdk/middleware-signing": "3.34.0", + "@aws-sdk/middleware-stack": "3.34.0", + "@aws-sdk/middleware-user-agent": "3.34.0", + "@aws-sdk/node-config-provider": "3.34.0", + "@aws-sdk/node-http-handler": "3.34.0", + "@aws-sdk/protocol-http": "3.34.0", + "@aws-sdk/smithy-client": "3.34.0", + "@aws-sdk/types": "3.34.0", + "@aws-sdk/url-parser": "3.34.0", + "@aws-sdk/util-base64-browser": "3.34.0", + "@aws-sdk/util-base64-node": "3.34.0", + "@aws-sdk/util-body-length-browser": "3.34.0", + "@aws-sdk/util-body-length-node": "3.34.0", + "@aws-sdk/util-user-agent-browser": "3.34.0", + "@aws-sdk/util-user-agent-node": "3.34.0", + "@aws-sdk/util-utf8-browser": "3.34.0", + "@aws-sdk/util-utf8-node": "3.34.0", + "tslib": "^2.3.0" + }, + "devDependencies": { + "@aws-sdk/client-documentation-generator": "3.34.0", + "@types/node": "^12.7.5", + "downlevel-dts": "0.7.0", + "jest": "^26.1.0", + "rimraf": "^3.0.0", + "ts-jest": "^26.4.1", + "typedoc": "^0.19.2", + "typescript": "~4.3.5" + }, + "engines": { + "node": ">=10.0.0" + }, + "typesVersions": { + "<4.0": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + "author": { + "name": "AWS SDK for JavaScript Team", + "url": "https://aws.amazon.com/javascript/" + }, + "license": "Apache-2.0", + "browser": { + "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.browser" + }, + "react-native": { + "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.native" + }, + "homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-account", + "repository": { + "type": "git", + "url": "https://github.com/aws/aws-sdk-js-v3.git", + "directory": "clients/client-account" + } +} diff --git a/clients/client-account/src/Account.ts b/clients/client-account/src/Account.ts new file mode 100644 index 0000000000000..5b73594db092d --- /dev/null +++ b/clients/client-account/src/Account.ts @@ -0,0 +1,125 @@ +import { HttpHandlerOptions as __HttpHandlerOptions } from "@aws-sdk/types"; + +import { AccountClient } from "./AccountClient"; +import { + DeleteAlternateContactCommand, + DeleteAlternateContactCommandInput, + DeleteAlternateContactCommandOutput, +} from "./commands/DeleteAlternateContactCommand"; +import { + GetAlternateContactCommand, + GetAlternateContactCommandInput, + GetAlternateContactCommandOutput, +} from "./commands/GetAlternateContactCommand"; +import { + PutAlternateContactCommand, + PutAlternateContactCommandInput, + PutAlternateContactCommandOutput, +} from "./commands/PutAlternateContactCommand"; + +/** + *

Operations for Amazon Web Services Account Management

+ */ +export class Account extends AccountClient { + /** + *

Deletes the specified alternate contact from an Amazon Web Services account.

+ *

For complete details about how to use the alternate contact operations, see Access or + * updating the alternate contacts.

+ */ + public deleteAlternateContact( + args: DeleteAlternateContactCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public deleteAlternateContact( + args: DeleteAlternateContactCommandInput, + cb: (err: any, data?: DeleteAlternateContactCommandOutput) => void + ): void; + public deleteAlternateContact( + args: DeleteAlternateContactCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteAlternateContactCommandOutput) => void + ): void; + public deleteAlternateContact( + args: DeleteAlternateContactCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DeleteAlternateContactCommandOutput) => void), + cb?: (err: any, data?: DeleteAlternateContactCommandOutput) => void + ): Promise | void { + const command = new DeleteAlternateContactCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

Retrieves the specified alternate contact attached to an Amazon Web Services account.

+ *

For complete details about how to use the alternate contact operations, see Access or + * updating the alternate contacts.

+ */ + public getAlternateContact( + args: GetAlternateContactCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public getAlternateContact( + args: GetAlternateContactCommandInput, + cb: (err: any, data?: GetAlternateContactCommandOutput) => void + ): void; + public getAlternateContact( + args: GetAlternateContactCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetAlternateContactCommandOutput) => void + ): void; + public getAlternateContact( + args: GetAlternateContactCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetAlternateContactCommandOutput) => void), + cb?: (err: any, data?: GetAlternateContactCommandOutput) => void + ): Promise | void { + const command = new GetAlternateContactCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

Modifies the specified alternate contact attached to an Amazon Web Services account.

+ *

For complete details about how to use the alternate contact operations, see Access or + * updating the alternate contacts.

+ */ + public putAlternateContact( + args: PutAlternateContactCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public putAlternateContact( + args: PutAlternateContactCommandInput, + cb: (err: any, data?: PutAlternateContactCommandOutput) => void + ): void; + public putAlternateContact( + args: PutAlternateContactCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: PutAlternateContactCommandOutput) => void + ): void; + public putAlternateContact( + args: PutAlternateContactCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: PutAlternateContactCommandOutput) => void), + cb?: (err: any, data?: PutAlternateContactCommandOutput) => void + ): Promise | void { + const command = new PutAlternateContactCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } +} diff --git a/clients/client-account/src/AccountClient.ts b/clients/client-account/src/AccountClient.ts new file mode 100644 index 0000000000000..29bb05885049f --- /dev/null +++ b/clients/client-account/src/AccountClient.ts @@ -0,0 +1,254 @@ +import { + EndpointsInputConfig, + EndpointsResolvedConfig, + RegionInputConfig, + RegionResolvedConfig, + resolveEndpointsConfig, + resolveRegionConfig, +} from "@aws-sdk/config-resolver"; +import { getContentLengthPlugin } from "@aws-sdk/middleware-content-length"; +import { + getHostHeaderPlugin, + HostHeaderInputConfig, + HostHeaderResolvedConfig, + resolveHostHeaderConfig, +} from "@aws-sdk/middleware-host-header"; +import { getLoggerPlugin } from "@aws-sdk/middleware-logger"; +import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@aws-sdk/middleware-retry"; +import { + AwsAuthInputConfig, + AwsAuthResolvedConfig, + getAwsAuthPlugin, + resolveAwsAuthConfig, +} from "@aws-sdk/middleware-signing"; +import { + getUserAgentPlugin, + resolveUserAgentConfig, + UserAgentInputConfig, + UserAgentResolvedConfig, +} from "@aws-sdk/middleware-user-agent"; +import { HttpHandler as __HttpHandler } from "@aws-sdk/protocol-http"; +import { + Client as __Client, + SmithyConfiguration as __SmithyConfiguration, + SmithyResolvedConfiguration as __SmithyResolvedConfiguration, +} from "@aws-sdk/smithy-client"; +import { + Credentials as __Credentials, + Decoder as __Decoder, + Encoder as __Encoder, + Hash as __Hash, + HashConstructor as __HashConstructor, + HttpHandlerOptions as __HttpHandlerOptions, + Logger as __Logger, + Provider as __Provider, + Provider, + RegionInfoProvider, + StreamCollector as __StreamCollector, + UrlParser as __UrlParser, + UserAgent as __UserAgent, +} from "@aws-sdk/types"; + +import { + DeleteAlternateContactCommandInput, + DeleteAlternateContactCommandOutput, +} from "./commands/DeleteAlternateContactCommand"; +import { + GetAlternateContactCommandInput, + GetAlternateContactCommandOutput, +} from "./commands/GetAlternateContactCommand"; +import { + PutAlternateContactCommandInput, + PutAlternateContactCommandOutput, +} from "./commands/PutAlternateContactCommand"; +import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig"; + +export type ServiceInputTypes = + | DeleteAlternateContactCommandInput + | GetAlternateContactCommandInput + | PutAlternateContactCommandInput; + +export type ServiceOutputTypes = + | DeleteAlternateContactCommandOutput + | GetAlternateContactCommandOutput + | PutAlternateContactCommandOutput; + +export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { + /** + * The HTTP handler to use. Fetch in browser and Https in Nodejs. + */ + requestHandler?: __HttpHandler; + + /** + * A constructor for a class implementing the {@link __Hash} interface + * that computes the SHA-256 HMAC or checksum of a string or binary buffer. + * @internal + */ + sha256?: __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?: (body: any) => number | undefined; + + /** + * 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 dyanamically changing the endpoint of the client based on the hostPrefix + * trait of an operation. + */ + disableHostPrefix?: boolean; + + /** + * Value for how many times a request will be made at most in case of retry. + */ + maxAttempts?: number | __Provider; + + /** + * Specifies which retry algorithm to use. + */ + retryMode?: string | __Provider; + + /** + * Optional logger for logging debug/info/warn/error. + */ + logger?: __Logger; + + /** + * Unique service identifier. + * @internal + */ + serviceId?: string; + + /** + * The AWS region to which this client will send requests + */ + region?: string | __Provider; + + /** + * Default credentials provider; Not available in browser runtime. + * @internal + */ + credentialDefaultProvider?: (input: any) => __Provider<__Credentials>; + + /** + * Fetch related hostname, signing name or signing region with given region. + * @internal + */ + regionInfoProvider?: RegionInfoProvider; + + /** + * The provider populating default tracking information to be sent with `user-agent`, `x-amz-user-agent` header + * @internal + */ + defaultUserAgentProvider?: Provider<__UserAgent>; +} + +type AccountClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> & + ClientDefaults & + RegionInputConfig & + EndpointsInputConfig & + RetryInputConfig & + HostHeaderInputConfig & + AwsAuthInputConfig & + UserAgentInputConfig; +/** + * The configuration interface of AccountClient class constructor that set the region, credentials and other options. + */ +export interface AccountClientConfig extends AccountClientConfigType {} + +type AccountClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> & + Required & + RegionResolvedConfig & + EndpointsResolvedConfig & + RetryResolvedConfig & + HostHeaderResolvedConfig & + AwsAuthResolvedConfig & + UserAgentResolvedConfig; +/** + * The resolved configuration interface of AccountClient class. This is resolved and normalized from the {@link AccountClientConfig | constructor configuration interface}. + */ +export interface AccountClientResolvedConfig extends AccountClientResolvedConfigType {} + +/** + *

Operations for Amazon Web Services Account Management

+ */ +export class AccountClient extends __Client< + __HttpHandlerOptions, + ServiceInputTypes, + ServiceOutputTypes, + AccountClientResolvedConfig +> { + /** + * The resolved configuration of AccountClient class. This is resolved and normalized from the {@link AccountClientConfig | constructor configuration interface}. + */ + readonly config: AccountClientResolvedConfig; + + constructor(configuration: AccountClientConfig) { + const _config_0 = __getRuntimeConfig(configuration); + const _config_1 = resolveRegionConfig(_config_0); + const _config_2 = resolveEndpointsConfig(_config_1); + const _config_3 = resolveRetryConfig(_config_2); + const _config_4 = resolveHostHeaderConfig(_config_3); + const _config_5 = resolveAwsAuthConfig(_config_4); + const _config_6 = resolveUserAgentConfig(_config_5); + super(_config_6); + this.config = _config_6; + this.middlewareStack.use(getRetryPlugin(this.config)); + this.middlewareStack.use(getContentLengthPlugin(this.config)); + this.middlewareStack.use(getHostHeaderPlugin(this.config)); + this.middlewareStack.use(getLoggerPlugin(this.config)); + this.middlewareStack.use(getAwsAuthPlugin(this.config)); + this.middlewareStack.use(getUserAgentPlugin(this.config)); + } + + /** + * Destroy underlying resources, like sockets. It's usually not necessary to do this. + * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed. + * Otherwise, sockets might stay open for quite a long time before the server terminates them. + */ + destroy(): void { + super.destroy(); + } +} diff --git a/clients/client-account/src/commands/DeleteAlternateContactCommand.ts b/clients/client-account/src/commands/DeleteAlternateContactCommand.ts new file mode 100644 index 0000000000000..cb82f6c300b41 --- /dev/null +++ b/clients/client-account/src/commands/DeleteAlternateContactCommand.ts @@ -0,0 +1,97 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { AccountClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AccountClient"; +import { DeleteAlternateContactRequest } from "../models/models_0"; +import { + deserializeAws_restJson1DeleteAlternateContactCommand, + serializeAws_restJson1DeleteAlternateContactCommand, +} from "../protocols/Aws_restJson1"; + +export interface DeleteAlternateContactCommandInput extends DeleteAlternateContactRequest {} +export interface DeleteAlternateContactCommandOutput extends __MetadataBearer {} + +/** + *

Deletes the specified alternate contact from an Amazon Web Services account.

+ *

For complete details about how to use the alternate contact operations, see Access or + * updating the alternate contacts.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { AccountClient, DeleteAlternateContactCommand } from "@aws-sdk/client-account"; // ES Modules import + * // const { AccountClient, DeleteAlternateContactCommand } = require("@aws-sdk/client-account"); // CommonJS import + * const client = new AccountClient(config); + * const command = new DeleteAlternateContactCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link DeleteAlternateContactCommandInput} for command's `input` shape. + * @see {@link DeleteAlternateContactCommandOutput} for command's `response` shape. + * @see {@link AccountClientResolvedConfig | config} for command's `input` shape. + * + */ +export class DeleteAlternateContactCommand extends $Command< + DeleteAlternateContactCommandInput, + DeleteAlternateContactCommandOutput, + AccountClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DeleteAlternateContactCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: AccountClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "AccountClient"; + const commandName = "DeleteAlternateContactCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: DeleteAlternateContactRequest.filterSensitiveLog, + outputFilterSensitiveLog: (output: any) => output, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: DeleteAlternateContactCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1DeleteAlternateContactCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1DeleteAlternateContactCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-account/src/commands/GetAlternateContactCommand.ts b/clients/client-account/src/commands/GetAlternateContactCommand.ts new file mode 100644 index 0000000000000..490bd2eea7e59 --- /dev/null +++ b/clients/client-account/src/commands/GetAlternateContactCommand.ts @@ -0,0 +1,97 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { AccountClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AccountClient"; +import { GetAlternateContactRequest, GetAlternateContactResponse } from "../models/models_0"; +import { + deserializeAws_restJson1GetAlternateContactCommand, + serializeAws_restJson1GetAlternateContactCommand, +} from "../protocols/Aws_restJson1"; + +export interface GetAlternateContactCommandInput extends GetAlternateContactRequest {} +export interface GetAlternateContactCommandOutput extends GetAlternateContactResponse, __MetadataBearer {} + +/** + *

Retrieves the specified alternate contact attached to an Amazon Web Services account.

+ *

For complete details about how to use the alternate contact operations, see Access or + * updating the alternate contacts.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { AccountClient, GetAlternateContactCommand } from "@aws-sdk/client-account"; // ES Modules import + * // const { AccountClient, GetAlternateContactCommand } = require("@aws-sdk/client-account"); // CommonJS import + * const client = new AccountClient(config); + * const command = new GetAlternateContactCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link GetAlternateContactCommandInput} for command's `input` shape. + * @see {@link GetAlternateContactCommandOutput} for command's `response` shape. + * @see {@link AccountClientResolvedConfig | config} for command's `input` shape. + * + */ +export class GetAlternateContactCommand extends $Command< + GetAlternateContactCommandInput, + GetAlternateContactCommandOutput, + AccountClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetAlternateContactCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: AccountClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "AccountClient"; + const commandName = "GetAlternateContactCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: GetAlternateContactRequest.filterSensitiveLog, + outputFilterSensitiveLog: GetAlternateContactResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: GetAlternateContactCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1GetAlternateContactCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1GetAlternateContactCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-account/src/commands/PutAlternateContactCommand.ts b/clients/client-account/src/commands/PutAlternateContactCommand.ts new file mode 100644 index 0000000000000..67dea757069fb --- /dev/null +++ b/clients/client-account/src/commands/PutAlternateContactCommand.ts @@ -0,0 +1,97 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { AccountClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AccountClient"; +import { PutAlternateContactRequest } from "../models/models_0"; +import { + deserializeAws_restJson1PutAlternateContactCommand, + serializeAws_restJson1PutAlternateContactCommand, +} from "../protocols/Aws_restJson1"; + +export interface PutAlternateContactCommandInput extends PutAlternateContactRequest {} +export interface PutAlternateContactCommandOutput extends __MetadataBearer {} + +/** + *

Modifies the specified alternate contact attached to an Amazon Web Services account.

+ *

For complete details about how to use the alternate contact operations, see Access or + * updating the alternate contacts.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { AccountClient, PutAlternateContactCommand } from "@aws-sdk/client-account"; // ES Modules import + * // const { AccountClient, PutAlternateContactCommand } = require("@aws-sdk/client-account"); // CommonJS import + * const client = new AccountClient(config); + * const command = new PutAlternateContactCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link PutAlternateContactCommandInput} for command's `input` shape. + * @see {@link PutAlternateContactCommandOutput} for command's `response` shape. + * @see {@link AccountClientResolvedConfig | config} for command's `input` shape. + * + */ +export class PutAlternateContactCommand extends $Command< + PutAlternateContactCommandInput, + PutAlternateContactCommandOutput, + AccountClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: PutAlternateContactCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: AccountClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "AccountClient"; + const commandName = "PutAlternateContactCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: PutAlternateContactRequest.filterSensitiveLog, + outputFilterSensitiveLog: (output: any) => output, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: PutAlternateContactCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1PutAlternateContactCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1PutAlternateContactCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-account/src/endpoints.ts b/clients/client-account/src/endpoints.ts new file mode 100644 index 0000000000000..f8bf63bec48ad --- /dev/null +++ b/clients/client-account/src/endpoints.ts @@ -0,0 +1,67 @@ +import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; +import { RegionInfoProvider } from "@aws-sdk/types"; + +const regionHash: RegionHash = { + "aws-cn-global": { + hostname: "account.cn-northwest-1.amazonaws.com.cn", + signingRegion: "cn-northwest-1", + }, + "aws-global": { + hostname: "account.us-east-1.amazonaws.com", + signingRegion: "us-east-1", + }, +}; + +const partitionHash: PartitionHash = { + aws: { + regions: [ + "af-south-1", + "ap-east-1", + "ap-northeast-1", + "ap-northeast-2", + "ap-northeast-3", + "ap-south-1", + "ap-southeast-1", + "ap-southeast-2", + "aws-global", + "ca-central-1", + "eu-central-1", + "eu-north-1", + "eu-south-1", + "eu-west-1", + "eu-west-2", + "eu-west-3", + "me-south-1", + "sa-east-1", + "us-east-1", + "us-east-2", + "us-west-1", + "us-west-2", + ], + endpoint: "aws-global", + }, + "aws-cn": { + regions: ["aws-cn-global", "cn-north-1", "cn-northwest-1"], + endpoint: "aws-cn-global", + }, + "aws-iso": { + regions: ["us-iso-east-1"], + hostname: "account.{region}.c2s.ic.gov", + }, + "aws-iso-b": { + regions: ["us-isob-east-1"], + hostname: "account.{region}.sc2s.sgov.gov", + }, + "aws-us-gov": { + regions: ["us-gov-east-1", "us-gov-west-1"], + hostname: "account.{region}.amazonaws.com", + }, +}; + +export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => + getRegionInfo(region, { + ...options, + signingService: "account", + regionHash, + partitionHash, + }); diff --git a/clients/client-account/src/index.ts b/clients/client-account/src/index.ts new file mode 100644 index 0000000000000..3bdbaacfacf22 --- /dev/null +++ b/clients/client-account/src/index.ts @@ -0,0 +1,6 @@ +export * from "./AccountClient"; +export * from "./Account"; +export * from "./commands/DeleteAlternateContactCommand"; +export * from "./commands/GetAlternateContactCommand"; +export * from "./commands/PutAlternateContactCommand"; +export * from "./models/index"; diff --git a/clients/client-account/src/models/index.ts b/clients/client-account/src/models/index.ts new file mode 100644 index 0000000000000..09c5d6e09b8c5 --- /dev/null +++ b/clients/client-account/src/models/index.ts @@ -0,0 +1 @@ +export * from "./models_0"; diff --git a/clients/client-account/src/models/models_0.ts b/clients/client-account/src/models/models_0.ts new file mode 100644 index 0000000000000..5918596cb3c80 --- /dev/null +++ b/clients/client-account/src/models/models_0.ts @@ -0,0 +1,304 @@ +import { SENSITIVE_STRING } from "@aws-sdk/smithy-client"; +import { MetadataBearer as $MetadataBearer, SmithyException as __SmithyException } from "@aws-sdk/types"; + +/** + *

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

+ */ +export interface AccessDeniedException extends __SmithyException, $MetadataBearer { + name: "AccessDeniedException"; + $fault: "client"; + message: string | undefined; +} + +export namespace AccessDeniedException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: AccessDeniedException): any => ({ + ...obj, + }); +} + +export enum AlternateContactType { + BILLING = "BILLING", + OPERATIONS = "OPERATIONS", + SECURITY = "SECURITY", +} + +export interface DeleteAlternateContactRequest { + /** + *

Specifies which of the alternate contacts to delete.

+ */ + AlternateContactType: AlternateContactType | string | undefined; + + /** + *

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

+ *

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

+ *

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

+ * + *

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

+ *
+ *

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

+ */ + AccountId?: string; +} + +export namespace DeleteAlternateContactRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DeleteAlternateContactRequest): any => ({ + ...obj, + }); +} + +/** + *

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

+ */ +export interface InternalServerException extends __SmithyException, $MetadataBearer { + name: "InternalServerException"; + $fault: "server"; + $retryable: {}; + message: string | undefined; +} + +export namespace InternalServerException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: InternalServerException): any => ({ + ...obj, + }); +} + +/** + *

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

+ */ +export interface ResourceNotFoundException extends __SmithyException, $MetadataBearer { + name: "ResourceNotFoundException"; + $fault: "client"; + message: string | undefined; +} + +export namespace ResourceNotFoundException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ResourceNotFoundException): any => ({ + ...obj, + }); +} + +/** + *

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

+ */ +export interface TooManyRequestsException extends __SmithyException, $MetadataBearer { + name: "TooManyRequestsException"; + $fault: "client"; + $retryable: { + throttling: true; + }; + message: string | undefined; +} + +export namespace TooManyRequestsException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: TooManyRequestsException): any => ({ + ...obj, + }); +} + +/** + *

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

+ */ +export interface ValidationException extends __SmithyException, $MetadataBearer { + name: "ValidationException"; + $fault: "client"; + message: string | undefined; +} + +export namespace ValidationException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ValidationException): any => ({ + ...obj, + }); +} + +export interface GetAlternateContactRequest { + /** + *

Specifies which alternate contact you want to retrieve.

+ */ + AlternateContactType: AlternateContactType | string | undefined; + + /** + *

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

+ *

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

+ *

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

+ * + *

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

+ *
+ *

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

+ */ + AccountId?: string; +} + +export namespace GetAlternateContactRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetAlternateContactRequest): any => ({ + ...obj, + }); +} + +/** + *

A structure that contains the details of an alternate contact associated with an Amazon Web Services + * account

+ */ +export interface AlternateContact { + /** + *

The name associated with this alternate contact.

+ */ + Name?: string; + + /** + *

The title associated with this alternate contact.

+ */ + Title?: string; + + /** + *

The email address associated with this alternate contact.

+ */ + EmailAddress?: string; + + /** + *

The phone number associated with this alternate contact.

+ */ + PhoneNumber?: string; + + /** + *

The type of alternate contact.

+ */ + AlternateContactType?: AlternateContactType | string; +} + +export namespace AlternateContact { + /** + * @internal + */ + export const filterSensitiveLog = (obj: AlternateContact): any => ({ + ...obj, + ...(obj.Name && { Name: SENSITIVE_STRING }), + ...(obj.Title && { Title: SENSITIVE_STRING }), + ...(obj.EmailAddress && { EmailAddress: SENSITIVE_STRING }), + ...(obj.PhoneNumber && { PhoneNumber: SENSITIVE_STRING }), + }); +} + +export interface GetAlternateContactResponse { + /** + *

A structure that contains the details for the specified alternate contact.

+ */ + AlternateContact?: AlternateContact; +} + +export namespace GetAlternateContactResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetAlternateContactResponse): any => ({ + ...obj, + ...(obj.AlternateContact && { AlternateContact: AlternateContact.filterSensitiveLog(obj.AlternateContact) }), + }); +} + +export interface PutAlternateContactRequest { + /** + *

Specifies a name for the alternate contact.

+ */ + Name: string | undefined; + + /** + *

Specifies a title for the alternate contact.

+ */ + Title: string | undefined; + + /** + *

Specifies an email address for the alternate contact.

+ */ + EmailAddress: string | undefined; + + /** + *

Specifies a phone number for the alternate contact.

+ */ + PhoneNumber: string | undefined; + + /** + *

Specifies which alternate contact you want to create or update.

+ */ + AlternateContactType: AlternateContactType | string | undefined; + + /** + *

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

+ *

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

+ *

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

+ * + *

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

+ *
+ *

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

+ */ + AccountId?: string; +} + +export namespace PutAlternateContactRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: PutAlternateContactRequest): any => ({ + ...obj, + ...(obj.Name && { Name: SENSITIVE_STRING }), + ...(obj.Title && { Title: SENSITIVE_STRING }), + ...(obj.EmailAddress && { EmailAddress: SENSITIVE_STRING }), + ...(obj.PhoneNumber && { PhoneNumber: SENSITIVE_STRING }), + }); +} diff --git a/clients/client-account/src/protocols/Aws_restJson1.ts b/clients/client-account/src/protocols/Aws_restJson1.ts new file mode 100644 index 0000000000000..4f430a218266e --- /dev/null +++ b/clients/client-account/src/protocols/Aws_restJson1.ts @@ -0,0 +1,528 @@ +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { + expectNonNull as __expectNonNull, + expectObject as __expectObject, + expectString as __expectString, +} from "@aws-sdk/smithy-client"; +import { + Endpoint as __Endpoint, + MetadataBearer as __MetadataBearer, + ResponseMetadata as __ResponseMetadata, + SerdeContext as __SerdeContext, + SmithyException as __SmithyException, +} from "@aws-sdk/types"; + +import { + DeleteAlternateContactCommandInput, + DeleteAlternateContactCommandOutput, +} from "../commands/DeleteAlternateContactCommand"; +import { + GetAlternateContactCommandInput, + GetAlternateContactCommandOutput, +} from "../commands/GetAlternateContactCommand"; +import { + PutAlternateContactCommandInput, + PutAlternateContactCommandOutput, +} from "../commands/PutAlternateContactCommand"; +import { + AccessDeniedException, + AlternateContact, + InternalServerException, + ResourceNotFoundException, + TooManyRequestsException, + ValidationException, +} from "../models/models_0"; + +export const serializeAws_restJson1DeleteAlternateContactCommand = async ( + input: DeleteAlternateContactCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + const resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/deleteAlternateContact"; + let body: any; + body = JSON.stringify({ + ...(input.AccountId !== undefined && input.AccountId !== null && { AccountId: input.AccountId }), + ...(input.AlternateContactType !== undefined && + input.AlternateContactType !== null && { AlternateContactType: input.AlternateContactType }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1GetAlternateContactCommand = async ( + input: GetAlternateContactCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/getAlternateContact"; + let body: any; + body = JSON.stringify({ + ...(input.AccountId !== undefined && input.AccountId !== null && { AccountId: input.AccountId }), + ...(input.AlternateContactType !== undefined && + input.AlternateContactType !== null && { AlternateContactType: input.AlternateContactType }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1PutAlternateContactCommand = async ( + input: PutAlternateContactCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/putAlternateContact"; + let body: any; + body = JSON.stringify({ + ...(input.AccountId !== undefined && input.AccountId !== null && { AccountId: input.AccountId }), + ...(input.AlternateContactType !== undefined && + input.AlternateContactType !== null && { AlternateContactType: input.AlternateContactType }), + ...(input.EmailAddress !== undefined && input.EmailAddress !== null && { EmailAddress: input.EmailAddress }), + ...(input.Name !== undefined && input.Name !== null && { Name: input.Name }), + ...(input.PhoneNumber !== undefined && input.PhoneNumber !== null && { PhoneNumber: input.PhoneNumber }), + ...(input.Title !== undefined && input.Title !== null && { Title: input.Title }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +export const deserializeAws_restJson1DeleteAlternateContactCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1DeleteAlternateContactCommandError(output, context); + } + const contents: DeleteAlternateContactCommandOutput = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1DeleteAlternateContactCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.account#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.account#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.account#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.account#TooManyRequestsException": + response = { + ...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.account#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1GetAlternateContactCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1GetAlternateContactCommandError(output, context); + } + const contents: GetAlternateContactCommandOutput = { + $metadata: deserializeMetadata(output), + AlternateContact: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.AlternateContact !== undefined && data.AlternateContact !== null) { + contents.AlternateContact = deserializeAws_restJson1AlternateContact(data.AlternateContact, context); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1GetAlternateContactCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.account#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.account#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.account#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.account#TooManyRequestsException": + response = { + ...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.account#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1PutAlternateContactCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1PutAlternateContactCommandError(output, context); + } + const contents: PutAlternateContactCommandOutput = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1PutAlternateContactCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.account#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.account#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.account#TooManyRequestsException": + response = { + ...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.account#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +const deserializeAws_restJson1AccessDeniedExceptionResponse = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const contents: AccessDeniedException = { + name: "AccessDeniedException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + message: undefined, + }; + const data: any = parsedOutput.body; + if (data.message !== undefined && data.message !== null) { + contents.message = __expectString(data.message); + } + return contents; +}; + +const deserializeAws_restJson1InternalServerExceptionResponse = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const contents: InternalServerException = { + name: "InternalServerException", + $fault: "server", + $retryable: {}, + $metadata: deserializeMetadata(parsedOutput), + message: undefined, + }; + const data: any = parsedOutput.body; + if (data.message !== undefined && data.message !== null) { + contents.message = __expectString(data.message); + } + return contents; +}; + +const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const contents: ResourceNotFoundException = { + name: "ResourceNotFoundException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + message: undefined, + }; + const data: any = parsedOutput.body; + if (data.message !== undefined && data.message !== null) { + contents.message = __expectString(data.message); + } + return contents; +}; + +const deserializeAws_restJson1TooManyRequestsExceptionResponse = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const contents: TooManyRequestsException = { + name: "TooManyRequestsException", + $fault: "client", + $retryable: { + throttling: true, + }, + $metadata: deserializeMetadata(parsedOutput), + message: undefined, + }; + const data: any = parsedOutput.body; + if (data.message !== undefined && data.message !== null) { + contents.message = __expectString(data.message); + } + return contents; +}; + +const deserializeAws_restJson1ValidationExceptionResponse = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const contents: ValidationException = { + name: "ValidationException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + message: undefined, + }; + const data: any = parsedOutput.body; + if (data.message !== undefined && data.message !== null) { + contents.message = __expectString(data.message); + } + return contents; +}; + +const deserializeAws_restJson1AlternateContact = (output: any, context: __SerdeContext): AlternateContact => { + return { + AlternateContactType: __expectString(output.AlternateContactType), + EmailAddress: __expectString(output.EmailAddress), + Name: __expectString(output.Name), + PhoneNumber: __expectString(output.PhoneNumber), + Title: __expectString(output.Title), + } as any; +}; + +const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ + httpStatusCode: output.statusCode, + requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"], + extendedRequestId: output.headers["x-amz-id-2"], + cfId: output.headers["x-amz-cf-id"], +}); + +// Collect low-level response body stream to Uint8Array. +const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext): Promise => { + if (streamBody instanceof Uint8Array) { + return Promise.resolve(streamBody); + } + return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array()); +}; + +// Encode Uint8Array data into string with utf-8. +const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => + collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); + +const isSerializableHeaderValue = (value: any): boolean => + value !== undefined && + value !== null && + value !== "" && + (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) && + (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0); + +const parseBody = (streamBody: any, context: __SerdeContext): any => + collectBodyString(streamBody, context).then((encoded) => { + if (encoded.length) { + return JSON.parse(encoded); + } + return {}; + }); + +/** + * Load an error code for the aws.rest-json-1.1 protocol. + */ +const loadRestJsonErrorCode = (output: __HttpResponse, data: any): string => { + const findKey = (object: any, key: string) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()); + + const sanitizeErrorCode = (rawValue: string): string => { + let cleanValue = rawValue; + if (cleanValue.indexOf(":") >= 0) { + cleanValue = cleanValue.split(":")[0]; + } + if (cleanValue.indexOf("#") >= 0) { + cleanValue = cleanValue.split("#")[1]; + } + return cleanValue; + }; + + const headerKey = findKey(output.headers, "x-amzn-errortype"); + if (headerKey !== undefined) { + return sanitizeErrorCode(output.headers[headerKey]); + } + + if (data.code !== undefined) { + return sanitizeErrorCode(data.code); + } + + if (data["__type"] !== undefined) { + return sanitizeErrorCode(data["__type"]); + } + + return ""; +}; diff --git a/clients/client-account/src/runtimeConfig.browser.ts b/clients/client-account/src/runtimeConfig.browser.ts new file mode 100644 index 0000000000000..c81ba305c20f2 --- /dev/null +++ b/clients/client-account/src/runtimeConfig.browser.ts @@ -0,0 +1,41 @@ +import { Sha256 } from "@aws-crypto/sha256-browser"; +import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; +import { invalidProvider } from "@aws-sdk/invalid-dependency"; +import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; +import { fromBase64, toBase64 } from "@aws-sdk/util-base64-browser"; +import { calculateBodyLength } from "@aws-sdk/util-body-length-browser"; +import { defaultUserAgent } from "@aws-sdk/util-user-agent-browser"; +import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-browser"; + +// @ts-ignore: package.json will be imported from dist folders +import packageInfo from "../package.json"; +import { AccountClientConfig } from "./AccountClient"; +import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared"; + +/** + * @internal + */ +export const getRuntimeConfig = (config: AccountClientConfig) => { + const clientSharedValues = getSharedRuntimeConfig(config); + return { + ...clientSharedValues, + ...config, + runtime: "browser", + base64Decoder: config?.base64Decoder ?? fromBase64, + base64Encoder: config?.base64Encoder ?? toBase64, + bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength, + credentialDefaultProvider: + config?.credentialDefaultProvider ?? ((_: unknown) => () => Promise.reject(new Error("Credential is missing"))), + defaultUserAgentProvider: + config?.defaultUserAgentProvider ?? + defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), + maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, + region: config?.region ?? invalidProvider("Region is missing"), + requestHandler: config?.requestHandler ?? new FetchHttpHandler(), + retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), + sha256: config?.sha256 ?? Sha256, + streamCollector: config?.streamCollector ?? streamCollector, + utf8Decoder: config?.utf8Decoder ?? fromUtf8, + utf8Encoder: config?.utf8Encoder ?? toUtf8, + }; +}; diff --git a/clients/client-account/src/runtimeConfig.native.ts b/clients/client-account/src/runtimeConfig.native.ts new file mode 100644 index 0000000000000..8fc573935394a --- /dev/null +++ b/clients/client-account/src/runtimeConfig.native.ts @@ -0,0 +1,17 @@ +import { Sha256 } from "@aws-crypto/sha256-js"; + +import { AccountClientConfig } from "./AccountClient"; +import { getRuntimeConfig as getBrowserRuntimeConfig } from "./runtimeConfig.browser"; + +/** + * @internal + */ +export const getRuntimeConfig = (config: AccountClientConfig) => { + const browserDefaults = getBrowserRuntimeConfig(config); + return { + ...browserDefaults, + ...config, + runtime: "react-native", + sha256: config?.sha256 ?? Sha256, + }; +}; diff --git a/clients/client-account/src/runtimeConfig.shared.ts b/clients/client-account/src/runtimeConfig.shared.ts new file mode 100644 index 0000000000000..fb932dae7cbc7 --- /dev/null +++ b/clients/client-account/src/runtimeConfig.shared.ts @@ -0,0 +1,17 @@ +import { Logger as __Logger } from "@aws-sdk/types"; +import { parseUrl } from "@aws-sdk/url-parser"; + +import { AccountClientConfig } from "./AccountClient"; +import { defaultRegionInfoProvider } from "./endpoints"; + +/** + * @internal + */ +export const getRuntimeConfig = (config: AccountClientConfig) => ({ + apiVersion: "2021-02-01", + disableHostPrefix: config?.disableHostPrefix ?? false, + logger: config?.logger ?? ({} as __Logger), + regionInfoProvider: config?.regionInfoProvider ?? defaultRegionInfoProvider, + serviceId: config?.serviceId ?? "Account", + urlParser: config?.urlParser ?? parseUrl, +}); diff --git a/clients/client-account/src/runtimeConfig.ts b/clients/client-account/src/runtimeConfig.ts new file mode 100644 index 0000000000000..ff00c2a8c1b90 --- /dev/null +++ b/clients/client-account/src/runtimeConfig.ts @@ -0,0 +1,46 @@ +import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; +import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; +import { Hash } from "@aws-sdk/hash-node"; +import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; +import { loadConfig as loadNodeConfig } from "@aws-sdk/node-config-provider"; +import { NodeHttpHandler, streamCollector } from "@aws-sdk/node-http-handler"; +import { emitWarningIfUnsupportedVersion } from "@aws-sdk/smithy-client"; +import { fromBase64, toBase64 } from "@aws-sdk/util-base64-node"; +import { calculateBodyLength } from "@aws-sdk/util-body-length-node"; +import { defaultUserAgent } from "@aws-sdk/util-user-agent-node"; +import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-node"; + +// @ts-ignore: package.json will be imported from dist folders +import packageInfo from "../package.json"; +import { AccountClientConfig } from "./AccountClient"; +import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared"; + +/** + * @internal + */ +export const getRuntimeConfig = (config: AccountClientConfig) => { + emitWarningIfUnsupportedVersion(process.version); + const clientSharedValues = getSharedRuntimeConfig(config); + return { + ...clientSharedValues, + ...config, + runtime: "node", + base64Decoder: config?.base64Decoder ?? fromBase64, + base64Encoder: config?.base64Encoder ?? toBase64, + bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength, + credentialDefaultProvider: + config?.credentialDefaultProvider ?? decorateDefaultCredentialProvider(credentialDefaultProvider), + defaultUserAgentProvider: + config?.defaultUserAgentProvider ?? + defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), + maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), + region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), + requestHandler: config?.requestHandler ?? new NodeHttpHandler(), + retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), + sha256: config?.sha256 ?? Hash.bind(null, "sha256"), + streamCollector: config?.streamCollector ?? streamCollector, + utf8Decoder: config?.utf8Decoder ?? fromUtf8, + utf8Encoder: config?.utf8Encoder ?? toUtf8, + }; +}; diff --git a/clients/client-account/tsconfig.es.json b/clients/client-account/tsconfig.es.json new file mode 100644 index 0000000000000..4c72364cd1a07 --- /dev/null +++ b/clients/client-account/tsconfig.es.json @@ -0,0 +1,10 @@ +{ + "extends": "./tsconfig", + "compilerOptions": { + "target": "es5", + "module": "esnext", + "moduleResolution": "node", + "lib": ["dom", "es5", "es2015.promise", "es2015.collection", "es2015.iterable", "es2015.symbol.wellknown"], + "outDir": "dist-es" + } +} diff --git a/clients/client-account/tsconfig.json b/clients/client-account/tsconfig.json new file mode 100644 index 0000000000000..3d15a85b2981b --- /dev/null +++ b/clients/client-account/tsconfig.json @@ -0,0 +1,33 @@ +{ + "compilerOptions": { + "rootDir": "./src", + "alwaysStrict": true, + "target": "ES2018", + "module": "commonjs", + "strict": true, + "sourceMap": true, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "incremental": true, + "resolveJsonModule": true, + "esModuleInterop": true, + "outDir": "dist-cjs", + "removeComments": true + }, + "typedocOptions": { + "exclude": ["**/node_modules/**", "**/*.spec.ts", "**/protocols/*.ts", "**/e2e/*.ts", "**/endpoints.ts"], + "excludeNotExported": true, + "excludePrivate": true, + "hideGenerator": true, + "ignoreCompilerErrors": true, + "includeDeclarations": true, + "stripInternal": true, + "readme": "README.md", + "mode": "file", + "out": "docs", + "theme": "minimal", + "plugin": ["@aws-sdk/client-documentation-generator"] + }, + "exclude": ["test/**/*"] +} diff --git a/clients/client-account/tsconfig.types.json b/clients/client-account/tsconfig.types.json new file mode 100644 index 0000000000000..b7018298d8ae6 --- /dev/null +++ b/clients/client-account/tsconfig.types.json @@ -0,0 +1,9 @@ +{ + "extends": "./tsconfig", + "compilerOptions": { + "removeComments": false, + "declaration": true, + "declarationDir": "dist-types" + }, + "exclude": ["test/**/*", "dist-types/**/*"] +} diff --git a/clients/client-amp/README.md b/clients/client-amp/README.md index 7439b5d0d1971..396b8ee90e100 100644 --- a/clients/client-amp/README.md +++ b/clients/client-amp/README.md @@ -24,16 +24,16 @@ using your favorite package manager: The AWS SDK is modulized by clients and commands. To send a request, you only need to import the `AmpClient` and -the commands you need, for example `CreateWorkspaceCommand`: +the commands you need, for example `CreateAlertManagerDefinitionCommand`: ```js // ES5 example -const { AmpClient, CreateWorkspaceCommand } = require("@aws-sdk/client-amp"); +const { AmpClient, CreateAlertManagerDefinitionCommand } = require("@aws-sdk/client-amp"); ``` ```ts // ES6+ example -import { AmpClient, CreateWorkspaceCommand } from "@aws-sdk/client-amp"; +import { AmpClient, CreateAlertManagerDefinitionCommand } from "@aws-sdk/client-amp"; ``` ### Usage @@ -52,7 +52,7 @@ const client = new AmpClient({ region: "REGION" }); const params = { /** input parameters */ }; -const command = new CreateWorkspaceCommand(params); +const command = new CreateAlertManagerDefinitionCommand(params); ``` #### Async/await @@ -131,7 +131,7 @@ const client = new AWS.Amp({ region: "REGION" }); // async/await. try { - const data = await client.createWorkspace(params); + const data = await client.createAlertManagerDefinition(params); // process data. } catch (error) { // error handling. @@ -139,7 +139,7 @@ try { // Promises. client - .createWorkspace(params) + .createAlertManagerDefinition(params) .then((data) => { // process data. }) @@ -148,7 +148,7 @@ client }); // callbacks. -client.createWorkspace(params, (err, data) => { +client.createAlertManagerDefinition(params, (err, data) => { // proccess err and data. }); ``` diff --git a/clients/client-amp/package.json b/clients/client-amp/package.json index 32f928355853b..ebe3337145385 100644 --- a/clients/client-amp/package.json +++ b/clients/client-amp/package.json @@ -49,6 +49,7 @@ "@aws-sdk/util-user-agent-node": "3.34.0", "@aws-sdk/util-utf8-browser": "3.34.0", "@aws-sdk/util-utf8-node": "3.34.0", + "@aws-sdk/util-waiter": "3.34.0", "tslib": "^2.3.0", "uuid": "^8.3.2" }, diff --git a/clients/client-amp/src/Amp.ts b/clients/client-amp/src/Amp.ts index a25b194cf006f..d3f36da81b360 100644 --- a/clients/client-amp/src/Amp.ts +++ b/clients/client-amp/src/Amp.ts @@ -1,21 +1,56 @@ import { HttpHandlerOptions as __HttpHandlerOptions } from "@aws-sdk/types"; import { AmpClient } from "./AmpClient"; +import { + CreateAlertManagerDefinitionCommand, + CreateAlertManagerDefinitionCommandInput, + CreateAlertManagerDefinitionCommandOutput, +} from "./commands/CreateAlertManagerDefinitionCommand"; +import { + CreateRuleGroupsNamespaceCommand, + CreateRuleGroupsNamespaceCommandInput, + CreateRuleGroupsNamespaceCommandOutput, +} from "./commands/CreateRuleGroupsNamespaceCommand"; import { CreateWorkspaceCommand, CreateWorkspaceCommandInput, CreateWorkspaceCommandOutput, } from "./commands/CreateWorkspaceCommand"; +import { + DeleteAlertManagerDefinitionCommand, + DeleteAlertManagerDefinitionCommandInput, + DeleteAlertManagerDefinitionCommandOutput, +} from "./commands/DeleteAlertManagerDefinitionCommand"; +import { + DeleteRuleGroupsNamespaceCommand, + DeleteRuleGroupsNamespaceCommandInput, + DeleteRuleGroupsNamespaceCommandOutput, +} from "./commands/DeleteRuleGroupsNamespaceCommand"; import { DeleteWorkspaceCommand, DeleteWorkspaceCommandInput, DeleteWorkspaceCommandOutput, } from "./commands/DeleteWorkspaceCommand"; +import { + DescribeAlertManagerDefinitionCommand, + DescribeAlertManagerDefinitionCommandInput, + DescribeAlertManagerDefinitionCommandOutput, +} from "./commands/DescribeAlertManagerDefinitionCommand"; +import { + DescribeRuleGroupsNamespaceCommand, + DescribeRuleGroupsNamespaceCommandInput, + DescribeRuleGroupsNamespaceCommandOutput, +} from "./commands/DescribeRuleGroupsNamespaceCommand"; import { DescribeWorkspaceCommand, DescribeWorkspaceCommandInput, DescribeWorkspaceCommandOutput, } from "./commands/DescribeWorkspaceCommand"; +import { + ListRuleGroupsNamespacesCommand, + ListRuleGroupsNamespacesCommandInput, + ListRuleGroupsNamespacesCommandOutput, +} from "./commands/ListRuleGroupsNamespacesCommand"; import { ListTagsForResourceCommand, ListTagsForResourceCommandInput, @@ -26,6 +61,16 @@ import { ListWorkspacesCommandInput, ListWorkspacesCommandOutput, } from "./commands/ListWorkspacesCommand"; +import { + PutAlertManagerDefinitionCommand, + PutAlertManagerDefinitionCommandInput, + PutAlertManagerDefinitionCommandOutput, +} from "./commands/PutAlertManagerDefinitionCommand"; +import { + PutRuleGroupsNamespaceCommand, + PutRuleGroupsNamespaceCommandInput, + PutRuleGroupsNamespaceCommandOutput, +} from "./commands/PutRuleGroupsNamespaceCommand"; import { TagResourceCommand, TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand"; import { UntagResourceCommand, @@ -42,6 +87,70 @@ import { * Amazon Managed Service for Prometheus */ export class Amp extends AmpClient { + /** + * Create an alert manager definition. + */ + public createAlertManagerDefinition( + args: CreateAlertManagerDefinitionCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public createAlertManagerDefinition( + args: CreateAlertManagerDefinitionCommandInput, + cb: (err: any, data?: CreateAlertManagerDefinitionCommandOutput) => void + ): void; + public createAlertManagerDefinition( + args: CreateAlertManagerDefinitionCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateAlertManagerDefinitionCommandOutput) => void + ): void; + public createAlertManagerDefinition( + args: CreateAlertManagerDefinitionCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: CreateAlertManagerDefinitionCommandOutput) => void), + cb?: (err: any, data?: CreateAlertManagerDefinitionCommandOutput) => void + ): Promise | void { + const command = new CreateAlertManagerDefinitionCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * Create a rule group namespace. + */ + public createRuleGroupsNamespace( + args: CreateRuleGroupsNamespaceCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public createRuleGroupsNamespace( + args: CreateRuleGroupsNamespaceCommandInput, + cb: (err: any, data?: CreateRuleGroupsNamespaceCommandOutput) => void + ): void; + public createRuleGroupsNamespace( + args: CreateRuleGroupsNamespaceCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateRuleGroupsNamespaceCommandOutput) => void + ): void; + public createRuleGroupsNamespace( + args: CreateRuleGroupsNamespaceCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: CreateRuleGroupsNamespaceCommandOutput) => void), + cb?: (err: any, data?: CreateRuleGroupsNamespaceCommandOutput) => void + ): Promise | void { + const command = new CreateRuleGroupsNamespaceCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + /** * Creates a new AMP workspace. */ @@ -74,6 +183,70 @@ export class Amp extends AmpClient { } } + /** + * Deletes an alert manager definition. + */ + public deleteAlertManagerDefinition( + args: DeleteAlertManagerDefinitionCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public deleteAlertManagerDefinition( + args: DeleteAlertManagerDefinitionCommandInput, + cb: (err: any, data?: DeleteAlertManagerDefinitionCommandOutput) => void + ): void; + public deleteAlertManagerDefinition( + args: DeleteAlertManagerDefinitionCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteAlertManagerDefinitionCommandOutput) => void + ): void; + public deleteAlertManagerDefinition( + args: DeleteAlertManagerDefinitionCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DeleteAlertManagerDefinitionCommandOutput) => void), + cb?: (err: any, data?: DeleteAlertManagerDefinitionCommandOutput) => void + ): Promise | void { + const command = new DeleteAlertManagerDefinitionCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * Delete a rule groups namespace. + */ + public deleteRuleGroupsNamespace( + args: DeleteRuleGroupsNamespaceCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public deleteRuleGroupsNamespace( + args: DeleteRuleGroupsNamespaceCommandInput, + cb: (err: any, data?: DeleteRuleGroupsNamespaceCommandOutput) => void + ): void; + public deleteRuleGroupsNamespace( + args: DeleteRuleGroupsNamespaceCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteRuleGroupsNamespaceCommandOutput) => void + ): void; + public deleteRuleGroupsNamespace( + args: DeleteRuleGroupsNamespaceCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DeleteRuleGroupsNamespaceCommandOutput) => void), + cb?: (err: any, data?: DeleteRuleGroupsNamespaceCommandOutput) => void + ): Promise | void { + const command = new DeleteRuleGroupsNamespaceCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + /** * Deletes an AMP workspace. */ @@ -106,6 +279,70 @@ export class Amp extends AmpClient { } } + /** + * Describes an alert manager definition. + */ + public describeAlertManagerDefinition( + args: DescribeAlertManagerDefinitionCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public describeAlertManagerDefinition( + args: DescribeAlertManagerDefinitionCommandInput, + cb: (err: any, data?: DescribeAlertManagerDefinitionCommandOutput) => void + ): void; + public describeAlertManagerDefinition( + args: DescribeAlertManagerDefinitionCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DescribeAlertManagerDefinitionCommandOutput) => void + ): void; + public describeAlertManagerDefinition( + args: DescribeAlertManagerDefinitionCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DescribeAlertManagerDefinitionCommandOutput) => void), + cb?: (err: any, data?: DescribeAlertManagerDefinitionCommandOutput) => void + ): Promise | void { + const command = new DescribeAlertManagerDefinitionCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * Describe a rule groups namespace. + */ + public describeRuleGroupsNamespace( + args: DescribeRuleGroupsNamespaceCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public describeRuleGroupsNamespace( + args: DescribeRuleGroupsNamespaceCommandInput, + cb: (err: any, data?: DescribeRuleGroupsNamespaceCommandOutput) => void + ): void; + public describeRuleGroupsNamespace( + args: DescribeRuleGroupsNamespaceCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DescribeRuleGroupsNamespaceCommandOutput) => void + ): void; + public describeRuleGroupsNamespace( + args: DescribeRuleGroupsNamespaceCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DescribeRuleGroupsNamespaceCommandOutput) => void), + cb?: (err: any, data?: DescribeRuleGroupsNamespaceCommandOutput) => void + ): Promise | void { + const command = new DescribeRuleGroupsNamespaceCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + /** * Describes an existing AMP workspace. */ @@ -138,6 +375,38 @@ export class Amp extends AmpClient { } } + /** + * Lists rule groups namespaces. + */ + public listRuleGroupsNamespaces( + args: ListRuleGroupsNamespacesCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public listRuleGroupsNamespaces( + args: ListRuleGroupsNamespacesCommandInput, + cb: (err: any, data?: ListRuleGroupsNamespacesCommandOutput) => void + ): void; + public listRuleGroupsNamespaces( + args: ListRuleGroupsNamespacesCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListRuleGroupsNamespacesCommandOutput) => void + ): void; + public listRuleGroupsNamespaces( + args: ListRuleGroupsNamespacesCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ListRuleGroupsNamespacesCommandOutput) => void), + cb?: (err: any, data?: ListRuleGroupsNamespacesCommandOutput) => void + ): Promise | void { + const command = new ListRuleGroupsNamespacesCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + /** * Lists the tags you have assigned to the resource. */ @@ -202,6 +471,70 @@ export class Amp extends AmpClient { } } + /** + * Update an alert manager definition. + */ + public putAlertManagerDefinition( + args: PutAlertManagerDefinitionCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public putAlertManagerDefinition( + args: PutAlertManagerDefinitionCommandInput, + cb: (err: any, data?: PutAlertManagerDefinitionCommandOutput) => void + ): void; + public putAlertManagerDefinition( + args: PutAlertManagerDefinitionCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: PutAlertManagerDefinitionCommandOutput) => void + ): void; + public putAlertManagerDefinition( + args: PutAlertManagerDefinitionCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: PutAlertManagerDefinitionCommandOutput) => void), + cb?: (err: any, data?: PutAlertManagerDefinitionCommandOutput) => void + ): Promise | void { + const command = new PutAlertManagerDefinitionCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * Update a rule groups namespace. + */ + public putRuleGroupsNamespace( + args: PutRuleGroupsNamespaceCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public putRuleGroupsNamespace( + args: PutRuleGroupsNamespaceCommandInput, + cb: (err: any, data?: PutRuleGroupsNamespaceCommandOutput) => void + ): void; + public putRuleGroupsNamespace( + args: PutRuleGroupsNamespaceCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: PutRuleGroupsNamespaceCommandOutput) => void + ): void; + public putRuleGroupsNamespace( + args: PutRuleGroupsNamespaceCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: PutRuleGroupsNamespaceCommandOutput) => void), + cb?: (err: any, data?: PutRuleGroupsNamespaceCommandOutput) => void + ): Promise | void { + const command = new PutRuleGroupsNamespaceCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + /** * Creates tags for the specified resource. */ diff --git a/clients/client-amp/src/AmpClient.ts b/clients/client-amp/src/AmpClient.ts index 0826ee25f617a..db7baf48880f7 100644 --- a/clients/client-amp/src/AmpClient.ts +++ b/clients/client-amp/src/AmpClient.ts @@ -49,14 +49,50 @@ import { UserAgent as __UserAgent, } from "@aws-sdk/types"; +import { + CreateAlertManagerDefinitionCommandInput, + CreateAlertManagerDefinitionCommandOutput, +} from "./commands/CreateAlertManagerDefinitionCommand"; +import { + CreateRuleGroupsNamespaceCommandInput, + CreateRuleGroupsNamespaceCommandOutput, +} from "./commands/CreateRuleGroupsNamespaceCommand"; import { CreateWorkspaceCommandInput, CreateWorkspaceCommandOutput } from "./commands/CreateWorkspaceCommand"; +import { + DeleteAlertManagerDefinitionCommandInput, + DeleteAlertManagerDefinitionCommandOutput, +} from "./commands/DeleteAlertManagerDefinitionCommand"; +import { + DeleteRuleGroupsNamespaceCommandInput, + DeleteRuleGroupsNamespaceCommandOutput, +} from "./commands/DeleteRuleGroupsNamespaceCommand"; import { DeleteWorkspaceCommandInput, DeleteWorkspaceCommandOutput } from "./commands/DeleteWorkspaceCommand"; +import { + DescribeAlertManagerDefinitionCommandInput, + DescribeAlertManagerDefinitionCommandOutput, +} from "./commands/DescribeAlertManagerDefinitionCommand"; +import { + DescribeRuleGroupsNamespaceCommandInput, + DescribeRuleGroupsNamespaceCommandOutput, +} from "./commands/DescribeRuleGroupsNamespaceCommand"; import { DescribeWorkspaceCommandInput, DescribeWorkspaceCommandOutput } from "./commands/DescribeWorkspaceCommand"; +import { + ListRuleGroupsNamespacesCommandInput, + ListRuleGroupsNamespacesCommandOutput, +} from "./commands/ListRuleGroupsNamespacesCommand"; import { ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput, } from "./commands/ListTagsForResourceCommand"; import { ListWorkspacesCommandInput, ListWorkspacesCommandOutput } from "./commands/ListWorkspacesCommand"; +import { + PutAlertManagerDefinitionCommandInput, + PutAlertManagerDefinitionCommandOutput, +} from "./commands/PutAlertManagerDefinitionCommand"; +import { + PutRuleGroupsNamespaceCommandInput, + PutRuleGroupsNamespaceCommandOutput, +} from "./commands/PutRuleGroupsNamespaceCommand"; import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand"; import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand"; import { @@ -66,21 +102,39 @@ import { import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig"; export type ServiceInputTypes = + | CreateAlertManagerDefinitionCommandInput + | CreateRuleGroupsNamespaceCommandInput | CreateWorkspaceCommandInput + | DeleteAlertManagerDefinitionCommandInput + | DeleteRuleGroupsNamespaceCommandInput | DeleteWorkspaceCommandInput + | DescribeAlertManagerDefinitionCommandInput + | DescribeRuleGroupsNamespaceCommandInput | DescribeWorkspaceCommandInput + | ListRuleGroupsNamespacesCommandInput | ListTagsForResourceCommandInput | ListWorkspacesCommandInput + | PutAlertManagerDefinitionCommandInput + | PutRuleGroupsNamespaceCommandInput | TagResourceCommandInput | UntagResourceCommandInput | UpdateWorkspaceAliasCommandInput; export type ServiceOutputTypes = + | CreateAlertManagerDefinitionCommandOutput + | CreateRuleGroupsNamespaceCommandOutput | CreateWorkspaceCommandOutput + | DeleteAlertManagerDefinitionCommandOutput + | DeleteRuleGroupsNamespaceCommandOutput | DeleteWorkspaceCommandOutput + | DescribeAlertManagerDefinitionCommandOutput + | DescribeRuleGroupsNamespaceCommandOutput | DescribeWorkspaceCommandOutput + | ListRuleGroupsNamespacesCommandOutput | ListTagsForResourceCommandOutput | ListWorkspacesCommandOutput + | PutAlertManagerDefinitionCommandOutput + | PutRuleGroupsNamespaceCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput | UpdateWorkspaceAliasCommandOutput; diff --git a/clients/client-amp/src/commands/CreateAlertManagerDefinitionCommand.ts b/clients/client-amp/src/commands/CreateAlertManagerDefinitionCommand.ts new file mode 100644 index 0000000000000..d3dc88faccbc5 --- /dev/null +++ b/clients/client-amp/src/commands/CreateAlertManagerDefinitionCommand.ts @@ -0,0 +1,100 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { AmpClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AmpClient"; +import { CreateAlertManagerDefinitionRequest, CreateAlertManagerDefinitionResponse } from "../models/models_0"; +import { + deserializeAws_restJson1CreateAlertManagerDefinitionCommand, + serializeAws_restJson1CreateAlertManagerDefinitionCommand, +} from "../protocols/Aws_restJson1"; + +export interface CreateAlertManagerDefinitionCommandInput extends CreateAlertManagerDefinitionRequest {} +export interface CreateAlertManagerDefinitionCommandOutput + extends CreateAlertManagerDefinitionResponse, + __MetadataBearer {} + +/** + * Create an alert manager definition. + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { AmpClient, CreateAlertManagerDefinitionCommand } from "@aws-sdk/client-amp"; // ES Modules import + * // const { AmpClient, CreateAlertManagerDefinitionCommand } = require("@aws-sdk/client-amp"); // CommonJS import + * const client = new AmpClient(config); + * const command = new CreateAlertManagerDefinitionCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link CreateAlertManagerDefinitionCommandInput} for command's `input` shape. + * @see {@link CreateAlertManagerDefinitionCommandOutput} for command's `response` shape. + * @see {@link AmpClientResolvedConfig | config} for command's `input` shape. + * + */ +export class CreateAlertManagerDefinitionCommand extends $Command< + CreateAlertManagerDefinitionCommandInput, + CreateAlertManagerDefinitionCommandOutput, + AmpClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: CreateAlertManagerDefinitionCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: AmpClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "AmpClient"; + const commandName = "CreateAlertManagerDefinitionCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: CreateAlertManagerDefinitionRequest.filterSensitiveLog, + outputFilterSensitiveLog: CreateAlertManagerDefinitionResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: CreateAlertManagerDefinitionCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1CreateAlertManagerDefinitionCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return deserializeAws_restJson1CreateAlertManagerDefinitionCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-amp/src/commands/CreateRuleGroupsNamespaceCommand.ts b/clients/client-amp/src/commands/CreateRuleGroupsNamespaceCommand.ts new file mode 100644 index 0000000000000..c253411454c2e --- /dev/null +++ b/clients/client-amp/src/commands/CreateRuleGroupsNamespaceCommand.ts @@ -0,0 +1,98 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { AmpClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AmpClient"; +import { CreateRuleGroupsNamespaceRequest, CreateRuleGroupsNamespaceResponse } from "../models/models_0"; +import { + deserializeAws_restJson1CreateRuleGroupsNamespaceCommand, + serializeAws_restJson1CreateRuleGroupsNamespaceCommand, +} from "../protocols/Aws_restJson1"; + +export interface CreateRuleGroupsNamespaceCommandInput extends CreateRuleGroupsNamespaceRequest {} +export interface CreateRuleGroupsNamespaceCommandOutput extends CreateRuleGroupsNamespaceResponse, __MetadataBearer {} + +/** + * Create a rule group namespace. + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { AmpClient, CreateRuleGroupsNamespaceCommand } from "@aws-sdk/client-amp"; // ES Modules import + * // const { AmpClient, CreateRuleGroupsNamespaceCommand } = require("@aws-sdk/client-amp"); // CommonJS import + * const client = new AmpClient(config); + * const command = new CreateRuleGroupsNamespaceCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link CreateRuleGroupsNamespaceCommandInput} for command's `input` shape. + * @see {@link CreateRuleGroupsNamespaceCommandOutput} for command's `response` shape. + * @see {@link AmpClientResolvedConfig | config} for command's `input` shape. + * + */ +export class CreateRuleGroupsNamespaceCommand extends $Command< + CreateRuleGroupsNamespaceCommandInput, + CreateRuleGroupsNamespaceCommandOutput, + AmpClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: CreateRuleGroupsNamespaceCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: AmpClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "AmpClient"; + const commandName = "CreateRuleGroupsNamespaceCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: CreateRuleGroupsNamespaceRequest.filterSensitiveLog, + outputFilterSensitiveLog: CreateRuleGroupsNamespaceResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: CreateRuleGroupsNamespaceCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1CreateRuleGroupsNamespaceCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return deserializeAws_restJson1CreateRuleGroupsNamespaceCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-amp/src/commands/DeleteAlertManagerDefinitionCommand.ts b/clients/client-amp/src/commands/DeleteAlertManagerDefinitionCommand.ts new file mode 100644 index 0000000000000..a2e9f59c3cc7a --- /dev/null +++ b/clients/client-amp/src/commands/DeleteAlertManagerDefinitionCommand.ts @@ -0,0 +1,98 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { AmpClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AmpClient"; +import { DeleteAlertManagerDefinitionRequest } from "../models/models_0"; +import { + deserializeAws_restJson1DeleteAlertManagerDefinitionCommand, + serializeAws_restJson1DeleteAlertManagerDefinitionCommand, +} from "../protocols/Aws_restJson1"; + +export interface DeleteAlertManagerDefinitionCommandInput extends DeleteAlertManagerDefinitionRequest {} +export interface DeleteAlertManagerDefinitionCommandOutput extends __MetadataBearer {} + +/** + * Deletes an alert manager definition. + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { AmpClient, DeleteAlertManagerDefinitionCommand } from "@aws-sdk/client-amp"; // ES Modules import + * // const { AmpClient, DeleteAlertManagerDefinitionCommand } = require("@aws-sdk/client-amp"); // CommonJS import + * const client = new AmpClient(config); + * const command = new DeleteAlertManagerDefinitionCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link DeleteAlertManagerDefinitionCommandInput} for command's `input` shape. + * @see {@link DeleteAlertManagerDefinitionCommandOutput} for command's `response` shape. + * @see {@link AmpClientResolvedConfig | config} for command's `input` shape. + * + */ +export class DeleteAlertManagerDefinitionCommand extends $Command< + DeleteAlertManagerDefinitionCommandInput, + DeleteAlertManagerDefinitionCommandOutput, + AmpClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DeleteAlertManagerDefinitionCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: AmpClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "AmpClient"; + const commandName = "DeleteAlertManagerDefinitionCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: DeleteAlertManagerDefinitionRequest.filterSensitiveLog, + outputFilterSensitiveLog: (output: any) => output, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: DeleteAlertManagerDefinitionCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1DeleteAlertManagerDefinitionCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return deserializeAws_restJson1DeleteAlertManagerDefinitionCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-amp/src/commands/DeleteRuleGroupsNamespaceCommand.ts b/clients/client-amp/src/commands/DeleteRuleGroupsNamespaceCommand.ts new file mode 100644 index 0000000000000..ee899080dad0c --- /dev/null +++ b/clients/client-amp/src/commands/DeleteRuleGroupsNamespaceCommand.ts @@ -0,0 +1,98 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { AmpClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AmpClient"; +import { DeleteRuleGroupsNamespaceRequest } from "../models/models_0"; +import { + deserializeAws_restJson1DeleteRuleGroupsNamespaceCommand, + serializeAws_restJson1DeleteRuleGroupsNamespaceCommand, +} from "../protocols/Aws_restJson1"; + +export interface DeleteRuleGroupsNamespaceCommandInput extends DeleteRuleGroupsNamespaceRequest {} +export interface DeleteRuleGroupsNamespaceCommandOutput extends __MetadataBearer {} + +/** + * Delete a rule groups namespace. + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { AmpClient, DeleteRuleGroupsNamespaceCommand } from "@aws-sdk/client-amp"; // ES Modules import + * // const { AmpClient, DeleteRuleGroupsNamespaceCommand } = require("@aws-sdk/client-amp"); // CommonJS import + * const client = new AmpClient(config); + * const command = new DeleteRuleGroupsNamespaceCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link DeleteRuleGroupsNamespaceCommandInput} for command's `input` shape. + * @see {@link DeleteRuleGroupsNamespaceCommandOutput} for command's `response` shape. + * @see {@link AmpClientResolvedConfig | config} for command's `input` shape. + * + */ +export class DeleteRuleGroupsNamespaceCommand extends $Command< + DeleteRuleGroupsNamespaceCommandInput, + DeleteRuleGroupsNamespaceCommandOutput, + AmpClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DeleteRuleGroupsNamespaceCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: AmpClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "AmpClient"; + const commandName = "DeleteRuleGroupsNamespaceCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: DeleteRuleGroupsNamespaceRequest.filterSensitiveLog, + outputFilterSensitiveLog: (output: any) => output, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: DeleteRuleGroupsNamespaceCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1DeleteRuleGroupsNamespaceCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return deserializeAws_restJson1DeleteRuleGroupsNamespaceCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-amp/src/commands/DescribeAlertManagerDefinitionCommand.ts b/clients/client-amp/src/commands/DescribeAlertManagerDefinitionCommand.ts new file mode 100644 index 0000000000000..f41f7171c8353 --- /dev/null +++ b/clients/client-amp/src/commands/DescribeAlertManagerDefinitionCommand.ts @@ -0,0 +1,103 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { AmpClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AmpClient"; +import { DescribeAlertManagerDefinitionRequest, DescribeAlertManagerDefinitionResponse } from "../models/models_0"; +import { + deserializeAws_restJson1DescribeAlertManagerDefinitionCommand, + serializeAws_restJson1DescribeAlertManagerDefinitionCommand, +} from "../protocols/Aws_restJson1"; + +export interface DescribeAlertManagerDefinitionCommandInput extends DescribeAlertManagerDefinitionRequest {} +export interface DescribeAlertManagerDefinitionCommandOutput + extends DescribeAlertManagerDefinitionResponse, + __MetadataBearer {} + +/** + * Describes an alert manager definition. + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { AmpClient, DescribeAlertManagerDefinitionCommand } from "@aws-sdk/client-amp"; // ES Modules import + * // const { AmpClient, DescribeAlertManagerDefinitionCommand } = require("@aws-sdk/client-amp"); // CommonJS import + * const client = new AmpClient(config); + * const command = new DescribeAlertManagerDefinitionCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link DescribeAlertManagerDefinitionCommandInput} for command's `input` shape. + * @see {@link DescribeAlertManagerDefinitionCommandOutput} for command's `response` shape. + * @see {@link AmpClientResolvedConfig | config} for command's `input` shape. + * + */ +export class DescribeAlertManagerDefinitionCommand extends $Command< + DescribeAlertManagerDefinitionCommandInput, + DescribeAlertManagerDefinitionCommandOutput, + AmpClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DescribeAlertManagerDefinitionCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: AmpClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "AmpClient"; + const commandName = "DescribeAlertManagerDefinitionCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: DescribeAlertManagerDefinitionRequest.filterSensitiveLog, + outputFilterSensitiveLog: DescribeAlertManagerDefinitionResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: DescribeAlertManagerDefinitionCommandInput, + context: __SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1DescribeAlertManagerDefinitionCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return deserializeAws_restJson1DescribeAlertManagerDefinitionCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-amp/src/commands/DescribeRuleGroupsNamespaceCommand.ts b/clients/client-amp/src/commands/DescribeRuleGroupsNamespaceCommand.ts new file mode 100644 index 0000000000000..69d33cc56d4fc --- /dev/null +++ b/clients/client-amp/src/commands/DescribeRuleGroupsNamespaceCommand.ts @@ -0,0 +1,100 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { AmpClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AmpClient"; +import { DescribeRuleGroupsNamespaceRequest, DescribeRuleGroupsNamespaceResponse } from "../models/models_0"; +import { + deserializeAws_restJson1DescribeRuleGroupsNamespaceCommand, + serializeAws_restJson1DescribeRuleGroupsNamespaceCommand, +} from "../protocols/Aws_restJson1"; + +export interface DescribeRuleGroupsNamespaceCommandInput extends DescribeRuleGroupsNamespaceRequest {} +export interface DescribeRuleGroupsNamespaceCommandOutput + extends DescribeRuleGroupsNamespaceResponse, + __MetadataBearer {} + +/** + * Describe a rule groups namespace. + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { AmpClient, DescribeRuleGroupsNamespaceCommand } from "@aws-sdk/client-amp"; // ES Modules import + * // const { AmpClient, DescribeRuleGroupsNamespaceCommand } = require("@aws-sdk/client-amp"); // CommonJS import + * const client = new AmpClient(config); + * const command = new DescribeRuleGroupsNamespaceCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link DescribeRuleGroupsNamespaceCommandInput} for command's `input` shape. + * @see {@link DescribeRuleGroupsNamespaceCommandOutput} for command's `response` shape. + * @see {@link AmpClientResolvedConfig | config} for command's `input` shape. + * + */ +export class DescribeRuleGroupsNamespaceCommand extends $Command< + DescribeRuleGroupsNamespaceCommandInput, + DescribeRuleGroupsNamespaceCommandOutput, + AmpClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DescribeRuleGroupsNamespaceCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: AmpClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "AmpClient"; + const commandName = "DescribeRuleGroupsNamespaceCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: DescribeRuleGroupsNamespaceRequest.filterSensitiveLog, + outputFilterSensitiveLog: DescribeRuleGroupsNamespaceResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: DescribeRuleGroupsNamespaceCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1DescribeRuleGroupsNamespaceCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return deserializeAws_restJson1DescribeRuleGroupsNamespaceCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-amp/src/commands/ListRuleGroupsNamespacesCommand.ts b/clients/client-amp/src/commands/ListRuleGroupsNamespacesCommand.ts new file mode 100644 index 0000000000000..062cff67fd450 --- /dev/null +++ b/clients/client-amp/src/commands/ListRuleGroupsNamespacesCommand.ts @@ -0,0 +1,95 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { AmpClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AmpClient"; +import { ListRuleGroupsNamespacesRequest, ListRuleGroupsNamespacesResponse } from "../models/models_0"; +import { + deserializeAws_restJson1ListRuleGroupsNamespacesCommand, + serializeAws_restJson1ListRuleGroupsNamespacesCommand, +} from "../protocols/Aws_restJson1"; + +export interface ListRuleGroupsNamespacesCommandInput extends ListRuleGroupsNamespacesRequest {} +export interface ListRuleGroupsNamespacesCommandOutput extends ListRuleGroupsNamespacesResponse, __MetadataBearer {} + +/** + * Lists rule groups namespaces. + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { AmpClient, ListRuleGroupsNamespacesCommand } from "@aws-sdk/client-amp"; // ES Modules import + * // const { AmpClient, ListRuleGroupsNamespacesCommand } = require("@aws-sdk/client-amp"); // CommonJS import + * const client = new AmpClient(config); + * const command = new ListRuleGroupsNamespacesCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link ListRuleGroupsNamespacesCommandInput} for command's `input` shape. + * @see {@link ListRuleGroupsNamespacesCommandOutput} for command's `response` shape. + * @see {@link AmpClientResolvedConfig | config} for command's `input` shape. + * + */ +export class ListRuleGroupsNamespacesCommand extends $Command< + ListRuleGroupsNamespacesCommandInput, + ListRuleGroupsNamespacesCommandOutput, + AmpClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: ListRuleGroupsNamespacesCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: AmpClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "AmpClient"; + const commandName = "ListRuleGroupsNamespacesCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: ListRuleGroupsNamespacesRequest.filterSensitiveLog, + outputFilterSensitiveLog: ListRuleGroupsNamespacesResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: ListRuleGroupsNamespacesCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1ListRuleGroupsNamespacesCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1ListRuleGroupsNamespacesCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-amp/src/commands/PutAlertManagerDefinitionCommand.ts b/clients/client-amp/src/commands/PutAlertManagerDefinitionCommand.ts new file mode 100644 index 0000000000000..2bdd91b0656dc --- /dev/null +++ b/clients/client-amp/src/commands/PutAlertManagerDefinitionCommand.ts @@ -0,0 +1,98 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { AmpClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AmpClient"; +import { PutAlertManagerDefinitionRequest, PutAlertManagerDefinitionResponse } from "../models/models_0"; +import { + deserializeAws_restJson1PutAlertManagerDefinitionCommand, + serializeAws_restJson1PutAlertManagerDefinitionCommand, +} from "../protocols/Aws_restJson1"; + +export interface PutAlertManagerDefinitionCommandInput extends PutAlertManagerDefinitionRequest {} +export interface PutAlertManagerDefinitionCommandOutput extends PutAlertManagerDefinitionResponse, __MetadataBearer {} + +/** + * Update an alert manager definition. + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { AmpClient, PutAlertManagerDefinitionCommand } from "@aws-sdk/client-amp"; // ES Modules import + * // const { AmpClient, PutAlertManagerDefinitionCommand } = require("@aws-sdk/client-amp"); // CommonJS import + * const client = new AmpClient(config); + * const command = new PutAlertManagerDefinitionCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link PutAlertManagerDefinitionCommandInput} for command's `input` shape. + * @see {@link PutAlertManagerDefinitionCommandOutput} for command's `response` shape. + * @see {@link AmpClientResolvedConfig | config} for command's `input` shape. + * + */ +export class PutAlertManagerDefinitionCommand extends $Command< + PutAlertManagerDefinitionCommandInput, + PutAlertManagerDefinitionCommandOutput, + AmpClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: PutAlertManagerDefinitionCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: AmpClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "AmpClient"; + const commandName = "PutAlertManagerDefinitionCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: PutAlertManagerDefinitionRequest.filterSensitiveLog, + outputFilterSensitiveLog: PutAlertManagerDefinitionResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: PutAlertManagerDefinitionCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1PutAlertManagerDefinitionCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return deserializeAws_restJson1PutAlertManagerDefinitionCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-amp/src/commands/PutRuleGroupsNamespaceCommand.ts b/clients/client-amp/src/commands/PutRuleGroupsNamespaceCommand.ts new file mode 100644 index 0000000000000..db3b3fef1cf83 --- /dev/null +++ b/clients/client-amp/src/commands/PutRuleGroupsNamespaceCommand.ts @@ -0,0 +1,95 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { AmpClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AmpClient"; +import { PutRuleGroupsNamespaceRequest, PutRuleGroupsNamespaceResponse } from "../models/models_0"; +import { + deserializeAws_restJson1PutRuleGroupsNamespaceCommand, + serializeAws_restJson1PutRuleGroupsNamespaceCommand, +} from "../protocols/Aws_restJson1"; + +export interface PutRuleGroupsNamespaceCommandInput extends PutRuleGroupsNamespaceRequest {} +export interface PutRuleGroupsNamespaceCommandOutput extends PutRuleGroupsNamespaceResponse, __MetadataBearer {} + +/** + * Update a rule groups namespace. + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { AmpClient, PutRuleGroupsNamespaceCommand } from "@aws-sdk/client-amp"; // ES Modules import + * // const { AmpClient, PutRuleGroupsNamespaceCommand } = require("@aws-sdk/client-amp"); // CommonJS import + * const client = new AmpClient(config); + * const command = new PutRuleGroupsNamespaceCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link PutRuleGroupsNamespaceCommandInput} for command's `input` shape. + * @see {@link PutRuleGroupsNamespaceCommandOutput} for command's `response` shape. + * @see {@link AmpClientResolvedConfig | config} for command's `input` shape. + * + */ +export class PutRuleGroupsNamespaceCommand extends $Command< + PutRuleGroupsNamespaceCommandInput, + PutRuleGroupsNamespaceCommandOutput, + AmpClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: PutRuleGroupsNamespaceCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: AmpClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "AmpClient"; + const commandName = "PutRuleGroupsNamespaceCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: PutRuleGroupsNamespaceRequest.filterSensitiveLog, + outputFilterSensitiveLog: PutRuleGroupsNamespaceResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: PutRuleGroupsNamespaceCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1PutRuleGroupsNamespaceCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1PutRuleGroupsNamespaceCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-amp/src/index.ts b/clients/client-amp/src/index.ts index 5edd13e2ddb27..226b403972505 100644 --- a/clients/client-amp/src/index.ts +++ b/clients/client-amp/src/index.ts @@ -1,11 +1,23 @@ export * from "./AmpClient"; export * from "./Amp"; +export * from "./commands/CreateAlertManagerDefinitionCommand"; +export * from "./commands/CreateRuleGroupsNamespaceCommand"; export * from "./commands/CreateWorkspaceCommand"; +export * from "./commands/DeleteAlertManagerDefinitionCommand"; +export * from "./commands/DeleteRuleGroupsNamespaceCommand"; export * from "./commands/DeleteWorkspaceCommand"; +export * from "./commands/DescribeAlertManagerDefinitionCommand"; +export * from "./commands/DescribeRuleGroupsNamespaceCommand"; export * from "./commands/DescribeWorkspaceCommand"; +export * from "./waiters/waitForWorkspaceActive"; +export * from "./waiters/waitForWorkspaceDeleted"; +export * from "./commands/ListRuleGroupsNamespacesCommand"; +export * from "./pagination/ListRuleGroupsNamespacesPaginator"; export * from "./commands/ListTagsForResourceCommand"; export * from "./commands/ListWorkspacesCommand"; export * from "./pagination/ListWorkspacesPaginator"; +export * from "./commands/PutAlertManagerDefinitionCommand"; +export * from "./commands/PutRuleGroupsNamespaceCommand"; export * from "./commands/TagResourceCommand"; export * from "./commands/UntagResourceCommand"; export * from "./commands/UpdateWorkspaceAliasCommand"; diff --git a/clients/client-amp/src/models/models_0.ts b/clients/client-amp/src/models/models_0.ts index 2e5bcebb08440..7b249ec50d077 100644 --- a/clients/client-amp/src/models/models_0.ts +++ b/clients/client-amp/src/models/models_0.ts @@ -22,60 +22,158 @@ export namespace AccessDeniedException { } /** - * Unexpected error during processing of request. + * Updating or deleting a resource can cause an inconsistent state. */ -export interface InternalServerException extends __SmithyException, $MetadataBearer { - name: "InternalServerException"; - $fault: "server"; - $retryable: {}; +export interface ConflictException extends __SmithyException, $MetadataBearer { + name: "ConflictException"; + $fault: "client"; /** * Description of the error. */ message: string | undefined; /** - * Advice to clients on when the call can be safely retried. + * Identifier of the resource affected. */ - retryAfterSeconds?: number; + resourceId: string | undefined; + + /** + * Type of the resource affected. + */ + resourceType: string | undefined; } -export namespace InternalServerException { +export namespace ConflictException { /** * @internal */ - export const filterSensitiveLog = (obj: InternalServerException): any => ({ + export const filterSensitiveLog = (obj: ConflictException): any => ({ ...obj, }); } -export interface ListTagsForResourceRequest { +/** + * Represents the input of a CreateAlertManagerDefinition operation. + */ +export interface CreateAlertManagerDefinitionRequest { /** - * The ARN of the resource. + * The ID of the workspace in which to create the alert manager definition. */ - resourceArn: string | undefined; + workspaceId: string | undefined; + + /** + * The alert manager definition data. + */ + data: Uint8Array | undefined; + + /** + * Optional, unique, case-sensitive, user-provided identifier to ensure the idempotency of the request. + */ + clientToken?: string; } -export namespace ListTagsForResourceRequest { +export namespace CreateAlertManagerDefinitionRequest { /** * @internal */ - export const filterSensitiveLog = (obj: ListTagsForResourceRequest): any => ({ + export const filterSensitiveLog = (obj: CreateAlertManagerDefinitionRequest): any => ({ ...obj, }); } -export interface ListTagsForResourceResponse { +export enum AlertManagerDefinitionStatusCode { /** - * The list of tags assigned to the resource. + * Definition has been created/updated. Update/Deletion is disallowed until definition is ACTIVE and workspace status is ACTIVE. */ - tags?: { [key: string]: string }; + ACTIVE = "ACTIVE", + /** + * Definition is being created. Update/Deletion is disallowed until definition is ACTIVE and workspace status is ACTIVE. + */ + CREATING = "CREATING", + /** + * Definition creation failed. + */ + CREATION_FAILED = "CREATION_FAILED", + /** + * Definition is being deleting. Update/Deletion is disallowed until definition is ACTIVE and workspace status is ACTIVE. + */ + DELETING = "DELETING", + /** + * Definition update failed. + */ + UPDATE_FAILED = "UPDATE_FAILED", + /** + * Definition is being updated. Update/Deletion is disallowed until definition is ACTIVE and workspace status is ACTIVE. + */ + UPDATING = "UPDATING", } -export namespace ListTagsForResourceResponse { +/** + * Represents the status of a definition. + */ +export interface AlertManagerDefinitionStatus { + /** + * Status code of this definition. + */ + statusCode: AlertManagerDefinitionStatusCode | string | undefined; + + /** + * The reason for failure if any. + */ + statusReason?: string; +} + +export namespace AlertManagerDefinitionStatus { /** * @internal */ - export const filterSensitiveLog = (obj: ListTagsForResourceResponse): any => ({ + export const filterSensitiveLog = (obj: AlertManagerDefinitionStatus): any => ({ + ...obj, + }); +} + +/** + * Represents the output of a CreateAlertManagerDefinition operation. + */ +export interface CreateAlertManagerDefinitionResponse { + /** + * The status of alert manager definition. + */ + status: AlertManagerDefinitionStatus | undefined; +} + +export namespace CreateAlertManagerDefinitionResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: CreateAlertManagerDefinitionResponse): any => ({ + ...obj, + }); +} + +/** + * Unexpected error during processing of request. + */ +export interface InternalServerException extends __SmithyException, $MetadataBearer { + name: "InternalServerException"; + $fault: "server"; + $retryable: {}; + /** + * Description of the error. + */ + message: string | undefined; + + /** + * Advice to clients on when the call can be safely retried. + */ + retryAfterSeconds?: number; +} + +export namespace InternalServerException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: InternalServerException): any => ({ ...obj, }); } @@ -111,6 +209,47 @@ export namespace ResourceNotFoundException { }); } +/** + * Request would cause a service quota to be exceeded. + */ +export interface ServiceQuotaExceededException extends __SmithyException, $MetadataBearer { + name: "ServiceQuotaExceededException"; + $fault: "client"; + /** + * Description of the error. + */ + message: string | undefined; + + /** + * Identifier of the resource affected. + */ + resourceId: string | undefined; + + /** + * Type of the resource affected. + */ + resourceType: string | undefined; + + /** + * Service Quotas requirement to identify originating service. + */ + serviceCode: string | undefined; + + /** + * Service Quotas requirement to identify originating quota. + */ + quotaCode: string | undefined; +} + +export namespace ServiceQuotaExceededException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ServiceQuotaExceededException): any => ({ + ...obj, + }); +} + /** * Request was denied due to request throttling. */ @@ -210,243 +349,347 @@ export namespace ValidationException { }); } -export interface TagResourceRequest { +/** + * Represents the input of a DeleteAlertManagerDefinition operation. + */ +export interface DeleteAlertManagerDefinitionRequest { /** - * The ARN of the resource. + * The ID of the workspace in which to delete the alert manager definition. */ - resourceArn: string | undefined; + workspaceId: string | undefined; /** - * The list of tags assigned to the resource. + * Optional, unique, case-sensitive, user-provided identifier to ensure the idempotency of the request. */ - tags: { [key: string]: string } | undefined; + clientToken?: string; } -export namespace TagResourceRequest { +export namespace DeleteAlertManagerDefinitionRequest { /** * @internal */ - export const filterSensitiveLog = (obj: TagResourceRequest): any => ({ + export const filterSensitiveLog = (obj: DeleteAlertManagerDefinitionRequest): any => ({ ...obj, }); } -export interface TagResourceResponse {} +/** + * Represents the input of a DescribeAlertManagerDefinition operation. + */ +export interface DescribeAlertManagerDefinitionRequest { + /** + * The ID of the workspace to describe. + */ + workspaceId: string | undefined; +} -export namespace TagResourceResponse { +export namespace DescribeAlertManagerDefinitionRequest { /** * @internal */ - export const filterSensitiveLog = (obj: TagResourceResponse): any => ({ + export const filterSensitiveLog = (obj: DescribeAlertManagerDefinitionRequest): any => ({ ...obj, }); } -export interface UntagResourceRequest { +/** + * Represents the properties of an alert manager definition. + */ +export interface AlertManagerDefinitionDescription { /** - * The ARN of the resource. + * The status of alert manager definition. */ - resourceArn: string | undefined; + status: AlertManagerDefinitionStatus | undefined; /** - * One or more tag keys + * The alert manager definition. */ - tagKeys: string[] | undefined; + data: Uint8Array | undefined; + + /** + * The time when the alert manager definition was created. + */ + createdAt: Date | undefined; + + /** + * The time when the alert manager definition was modified. + */ + modifiedAt: Date | undefined; } -export namespace UntagResourceRequest { +export namespace AlertManagerDefinitionDescription { /** * @internal */ - export const filterSensitiveLog = (obj: UntagResourceRequest): any => ({ + export const filterSensitiveLog = (obj: AlertManagerDefinitionDescription): any => ({ ...obj, }); } -export interface UntagResourceResponse {} +/** + * Represents the output of a DescribeAlertManagerDefinition operation. + */ +export interface DescribeAlertManagerDefinitionResponse { + /** + * The properties of the selected workspace's alert manager definition. + */ + alertManagerDefinition: AlertManagerDefinitionDescription | undefined; +} -export namespace UntagResourceResponse { +export namespace DescribeAlertManagerDefinitionResponse { /** * @internal */ - export const filterSensitiveLog = (obj: UntagResourceResponse): any => ({ + export const filterSensitiveLog = (obj: DescribeAlertManagerDefinitionResponse): any => ({ ...obj, }); } /** - * Updating or deleting a resource can cause an inconsistent state. + * Represents the input of a PutAlertManagerDefinition operation. */ -export interface ConflictException extends __SmithyException, $MetadataBearer { - name: "ConflictException"; - $fault: "client"; +export interface PutAlertManagerDefinitionRequest { /** - * Description of the error. + * The ID of the workspace in which to update the alert manager definition. */ - message: string | undefined; + workspaceId: string | undefined; /** - * Identifier of the resource affected. + * The alert manager definition data. */ - resourceId: string | undefined; + data: Uint8Array | undefined; /** - * Type of the resource affected. + * Optional, unique, case-sensitive, user-provided identifier to ensure the idempotency of the request. */ - resourceType: string | undefined; + clientToken?: string; } -export namespace ConflictException { +export namespace PutAlertManagerDefinitionRequest { /** * @internal */ - export const filterSensitiveLog = (obj: ConflictException): any => ({ + export const filterSensitiveLog = (obj: PutAlertManagerDefinitionRequest): any => ({ ...obj, }); } /** - * Represents the input of a CreateWorkspace operation. + * Represents the output of a PutAlertManagerDefinition operation. */ -export interface CreateWorkspaceRequest { +export interface PutAlertManagerDefinitionResponse { /** - * An optional user-assigned alias for this workspace. This alias is for user reference and does not need to be unique. + * The status of alert manager definition. */ - alias?: string; + status: AlertManagerDefinitionStatus | undefined; +} +export namespace PutAlertManagerDefinitionResponse { /** - * Optional, unique, case-sensitive, user-provided identifier to ensure the idempotency of the request. + * @internal */ - clientToken?: string; + export const filterSensitiveLog = (obj: PutAlertManagerDefinitionResponse): any => ({ + ...obj, + }); +} +export interface ListTagsForResourceRequest { /** - * Optional, user-provided tags for this workspace. + * The ARN of the resource. */ - tags?: { [key: string]: string }; + resourceArn: string | undefined; } -export namespace CreateWorkspaceRequest { +export namespace ListTagsForResourceRequest { /** * @internal */ - export const filterSensitiveLog = (obj: CreateWorkspaceRequest): any => ({ + export const filterSensitiveLog = (obj: ListTagsForResourceRequest): any => ({ ...obj, }); } -export enum WorkspaceStatusCode { +export interface ListTagsForResourceResponse { /** - * Workspace has been created and is usable. + * The list of tags assigned to the resource. */ - ACTIVE = "ACTIVE", + tags?: { [key: string]: string }; +} + +export namespace ListTagsForResourceResponse { /** - * Workspace is being created. Deletion is disallowed until status is ACTIVE. + * @internal */ - CREATING = "CREATING", + export const filterSensitiveLog = (obj: ListTagsForResourceResponse): any => ({ + ...obj, + }); +} + +export interface TagResourceRequest { /** - * Workspace creation failed. Refer to WorkspaceStatus.failureReason for more details. + * The ARN of the resource. */ - CREATION_FAILED = "CREATION_FAILED", + resourceArn: string | undefined; + /** - * Workspace is being deleted. Deletions are allowed only when status is ACTIVE. + * The list of tags assigned to the resource. */ - DELETING = "DELETING", - /** - * Workspace is being updated. Updates are allowed only when status is ACTIVE. + tags: { [key: string]: string } | undefined; +} + +export namespace TagResourceRequest { + /** + * @internal */ - UPDATING = "UPDATING", + export const filterSensitiveLog = (obj: TagResourceRequest): any => ({ + ...obj, + }); } -/** - * Represents the status of a workspace. - */ -export interface WorkspaceStatus { +export interface TagResourceResponse {} + +export namespace TagResourceResponse { /** - * Status code of this workspace. + * @internal */ - statusCode: WorkspaceStatusCode | string | undefined; + export const filterSensitiveLog = (obj: TagResourceResponse): any => ({ + ...obj, + }); } -export namespace WorkspaceStatus { +export interface UntagResourceRequest { + /** + * The ARN of the resource. + */ + resourceArn: string | undefined; + + /** + * One or more tag keys + */ + tagKeys: string[] | undefined; +} + +export namespace UntagResourceRequest { /** * @internal */ - export const filterSensitiveLog = (obj: WorkspaceStatus): any => ({ + export const filterSensitiveLog = (obj: UntagResourceRequest): any => ({ ...obj, }); } -/** - * Represents the output of a CreateWorkspace operation. - */ -export interface CreateWorkspaceResponse { +export interface UntagResourceResponse {} + +export namespace UntagResourceResponse { /** - * The generated ID of the workspace that was just created. + * @internal */ - workspaceId: string | undefined; + export const filterSensitiveLog = (obj: UntagResourceResponse): any => ({ + ...obj, + }); +} +/** + * Represents the input of a CreateWorkspace operation. + */ +export interface CreateWorkspaceRequest { /** - * The ARN of the workspace that was just created. + * An optional user-assigned alias for this workspace. This alias is for user reference and does not need to be unique. */ - arn: string | undefined; + alias?: string; /** - * The status of the workspace that was just created (usually CREATING). + * Optional, unique, case-sensitive, user-provided identifier to ensure the idempotency of the request. */ - status: WorkspaceStatus | undefined; + clientToken?: string; /** - * The tags of this workspace. + * Optional, user-provided tags for this workspace. */ tags?: { [key: string]: string }; } -export namespace CreateWorkspaceResponse { +export namespace CreateWorkspaceRequest { /** * @internal */ - export const filterSensitiveLog = (obj: CreateWorkspaceResponse): any => ({ + export const filterSensitiveLog = (obj: CreateWorkspaceRequest): any => ({ ...obj, }); } +export enum WorkspaceStatusCode { + /** + * Workspace has been created and is usable. + */ + ACTIVE = "ACTIVE", + /** + * Workspace is being created. Deletion is disallowed until status is ACTIVE. + */ + CREATING = "CREATING", + /** + * Workspace creation failed. Refer to WorkspaceStatus.failureReason for more details. + */ + CREATION_FAILED = "CREATION_FAILED", + /** + * Workspace is being deleted. Deletions are allowed only when status is ACTIVE. + */ + DELETING = "DELETING", + /** + * Workspace is being updated. Updates are allowed only when status is ACTIVE. + */ + UPDATING = "UPDATING", +} + /** - * Request would cause a service quota to be exceeded. + * Represents the status of a workspace. */ -export interface ServiceQuotaExceededException extends __SmithyException, $MetadataBearer { - name: "ServiceQuotaExceededException"; - $fault: "client"; +export interface WorkspaceStatus { /** - * Description of the error. + * Status code of this workspace. */ - message: string | undefined; + statusCode: WorkspaceStatusCode | string | undefined; +} +export namespace WorkspaceStatus { /** - * Identifier of the resource affected. + * @internal */ - resourceId: string | undefined; + export const filterSensitiveLog = (obj: WorkspaceStatus): any => ({ + ...obj, + }); +} +/** + * Represents the output of a CreateWorkspace operation. + */ +export interface CreateWorkspaceResponse { /** - * Type of the resource affected. + * The generated ID of the workspace that was just created. */ - resourceType: string | undefined; + workspaceId: string | undefined; /** - * Service Quotas requirement to identify originating service. + * The ARN of the workspace that was just created. */ - serviceCode: string | undefined; + arn: string | undefined; /** - * Service Quotas requirement to identify originating quota. + * The status of the workspace that was just created (usually CREATING). */ - quotaCode: string | undefined; + status: WorkspaceStatus | undefined; + + /** + * The tags of this workspace. + */ + tags?: { [key: string]: string }; } -export namespace ServiceQuotaExceededException { +export namespace CreateWorkspaceResponse { /** * @internal */ - export const filterSensitiveLog = (obj: ServiceQuotaExceededException): any => ({ + export const filterSensitiveLog = (obj: CreateWorkspaceResponse): any => ({ ...obj, }); } @@ -659,6 +902,421 @@ export namespace ListWorkspacesResponse { }); } +/** + * Represents the input of a CreateRuleGroupsNamespace operation. + */ +export interface CreateRuleGroupsNamespaceRequest { + /** + * The ID of the workspace in which to create the rule group namespace. + */ + workspaceId: string | undefined; + + /** + * The rule groups namespace name. + */ + name: string | undefined; + + /** + * The namespace data that define the rule groups. + */ + data: Uint8Array | undefined; + + /** + * Optional, unique, case-sensitive, user-provided identifier to ensure the idempotency of the request. + */ + clientToken?: string; + + /** + * Optional, user-provided tags for this rule groups namespace. + */ + tags?: { [key: string]: string }; +} + +export namespace CreateRuleGroupsNamespaceRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: CreateRuleGroupsNamespaceRequest): any => ({ + ...obj, + }); +} + +export enum RuleGroupsNamespaceStatusCode { + /** + * Namespace has been created/updated. Update/Deletion is disallowed until namespace is ACTIVE and workspace status is ACTIVE. + */ + ACTIVE = "ACTIVE", + /** + * Namespace is being created. Update/Deletion is disallowed until namespace is ACTIVE and workspace status is ACTIVE. + */ + CREATING = "CREATING", + /** + * Namespace creation failed. + */ + CREATION_FAILED = "CREATION_FAILED", + /** + * Namespace is being deleting. Update/Deletion is disallowed until namespace is ACTIVE and workspace status is ACTIVE. + */ + DELETING = "DELETING", + /** + * Namespace update failed. + */ + UPDATE_FAILED = "UPDATE_FAILED", + /** + * Namespace is being updated. Update/Deletion is disallowed until namespace is ACTIVE and workspace status is ACTIVE. + */ + UPDATING = "UPDATING", +} + +/** + * Represents the status of a namespace. + */ +export interface RuleGroupsNamespaceStatus { + /** + * Status code of this namespace. + */ + statusCode: RuleGroupsNamespaceStatusCode | string | undefined; + + /** + * The reason for failure if any. + */ + statusReason?: string; +} + +export namespace RuleGroupsNamespaceStatus { + /** + * @internal + */ + export const filterSensitiveLog = (obj: RuleGroupsNamespaceStatus): any => ({ + ...obj, + }); +} + +/** + * Represents the output of a CreateRuleGroupsNamespace operation. + */ +export interface CreateRuleGroupsNamespaceResponse { + /** + * The rule groups namespace name. + */ + name: string | undefined; + + /** + * The Amazon Resource Name (ARN) of this rule groups namespace. + */ + arn: string | undefined; + + /** + * The status of rule groups namespace. + */ + status: RuleGroupsNamespaceStatus | undefined; + + /** + * The tags of this rule groups namespace. + */ + tags?: { [key: string]: string }; +} + +export namespace CreateRuleGroupsNamespaceResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: CreateRuleGroupsNamespaceResponse): any => ({ + ...obj, + }); +} + +/** + * Represents the input of a DeleteRuleGroupsNamespace operation. + */ +export interface DeleteRuleGroupsNamespaceRequest { + /** + * The ID of the workspace to delete rule group definition. + */ + workspaceId: string | undefined; + + /** + * The rule groups namespace name. + */ + name: string | undefined; + + /** + * Optional, unique, case-sensitive, user-provided identifier to ensure the idempotency of the request. + */ + clientToken?: string; +} + +export namespace DeleteRuleGroupsNamespaceRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DeleteRuleGroupsNamespaceRequest): any => ({ + ...obj, + }); +} + +/** + * Represents the input of a DescribeRuleGroupsNamespace operation. + */ +export interface DescribeRuleGroupsNamespaceRequest { + /** + * The ID of the workspace to describe. + */ + workspaceId: string | undefined; + + /** + * The rule groups namespace. + */ + name: string | undefined; +} + +export namespace DescribeRuleGroupsNamespaceRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DescribeRuleGroupsNamespaceRequest): any => ({ + ...obj, + }); +} + +/** + * Represents a description of the rule groups namespace. + */ +export interface RuleGroupsNamespaceDescription { + /** + * The Amazon Resource Name (ARN) of this rule groups namespace. + */ + arn: string | undefined; + + /** + * The rule groups namespace name. + */ + name: string | undefined; + + /** + * The status of rule groups namespace. + */ + status: RuleGroupsNamespaceStatus | undefined; + + /** + * The rule groups namespace data. + */ + data: Uint8Array | undefined; + + /** + * The time when the rule groups namespace was created. + */ + createdAt: Date | undefined; + + /** + * The time when the rule groups namespace was modified. + */ + modifiedAt: Date | undefined; + + /** + * The tags of this rule groups namespace. + */ + tags?: { [key: string]: string }; +} + +export namespace RuleGroupsNamespaceDescription { + /** + * @internal + */ + export const filterSensitiveLog = (obj: RuleGroupsNamespaceDescription): any => ({ + ...obj, + }); +} + +/** + * Represents the output of a DescribeRuleGroupsNamespace operation. + */ +export interface DescribeRuleGroupsNamespaceResponse { + /** + * The selected rule groups namespace. + */ + ruleGroupsNamespace: RuleGroupsNamespaceDescription | undefined; +} + +export namespace DescribeRuleGroupsNamespaceResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DescribeRuleGroupsNamespaceResponse): any => ({ + ...obj, + }); +} + +/** + * Represents the input of a ListRuleGroupsNamespaces operation. + */ +export interface ListRuleGroupsNamespacesRequest { + /** + * The ID of the workspace. + */ + workspaceId: string | undefined; + + /** + * Optional filter for rule groups namespace name. Only the rule groups namespace that begin with this value will be returned. + */ + name?: string; + + /** + * Pagination token to request the next page in a paginated list. This token is obtained from the output of the previous ListRuleGroupsNamespaces request. + */ + nextToken?: string; + + /** + * Maximum results to return in response (default=100, maximum=1000). + */ + maxResults?: number; +} + +export namespace ListRuleGroupsNamespacesRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ListRuleGroupsNamespacesRequest): any => ({ + ...obj, + }); +} + +/** + * Represents a summary of the rule groups namespace. + */ +export interface RuleGroupsNamespaceSummary { + /** + * The Amazon Resource Name (ARN) of this rule groups namespace. + */ + arn: string | undefined; + + /** + * The rule groups namespace name. + */ + name: string | undefined; + + /** + * The status of rule groups namespace. + */ + status: RuleGroupsNamespaceStatus | undefined; + + /** + * The time when the rule groups namespace was created. + */ + createdAt: Date | undefined; + + /** + * The time when the rule groups namespace was modified. + */ + modifiedAt: Date | undefined; + + /** + * The tags of this rule groups namespace. + */ + tags?: { [key: string]: string }; +} + +export namespace RuleGroupsNamespaceSummary { + /** + * @internal + */ + export const filterSensitiveLog = (obj: RuleGroupsNamespaceSummary): any => ({ + ...obj, + }); +} + +/** + * Represents the output of a ListRuleGroupsNamespaces operation. + */ +export interface ListRuleGroupsNamespacesResponse { + /** + * The list of the selected rule groups namespaces. + */ + ruleGroupsNamespaces: RuleGroupsNamespaceSummary[] | undefined; + + /** + * Pagination token to use when requesting the next page in this list. + */ + nextToken?: string; +} + +export namespace ListRuleGroupsNamespacesResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ListRuleGroupsNamespacesResponse): any => ({ + ...obj, + }); +} + +/** + * Represents the input of a PutRuleGroupsNamespace operation. + */ +export interface PutRuleGroupsNamespaceRequest { + /** + * The ID of the workspace in which to update the rule group namespace. + */ + workspaceId: string | undefined; + + /** + * The rule groups namespace name. + */ + name: string | undefined; + + /** + * The namespace data that define the rule groups. + */ + data: Uint8Array | undefined; + + /** + * Optional, unique, case-sensitive, user-provided identifier to ensure the idempotency of the request. + */ + clientToken?: string; +} + +export namespace PutRuleGroupsNamespaceRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: PutRuleGroupsNamespaceRequest): any => ({ + ...obj, + }); +} + +/** + * Represents the output of a PutRuleGroupsNamespace operation. + */ +export interface PutRuleGroupsNamespaceResponse { + /** + * The rule groups namespace name. + */ + name: string | undefined; + + /** + * The Amazon Resource Name (ARN) of this rule groups namespace. + */ + arn: string | undefined; + + /** + * The status of rule groups namespace. + */ + status: RuleGroupsNamespaceStatus | undefined; + + /** + * The tags of this rule groups namespace. + */ + tags?: { [key: string]: string }; +} + +export namespace PutRuleGroupsNamespaceResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: PutRuleGroupsNamespaceResponse): any => ({ + ...obj, + }); +} + /** * Represents the input of an UpdateWorkspaceAlias operation. */ diff --git a/clients/client-amp/src/pagination/ListRuleGroupsNamespacesPaginator.ts b/clients/client-amp/src/pagination/ListRuleGroupsNamespacesPaginator.ts new file mode 100644 index 0000000000000..d5da48da13721 --- /dev/null +++ b/clients/client-amp/src/pagination/ListRuleGroupsNamespacesPaginator.ts @@ -0,0 +1,59 @@ +import { Paginator } from "@aws-sdk/types"; + +import { Amp } from "../Amp"; +import { AmpClient } from "../AmpClient"; +import { + ListRuleGroupsNamespacesCommand, + ListRuleGroupsNamespacesCommandInput, + ListRuleGroupsNamespacesCommandOutput, +} from "../commands/ListRuleGroupsNamespacesCommand"; +import { AmpPaginationConfiguration } from "./Interfaces"; + +/** + * @private + */ +const makePagedClientRequest = async ( + client: AmpClient, + input: ListRuleGroupsNamespacesCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new ListRuleGroupsNamespacesCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async ( + client: Amp, + input: ListRuleGroupsNamespacesCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.listRuleGroupsNamespaces(input, ...args); +}; +export async function* paginateListRuleGroupsNamespaces( + config: AmpPaginationConfiguration, + input: ListRuleGroupsNamespacesCommandInput, + ...additionalArguments: any +): Paginator { + // ToDo: replace with actual type instead of typeof input.nextToken + let token: typeof input.nextToken | undefined = config.startingToken || undefined; + let hasNext = true; + let page: ListRuleGroupsNamespacesCommandOutput; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof Amp) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } else if (config.client instanceof AmpClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected Amp | AmpClient"); + } + yield page; + token = page.nextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-amp/src/protocols/Aws_restJson1.ts b/clients/client-amp/src/protocols/Aws_restJson1.ts index 5ba6b96f1ae9a..6d548083e0219 100644 --- a/clients/client-amp/src/protocols/Aws_restJson1.ts +++ b/clients/client-amp/src/protocols/Aws_restJson1.ts @@ -17,14 +17,50 @@ import { } from "@aws-sdk/types"; import { v4 as generateIdempotencyToken } from "uuid"; +import { + CreateAlertManagerDefinitionCommandInput, + CreateAlertManagerDefinitionCommandOutput, +} from "../commands/CreateAlertManagerDefinitionCommand"; +import { + CreateRuleGroupsNamespaceCommandInput, + CreateRuleGroupsNamespaceCommandOutput, +} from "../commands/CreateRuleGroupsNamespaceCommand"; import { CreateWorkspaceCommandInput, CreateWorkspaceCommandOutput } from "../commands/CreateWorkspaceCommand"; +import { + DeleteAlertManagerDefinitionCommandInput, + DeleteAlertManagerDefinitionCommandOutput, +} from "../commands/DeleteAlertManagerDefinitionCommand"; +import { + DeleteRuleGroupsNamespaceCommandInput, + DeleteRuleGroupsNamespaceCommandOutput, +} from "../commands/DeleteRuleGroupsNamespaceCommand"; import { DeleteWorkspaceCommandInput, DeleteWorkspaceCommandOutput } from "../commands/DeleteWorkspaceCommand"; +import { + DescribeAlertManagerDefinitionCommandInput, + DescribeAlertManagerDefinitionCommandOutput, +} from "../commands/DescribeAlertManagerDefinitionCommand"; +import { + DescribeRuleGroupsNamespaceCommandInput, + DescribeRuleGroupsNamespaceCommandOutput, +} from "../commands/DescribeRuleGroupsNamespaceCommand"; import { DescribeWorkspaceCommandInput, DescribeWorkspaceCommandOutput } from "../commands/DescribeWorkspaceCommand"; +import { + ListRuleGroupsNamespacesCommandInput, + ListRuleGroupsNamespacesCommandOutput, +} from "../commands/ListRuleGroupsNamespacesCommand"; import { ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput, } from "../commands/ListTagsForResourceCommand"; import { ListWorkspacesCommandInput, ListWorkspacesCommandOutput } from "../commands/ListWorkspacesCommand"; +import { + PutAlertManagerDefinitionCommandInput, + PutAlertManagerDefinitionCommandOutput, +} from "../commands/PutAlertManagerDefinitionCommand"; +import { + PutRuleGroupsNamespaceCommandInput, + PutRuleGroupsNamespaceCommandOutput, +} from "../commands/PutRuleGroupsNamespaceCommand"; import { TagResourceCommandInput, TagResourceCommandOutput } from "../commands/TagResourceCommand"; import { UntagResourceCommandInput, UntagResourceCommandOutput } from "../commands/UntagResourceCommand"; import { @@ -33,9 +69,14 @@ import { } from "../commands/UpdateWorkspaceAliasCommand"; import { AccessDeniedException, + AlertManagerDefinitionDescription, + AlertManagerDefinitionStatus, ConflictException, InternalServerException, ResourceNotFoundException, + RuleGroupsNamespaceDescription, + RuleGroupsNamespaceStatus, + RuleGroupsNamespaceSummary, ServiceQuotaExceededException, ThrottlingException, ValidationException, @@ -45,6 +86,80 @@ import { WorkspaceSummary, } from "../models/models_0"; +export const serializeAws_restJson1CreateAlertManagerDefinitionCommand = async ( + input: CreateAlertManagerDefinitionCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/workspaces/{workspaceId}/alertmanager/definition"; + if (input.workspaceId !== undefined) { + const labelValue: string = input.workspaceId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: workspaceId."); + } + resolvedPath = resolvedPath.replace("{workspaceId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: workspaceId."); + } + let body: any; + body = JSON.stringify({ + clientToken: input.clientToken ?? generateIdempotencyToken(), + ...(input.data !== undefined && input.data !== null && { data: context.base64Encoder(input.data) }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1CreateRuleGroupsNamespaceCommand = async ( + input: CreateRuleGroupsNamespaceCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/workspaces/{workspaceId}/rulegroupsnamespaces"; + if (input.workspaceId !== undefined) { + const labelValue: string = input.workspaceId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: workspaceId."); + } + resolvedPath = resolvedPath.replace("{workspaceId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: workspaceId."); + } + let body: any; + body = JSON.stringify({ + clientToken: input.clientToken ?? generateIdempotencyToken(), + ...(input.data !== undefined && input.data !== null && { data: context.base64Encoder(input.data) }), + ...(input.name !== undefined && input.name !== null && { name: input.name }), + ...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_restJson1TagMap(input.tags, context) }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + export const serializeAws_restJson1CreateWorkspaceCommand = async ( input: CreateWorkspaceCommandInput, context: __SerdeContext @@ -71,6 +186,83 @@ export const serializeAws_restJson1CreateWorkspaceCommand = async ( }); }; +export const serializeAws_restJson1DeleteAlertManagerDefinitionCommand = async ( + input: DeleteAlertManagerDefinitionCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/workspaces/{workspaceId}/alertmanager/definition"; + if (input.workspaceId !== undefined) { + const labelValue: string = input.workspaceId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: workspaceId."); + } + resolvedPath = resolvedPath.replace("{workspaceId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: workspaceId."); + } + const query: any = { + ...(input.clientToken !== undefined && { clientToken: input.clientToken }), + }; + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "DELETE", + headers, + path: resolvedPath, + query, + body, + }); +}; + +export const serializeAws_restJson1DeleteRuleGroupsNamespaceCommand = async ( + input: DeleteRuleGroupsNamespaceCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/workspaces/{workspaceId}/rulegroupsnamespaces/{name}"; + if (input.workspaceId !== undefined) { + const labelValue: string = input.workspaceId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: workspaceId."); + } + resolvedPath = resolvedPath.replace("{workspaceId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: workspaceId."); + } + if (input.name !== undefined) { + const labelValue: string = input.name; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: name."); + } + resolvedPath = resolvedPath.replace("{name}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: name."); + } + const query: any = { + ...(input.clientToken !== undefined && { clientToken: input.clientToken }), + }; + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "DELETE", + headers, + path: resolvedPath, + query, + body, + }); +}; + export const serializeAws_restJson1DeleteWorkspaceCommand = async ( input: DeleteWorkspaceCommandInput, context: __SerdeContext @@ -104,14 +296,15 @@ export const serializeAws_restJson1DeleteWorkspaceCommand = async ( }); }; -export const serializeAws_restJson1DescribeWorkspaceCommand = async ( - input: DescribeWorkspaceCommandInput, +export const serializeAws_restJson1DescribeAlertManagerDefinitionCommand = async ( + input: DescribeAlertManagerDefinitionCommandInput, context: __SerdeContext ): Promise<__HttpRequest> => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers: any = {}; let resolvedPath = - `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces/{workspaceId}"; + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/workspaces/{workspaceId}/alertmanager/definition"; if (input.workspaceId !== undefined) { const labelValue: string = input.workspaceId; if (labelValue.length <= 0) { @@ -133,21 +326,32 @@ export const serializeAws_restJson1DescribeWorkspaceCommand = async ( }); }; -export const serializeAws_restJson1ListTagsForResourceCommand = async ( - input: ListTagsForResourceCommandInput, +export const serializeAws_restJson1DescribeRuleGroupsNamespaceCommand = async ( + input: DescribeRuleGroupsNamespaceCommandInput, context: __SerdeContext ): Promise<__HttpRequest> => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers: any = {}; - let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}"; - if (input.resourceArn !== undefined) { - const labelValue: string = input.resourceArn; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/workspaces/{workspaceId}/rulegroupsnamespaces/{name}"; + if (input.workspaceId !== undefined) { + const labelValue: string = input.workspaceId; if (labelValue.length <= 0) { - throw new Error("Empty value provided for input HTTP label: resourceArn."); + throw new Error("Empty value provided for input HTTP label: workspaceId."); } - resolvedPath = resolvedPath.replace("{resourceArn}", __extendedEncodeURIComponent(labelValue)); + resolvedPath = resolvedPath.replace("{workspaceId}", __extendedEncodeURIComponent(labelValue)); } else { - throw new Error("No value provided for input HTTP label: resourceArn."); + throw new Error("No value provided for input HTTP label: workspaceId."); + } + if (input.name !== undefined) { + const labelValue: string = input.name; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: name."); + } + resolvedPath = resolvedPath.replace("{name}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: name."); } let body: any; return new __HttpRequest({ @@ -161,16 +365,56 @@ export const serializeAws_restJson1ListTagsForResourceCommand = async ( }); }; -export const serializeAws_restJson1ListWorkspacesCommand = async ( - input: ListWorkspacesCommandInput, +export const serializeAws_restJson1DescribeWorkspaceCommand = async ( + input: DescribeWorkspaceCommandInput, context: __SerdeContext ): Promise<__HttpRequest> => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers: any = {}; - const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces"; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces/{workspaceId}"; + if (input.workspaceId !== undefined) { + const labelValue: string = input.workspaceId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: workspaceId."); + } + resolvedPath = resolvedPath.replace("{workspaceId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: workspaceId."); + } + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1ListRuleGroupsNamespacesCommand = async ( + input: ListRuleGroupsNamespacesCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/workspaces/{workspaceId}/rulegroupsnamespaces"; + if (input.workspaceId !== undefined) { + const labelValue: string = input.workspaceId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: workspaceId."); + } + resolvedPath = resolvedPath.replace("{workspaceId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: workspaceId."); + } const query: any = { + ...(input.name !== undefined && { name: input.name }), ...(input.nextToken !== undefined && { nextToken: input.nextToken }), - ...(input.alias !== undefined && { alias: input.alias }), ...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }), }; let body: any; @@ -186,14 +430,12 @@ export const serializeAws_restJson1ListWorkspacesCommand = async ( }); }; -export const serializeAws_restJson1TagResourceCommand = async ( - input: TagResourceCommandInput, +export const serializeAws_restJson1ListTagsForResourceCommand = async ( + input: ListTagsForResourceCommandInput, context: __SerdeContext ): Promise<__HttpRequest> => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers: any = { - "content-type": "application/json", - }; + const headers: any = {}; let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}"; if (input.resourceArn !== undefined) { const labelValue: string = input.resourceArn; @@ -205,45 +447,35 @@ export const serializeAws_restJson1TagResourceCommand = async ( throw new Error("No value provided for input HTTP label: resourceArn."); } let body: any; - body = JSON.stringify({ - ...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_restJson1TagMap(input.tags, context) }), - }); return new __HttpRequest({ protocol, hostname, port, - method: "POST", + method: "GET", headers, path: resolvedPath, body, }); }; -export const serializeAws_restJson1UntagResourceCommand = async ( - input: UntagResourceCommandInput, +export const serializeAws_restJson1ListWorkspacesCommand = async ( + input: ListWorkspacesCommandInput, context: __SerdeContext ): Promise<__HttpRequest> => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers: any = {}; - let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}"; - if (input.resourceArn !== undefined) { - const labelValue: string = input.resourceArn; - if (labelValue.length <= 0) { - throw new Error("Empty value provided for input HTTP label: resourceArn."); - } - resolvedPath = resolvedPath.replace("{resourceArn}", __extendedEncodeURIComponent(labelValue)); - } else { - throw new Error("No value provided for input HTTP label: resourceArn."); - } + const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces"; const query: any = { - ...(input.tagKeys !== undefined && { tagKeys: (input.tagKeys || []).map((_entry) => _entry as any) }), + ...(input.nextToken !== undefined && { nextToken: input.nextToken }), + ...(input.alias !== undefined && { alias: input.alias }), + ...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }), }; let body: any; return new __HttpRequest({ protocol, hostname, port, - method: "DELETE", + method: "GET", headers, path: resolvedPath, query, @@ -251,8 +483,8 @@ export const serializeAws_restJson1UntagResourceCommand = async ( }); }; -export const serializeAws_restJson1UpdateWorkspaceAliasCommand = async ( - input: UpdateWorkspaceAliasCommandInput, +export const serializeAws_restJson1PutAlertManagerDefinitionCommand = async ( + input: PutAlertManagerDefinitionCommandInput, context: __SerdeContext ): Promise<__HttpRequest> => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); @@ -260,7 +492,8 @@ export const serializeAws_restJson1UpdateWorkspaceAliasCommand = async ( "content-type": "application/json", }; let resolvedPath = - `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces/{workspaceId}/alias"; + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/workspaces/{workspaceId}/alertmanager/definition"; if (input.workspaceId !== undefined) { const labelValue: string = input.workspaceId; if (labelValue.length <= 0) { @@ -272,54 +505,1059 @@ export const serializeAws_restJson1UpdateWorkspaceAliasCommand = async ( } let body: any; body = JSON.stringify({ - ...(input.alias !== undefined && input.alias !== null && { alias: input.alias }), clientToken: input.clientToken ?? generateIdempotencyToken(), + ...(input.data !== undefined && input.data !== null && { data: context.base64Encoder(input.data) }), }); return new __HttpRequest({ protocol, hostname, port, - method: "POST", + method: "PUT", headers, path: resolvedPath, body, }); }; -export const deserializeAws_restJson1CreateWorkspaceCommand = async ( +export const serializeAws_restJson1PutRuleGroupsNamespaceCommand = async ( + input: PutRuleGroupsNamespaceCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/workspaces/{workspaceId}/rulegroupsnamespaces/{name}"; + if (input.workspaceId !== undefined) { + const labelValue: string = input.workspaceId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: workspaceId."); + } + resolvedPath = resolvedPath.replace("{workspaceId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: workspaceId."); + } + if (input.name !== undefined) { + const labelValue: string = input.name; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: name."); + } + resolvedPath = resolvedPath.replace("{name}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: name."); + } + let body: any; + body = JSON.stringify({ + clientToken: input.clientToken ?? generateIdempotencyToken(), + ...(input.data !== undefined && input.data !== null && { data: context.base64Encoder(input.data) }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "PUT", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1TagResourceCommand = async ( + input: TagResourceCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}"; + if (input.resourceArn !== undefined) { + const labelValue: string = input.resourceArn; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: resourceArn."); + } + resolvedPath = resolvedPath.replace("{resourceArn}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: resourceArn."); + } + let body: any; + body = JSON.stringify({ + ...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_restJson1TagMap(input.tags, context) }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1UntagResourceCommand = async ( + input: UntagResourceCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}"; + if (input.resourceArn !== undefined) { + const labelValue: string = input.resourceArn; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: resourceArn."); + } + resolvedPath = resolvedPath.replace("{resourceArn}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: resourceArn."); + } + const query: any = { + ...(input.tagKeys !== undefined && { tagKeys: (input.tagKeys || []).map((_entry) => _entry as any) }), + }; + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "DELETE", + headers, + path: resolvedPath, + query, + body, + }); +}; + +export const serializeAws_restJson1UpdateWorkspaceAliasCommand = async ( + input: UpdateWorkspaceAliasCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces/{workspaceId}/alias"; + if (input.workspaceId !== undefined) { + const labelValue: string = input.workspaceId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: workspaceId."); + } + resolvedPath = resolvedPath.replace("{workspaceId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: workspaceId."); + } + let body: any; + body = JSON.stringify({ + ...(input.alias !== undefined && input.alias !== null && { alias: input.alias }), + clientToken: input.clientToken ?? generateIdempotencyToken(), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +export const deserializeAws_restJson1CreateAlertManagerDefinitionCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 202 && output.statusCode >= 300) { + return deserializeAws_restJson1CreateAlertManagerDefinitionCommandError(output, context); + } + const contents: CreateAlertManagerDefinitionCommandOutput = { + $metadata: deserializeMetadata(output), + status: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.status !== undefined && data.status !== null) { + contents.status = deserializeAws_restJson1AlertManagerDefinitionStatus(data.status, context); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1CreateAlertManagerDefinitionCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.amp#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ConflictException": + case "com.amazonaws.amp#ConflictException": + response = { + ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.amp#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.amp#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceQuotaExceededException": + case "com.amazonaws.amp#ServiceQuotaExceededException": + response = { + ...(await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.amp#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.amp#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1CreateRuleGroupsNamespaceCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 202 && output.statusCode >= 300) { + return deserializeAws_restJson1CreateRuleGroupsNamespaceCommandError(output, context); + } + const contents: CreateRuleGroupsNamespaceCommandOutput = { + $metadata: deserializeMetadata(output), + arn: undefined, + name: undefined, + status: undefined, + tags: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.arn !== undefined && data.arn !== null) { + contents.arn = __expectString(data.arn); + } + if (data.name !== undefined && data.name !== null) { + contents.name = __expectString(data.name); + } + if (data.status !== undefined && data.status !== null) { + contents.status = deserializeAws_restJson1RuleGroupsNamespaceStatus(data.status, context); + } + if (data.tags !== undefined && data.tags !== null) { + contents.tags = deserializeAws_restJson1TagMap(data.tags, context); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1CreateRuleGroupsNamespaceCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.amp#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ConflictException": + case "com.amazonaws.amp#ConflictException": + response = { + ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.amp#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.amp#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceQuotaExceededException": + case "com.amazonaws.amp#ServiceQuotaExceededException": + response = { + ...(await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.amp#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.amp#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1CreateWorkspaceCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 202 && output.statusCode >= 300) { + return deserializeAws_restJson1CreateWorkspaceCommandError(output, context); + } + const contents: CreateWorkspaceCommandOutput = { + $metadata: deserializeMetadata(output), + arn: undefined, + status: undefined, + tags: undefined, + workspaceId: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.arn !== undefined && data.arn !== null) { + contents.arn = __expectString(data.arn); + } + if (data.status !== undefined && data.status !== null) { + contents.status = deserializeAws_restJson1WorkspaceStatus(data.status, context); + } + if (data.tags !== undefined && data.tags !== null) { + contents.tags = deserializeAws_restJson1TagMap(data.tags, context); + } + if (data.workspaceId !== undefined && data.workspaceId !== null) { + contents.workspaceId = __expectString(data.workspaceId); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1CreateWorkspaceCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.amp#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ConflictException": + case "com.amazonaws.amp#ConflictException": + response = { + ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.amp#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceQuotaExceededException": + case "com.amazonaws.amp#ServiceQuotaExceededException": + response = { + ...(await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.amp#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.amp#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1DeleteAlertManagerDefinitionCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 202 && output.statusCode >= 300) { + return deserializeAws_restJson1DeleteAlertManagerDefinitionCommandError(output, context); + } + const contents: DeleteAlertManagerDefinitionCommandOutput = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1DeleteAlertManagerDefinitionCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.amp#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ConflictException": + case "com.amazonaws.amp#ConflictException": + response = { + ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.amp#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.amp#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.amp#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.amp#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1DeleteRuleGroupsNamespaceCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 202 && output.statusCode >= 300) { + return deserializeAws_restJson1DeleteRuleGroupsNamespaceCommandError(output, context); + } + const contents: DeleteRuleGroupsNamespaceCommandOutput = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1DeleteRuleGroupsNamespaceCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.amp#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ConflictException": + case "com.amazonaws.amp#ConflictException": + response = { + ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.amp#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.amp#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.amp#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.amp#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1DeleteWorkspaceCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 202 && output.statusCode >= 300) { + return deserializeAws_restJson1DeleteWorkspaceCommandError(output, context); + } + const contents: DeleteWorkspaceCommandOutput = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1DeleteWorkspaceCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.amp#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ConflictException": + case "com.amazonaws.amp#ConflictException": + response = { + ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.amp#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.amp#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.amp#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.amp#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1DescribeAlertManagerDefinitionCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1DescribeAlertManagerDefinitionCommandError(output, context); + } + const contents: DescribeAlertManagerDefinitionCommandOutput = { + $metadata: deserializeMetadata(output), + alertManagerDefinition: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.alertManagerDefinition !== undefined && data.alertManagerDefinition !== null) { + contents.alertManagerDefinition = deserializeAws_restJson1AlertManagerDefinitionDescription( + data.alertManagerDefinition, + context + ); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1DescribeAlertManagerDefinitionCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.amp#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.amp#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.amp#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.amp#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.amp#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1DescribeRuleGroupsNamespaceCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1DescribeRuleGroupsNamespaceCommandError(output, context); + } + const contents: DescribeRuleGroupsNamespaceCommandOutput = { + $metadata: deserializeMetadata(output), + ruleGroupsNamespace: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.ruleGroupsNamespace !== undefined && data.ruleGroupsNamespace !== null) { + contents.ruleGroupsNamespace = deserializeAws_restJson1RuleGroupsNamespaceDescription( + data.ruleGroupsNamespace, + context + ); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1DescribeRuleGroupsNamespaceCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.amp#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.amp#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.amp#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.amp#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.amp#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1DescribeWorkspaceCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1DescribeWorkspaceCommandError(output, context); + } + const contents: DescribeWorkspaceCommandOutput = { + $metadata: deserializeMetadata(output), + workspace: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.workspace !== undefined && data.workspace !== null) { + contents.workspace = deserializeAws_restJson1WorkspaceDescription(data.workspace, context); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1DescribeWorkspaceCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.amp#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.amp#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.amp#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.amp#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.amp#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1ListRuleGroupsNamespacesCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { - if (output.statusCode !== 202 && output.statusCode >= 300) { - return deserializeAws_restJson1CreateWorkspaceCommandError(output, context); +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1ListRuleGroupsNamespacesCommandError(output, context); } - const contents: CreateWorkspaceCommandOutput = { + const contents: ListRuleGroupsNamespacesCommandOutput = { $metadata: deserializeMetadata(output), - arn: undefined, - status: undefined, - tags: undefined, - workspaceId: undefined, + nextToken: undefined, + ruleGroupsNamespaces: undefined, }; const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn !== undefined && data.arn !== null) { - contents.arn = __expectString(data.arn); - } - if (data.status !== undefined && data.status !== null) { - contents.status = deserializeAws_restJson1WorkspaceStatus(data.status, context); - } - if (data.tags !== undefined && data.tags !== null) { - contents.tags = deserializeAws_restJson1TagMap(data.tags, context); + if (data.nextToken !== undefined && data.nextToken !== null) { + contents.nextToken = __expectString(data.nextToken); } - if (data.workspaceId !== undefined && data.workspaceId !== null) { - contents.workspaceId = __expectString(data.workspaceId); + if (data.ruleGroupsNamespaces !== undefined && data.ruleGroupsNamespaces !== null) { + contents.ruleGroupsNamespaces = deserializeAws_restJson1RuleGroupsNamespaceSummaryList( + data.ruleGroupsNamespaces, + context + ); } return Promise.resolve(contents); }; -const deserializeAws_restJson1CreateWorkspaceCommandError = async ( +const deserializeAws_restJson1ListRuleGroupsNamespacesCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -336,14 +1574,6 @@ const deserializeAws_restJson1CreateWorkspaceCommandError = async ( $metadata: deserializeMetadata(output), }; break; - case "ConflictException": - case "com.amazonaws.amp#ConflictException": - response = { - ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), - name: errorCode, - $metadata: deserializeMetadata(output), - }; - break; case "InternalServerException": case "com.amazonaws.amp#InternalServerException": response = { @@ -352,10 +1582,10 @@ const deserializeAws_restJson1CreateWorkspaceCommandError = async ( $metadata: deserializeMetadata(output), }; break; - case "ServiceQuotaExceededException": - case "com.amazonaws.amp#ServiceQuotaExceededException": + case "ResourceNotFoundException": + case "com.amazonaws.amp#ResourceNotFoundException": response = { - ...(await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)), + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), name: errorCode, $metadata: deserializeMetadata(output), }; @@ -393,24 +1623,28 @@ const deserializeAws_restJson1CreateWorkspaceCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1DeleteWorkspaceCommand = async ( +export const deserializeAws_restJson1ListTagsForResourceCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { - if (output.statusCode !== 202 && output.statusCode >= 300) { - return deserializeAws_restJson1DeleteWorkspaceCommandError(output, context); +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1ListTagsForResourceCommandError(output, context); } - const contents: DeleteWorkspaceCommandOutput = { + const contents: ListTagsForResourceCommandOutput = { $metadata: deserializeMetadata(output), + tags: undefined, }; - await collectBody(output.body, context); + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.tags !== undefined && data.tags !== null) { + contents.tags = deserializeAws_restJson1TagMap(data.tags, context); + } return Promise.resolve(contents); }; -const deserializeAws_restJson1DeleteWorkspaceCommandError = async ( +const deserializeAws_restJson1ListTagsForResourceCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -476,28 +1710,32 @@ const deserializeAws_restJson1DeleteWorkspaceCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1DescribeWorkspaceCommand = async ( +export const deserializeAws_restJson1ListWorkspacesCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restJson1DescribeWorkspaceCommandError(output, context); + return deserializeAws_restJson1ListWorkspacesCommandError(output, context); } - const contents: DescribeWorkspaceCommandOutput = { + const contents: ListWorkspacesCommandOutput = { $metadata: deserializeMetadata(output), - workspace: undefined, + nextToken: undefined, + workspaces: undefined, }; const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.workspace !== undefined && data.workspace !== null) { - contents.workspace = deserializeAws_restJson1WorkspaceDescription(data.workspace, context); + if (data.nextToken !== undefined && data.nextToken !== null) { + contents.nextToken = __expectString(data.nextToken); + } + if (data.workspaces !== undefined && data.workspaces !== null) { + contents.workspaces = deserializeAws_restJson1WorkspaceSummaryList(data.workspaces, context); } return Promise.resolve(contents); }; -const deserializeAws_restJson1DescribeWorkspaceCommandError = async ( +const deserializeAws_restJson1ListWorkspacesCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -522,14 +1760,6 @@ const deserializeAws_restJson1DescribeWorkspaceCommandError = async ( $metadata: deserializeMetadata(output), }; break; - case "ResourceNotFoundException": - case "com.amazonaws.amp#ResourceNotFoundException": - response = { - ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), - name: errorCode, - $metadata: deserializeMetadata(output), - }; - break; case "ThrottlingException": case "com.amazonaws.amp#ThrottlingException": response = { @@ -563,28 +1793,28 @@ const deserializeAws_restJson1DescribeWorkspaceCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1ListTagsForResourceCommand = async ( +export const deserializeAws_restJson1PutAlertManagerDefinitionCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restJson1ListTagsForResourceCommandError(output, context); +): Promise => { + if (output.statusCode !== 202 && output.statusCode >= 300) { + return deserializeAws_restJson1PutAlertManagerDefinitionCommandError(output, context); } - const contents: ListTagsForResourceCommandOutput = { + const contents: PutAlertManagerDefinitionCommandOutput = { $metadata: deserializeMetadata(output), - tags: undefined, + status: undefined, }; const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.tags !== undefined && data.tags !== null) { - contents.tags = deserializeAws_restJson1TagMap(data.tags, context); + if (data.status !== undefined && data.status !== null) { + contents.status = deserializeAws_restJson1AlertManagerDefinitionStatus(data.status, context); } return Promise.resolve(contents); }; -const deserializeAws_restJson1ListTagsForResourceCommandError = async ( +const deserializeAws_restJson1PutAlertManagerDefinitionCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -601,6 +1831,14 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async ( $metadata: deserializeMetadata(output), }; break; + case "ConflictException": + case "com.amazonaws.amp#ConflictException": + response = { + ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; case "InternalServerException": case "com.amazonaws.amp#InternalServerException": response = { @@ -617,6 +1855,14 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async ( $metadata: deserializeMetadata(output), }; break; + case "ServiceQuotaExceededException": + case "com.amazonaws.amp#ServiceQuotaExceededException": + response = { + ...(await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; case "ThrottlingException": case "com.amazonaws.amp#ThrottlingException": response = { @@ -650,32 +1896,40 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1ListWorkspacesCommand = async ( +export const deserializeAws_restJson1PutRuleGroupsNamespaceCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restJson1ListWorkspacesCommandError(output, context); +): Promise => { + if (output.statusCode !== 202 && output.statusCode >= 300) { + return deserializeAws_restJson1PutRuleGroupsNamespaceCommandError(output, context); } - const contents: ListWorkspacesCommandOutput = { + const contents: PutRuleGroupsNamespaceCommandOutput = { $metadata: deserializeMetadata(output), - nextToken: undefined, - workspaces: undefined, + arn: undefined, + name: undefined, + status: undefined, + tags: undefined, }; const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken !== undefined && data.nextToken !== null) { - contents.nextToken = __expectString(data.nextToken); + if (data.arn !== undefined && data.arn !== null) { + contents.arn = __expectString(data.arn); } - if (data.workspaces !== undefined && data.workspaces !== null) { - contents.workspaces = deserializeAws_restJson1WorkspaceSummaryList(data.workspaces, context); + if (data.name !== undefined && data.name !== null) { + contents.name = __expectString(data.name); + } + if (data.status !== undefined && data.status !== null) { + contents.status = deserializeAws_restJson1RuleGroupsNamespaceStatus(data.status, context); + } + if (data.tags !== undefined && data.tags !== null) { + contents.tags = deserializeAws_restJson1TagMap(data.tags, context); } return Promise.resolve(contents); }; -const deserializeAws_restJson1ListWorkspacesCommandError = async ( +const deserializeAws_restJson1PutRuleGroupsNamespaceCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -692,6 +1946,14 @@ const deserializeAws_restJson1ListWorkspacesCommandError = async ( $metadata: deserializeMetadata(output), }; break; + case "ConflictException": + case "com.amazonaws.amp#ConflictException": + response = { + ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; case "InternalServerException": case "com.amazonaws.amp#InternalServerException": response = { @@ -700,6 +1962,22 @@ const deserializeAws_restJson1ListWorkspacesCommandError = async ( $metadata: deserializeMetadata(output), }; break; + case "ResourceNotFoundException": + case "com.amazonaws.amp#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceQuotaExceededException": + case "com.amazonaws.amp#ServiceQuotaExceededException": + response = { + ...(await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; case "ThrottlingException": case "com.amazonaws.amp#ThrottlingException": response = { @@ -1187,6 +2465,114 @@ const serializeAws_restJson1TagMap = (input: { [key: string]: string }, context: }, {}); }; +const deserializeAws_restJson1AlertManagerDefinitionDescription = ( + output: any, + context: __SerdeContext +): AlertManagerDefinitionDescription => { + return { + createdAt: + output.createdAt !== undefined && output.createdAt !== null + ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) + : undefined, + data: output.data !== undefined && output.data !== null ? context.base64Decoder(output.data) : undefined, + modifiedAt: + output.modifiedAt !== undefined && output.modifiedAt !== null + ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.modifiedAt))) + : undefined, + status: + output.status !== undefined && output.status !== null + ? deserializeAws_restJson1AlertManagerDefinitionStatus(output.status, context) + : undefined, + } as any; +}; + +const deserializeAws_restJson1AlertManagerDefinitionStatus = ( + output: any, + context: __SerdeContext +): AlertManagerDefinitionStatus => { + return { + statusCode: __expectString(output.statusCode), + statusReason: __expectString(output.statusReason), + } as any; +}; + +const deserializeAws_restJson1RuleGroupsNamespaceDescription = ( + output: any, + context: __SerdeContext +): RuleGroupsNamespaceDescription => { + return { + arn: __expectString(output.arn), + createdAt: + output.createdAt !== undefined && output.createdAt !== null + ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) + : undefined, + data: output.data !== undefined && output.data !== null ? context.base64Decoder(output.data) : undefined, + modifiedAt: + output.modifiedAt !== undefined && output.modifiedAt !== null + ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.modifiedAt))) + : undefined, + name: __expectString(output.name), + status: + output.status !== undefined && output.status !== null + ? deserializeAws_restJson1RuleGroupsNamespaceStatus(output.status, context) + : undefined, + tags: + output.tags !== undefined && output.tags !== null + ? deserializeAws_restJson1TagMap(output.tags, context) + : undefined, + } as any; +}; + +const deserializeAws_restJson1RuleGroupsNamespaceStatus = ( + output: any, + context: __SerdeContext +): RuleGroupsNamespaceStatus => { + return { + statusCode: __expectString(output.statusCode), + statusReason: __expectString(output.statusReason), + } as any; +}; + +const deserializeAws_restJson1RuleGroupsNamespaceSummary = ( + output: any, + context: __SerdeContext +): RuleGroupsNamespaceSummary => { + return { + arn: __expectString(output.arn), + createdAt: + output.createdAt !== undefined && output.createdAt !== null + ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) + : undefined, + modifiedAt: + output.modifiedAt !== undefined && output.modifiedAt !== null + ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.modifiedAt))) + : undefined, + name: __expectString(output.name), + status: + output.status !== undefined && output.status !== null + ? deserializeAws_restJson1RuleGroupsNamespaceStatus(output.status, context) + : undefined, + tags: + output.tags !== undefined && output.tags !== null + ? deserializeAws_restJson1TagMap(output.tags, context) + : undefined, + } as any; +}; + +const deserializeAws_restJson1RuleGroupsNamespaceSummaryList = ( + output: any, + context: __SerdeContext +): RuleGroupsNamespaceSummary[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return deserializeAws_restJson1RuleGroupsNamespaceSummary(entry, context); + }); +}; + const deserializeAws_restJson1TagMap = (output: any, context: __SerdeContext): { [key: string]: string } => { return Object.entries(output).reduce((acc: { [key: string]: string }, [key, value]: [string, any]) => { if (value === null) { diff --git a/clients/client-amp/src/waiters/waitForWorkspaceActive.ts b/clients/client-amp/src/waiters/waitForWorkspaceActive.ts new file mode 100644 index 0000000000000..f3665f14ddb42 --- /dev/null +++ b/clients/client-amp/src/waiters/waitForWorkspaceActive.ts @@ -0,0 +1,63 @@ +import { checkExceptions, createWaiter, WaiterConfiguration, WaiterResult, WaiterState } from "@aws-sdk/util-waiter"; + +import { AmpClient } from "../AmpClient"; +import { DescribeWorkspaceCommand, DescribeWorkspaceCommandInput } from "../commands/DescribeWorkspaceCommand"; + +const checkState = async (client: AmpClient, input: DescribeWorkspaceCommandInput): Promise => { + let reason; + try { + const result: any = await client.send(new DescribeWorkspaceCommand(input)); + reason = result; + try { + const returnComparator = () => { + return result.workspace.status.statusCode; + }; + if (returnComparator() === "ACTIVE") { + return { state: WaiterState.SUCCESS, reason }; + } + } catch (e) {} + try { + const returnComparator = () => { + return result.workspace.status.statusCode; + }; + if (returnComparator() === "UPDATING") { + return { state: WaiterState.RETRY, reason }; + } + } catch (e) {} + try { + const returnComparator = () => { + return result.workspace.status.statusCode; + }; + if (returnComparator() === "CREATING") { + return { state: WaiterState.RETRY, reason }; + } + } catch (e) {} + } catch (exception) { + reason = exception; + } + return { state: WaiterState.RETRY, reason }; +}; +/** + * Wait until a workspace reaches ACTIVE status + * @deprecated Use waitUntilWorkspaceActive instead. waitForWorkspaceActive does not throw error in non-success cases. + */ +export const waitForWorkspaceActive = async ( + params: WaiterConfiguration, + input: DescribeWorkspaceCommandInput +): Promise => { + const serviceDefaults = { minDelay: 2, maxDelay: 120 }; + return createWaiter({ ...serviceDefaults, ...params }, input, checkState); +}; +/** + * Wait until a workspace reaches ACTIVE status + * @param params - Waiter configuration options. + * @param input - The input to DescribeWorkspaceCommand for polling. + */ +export const waitUntilWorkspaceActive = async ( + params: WaiterConfiguration, + input: DescribeWorkspaceCommandInput +): Promise => { + const serviceDefaults = { minDelay: 2, maxDelay: 120 }; + const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState); + return checkExceptions(result); +}; diff --git a/clients/client-amp/src/waiters/waitForWorkspaceDeleted.ts b/clients/client-amp/src/waiters/waitForWorkspaceDeleted.ts new file mode 100644 index 0000000000000..617c3a3ba410e --- /dev/null +++ b/clients/client-amp/src/waiters/waitForWorkspaceDeleted.ts @@ -0,0 +1,50 @@ +import { checkExceptions, createWaiter, WaiterConfiguration, WaiterResult, WaiterState } from "@aws-sdk/util-waiter"; + +import { AmpClient } from "../AmpClient"; +import { DescribeWorkspaceCommand, DescribeWorkspaceCommandInput } from "../commands/DescribeWorkspaceCommand"; + +const checkState = async (client: AmpClient, input: DescribeWorkspaceCommandInput): Promise => { + let reason; + try { + const result: any = await client.send(new DescribeWorkspaceCommand(input)); + reason = result; + try { + const returnComparator = () => { + return result.workspace.status.statusCode; + }; + if (returnComparator() === "DELETING") { + return { state: WaiterState.RETRY, reason }; + } + } catch (e) {} + } catch (exception) { + reason = exception; + if (exception.name && exception.name == "ResourceNotFoundException") { + return { state: WaiterState.SUCCESS, reason }; + } + } + return { state: WaiterState.RETRY, reason }; +}; +/** + * Wait until a workspace reaches DELETED status + * @deprecated Use waitUntilWorkspaceDeleted instead. waitForWorkspaceDeleted does not throw error in non-success cases. + */ +export const waitForWorkspaceDeleted = async ( + params: WaiterConfiguration, + input: DescribeWorkspaceCommandInput +): Promise => { + const serviceDefaults = { minDelay: 2, maxDelay: 120 }; + return createWaiter({ ...serviceDefaults, ...params }, input, checkState); +}; +/** + * Wait until a workspace reaches DELETED status + * @param params - Waiter configuration options. + * @param input - The input to DescribeWorkspaceCommand for polling. + */ +export const waitUntilWorkspaceDeleted = async ( + params: WaiterConfiguration, + input: DescribeWorkspaceCommandInput +): Promise => { + const serviceDefaults = { minDelay: 2, maxDelay: 120 }; + const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState); + return checkExceptions(result); +}; diff --git a/clients/client-appintegrations/README.md b/clients/client-appintegrations/README.md index be23ca55ddda5..b7603a9d75f22 100644 --- a/clients/client-appintegrations/README.md +++ b/clients/client-appintegrations/README.md @@ -7,8 +7,11 @@ AWS SDK for JavaScript AppIntegrations Client for Node.js, Browser and React Native. -

The Amazon AppIntegrations service enables you to configure and reuse connections to external applications.

-

For information about how you can use external applications with Amazon Connect, see Set up pre-built integrations in the Amazon Connect Administrator Guide.

+

The Amazon AppIntegrations service enables you to configure and reuse connections to external +applications.

+

For information about how you can use external applications with Amazon Connect, see Set up pre-built +integrations and Deliver information to agents using Amazon Connect Wisdom +in the Amazon Connect Administrator Guide.

## Installing @@ -25,16 +28,16 @@ using your favorite package manager: The AWS SDK is modulized by clients and commands. To send a request, you only need to import the `AppIntegrationsClient` and -the commands you need, for example `CreateEventIntegrationCommand`: +the commands you need, for example `CreateDataIntegrationCommand`: ```js // ES5 example -const { AppIntegrationsClient, CreateEventIntegrationCommand } = require("@aws-sdk/client-appintegrations"); +const { AppIntegrationsClient, CreateDataIntegrationCommand } = require("@aws-sdk/client-appintegrations"); ``` ```ts // ES6+ example -import { AppIntegrationsClient, CreateEventIntegrationCommand } from "@aws-sdk/client-appintegrations"; +import { AppIntegrationsClient, CreateDataIntegrationCommand } from "@aws-sdk/client-appintegrations"; ``` ### Usage @@ -53,7 +56,7 @@ const client = new AppIntegrationsClient({ region: "REGION" }); const params = { /** input parameters */ }; -const command = new CreateEventIntegrationCommand(params); +const command = new CreateDataIntegrationCommand(params); ``` #### Async/await @@ -132,7 +135,7 @@ const client = new AWS.AppIntegrations({ region: "REGION" }); // async/await. try { - const data = await client.createEventIntegration(params); + const data = await client.createDataIntegration(params); // process data. } catch (error) { // error handling. @@ -140,7 +143,7 @@ try { // Promises. client - .createEventIntegration(params) + .createDataIntegration(params) .then((data) => { // process data. }) @@ -149,7 +152,7 @@ client }); // callbacks. -client.createEventIntegration(params, (err, data) => { +client.createDataIntegration(params, (err, data) => { // proccess err and data. }); ``` diff --git a/clients/client-appintegrations/src/AppIntegrations.ts b/clients/client-appintegrations/src/AppIntegrations.ts index d41ef33a06a68..d30c135189036 100644 --- a/clients/client-appintegrations/src/AppIntegrations.ts +++ b/clients/client-appintegrations/src/AppIntegrations.ts @@ -1,21 +1,46 @@ import { HttpHandlerOptions as __HttpHandlerOptions } from "@aws-sdk/types"; import { AppIntegrationsClient } from "./AppIntegrationsClient"; +import { + CreateDataIntegrationCommand, + CreateDataIntegrationCommandInput, + CreateDataIntegrationCommandOutput, +} from "./commands/CreateDataIntegrationCommand"; import { CreateEventIntegrationCommand, CreateEventIntegrationCommandInput, CreateEventIntegrationCommandOutput, } from "./commands/CreateEventIntegrationCommand"; +import { + DeleteDataIntegrationCommand, + DeleteDataIntegrationCommandInput, + DeleteDataIntegrationCommandOutput, +} from "./commands/DeleteDataIntegrationCommand"; import { DeleteEventIntegrationCommand, DeleteEventIntegrationCommandInput, DeleteEventIntegrationCommandOutput, } from "./commands/DeleteEventIntegrationCommand"; +import { + GetDataIntegrationCommand, + GetDataIntegrationCommandInput, + GetDataIntegrationCommandOutput, +} from "./commands/GetDataIntegrationCommand"; import { GetEventIntegrationCommand, GetEventIntegrationCommandInput, GetEventIntegrationCommandOutput, } from "./commands/GetEventIntegrationCommand"; +import { + ListDataIntegrationAssociationsCommand, + ListDataIntegrationAssociationsCommandInput, + ListDataIntegrationAssociationsCommandOutput, +} from "./commands/ListDataIntegrationAssociationsCommand"; +import { + ListDataIntegrationsCommand, + ListDataIntegrationsCommandInput, + ListDataIntegrationsCommandOutput, +} from "./commands/ListDataIntegrationsCommand"; import { ListEventIntegrationAssociationsCommand, ListEventIntegrationAssociationsCommandInput, @@ -37,6 +62,11 @@ import { UntagResourceCommandInput, UntagResourceCommandOutput, } from "./commands/UntagResourceCommand"; +import { + UpdateDataIntegrationCommand, + UpdateDataIntegrationCommandInput, + UpdateDataIntegrationCommandOutput, +} from "./commands/UpdateDataIntegrationCommand"; import { UpdateEventIntegrationCommand, UpdateEventIntegrationCommandInput, @@ -44,15 +74,55 @@ import { } from "./commands/UpdateEventIntegrationCommand"; /** - *

The Amazon AppIntegrations service enables you to configure and reuse connections to external applications.

- *

For information about how you can use external applications with Amazon Connect, see Set up pre-built integrations in the Amazon Connect Administrator Guide.

+ *

The Amazon AppIntegrations service enables you to configure and reuse connections to external + * applications.

+ *

For information about how you can use external applications with Amazon Connect, see Set up pre-built + * integrations and Deliver information to agents using Amazon Connect Wisdom + * in the Amazon Connect Administrator Guide.

*/ export class AppIntegrations extends AppIntegrationsClient { + /** + *

Creates and persists a DataIntegration resource.

+ * + *

You cannot create a DataIntegration association for a DataIntegration that has been previously associated. + * Use a different DataIntegration, or recreate the DataIntegration using the + * CreateDataIntegration API.

+ *
+ */ + public createDataIntegration( + args: CreateDataIntegrationCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public createDataIntegration( + args: CreateDataIntegrationCommandInput, + cb: (err: any, data?: CreateDataIntegrationCommandOutput) => void + ): void; + public createDataIntegration( + args: CreateDataIntegrationCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateDataIntegrationCommandOutput) => void + ): void; + public createDataIntegration( + args: CreateDataIntegrationCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: CreateDataIntegrationCommandOutput) => void), + cb?: (err: any, data?: CreateDataIntegrationCommandOutput) => void + ): Promise | void { + const command = new CreateDataIntegrationCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + /** *

Creates an EventIntegration, given a specified name, description, and a reference to an * Amazon EventBridge bus in your account and a partner event source that pushes events to that bus. No - * objects are created in the your account, only metadata that is persisted on the EventIntegration - * control plane.

+ * objects are created in the your account, only metadata that is persisted on the + * EventIntegration control plane.

*/ public createEventIntegration( args: CreateEventIntegrationCommandInput, @@ -83,6 +153,45 @@ export class AppIntegrations extends AppIntegrationsClient { } } + /** + *

Deletes the DataIntegration. Only DataIntegrations that don't have any + * DataIntegrationAssociations can be deleted. Deleting a DataIntegration also deletes the + * underlying Amazon AppFlow flow and service linked role.

+ * + *

You cannot create a DataIntegration association for a DataIntegration that has been previously associated. + * Use a different DataIntegration, or recreate the DataIntegration using the + * CreateDataIntegration API.

+ *
+ */ + public deleteDataIntegration( + args: DeleteDataIntegrationCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public deleteDataIntegration( + args: DeleteDataIntegrationCommandInput, + cb: (err: any, data?: DeleteDataIntegrationCommandOutput) => void + ): void; + public deleteDataIntegration( + args: DeleteDataIntegrationCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteDataIntegrationCommandOutput) => void + ): void; + public deleteDataIntegration( + args: DeleteDataIntegrationCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DeleteDataIntegrationCommandOutput) => void), + cb?: (err: any, data?: DeleteDataIntegrationCommandOutput) => void + ): Promise | void { + const command = new DeleteDataIntegrationCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + /** *

Deletes the specified existing event integration. If the event integration is associated * with clients, the request is rejected.

@@ -117,7 +226,44 @@ export class AppIntegrations extends AppIntegrationsClient { } /** - *

Return information about the event integration.

+ *

Returns information about the DataIntegration.

+ * + *

You cannot create a DataIntegration association for a DataIntegration that has been previously associated. + * Use a different DataIntegration, or recreate the DataIntegration using the + * CreateDataIntegration API.

+ *
+ */ + public getDataIntegration( + args: GetDataIntegrationCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public getDataIntegration( + args: GetDataIntegrationCommandInput, + cb: (err: any, data?: GetDataIntegrationCommandOutput) => void + ): void; + public getDataIntegration( + args: GetDataIntegrationCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetDataIntegrationCommandOutput) => void + ): void; + public getDataIntegration( + args: GetDataIntegrationCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetDataIntegrationCommandOutput) => void), + cb?: (err: any, data?: GetDataIntegrationCommandOutput) => void + ): Promise | void { + const command = new GetDataIntegrationCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

Returns information about the event integration.

*/ public getEventIntegration( args: GetEventIntegrationCommandInput, @@ -148,6 +294,80 @@ export class AppIntegrations extends AppIntegrationsClient { } } + /** + *

Returns a paginated list of DataIntegration associations in the account.

+ * + *

You cannot create a DataIntegration association for a DataIntegration that has been previously associated. + * Use a different DataIntegration, or recreate the DataIntegration using the + * CreateDataIntegration API.

+ *
+ */ + public listDataIntegrationAssociations( + args: ListDataIntegrationAssociationsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public listDataIntegrationAssociations( + args: ListDataIntegrationAssociationsCommandInput, + cb: (err: any, data?: ListDataIntegrationAssociationsCommandOutput) => void + ): void; + public listDataIntegrationAssociations( + args: ListDataIntegrationAssociationsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListDataIntegrationAssociationsCommandOutput) => void + ): void; + public listDataIntegrationAssociations( + args: ListDataIntegrationAssociationsCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ListDataIntegrationAssociationsCommandOutput) => void), + cb?: (err: any, data?: ListDataIntegrationAssociationsCommandOutput) => void + ): Promise | void { + const command = new ListDataIntegrationAssociationsCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

Returns a paginated list of DataIntegrations in the account.

+ * + *

You cannot create a DataIntegration association for a DataIntegration that has been previously associated. + * Use a different DataIntegration, or recreate the DataIntegration using the + * CreateDataIntegration API.

+ *
+ */ + public listDataIntegrations( + args: ListDataIntegrationsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public listDataIntegrations( + args: ListDataIntegrationsCommandInput, + cb: (err: any, data?: ListDataIntegrationsCommandOutput) => void + ): void; + public listDataIntegrations( + args: ListDataIntegrationsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListDataIntegrationsCommandOutput) => void + ): void; + public listDataIntegrations( + args: ListDataIntegrationsCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ListDataIntegrationsCommandOutput) => void), + cb?: (err: any, data?: ListDataIntegrationsCommandOutput) => void + ): Promise | void { + const command = new ListDataIntegrationsCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + /** *

Returns a paginated list of event integration associations in the account.

*/ @@ -302,6 +522,43 @@ export class AppIntegrations extends AppIntegrationsClient { } } + /** + *

Updates the description of a DataIntegration.

+ * + *

You cannot create a DataIntegration association for a DataIntegration that has been previously associated. + * Use a different DataIntegration, or recreate the DataIntegration using the + * CreateDataIntegration API.

+ *
+ */ + public updateDataIntegration( + args: UpdateDataIntegrationCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public updateDataIntegration( + args: UpdateDataIntegrationCommandInput, + cb: (err: any, data?: UpdateDataIntegrationCommandOutput) => void + ): void; + public updateDataIntegration( + args: UpdateDataIntegrationCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateDataIntegrationCommandOutput) => void + ): void; + public updateDataIntegration( + args: UpdateDataIntegrationCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: UpdateDataIntegrationCommandOutput) => void), + cb?: (err: any, data?: UpdateDataIntegrationCommandOutput) => void + ): Promise | void { + const command = new UpdateDataIntegrationCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + /** *

Updates the description of an event integration.

*/ diff --git a/clients/client-appintegrations/src/AppIntegrationsClient.ts b/clients/client-appintegrations/src/AppIntegrationsClient.ts index d796b591cc7cc..9025dc0015882 100644 --- a/clients/client-appintegrations/src/AppIntegrationsClient.ts +++ b/clients/client-appintegrations/src/AppIntegrationsClient.ts @@ -55,18 +55,35 @@ import { UserAgent as __UserAgent, } from "@aws-sdk/types"; +import { + CreateDataIntegrationCommandInput, + CreateDataIntegrationCommandOutput, +} from "./commands/CreateDataIntegrationCommand"; import { CreateEventIntegrationCommandInput, CreateEventIntegrationCommandOutput, } from "./commands/CreateEventIntegrationCommand"; +import { + DeleteDataIntegrationCommandInput, + DeleteDataIntegrationCommandOutput, +} from "./commands/DeleteDataIntegrationCommand"; import { DeleteEventIntegrationCommandInput, DeleteEventIntegrationCommandOutput, } from "./commands/DeleteEventIntegrationCommand"; +import { GetDataIntegrationCommandInput, GetDataIntegrationCommandOutput } from "./commands/GetDataIntegrationCommand"; import { GetEventIntegrationCommandInput, GetEventIntegrationCommandOutput, } from "./commands/GetEventIntegrationCommand"; +import { + ListDataIntegrationAssociationsCommandInput, + ListDataIntegrationAssociationsCommandOutput, +} from "./commands/ListDataIntegrationAssociationsCommand"; +import { + ListDataIntegrationsCommandInput, + ListDataIntegrationsCommandOutput, +} from "./commands/ListDataIntegrationsCommand"; import { ListEventIntegrationAssociationsCommandInput, ListEventIntegrationAssociationsCommandOutput, @@ -81,6 +98,10 @@ import { } from "./commands/ListTagsForResourceCommand"; import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand"; import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand"; +import { + UpdateDataIntegrationCommandInput, + UpdateDataIntegrationCommandOutput, +} from "./commands/UpdateDataIntegrationCommand"; import { UpdateEventIntegrationCommandInput, UpdateEventIntegrationCommandOutput, @@ -88,25 +109,37 @@ import { import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig"; export type ServiceInputTypes = + | CreateDataIntegrationCommandInput | CreateEventIntegrationCommandInput + | DeleteDataIntegrationCommandInput | DeleteEventIntegrationCommandInput + | GetDataIntegrationCommandInput | GetEventIntegrationCommandInput + | ListDataIntegrationAssociationsCommandInput + | ListDataIntegrationsCommandInput | ListEventIntegrationAssociationsCommandInput | ListEventIntegrationsCommandInput | ListTagsForResourceCommandInput | TagResourceCommandInput | UntagResourceCommandInput + | UpdateDataIntegrationCommandInput | UpdateEventIntegrationCommandInput; export type ServiceOutputTypes = + | CreateDataIntegrationCommandOutput | CreateEventIntegrationCommandOutput + | DeleteDataIntegrationCommandOutput | DeleteEventIntegrationCommandOutput + | GetDataIntegrationCommandOutput | GetEventIntegrationCommandOutput + | ListDataIntegrationAssociationsCommandOutput + | ListDataIntegrationsCommandOutput | ListEventIntegrationAssociationsCommandOutput | ListEventIntegrationsCommandOutput | ListTagsForResourceCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput + | UpdateDataIntegrationCommandOutput | UpdateEventIntegrationCommandOutput; export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { @@ -248,8 +281,11 @@ type AppIntegrationsClientResolvedConfigType = __SmithyResolvedConfiguration<__H export interface AppIntegrationsClientResolvedConfig extends AppIntegrationsClientResolvedConfigType {} /** - *

The Amazon AppIntegrations service enables you to configure and reuse connections to external applications.

- *

For information about how you can use external applications with Amazon Connect, see Set up pre-built integrations in the Amazon Connect Administrator Guide.

+ *

The Amazon AppIntegrations service enables you to configure and reuse connections to external + * applications.

+ *

For information about how you can use external applications with Amazon Connect, see Set up pre-built + * integrations and Deliver information to agents using Amazon Connect Wisdom + * in the Amazon Connect Administrator Guide.

*/ export class AppIntegrationsClient extends __Client< __HttpHandlerOptions, diff --git a/clients/client-appintegrations/src/commands/CreateDataIntegrationCommand.ts b/clients/client-appintegrations/src/commands/CreateDataIntegrationCommand.ts new file mode 100644 index 0000000000000..6a40b67c03fa2 --- /dev/null +++ b/clients/client-appintegrations/src/commands/CreateDataIntegrationCommand.ts @@ -0,0 +1,100 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { AppIntegrationsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AppIntegrationsClient"; +import { CreateDataIntegrationRequest, CreateDataIntegrationResponse } from "../models/models_0"; +import { + deserializeAws_restJson1CreateDataIntegrationCommand, + serializeAws_restJson1CreateDataIntegrationCommand, +} from "../protocols/Aws_restJson1"; + +export interface CreateDataIntegrationCommandInput extends CreateDataIntegrationRequest {} +export interface CreateDataIntegrationCommandOutput extends CreateDataIntegrationResponse, __MetadataBearer {} + +/** + *

Creates and persists a DataIntegration resource.

+ * + *

You cannot create a DataIntegration association for a DataIntegration that has been previously associated. + * Use a different DataIntegration, or recreate the DataIntegration using the + * CreateDataIntegration API.

+ *
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { AppIntegrationsClient, CreateDataIntegrationCommand } from "@aws-sdk/client-appintegrations"; // ES Modules import + * // const { AppIntegrationsClient, CreateDataIntegrationCommand } = require("@aws-sdk/client-appintegrations"); // CommonJS import + * const client = new AppIntegrationsClient(config); + * const command = new CreateDataIntegrationCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link CreateDataIntegrationCommandInput} for command's `input` shape. + * @see {@link CreateDataIntegrationCommandOutput} for command's `response` shape. + * @see {@link AppIntegrationsClientResolvedConfig | config} for command's `input` shape. + * + */ +export class CreateDataIntegrationCommand extends $Command< + CreateDataIntegrationCommandInput, + CreateDataIntegrationCommandOutput, + AppIntegrationsClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: CreateDataIntegrationCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: AppIntegrationsClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "AppIntegrationsClient"; + const commandName = "CreateDataIntegrationCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: CreateDataIntegrationRequest.filterSensitiveLog, + outputFilterSensitiveLog: CreateDataIntegrationResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: CreateDataIntegrationCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1CreateDataIntegrationCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1CreateDataIntegrationCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-appintegrations/src/commands/CreateEventIntegrationCommand.ts b/clients/client-appintegrations/src/commands/CreateEventIntegrationCommand.ts index caa46d156155f..97b4052f84d34 100644 --- a/clients/client-appintegrations/src/commands/CreateEventIntegrationCommand.ts +++ b/clients/client-appintegrations/src/commands/CreateEventIntegrationCommand.ts @@ -24,8 +24,8 @@ export interface CreateEventIntegrationCommandOutput extends CreateEventIntegrat /** *

Creates an EventIntegration, given a specified name, description, and a reference to an * Amazon EventBridge bus in your account and a partner event source that pushes events to that bus. No - * objects are created in the your account, only metadata that is persisted on the EventIntegration - * control plane.

+ * objects are created in the your account, only metadata that is persisted on the + * EventIntegration control plane.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript diff --git a/clients/client-appintegrations/src/commands/DeleteDataIntegrationCommand.ts b/clients/client-appintegrations/src/commands/DeleteDataIntegrationCommand.ts new file mode 100644 index 0000000000000..d069a67d66ccb --- /dev/null +++ b/clients/client-appintegrations/src/commands/DeleteDataIntegrationCommand.ts @@ -0,0 +1,102 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { AppIntegrationsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AppIntegrationsClient"; +import { DeleteDataIntegrationRequest, DeleteDataIntegrationResponse } from "../models/models_0"; +import { + deserializeAws_restJson1DeleteDataIntegrationCommand, + serializeAws_restJson1DeleteDataIntegrationCommand, +} from "../protocols/Aws_restJson1"; + +export interface DeleteDataIntegrationCommandInput extends DeleteDataIntegrationRequest {} +export interface DeleteDataIntegrationCommandOutput extends DeleteDataIntegrationResponse, __MetadataBearer {} + +/** + *

Deletes the DataIntegration. Only DataIntegrations that don't have any + * DataIntegrationAssociations can be deleted. Deleting a DataIntegration also deletes the + * underlying Amazon AppFlow flow and service linked role.

+ * + *

You cannot create a DataIntegration association for a DataIntegration that has been previously associated. + * Use a different DataIntegration, or recreate the DataIntegration using the + * CreateDataIntegration API.

+ *
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { AppIntegrationsClient, DeleteDataIntegrationCommand } from "@aws-sdk/client-appintegrations"; // ES Modules import + * // const { AppIntegrationsClient, DeleteDataIntegrationCommand } = require("@aws-sdk/client-appintegrations"); // CommonJS import + * const client = new AppIntegrationsClient(config); + * const command = new DeleteDataIntegrationCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link DeleteDataIntegrationCommandInput} for command's `input` shape. + * @see {@link DeleteDataIntegrationCommandOutput} for command's `response` shape. + * @see {@link AppIntegrationsClientResolvedConfig | config} for command's `input` shape. + * + */ +export class DeleteDataIntegrationCommand extends $Command< + DeleteDataIntegrationCommandInput, + DeleteDataIntegrationCommandOutput, + AppIntegrationsClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DeleteDataIntegrationCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: AppIntegrationsClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "AppIntegrationsClient"; + const commandName = "DeleteDataIntegrationCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: DeleteDataIntegrationRequest.filterSensitiveLog, + outputFilterSensitiveLog: DeleteDataIntegrationResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: DeleteDataIntegrationCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1DeleteDataIntegrationCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1DeleteDataIntegrationCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-appintegrations/src/commands/GetDataIntegrationCommand.ts b/clients/client-appintegrations/src/commands/GetDataIntegrationCommand.ts new file mode 100644 index 0000000000000..3ea946550306a --- /dev/null +++ b/clients/client-appintegrations/src/commands/GetDataIntegrationCommand.ts @@ -0,0 +1,100 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { AppIntegrationsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AppIntegrationsClient"; +import { GetDataIntegrationRequest, GetDataIntegrationResponse } from "../models/models_0"; +import { + deserializeAws_restJson1GetDataIntegrationCommand, + serializeAws_restJson1GetDataIntegrationCommand, +} from "../protocols/Aws_restJson1"; + +export interface GetDataIntegrationCommandInput extends GetDataIntegrationRequest {} +export interface GetDataIntegrationCommandOutput extends GetDataIntegrationResponse, __MetadataBearer {} + +/** + *

Returns information about the DataIntegration.

+ * + *

You cannot create a DataIntegration association for a DataIntegration that has been previously associated. + * Use a different DataIntegration, or recreate the DataIntegration using the + * CreateDataIntegration API.

+ *
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { AppIntegrationsClient, GetDataIntegrationCommand } from "@aws-sdk/client-appintegrations"; // ES Modules import + * // const { AppIntegrationsClient, GetDataIntegrationCommand } = require("@aws-sdk/client-appintegrations"); // CommonJS import + * const client = new AppIntegrationsClient(config); + * const command = new GetDataIntegrationCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link GetDataIntegrationCommandInput} for command's `input` shape. + * @see {@link GetDataIntegrationCommandOutput} for command's `response` shape. + * @see {@link AppIntegrationsClientResolvedConfig | config} for command's `input` shape. + * + */ +export class GetDataIntegrationCommand extends $Command< + GetDataIntegrationCommandInput, + GetDataIntegrationCommandOutput, + AppIntegrationsClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetDataIntegrationCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: AppIntegrationsClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "AppIntegrationsClient"; + const commandName = "GetDataIntegrationCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: GetDataIntegrationRequest.filterSensitiveLog, + outputFilterSensitiveLog: GetDataIntegrationResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: GetDataIntegrationCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1GetDataIntegrationCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1GetDataIntegrationCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-appintegrations/src/commands/GetEventIntegrationCommand.ts b/clients/client-appintegrations/src/commands/GetEventIntegrationCommand.ts index a18e0d5f6f3c1..1cca9e9cde2d5 100644 --- a/clients/client-appintegrations/src/commands/GetEventIntegrationCommand.ts +++ b/clients/client-appintegrations/src/commands/GetEventIntegrationCommand.ts @@ -22,7 +22,7 @@ export interface GetEventIntegrationCommandInput extends GetEventIntegrationRequ export interface GetEventIntegrationCommandOutput extends GetEventIntegrationResponse, __MetadataBearer {} /** - *

Return information about the event integration.

+ *

Returns information about the event integration.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript diff --git a/clients/client-appintegrations/src/commands/ListDataIntegrationAssociationsCommand.ts b/clients/client-appintegrations/src/commands/ListDataIntegrationAssociationsCommand.ts new file mode 100644 index 0000000000000..fb643e9ab4943 --- /dev/null +++ b/clients/client-appintegrations/src/commands/ListDataIntegrationAssociationsCommand.ts @@ -0,0 +1,108 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { AppIntegrationsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AppIntegrationsClient"; +import { ListDataIntegrationAssociationsRequest, ListDataIntegrationAssociationsResponse } from "../models/models_0"; +import { + deserializeAws_restJson1ListDataIntegrationAssociationsCommand, + serializeAws_restJson1ListDataIntegrationAssociationsCommand, +} from "../protocols/Aws_restJson1"; + +export interface ListDataIntegrationAssociationsCommandInput extends ListDataIntegrationAssociationsRequest {} +export interface ListDataIntegrationAssociationsCommandOutput + extends ListDataIntegrationAssociationsResponse, + __MetadataBearer {} + +/** + *

Returns a paginated list of DataIntegration associations in the account.

+ * + *

You cannot create a DataIntegration association for a DataIntegration that has been previously associated. + * Use a different DataIntegration, or recreate the DataIntegration using the + * CreateDataIntegration API.

+ *
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { AppIntegrationsClient, ListDataIntegrationAssociationsCommand } from "@aws-sdk/client-appintegrations"; // ES Modules import + * // const { AppIntegrationsClient, ListDataIntegrationAssociationsCommand } = require("@aws-sdk/client-appintegrations"); // CommonJS import + * const client = new AppIntegrationsClient(config); + * const command = new ListDataIntegrationAssociationsCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link ListDataIntegrationAssociationsCommandInput} for command's `input` shape. + * @see {@link ListDataIntegrationAssociationsCommandOutput} for command's `response` shape. + * @see {@link AppIntegrationsClientResolvedConfig | config} for command's `input` shape. + * + */ +export class ListDataIntegrationAssociationsCommand extends $Command< + ListDataIntegrationAssociationsCommandInput, + ListDataIntegrationAssociationsCommandOutput, + AppIntegrationsClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: ListDataIntegrationAssociationsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: AppIntegrationsClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "AppIntegrationsClient"; + const commandName = "ListDataIntegrationAssociationsCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: ListDataIntegrationAssociationsRequest.filterSensitiveLog, + outputFilterSensitiveLog: ListDataIntegrationAssociationsResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: ListDataIntegrationAssociationsCommandInput, + context: __SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1ListDataIntegrationAssociationsCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return deserializeAws_restJson1ListDataIntegrationAssociationsCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-appintegrations/src/commands/ListDataIntegrationsCommand.ts b/clients/client-appintegrations/src/commands/ListDataIntegrationsCommand.ts new file mode 100644 index 0000000000000..bf1c8c1de7167 --- /dev/null +++ b/clients/client-appintegrations/src/commands/ListDataIntegrationsCommand.ts @@ -0,0 +1,100 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { AppIntegrationsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AppIntegrationsClient"; +import { ListDataIntegrationsRequest, ListDataIntegrationsResponse } from "../models/models_0"; +import { + deserializeAws_restJson1ListDataIntegrationsCommand, + serializeAws_restJson1ListDataIntegrationsCommand, +} from "../protocols/Aws_restJson1"; + +export interface ListDataIntegrationsCommandInput extends ListDataIntegrationsRequest {} +export interface ListDataIntegrationsCommandOutput extends ListDataIntegrationsResponse, __MetadataBearer {} + +/** + *

Returns a paginated list of DataIntegrations in the account.

+ * + *

You cannot create a DataIntegration association for a DataIntegration that has been previously associated. + * Use a different DataIntegration, or recreate the DataIntegration using the + * CreateDataIntegration API.

+ *
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { AppIntegrationsClient, ListDataIntegrationsCommand } from "@aws-sdk/client-appintegrations"; // ES Modules import + * // const { AppIntegrationsClient, ListDataIntegrationsCommand } = require("@aws-sdk/client-appintegrations"); // CommonJS import + * const client = new AppIntegrationsClient(config); + * const command = new ListDataIntegrationsCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link ListDataIntegrationsCommandInput} for command's `input` shape. + * @see {@link ListDataIntegrationsCommandOutput} for command's `response` shape. + * @see {@link AppIntegrationsClientResolvedConfig | config} for command's `input` shape. + * + */ +export class ListDataIntegrationsCommand extends $Command< + ListDataIntegrationsCommandInput, + ListDataIntegrationsCommandOutput, + AppIntegrationsClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: ListDataIntegrationsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: AppIntegrationsClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "AppIntegrationsClient"; + const commandName = "ListDataIntegrationsCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: ListDataIntegrationsRequest.filterSensitiveLog, + outputFilterSensitiveLog: ListDataIntegrationsResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: ListDataIntegrationsCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1ListDataIntegrationsCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1ListDataIntegrationsCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-appintegrations/src/commands/UpdateDataIntegrationCommand.ts b/clients/client-appintegrations/src/commands/UpdateDataIntegrationCommand.ts new file mode 100644 index 0000000000000..59997c078f2de --- /dev/null +++ b/clients/client-appintegrations/src/commands/UpdateDataIntegrationCommand.ts @@ -0,0 +1,100 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { AppIntegrationsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AppIntegrationsClient"; +import { UpdateDataIntegrationRequest, UpdateDataIntegrationResponse } from "../models/models_0"; +import { + deserializeAws_restJson1UpdateDataIntegrationCommand, + serializeAws_restJson1UpdateDataIntegrationCommand, +} from "../protocols/Aws_restJson1"; + +export interface UpdateDataIntegrationCommandInput extends UpdateDataIntegrationRequest {} +export interface UpdateDataIntegrationCommandOutput extends UpdateDataIntegrationResponse, __MetadataBearer {} + +/** + *

Updates the description of a DataIntegration.

+ * + *

You cannot create a DataIntegration association for a DataIntegration that has been previously associated. + * Use a different DataIntegration, or recreate the DataIntegration using the + * CreateDataIntegration API.

+ *
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { AppIntegrationsClient, UpdateDataIntegrationCommand } from "@aws-sdk/client-appintegrations"; // ES Modules import + * // const { AppIntegrationsClient, UpdateDataIntegrationCommand } = require("@aws-sdk/client-appintegrations"); // CommonJS import + * const client = new AppIntegrationsClient(config); + * const command = new UpdateDataIntegrationCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link UpdateDataIntegrationCommandInput} for command's `input` shape. + * @see {@link UpdateDataIntegrationCommandOutput} for command's `response` shape. + * @see {@link AppIntegrationsClientResolvedConfig | config} for command's `input` shape. + * + */ +export class UpdateDataIntegrationCommand extends $Command< + UpdateDataIntegrationCommandInput, + UpdateDataIntegrationCommandOutput, + AppIntegrationsClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: UpdateDataIntegrationCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: AppIntegrationsClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "AppIntegrationsClient"; + const commandName = "UpdateDataIntegrationCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: UpdateDataIntegrationRequest.filterSensitiveLog, + outputFilterSensitiveLog: UpdateDataIntegrationResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: UpdateDataIntegrationCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1UpdateDataIntegrationCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1UpdateDataIntegrationCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-appintegrations/src/index.ts b/clients/client-appintegrations/src/index.ts index 96603420f8cd8..72324bf1721b5 100644 --- a/clients/client-appintegrations/src/index.ts +++ b/clients/client-appintegrations/src/index.ts @@ -1,12 +1,18 @@ export * from "./AppIntegrationsClient"; export * from "./AppIntegrations"; +export * from "./commands/CreateDataIntegrationCommand"; export * from "./commands/CreateEventIntegrationCommand"; +export * from "./commands/DeleteDataIntegrationCommand"; export * from "./commands/DeleteEventIntegrationCommand"; +export * from "./commands/GetDataIntegrationCommand"; export * from "./commands/GetEventIntegrationCommand"; +export * from "./commands/ListDataIntegrationAssociationsCommand"; +export * from "./commands/ListDataIntegrationsCommand"; export * from "./commands/ListEventIntegrationAssociationsCommand"; export * from "./commands/ListEventIntegrationsCommand"; export * from "./commands/ListTagsForResourceCommand"; export * from "./commands/TagResourceCommand"; export * from "./commands/UntagResourceCommand"; +export * from "./commands/UpdateDataIntegrationCommand"; export * from "./commands/UpdateEventIntegrationCommand"; export * from "./models/index"; diff --git a/clients/client-appintegrations/src/models/models_0.ts b/clients/client-appintegrations/src/models/models_0.ts index 1150587c6c7ba..ffb892332a8c5 100644 --- a/clients/client-appintegrations/src/models/models_0.ts +++ b/clients/client-appintegrations/src/models/models_0.ts @@ -19,78 +19,134 @@ export namespace AccessDeniedException { } /** - *

The event filter.

+ *

The name of the data and how often it should be pulled from the source.

*/ -export interface EventFilter { +export interface ScheduleConfiguration { /** - *

The source of the events.

+ *

The start date for objects to import in the first flow run.

*/ - Source: string | undefined; + FirstExecutionFrom?: string; + + /** + *

The name of the object to pull from the data source.

+ */ + Object?: string; + + /** + *

How often the data should be pulled from data source.

+ */ + ScheduleExpression?: string; } -export namespace EventFilter { +export namespace ScheduleConfiguration { /** * @internal */ - export const filterSensitiveLog = (obj: EventFilter): any => ({ + export const filterSensitiveLog = (obj: ScheduleConfiguration): any => ({ ...obj, }); } -export interface CreateEventIntegrationRequest { +export interface CreateDataIntegrationRequest { /** - *

The name of the event integration.

+ *

The name of the DataIntegration.

*/ Name: string | undefined; /** - *

The description of the event integration.

+ *

A description of the DataIntegration.

*/ Description?: string; /** - *

The event filter.

+ *

The KMS key for the DataIntegration.

*/ - EventFilter: EventFilter | undefined; + KmsKey?: string; /** - *

The EventBridge bus.

+ *

The URI of the data source.

*/ - EventBridgeBus: string | undefined; + SourceURI?: string; /** - *

A unique, case-sensitive identifier that you provide to ensure the idempotency of the - * request.

+ *

The name of the data and how often it should be pulled from the source.

*/ - ClientToken?: string; + ScheduleConfig?: ScheduleConfiguration; /** *

One or more tags.

*/ Tags?: { [key: string]: string }; + + /** + *

A unique, case-sensitive identifier that you provide to ensure the idempotency of the + * request.

+ */ + ClientToken?: string; } -export namespace CreateEventIntegrationRequest { +export namespace CreateDataIntegrationRequest { /** * @internal */ - export const filterSensitiveLog = (obj: CreateEventIntegrationRequest): any => ({ + export const filterSensitiveLog = (obj: CreateDataIntegrationRequest): any => ({ ...obj, }); } -export interface CreateEventIntegrationResponse { +export interface CreateDataIntegrationResponse { /** - *

The Amazon Resource Name (ARN) of the event integration.

+ *

The Amazon Resource Name (ARN)

*/ - EventIntegrationArn?: string; + Arn?: string; + + /** + *

A unique identifier.

+ */ + Id?: string; + + /** + *

The name of the DataIntegration.

+ */ + Name?: string; + + /** + *

A description of the DataIntegration.

+ */ + Description?: string; + + /** + *

The KMS key for the DataIntegration.

+ */ + KmsKey?: string; + + /** + *

The URI of the data source.

+ */ + SourceURI?: string; + + /** + *

The name of the data and how often it should be pulled from the source.

+ */ + ScheduleConfiguration?: ScheduleConfiguration; + + /** + *

One or more tags.

+ */ + Tags?: { [key: string]: string }; + + /** + *

A unique, case-sensitive identifier that you provide to ensure the idempotency of the + * request.

+ */ + ClientToken?: string; } -export namespace CreateEventIntegrationResponse { +export namespace CreateDataIntegrationResponse { /** * @internal */ - export const filterSensitiveLog = (obj: CreateEventIntegrationResponse): any => ({ + export const filterSensitiveLog = (obj: CreateDataIntegrationResponse): any => ({ ...obj, }); } @@ -132,7 +188,7 @@ export namespace InternalServiceError { } /** - *

The request is not valid.

+ *

The request is not valid.

*/ export interface InvalidRequestException extends __SmithyException, $MetadataBearer { name: "InvalidRequestException"; @@ -185,29 +241,106 @@ export namespace ThrottlingException { }); } -export interface DeleteEventIntegrationRequest { +/** + *

The event filter.

+ */ +export interface EventFilter { + /** + *

The source of the events.

+ */ + Source: string | undefined; +} + +export namespace EventFilter { + /** + * @internal + */ + export const filterSensitiveLog = (obj: EventFilter): any => ({ + ...obj, + }); +} + +export interface CreateEventIntegrationRequest { /** *

The name of the event integration.

*/ Name: string | undefined; + + /** + *

The description of the event integration.

+ */ + Description?: string; + + /** + *

The event filter.

+ */ + EventFilter: EventFilter | undefined; + + /** + *

The EventBridge bus.

+ */ + EventBridgeBus: string | undefined; + + /** + *

A unique, case-sensitive identifier that you provide to ensure the idempotency of the + * request.

+ */ + ClientToken?: string; + + /** + *

One or more tags.

+ */ + Tags?: { [key: string]: string }; } -export namespace DeleteEventIntegrationRequest { +export namespace CreateEventIntegrationRequest { /** * @internal */ - export const filterSensitiveLog = (obj: DeleteEventIntegrationRequest): any => ({ + export const filterSensitiveLog = (obj: CreateEventIntegrationRequest): any => ({ ...obj, }); } -export interface DeleteEventIntegrationResponse {} +export interface CreateEventIntegrationResponse { + /** + *

The Amazon Resource Name (ARN) of the event integration.

+ */ + EventIntegrationArn?: string; +} -export namespace DeleteEventIntegrationResponse { +export namespace CreateEventIntegrationResponse { /** * @internal */ - export const filterSensitiveLog = (obj: DeleteEventIntegrationResponse): any => ({ + export const filterSensitiveLog = (obj: CreateEventIntegrationResponse): any => ({ + ...obj, + }); +} + +export interface DeleteDataIntegrationRequest { + /** + *

A unique identifier for the DataIntegration.

+ */ + DataIntegrationIdentifier: string | undefined; +} + +export namespace DeleteDataIntegrationRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DeleteDataIntegrationRequest): any => ({ + ...obj, + }); +} + +export interface DeleteDataIntegrationResponse {} + +export namespace DeleteDataIntegrationResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DeleteDataIntegrationResponse): any => ({ ...obj, }); } @@ -230,6 +363,100 @@ export namespace ResourceNotFoundException { }); } +export interface DeleteEventIntegrationRequest { + /** + *

The name of the event integration.

+ */ + Name: string | undefined; +} + +export namespace DeleteEventIntegrationRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DeleteEventIntegrationRequest): any => ({ + ...obj, + }); +} + +export interface DeleteEventIntegrationResponse {} + +export namespace DeleteEventIntegrationResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DeleteEventIntegrationResponse): any => ({ + ...obj, + }); +} + +export interface GetDataIntegrationRequest { + /** + *

A unique identifier.

+ */ + Identifier: string | undefined; +} + +export namespace GetDataIntegrationRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetDataIntegrationRequest): any => ({ + ...obj, + }); +} + +export interface GetDataIntegrationResponse { + /** + *

The Amazon Resource Name (ARN) for the DataIntegration.

+ */ + Arn?: string; + + /** + *

A unique identifier.

+ */ + Id?: string; + + /** + *

The name of the DataIntegration.

+ */ + Name?: string; + + /** + *

The KMS key for the DataIntegration.

+ */ + Description?: string; + + /** + *

The KMS key for the DataIntegration.

+ */ + KmsKey?: string; + + /** + *

The URI of the data source.

+ */ + SourceURI?: string; + + /** + *

The name of the data and how often it should be pulled from the source.

+ */ + ScheduleConfiguration?: ScheduleConfiguration; + + /** + *

One or more tags.

+ */ + Tags?: { [key: string]: string }; +} + +export namespace GetDataIntegrationResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetDataIntegrationResponse): any => ({ + ...obj, + }); +} + export interface GetEventIntegrationRequest { /** *

The name of the event integration.

@@ -287,6 +514,156 @@ export namespace GetEventIntegrationResponse { }); } +export interface ListDataIntegrationAssociationsRequest { + /** + *

A unique identifier for the DataIntegration.

+ */ + DataIntegrationIdentifier: string | undefined; + + /** + *

The token for the next set of results. Use the value returned in the previous + * response in the next request to retrieve the next set of results.

+ */ + NextToken?: string; + + /** + *

The maximum number of results to return per page.

+ */ + MaxResults?: number; +} + +export namespace ListDataIntegrationAssociationsRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ListDataIntegrationAssociationsRequest): any => ({ + ...obj, + }); +} + +/** + *

Summary information about the DataIntegration association.

+ */ +export interface DataIntegrationAssociationSummary { + /** + *

The Amazon Resource Name (ARN) of the DataIntegration association.

+ */ + DataIntegrationAssociationArn?: string; + + /** + *

The Amazon Resource Name (ARN)of the DataIntegration.

+ */ + DataIntegrationArn?: string; + + /** + *

The identifier for teh client that is associated with the DataIntegration + * association.

+ */ + ClientId?: string; +} + +export namespace DataIntegrationAssociationSummary { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DataIntegrationAssociationSummary): any => ({ + ...obj, + }); +} + +export interface ListDataIntegrationAssociationsResponse { + /** + *

The Amazon Resource Name (ARN) and unique ID of the DataIntegration association.

+ */ + DataIntegrationAssociations?: DataIntegrationAssociationSummary[]; + + /** + *

If there are additional results, this is the token for the next set of results.

+ */ + NextToken?: string; +} + +export namespace ListDataIntegrationAssociationsResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ListDataIntegrationAssociationsResponse): any => ({ + ...obj, + }); +} + +export interface ListDataIntegrationsRequest { + /** + *

The token for the next set of results. Use the value returned in the previous + * response in the next request to retrieve the next set of results.

+ */ + NextToken?: string; + + /** + *

The maximum number of results to return per page.

+ */ + MaxResults?: number; +} + +export namespace ListDataIntegrationsRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ListDataIntegrationsRequest): any => ({ + ...obj, + }); +} + +/** + *

Summary information about the DataIntegration.

+ */ +export interface DataIntegrationSummary { + /** + *

The Amazon Resource Name (ARN) of the DataIntegration.

+ */ + Arn?: string; + + /** + *

The name of the DataIntegration.

+ */ + Name?: string; + + /** + *

The URI of the data source.

+ */ + SourceURI?: string; +} + +export namespace DataIntegrationSummary { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DataIntegrationSummary): any => ({ + ...obj, + }); +} + +export interface ListDataIntegrationsResponse { + /** + *

The DataIntegrations associated with this account.

+ */ + DataIntegrations?: DataIntegrationSummary[]; + + /** + *

If there are additional results, this is the token for the next set of results.

+ */ + NextToken?: string; +} + +export namespace ListDataIntegrationsResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ListDataIntegrationsResponse): any => ({ + ...obj, + }); +} + export interface ListEventIntegrationAssociationsRequest { /** *

The name of the event integration.

@@ -562,6 +939,43 @@ export namespace UntagResourceResponse { }); } +export interface UpdateDataIntegrationRequest { + /** + *

A unique identifier for the DataIntegration.

+ */ + Identifier: string | undefined; + + /** + *

The name of the DataIntegration.

+ */ + Name?: string; + + /** + *

A description of the DataIntegration.

+ */ + Description?: string; +} + +export namespace UpdateDataIntegrationRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UpdateDataIntegrationRequest): any => ({ + ...obj, + }); +} + +export interface UpdateDataIntegrationResponse {} + +export namespace UpdateDataIntegrationResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UpdateDataIntegrationResponse): any => ({ + ...obj, + }); +} + export interface UpdateEventIntegrationRequest { /** *

The name of the event integration.

diff --git a/clients/client-appintegrations/src/protocols/Aws_restJson1.ts b/clients/client-appintegrations/src/protocols/Aws_restJson1.ts index b2143f6980d3d..bde59ebb7cc0b 100644 --- a/clients/client-appintegrations/src/protocols/Aws_restJson1.ts +++ b/clients/client-appintegrations/src/protocols/Aws_restJson1.ts @@ -14,18 +14,35 @@ import { } from "@aws-sdk/types"; import { v4 as generateIdempotencyToken } from "uuid"; +import { + CreateDataIntegrationCommandInput, + CreateDataIntegrationCommandOutput, +} from "../commands/CreateDataIntegrationCommand"; import { CreateEventIntegrationCommandInput, CreateEventIntegrationCommandOutput, } from "../commands/CreateEventIntegrationCommand"; +import { + DeleteDataIntegrationCommandInput, + DeleteDataIntegrationCommandOutput, +} from "../commands/DeleteDataIntegrationCommand"; import { DeleteEventIntegrationCommandInput, DeleteEventIntegrationCommandOutput, } from "../commands/DeleteEventIntegrationCommand"; +import { GetDataIntegrationCommandInput, GetDataIntegrationCommandOutput } from "../commands/GetDataIntegrationCommand"; import { GetEventIntegrationCommandInput, GetEventIntegrationCommandOutput, } from "../commands/GetEventIntegrationCommand"; +import { + ListDataIntegrationAssociationsCommandInput, + ListDataIntegrationAssociationsCommandOutput, +} from "../commands/ListDataIntegrationAssociationsCommand"; +import { + ListDataIntegrationsCommandInput, + ListDataIntegrationsCommandOutput, +} from "../commands/ListDataIntegrationsCommand"; import { ListEventIntegrationAssociationsCommandInput, ListEventIntegrationAssociationsCommandOutput, @@ -40,12 +57,18 @@ import { } from "../commands/ListTagsForResourceCommand"; import { TagResourceCommandInput, TagResourceCommandOutput } from "../commands/TagResourceCommand"; import { UntagResourceCommandInput, UntagResourceCommandOutput } from "../commands/UntagResourceCommand"; +import { + UpdateDataIntegrationCommandInput, + UpdateDataIntegrationCommandOutput, +} from "../commands/UpdateDataIntegrationCommand"; import { UpdateEventIntegrationCommandInput, UpdateEventIntegrationCommandOutput, } from "../commands/UpdateEventIntegrationCommand"; import { AccessDeniedException, + DataIntegrationAssociationSummary, + DataIntegrationSummary, DuplicateResourceException, EventFilter, EventIntegration, @@ -54,9 +77,43 @@ import { InvalidRequestException, ResourceNotFoundException, ResourceQuotaExceededException, + ScheduleConfiguration, ThrottlingException, } from "../models/models_0"; +export const serializeAws_restJson1CreateDataIntegrationCommand = async ( + input: CreateDataIntegrationCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/dataIntegrations"; + let body: any; + body = JSON.stringify({ + ClientToken: input.ClientToken ?? generateIdempotencyToken(), + ...(input.Description !== undefined && input.Description !== null && { Description: input.Description }), + ...(input.KmsKey !== undefined && input.KmsKey !== null && { KmsKey: input.KmsKey }), + ...(input.Name !== undefined && input.Name !== null && { Name: input.Name }), + ...(input.ScheduleConfig !== undefined && + input.ScheduleConfig !== null && { + ScheduleConfig: serializeAws_restJson1ScheduleConfiguration(input.ScheduleConfig, context), + }), + ...(input.SourceURI !== undefined && input.SourceURI !== null && { SourceURI: input.SourceURI }), + ...(input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + export const serializeAws_restJson1CreateEventIntegrationCommand = async ( input: CreateEventIntegrationCommandInput, context: __SerdeContext @@ -88,6 +145,36 @@ export const serializeAws_restJson1CreateEventIntegrationCommand = async ( }); }; +export const serializeAws_restJson1DeleteDataIntegrationCommand = async ( + input: DeleteDataIntegrationCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/dataIntegrations/{DataIntegrationIdentifier}"; + if (input.DataIntegrationIdentifier !== undefined) { + const labelValue: string = input.DataIntegrationIdentifier; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: DataIntegrationIdentifier."); + } + resolvedPath = resolvedPath.replace("{DataIntegrationIdentifier}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: DataIntegrationIdentifier."); + } + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "DELETE", + headers, + path: resolvedPath, + body, + }); +}; + export const serializeAws_restJson1DeleteEventIntegrationCommand = async ( input: DeleteEventIntegrationCommandInput, context: __SerdeContext @@ -117,6 +204,35 @@ export const serializeAws_restJson1DeleteEventIntegrationCommand = async ( }); }; +export const serializeAws_restJson1GetDataIntegrationCommand = async ( + input: GetDataIntegrationCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/dataIntegrations/{Identifier}"; + if (input.Identifier !== undefined) { + const labelValue: string = input.Identifier; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: Identifier."); + } + resolvedPath = resolvedPath.replace("{Identifier}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: Identifier."); + } + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; + export const serializeAws_restJson1GetEventIntegrationCommand = async ( input: GetEventIntegrationCommandInput, context: __SerdeContext @@ -146,6 +262,65 @@ export const serializeAws_restJson1GetEventIntegrationCommand = async ( }); }; +export const serializeAws_restJson1ListDataIntegrationAssociationsCommand = async ( + input: ListDataIntegrationAssociationsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/dataIntegrations/{DataIntegrationIdentifier}/associations"; + if (input.DataIntegrationIdentifier !== undefined) { + const labelValue: string = input.DataIntegrationIdentifier; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: DataIntegrationIdentifier."); + } + resolvedPath = resolvedPath.replace("{DataIntegrationIdentifier}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: DataIntegrationIdentifier."); + } + const query: any = { + ...(input.NextToken !== undefined && { nextToken: input.NextToken }), + ...(input.MaxResults !== undefined && { maxResults: input.MaxResults.toString() }), + }; + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; + +export const serializeAws_restJson1ListDataIntegrationsCommand = async ( + input: ListDataIntegrationsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/dataIntegrations"; + const query: any = { + ...(input.NextToken !== undefined && { nextToken: input.NextToken }), + ...(input.MaxResults !== undefined && { maxResults: input.MaxResults.toString() }), + }; + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; + export const serializeAws_restJson1ListEventIntegrationAssociationsCommand = async ( input: ListEventIntegrationAssociationsCommandInput, context: __SerdeContext @@ -298,6 +473,41 @@ export const serializeAws_restJson1UntagResourceCommand = async ( }); }; +export const serializeAws_restJson1UpdateDataIntegrationCommand = async ( + input: UpdateDataIntegrationCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/dataIntegrations/{Identifier}"; + if (input.Identifier !== undefined) { + const labelValue: string = input.Identifier; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: Identifier."); + } + resolvedPath = resolvedPath.replace("{Identifier}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: Identifier."); + } + let body: any; + body = JSON.stringify({ + ...(input.Description !== undefined && input.Description !== null && { Description: input.Description }), + ...(input.Name !== undefined && input.Name !== null && { Name: input.Name }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "PATCH", + headers, + path: resolvedPath, + body, + }); +}; + export const serializeAws_restJson1UpdateEventIntegrationCommand = async ( input: UpdateEventIntegrationCommandInput, context: __SerdeContext @@ -317,43 +527,566 @@ export const serializeAws_restJson1UpdateEventIntegrationCommand = async ( } else { throw new Error("No value provided for input HTTP label: Name."); } - let body: any; - body = JSON.stringify({ - ...(input.Description !== undefined && input.Description !== null && { Description: input.Description }), - }); - return new __HttpRequest({ - protocol, - hostname, - port, - method: "PATCH", - headers, - path: resolvedPath, - body, - }); + let body: any; + body = JSON.stringify({ + ...(input.Description !== undefined && input.Description !== null && { Description: input.Description }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "PATCH", + headers, + path: resolvedPath, + body, + }); +}; + +export const deserializeAws_restJson1CreateDataIntegrationCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1CreateDataIntegrationCommandError(output, context); + } + const contents: CreateDataIntegrationCommandOutput = { + $metadata: deserializeMetadata(output), + Arn: undefined, + ClientToken: undefined, + Description: undefined, + Id: undefined, + KmsKey: undefined, + Name: undefined, + ScheduleConfiguration: undefined, + SourceURI: undefined, + Tags: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.Arn !== undefined && data.Arn !== null) { + contents.Arn = __expectString(data.Arn); + } + if (data.ClientToken !== undefined && data.ClientToken !== null) { + contents.ClientToken = __expectString(data.ClientToken); + } + if (data.Description !== undefined && data.Description !== null) { + contents.Description = __expectString(data.Description); + } + if (data.Id !== undefined && data.Id !== null) { + contents.Id = __expectString(data.Id); + } + if (data.KmsKey !== undefined && data.KmsKey !== null) { + contents.KmsKey = __expectString(data.KmsKey); + } + if (data.Name !== undefined && data.Name !== null) { + contents.Name = __expectString(data.Name); + } + if (data.ScheduleConfiguration !== undefined && data.ScheduleConfiguration !== null) { + contents.ScheduleConfiguration = deserializeAws_restJson1ScheduleConfiguration(data.ScheduleConfiguration, context); + } + if (data.SourceURI !== undefined && data.SourceURI !== null) { + contents.SourceURI = __expectString(data.SourceURI); + } + if (data.Tags !== undefined && data.Tags !== null) { + contents.Tags = deserializeAws_restJson1TagMap(data.Tags, context); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1CreateDataIntegrationCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.appintegrations#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "DuplicateResourceException": + case "com.amazonaws.appintegrations#DuplicateResourceException": + response = { + ...(await deserializeAws_restJson1DuplicateResourceExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServiceError": + case "com.amazonaws.appintegrations#InternalServiceError": + response = { + ...(await deserializeAws_restJson1InternalServiceErrorResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.appintegrations#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceQuotaExceededException": + case "com.amazonaws.appintegrations#ResourceQuotaExceededException": + response = { + ...(await deserializeAws_restJson1ResourceQuotaExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.appintegrations#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1CreateEventIntegrationCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1CreateEventIntegrationCommandError(output, context); + } + const contents: CreateEventIntegrationCommandOutput = { + $metadata: deserializeMetadata(output), + EventIntegrationArn: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.EventIntegrationArn !== undefined && data.EventIntegrationArn !== null) { + contents.EventIntegrationArn = __expectString(data.EventIntegrationArn); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1CreateEventIntegrationCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.appintegrations#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "DuplicateResourceException": + case "com.amazonaws.appintegrations#DuplicateResourceException": + response = { + ...(await deserializeAws_restJson1DuplicateResourceExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServiceError": + case "com.amazonaws.appintegrations#InternalServiceError": + response = { + ...(await deserializeAws_restJson1InternalServiceErrorResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.appintegrations#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceQuotaExceededException": + case "com.amazonaws.appintegrations#ResourceQuotaExceededException": + response = { + ...(await deserializeAws_restJson1ResourceQuotaExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.appintegrations#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1DeleteDataIntegrationCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1DeleteDataIntegrationCommandError(output, context); + } + const contents: DeleteDataIntegrationCommandOutput = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1DeleteDataIntegrationCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.appintegrations#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServiceError": + case "com.amazonaws.appintegrations#InternalServiceError": + response = { + ...(await deserializeAws_restJson1InternalServiceErrorResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.appintegrations#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.appintegrations#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.appintegrations#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1DeleteEventIntegrationCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1DeleteEventIntegrationCommandError(output, context); + } + const contents: DeleteEventIntegrationCommandOutput = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1DeleteEventIntegrationCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.appintegrations#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServiceError": + case "com.amazonaws.appintegrations#InternalServiceError": + response = { + ...(await deserializeAws_restJson1InternalServiceErrorResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.appintegrations#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.appintegrations#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.appintegrations#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1GetDataIntegrationCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1GetDataIntegrationCommandError(output, context); + } + const contents: GetDataIntegrationCommandOutput = { + $metadata: deserializeMetadata(output), + Arn: undefined, + Description: undefined, + Id: undefined, + KmsKey: undefined, + Name: undefined, + ScheduleConfiguration: undefined, + SourceURI: undefined, + Tags: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.Arn !== undefined && data.Arn !== null) { + contents.Arn = __expectString(data.Arn); + } + if (data.Description !== undefined && data.Description !== null) { + contents.Description = __expectString(data.Description); + } + if (data.Id !== undefined && data.Id !== null) { + contents.Id = __expectString(data.Id); + } + if (data.KmsKey !== undefined && data.KmsKey !== null) { + contents.KmsKey = __expectString(data.KmsKey); + } + if (data.Name !== undefined && data.Name !== null) { + contents.Name = __expectString(data.Name); + } + if (data.ScheduleConfiguration !== undefined && data.ScheduleConfiguration !== null) { + contents.ScheduleConfiguration = deserializeAws_restJson1ScheduleConfiguration(data.ScheduleConfiguration, context); + } + if (data.SourceURI !== undefined && data.SourceURI !== null) { + contents.SourceURI = __expectString(data.SourceURI); + } + if (data.Tags !== undefined && data.Tags !== null) { + contents.Tags = deserializeAws_restJson1TagMap(data.Tags, context); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1GetDataIntegrationCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.appintegrations#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServiceError": + case "com.amazonaws.appintegrations#InternalServiceError": + response = { + ...(await deserializeAws_restJson1InternalServiceErrorResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.appintegrations#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.appintegrations#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.appintegrations#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1CreateEventIntegrationCommand = async ( +export const deserializeAws_restJson1GetEventIntegrationCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restJson1CreateEventIntegrationCommandError(output, context); + return deserializeAws_restJson1GetEventIntegrationCommandError(output, context); } - const contents: CreateEventIntegrationCommandOutput = { + const contents: GetEventIntegrationCommandOutput = { $metadata: deserializeMetadata(output), + Description: undefined, + EventBridgeBus: undefined, + EventFilter: undefined, EventIntegrationArn: undefined, + Name: undefined, + Tags: undefined, }; const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.Description !== undefined && data.Description !== null) { + contents.Description = __expectString(data.Description); + } + if (data.EventBridgeBus !== undefined && data.EventBridgeBus !== null) { + contents.EventBridgeBus = __expectString(data.EventBridgeBus); + } + if (data.EventFilter !== undefined && data.EventFilter !== null) { + contents.EventFilter = deserializeAws_restJson1EventFilter(data.EventFilter, context); + } if (data.EventIntegrationArn !== undefined && data.EventIntegrationArn !== null) { contents.EventIntegrationArn = __expectString(data.EventIntegrationArn); } + if (data.Name !== undefined && data.Name !== null) { + contents.Name = __expectString(data.Name); + } + if (data.Tags !== undefined && data.Tags !== null) { + contents.Tags = deserializeAws_restJson1TagMap(data.Tags, context); + } return Promise.resolve(contents); }; -const deserializeAws_restJson1CreateEventIntegrationCommandError = async ( +const deserializeAws_restJson1GetEventIntegrationCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -370,14 +1103,6 @@ const deserializeAws_restJson1CreateEventIntegrationCommandError = async ( $metadata: deserializeMetadata(output), }; break; - case "DuplicateResourceException": - case "com.amazonaws.appintegrations#DuplicateResourceException": - response = { - ...(await deserializeAws_restJson1DuplicateResourceExceptionResponse(parsedOutput, context)), - name: errorCode, - $metadata: deserializeMetadata(output), - }; - break; case "InternalServiceError": case "com.amazonaws.appintegrations#InternalServiceError": response = { @@ -394,10 +1119,10 @@ const deserializeAws_restJson1CreateEventIntegrationCommandError = async ( $metadata: deserializeMetadata(output), }; break; - case "ResourceQuotaExceededException": - case "com.amazonaws.appintegrations#ResourceQuotaExceededException": + case "ResourceNotFoundException": + case "com.amazonaws.appintegrations#ResourceNotFoundException": response = { - ...(await deserializeAws_restJson1ResourceQuotaExceededExceptionResponse(parsedOutput, context)), + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), name: errorCode, $metadata: deserializeMetadata(output), }; @@ -427,24 +1152,35 @@ const deserializeAws_restJson1CreateEventIntegrationCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1DeleteEventIntegrationCommand = async ( +export const deserializeAws_restJson1ListDataIntegrationAssociationsCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restJson1DeleteEventIntegrationCommandError(output, context); + return deserializeAws_restJson1ListDataIntegrationAssociationsCommandError(output, context); } - const contents: DeleteEventIntegrationCommandOutput = { + const contents: ListDataIntegrationAssociationsCommandOutput = { $metadata: deserializeMetadata(output), + DataIntegrationAssociations: undefined, + NextToken: undefined, }; - await collectBody(output.body, context); + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.DataIntegrationAssociations !== undefined && data.DataIntegrationAssociations !== null) { + contents.DataIntegrationAssociations = deserializeAws_restJson1DataIntegrationAssociationsList( + data.DataIntegrationAssociations, + context + ); + } + if (data.NextToken !== undefined && data.NextToken !== null) { + contents.NextToken = __expectString(data.NextToken); + } return Promise.resolve(contents); }; -const deserializeAws_restJson1DeleteEventIntegrationCommandError = async ( +const deserializeAws_restJson1ListDataIntegrationAssociationsCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -510,48 +1246,32 @@ const deserializeAws_restJson1DeleteEventIntegrationCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1GetEventIntegrationCommand = async ( +export const deserializeAws_restJson1ListDataIntegrationsCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restJson1GetEventIntegrationCommandError(output, context); + return deserializeAws_restJson1ListDataIntegrationsCommandError(output, context); } - const contents: GetEventIntegrationCommandOutput = { + const contents: ListDataIntegrationsCommandOutput = { $metadata: deserializeMetadata(output), - Description: undefined, - EventBridgeBus: undefined, - EventFilter: undefined, - EventIntegrationArn: undefined, - Name: undefined, - Tags: undefined, + DataIntegrations: undefined, + NextToken: undefined, }; const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Description !== undefined && data.Description !== null) { - contents.Description = __expectString(data.Description); - } - if (data.EventBridgeBus !== undefined && data.EventBridgeBus !== null) { - contents.EventBridgeBus = __expectString(data.EventBridgeBus); + if (data.DataIntegrations !== undefined && data.DataIntegrations !== null) { + contents.DataIntegrations = deserializeAws_restJson1DataIntegrationsList(data.DataIntegrations, context); } - if (data.EventFilter !== undefined && data.EventFilter !== null) { - contents.EventFilter = deserializeAws_restJson1EventFilter(data.EventFilter, context); - } - if (data.EventIntegrationArn !== undefined && data.EventIntegrationArn !== null) { - contents.EventIntegrationArn = __expectString(data.EventIntegrationArn); - } - if (data.Name !== undefined && data.Name !== null) { - contents.Name = __expectString(data.Name); - } - if (data.Tags !== undefined && data.Tags !== null) { - contents.Tags = deserializeAws_restJson1TagMap(data.Tags, context); + if (data.NextToken !== undefined && data.NextToken !== null) { + contents.NextToken = __expectString(data.NextToken); } return Promise.resolve(contents); }; -const deserializeAws_restJson1GetEventIntegrationCommandError = async ( +const deserializeAws_restJson1ListDataIntegrationsCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -584,14 +1304,6 @@ const deserializeAws_restJson1GetEventIntegrationCommandError = async ( $metadata: deserializeMetadata(output), }; break; - case "ResourceNotFoundException": - case "com.amazonaws.appintegrations#ResourceNotFoundException": - response = { - ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), - name: errorCode, - $metadata: deserializeMetadata(output), - }; - break; case "ThrottlingException": case "com.amazonaws.appintegrations#ThrottlingException": response = { @@ -1023,6 +1735,89 @@ const deserializeAws_restJson1UntagResourceCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; +export const deserializeAws_restJson1UpdateDataIntegrationCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1UpdateDataIntegrationCommandError(output, context); + } + const contents: UpdateDataIntegrationCommandOutput = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1UpdateDataIntegrationCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.appintegrations#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServiceError": + case "com.amazonaws.appintegrations#InternalServiceError": + response = { + ...(await deserializeAws_restJson1InternalServiceErrorResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.appintegrations#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.appintegrations#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.appintegrations#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + export const deserializeAws_restJson1UpdateEventIntegrationCommand = async ( output: __HttpResponse, context: __SerdeContext @@ -1231,6 +2026,16 @@ const serializeAws_restJson1EventFilter = (input: EventFilter, context: __SerdeC }; }; +const serializeAws_restJson1ScheduleConfiguration = (input: ScheduleConfiguration, context: __SerdeContext): any => { + return { + ...(input.FirstExecutionFrom !== undefined && + input.FirstExecutionFrom !== null && { FirstExecutionFrom: input.FirstExecutionFrom }), + ...(input.Object !== undefined && input.Object !== null && { Object: input.Object }), + ...(input.ScheduleExpression !== undefined && + input.ScheduleExpression !== null && { ScheduleExpression: input.ScheduleExpression }), + }; +}; + const serializeAws_restJson1TagMap = (input: { [key: string]: string }, context: __SerdeContext): any => { return Object.entries(input).reduce((acc: { [key: string]: any }, [key, value]: [string, any]) => { if (value === null) { @@ -1258,6 +2063,56 @@ const deserializeAws_restJson1ClientAssociationMetadata = ( }, {}); }; +const deserializeAws_restJson1DataIntegrationAssociationsList = ( + output: any, + context: __SerdeContext +): DataIntegrationAssociationSummary[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return deserializeAws_restJson1DataIntegrationAssociationSummary(entry, context); + }); +}; + +const deserializeAws_restJson1DataIntegrationAssociationSummary = ( + output: any, + context: __SerdeContext +): DataIntegrationAssociationSummary => { + return { + ClientId: __expectString(output.ClientId), + DataIntegrationArn: __expectString(output.DataIntegrationArn), + DataIntegrationAssociationArn: __expectString(output.DataIntegrationAssociationArn), + } as any; +}; + +const deserializeAws_restJson1DataIntegrationsList = ( + output: any, + context: __SerdeContext +): DataIntegrationSummary[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return deserializeAws_restJson1DataIntegrationSummary(entry, context); + }); +}; + +const deserializeAws_restJson1DataIntegrationSummary = ( + output: any, + context: __SerdeContext +): DataIntegrationSummary => { + return { + Arn: __expectString(output.Arn), + Name: __expectString(output.Name), + SourceURI: __expectString(output.SourceURI), + } as any; +}; + const deserializeAws_restJson1EventFilter = (output: any, context: __SerdeContext): EventFilter => { return { Source: __expectString(output.Source), @@ -1323,6 +2178,14 @@ const deserializeAws_restJson1EventIntegrationsList = (output: any, context: __S }); }; +const deserializeAws_restJson1ScheduleConfiguration = (output: any, context: __SerdeContext): ScheduleConfiguration => { + return { + FirstExecutionFrom: __expectString(output.FirstExecutionFrom), + Object: __expectString(output.Object), + ScheduleExpression: __expectString(output.ScheduleExpression), + } as any; +}; + const deserializeAws_restJson1TagMap = (output: any, context: __SerdeContext): { [key: string]: string } => { return Object.entries(output).reduce((acc: { [key: string]: string }, [key, value]: [string, any]) => { if (value === null) { diff --git a/clients/client-apprunner/README.md b/clients/client-apprunner/README.md index 37f0614c62ed5..e2de79eaf7d87 100644 --- a/clients/client-apprunner/README.md +++ b/clients/client-apprunner/README.md @@ -7,15 +7,15 @@ AWS SDK for JavaScript AppRunner Client for Node.js, Browser and React Native. -AWS App Runner +App Runner -

AWS App Runner is an application service that provides a fast, simple, and cost-effective way to go directly from an existing container image or source code -to a running service in the AWS cloud in seconds. You don't need to learn new technologies, decide which compute service to use, or understand how to -provision and configure AWS resources.

+

App Runner is an application service that provides a fast, simple, and cost-effective way to go directly from an existing container image or source code +to a running service in the Amazon Web Services Cloud in seconds. You don't need to learn new technologies, decide which compute service to use, or understand how to +provision and configure Amazon Web Services resources.

App Runner connects directly to your container registry or source code repository. It provides an automatic delivery pipeline with fully managed operations, high performance, scalability, and security.

-

For more information about App Runner, see the AWS App Runner Developer Guide. -For release information, see the AWS App Runner Release Notes.

+

For more information about App Runner, see the App Runner Developer Guide. +For release information, see the App Runner Release Notes.

To install the Software Development Kits (SDKs), Integrated Development Environment (IDE) Toolkits, and command line tools that you can use to access the API, see Tools for @@ -23,8 +23,8 @@ Amazon Web Services.

Endpoints

-

For a list of Region-specific endpoints that App Runner supports, see AWS App Runner -endpoints and quotas in the AWS General Reference.

+

For a list of Region-specific endpoints that App Runner supports, see App Runner +endpoints and quotas in the Amazon Web Services General Reference.

## Installing diff --git a/clients/client-apprunner/src/AppRunner.ts b/clients/client-apprunner/src/AppRunner.ts index 85db65e64478e..89ba88e1d32de 100644 --- a/clients/client-apprunner/src/AppRunner.ts +++ b/clients/client-apprunner/src/AppRunner.ts @@ -109,17 +109,17 @@ import { } from "./commands/UpdateServiceCommand"; /** - * AWS App Runner + * App Runner * * * - *

AWS App Runner is an application service that provides a fast, simple, and cost-effective way to go directly from an existing container image or source code - * to a running service in the AWS cloud in seconds. You don't need to learn new technologies, decide which compute service to use, or understand how to - * provision and configure AWS resources.

+ *

App Runner is an application service that provides a fast, simple, and cost-effective way to go directly from an existing container image or source code + * to a running service in the Amazon Web Services Cloud in seconds. You don't need to learn new technologies, decide which compute service to use, or understand how to + * provision and configure Amazon Web Services resources.

*

App Runner connects directly to your container registry or source code repository. It provides an automatic delivery pipeline with fully managed operations, * high performance, scalability, and security.

- *

For more information about App Runner, see the AWS App Runner Developer Guide. - * For release information, see the AWS App Runner Release Notes.

+ *

For more information about App Runner, see the App Runner Developer Guide. + * For release information, see the App Runner Release Notes.

*

* To install the Software Development Kits (SDKs), Integrated * Development Environment (IDE) Toolkits, and command line tools that you can use to access the API, see Tools for @@ -127,12 +127,12 @@ import { *

* Endpoints *

- *

For a list of Region-specific endpoints that App Runner supports, see AWS App Runner - * endpoints and quotas in the AWS General Reference.

+ *

For a list of Region-specific endpoints that App Runner supports, see App Runner + * endpoints and quotas in the Amazon Web Services General Reference.

*/ export class AppRunner extends AppRunnerClient { /** - *

Associate your own domain name with the AWS App Runner subdomain URL of your App Runner service.

+ *

Associate your own domain name with the App Runner subdomain URL of your App Runner service.

*

After you call AssociateCustomDomain and receive a successful response, use the information in the CustomDomain record * that's returned to add CNAME records to your Domain Name System (DNS). For each mapped domain name, add a mapping to the target App Runner subdomain and one or * more certificate validation records. App Runner then performs DNS validation to verify that you own or control the domain name that you associated. App Runner tracks @@ -168,13 +168,13 @@ export class AppRunner extends AppRunnerClient { } /** - *

Create an AWS App Runner automatic scaling configuration resource. App Runner requires this resource + *

Create an App Runner automatic scaling configuration resource. App Runner requires this resource * when you create App Runner services that require non-default auto scaling settings. You can share an * auto scaling configuration across multiple services.

*

Create multiple revisions of a configuration by using the same AutoScalingConfigurationName and different * AutoScalingConfigurationRevision values. When you create a service, you can set it to use the latest active revision of an auto scaling * configuration or a specific revision.

- *

Configure a higher MinSize to increase the spread of your App Runner service over more Availability Zones in the AWS Region. The tradeoff is + *

Configure a higher MinSize to increase the spread of your App Runner service over more Availability Zones in the Amazon Web Services Region. The tradeoff is * a higher minimal cost.

*

Configure a lower MaxSize to control your cost. The tradeoff is lower responsiveness during peak demand.

*/ @@ -208,7 +208,7 @@ export class AppRunner extends AppRunnerClient { } /** - *

Create an AWS App Runner connection resource. App Runner requires a connection resource when you create App Runner services that access private repositories from + *

Create an App Runner connection resource. App Runner requires a connection resource when you create App Runner services that access private repositories from * certain third-party providers. You can share a connection across multiple services.

*

A connection resource is needed to access GitHub repositories. GitHub requires a user interface approval process through the App Runner console before you * can use the connection.

@@ -243,7 +243,7 @@ export class AppRunner extends AppRunnerClient { } /** - *

Create an AWS App Runner service. After the service is created, the action also automatically starts a deployment.

+ *

Create an App Runner service. After the service is created, the action also automatically starts a deployment.

*

This is an asynchronous operation. On a successful call, you can use the returned OperationId and the ListOperations call to track the operation's progress.

*/ public createService( @@ -276,7 +276,7 @@ export class AppRunner extends AppRunnerClient { } /** - *

Delete an AWS App Runner automatic scaling configuration resource. You can delete a specific revision or the latest active revision. You can't delete a + *

Delete an App Runner automatic scaling configuration resource. You can delete a specific revision or the latest active revision. You can't delete a * configuration that's used by one or more App Runner services.

*/ public deleteAutoScalingConfiguration( @@ -309,7 +309,7 @@ export class AppRunner extends AppRunnerClient { } /** - *

Delete an AWS App Runner connection. You must first ensure that there are no running App Runner services that use this connection. If there are any, the + *

Delete an App Runner connection. You must first ensure that there are no running App Runner services that use this connection. If there are any, the * DeleteConnection action fails.

*/ public deleteConnection( @@ -342,7 +342,7 @@ export class AppRunner extends AppRunnerClient { } /** - *

Delete an AWS App Runner service.

+ *

Delete an App Runner service.

*

This is an asynchronous operation. On a successful call, you can use the returned OperationId and the ListOperations * call to track the operation's progress.

*/ @@ -376,7 +376,7 @@ export class AppRunner extends AppRunnerClient { } /** - *

Return a full description of an AWS App Runner automatic scaling configuration resource.

+ *

Return a full description of an App Runner automatic scaling configuration resource.

*/ public describeAutoScalingConfiguration( args: DescribeAutoScalingConfigurationCommandInput, @@ -408,7 +408,7 @@ export class AppRunner extends AppRunnerClient { } /** - *

Return a description of custom domain names that are associated with an AWS App Runner service.

+ *

Return a description of custom domain names that are associated with an App Runner service.

*/ public describeCustomDomains( args: DescribeCustomDomainsCommandInput, @@ -440,7 +440,7 @@ export class AppRunner extends AppRunnerClient { } /** - *

Return a full description of an AWS App Runner service.

+ *

Return a full description of an App Runner service.

*/ public describeService( args: DescribeServiceCommandInput, @@ -472,7 +472,7 @@ export class AppRunner extends AppRunnerClient { } /** - *

Disassociate a custom domain name from an AWS App Runner service.

+ *

Disassociate a custom domain name from an App Runner service.

*

Certificates tracking domain validity are associated with a custom domain and are stored in AWS * Certificate Manager (ACM). These certificates aren't deleted as part of this action. App Runner delays certificate deletion for * 30 days after a domain is disassociated from your service.

@@ -507,7 +507,7 @@ export class AppRunner extends AppRunnerClient { } /** - *

Returns a list of AWS App Runner automatic scaling configurations in your AWS account. You can query the revisions for a specific configuration name or + *

Returns a list of App Runner automatic scaling configurations in your Amazon Web Services account. You can query the revisions for a specific configuration name or * the revisions for all configurations in your account. You can optionally query only the latest revision of each requested name.

*/ public listAutoScalingConfigurations( @@ -540,7 +540,7 @@ export class AppRunner extends AppRunnerClient { } /** - *

Returns a list of AWS App Runner connections that are associated with your AWS account.

+ *

Returns a list of App Runner connections that are associated with your Amazon Web Services account.

*/ public listConnections( args: ListConnectionsCommandInput, @@ -572,7 +572,7 @@ export class AppRunner extends AppRunnerClient { } /** - *

Return a list of operations that occurred on an AWS App Runner service.

+ *

Return a list of operations that occurred on an App Runner service.

*

The resulting list of OperationSummary objects is sorted in reverse chronological order. The first object on the list represents the * last started operation.

*/ @@ -606,7 +606,7 @@ export class AppRunner extends AppRunnerClient { } /** - *

Returns a list of running AWS App Runner services in your AWS account.

+ *

Returns a list of running App Runner services in your Amazon Web Services account.

*/ public listServices( args: ListServicesCommandInput, @@ -635,7 +635,7 @@ export class AppRunner extends AppRunnerClient { } /** - *

List tags that are associated with for an AWS App Runner resource. The response contains a list of tag key-value pairs.

+ *

List tags that are associated with for an App Runner resource. The response contains a list of tag key-value pairs.

*/ public listTagsForResource( args: ListTagsForResourceCommandInput, @@ -667,7 +667,7 @@ export class AppRunner extends AppRunnerClient { } /** - *

Pause an active AWS App Runner service. App Runner reduces compute capacity for the service to zero and loses state (for example, ephemeral storage is + *

Pause an active App Runner service. App Runner reduces compute capacity for the service to zero and loses state (for example, ephemeral storage is * removed).

*

This is an asynchronous operation. On a successful call, you can use the returned OperationId and the ListOperations * call to track the operation's progress.

@@ -699,7 +699,7 @@ export class AppRunner extends AppRunnerClient { } /** - *

Resume an active AWS App Runner service. App Runner provisions compute capacity for the service.

+ *

Resume an active App Runner service. App Runner provisions compute capacity for the service.

*

This is an asynchronous operation. On a successful call, you can use the returned OperationId and the ListOperations * call to track the operation's progress.

*/ @@ -733,7 +733,7 @@ export class AppRunner extends AppRunnerClient { } /** - *

Initiate a manual deployment of the latest commit in a source code repository or the latest image in a source image repository to an AWS App Runner + *

Initiate a manual deployment of the latest commit in a source code repository or the latest image in a source image repository to an App Runner * service.

*

For a source code repository, App Runner retrieves the commit and builds a Docker image. For a source image repository, App Runner retrieves the latest Docker * image. In both cases, App Runner then deploys the new image to your service and starts a new container instance.

@@ -828,7 +828,7 @@ export class AppRunner extends AppRunnerClient { } /** - *

Update an AWS App Runner service. You can update the source configuration and instance configuration of the service. You can also update the ARN of the auto + *

Update an App Runner service. You can update the source configuration and instance configuration of the service. You can also update the ARN of the auto * scaling configuration resource that's associated with the service. However, you can't change the name or the encryption configuration of the service. * These can be set only when you create the service.

*

To update the tags applied to your service, use the separate actions TagResource and UntagResource.

diff --git a/clients/client-apprunner/src/AppRunnerClient.ts b/clients/client-apprunner/src/AppRunnerClient.ts index 26daf228b570f..6705387f001ec 100644 --- a/clients/client-apprunner/src/AppRunnerClient.ts +++ b/clients/client-apprunner/src/AppRunnerClient.ts @@ -284,17 +284,17 @@ type AppRunnerClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHan export interface AppRunnerClientResolvedConfig extends AppRunnerClientResolvedConfigType {} /** - * AWS App Runner + * App Runner * * * - *

AWS App Runner is an application service that provides a fast, simple, and cost-effective way to go directly from an existing container image or source code - * to a running service in the AWS cloud in seconds. You don't need to learn new technologies, decide which compute service to use, or understand how to - * provision and configure AWS resources.

+ *

App Runner is an application service that provides a fast, simple, and cost-effective way to go directly from an existing container image or source code + * to a running service in the Amazon Web Services Cloud in seconds. You don't need to learn new technologies, decide which compute service to use, or understand how to + * provision and configure Amazon Web Services resources.

*

App Runner connects directly to your container registry or source code repository. It provides an automatic delivery pipeline with fully managed operations, * high performance, scalability, and security.

- *

For more information about App Runner, see the AWS App Runner Developer Guide. - * For release information, see the AWS App Runner Release Notes.

+ *

For more information about App Runner, see the App Runner Developer Guide. + * For release information, see the App Runner Release Notes.

*

* To install the Software Development Kits (SDKs), Integrated * Development Environment (IDE) Toolkits, and command line tools that you can use to access the API, see Tools for @@ -302,8 +302,8 @@ export interface AppRunnerClientResolvedConfig extends AppRunnerClientResolvedCo *

* Endpoints *

- *

For a list of Region-specific endpoints that App Runner supports, see AWS App Runner - * endpoints and quotas in the AWS General Reference.

+ *

For a list of Region-specific endpoints that App Runner supports, see App Runner + * endpoints and quotas in the Amazon Web Services General Reference.

*/ export class AppRunnerClient extends __Client< __HttpHandlerOptions, diff --git a/clients/client-apprunner/src/commands/AssociateCustomDomainCommand.ts b/clients/client-apprunner/src/commands/AssociateCustomDomainCommand.ts index 3f5eb2c051146..93a9af1505784 100644 --- a/clients/client-apprunner/src/commands/AssociateCustomDomainCommand.ts +++ b/clients/client-apprunner/src/commands/AssociateCustomDomainCommand.ts @@ -22,7 +22,7 @@ export interface AssociateCustomDomainCommandInput extends AssociateCustomDomain export interface AssociateCustomDomainCommandOutput extends AssociateCustomDomainResponse, __MetadataBearer {} /** - *

Associate your own domain name with the AWS App Runner subdomain URL of your App Runner service.

+ *

Associate your own domain name with the App Runner subdomain URL of your App Runner service.

*

After you call AssociateCustomDomain and receive a successful response, use the information in the CustomDomain record * that's returned to add CNAME records to your Domain Name System (DNS). For each mapped domain name, add a mapping to the target App Runner subdomain and one or * more certificate validation records. App Runner then performs DNS validation to verify that you own or control the domain name that you associated. App Runner tracks diff --git a/clients/client-apprunner/src/commands/CreateAutoScalingConfigurationCommand.ts b/clients/client-apprunner/src/commands/CreateAutoScalingConfigurationCommand.ts index 61836158f451a..57e365b754899 100644 --- a/clients/client-apprunner/src/commands/CreateAutoScalingConfigurationCommand.ts +++ b/clients/client-apprunner/src/commands/CreateAutoScalingConfigurationCommand.ts @@ -24,13 +24,13 @@ export interface CreateAutoScalingConfigurationCommandOutput __MetadataBearer {} /** - *

Create an AWS App Runner automatic scaling configuration resource. App Runner requires this resource + *

Create an App Runner automatic scaling configuration resource. App Runner requires this resource * when you create App Runner services that require non-default auto scaling settings. You can share an * auto scaling configuration across multiple services.

*

Create multiple revisions of a configuration by using the same AutoScalingConfigurationName and different * AutoScalingConfigurationRevision values. When you create a service, you can set it to use the latest active revision of an auto scaling * configuration or a specific revision.

- *

Configure a higher MinSize to increase the spread of your App Runner service over more Availability Zones in the AWS Region. The tradeoff is + *

Configure a higher MinSize to increase the spread of your App Runner service over more Availability Zones in the Amazon Web Services Region. The tradeoff is * a higher minimal cost.

*

Configure a lower MaxSize to control your cost. The tradeoff is lower responsiveness during peak demand.

* @example diff --git a/clients/client-apprunner/src/commands/CreateConnectionCommand.ts b/clients/client-apprunner/src/commands/CreateConnectionCommand.ts index 361c6f32cfa85..a0f5e87d816bf 100644 --- a/clients/client-apprunner/src/commands/CreateConnectionCommand.ts +++ b/clients/client-apprunner/src/commands/CreateConnectionCommand.ts @@ -22,7 +22,7 @@ export interface CreateConnectionCommandInput extends CreateConnectionRequest {} export interface CreateConnectionCommandOutput extends CreateConnectionResponse, __MetadataBearer {} /** - *

Create an AWS App Runner connection resource. App Runner requires a connection resource when you create App Runner services that access private repositories from + *

Create an App Runner connection resource. App Runner requires a connection resource when you create App Runner services that access private repositories from * certain third-party providers. You can share a connection across multiple services.

*

A connection resource is needed to access GitHub repositories. GitHub requires a user interface approval process through the App Runner console before you * can use the connection.

diff --git a/clients/client-apprunner/src/commands/CreateServiceCommand.ts b/clients/client-apprunner/src/commands/CreateServiceCommand.ts index 75e52e3c41e07..e9c8ea0483ee5 100644 --- a/clients/client-apprunner/src/commands/CreateServiceCommand.ts +++ b/clients/client-apprunner/src/commands/CreateServiceCommand.ts @@ -22,7 +22,7 @@ export interface CreateServiceCommandInput extends CreateServiceRequest {} export interface CreateServiceCommandOutput extends CreateServiceResponse, __MetadataBearer {} /** - *

Create an AWS App Runner service. After the service is created, the action also automatically starts a deployment.

+ *

Create an App Runner service. After the service is created, the action also automatically starts a deployment.

*

This is an asynchronous operation. On a successful call, you can use the returned OperationId and the ListOperations call to track the operation's progress.

* @example * Use a bare-bones client and the command you need to make an API call. diff --git a/clients/client-apprunner/src/commands/DeleteAutoScalingConfigurationCommand.ts b/clients/client-apprunner/src/commands/DeleteAutoScalingConfigurationCommand.ts index 4822341d52726..29fc1ebcee858 100644 --- a/clients/client-apprunner/src/commands/DeleteAutoScalingConfigurationCommand.ts +++ b/clients/client-apprunner/src/commands/DeleteAutoScalingConfigurationCommand.ts @@ -24,7 +24,7 @@ export interface DeleteAutoScalingConfigurationCommandOutput __MetadataBearer {} /** - *

Delete an AWS App Runner automatic scaling configuration resource. You can delete a specific revision or the latest active revision. You can't delete a + *

Delete an App Runner automatic scaling configuration resource. You can delete a specific revision or the latest active revision. You can't delete a * configuration that's used by one or more App Runner services.

* @example * Use a bare-bones client and the command you need to make an API call. diff --git a/clients/client-apprunner/src/commands/DeleteConnectionCommand.ts b/clients/client-apprunner/src/commands/DeleteConnectionCommand.ts index dc441dd8370f4..0d044e3635076 100644 --- a/clients/client-apprunner/src/commands/DeleteConnectionCommand.ts +++ b/clients/client-apprunner/src/commands/DeleteConnectionCommand.ts @@ -22,7 +22,7 @@ export interface DeleteConnectionCommandInput extends DeleteConnectionRequest {} export interface DeleteConnectionCommandOutput extends DeleteConnectionResponse, __MetadataBearer {} /** - *

Delete an AWS App Runner connection. You must first ensure that there are no running App Runner services that use this connection. If there are any, the + *

Delete an App Runner connection. You must first ensure that there are no running App Runner services that use this connection. If there are any, the * DeleteConnection action fails.

* @example * Use a bare-bones client and the command you need to make an API call. diff --git a/clients/client-apprunner/src/commands/DeleteServiceCommand.ts b/clients/client-apprunner/src/commands/DeleteServiceCommand.ts index 2ea75062d6b1c..1330242c6b413 100644 --- a/clients/client-apprunner/src/commands/DeleteServiceCommand.ts +++ b/clients/client-apprunner/src/commands/DeleteServiceCommand.ts @@ -22,7 +22,7 @@ export interface DeleteServiceCommandInput extends DeleteServiceRequest {} export interface DeleteServiceCommandOutput extends DeleteServiceResponse, __MetadataBearer {} /** - *

Delete an AWS App Runner service.

+ *

Delete an App Runner service.

*

This is an asynchronous operation. On a successful call, you can use the returned OperationId and the ListOperations * call to track the operation's progress.

* @example diff --git a/clients/client-apprunner/src/commands/DescribeAutoScalingConfigurationCommand.ts b/clients/client-apprunner/src/commands/DescribeAutoScalingConfigurationCommand.ts index bef18441af0af..8407e1e4030d3 100644 --- a/clients/client-apprunner/src/commands/DescribeAutoScalingConfigurationCommand.ts +++ b/clients/client-apprunner/src/commands/DescribeAutoScalingConfigurationCommand.ts @@ -24,7 +24,7 @@ export interface DescribeAutoScalingConfigurationCommandOutput __MetadataBearer {} /** - *

Return a full description of an AWS App Runner automatic scaling configuration resource.

+ *

Return a full description of an App Runner automatic scaling configuration resource.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript diff --git a/clients/client-apprunner/src/commands/DescribeCustomDomainsCommand.ts b/clients/client-apprunner/src/commands/DescribeCustomDomainsCommand.ts index d8c6bd18f8dcb..109e53bc5ea9a 100644 --- a/clients/client-apprunner/src/commands/DescribeCustomDomainsCommand.ts +++ b/clients/client-apprunner/src/commands/DescribeCustomDomainsCommand.ts @@ -22,7 +22,7 @@ export interface DescribeCustomDomainsCommandInput extends DescribeCustomDomains export interface DescribeCustomDomainsCommandOutput extends DescribeCustomDomainsResponse, __MetadataBearer {} /** - *

Return a description of custom domain names that are associated with an AWS App Runner service.

+ *

Return a description of custom domain names that are associated with an App Runner service.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript diff --git a/clients/client-apprunner/src/commands/DescribeServiceCommand.ts b/clients/client-apprunner/src/commands/DescribeServiceCommand.ts index d97587e07aabd..714b7129e65bf 100644 --- a/clients/client-apprunner/src/commands/DescribeServiceCommand.ts +++ b/clients/client-apprunner/src/commands/DescribeServiceCommand.ts @@ -22,7 +22,7 @@ export interface DescribeServiceCommandInput extends DescribeServiceRequest {} export interface DescribeServiceCommandOutput extends DescribeServiceResponse, __MetadataBearer {} /** - *

Return a full description of an AWS App Runner service.

+ *

Return a full description of an App Runner service.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript diff --git a/clients/client-apprunner/src/commands/DisassociateCustomDomainCommand.ts b/clients/client-apprunner/src/commands/DisassociateCustomDomainCommand.ts index d175e40f14bf8..a48f3ad409017 100644 --- a/clients/client-apprunner/src/commands/DisassociateCustomDomainCommand.ts +++ b/clients/client-apprunner/src/commands/DisassociateCustomDomainCommand.ts @@ -22,7 +22,7 @@ export interface DisassociateCustomDomainCommandInput extends DisassociateCustom export interface DisassociateCustomDomainCommandOutput extends DisassociateCustomDomainResponse, __MetadataBearer {} /** - *

Disassociate a custom domain name from an AWS App Runner service.

+ *

Disassociate a custom domain name from an App Runner service.

*

Certificates tracking domain validity are associated with a custom domain and are stored in AWS * Certificate Manager (ACM). These certificates aren't deleted as part of this action. App Runner delays certificate deletion for * 30 days after a domain is disassociated from your service.

diff --git a/clients/client-apprunner/src/commands/ListAutoScalingConfigurationsCommand.ts b/clients/client-apprunner/src/commands/ListAutoScalingConfigurationsCommand.ts index 79e2790ad0977..6865751e68d27 100644 --- a/clients/client-apprunner/src/commands/ListAutoScalingConfigurationsCommand.ts +++ b/clients/client-apprunner/src/commands/ListAutoScalingConfigurationsCommand.ts @@ -24,7 +24,7 @@ export interface ListAutoScalingConfigurationsCommandOutput __MetadataBearer {} /** - *

Returns a list of AWS App Runner automatic scaling configurations in your AWS account. You can query the revisions for a specific configuration name or + *

Returns a list of App Runner automatic scaling configurations in your Amazon Web Services account. You can query the revisions for a specific configuration name or * the revisions for all configurations in your account. You can optionally query only the latest revision of each requested name.

* @example * Use a bare-bones client and the command you need to make an API call. diff --git a/clients/client-apprunner/src/commands/ListConnectionsCommand.ts b/clients/client-apprunner/src/commands/ListConnectionsCommand.ts index 8f33f79f309f1..cdf57f9e32f3e 100644 --- a/clients/client-apprunner/src/commands/ListConnectionsCommand.ts +++ b/clients/client-apprunner/src/commands/ListConnectionsCommand.ts @@ -22,7 +22,7 @@ export interface ListConnectionsCommandInput extends ListConnectionsRequest {} export interface ListConnectionsCommandOutput extends ListConnectionsResponse, __MetadataBearer {} /** - *

Returns a list of AWS App Runner connections that are associated with your AWS account.

+ *

Returns a list of App Runner connections that are associated with your Amazon Web Services account.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript diff --git a/clients/client-apprunner/src/commands/ListOperationsCommand.ts b/clients/client-apprunner/src/commands/ListOperationsCommand.ts index cd3bd7981f79a..99a45c0ca7337 100644 --- a/clients/client-apprunner/src/commands/ListOperationsCommand.ts +++ b/clients/client-apprunner/src/commands/ListOperationsCommand.ts @@ -22,7 +22,7 @@ export interface ListOperationsCommandInput extends ListOperationsRequest {} export interface ListOperationsCommandOutput extends ListOperationsResponse, __MetadataBearer {} /** - *

Return a list of operations that occurred on an AWS App Runner service.

+ *

Return a list of operations that occurred on an App Runner service.

*

The resulting list of OperationSummary objects is sorted in reverse chronological order. The first object on the list represents the * last started operation.

* @example diff --git a/clients/client-apprunner/src/commands/ListServicesCommand.ts b/clients/client-apprunner/src/commands/ListServicesCommand.ts index e7b31cca4c847..745305b115284 100644 --- a/clients/client-apprunner/src/commands/ListServicesCommand.ts +++ b/clients/client-apprunner/src/commands/ListServicesCommand.ts @@ -22,7 +22,7 @@ export interface ListServicesCommandInput extends ListServicesRequest {} export interface ListServicesCommandOutput extends ListServicesResponse, __MetadataBearer {} /** - *

Returns a list of running AWS App Runner services in your AWS account.

+ *

Returns a list of running App Runner services in your Amazon Web Services account.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript diff --git a/clients/client-apprunner/src/commands/ListTagsForResourceCommand.ts b/clients/client-apprunner/src/commands/ListTagsForResourceCommand.ts index 7c971a2946bc7..b8eee0dd2f27a 100644 --- a/clients/client-apprunner/src/commands/ListTagsForResourceCommand.ts +++ b/clients/client-apprunner/src/commands/ListTagsForResourceCommand.ts @@ -22,7 +22,7 @@ export interface ListTagsForResourceCommandInput extends ListTagsForResourceRequ export interface ListTagsForResourceCommandOutput extends ListTagsForResourceResponse, __MetadataBearer {} /** - *

List tags that are associated with for an AWS App Runner resource. The response contains a list of tag key-value pairs.

+ *

List tags that are associated with for an App Runner resource. The response contains a list of tag key-value pairs.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript diff --git a/clients/client-apprunner/src/commands/PauseServiceCommand.ts b/clients/client-apprunner/src/commands/PauseServiceCommand.ts index ca682e79ab786..00638bd7b7c63 100644 --- a/clients/client-apprunner/src/commands/PauseServiceCommand.ts +++ b/clients/client-apprunner/src/commands/PauseServiceCommand.ts @@ -22,7 +22,7 @@ export interface PauseServiceCommandInput extends PauseServiceRequest {} export interface PauseServiceCommandOutput extends PauseServiceResponse, __MetadataBearer {} /** - *

Pause an active AWS App Runner service. App Runner reduces compute capacity for the service to zero and loses state (for example, ephemeral storage is + *

Pause an active App Runner service. App Runner reduces compute capacity for the service to zero and loses state (for example, ephemeral storage is * removed).

*

This is an asynchronous operation. On a successful call, you can use the returned OperationId and the ListOperations * call to track the operation's progress.

diff --git a/clients/client-apprunner/src/commands/ResumeServiceCommand.ts b/clients/client-apprunner/src/commands/ResumeServiceCommand.ts index 61e863de59a0b..0ad563ebc1b59 100644 --- a/clients/client-apprunner/src/commands/ResumeServiceCommand.ts +++ b/clients/client-apprunner/src/commands/ResumeServiceCommand.ts @@ -22,7 +22,7 @@ export interface ResumeServiceCommandInput extends ResumeServiceRequest {} export interface ResumeServiceCommandOutput extends ResumeServiceResponse, __MetadataBearer {} /** - *

Resume an active AWS App Runner service. App Runner provisions compute capacity for the service.

+ *

Resume an active App Runner service. App Runner provisions compute capacity for the service.

*

This is an asynchronous operation. On a successful call, you can use the returned OperationId and the ListOperations * call to track the operation's progress.

* @example diff --git a/clients/client-apprunner/src/commands/StartDeploymentCommand.ts b/clients/client-apprunner/src/commands/StartDeploymentCommand.ts index 5490e7f15f90c..a3bf66f330b2d 100644 --- a/clients/client-apprunner/src/commands/StartDeploymentCommand.ts +++ b/clients/client-apprunner/src/commands/StartDeploymentCommand.ts @@ -22,7 +22,7 @@ export interface StartDeploymentCommandInput extends StartDeploymentRequest {} export interface StartDeploymentCommandOutput extends StartDeploymentResponse, __MetadataBearer {} /** - *

Initiate a manual deployment of the latest commit in a source code repository or the latest image in a source image repository to an AWS App Runner + *

Initiate a manual deployment of the latest commit in a source code repository or the latest image in a source image repository to an App Runner * service.

*

For a source code repository, App Runner retrieves the commit and builds a Docker image. For a source image repository, App Runner retrieves the latest Docker * image. In both cases, App Runner then deploys the new image to your service and starts a new container instance.

diff --git a/clients/client-apprunner/src/commands/UpdateServiceCommand.ts b/clients/client-apprunner/src/commands/UpdateServiceCommand.ts index 637bc9499fd42..a02f914b5d81e 100644 --- a/clients/client-apprunner/src/commands/UpdateServiceCommand.ts +++ b/clients/client-apprunner/src/commands/UpdateServiceCommand.ts @@ -22,7 +22,7 @@ export interface UpdateServiceCommandInput extends UpdateServiceRequest {} export interface UpdateServiceCommandOutput extends UpdateServiceResponse, __MetadataBearer {} /** - *

Update an AWS App Runner service. You can update the source configuration and instance configuration of the service. You can also update the ARN of the auto + *

Update an App Runner service. You can update the source configuration and instance configuration of the service. You can also update the ARN of the auto * scaling configuration resource that's associated with the service. However, you can't change the name or the encryption configuration of the service. * These can be set only when you create the service.

*

To update the tags applied to your service, use the separate actions TagResource and UntagResource.

diff --git a/clients/client-apprunner/src/models/models_0.ts b/clients/client-apprunner/src/models/models_0.ts index ca8aa58d3af86..8e0abb62cc70c 100644 --- a/clients/client-apprunner/src/models/models_0.ts +++ b/clients/client-apprunner/src/models/models_0.ts @@ -84,7 +84,7 @@ export enum CustomDomainAssociationStatus { } /** - *

Describes a custom domain that's associated with an AWS App Runner service.

+ *

Describes a custom domain that's associated with an App Runner service.

*/ export interface CustomDomain { /** @@ -201,7 +201,7 @@ export namespace InvalidStateException { } /** - *

Describes a tag that is applied to an AWS App Runner resource. A tag is a metadata item consisting of a key-value pair.

+ *

Describes a tag that is applied to an App Runner resource. A tag is a metadata item consisting of a key-value pair.

*/ export interface Tag { /** @@ -226,7 +226,7 @@ export namespace Tag { export interface CreateAutoScalingConfigurationRequest { /** - *

A name for the auto scaling configuration. When you use it for the first time in an AWS Region, App Runner creates revision number 1 of this + *

A name for the auto scaling configuration. When you use it for the first time in an Amazon Web Services Region, App Runner creates revision number 1 of this * name. When you use the same name in subsequent calls, App Runner creates incremental revisions of the configuration.

*/ AutoScalingConfigurationName: string | undefined; @@ -277,9 +277,9 @@ export enum AutoScalingConfigurationStatus { } /** - *

Describes an AWS App Runner automatic scaling configuration resource. Multiple revisions of a configuration have the same + *

Describes an App Runner automatic scaling configuration resource. Multiple revisions of a configuration have the same * AutoScalingConfigurationName and different AutoScalingConfigurationRevision values.

- *

A higher MinSize increases the spread of your App Runner service over more Availability Zones in the AWS Region. The tradeoff is a higher + *

A higher MinSize increases the spread of your App Runner service over more Availability Zones in the Amazon Web Services Region. The tradeoff is a higher * minimal cost.

*

A lower MaxSize controls your cost. The tradeoff is lower responsiveness during peak demand.

*/ @@ -369,8 +369,8 @@ export namespace CreateAutoScalingConfigurationResponse { /** *

App Runner can't create this resource. You've reached your account quota for this resource type.

- *

For App Runner per-resource quotas, see AWS App Runner endpoints and quotas in the - * AWS General Reference.

+ *

For App Runner per-resource quotas, see App Runner endpoints and quotas in the + * Amazon Web Services General Reference.

*/ export interface ServiceQuotaExceededException extends __SmithyException, $MetadataBearer { name: "ServiceQuotaExceededException"; @@ -393,7 +393,7 @@ export enum ProviderType { export interface CreateConnectionRequest { /** - *

A name for the new connection. It must be unique across all App Runner connections for the AWS account in the AWS Region.

+ *

A name for the new connection. It must be unique across all App Runner connections for the Amazon Web Services account in the Amazon Web Services Region.

*/ ConnectionName: string | undefined; @@ -425,7 +425,7 @@ export enum ConnectionStatus { } /** - *

Describes an AWS App Runner connection resource.

+ *

Describes an App Runner connection resource.

*/ export interface Connection { /** @@ -480,7 +480,7 @@ export namespace CreateConnectionResponse { } /** - *

Describes a custom encryption key that AWS App Runner uses to encrypt copies of the source repository and service logs.

+ *

Describes a custom encryption key that App Runner uses to encrypt copies of the source repository and service logs.

*/ export interface EncryptionConfiguration { /** @@ -504,7 +504,7 @@ export enum HealthCheckProtocol { } /** - *

Describes the settings for the health check that AWS App Runner performs to monitor the health of a service.

+ *

Describes the settings for the health check that App Runner performs to monitor the health of a service.

*/ export interface HealthCheckConfiguration { /** @@ -540,14 +540,14 @@ export interface HealthCheckConfiguration { /** *

The number of consecutive checks that must succeed before App Runner decides that the service is healthy.

- *

Default: 3 + *

Default: 1 *

*/ HealthyThreshold?: number; /** *

The number of consecutive checks that must fail before App Runner decides that the service is unhealthy.

- *

Default: 3 + *

Default: 5 *

*/ UnhealthyThreshold?: number; @@ -563,7 +563,7 @@ export namespace HealthCheckConfiguration { } /** - *

Describes the runtime configuration of an AWS App Runner service instance (scaling unit).

+ *

Describes the runtime configuration of an App Runner service instance (scaling unit).

*/ export interface InstanceConfiguration { /** @@ -582,7 +582,7 @@ export interface InstanceConfiguration { /** *

The Amazon Resource Name (ARN) of an IAM role that provides permissions to your App Runner service. These are permissions that your code needs when it calls - * any AWS APIs.

+ * any Amazon Web Services APIs.

*/ InstanceRoleArn?: string; } @@ -628,7 +628,7 @@ export enum Runtime { } /** - *

Describes the basic configuration needed for building and running an AWS App Runner service. This type doesn't support the full set of possible + *

Describes the basic configuration needed for building and running an App Runner service. This type doesn't support the full set of possible * configuration options. Fur full configuration capabilities, use a apprunner.yaml file in the source code repository.

*/ export interface CodeConfigurationValues { @@ -681,7 +681,7 @@ export enum ConfigurationSource { } /** - *

Describes the configuration that AWS App Runner uses to build and run an App Runner service from a source code repository.

+ *

Describes the configuration that App Runner uses to build and run an App Runner service from a source code repository.

*/ export interface CodeConfiguration { /** @@ -725,7 +725,7 @@ export enum SourceCodeVersionType { } /** - *

Identifies a version of code that AWS App Runner refers to within a source code repository.

+ *

Identifies a version of code that App Runner refers to within a source code repository.

*/ export interface SourceCodeVersion { /** @@ -781,7 +781,7 @@ export namespace CodeRepository { } /** - *

Describes the configuration that AWS App Runner uses to run an App Runner service using an image pulled from a source image repository.

+ *

Describes the configuration that App Runner uses to run an App Runner service using an image pulled from a source image repository.

*/ export interface ImageConfiguration { /** @@ -853,7 +853,7 @@ export namespace ImageRepository { } /** - *

Describes the source deployed to an AWS App Runner service. It can be a code or an image repository.

+ *

Describes the source deployed to an App Runner service. It can be a code or an image repository.

*/ export interface SourceConfiguration { /** @@ -870,10 +870,10 @@ export interface SourceConfiguration { ImageRepository?: ImageRepository; /** - *

If true, continuous integration from the source repository is enabled for the App Runner service. Each repository change (source code commit or - * new image version) starts a deployment.

- *

Default: true - *

+ *

If true, continuous integration from the source repository is enabled for the App Runner service. Each repository change (including any source + * code commit or new image version) starts a deployment.

+ *

Default: App Runner sets to false for a source image that uses an ECR Public repository or an ECR repository that's in an Amazon Web Services account other than the one that the service is in. App Runner sets to true in all other cases (which currently include a source code + * repository or a source image using a same-account ECR repository).

*/ AutoDeploymentsEnabled?: boolean; @@ -896,7 +896,7 @@ export namespace SourceConfiguration { export interface CreateServiceRequest { /** - *

A name for the new service. It must be unique across all the running App Runner services in your AWS account in the AWS Region.

+ *

A name for the new service. It must be unique across all the running App Runner services in your Amazon Web Services account in the Amazon Web Services Region.

*/ ServiceName: string | undefined; @@ -917,12 +917,12 @@ export interface CreateServiceRequest { /** *

An optional custom encryption key that App Runner uses to encrypt the copy of your source repository that it maintains and your service logs. By default, - * App Runner uses an AWS managed CMK.

+ * App Runner uses an Amazon Web Services managed CMK.

*/ EncryptionConfiguration?: EncryptionConfiguration; /** - *

The settings for the health check that AWS App Runner performs to monitor the health of your service.

+ *

The settings for the health check that App Runner performs to monitor the health of your service.

*/ HealthCheckConfiguration?: HealthCheckConfiguration; @@ -946,7 +946,7 @@ export namespace CreateServiceRequest { } /** - *

Provides summary information about an AWS App Runner automatic scaling configuration resource.

+ *

Provides summary information about an App Runner automatic scaling configuration resource.

*

This type contains limited information about an auto scaling configuration. It includes only identification information, without configuration * details. It's returned by the ListAutoScalingConfigurations action. Complete configuration information is returned by the CreateAutoScalingConfiguration, DescribeAutoScalingConfiguration, and DeleteAutoScalingConfiguration * actions using the AutoScalingConfiguration type.

@@ -988,7 +988,7 @@ export enum ServiceStatus { } /** - *

Describes an AWS App Runner service. It can describe a service in any state, including deleted services.

+ *

Describes an App Runner service. It can describe a service in any state, including deleted services.

*

This type contains the full information about a service, including configuration details. It's returned by the CreateService, DescribeService, and DeleteService actions. A subset of this * information is returned by the ListServices action using the ServiceSummary type.

*/ @@ -999,7 +999,7 @@ export interface Service { ServiceName: string | undefined; /** - *

An ID that App Runner generated for this service. It's unique within the AWS Region.

+ *

An ID that App Runner generated for this service. It's unique within the Amazon Web Services Region.

*/ ServiceId: string | undefined; @@ -1058,7 +1058,7 @@ export interface Service { /** *

The encryption key that App Runner uses to encrypt the service logs and the copy of the source repository that App Runner maintains for the service. It can be - * either a customer-provided encryption key or an AWS managed CMK.

+ * either a customer-provided encryption key or an Amazon Web Services managed CMK.

*/ EncryptionConfiguration?: EncryptionConfiguration; @@ -1144,7 +1144,7 @@ export namespace DeleteAutoScalingConfigurationResponse { } /** - *

A resource doesn't exist for the specified Amazon Resource Name (ARN) in your AWS account.

+ *

A resource doesn't exist for the specified Amazon Resource Name (ARN) in your Amazon Web Services account.

*/ export interface ResourceNotFoundException extends __SmithyException, $MetadataBearer { name: "ResourceNotFoundException"; @@ -1500,7 +1500,7 @@ export namespace ListConnectionsRequest { } /** - *

Provides summary information about an AWS App Runner connection resource.

+ *

Provides summary information about an App Runner connection resource.

*/ export interface ConnectionSummary { /** @@ -1608,7 +1608,7 @@ export enum OperationType { } /** - *

Provides summary information for an operation that occurred on an AWS App Runner service.

+ *

Provides summary information for an operation that occurred on an App Runner service.

*/ export interface OperationSummary { /** @@ -1703,7 +1703,7 @@ export namespace ListServicesRequest { } /** - *

Provides summary information for an AWS App Runner service.

+ *

Provides summary information for an App Runner service.

*

This type contains limited information about a service. It doesn't include configuration details. It's returned by the ListServices action. Complete service information is returned by the CreateService, DescribeService, and DeleteService actions using the Service type.

*/ export interface ServiceSummary { @@ -1713,7 +1713,7 @@ export interface ServiceSummary { ServiceName?: string; /** - *

An ID that App Runner generated for this service. It's unique within the AWS Region.

+ *

An ID that App Runner generated for this service. It's unique within the Amazon Web Services Region.

*/ ServiceId?: string; @@ -2023,7 +2023,7 @@ export interface UpdateServiceRequest { AutoScalingConfigurationArn?: string; /** - *

The settings for the health check that AWS App Runner performs to monitor the health of your service.

+ *

The settings for the health check that App Runner performs to monitor the health of your service.

*/ HealthCheckConfiguration?: HealthCheckConfiguration; } diff --git a/clients/client-cloudcontrol/.gitignore b/clients/client-cloudcontrol/.gitignore new file mode 100644 index 0000000000000..54f14c9aef253 --- /dev/null +++ b/clients/client-cloudcontrol/.gitignore @@ -0,0 +1,9 @@ +/node_modules/ +/build/ +/coverage/ +/docs/ +/dist-* +*.tsbuildinfo +*.tgz +*.log +package-lock.json diff --git a/clients/client-cloudcontrol/.npmignore b/clients/client-cloudcontrol/.npmignore new file mode 100644 index 0000000000000..b7ff81137c4ad --- /dev/null +++ b/clients/client-cloudcontrol/.npmignore @@ -0,0 +1,4 @@ +/coverage/ +/docs/ +tsconfig.test.json +*.tsbuildinfo diff --git a/clients/client-cloudcontrol/LICENSE b/clients/client-cloudcontrol/LICENSE new file mode 100644 index 0000000000000..f9e0c8672bca6 --- /dev/null +++ b/clients/client-cloudcontrol/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-2021 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-cloudcontrol/README.md b/clients/client-cloudcontrol/README.md new file mode 100644 index 0000000000000..cb3125672560e --- /dev/null +++ b/clients/client-cloudcontrol/README.md @@ -0,0 +1,209 @@ +# @aws-sdk/client-cloudcontrol + +[![NPM version](https://img.shields.io/npm/v/@aws-sdk/client-cloudcontrol/latest.svg)](https://www.npmjs.com/package/@aws-sdk/client-cloudcontrol) +[![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/client-cloudcontrol.svg)](https://www.npmjs.com/package/@aws-sdk/client-cloudcontrol) + +## Description + +AWS SDK for JavaScript CloudControl Client for Node.js, Browser and React Native. + +

Use Amazon Web Services Cloud Control API to create, read, update, delete, and list (CRUD-L) your cloud resources that +belong to a wide range of services--both Amazon Web Services and third-party. With the Cloud Control API +standardized set of application programming interfaces (APIs), you can perform CRUD-L operations +on any supported resources in your Amazon Web Services account. Using Cloud Control API, you won't have to generate code +or scripts specific to each individual service responsible for those resources.

+

For more information about Amazon Web Services Cloud Control API, see the Amazon Web Services Cloud Control API User +Guide.

+ +## Installing + +To install the this package, simply type add or install @aws-sdk/client-cloudcontrol +using your favorite package manager: + +- `npm install @aws-sdk/client-cloudcontrol` +- `yarn add @aws-sdk/client-cloudcontrol` +- `pnpm add @aws-sdk/client-cloudcontrol` + +## Getting Started + +### Import + +The AWS SDK is modulized by clients and commands. +To send a request, you only need to import the `CloudControlClient` and +the commands you need, for example `CancelResourceRequestCommand`: + +```js +// ES5 example +const { CloudControlClient, CancelResourceRequestCommand } = require("@aws-sdk/client-cloudcontrol"); +``` + +```ts +// ES6+ example +import { CloudControlClient, CancelResourceRequestCommand } from "@aws-sdk/client-cloudcontrol"; +``` + +### 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 CloudControlClient({ region: "REGION" }); + +const params = { + /** input parameters */ +}; +const command = new CancelResourceRequestCommand(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) => { + // proccess 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-cloudcontrol"; +const client = new AWS.CloudControl({ region: "REGION" }); + +// async/await. +try { + const data = await client.cancelResourceRequest(params); + // process data. +} catch (error) { + // error handling. +} + +// Promises. +client + .cancelResourceRequest(params) + .then((data) => { + // process data. + }) + .catch((error) => { + // error handling. + }); + +// callbacks. +client.cancelResourceRequest(params, (err, data) => { + // proccess 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-cloudcontrol` 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. diff --git a/clients/client-cloudcontrol/jest.config.js b/clients/client-cloudcontrol/jest.config.js new file mode 100644 index 0000000000000..02eed352c6a86 --- /dev/null +++ b/clients/client-cloudcontrol/jest.config.js @@ -0,0 +1,4 @@ +module.exports = { + preset: "ts-jest", + testMatch: ["**/*.spec.ts", "!**/*.browser.spec.ts", "!**/*.integ.spec.ts"], +}; diff --git a/clients/client-cloudcontrol/package.json b/clients/client-cloudcontrol/package.json new file mode 100644 index 0000000000000..3fe8d5e6e232b --- /dev/null +++ b/clients/client-cloudcontrol/package.json @@ -0,0 +1,94 @@ +{ + "name": "@aws-sdk/client-cloudcontrol", + "description": "AWS SDK for JavaScript Cloudcontrol Client for Node.js, Browser and React Native", + "version": "3.0.0", + "scripts": { + "build": "yarn build:cjs && yarn build:es && yarn build:types", + "build:cjs": "tsc -p tsconfig.json", + "build:docs": "yarn clean:docs && typedoc ./", + "build:es": "tsc -p tsconfig.es.json", + "build:types": "tsc -p tsconfig.types.json", + "clean": "yarn clean:dist && yarn clean:docs", + "clean:dist": "rimraf ./dist-*", + "clean:docs": "rimraf ./docs", + "downlevel-dts": "downlevel-dts dist-types dist-types/ts3.4", + "test": "jest --coverage --passWithNoTests" + }, + "main": "./dist-cjs/index.js", + "types": "./dist-types/index.d.ts", + "module": "./dist-es/index.js", + "sideEffects": false, + "dependencies": { + "@aws-crypto/sha256-browser": "^1.1.0", + "@aws-crypto/sha256-js": "^1.1.0", + "@aws-sdk/client-sts": "3.34.0", + "@aws-sdk/config-resolver": "3.34.0", + "@aws-sdk/credential-provider-node": "3.34.0", + "@aws-sdk/fetch-http-handler": "3.34.0", + "@aws-sdk/hash-node": "3.34.0", + "@aws-sdk/invalid-dependency": "3.34.0", + "@aws-sdk/middleware-content-length": "3.34.0", + "@aws-sdk/middleware-host-header": "3.34.0", + "@aws-sdk/middleware-logger": "3.34.0", + "@aws-sdk/middleware-retry": "3.34.0", + "@aws-sdk/middleware-serde": "3.34.0", + "@aws-sdk/middleware-signing": "3.34.0", + "@aws-sdk/middleware-stack": "3.34.0", + "@aws-sdk/middleware-user-agent": "3.34.0", + "@aws-sdk/node-config-provider": "3.34.0", + "@aws-sdk/node-http-handler": "3.34.0", + "@aws-sdk/protocol-http": "3.34.0", + "@aws-sdk/smithy-client": "3.34.0", + "@aws-sdk/types": "3.34.0", + "@aws-sdk/url-parser": "3.34.0", + "@aws-sdk/util-base64-browser": "3.34.0", + "@aws-sdk/util-base64-node": "3.34.0", + "@aws-sdk/util-body-length-browser": "3.34.0", + "@aws-sdk/util-body-length-node": "3.34.0", + "@aws-sdk/util-user-agent-browser": "3.34.0", + "@aws-sdk/util-user-agent-node": "3.34.0", + "@aws-sdk/util-utf8-browser": "3.34.0", + "@aws-sdk/util-utf8-node": "3.34.0", + "@aws-sdk/util-waiter": "3.34.0", + "tslib": "^2.3.0", + "uuid": "^8.3.2" + }, + "devDependencies": { + "@aws-sdk/client-documentation-generator": "3.34.0", + "@types/node": "^12.7.5", + "@types/uuid": "^8.3.0", + "downlevel-dts": "0.7.0", + "jest": "^26.1.0", + "rimraf": "^3.0.0", + "ts-jest": "^26.4.1", + "typedoc": "^0.19.2", + "typescript": "~4.3.5" + }, + "engines": { + "node": ">=10.0.0" + }, + "typesVersions": { + "<4.0": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + "author": { + "name": "AWS SDK for JavaScript Team", + "url": "https://aws.amazon.com/javascript/" + }, + "license": "Apache-2.0", + "browser": { + "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.browser" + }, + "react-native": { + "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.native" + }, + "homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-cloudcontrol", + "repository": { + "type": "git", + "url": "https://github.com/aws/aws-sdk-js-v3.git", + "directory": "clients/client-cloudcontrol" + } +} diff --git a/clients/client-cloudcontrol/src/CloudControl.ts b/clients/client-cloudcontrol/src/CloudControl.ts new file mode 100644 index 0000000000000..270e56f8b0ac6 --- /dev/null +++ b/clients/client-cloudcontrol/src/CloudControl.ts @@ -0,0 +1,336 @@ +import { HttpHandlerOptions as __HttpHandlerOptions } from "@aws-sdk/types"; + +import { CloudControlClient } from "./CloudControlClient"; +import { + CancelResourceRequestCommand, + CancelResourceRequestCommandInput, + CancelResourceRequestCommandOutput, +} from "./commands/CancelResourceRequestCommand"; +import { + CreateResourceCommand, + CreateResourceCommandInput, + CreateResourceCommandOutput, +} from "./commands/CreateResourceCommand"; +import { + DeleteResourceCommand, + DeleteResourceCommandInput, + DeleteResourceCommandOutput, +} from "./commands/DeleteResourceCommand"; +import { GetResourceCommand, GetResourceCommandInput, GetResourceCommandOutput } from "./commands/GetResourceCommand"; +import { + GetResourceRequestStatusCommand, + GetResourceRequestStatusCommandInput, + GetResourceRequestStatusCommandOutput, +} from "./commands/GetResourceRequestStatusCommand"; +import { + ListResourceRequestsCommand, + ListResourceRequestsCommandInput, + ListResourceRequestsCommandOutput, +} from "./commands/ListResourceRequestsCommand"; +import { + ListResourcesCommand, + ListResourcesCommandInput, + ListResourcesCommandOutput, +} from "./commands/ListResourcesCommand"; +import { + UpdateResourceCommand, + UpdateResourceCommandInput, + UpdateResourceCommandOutput, +} from "./commands/UpdateResourceCommand"; + +/** + *

Use Amazon Web Services Cloud Control API to create, read, update, delete, and list (CRUD-L) your cloud resources that + * belong to a wide range of services--both Amazon Web Services and third-party. With the Cloud Control API + * standardized set of application programming interfaces (APIs), you can perform CRUD-L operations + * on any supported resources in your Amazon Web Services account. Using Cloud Control API, you won't have to generate code + * or scripts specific to each individual service responsible for those resources.

+ *

For more information about Amazon Web Services Cloud Control API, see the Amazon Web Services Cloud Control API User + * Guide.

+ */ +export class CloudControl extends CloudControlClient { + /** + *

Cancels the specified resource operation request. For more information, see Canceling resource operation requests in the + * Amazon Web Services Cloud Control API User Guide.

+ *

Only resource operations requests with a status of PENDING or + * IN_PROGRESS can be cancelled.

+ */ + public cancelResourceRequest( + args: CancelResourceRequestCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public cancelResourceRequest( + args: CancelResourceRequestCommandInput, + cb: (err: any, data?: CancelResourceRequestCommandOutput) => void + ): void; + public cancelResourceRequest( + args: CancelResourceRequestCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CancelResourceRequestCommandOutput) => void + ): void; + public cancelResourceRequest( + args: CancelResourceRequestCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: CancelResourceRequestCommandOutput) => void), + cb?: (err: any, data?: CancelResourceRequestCommandOutput) => void + ): Promise | void { + const command = new CancelResourceRequestCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

Creates the specified resource. For more information, see Creating a + * resource in the Amazon Web Services Cloud Control API User Guide.

+ *

After you have initiated a resource creation request, you can monitor the progress of your + * request by calling GetResourceRequestStatus using the RequestToken of the + * ProgressEvent type returned by CreateResource.

+ */ + public createResource( + args: CreateResourceCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public createResource( + args: CreateResourceCommandInput, + cb: (err: any, data?: CreateResourceCommandOutput) => void + ): void; + public createResource( + args: CreateResourceCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateResourceCommandOutput) => void + ): void; + public createResource( + args: CreateResourceCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: CreateResourceCommandOutput) => void), + cb?: (err: any, data?: CreateResourceCommandOutput) => void + ): Promise | void { + const command = new CreateResourceCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

Deletes the specified resource. For details, see Deleting a + * resource in the Amazon Web Services Cloud Control API User Guide.

+ *

After you have initiated a resource deletion request, you can monitor the progress of your + * request by calling GetResourceRequestStatus using the RequestToken of the + * ProgressEvent returned by DeleteResource.

+ */ + public deleteResource( + args: DeleteResourceCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public deleteResource( + args: DeleteResourceCommandInput, + cb: (err: any, data?: DeleteResourceCommandOutput) => void + ): void; + public deleteResource( + args: DeleteResourceCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteResourceCommandOutput) => void + ): void; + public deleteResource( + args: DeleteResourceCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DeleteResourceCommandOutput) => void), + cb?: (err: any, data?: DeleteResourceCommandOutput) => void + ): Promise | void { + const command = new DeleteResourceCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

Returns information about the current state of the specified resource. For details, see + * Reading a resource's current state.

+ *

You can use this action to return information about an existing resource in your account + * and Amazon Web Services Region, whether or not those resources were provisioned using Cloud Control API.

+ */ + public getResource(args: GetResourceCommandInput, options?: __HttpHandlerOptions): Promise; + public getResource(args: GetResourceCommandInput, cb: (err: any, data?: GetResourceCommandOutput) => void): void; + public getResource( + args: GetResourceCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetResourceCommandOutput) => void + ): void; + public getResource( + args: GetResourceCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetResourceCommandOutput) => void), + cb?: (err: any, data?: GetResourceCommandOutput) => void + ): Promise | void { + const command = new GetResourceCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

Returns the current status of a resource operation request. For more information, see + * Tracking the progress of resource operation requests in the + * Amazon Web Services Cloud Control API User Guide.

+ */ + public getResourceRequestStatus( + args: GetResourceRequestStatusCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public getResourceRequestStatus( + args: GetResourceRequestStatusCommandInput, + cb: (err: any, data?: GetResourceRequestStatusCommandOutput) => void + ): void; + public getResourceRequestStatus( + args: GetResourceRequestStatusCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetResourceRequestStatusCommandOutput) => void + ): void; + public getResourceRequestStatus( + args: GetResourceRequestStatusCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetResourceRequestStatusCommandOutput) => void), + cb?: (err: any, data?: GetResourceRequestStatusCommandOutput) => void + ): Promise | void { + const command = new GetResourceRequestStatusCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

Returns existing resource operation requests. This includes requests of all status types. + * For more information, see Listing active resource operation requests in the + * Amazon Web Services Cloud Control API User Guide.

+ * + *

Resource operation requests expire after seven days.

+ *
+ */ + public listResourceRequests( + args: ListResourceRequestsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public listResourceRequests( + args: ListResourceRequestsCommandInput, + cb: (err: any, data?: ListResourceRequestsCommandOutput) => void + ): void; + public listResourceRequests( + args: ListResourceRequestsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListResourceRequestsCommandOutput) => void + ): void; + public listResourceRequests( + args: ListResourceRequestsCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ListResourceRequestsCommandOutput) => void), + cb?: (err: any, data?: ListResourceRequestsCommandOutput) => void + ): Promise | void { + const command = new ListResourceRequestsCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

Returns information about the specified resources. For more information, see Discovering + * resources in the Amazon Web Services Cloud Control API User Guide.

+ *

You can use this action to return information about existing resources in your account and + * Amazon Web Services Region, whether or not those resources were provisioned using Cloud Control API.

+ */ + public listResources( + args: ListResourcesCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public listResources( + args: ListResourcesCommandInput, + cb: (err: any, data?: ListResourcesCommandOutput) => void + ): void; + public listResources( + args: ListResourcesCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListResourcesCommandOutput) => void + ): void; + public listResources( + args: ListResourcesCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ListResourcesCommandOutput) => void), + cb?: (err: any, data?: ListResourcesCommandOutput) => void + ): Promise | void { + const command = new ListResourcesCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

Updates the specified property values in the resource.

+ *

You specify your resource property updates as a list of patch operations contained in a + * JSON patch document that adheres to the + * RFC 6902 - JavaScript Object + * Notation (JSON) Patch + * standard.

+ *

For details on how Cloud Control API performs resource update operations, see Updating a resource in the Amazon Web Services Cloud Control API User Guide.

+ *

After you have initiated a resource update request, you can monitor the progress of your + * request by calling GetResourceRequestStatus using the RequestToken of the + * ProgressEvent returned by UpdateResource.

+ *

For more information about the properties of a specific resource, refer to the related + * topic for the resource in the Resource and property types reference in the Amazon Web Services + * CloudFormation Users Guide.

+ */ + public updateResource( + args: UpdateResourceCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public updateResource( + args: UpdateResourceCommandInput, + cb: (err: any, data?: UpdateResourceCommandOutput) => void + ): void; + public updateResource( + args: UpdateResourceCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateResourceCommandOutput) => void + ): void; + public updateResource( + args: UpdateResourceCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: UpdateResourceCommandOutput) => void), + cb?: (err: any, data?: UpdateResourceCommandOutput) => void + ): Promise | void { + const command = new UpdateResourceCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } +} diff --git a/clients/client-cloudcontrol/src/CloudControlClient.ts b/clients/client-cloudcontrol/src/CloudControlClient.ts new file mode 100644 index 0000000000000..9d5be36d13bdf --- /dev/null +++ b/clients/client-cloudcontrol/src/CloudControlClient.ts @@ -0,0 +1,275 @@ +import { + EndpointsInputConfig, + EndpointsResolvedConfig, + RegionInputConfig, + RegionResolvedConfig, + resolveEndpointsConfig, + resolveRegionConfig, +} from "@aws-sdk/config-resolver"; +import { getContentLengthPlugin } from "@aws-sdk/middleware-content-length"; +import { + getHostHeaderPlugin, + HostHeaderInputConfig, + HostHeaderResolvedConfig, + resolveHostHeaderConfig, +} from "@aws-sdk/middleware-host-header"; +import { getLoggerPlugin } from "@aws-sdk/middleware-logger"; +import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@aws-sdk/middleware-retry"; +import { + AwsAuthInputConfig, + AwsAuthResolvedConfig, + getAwsAuthPlugin, + resolveAwsAuthConfig, +} from "@aws-sdk/middleware-signing"; +import { + getUserAgentPlugin, + resolveUserAgentConfig, + UserAgentInputConfig, + UserAgentResolvedConfig, +} from "@aws-sdk/middleware-user-agent"; +import { HttpHandler as __HttpHandler } from "@aws-sdk/protocol-http"; +import { + Client as __Client, + SmithyConfiguration as __SmithyConfiguration, + SmithyResolvedConfiguration as __SmithyResolvedConfiguration, +} from "@aws-sdk/smithy-client"; +import { + Credentials as __Credentials, + Decoder as __Decoder, + Encoder as __Encoder, + Hash as __Hash, + HashConstructor as __HashConstructor, + HttpHandlerOptions as __HttpHandlerOptions, + Logger as __Logger, + Provider as __Provider, + Provider, + RegionInfoProvider, + StreamCollector as __StreamCollector, + UrlParser as __UrlParser, + UserAgent as __UserAgent, +} from "@aws-sdk/types"; + +import { + CancelResourceRequestCommandInput, + CancelResourceRequestCommandOutput, +} from "./commands/CancelResourceRequestCommand"; +import { CreateResourceCommandInput, CreateResourceCommandOutput } from "./commands/CreateResourceCommand"; +import { DeleteResourceCommandInput, DeleteResourceCommandOutput } from "./commands/DeleteResourceCommand"; +import { GetResourceCommandInput, GetResourceCommandOutput } from "./commands/GetResourceCommand"; +import { + GetResourceRequestStatusCommandInput, + GetResourceRequestStatusCommandOutput, +} from "./commands/GetResourceRequestStatusCommand"; +import { + ListResourceRequestsCommandInput, + ListResourceRequestsCommandOutput, +} from "./commands/ListResourceRequestsCommand"; +import { ListResourcesCommandInput, ListResourcesCommandOutput } from "./commands/ListResourcesCommand"; +import { UpdateResourceCommandInput, UpdateResourceCommandOutput } from "./commands/UpdateResourceCommand"; +import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig"; + +export type ServiceInputTypes = + | CancelResourceRequestCommandInput + | CreateResourceCommandInput + | DeleteResourceCommandInput + | GetResourceCommandInput + | GetResourceRequestStatusCommandInput + | ListResourceRequestsCommandInput + | ListResourcesCommandInput + | UpdateResourceCommandInput; + +export type ServiceOutputTypes = + | CancelResourceRequestCommandOutput + | CreateResourceCommandOutput + | DeleteResourceCommandOutput + | GetResourceCommandOutput + | GetResourceRequestStatusCommandOutput + | ListResourceRequestsCommandOutput + | ListResourcesCommandOutput + | UpdateResourceCommandOutput; + +export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { + /** + * The HTTP handler to use. Fetch in browser and Https in Nodejs. + */ + requestHandler?: __HttpHandler; + + /** + * A constructor for a class implementing the {@link __Hash} interface + * that computes the SHA-256 HMAC or checksum of a string or binary buffer. + * @internal + */ + sha256?: __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?: (body: any) => number | undefined; + + /** + * 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 dyanamically changing the endpoint of the client based on the hostPrefix + * trait of an operation. + */ + disableHostPrefix?: boolean; + + /** + * Value for how many times a request will be made at most in case of retry. + */ + maxAttempts?: number | __Provider; + + /** + * Specifies which retry algorithm to use. + */ + retryMode?: string | __Provider; + + /** + * Optional logger for logging debug/info/warn/error. + */ + logger?: __Logger; + + /** + * Unique service identifier. + * @internal + */ + serviceId?: string; + + /** + * The AWS region to which this client will send requests + */ + region?: string | __Provider; + + /** + * Default credentials provider; Not available in browser runtime. + * @internal + */ + credentialDefaultProvider?: (input: any) => __Provider<__Credentials>; + + /** + * Fetch related hostname, signing name or signing region with given region. + * @internal + */ + regionInfoProvider?: RegionInfoProvider; + + /** + * The provider populating default tracking information to be sent with `user-agent`, `x-amz-user-agent` header + * @internal + */ + defaultUserAgentProvider?: Provider<__UserAgent>; +} + +type CloudControlClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> & + ClientDefaults & + RegionInputConfig & + EndpointsInputConfig & + RetryInputConfig & + HostHeaderInputConfig & + AwsAuthInputConfig & + UserAgentInputConfig; +/** + * The configuration interface of CloudControlClient class constructor that set the region, credentials and other options. + */ +export interface CloudControlClientConfig extends CloudControlClientConfigType {} + +type CloudControlClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> & + Required & + RegionResolvedConfig & + EndpointsResolvedConfig & + RetryResolvedConfig & + HostHeaderResolvedConfig & + AwsAuthResolvedConfig & + UserAgentResolvedConfig; +/** + * The resolved configuration interface of CloudControlClient class. This is resolved and normalized from the {@link CloudControlClientConfig | constructor configuration interface}. + */ +export interface CloudControlClientResolvedConfig extends CloudControlClientResolvedConfigType {} + +/** + *

Use Amazon Web Services Cloud Control API to create, read, update, delete, and list (CRUD-L) your cloud resources that + * belong to a wide range of services--both Amazon Web Services and third-party. With the Cloud Control API + * standardized set of application programming interfaces (APIs), you can perform CRUD-L operations + * on any supported resources in your Amazon Web Services account. Using Cloud Control API, you won't have to generate code + * or scripts specific to each individual service responsible for those resources.

+ *

For more information about Amazon Web Services Cloud Control API, see the Amazon Web Services Cloud Control API User + * Guide.

+ */ +export class CloudControlClient extends __Client< + __HttpHandlerOptions, + ServiceInputTypes, + ServiceOutputTypes, + CloudControlClientResolvedConfig +> { + /** + * The resolved configuration of CloudControlClient class. This is resolved and normalized from the {@link CloudControlClientConfig | constructor configuration interface}. + */ + readonly config: CloudControlClientResolvedConfig; + + constructor(configuration: CloudControlClientConfig) { + const _config_0 = __getRuntimeConfig(configuration); + const _config_1 = resolveRegionConfig(_config_0); + const _config_2 = resolveEndpointsConfig(_config_1); + const _config_3 = resolveRetryConfig(_config_2); + const _config_4 = resolveHostHeaderConfig(_config_3); + const _config_5 = resolveAwsAuthConfig(_config_4); + const _config_6 = resolveUserAgentConfig(_config_5); + super(_config_6); + this.config = _config_6; + this.middlewareStack.use(getRetryPlugin(this.config)); + this.middlewareStack.use(getContentLengthPlugin(this.config)); + this.middlewareStack.use(getHostHeaderPlugin(this.config)); + this.middlewareStack.use(getLoggerPlugin(this.config)); + this.middlewareStack.use(getAwsAuthPlugin(this.config)); + this.middlewareStack.use(getUserAgentPlugin(this.config)); + } + + /** + * Destroy underlying resources, like sockets. It's usually not necessary to do this. + * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed. + * Otherwise, sockets might stay open for quite a long time before the server terminates them. + */ + destroy(): void { + super.destroy(); + } +} diff --git a/clients/client-cloudcontrol/src/commands/CancelResourceRequestCommand.ts b/clients/client-cloudcontrol/src/commands/CancelResourceRequestCommand.ts new file mode 100644 index 0000000000000..a056b578cc636 --- /dev/null +++ b/clients/client-cloudcontrol/src/commands/CancelResourceRequestCommand.ts @@ -0,0 +1,98 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { CloudControlClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudControlClient"; +import { CancelResourceRequestInput, CancelResourceRequestOutput } from "../models/models_0"; +import { + deserializeAws_json1_0CancelResourceRequestCommand, + serializeAws_json1_0CancelResourceRequestCommand, +} from "../protocols/Aws_json1_0"; + +export interface CancelResourceRequestCommandInput extends CancelResourceRequestInput {} +export interface CancelResourceRequestCommandOutput extends CancelResourceRequestOutput, __MetadataBearer {} + +/** + *

Cancels the specified resource operation request. For more information, see Canceling resource operation requests in the + * Amazon Web Services Cloud Control API User Guide.

+ *

Only resource operations requests with a status of PENDING or + * IN_PROGRESS can be cancelled.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { CloudControlClient, CancelResourceRequestCommand } from "@aws-sdk/client-cloudcontrol"; // ES Modules import + * // const { CloudControlClient, CancelResourceRequestCommand } = require("@aws-sdk/client-cloudcontrol"); // CommonJS import + * const client = new CloudControlClient(config); + * const command = new CancelResourceRequestCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link CancelResourceRequestCommandInput} for command's `input` shape. + * @see {@link CancelResourceRequestCommandOutput} for command's `response` shape. + * @see {@link CloudControlClientResolvedConfig | config} for command's `input` shape. + * + */ +export class CancelResourceRequestCommand extends $Command< + CancelResourceRequestCommandInput, + CancelResourceRequestCommandOutput, + CloudControlClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: CancelResourceRequestCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: CloudControlClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "CloudControlClient"; + const commandName = "CancelResourceRequestCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: CancelResourceRequestInput.filterSensitiveLog, + outputFilterSensitiveLog: CancelResourceRequestOutput.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: CancelResourceRequestCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_json1_0CancelResourceRequestCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_json1_0CancelResourceRequestCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-cloudcontrol/src/commands/CreateResourceCommand.ts b/clients/client-cloudcontrol/src/commands/CreateResourceCommand.ts new file mode 100644 index 0000000000000..51e25e362438a --- /dev/null +++ b/clients/client-cloudcontrol/src/commands/CreateResourceCommand.ts @@ -0,0 +1,99 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { CloudControlClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudControlClient"; +import { CreateResourceInput, CreateResourceOutput } from "../models/models_0"; +import { + deserializeAws_json1_0CreateResourceCommand, + serializeAws_json1_0CreateResourceCommand, +} from "../protocols/Aws_json1_0"; + +export interface CreateResourceCommandInput extends CreateResourceInput {} +export interface CreateResourceCommandOutput extends CreateResourceOutput, __MetadataBearer {} + +/** + *

Creates the specified resource. For more information, see Creating a + * resource in the Amazon Web Services Cloud Control API User Guide.

+ *

After you have initiated a resource creation request, you can monitor the progress of your + * request by calling GetResourceRequestStatus using the RequestToken of the + * ProgressEvent type returned by CreateResource.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { CloudControlClient, CreateResourceCommand } from "@aws-sdk/client-cloudcontrol"; // ES Modules import + * // const { CloudControlClient, CreateResourceCommand } = require("@aws-sdk/client-cloudcontrol"); // CommonJS import + * const client = new CloudControlClient(config); + * const command = new CreateResourceCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link CreateResourceCommandInput} for command's `input` shape. + * @see {@link CreateResourceCommandOutput} for command's `response` shape. + * @see {@link CloudControlClientResolvedConfig | config} for command's `input` shape. + * + */ +export class CreateResourceCommand extends $Command< + CreateResourceCommandInput, + CreateResourceCommandOutput, + CloudControlClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: CreateResourceCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: CloudControlClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "CloudControlClient"; + const commandName = "CreateResourceCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: CreateResourceInput.filterSensitiveLog, + outputFilterSensitiveLog: CreateResourceOutput.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: CreateResourceCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_json1_0CreateResourceCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_json1_0CreateResourceCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-cloudcontrol/src/commands/DeleteResourceCommand.ts b/clients/client-cloudcontrol/src/commands/DeleteResourceCommand.ts new file mode 100644 index 0000000000000..c1d2c6ed20174 --- /dev/null +++ b/clients/client-cloudcontrol/src/commands/DeleteResourceCommand.ts @@ -0,0 +1,99 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { CloudControlClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudControlClient"; +import { DeleteResourceInput, DeleteResourceOutput } from "../models/models_0"; +import { + deserializeAws_json1_0DeleteResourceCommand, + serializeAws_json1_0DeleteResourceCommand, +} from "../protocols/Aws_json1_0"; + +export interface DeleteResourceCommandInput extends DeleteResourceInput {} +export interface DeleteResourceCommandOutput extends DeleteResourceOutput, __MetadataBearer {} + +/** + *

Deletes the specified resource. For details, see Deleting a + * resource in the Amazon Web Services Cloud Control API User Guide.

+ *

After you have initiated a resource deletion request, you can monitor the progress of your + * request by calling GetResourceRequestStatus using the RequestToken of the + * ProgressEvent returned by DeleteResource.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { CloudControlClient, DeleteResourceCommand } from "@aws-sdk/client-cloudcontrol"; // ES Modules import + * // const { CloudControlClient, DeleteResourceCommand } = require("@aws-sdk/client-cloudcontrol"); // CommonJS import + * const client = new CloudControlClient(config); + * const command = new DeleteResourceCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link DeleteResourceCommandInput} for command's `input` shape. + * @see {@link DeleteResourceCommandOutput} for command's `response` shape. + * @see {@link CloudControlClientResolvedConfig | config} for command's `input` shape. + * + */ +export class DeleteResourceCommand extends $Command< + DeleteResourceCommandInput, + DeleteResourceCommandOutput, + CloudControlClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DeleteResourceCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: CloudControlClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "CloudControlClient"; + const commandName = "DeleteResourceCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: DeleteResourceInput.filterSensitiveLog, + outputFilterSensitiveLog: DeleteResourceOutput.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: DeleteResourceCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_json1_0DeleteResourceCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_json1_0DeleteResourceCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-cloudcontrol/src/commands/GetResourceCommand.ts b/clients/client-cloudcontrol/src/commands/GetResourceCommand.ts new file mode 100644 index 0000000000000..1430a3cae6ab5 --- /dev/null +++ b/clients/client-cloudcontrol/src/commands/GetResourceCommand.ts @@ -0,0 +1,98 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { CloudControlClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudControlClient"; +import { GetResourceInput, GetResourceOutput } from "../models/models_0"; +import { + deserializeAws_json1_0GetResourceCommand, + serializeAws_json1_0GetResourceCommand, +} from "../protocols/Aws_json1_0"; + +export interface GetResourceCommandInput extends GetResourceInput {} +export interface GetResourceCommandOutput extends GetResourceOutput, __MetadataBearer {} + +/** + *

Returns information about the current state of the specified resource. For details, see + * Reading a resource's current state.

+ *

You can use this action to return information about an existing resource in your account + * and Amazon Web Services Region, whether or not those resources were provisioned using Cloud Control API.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { CloudControlClient, GetResourceCommand } from "@aws-sdk/client-cloudcontrol"; // ES Modules import + * // const { CloudControlClient, GetResourceCommand } = require("@aws-sdk/client-cloudcontrol"); // CommonJS import + * const client = new CloudControlClient(config); + * const command = new GetResourceCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link GetResourceCommandInput} for command's `input` shape. + * @see {@link GetResourceCommandOutput} for command's `response` shape. + * @see {@link CloudControlClientResolvedConfig | config} for command's `input` shape. + * + */ +export class GetResourceCommand extends $Command< + GetResourceCommandInput, + GetResourceCommandOutput, + CloudControlClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetResourceCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: CloudControlClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "CloudControlClient"; + const commandName = "GetResourceCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: GetResourceInput.filterSensitiveLog, + outputFilterSensitiveLog: GetResourceOutput.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: GetResourceCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_json1_0GetResourceCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_json1_0GetResourceCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-cloudcontrol/src/commands/GetResourceRequestStatusCommand.ts b/clients/client-cloudcontrol/src/commands/GetResourceRequestStatusCommand.ts new file mode 100644 index 0000000000000..eee376bdd9e13 --- /dev/null +++ b/clients/client-cloudcontrol/src/commands/GetResourceRequestStatusCommand.ts @@ -0,0 +1,97 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { CloudControlClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudControlClient"; +import { GetResourceRequestStatusInput, GetResourceRequestStatusOutput } from "../models/models_0"; +import { + deserializeAws_json1_0GetResourceRequestStatusCommand, + serializeAws_json1_0GetResourceRequestStatusCommand, +} from "../protocols/Aws_json1_0"; + +export interface GetResourceRequestStatusCommandInput extends GetResourceRequestStatusInput {} +export interface GetResourceRequestStatusCommandOutput extends GetResourceRequestStatusOutput, __MetadataBearer {} + +/** + *

Returns the current status of a resource operation request. For more information, see + * Tracking the progress of resource operation requests in the + * Amazon Web Services Cloud Control API User Guide.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { CloudControlClient, GetResourceRequestStatusCommand } from "@aws-sdk/client-cloudcontrol"; // ES Modules import + * // const { CloudControlClient, GetResourceRequestStatusCommand } = require("@aws-sdk/client-cloudcontrol"); // CommonJS import + * const client = new CloudControlClient(config); + * const command = new GetResourceRequestStatusCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link GetResourceRequestStatusCommandInput} for command's `input` shape. + * @see {@link GetResourceRequestStatusCommandOutput} for command's `response` shape. + * @see {@link CloudControlClientResolvedConfig | config} for command's `input` shape. + * + */ +export class GetResourceRequestStatusCommand extends $Command< + GetResourceRequestStatusCommandInput, + GetResourceRequestStatusCommandOutput, + CloudControlClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetResourceRequestStatusCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: CloudControlClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "CloudControlClient"; + const commandName = "GetResourceRequestStatusCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: GetResourceRequestStatusInput.filterSensitiveLog, + outputFilterSensitiveLog: GetResourceRequestStatusOutput.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: GetResourceRequestStatusCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_json1_0GetResourceRequestStatusCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_json1_0GetResourceRequestStatusCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-cloudcontrol/src/commands/ListResourceRequestsCommand.ts b/clients/client-cloudcontrol/src/commands/ListResourceRequestsCommand.ts new file mode 100644 index 0000000000000..c98acf48c8d9f --- /dev/null +++ b/clients/client-cloudcontrol/src/commands/ListResourceRequestsCommand.ts @@ -0,0 +1,100 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { CloudControlClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudControlClient"; +import { ListResourceRequestsInput, ListResourceRequestsOutput } from "../models/models_0"; +import { + deserializeAws_json1_0ListResourceRequestsCommand, + serializeAws_json1_0ListResourceRequestsCommand, +} from "../protocols/Aws_json1_0"; + +export interface ListResourceRequestsCommandInput extends ListResourceRequestsInput {} +export interface ListResourceRequestsCommandOutput extends ListResourceRequestsOutput, __MetadataBearer {} + +/** + *

Returns existing resource operation requests. This includes requests of all status types. + * For more information, see Listing active resource operation requests in the + * Amazon Web Services Cloud Control API User Guide.

+ * + *

Resource operation requests expire after seven days.

+ *
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { CloudControlClient, ListResourceRequestsCommand } from "@aws-sdk/client-cloudcontrol"; // ES Modules import + * // const { CloudControlClient, ListResourceRequestsCommand } = require("@aws-sdk/client-cloudcontrol"); // CommonJS import + * const client = new CloudControlClient(config); + * const command = new ListResourceRequestsCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link ListResourceRequestsCommandInput} for command's `input` shape. + * @see {@link ListResourceRequestsCommandOutput} for command's `response` shape. + * @see {@link CloudControlClientResolvedConfig | config} for command's `input` shape. + * + */ +export class ListResourceRequestsCommand extends $Command< + ListResourceRequestsCommandInput, + ListResourceRequestsCommandOutput, + CloudControlClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: ListResourceRequestsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: CloudControlClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "CloudControlClient"; + const commandName = "ListResourceRequestsCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: ListResourceRequestsInput.filterSensitiveLog, + outputFilterSensitiveLog: ListResourceRequestsOutput.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: ListResourceRequestsCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_json1_0ListResourceRequestsCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_json1_0ListResourceRequestsCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-cloudcontrol/src/commands/ListResourcesCommand.ts b/clients/client-cloudcontrol/src/commands/ListResourcesCommand.ts new file mode 100644 index 0000000000000..34e00564d57bb --- /dev/null +++ b/clients/client-cloudcontrol/src/commands/ListResourcesCommand.ts @@ -0,0 +1,98 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { CloudControlClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudControlClient"; +import { ListResourcesInput, ListResourcesOutput } from "../models/models_0"; +import { + deserializeAws_json1_0ListResourcesCommand, + serializeAws_json1_0ListResourcesCommand, +} from "../protocols/Aws_json1_0"; + +export interface ListResourcesCommandInput extends ListResourcesInput {} +export interface ListResourcesCommandOutput extends ListResourcesOutput, __MetadataBearer {} + +/** + *

Returns information about the specified resources. For more information, see Discovering + * resources in the Amazon Web Services Cloud Control API User Guide.

+ *

You can use this action to return information about existing resources in your account and + * Amazon Web Services Region, whether or not those resources were provisioned using Cloud Control API.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { CloudControlClient, ListResourcesCommand } from "@aws-sdk/client-cloudcontrol"; // ES Modules import + * // const { CloudControlClient, ListResourcesCommand } = require("@aws-sdk/client-cloudcontrol"); // CommonJS import + * const client = new CloudControlClient(config); + * const command = new ListResourcesCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link ListResourcesCommandInput} for command's `input` shape. + * @see {@link ListResourcesCommandOutput} for command's `response` shape. + * @see {@link CloudControlClientResolvedConfig | config} for command's `input` shape. + * + */ +export class ListResourcesCommand extends $Command< + ListResourcesCommandInput, + ListResourcesCommandOutput, + CloudControlClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: ListResourcesCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: CloudControlClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "CloudControlClient"; + const commandName = "ListResourcesCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: ListResourcesInput.filterSensitiveLog, + outputFilterSensitiveLog: ListResourcesOutput.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: ListResourcesCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_json1_0ListResourcesCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_json1_0ListResourcesCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-cloudcontrol/src/commands/UpdateResourceCommand.ts b/clients/client-cloudcontrol/src/commands/UpdateResourceCommand.ts new file mode 100644 index 0000000000000..913af5de3c705 --- /dev/null +++ b/clients/client-cloudcontrol/src/commands/UpdateResourceCommand.ts @@ -0,0 +1,107 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { CloudControlClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudControlClient"; +import { UpdateResourceInput, UpdateResourceOutput } from "../models/models_0"; +import { + deserializeAws_json1_0UpdateResourceCommand, + serializeAws_json1_0UpdateResourceCommand, +} from "../protocols/Aws_json1_0"; + +export interface UpdateResourceCommandInput extends UpdateResourceInput {} +export interface UpdateResourceCommandOutput extends UpdateResourceOutput, __MetadataBearer {} + +/** + *

Updates the specified property values in the resource.

+ *

You specify your resource property updates as a list of patch operations contained in a + * JSON patch document that adheres to the + * RFC 6902 - JavaScript Object + * Notation (JSON) Patch + * standard.

+ *

For details on how Cloud Control API performs resource update operations, see Updating a resource in the Amazon Web Services Cloud Control API User Guide.

+ *

After you have initiated a resource update request, you can monitor the progress of your + * request by calling GetResourceRequestStatus using the RequestToken of the + * ProgressEvent returned by UpdateResource.

+ *

For more information about the properties of a specific resource, refer to the related + * topic for the resource in the Resource and property types reference in the Amazon Web Services + * CloudFormation Users Guide.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { CloudControlClient, UpdateResourceCommand } from "@aws-sdk/client-cloudcontrol"; // ES Modules import + * // const { CloudControlClient, UpdateResourceCommand } = require("@aws-sdk/client-cloudcontrol"); // CommonJS import + * const client = new CloudControlClient(config); + * const command = new UpdateResourceCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link UpdateResourceCommandInput} for command's `input` shape. + * @see {@link UpdateResourceCommandOutput} for command's `response` shape. + * @see {@link CloudControlClientResolvedConfig | config} for command's `input` shape. + * + */ +export class UpdateResourceCommand extends $Command< + UpdateResourceCommandInput, + UpdateResourceCommandOutput, + CloudControlClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: UpdateResourceCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: CloudControlClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "CloudControlClient"; + const commandName = "UpdateResourceCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: UpdateResourceInput.filterSensitiveLog, + outputFilterSensitiveLog: UpdateResourceOutput.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: UpdateResourceCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_json1_0UpdateResourceCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_json1_0UpdateResourceCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-cloudcontrol/src/endpoints.ts b/clients/client-cloudcontrol/src/endpoints.ts new file mode 100644 index 0000000000000..4c604e0a8901a --- /dev/null +++ b/clients/client-cloudcontrol/src/endpoints.ts @@ -0,0 +1,91 @@ +import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; +import { RegionInfoProvider } from "@aws-sdk/types"; + +const regionHash: RegionHash = { + "fips-ca-central-1": { + hostname: "cloudcontrolapi-fips.ca-central-1.amazonaws.com", + signingRegion: "ca-central-1", + }, + "fips-us-east-1": { + hostname: "cloudcontrolapi-fips.us-east-1.amazonaws.com", + signingRegion: "us-east-1", + }, + "fips-us-east-2": { + hostname: "cloudcontrolapi-fips.us-east-2.amazonaws.com", + signingRegion: "us-east-2", + }, + "fips-us-gov-east-1": { + hostname: "cloudcontrolapi-fips.us-gov-east-1.amazonaws.com", + signingRegion: "us-gov-east-1", + }, + "fips-us-gov-west-1": { + hostname: "cloudcontrolapi-fips.us-gov-west-1.amazonaws.com", + signingRegion: "us-gov-west-1", + }, + "fips-us-west-1": { + hostname: "cloudcontrolapi-fips.us-west-1.amazonaws.com", + signingRegion: "us-west-1", + }, + "fips-us-west-2": { + hostname: "cloudcontrolapi-fips.us-west-2.amazonaws.com", + signingRegion: "us-west-2", + }, +}; + +const partitionHash: PartitionHash = { + aws: { + regions: [ + "af-south-1", + "ap-east-1", + "ap-northeast-1", + "ap-northeast-2", + "ap-northeast-3", + "ap-south-1", + "ap-southeast-1", + "ap-southeast-2", + "ca-central-1", + "eu-central-1", + "eu-north-1", + "eu-south-1", + "eu-west-1", + "eu-west-2", + "eu-west-3", + "fips-ca-central-1", + "fips-us-east-1", + "fips-us-east-2", + "fips-us-west-1", + "fips-us-west-2", + "me-south-1", + "sa-east-1", + "us-east-1", + "us-east-2", + "us-west-1", + "us-west-2", + ], + hostname: "cloudcontrolapi.{region}.amazonaws.com", + }, + "aws-cn": { + regions: ["cn-north-1", "cn-northwest-1"], + hostname: "cloudcontrolapi.{region}.amazonaws.com.cn", + }, + "aws-iso": { + regions: ["us-iso-east-1"], + hostname: "cloudcontrolapi.{region}.c2s.ic.gov", + }, + "aws-iso-b": { + regions: ["us-isob-east-1"], + hostname: "cloudcontrolapi.{region}.sc2s.sgov.gov", + }, + "aws-us-gov": { + regions: ["fips-us-gov-east-1", "fips-us-gov-west-1", "us-gov-east-1", "us-gov-west-1"], + hostname: "cloudcontrolapi.{region}.amazonaws.com", + }, +}; + +export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => + getRegionInfo(region, { + ...options, + signingService: "cloudcontrolapi", + regionHash, + partitionHash, + }); diff --git a/clients/client-cloudcontrol/src/index.ts b/clients/client-cloudcontrol/src/index.ts new file mode 100644 index 0000000000000..e63138ac95b77 --- /dev/null +++ b/clients/client-cloudcontrol/src/index.ts @@ -0,0 +1,15 @@ +export * from "./CloudControlClient"; +export * from "./CloudControl"; +export * from "./commands/CancelResourceRequestCommand"; +export * from "./commands/CreateResourceCommand"; +export * from "./commands/DeleteResourceCommand"; +export * from "./commands/GetResourceCommand"; +export * from "./commands/GetResourceRequestStatusCommand"; +export * from "./waiters/waitForResourceRequestSuccess"; +export * from "./commands/ListResourceRequestsCommand"; +export * from "./pagination/ListResourceRequestsPaginator"; +export * from "./commands/ListResourcesCommand"; +export * from "./pagination/ListResourcesPaginator"; +export * from "./commands/UpdateResourceCommand"; +export * from "./pagination/Interfaces"; +export * from "./models/index"; diff --git a/clients/client-cloudcontrol/src/models/index.ts b/clients/client-cloudcontrol/src/models/index.ts new file mode 100644 index 0000000000000..09c5d6e09b8c5 --- /dev/null +++ b/clients/client-cloudcontrol/src/models/index.ts @@ -0,0 +1 @@ +export * from "./models_0"; diff --git a/clients/client-cloudcontrol/src/models/models_0.ts b/clients/client-cloudcontrol/src/models/models_0.ts new file mode 100644 index 0000000000000..5d65759d1bcd2 --- /dev/null +++ b/clients/client-cloudcontrol/src/models/models_0.ts @@ -0,0 +1,1102 @@ +import { SENSITIVE_STRING } from "@aws-sdk/smithy-client"; +import { MetadataBearer as $MetadataBearer, SmithyException as __SmithyException } from "@aws-sdk/types"; + +/** + *

The resource with the name requested already exists.

+ */ +export interface AlreadyExistsException extends __SmithyException, $MetadataBearer { + name: "AlreadyExistsException"; + $fault: "client"; + Message?: string; +} + +export namespace AlreadyExistsException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: AlreadyExistsException): any => ({ + ...obj, + }); +} + +export interface CancelResourceRequestInput { + /** + *

The RequestToken of the ProgressEvent object returned by the + * resource operation request.

+ */ + RequestToken: string | undefined; +} + +export namespace CancelResourceRequestInput { + /** + * @internal + */ + export const filterSensitiveLog = (obj: CancelResourceRequestInput): any => ({ + ...obj, + }); +} + +export enum HandlerErrorCode { + ACCESS_DENIED = "AccessDenied", + ALREADY_EXISTS = "AlreadyExists", + GENERAL_SERVICE_EXCEPTION = "GeneralServiceException", + INTERNAL_FAILURE = "InternalFailure", + INVALID_CREDENTIALS = "InvalidCredentials", + INVALID_REQUEST = "InvalidRequest", + NETWORK_FAILURE = "NetworkFailure", + NOT_FOUND = "NotFound", + NOT_STABILIZED = "NotStabilized", + NOT_UPDATABLE = "NotUpdatable", + RESOURCE_CONFLICT = "ResourceConflict", + SERVICE_INTERNAL_ERROR = "ServiceInternalError", + SERVICE_LIMIT_EXCEEDED = "ServiceLimitExceeded", + SERVICE_TIMEOUT = "ServiceTimeout", + THROTTLING = "Throttling", +} + +export enum Operation { + CREATE = "CREATE", + DELETE = "DELETE", + UPDATE = "UPDATE", +} + +export enum OperationStatus { + CANCEL_COMPLETE = "CANCEL_COMPLETE", + CANCEL_IN_PROGRESS = "CANCEL_IN_PROGRESS", + FAILED = "FAILED", + IN_PROGRESS = "IN_PROGRESS", + PENDING = "PENDING", + SUCCESS = "SUCCESS", +} + +/** + *

Represents the current status of a resource operation request. For more information, see + * Managing resource operation requests in the + * Amazon Web Services Cloud Control API User Guide.

+ */ +export interface ProgressEvent { + /** + *

The name of the resource type used in the operation.

+ */ + TypeName?: string; + + /** + *

The primary identifier for the resource.

+ * + *

In some cases, the resource identifier may be available before the resource operation + * has reached a status of SUCCESS.

+ *
+ */ + Identifier?: string; + + /** + *

The unique token representing this resource operation request.

+ *

Use the RequestToken with GetResourceRequestStatus to return the current status of a resource operation + * request.

+ */ + RequestToken?: string; + + /** + *

The resource operation type.

+ */ + Operation?: Operation | string; + + /** + *

The current status of the resource operation request.

+ *
    + *
  • + *

    + * PENDING: The resource operation has not yet started.

    + *
  • + *
  • + *

    + * IN_PROGRESS: The resource operation is currently in progress.

    + *
  • + *
  • + *

    + * SUCCESS: The resource operation has successfully completed.

    + *
  • + *
  • + *

    + * FAILED: The resource operation has failed. Refer to the error code and + * status message for more information.

    + *
  • + *
  • + *

    + * CANCEL_IN_PROGRESS: The resource operation is in the process of being + * canceled.

    + *
  • + *
  • + *

    + * CANCEL_COMPLETE: The resource operation has been canceled.

    + *
  • + *
+ */ + OperationStatus?: OperationStatus | string; + + /** + *

When the resource operation request was initiated.

+ */ + EventTime?: Date; + + /** + *

A JSON string containing the resource model, consisting of each resource property and its + * current value.

+ */ + ResourceModel?: string; + + /** + *

Any message explaining the current status.

+ */ + StatusMessage?: string; + + /** + *

For requests with a status of FAILED, the associated error code.

+ *

For error code definitions, see Handler error codes in the CloudFormation Command + * Line Interface User Guide for Extension Development.

+ */ + ErrorCode?: HandlerErrorCode | string; + + /** + *

When to next request the status of this resource operation request.

+ */ + RetryAfter?: Date; +} + +export namespace ProgressEvent { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ProgressEvent): any => ({ + ...obj, + ...(obj.ResourceModel && { ResourceModel: SENSITIVE_STRING }), + }); +} + +export interface CancelResourceRequestOutput { + /** + *

Represents the current status of a resource operation request. For more information, see + * Managing resource operation requests in the + * Amazon Web Services Cloud Control API User Guide.

+ */ + ProgressEvent?: ProgressEvent; +} + +export namespace CancelResourceRequestOutput { + /** + * @internal + */ + export const filterSensitiveLog = (obj: CancelResourceRequestOutput): any => ({ + ...obj, + ...(obj.ProgressEvent && { ProgressEvent: ProgressEvent.filterSensitiveLog(obj.ProgressEvent) }), + }); +} + +/** + *

The resource is currently being modified by another operation.

+ */ +export interface ConcurrentModificationException extends __SmithyException, $MetadataBearer { + name: "ConcurrentModificationException"; + $fault: "server"; + Message?: string; +} + +export namespace ConcurrentModificationException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ConcurrentModificationException): any => ({ + ...obj, + }); +} + +/** + *

A resource operation with the specified request token cannot be found.

+ */ +export interface RequestTokenNotFoundException extends __SmithyException, $MetadataBearer { + name: "RequestTokenNotFoundException"; + $fault: "client"; + Message?: string; +} + +export namespace RequestTokenNotFoundException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: RequestTokenNotFoundException): any => ({ + ...obj, + }); +} + +/** + *

The specified client token has already been used in another resource request.

+ *

It is best practice for client tokens to be unique for each resource operation request. + * However, client token expire after 36 hours.

+ */ +export interface ClientTokenConflictException extends __SmithyException, $MetadataBearer { + name: "ClientTokenConflictException"; + $fault: "client"; + Message?: string; +} + +export namespace ClientTokenConflictException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ClientTokenConflictException): any => ({ + ...obj, + }); +} + +/** + *

Another resource operation is currently being performed on this resource.

+ */ +export interface ConcurrentOperationException extends __SmithyException, $MetadataBearer { + name: "ConcurrentOperationException"; + $fault: "client"; + Message?: string; +} + +export namespace ConcurrentOperationException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ConcurrentOperationException): any => ({ + ...obj, + }); +} + +export interface CreateResourceInput { + /** + *

The name of the resource type.

+ */ + TypeName: string | undefined; + + /** + *

For private resource types, the type version to use in this resource operation. If you do not specify a resource version, CloudFormation uses the default version.

+ */ + TypeVersionId?: string; + + /** + *

The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) for Cloud Control API to use when performing this resource operation. The role specified must have the permissions required for this operation. The necessary permissions for each event handler are defined in the + * handlers + * section of the resource type definition schema.

+ *

If you do not specify a role, Cloud Control API uses a temporary session created using your Amazon Web Services user credentials.

+ *

For more information, see Specifying credentials in the Amazon Web Services Cloud Control API User Guide.

+ */ + RoleArn?: string; + + /** + *

A unique identifier to ensure the idempotency of the resource request. As a best practice, specify this token to ensure idempotency, so that Amazon Web Services Cloud Control API can accurately distinguish between request retries and new resource requests. You might retry a resource request to ensure that it was successfully received.

+ *

A client token is valid for 36 hours once used. After that, a resource request with the same client token is treated as a new request.

+ *

If you do not specify a client token, one is generated for inclusion in the request.

+ *

For more information, see Ensuring resource operation requests are unique in the Amazon Web Services Cloud Control API User Guide.

+ */ + ClientToken?: string; + + /** + *

Structured data format representing the desired state of the resource, consisting of that + * resource's properties and their desired values.

+ * + *

Cloud Control API currently supports JSON as a structured data format.

+ *
+ * + *

Specify the desired state as one of the following:

+ *
    + *
  • + *

    A JSON blob

    + *
  • + *
  • + *

    A local path containing the desired state in JSON data format

    + *
  • + *
+ *

For more information, see Composing the desired state of the resource in the Amazon Web Services Cloud Control API User + * Guide.

+ *

For more information about the properties of a specific resource, refer to the related + * topic for the resource in the Resource and property types reference in the Amazon Web Services + * CloudFormation Users Guide.

+ */ + DesiredState: string | undefined; +} + +export namespace CreateResourceInput { + /** + * @internal + */ + export const filterSensitiveLog = (obj: CreateResourceInput): any => ({ + ...obj, + ...(obj.DesiredState && { DesiredState: SENSITIVE_STRING }), + }); +} + +export interface CreateResourceOutput { + /** + *

Represents the current status of the resource creation request.

+ *

After you have initiated a resource creation request, you can monitor the progress of your + * request by calling GetResourceRequestStatus using the RequestToken of the + * ProgressEvent returned by CreateResource.

+ */ + ProgressEvent?: ProgressEvent; +} + +export namespace CreateResourceOutput { + /** + * @internal + */ + export const filterSensitiveLog = (obj: CreateResourceOutput): any => ({ + ...obj, + ...(obj.ProgressEvent && { ProgressEvent: ProgressEvent.filterSensitiveLog(obj.ProgressEvent) }), + }); +} + +/** + *

The resource handler has returned that the downstream service generated an error that does + * not map to any other handler error code.

+ */ +export interface GeneralServiceException extends __SmithyException, $MetadataBearer { + name: "GeneralServiceException"; + $fault: "client"; + Message?: string; +} + +export namespace GeneralServiceException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GeneralServiceException): any => ({ + ...obj, + }); +} + +/** + *

The resource handler has failed without a returning a more specific error code. This can + * include timeouts.

+ */ +export interface HandlerFailureException extends __SmithyException, $MetadataBearer { + name: "HandlerFailureException"; + $fault: "server"; + Message?: string; +} + +export namespace HandlerFailureException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: HandlerFailureException): any => ({ + ...obj, + }); +} + +/** + *

The resource handler has returned that an unexpected error occurred within the resource + * handler.

+ */ +export interface HandlerInternalFailureException extends __SmithyException, $MetadataBearer { + name: "HandlerInternalFailureException"; + $fault: "server"; + Message?: string; +} + +export namespace HandlerInternalFailureException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: HandlerInternalFailureException): any => ({ + ...obj, + }); +} + +/** + *

The resource handler has returned that the credentials provided by the user are + * invalid.

+ */ +export interface InvalidCredentialsException extends __SmithyException, $MetadataBearer { + name: "InvalidCredentialsException"; + $fault: "client"; + Message?: string; +} + +export namespace InvalidCredentialsException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: InvalidCredentialsException): any => ({ + ...obj, + }); +} + +/** + *

The resource handler has returned that invalid input from the user has generated a generic + * exception.

+ */ +export interface InvalidRequestException extends __SmithyException, $MetadataBearer { + name: "InvalidRequestException"; + $fault: "client"; + Message?: string; +} + +export namespace InvalidRequestException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: InvalidRequestException): any => ({ + ...obj, + }); +} + +/** + *

The resource handler has returned that the request could not be completed due to + * networking issues, such as a failure to receive a response from the server.

+ */ +export interface NetworkFailureException extends __SmithyException, $MetadataBearer { + name: "NetworkFailureException"; + $fault: "server"; + Message?: string; +} + +export namespace NetworkFailureException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: NetworkFailureException): any => ({ + ...obj, + }); +} + +/** + *

The resource handler has returned that the downstream resource failed to complete all of + * its ready-state checks.

+ */ +export interface NotStabilizedException extends __SmithyException, $MetadataBearer { + name: "NotStabilizedException"; + $fault: "client"; + Message?: string; +} + +export namespace NotStabilizedException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: NotStabilizedException): any => ({ + ...obj, + }); +} + +/** + *

One or more properties included in this resource operation are defined as create-only, and + * therefore cannot be updated.

+ */ +export interface NotUpdatableException extends __SmithyException, $MetadataBearer { + name: "NotUpdatableException"; + $fault: "client"; + Message?: string; +} + +export namespace NotUpdatableException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: NotUpdatableException): any => ({ + ...obj, + }); +} + +/** + *

Cloud Control API has not received a valid response from the resource handler, due to a + * configuration error. This includes issues such as the resource handler returning an invalid + * response, or timing out.

+ */ +export interface PrivateTypeException extends __SmithyException, $MetadataBearer { + name: "PrivateTypeException"; + $fault: "client"; + Message?: string; +} + +export namespace PrivateTypeException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: PrivateTypeException): any => ({ + ...obj, + }); +} + +/** + *

The resource is temporarily unavailable to be acted upon. For example, if the resource is + * currently undergoing an operation and cannot be acted upon until that operation is + * finished.

+ */ +export interface ResourceConflictException extends __SmithyException, $MetadataBearer { + name: "ResourceConflictException"; + $fault: "client"; + Message?: string; +} + +export namespace ResourceConflictException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ResourceConflictException): any => ({ + ...obj, + }); +} + +/** + *

A resource with the specified identifier cannot be found.

+ */ +export interface ResourceNotFoundException extends __SmithyException, $MetadataBearer { + name: "ResourceNotFoundException"; + $fault: "client"; + Message?: string; +} + +export namespace ResourceNotFoundException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ResourceNotFoundException): any => ({ + ...obj, + }); +} + +/** + *

The resource handler has returned that the downstream service returned an internal error, + * typically with a 5XX HTTP status code.

+ */ +export interface ServiceInternalErrorException extends __SmithyException, $MetadataBearer { + name: "ServiceInternalErrorException"; + $fault: "server"; + Message?: string; +} + +export namespace ServiceInternalErrorException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ServiceInternalErrorException): any => ({ + ...obj, + }); +} + +/** + *

The resource handler has returned that a non-transient resource limit was reached on the + * service side.

+ */ +export interface ServiceLimitExceededException extends __SmithyException, $MetadataBearer { + name: "ServiceLimitExceededException"; + $fault: "client"; + Message?: string; +} + +export namespace ServiceLimitExceededException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ServiceLimitExceededException): any => ({ + ...obj, + }); +} + +/** + *

The request was denied due to request throttling.

+ */ +export interface ThrottlingException extends __SmithyException, $MetadataBearer { + name: "ThrottlingException"; + $fault: "client"; + Message?: string; +} + +export namespace ThrottlingException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ThrottlingException): any => ({ + ...obj, + }); +} + +/** + *

The specified extension does not exist in the CloudFormation registry.

+ */ +export interface TypeNotFoundException extends __SmithyException, $MetadataBearer { + name: "TypeNotFoundException"; + $fault: "client"; + Message?: string; +} + +export namespace TypeNotFoundException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: TypeNotFoundException): any => ({ + ...obj, + }); +} + +/** + *

The specified resource does not support this resource operation.

+ */ +export interface UnsupportedActionException extends __SmithyException, $MetadataBearer { + name: "UnsupportedActionException"; + $fault: "client"; + Message?: string; +} + +export namespace UnsupportedActionException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UnsupportedActionException): any => ({ + ...obj, + }); +} + +export interface DeleteResourceInput { + /** + *

The name of the resource type.

+ */ + TypeName: string | undefined; + + /** + *

For private resource types, the type version to use in this resource operation. If you do not specify a resource version, CloudFormation uses the default version.

+ */ + TypeVersionId?: string; + + /** + *

The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) for Cloud Control API to use when performing this resource operation. The role specified must have the permissions required for this operation. The necessary permissions for each event handler are defined in the + * handlers + * section of the resource type definition schema.

+ *

If you do not specify a role, Cloud Control API uses a temporary session created using your Amazon Web Services user credentials.

+ *

For more information, see Specifying credentials in the Amazon Web Services Cloud Control API User Guide.

+ */ + RoleArn?: string; + + /** + *

A unique identifier to ensure the idempotency of the resource request. As a best practice, specify this token to ensure idempotency, so that Amazon Web Services Cloud Control API can accurately distinguish between request retries and new resource requests. You might retry a resource request to ensure that it was successfully received.

+ *

A client token is valid for 36 hours once used. After that, a resource request with the same client token is treated as a new request.

+ *

If you do not specify a client token, one is generated for inclusion in the request.

+ *

For more information, see Ensuring resource operation requests are unique in the Amazon Web Services Cloud Control API User Guide.

+ */ + ClientToken?: string; + + /** + *

The identifier for the resource.

+ *

You can specify the primary identifier, or any secondary identifier defined for the resource type in its resource schema. You can only specify one identifier. Primary identifiers can be specified as a string or JSON; secondary identifiers must be specified as JSON.

+ *

For compound primary identifiers (that is, one that consists of multiple resource properties strung together), to specify the primary identifier as a string, list the property values in the order they are specified in the primary identifier definition, separated by |.

+ *

For more information, see Identifying resources in the Amazon Web Services Cloud Control API User Guide.

+ */ + Identifier: string | undefined; +} + +export namespace DeleteResourceInput { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DeleteResourceInput): any => ({ + ...obj, + }); +} + +export interface DeleteResourceOutput { + /** + *

Represents the current status of the resource deletion request.

+ *

After you have initiated a resource deletion request, you can monitor the progress of your + * request by calling GetResourceRequestStatus using the RequestToken of the + * ProgressEvent returned by DeleteResource.

+ */ + ProgressEvent?: ProgressEvent; +} + +export namespace DeleteResourceOutput { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DeleteResourceOutput): any => ({ + ...obj, + ...(obj.ProgressEvent && { ProgressEvent: ProgressEvent.filterSensitiveLog(obj.ProgressEvent) }), + }); +} + +export interface GetResourceInput { + /** + *

The name of the resource type.

+ */ + TypeName: string | undefined; + + /** + *

For private resource types, the type version to use in this resource operation. If you do not specify a resource version, CloudFormation uses the default version.

+ */ + TypeVersionId?: string; + + /** + *

The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) for Cloud Control API to use when performing this resource operation. The role specified must have the permissions required for this operation. The necessary permissions for each event handler are defined in the + * handlers + * section of the resource type definition schema.

+ *

If you do not specify a role, Cloud Control API uses a temporary session created using your Amazon Web Services user credentials.

+ *

For more information, see Specifying credentials in the Amazon Web Services Cloud Control API User Guide.

+ */ + RoleArn?: string; + + /** + *

The identifier for the resource.

+ *

You can specify the primary identifier, or any secondary identifier defined for the resource type in its resource schema. You can only specify one identifier. Primary identifiers can be specified as a string or JSON; secondary identifiers must be specified as JSON.

+ *

For compound primary identifiers (that is, one that consists of multiple resource properties strung together), to specify the primary identifier as a string, list the property values in the order they are specified in the primary identifier definition, separated by |.

+ *

For more information, see Identifying resources in the Amazon Web Services Cloud Control API User Guide.

+ */ + Identifier: string | undefined; +} + +export namespace GetResourceInput { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetResourceInput): any => ({ + ...obj, + }); +} + +/** + *

Represents information about a provisioned resource.

+ */ +export interface ResourceDescription { + /** + *

The primary identifier for the resource.

+ *

For more information, see Identifying + * resources in the Amazon Web Services Cloud Control API User Guide.

+ */ + Identifier?: string; + + /** + *

A list of the resource properties and their current values.

+ */ + Properties?: string; +} + +export namespace ResourceDescription { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ResourceDescription): any => ({ + ...obj, + ...(obj.Properties && { Properties: SENSITIVE_STRING }), + }); +} + +export interface GetResourceOutput { + /** + *

The name of the resource type.

+ */ + TypeName?: string; + + /** + *

Represents information about a provisioned resource.

+ */ + ResourceDescription?: ResourceDescription; +} + +export namespace GetResourceOutput { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetResourceOutput): any => ({ + ...obj, + ...(obj.ResourceDescription && { + ResourceDescription: ResourceDescription.filterSensitiveLog(obj.ResourceDescription), + }), + }); +} + +export interface GetResourceRequestStatusInput { + /** + *

A unique token used to track the progress of the resource operation request.

+ *

Request tokens are included in the ProgressEvent type returned by a resource + * operation request.

+ */ + RequestToken: string | undefined; +} + +export namespace GetResourceRequestStatusInput { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetResourceRequestStatusInput): any => ({ + ...obj, + }); +} + +export interface GetResourceRequestStatusOutput { + /** + *

Represents the current status of the resource operation request.

+ */ + ProgressEvent?: ProgressEvent; +} + +export namespace GetResourceRequestStatusOutput { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetResourceRequestStatusOutput): any => ({ + ...obj, + ...(obj.ProgressEvent && { ProgressEvent: ProgressEvent.filterSensitiveLog(obj.ProgressEvent) }), + }); +} + +/** + *

The filter criteria to use in determining the requests returned.

+ */ +export interface ResourceRequestStatusFilter { + /** + *

The operation types to include in the filter.

+ */ + Operations?: (Operation | string)[]; + + /** + *

The operation statuses to include in the filter.

+ *
    + *
  • + *

    + * PENDING: The operation has been requested, but not yet initiated.

    + *
  • + *
  • + *

    + * IN_PROGRESS: The operation is currently in progress.

    + *
  • + *
  • + *

    + * SUCCESS: The operation has successfully completed.

    + *
  • + *
  • + *

    + * FAILED: The operation has failed.

    + *
  • + *
  • + *

    + * CANCEL_IN_PROGRESS: The operation is currently in the process of being + * canceled.

    + *
  • + *
  • + *

    + * CANCEL_COMPLETE: The operation has been canceled.

    + *
  • + *
+ */ + OperationStatuses?: (OperationStatus | string)[]; +} + +export namespace ResourceRequestStatusFilter { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ResourceRequestStatusFilter): any => ({ + ...obj, + }); +} + +export interface ListResourceRequestsInput { + /** + *

The maximum number of results to be returned with a single call. If the number of + * available results exceeds this maximum, the response includes a NextToken value + * that you can assign to the NextToken request parameter to get the next set of + * results.

+ *

The default is 20.

+ */ + MaxResults?: number; + + /** + *

If the previous paginated request didn't return all of the remaining results, the response object's NextToken parameter value is set to a token. To retrieve the next set of results, call this action again and assign that token to the request object's NextToken parameter. If there are no remaining results, the previous response object's NextToken parameter is set to null.

+ */ + NextToken?: string; + + /** + *

The filter criteria to apply to the requests returned.

+ */ + ResourceRequestStatusFilter?: ResourceRequestStatusFilter; +} + +export namespace ListResourceRequestsInput { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ListResourceRequestsInput): any => ({ + ...obj, + }); +} + +export interface ListResourceRequestsOutput { + /** + *

The requests that match the specified filter criteria.

+ */ + ResourceRequestStatusSummaries?: ProgressEvent[]; + + /** + *

If the request doesn't return all of the remaining results, NextToken is set to a token. To retrieve the next set of results, call ListResources again and assign that token to the request object's NextToken parameter. If the request returns all results, NextToken is set to null.

+ */ + NextToken?: string; +} + +export namespace ListResourceRequestsOutput { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ListResourceRequestsOutput): any => ({ + ...obj, + ...(obj.ResourceRequestStatusSummaries && { + ResourceRequestStatusSummaries: obj.ResourceRequestStatusSummaries.map((item) => + ProgressEvent.filterSensitiveLog(item) + ), + }), + }); +} + +export interface ListResourcesInput { + /** + *

The name of the resource type.

+ */ + TypeName: string | undefined; + + /** + *

For private resource types, the type version to use in this resource operation. If you do not specify a resource version, CloudFormation uses the default version.

+ */ + TypeVersionId?: string; + + /** + *

The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) for Cloud Control API to use when performing this resource operation. The role specified must have the permissions required for this operation. The necessary permissions for each event handler are defined in the + * handlers + * section of the resource type definition schema.

+ *

If you do not specify a role, Cloud Control API uses a temporary session created using your Amazon Web Services user credentials.

+ *

For more information, see Specifying credentials in the Amazon Web Services Cloud Control API User Guide.

+ */ + RoleArn?: string; + + /** + *

If the previous paginated request didn't return all of the remaining results, the response object's NextToken parameter value is set to a token. To retrieve the next set of results, call this action again and assign that token to the request object's NextToken parameter. If there are no remaining results, the previous response object's NextToken parameter is set to null.

+ */ + NextToken?: string; + + /** + *

The maximum number of results to be returned with a single call. If the number of + * available results exceeds this maximum, the response includes a NextToken value + * that you can assign to the NextToken request parameter to get the next set of + * results.

+ *

The default is 20.

+ */ + MaxResults?: number; + + /** + *

The resource model to use to select the resources to return.

+ */ + ResourceModel?: string; +} + +export namespace ListResourcesInput { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ListResourcesInput): any => ({ + ...obj, + ...(obj.ResourceModel && { ResourceModel: SENSITIVE_STRING }), + }); +} + +export interface ListResourcesOutput { + /** + *

The name of the resource type.

+ */ + TypeName?: string; + + /** + *

Information about the specified resources, including primary identifier and resource + * model.

+ */ + ResourceDescriptions?: ResourceDescription[]; + + /** + *

If the request doesn't return all of the remaining results, NextToken is set to a token. To retrieve the next set of results, call ListResources again and assign that token to the request object's NextToken parameter. If the request returns all results, NextToken is set to null.

+ */ + NextToken?: string; +} + +export namespace ListResourcesOutput { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ListResourcesOutput): any => ({ + ...obj, + ...(obj.ResourceDescriptions && { + ResourceDescriptions: obj.ResourceDescriptions.map((item) => ResourceDescription.filterSensitiveLog(item)), + }), + }); +} + +export interface UpdateResourceInput { + /** + *

The name of the resource type.

+ */ + TypeName: string | undefined; + + /** + *

For private resource types, the type version to use in this resource operation. If you do not specify a resource version, CloudFormation uses the default version.

+ */ + TypeVersionId?: string; + + /** + *

The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) for Cloud Control API to use when performing this resource operation. The role specified must have the permissions required for this operation. The necessary permissions for each event handler are defined in the + * handlers + * section of the resource type definition schema.

+ *

If you do not specify a role, Cloud Control API uses a temporary session created using your Amazon Web Services user credentials.

+ *

For more information, see Specifying credentials in the Amazon Web Services Cloud Control API User Guide.

+ */ + RoleArn?: string; + + /** + *

A unique identifier to ensure the idempotency of the resource request. As a best practice, specify this token to ensure idempotency, so that Amazon Web Services Cloud Control API can accurately distinguish between request retries and new resource requests. You might retry a resource request to ensure that it was successfully received.

+ *

A client token is valid for 36 hours once used. After that, a resource request with the same client token is treated as a new request.

+ *

If you do not specify a client token, one is generated for inclusion in the request.

+ *

For more information, see Ensuring resource operation requests are unique in the Amazon Web Services Cloud Control API User Guide.

+ */ + ClientToken?: string; + + /** + *

The identifier for the resource.

+ *

You can specify the primary identifier, or any secondary identifier defined for the resource type in its resource schema. You can only specify one identifier. Primary identifiers can be specified as a string or JSON; secondary identifiers must be specified as JSON.

+ *

For compound primary identifiers (that is, one that consists of multiple resource properties strung together), to specify the primary identifier as a string, list the property values in the order they are specified in the primary identifier definition, separated by |.

+ *

For more information, see Identifying resources in the Amazon Web Services Cloud Control API User Guide.

+ */ + Identifier: string | undefined; + + /** + *

A JavaScript Object Notation (JSON) document listing the patch operations that represent + * the updates to apply to the current resource properties. For details, see Composing the patch document in the Amazon Web Services Cloud Control API User + * Guide.

+ */ + PatchDocument: string | undefined; +} + +export namespace UpdateResourceInput { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UpdateResourceInput): any => ({ + ...obj, + ...(obj.PatchDocument && { PatchDocument: SENSITIVE_STRING }), + }); +} + +export interface UpdateResourceOutput { + /** + *

Represents the current status of the resource update request.

+ *

Use the RequestToken of the ProgressEvent with GetResourceRequestStatus to return the current status of a resource operation + * request.

+ */ + ProgressEvent?: ProgressEvent; +} + +export namespace UpdateResourceOutput { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UpdateResourceOutput): any => ({ + ...obj, + ...(obj.ProgressEvent && { ProgressEvent: ProgressEvent.filterSensitiveLog(obj.ProgressEvent) }), + }); +} diff --git a/clients/client-cloudcontrol/src/pagination/Interfaces.ts b/clients/client-cloudcontrol/src/pagination/Interfaces.ts new file mode 100644 index 0000000000000..e92f7b06081dc --- /dev/null +++ b/clients/client-cloudcontrol/src/pagination/Interfaces.ts @@ -0,0 +1,8 @@ +import { PaginationConfiguration } from "@aws-sdk/types"; + +import { CloudControl } from "../CloudControl"; +import { CloudControlClient } from "../CloudControlClient"; + +export interface CloudControlPaginationConfiguration extends PaginationConfiguration { + client: CloudControl | CloudControlClient; +} diff --git a/clients/client-cloudcontrol/src/pagination/ListResourceRequestsPaginator.ts b/clients/client-cloudcontrol/src/pagination/ListResourceRequestsPaginator.ts new file mode 100644 index 0000000000000..78f3b70583c76 --- /dev/null +++ b/clients/client-cloudcontrol/src/pagination/ListResourceRequestsPaginator.ts @@ -0,0 +1,59 @@ +import { Paginator } from "@aws-sdk/types"; + +import { CloudControl } from "../CloudControl"; +import { CloudControlClient } from "../CloudControlClient"; +import { + ListResourceRequestsCommand, + ListResourceRequestsCommandInput, + ListResourceRequestsCommandOutput, +} from "../commands/ListResourceRequestsCommand"; +import { CloudControlPaginationConfiguration } from "./Interfaces"; + +/** + * @private + */ +const makePagedClientRequest = async ( + client: CloudControlClient, + input: ListResourceRequestsCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new ListResourceRequestsCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async ( + client: CloudControl, + input: ListResourceRequestsCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.listResourceRequests(input, ...args); +}; +export async function* paginateListResourceRequests( + config: CloudControlPaginationConfiguration, + input: ListResourceRequestsCommandInput, + ...additionalArguments: any +): Paginator { + // ToDo: replace with actual type instead of typeof input.NextToken + let token: typeof input.NextToken | undefined = config.startingToken || undefined; + let hasNext = true; + let page: ListResourceRequestsCommandOutput; + while (hasNext) { + input.NextToken = token; + input["MaxResults"] = config.pageSize; + if (config.client instanceof CloudControl) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } else if (config.client instanceof CloudControlClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected CloudControl | CloudControlClient"); + } + yield page; + token = page.NextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-cloudcontrol/src/pagination/ListResourcesPaginator.ts b/clients/client-cloudcontrol/src/pagination/ListResourcesPaginator.ts new file mode 100644 index 0000000000000..6b11a54235f95 --- /dev/null +++ b/clients/client-cloudcontrol/src/pagination/ListResourcesPaginator.ts @@ -0,0 +1,59 @@ +import { Paginator } from "@aws-sdk/types"; + +import { CloudControl } from "../CloudControl"; +import { CloudControlClient } from "../CloudControlClient"; +import { + ListResourcesCommand, + ListResourcesCommandInput, + ListResourcesCommandOutput, +} from "../commands/ListResourcesCommand"; +import { CloudControlPaginationConfiguration } from "./Interfaces"; + +/** + * @private + */ +const makePagedClientRequest = async ( + client: CloudControlClient, + input: ListResourcesCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new ListResourcesCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async ( + client: CloudControl, + input: ListResourcesCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.listResources(input, ...args); +}; +export async function* paginateListResources( + config: CloudControlPaginationConfiguration, + input: ListResourcesCommandInput, + ...additionalArguments: any +): Paginator { + // ToDo: replace with actual type instead of typeof input.NextToken + let token: typeof input.NextToken | undefined = config.startingToken || undefined; + let hasNext = true; + let page: ListResourcesCommandOutput; + while (hasNext) { + input.NextToken = token; + input["MaxResults"] = config.pageSize; + if (config.client instanceof CloudControl) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } else if (config.client instanceof CloudControlClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected CloudControl | CloudControlClient"); + } + yield page; + token = page.NextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-cloudcontrol/src/protocols/Aws_json1_0.ts b/clients/client-cloudcontrol/src/protocols/Aws_json1_0.ts new file mode 100644 index 0000000000000..1b39c629d6fb5 --- /dev/null +++ b/clients/client-cloudcontrol/src/protocols/Aws_json1_0.ts @@ -0,0 +1,2133 @@ +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { + expectNonNull as __expectNonNull, + expectNumber as __expectNumber, + expectString as __expectString, + parseEpochTimestamp as __parseEpochTimestamp, +} from "@aws-sdk/smithy-client"; +import { + Endpoint as __Endpoint, + HeaderBag as __HeaderBag, + MetadataBearer as __MetadataBearer, + ResponseMetadata as __ResponseMetadata, + SerdeContext as __SerdeContext, + SmithyException as __SmithyException, +} from "@aws-sdk/types"; +import { v4 as generateIdempotencyToken } from "uuid"; + +import { + CancelResourceRequestCommandInput, + CancelResourceRequestCommandOutput, +} from "../commands/CancelResourceRequestCommand"; +import { CreateResourceCommandInput, CreateResourceCommandOutput } from "../commands/CreateResourceCommand"; +import { DeleteResourceCommandInput, DeleteResourceCommandOutput } from "../commands/DeleteResourceCommand"; +import { GetResourceCommandInput, GetResourceCommandOutput } from "../commands/GetResourceCommand"; +import { + GetResourceRequestStatusCommandInput, + GetResourceRequestStatusCommandOutput, +} from "../commands/GetResourceRequestStatusCommand"; +import { + ListResourceRequestsCommandInput, + ListResourceRequestsCommandOutput, +} from "../commands/ListResourceRequestsCommand"; +import { ListResourcesCommandInput, ListResourcesCommandOutput } from "../commands/ListResourcesCommand"; +import { UpdateResourceCommandInput, UpdateResourceCommandOutput } from "../commands/UpdateResourceCommand"; +import { + AlreadyExistsException, + CancelResourceRequestInput, + CancelResourceRequestOutput, + ClientTokenConflictException, + ConcurrentModificationException, + ConcurrentOperationException, + CreateResourceInput, + CreateResourceOutput, + DeleteResourceInput, + DeleteResourceOutput, + GeneralServiceException, + GetResourceInput, + GetResourceOutput, + GetResourceRequestStatusInput, + GetResourceRequestStatusOutput, + HandlerFailureException, + HandlerInternalFailureException, + InvalidCredentialsException, + InvalidRequestException, + ListResourceRequestsInput, + ListResourceRequestsOutput, + ListResourcesInput, + ListResourcesOutput, + NetworkFailureException, + NotStabilizedException, + NotUpdatableException, + Operation, + OperationStatus, + PrivateTypeException, + ProgressEvent, + RequestTokenNotFoundException, + ResourceConflictException, + ResourceDescription, + ResourceNotFoundException, + ResourceRequestStatusFilter, + ServiceInternalErrorException, + ServiceLimitExceededException, + ThrottlingException, + TypeNotFoundException, + UnsupportedActionException, + UpdateResourceInput, + UpdateResourceOutput, +} from "../models/models_0"; + +export const serializeAws_json1_0CancelResourceRequestCommand = async ( + input: CancelResourceRequestCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = { + "content-type": "application/x-amz-json-1.0", + "x-amz-target": "CloudApiService.CancelResourceRequest", + }; + let body: any; + body = JSON.stringify(serializeAws_json1_0CancelResourceRequestInput(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +export const serializeAws_json1_0CreateResourceCommand = async ( + input: CreateResourceCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = { + "content-type": "application/x-amz-json-1.0", + "x-amz-target": "CloudApiService.CreateResource", + }; + let body: any; + body = JSON.stringify(serializeAws_json1_0CreateResourceInput(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +export const serializeAws_json1_0DeleteResourceCommand = async ( + input: DeleteResourceCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = { + "content-type": "application/x-amz-json-1.0", + "x-amz-target": "CloudApiService.DeleteResource", + }; + let body: any; + body = JSON.stringify(serializeAws_json1_0DeleteResourceInput(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +export const serializeAws_json1_0GetResourceCommand = async ( + input: GetResourceCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = { + "content-type": "application/x-amz-json-1.0", + "x-amz-target": "CloudApiService.GetResource", + }; + let body: any; + body = JSON.stringify(serializeAws_json1_0GetResourceInput(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +export const serializeAws_json1_0GetResourceRequestStatusCommand = async ( + input: GetResourceRequestStatusCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = { + "content-type": "application/x-amz-json-1.0", + "x-amz-target": "CloudApiService.GetResourceRequestStatus", + }; + let body: any; + body = JSON.stringify(serializeAws_json1_0GetResourceRequestStatusInput(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +export const serializeAws_json1_0ListResourceRequestsCommand = async ( + input: ListResourceRequestsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = { + "content-type": "application/x-amz-json-1.0", + "x-amz-target": "CloudApiService.ListResourceRequests", + }; + let body: any; + body = JSON.stringify(serializeAws_json1_0ListResourceRequestsInput(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +export const serializeAws_json1_0ListResourcesCommand = async ( + input: ListResourcesCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = { + "content-type": "application/x-amz-json-1.0", + "x-amz-target": "CloudApiService.ListResources", + }; + let body: any; + body = JSON.stringify(serializeAws_json1_0ListResourcesInput(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +export const serializeAws_json1_0UpdateResourceCommand = async ( + input: UpdateResourceCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = { + "content-type": "application/x-amz-json-1.0", + "x-amz-target": "CloudApiService.UpdateResource", + }; + let body: any; + body = JSON.stringify(serializeAws_json1_0UpdateResourceInput(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +export const deserializeAws_json1_0CancelResourceRequestCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return deserializeAws_json1_0CancelResourceRequestCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_0CancelResourceRequestOutput(data, context); + const response: CancelResourceRequestCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; + +const deserializeAws_json1_0CancelResourceRequestCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "ConcurrentModificationException": + case "com.amazonaws.cloudcontrol#ConcurrentModificationException": + response = { + ...(await deserializeAws_json1_0ConcurrentModificationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "RequestTokenNotFoundException": + case "com.amazonaws.cloudcontrol#RequestTokenNotFoundException": + response = { + ...(await deserializeAws_json1_0RequestTokenNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_json1_0CreateResourceCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return deserializeAws_json1_0CreateResourceCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_0CreateResourceOutput(data, context); + const response: CreateResourceCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; + +const deserializeAws_json1_0CreateResourceCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AlreadyExistsException": + case "com.amazonaws.cloudcontrol#AlreadyExistsException": + response = { + ...(await deserializeAws_json1_0AlreadyExistsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ClientTokenConflictException": + case "com.amazonaws.cloudcontrol#ClientTokenConflictException": + response = { + ...(await deserializeAws_json1_0ClientTokenConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ConcurrentOperationException": + case "com.amazonaws.cloudcontrol#ConcurrentOperationException": + response = { + ...(await deserializeAws_json1_0ConcurrentOperationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "GeneralServiceException": + case "com.amazonaws.cloudcontrol#GeneralServiceException": + response = { + ...(await deserializeAws_json1_0GeneralServiceExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "HandlerFailureException": + case "com.amazonaws.cloudcontrol#HandlerFailureException": + response = { + ...(await deserializeAws_json1_0HandlerFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "HandlerInternalFailureException": + case "com.amazonaws.cloudcontrol#HandlerInternalFailureException": + response = { + ...(await deserializeAws_json1_0HandlerInternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidCredentialsException": + case "com.amazonaws.cloudcontrol#InvalidCredentialsException": + response = { + ...(await deserializeAws_json1_0InvalidCredentialsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.cloudcontrol#InvalidRequestException": + response = { + ...(await deserializeAws_json1_0InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NetworkFailureException": + case "com.amazonaws.cloudcontrol#NetworkFailureException": + response = { + ...(await deserializeAws_json1_0NetworkFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotStabilizedException": + case "com.amazonaws.cloudcontrol#NotStabilizedException": + response = { + ...(await deserializeAws_json1_0NotStabilizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotUpdatableException": + case "com.amazonaws.cloudcontrol#NotUpdatableException": + response = { + ...(await deserializeAws_json1_0NotUpdatableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "PrivateTypeException": + case "com.amazonaws.cloudcontrol#PrivateTypeException": + response = { + ...(await deserializeAws_json1_0PrivateTypeExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceConflictException": + case "com.amazonaws.cloudcontrol#ResourceConflictException": + response = { + ...(await deserializeAws_json1_0ResourceConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cloudcontrol#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceInternalErrorException": + case "com.amazonaws.cloudcontrol#ServiceInternalErrorException": + response = { + ...(await deserializeAws_json1_0ServiceInternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceLimitExceededException": + case "com.amazonaws.cloudcontrol#ServiceLimitExceededException": + response = { + ...(await deserializeAws_json1_0ServiceLimitExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.cloudcontrol#ThrottlingException": + response = { + ...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TypeNotFoundException": + case "com.amazonaws.cloudcontrol#TypeNotFoundException": + response = { + ...(await deserializeAws_json1_0TypeNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnsupportedActionException": + case "com.amazonaws.cloudcontrol#UnsupportedActionException": + response = { + ...(await deserializeAws_json1_0UnsupportedActionExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_json1_0DeleteResourceCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return deserializeAws_json1_0DeleteResourceCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_0DeleteResourceOutput(data, context); + const response: DeleteResourceCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; + +const deserializeAws_json1_0DeleteResourceCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AlreadyExistsException": + case "com.amazonaws.cloudcontrol#AlreadyExistsException": + response = { + ...(await deserializeAws_json1_0AlreadyExistsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ClientTokenConflictException": + case "com.amazonaws.cloudcontrol#ClientTokenConflictException": + response = { + ...(await deserializeAws_json1_0ClientTokenConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ConcurrentOperationException": + case "com.amazonaws.cloudcontrol#ConcurrentOperationException": + response = { + ...(await deserializeAws_json1_0ConcurrentOperationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "GeneralServiceException": + case "com.amazonaws.cloudcontrol#GeneralServiceException": + response = { + ...(await deserializeAws_json1_0GeneralServiceExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "HandlerFailureException": + case "com.amazonaws.cloudcontrol#HandlerFailureException": + response = { + ...(await deserializeAws_json1_0HandlerFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "HandlerInternalFailureException": + case "com.amazonaws.cloudcontrol#HandlerInternalFailureException": + response = { + ...(await deserializeAws_json1_0HandlerInternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidCredentialsException": + case "com.amazonaws.cloudcontrol#InvalidCredentialsException": + response = { + ...(await deserializeAws_json1_0InvalidCredentialsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.cloudcontrol#InvalidRequestException": + response = { + ...(await deserializeAws_json1_0InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NetworkFailureException": + case "com.amazonaws.cloudcontrol#NetworkFailureException": + response = { + ...(await deserializeAws_json1_0NetworkFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotStabilizedException": + case "com.amazonaws.cloudcontrol#NotStabilizedException": + response = { + ...(await deserializeAws_json1_0NotStabilizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotUpdatableException": + case "com.amazonaws.cloudcontrol#NotUpdatableException": + response = { + ...(await deserializeAws_json1_0NotUpdatableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "PrivateTypeException": + case "com.amazonaws.cloudcontrol#PrivateTypeException": + response = { + ...(await deserializeAws_json1_0PrivateTypeExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceConflictException": + case "com.amazonaws.cloudcontrol#ResourceConflictException": + response = { + ...(await deserializeAws_json1_0ResourceConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cloudcontrol#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceInternalErrorException": + case "com.amazonaws.cloudcontrol#ServiceInternalErrorException": + response = { + ...(await deserializeAws_json1_0ServiceInternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceLimitExceededException": + case "com.amazonaws.cloudcontrol#ServiceLimitExceededException": + response = { + ...(await deserializeAws_json1_0ServiceLimitExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.cloudcontrol#ThrottlingException": + response = { + ...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TypeNotFoundException": + case "com.amazonaws.cloudcontrol#TypeNotFoundException": + response = { + ...(await deserializeAws_json1_0TypeNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnsupportedActionException": + case "com.amazonaws.cloudcontrol#UnsupportedActionException": + response = { + ...(await deserializeAws_json1_0UnsupportedActionExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_json1_0GetResourceCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return deserializeAws_json1_0GetResourceCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_0GetResourceOutput(data, context); + const response: GetResourceCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; + +const deserializeAws_json1_0GetResourceCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AlreadyExistsException": + case "com.amazonaws.cloudcontrol#AlreadyExistsException": + response = { + ...(await deserializeAws_json1_0AlreadyExistsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "GeneralServiceException": + case "com.amazonaws.cloudcontrol#GeneralServiceException": + response = { + ...(await deserializeAws_json1_0GeneralServiceExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "HandlerFailureException": + case "com.amazonaws.cloudcontrol#HandlerFailureException": + response = { + ...(await deserializeAws_json1_0HandlerFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "HandlerInternalFailureException": + case "com.amazonaws.cloudcontrol#HandlerInternalFailureException": + response = { + ...(await deserializeAws_json1_0HandlerInternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidCredentialsException": + case "com.amazonaws.cloudcontrol#InvalidCredentialsException": + response = { + ...(await deserializeAws_json1_0InvalidCredentialsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.cloudcontrol#InvalidRequestException": + response = { + ...(await deserializeAws_json1_0InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NetworkFailureException": + case "com.amazonaws.cloudcontrol#NetworkFailureException": + response = { + ...(await deserializeAws_json1_0NetworkFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotStabilizedException": + case "com.amazonaws.cloudcontrol#NotStabilizedException": + response = { + ...(await deserializeAws_json1_0NotStabilizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotUpdatableException": + case "com.amazonaws.cloudcontrol#NotUpdatableException": + response = { + ...(await deserializeAws_json1_0NotUpdatableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "PrivateTypeException": + case "com.amazonaws.cloudcontrol#PrivateTypeException": + response = { + ...(await deserializeAws_json1_0PrivateTypeExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceConflictException": + case "com.amazonaws.cloudcontrol#ResourceConflictException": + response = { + ...(await deserializeAws_json1_0ResourceConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cloudcontrol#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceInternalErrorException": + case "com.amazonaws.cloudcontrol#ServiceInternalErrorException": + response = { + ...(await deserializeAws_json1_0ServiceInternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceLimitExceededException": + case "com.amazonaws.cloudcontrol#ServiceLimitExceededException": + response = { + ...(await deserializeAws_json1_0ServiceLimitExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.cloudcontrol#ThrottlingException": + response = { + ...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TypeNotFoundException": + case "com.amazonaws.cloudcontrol#TypeNotFoundException": + response = { + ...(await deserializeAws_json1_0TypeNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnsupportedActionException": + case "com.amazonaws.cloudcontrol#UnsupportedActionException": + response = { + ...(await deserializeAws_json1_0UnsupportedActionExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_json1_0GetResourceRequestStatusCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return deserializeAws_json1_0GetResourceRequestStatusCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_0GetResourceRequestStatusOutput(data, context); + const response: GetResourceRequestStatusCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; + +const deserializeAws_json1_0GetResourceRequestStatusCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "RequestTokenNotFoundException": + case "com.amazonaws.cloudcontrol#RequestTokenNotFoundException": + response = { + ...(await deserializeAws_json1_0RequestTokenNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_json1_0ListResourceRequestsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return deserializeAws_json1_0ListResourceRequestsCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_0ListResourceRequestsOutput(data, context); + const response: ListResourceRequestsCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; + +const deserializeAws_json1_0ListResourceRequestsCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_json1_0ListResourcesCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return deserializeAws_json1_0ListResourcesCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_0ListResourcesOutput(data, context); + const response: ListResourcesCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; + +const deserializeAws_json1_0ListResourcesCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AlreadyExistsException": + case "com.amazonaws.cloudcontrol#AlreadyExistsException": + response = { + ...(await deserializeAws_json1_0AlreadyExistsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "GeneralServiceException": + case "com.amazonaws.cloudcontrol#GeneralServiceException": + response = { + ...(await deserializeAws_json1_0GeneralServiceExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "HandlerFailureException": + case "com.amazonaws.cloudcontrol#HandlerFailureException": + response = { + ...(await deserializeAws_json1_0HandlerFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "HandlerInternalFailureException": + case "com.amazonaws.cloudcontrol#HandlerInternalFailureException": + response = { + ...(await deserializeAws_json1_0HandlerInternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidCredentialsException": + case "com.amazonaws.cloudcontrol#InvalidCredentialsException": + response = { + ...(await deserializeAws_json1_0InvalidCredentialsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.cloudcontrol#InvalidRequestException": + response = { + ...(await deserializeAws_json1_0InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NetworkFailureException": + case "com.amazonaws.cloudcontrol#NetworkFailureException": + response = { + ...(await deserializeAws_json1_0NetworkFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotStabilizedException": + case "com.amazonaws.cloudcontrol#NotStabilizedException": + response = { + ...(await deserializeAws_json1_0NotStabilizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotUpdatableException": + case "com.amazonaws.cloudcontrol#NotUpdatableException": + response = { + ...(await deserializeAws_json1_0NotUpdatableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "PrivateTypeException": + case "com.amazonaws.cloudcontrol#PrivateTypeException": + response = { + ...(await deserializeAws_json1_0PrivateTypeExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceConflictException": + case "com.amazonaws.cloudcontrol#ResourceConflictException": + response = { + ...(await deserializeAws_json1_0ResourceConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cloudcontrol#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceInternalErrorException": + case "com.amazonaws.cloudcontrol#ServiceInternalErrorException": + response = { + ...(await deserializeAws_json1_0ServiceInternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceLimitExceededException": + case "com.amazonaws.cloudcontrol#ServiceLimitExceededException": + response = { + ...(await deserializeAws_json1_0ServiceLimitExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.cloudcontrol#ThrottlingException": + response = { + ...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TypeNotFoundException": + case "com.amazonaws.cloudcontrol#TypeNotFoundException": + response = { + ...(await deserializeAws_json1_0TypeNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnsupportedActionException": + case "com.amazonaws.cloudcontrol#UnsupportedActionException": + response = { + ...(await deserializeAws_json1_0UnsupportedActionExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_json1_0UpdateResourceCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return deserializeAws_json1_0UpdateResourceCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_0UpdateResourceOutput(data, context); + const response: UpdateResourceCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; + +const deserializeAws_json1_0UpdateResourceCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AlreadyExistsException": + case "com.amazonaws.cloudcontrol#AlreadyExistsException": + response = { + ...(await deserializeAws_json1_0AlreadyExistsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ClientTokenConflictException": + case "com.amazonaws.cloudcontrol#ClientTokenConflictException": + response = { + ...(await deserializeAws_json1_0ClientTokenConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ConcurrentOperationException": + case "com.amazonaws.cloudcontrol#ConcurrentOperationException": + response = { + ...(await deserializeAws_json1_0ConcurrentOperationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "GeneralServiceException": + case "com.amazonaws.cloudcontrol#GeneralServiceException": + response = { + ...(await deserializeAws_json1_0GeneralServiceExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "HandlerFailureException": + case "com.amazonaws.cloudcontrol#HandlerFailureException": + response = { + ...(await deserializeAws_json1_0HandlerFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "HandlerInternalFailureException": + case "com.amazonaws.cloudcontrol#HandlerInternalFailureException": + response = { + ...(await deserializeAws_json1_0HandlerInternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidCredentialsException": + case "com.amazonaws.cloudcontrol#InvalidCredentialsException": + response = { + ...(await deserializeAws_json1_0InvalidCredentialsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.cloudcontrol#InvalidRequestException": + response = { + ...(await deserializeAws_json1_0InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NetworkFailureException": + case "com.amazonaws.cloudcontrol#NetworkFailureException": + response = { + ...(await deserializeAws_json1_0NetworkFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotStabilizedException": + case "com.amazonaws.cloudcontrol#NotStabilizedException": + response = { + ...(await deserializeAws_json1_0NotStabilizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotUpdatableException": + case "com.amazonaws.cloudcontrol#NotUpdatableException": + response = { + ...(await deserializeAws_json1_0NotUpdatableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "PrivateTypeException": + case "com.amazonaws.cloudcontrol#PrivateTypeException": + response = { + ...(await deserializeAws_json1_0PrivateTypeExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceConflictException": + case "com.amazonaws.cloudcontrol#ResourceConflictException": + response = { + ...(await deserializeAws_json1_0ResourceConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cloudcontrol#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceInternalErrorException": + case "com.amazonaws.cloudcontrol#ServiceInternalErrorException": + response = { + ...(await deserializeAws_json1_0ServiceInternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceLimitExceededException": + case "com.amazonaws.cloudcontrol#ServiceLimitExceededException": + response = { + ...(await deserializeAws_json1_0ServiceLimitExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.cloudcontrol#ThrottlingException": + response = { + ...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TypeNotFoundException": + case "com.amazonaws.cloudcontrol#TypeNotFoundException": + response = { + ...(await deserializeAws_json1_0TypeNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnsupportedActionException": + case "com.amazonaws.cloudcontrol#UnsupportedActionException": + response = { + ...(await deserializeAws_json1_0UnsupportedActionExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +const deserializeAws_json1_0AlreadyExistsExceptionResponse = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = deserializeAws_json1_0AlreadyExistsException(body, context); + const contents: AlreadyExistsException = { + name: "AlreadyExistsException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; + +const deserializeAws_json1_0ClientTokenConflictExceptionResponse = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = deserializeAws_json1_0ClientTokenConflictException(body, context); + const contents: ClientTokenConflictException = { + name: "ClientTokenConflictException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; + +const deserializeAws_json1_0ConcurrentModificationExceptionResponse = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = deserializeAws_json1_0ConcurrentModificationException(body, context); + const contents: ConcurrentModificationException = { + name: "ConcurrentModificationException", + $fault: "server", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; + +const deserializeAws_json1_0ConcurrentOperationExceptionResponse = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = deserializeAws_json1_0ConcurrentOperationException(body, context); + const contents: ConcurrentOperationException = { + name: "ConcurrentOperationException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; + +const deserializeAws_json1_0GeneralServiceExceptionResponse = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = deserializeAws_json1_0GeneralServiceException(body, context); + const contents: GeneralServiceException = { + name: "GeneralServiceException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; + +const deserializeAws_json1_0HandlerFailureExceptionResponse = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = deserializeAws_json1_0HandlerFailureException(body, context); + const contents: HandlerFailureException = { + name: "HandlerFailureException", + $fault: "server", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; + +const deserializeAws_json1_0HandlerInternalFailureExceptionResponse = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = deserializeAws_json1_0HandlerInternalFailureException(body, context); + const contents: HandlerInternalFailureException = { + name: "HandlerInternalFailureException", + $fault: "server", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; + +const deserializeAws_json1_0InvalidCredentialsExceptionResponse = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = deserializeAws_json1_0InvalidCredentialsException(body, context); + const contents: InvalidCredentialsException = { + name: "InvalidCredentialsException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; + +const deserializeAws_json1_0InvalidRequestExceptionResponse = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = deserializeAws_json1_0InvalidRequestException(body, context); + const contents: InvalidRequestException = { + name: "InvalidRequestException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; + +const deserializeAws_json1_0NetworkFailureExceptionResponse = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = deserializeAws_json1_0NetworkFailureException(body, context); + const contents: NetworkFailureException = { + name: "NetworkFailureException", + $fault: "server", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; + +const deserializeAws_json1_0NotStabilizedExceptionResponse = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = deserializeAws_json1_0NotStabilizedException(body, context); + const contents: NotStabilizedException = { + name: "NotStabilizedException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; + +const deserializeAws_json1_0NotUpdatableExceptionResponse = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = deserializeAws_json1_0NotUpdatableException(body, context); + const contents: NotUpdatableException = { + name: "NotUpdatableException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; + +const deserializeAws_json1_0PrivateTypeExceptionResponse = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = deserializeAws_json1_0PrivateTypeException(body, context); + const contents: PrivateTypeException = { + name: "PrivateTypeException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; + +const deserializeAws_json1_0RequestTokenNotFoundExceptionResponse = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = deserializeAws_json1_0RequestTokenNotFoundException(body, context); + const contents: RequestTokenNotFoundException = { + name: "RequestTokenNotFoundException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; + +const deserializeAws_json1_0ResourceConflictExceptionResponse = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = deserializeAws_json1_0ResourceConflictException(body, context); + const contents: ResourceConflictException = { + name: "ResourceConflictException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; + +const deserializeAws_json1_0ResourceNotFoundExceptionResponse = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = deserializeAws_json1_0ResourceNotFoundException(body, context); + const contents: ResourceNotFoundException = { + name: "ResourceNotFoundException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; + +const deserializeAws_json1_0ServiceInternalErrorExceptionResponse = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = deserializeAws_json1_0ServiceInternalErrorException(body, context); + const contents: ServiceInternalErrorException = { + name: "ServiceInternalErrorException", + $fault: "server", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; + +const deserializeAws_json1_0ServiceLimitExceededExceptionResponse = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = deserializeAws_json1_0ServiceLimitExceededException(body, context); + const contents: ServiceLimitExceededException = { + name: "ServiceLimitExceededException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; + +const deserializeAws_json1_0ThrottlingExceptionResponse = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = deserializeAws_json1_0ThrottlingException(body, context); + const contents: ThrottlingException = { + name: "ThrottlingException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; + +const deserializeAws_json1_0TypeNotFoundExceptionResponse = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = deserializeAws_json1_0TypeNotFoundException(body, context); + const contents: TypeNotFoundException = { + name: "TypeNotFoundException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; + +const deserializeAws_json1_0UnsupportedActionExceptionResponse = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = deserializeAws_json1_0UnsupportedActionException(body, context); + const contents: UnsupportedActionException = { + name: "UnsupportedActionException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; + +const serializeAws_json1_0CancelResourceRequestInput = ( + input: CancelResourceRequestInput, + context: __SerdeContext +): any => { + return { + ...(input.RequestToken !== undefined && input.RequestToken !== null && { RequestToken: input.RequestToken }), + }; +}; + +const serializeAws_json1_0CreateResourceInput = (input: CreateResourceInput, context: __SerdeContext): any => { + return { + ClientToken: input.ClientToken ?? generateIdempotencyToken(), + ...(input.DesiredState !== undefined && input.DesiredState !== null && { DesiredState: input.DesiredState }), + ...(input.RoleArn !== undefined && input.RoleArn !== null && { RoleArn: input.RoleArn }), + ...(input.TypeName !== undefined && input.TypeName !== null && { TypeName: input.TypeName }), + ...(input.TypeVersionId !== undefined && input.TypeVersionId !== null && { TypeVersionId: input.TypeVersionId }), + }; +}; + +const serializeAws_json1_0DeleteResourceInput = (input: DeleteResourceInput, context: __SerdeContext): any => { + return { + ClientToken: input.ClientToken ?? generateIdempotencyToken(), + ...(input.Identifier !== undefined && input.Identifier !== null && { Identifier: input.Identifier }), + ...(input.RoleArn !== undefined && input.RoleArn !== null && { RoleArn: input.RoleArn }), + ...(input.TypeName !== undefined && input.TypeName !== null && { TypeName: input.TypeName }), + ...(input.TypeVersionId !== undefined && input.TypeVersionId !== null && { TypeVersionId: input.TypeVersionId }), + }; +}; + +const serializeAws_json1_0GetResourceInput = (input: GetResourceInput, context: __SerdeContext): any => { + return { + ...(input.Identifier !== undefined && input.Identifier !== null && { Identifier: input.Identifier }), + ...(input.RoleArn !== undefined && input.RoleArn !== null && { RoleArn: input.RoleArn }), + ...(input.TypeName !== undefined && input.TypeName !== null && { TypeName: input.TypeName }), + ...(input.TypeVersionId !== undefined && input.TypeVersionId !== null && { TypeVersionId: input.TypeVersionId }), + }; +}; + +const serializeAws_json1_0GetResourceRequestStatusInput = ( + input: GetResourceRequestStatusInput, + context: __SerdeContext +): any => { + return { + ...(input.RequestToken !== undefined && input.RequestToken !== null && { RequestToken: input.RequestToken }), + }; +}; + +const serializeAws_json1_0ListResourceRequestsInput = ( + input: ListResourceRequestsInput, + context: __SerdeContext +): any => { + return { + ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }), + ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }), + ...(input.ResourceRequestStatusFilter !== undefined && + input.ResourceRequestStatusFilter !== null && { + ResourceRequestStatusFilter: serializeAws_json1_0ResourceRequestStatusFilter( + input.ResourceRequestStatusFilter, + context + ), + }), + }; +}; + +const serializeAws_json1_0ListResourcesInput = (input: ListResourcesInput, context: __SerdeContext): any => { + return { + ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }), + ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }), + ...(input.ResourceModel !== undefined && input.ResourceModel !== null && { ResourceModel: input.ResourceModel }), + ...(input.RoleArn !== undefined && input.RoleArn !== null && { RoleArn: input.RoleArn }), + ...(input.TypeName !== undefined && input.TypeName !== null && { TypeName: input.TypeName }), + ...(input.TypeVersionId !== undefined && input.TypeVersionId !== null && { TypeVersionId: input.TypeVersionId }), + }; +}; + +const serializeAws_json1_0Operations = (input: (Operation | string)[], context: __SerdeContext): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + if (entry === null) { + return null as any; + } + return entry; + }); +}; + +const serializeAws_json1_0OperationStatuses = (input: (OperationStatus | string)[], context: __SerdeContext): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + if (entry === null) { + return null as any; + } + return entry; + }); +}; + +const serializeAws_json1_0ResourceRequestStatusFilter = ( + input: ResourceRequestStatusFilter, + context: __SerdeContext +): any => { + return { + ...(input.OperationStatuses !== undefined && + input.OperationStatuses !== null && { + OperationStatuses: serializeAws_json1_0OperationStatuses(input.OperationStatuses, context), + }), + ...(input.Operations !== undefined && + input.Operations !== null && { Operations: serializeAws_json1_0Operations(input.Operations, context) }), + }; +}; + +const serializeAws_json1_0UpdateResourceInput = (input: UpdateResourceInput, context: __SerdeContext): any => { + return { + ClientToken: input.ClientToken ?? generateIdempotencyToken(), + ...(input.Identifier !== undefined && input.Identifier !== null && { Identifier: input.Identifier }), + ...(input.PatchDocument !== undefined && input.PatchDocument !== null && { PatchDocument: input.PatchDocument }), + ...(input.RoleArn !== undefined && input.RoleArn !== null && { RoleArn: input.RoleArn }), + ...(input.TypeName !== undefined && input.TypeName !== null && { TypeName: input.TypeName }), + ...(input.TypeVersionId !== undefined && input.TypeVersionId !== null && { TypeVersionId: input.TypeVersionId }), + }; +}; + +const deserializeAws_json1_0AlreadyExistsException = (output: any, context: __SerdeContext): AlreadyExistsException => { + return { + Message: __expectString(output.Message), + } as any; +}; + +const deserializeAws_json1_0CancelResourceRequestOutput = ( + output: any, + context: __SerdeContext +): CancelResourceRequestOutput => { + return { + ProgressEvent: + output.ProgressEvent !== undefined && output.ProgressEvent !== null + ? deserializeAws_json1_0ProgressEvent(output.ProgressEvent, context) + : undefined, + } as any; +}; + +const deserializeAws_json1_0ClientTokenConflictException = ( + output: any, + context: __SerdeContext +): ClientTokenConflictException => { + return { + Message: __expectString(output.Message), + } as any; +}; + +const deserializeAws_json1_0ConcurrentModificationException = ( + output: any, + context: __SerdeContext +): ConcurrentModificationException => { + return { + Message: __expectString(output.Message), + } as any; +}; + +const deserializeAws_json1_0ConcurrentOperationException = ( + output: any, + context: __SerdeContext +): ConcurrentOperationException => { + return { + Message: __expectString(output.Message), + } as any; +}; + +const deserializeAws_json1_0CreateResourceOutput = (output: any, context: __SerdeContext): CreateResourceOutput => { + return { + ProgressEvent: + output.ProgressEvent !== undefined && output.ProgressEvent !== null + ? deserializeAws_json1_0ProgressEvent(output.ProgressEvent, context) + : undefined, + } as any; +}; + +const deserializeAws_json1_0DeleteResourceOutput = (output: any, context: __SerdeContext): DeleteResourceOutput => { + return { + ProgressEvent: + output.ProgressEvent !== undefined && output.ProgressEvent !== null + ? deserializeAws_json1_0ProgressEvent(output.ProgressEvent, context) + : undefined, + } as any; +}; + +const deserializeAws_json1_0GeneralServiceException = ( + output: any, + context: __SerdeContext +): GeneralServiceException => { + return { + Message: __expectString(output.Message), + } as any; +}; + +const deserializeAws_json1_0GetResourceOutput = (output: any, context: __SerdeContext): GetResourceOutput => { + return { + ResourceDescription: + output.ResourceDescription !== undefined && output.ResourceDescription !== null + ? deserializeAws_json1_0ResourceDescription(output.ResourceDescription, context) + : undefined, + TypeName: __expectString(output.TypeName), + } as any; +}; + +const deserializeAws_json1_0GetResourceRequestStatusOutput = ( + output: any, + context: __SerdeContext +): GetResourceRequestStatusOutput => { + return { + ProgressEvent: + output.ProgressEvent !== undefined && output.ProgressEvent !== null + ? deserializeAws_json1_0ProgressEvent(output.ProgressEvent, context) + : undefined, + } as any; +}; + +const deserializeAws_json1_0HandlerFailureException = ( + output: any, + context: __SerdeContext +): HandlerFailureException => { + return { + Message: __expectString(output.Message), + } as any; +}; + +const deserializeAws_json1_0HandlerInternalFailureException = ( + output: any, + context: __SerdeContext +): HandlerInternalFailureException => { + return { + Message: __expectString(output.Message), + } as any; +}; + +const deserializeAws_json1_0InvalidCredentialsException = ( + output: any, + context: __SerdeContext +): InvalidCredentialsException => { + return { + Message: __expectString(output.Message), + } as any; +}; + +const deserializeAws_json1_0InvalidRequestException = ( + output: any, + context: __SerdeContext +): InvalidRequestException => { + return { + Message: __expectString(output.Message), + } as any; +}; + +const deserializeAws_json1_0ListResourceRequestsOutput = ( + output: any, + context: __SerdeContext +): ListResourceRequestsOutput => { + return { + NextToken: __expectString(output.NextToken), + ResourceRequestStatusSummaries: + output.ResourceRequestStatusSummaries !== undefined && output.ResourceRequestStatusSummaries !== null + ? deserializeAws_json1_0ResourceRequestStatusSummaries(output.ResourceRequestStatusSummaries, context) + : undefined, + } as any; +}; + +const deserializeAws_json1_0ListResourcesOutput = (output: any, context: __SerdeContext): ListResourcesOutput => { + return { + NextToken: __expectString(output.NextToken), + ResourceDescriptions: + output.ResourceDescriptions !== undefined && output.ResourceDescriptions !== null + ? deserializeAws_json1_0ResourceDescriptions(output.ResourceDescriptions, context) + : undefined, + TypeName: __expectString(output.TypeName), + } as any; +}; + +const deserializeAws_json1_0NetworkFailureException = ( + output: any, + context: __SerdeContext +): NetworkFailureException => { + return { + Message: __expectString(output.Message), + } as any; +}; + +const deserializeAws_json1_0NotStabilizedException = (output: any, context: __SerdeContext): NotStabilizedException => { + return { + Message: __expectString(output.Message), + } as any; +}; + +const deserializeAws_json1_0NotUpdatableException = (output: any, context: __SerdeContext): NotUpdatableException => { + return { + Message: __expectString(output.Message), + } as any; +}; + +const deserializeAws_json1_0PrivateTypeException = (output: any, context: __SerdeContext): PrivateTypeException => { + return { + Message: __expectString(output.Message), + } as any; +}; + +const deserializeAws_json1_0ProgressEvent = (output: any, context: __SerdeContext): ProgressEvent => { + return { + ErrorCode: __expectString(output.ErrorCode), + EventTime: + output.EventTime !== undefined && output.EventTime !== null + ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EventTime))) + : undefined, + Identifier: __expectString(output.Identifier), + Operation: __expectString(output.Operation), + OperationStatus: __expectString(output.OperationStatus), + RequestToken: __expectString(output.RequestToken), + ResourceModel: __expectString(output.ResourceModel), + RetryAfter: + output.RetryAfter !== undefined && output.RetryAfter !== null + ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.RetryAfter))) + : undefined, + StatusMessage: __expectString(output.StatusMessage), + TypeName: __expectString(output.TypeName), + } as any; +}; + +const deserializeAws_json1_0RequestTokenNotFoundException = ( + output: any, + context: __SerdeContext +): RequestTokenNotFoundException => { + return { + Message: __expectString(output.Message), + } as any; +}; + +const deserializeAws_json1_0ResourceConflictException = ( + output: any, + context: __SerdeContext +): ResourceConflictException => { + return { + Message: __expectString(output.Message), + } as any; +}; + +const deserializeAws_json1_0ResourceDescription = (output: any, context: __SerdeContext): ResourceDescription => { + return { + Identifier: __expectString(output.Identifier), + Properties: __expectString(output.Properties), + } as any; +}; + +const deserializeAws_json1_0ResourceDescriptions = (output: any, context: __SerdeContext): ResourceDescription[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return deserializeAws_json1_0ResourceDescription(entry, context); + }); +}; + +const deserializeAws_json1_0ResourceNotFoundException = ( + output: any, + context: __SerdeContext +): ResourceNotFoundException => { + return { + Message: __expectString(output.Message), + } as any; +}; + +const deserializeAws_json1_0ResourceRequestStatusSummaries = ( + output: any, + context: __SerdeContext +): ProgressEvent[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return deserializeAws_json1_0ProgressEvent(entry, context); + }); +}; + +const deserializeAws_json1_0ServiceInternalErrorException = ( + output: any, + context: __SerdeContext +): ServiceInternalErrorException => { + return { + Message: __expectString(output.Message), + } as any; +}; + +const deserializeAws_json1_0ServiceLimitExceededException = ( + output: any, + context: __SerdeContext +): ServiceLimitExceededException => { + return { + Message: __expectString(output.Message), + } as any; +}; + +const deserializeAws_json1_0ThrottlingException = (output: any, context: __SerdeContext): ThrottlingException => { + return { + Message: __expectString(output.Message), + } as any; +}; + +const deserializeAws_json1_0TypeNotFoundException = (output: any, context: __SerdeContext): TypeNotFoundException => { + return { + Message: __expectString(output.Message), + } as any; +}; + +const deserializeAws_json1_0UnsupportedActionException = ( + output: any, + context: __SerdeContext +): UnsupportedActionException => { + return { + Message: __expectString(output.Message), + } as any; +}; + +const deserializeAws_json1_0UpdateResourceOutput = (output: any, context: __SerdeContext): UpdateResourceOutput => { + return { + ProgressEvent: + output.ProgressEvent !== undefined && output.ProgressEvent !== null + ? deserializeAws_json1_0ProgressEvent(output.ProgressEvent, context) + : undefined, + } as any; +}; + +const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ + httpStatusCode: output.statusCode, + requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"], + extendedRequestId: output.headers["x-amz-id-2"], + cfId: output.headers["x-amz-cf-id"], +}); + +// Collect low-level response body stream to Uint8Array. +const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext): Promise => { + if (streamBody instanceof Uint8Array) { + return Promise.resolve(streamBody); + } + return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array()); +}; + +// Encode Uint8Array data into string with utf-8. +const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => + collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); + +const buildHttpRpcRequest = async ( + context: __SerdeContext, + headers: __HeaderBag, + path: string, + resolvedHostname: string | undefined, + body: any +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const contents: any = { + protocol, + hostname, + port, + method: "POST", + path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path, + headers, + }; + if (resolvedHostname !== undefined) { + contents.hostname = resolvedHostname; + } + if (body !== undefined) { + contents.body = body; + } + return new __HttpRequest(contents); +}; + +const parseBody = (streamBody: any, context: __SerdeContext): any => + collectBodyString(streamBody, context).then((encoded) => { + if (encoded.length) { + return JSON.parse(encoded); + } + return {}; + }); + +/** + * Load an error code for the aws.rest-json-1.1 protocol. + */ +const loadRestJsonErrorCode = (output: __HttpResponse, data: any): string => { + const findKey = (object: any, key: string) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()); + + const sanitizeErrorCode = (rawValue: string): string => { + let cleanValue = rawValue; + if (cleanValue.indexOf(":") >= 0) { + cleanValue = cleanValue.split(":")[0]; + } + if (cleanValue.indexOf("#") >= 0) { + cleanValue = cleanValue.split("#")[1]; + } + return cleanValue; + }; + + const headerKey = findKey(output.headers, "x-amzn-errortype"); + if (headerKey !== undefined) { + return sanitizeErrorCode(output.headers[headerKey]); + } + + if (data.code !== undefined) { + return sanitizeErrorCode(data.code); + } + + if (data["__type"] !== undefined) { + return sanitizeErrorCode(data["__type"]); + } + + return ""; +}; diff --git a/clients/client-cloudcontrol/src/runtimeConfig.browser.ts b/clients/client-cloudcontrol/src/runtimeConfig.browser.ts new file mode 100644 index 0000000000000..2c980462e49c0 --- /dev/null +++ b/clients/client-cloudcontrol/src/runtimeConfig.browser.ts @@ -0,0 +1,41 @@ +import { Sha256 } from "@aws-crypto/sha256-browser"; +import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; +import { invalidProvider } from "@aws-sdk/invalid-dependency"; +import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; +import { fromBase64, toBase64 } from "@aws-sdk/util-base64-browser"; +import { calculateBodyLength } from "@aws-sdk/util-body-length-browser"; +import { defaultUserAgent } from "@aws-sdk/util-user-agent-browser"; +import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-browser"; + +// @ts-ignore: package.json will be imported from dist folders +import packageInfo from "../package.json"; +import { CloudControlClientConfig } from "./CloudControlClient"; +import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared"; + +/** + * @internal + */ +export const getRuntimeConfig = (config: CloudControlClientConfig) => { + const clientSharedValues = getSharedRuntimeConfig(config); + return { + ...clientSharedValues, + ...config, + runtime: "browser", + base64Decoder: config?.base64Decoder ?? fromBase64, + base64Encoder: config?.base64Encoder ?? toBase64, + bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength, + credentialDefaultProvider: + config?.credentialDefaultProvider ?? ((_: unknown) => () => Promise.reject(new Error("Credential is missing"))), + defaultUserAgentProvider: + config?.defaultUserAgentProvider ?? + defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), + maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, + region: config?.region ?? invalidProvider("Region is missing"), + requestHandler: config?.requestHandler ?? new FetchHttpHandler(), + retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), + sha256: config?.sha256 ?? Sha256, + streamCollector: config?.streamCollector ?? streamCollector, + utf8Decoder: config?.utf8Decoder ?? fromUtf8, + utf8Encoder: config?.utf8Encoder ?? toUtf8, + }; +}; diff --git a/clients/client-cloudcontrol/src/runtimeConfig.native.ts b/clients/client-cloudcontrol/src/runtimeConfig.native.ts new file mode 100644 index 0000000000000..f2c738318f9e4 --- /dev/null +++ b/clients/client-cloudcontrol/src/runtimeConfig.native.ts @@ -0,0 +1,17 @@ +import { Sha256 } from "@aws-crypto/sha256-js"; + +import { CloudControlClientConfig } from "./CloudControlClient"; +import { getRuntimeConfig as getBrowserRuntimeConfig } from "./runtimeConfig.browser"; + +/** + * @internal + */ +export const getRuntimeConfig = (config: CloudControlClientConfig) => { + const browserDefaults = getBrowserRuntimeConfig(config); + return { + ...browserDefaults, + ...config, + runtime: "react-native", + sha256: config?.sha256 ?? Sha256, + }; +}; diff --git a/clients/client-cloudcontrol/src/runtimeConfig.shared.ts b/clients/client-cloudcontrol/src/runtimeConfig.shared.ts new file mode 100644 index 0000000000000..7dad908950244 --- /dev/null +++ b/clients/client-cloudcontrol/src/runtimeConfig.shared.ts @@ -0,0 +1,17 @@ +import { Logger as __Logger } from "@aws-sdk/types"; +import { parseUrl } from "@aws-sdk/url-parser"; + +import { CloudControlClientConfig } from "./CloudControlClient"; +import { defaultRegionInfoProvider } from "./endpoints"; + +/** + * @internal + */ +export const getRuntimeConfig = (config: CloudControlClientConfig) => ({ + apiVersion: "2021-09-30", + disableHostPrefix: config?.disableHostPrefix ?? false, + logger: config?.logger ?? ({} as __Logger), + regionInfoProvider: config?.regionInfoProvider ?? defaultRegionInfoProvider, + serviceId: config?.serviceId ?? "CloudControl", + urlParser: config?.urlParser ?? parseUrl, +}); diff --git a/clients/client-cloudcontrol/src/runtimeConfig.ts b/clients/client-cloudcontrol/src/runtimeConfig.ts new file mode 100644 index 0000000000000..605f967705654 --- /dev/null +++ b/clients/client-cloudcontrol/src/runtimeConfig.ts @@ -0,0 +1,46 @@ +import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; +import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; +import { Hash } from "@aws-sdk/hash-node"; +import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; +import { loadConfig as loadNodeConfig } from "@aws-sdk/node-config-provider"; +import { NodeHttpHandler, streamCollector } from "@aws-sdk/node-http-handler"; +import { emitWarningIfUnsupportedVersion } from "@aws-sdk/smithy-client"; +import { fromBase64, toBase64 } from "@aws-sdk/util-base64-node"; +import { calculateBodyLength } from "@aws-sdk/util-body-length-node"; +import { defaultUserAgent } from "@aws-sdk/util-user-agent-node"; +import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-node"; + +// @ts-ignore: package.json will be imported from dist folders +import packageInfo from "../package.json"; +import { CloudControlClientConfig } from "./CloudControlClient"; +import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared"; + +/** + * @internal + */ +export const getRuntimeConfig = (config: CloudControlClientConfig) => { + emitWarningIfUnsupportedVersion(process.version); + const clientSharedValues = getSharedRuntimeConfig(config); + return { + ...clientSharedValues, + ...config, + runtime: "node", + base64Decoder: config?.base64Decoder ?? fromBase64, + base64Encoder: config?.base64Encoder ?? toBase64, + bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength, + credentialDefaultProvider: + config?.credentialDefaultProvider ?? decorateDefaultCredentialProvider(credentialDefaultProvider), + defaultUserAgentProvider: + config?.defaultUserAgentProvider ?? + defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), + maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), + region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), + requestHandler: config?.requestHandler ?? new NodeHttpHandler(), + retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), + sha256: config?.sha256 ?? Hash.bind(null, "sha256"), + streamCollector: config?.streamCollector ?? streamCollector, + utf8Decoder: config?.utf8Decoder ?? fromUtf8, + utf8Encoder: config?.utf8Encoder ?? toUtf8, + }; +}; diff --git a/clients/client-cloudcontrol/src/waiters/waitForResourceRequestSuccess.ts b/clients/client-cloudcontrol/src/waiters/waitForResourceRequestSuccess.ts new file mode 100644 index 0000000000000..8700339115fbd --- /dev/null +++ b/clients/client-cloudcontrol/src/waiters/waitForResourceRequestSuccess.ts @@ -0,0 +1,69 @@ +import { checkExceptions, createWaiter, WaiterConfiguration, WaiterResult, WaiterState } from "@aws-sdk/util-waiter"; + +import { CloudControlClient } from "../CloudControlClient"; +import { + GetResourceRequestStatusCommand, + GetResourceRequestStatusCommandInput, +} from "../commands/GetResourceRequestStatusCommand"; + +const checkState = async ( + client: CloudControlClient, + input: GetResourceRequestStatusCommandInput +): Promise => { + let reason; + try { + const result: any = await client.send(new GetResourceRequestStatusCommand(input)); + reason = result; + try { + const returnComparator = () => { + return result.ProgressEvent.OperationStatus; + }; + if (returnComparator() === "SUCCESS") { + return { state: WaiterState.SUCCESS, reason }; + } + } catch (e) {} + try { + const returnComparator = () => { + return result.ProgressEvent.OperationStatus; + }; + if (returnComparator() === "FAILED") { + return { state: WaiterState.FAILURE, reason }; + } + } catch (e) {} + try { + const returnComparator = () => { + return result.ProgressEvent.OperationStatus; + }; + if (returnComparator() === "CANCEL_COMPLETE") { + return { state: WaiterState.FAILURE, reason }; + } + } catch (e) {} + } catch (exception) { + reason = exception; + } + return { state: WaiterState.RETRY, reason }; +}; +/** + * Wait until resource operation request is successful + * @deprecated Use waitUntilResourceRequestSuccess instead. waitForResourceRequestSuccess does not throw error in non-success cases. + */ +export const waitForResourceRequestSuccess = async ( + params: WaiterConfiguration, + input: GetResourceRequestStatusCommandInput +): Promise => { + const serviceDefaults = { minDelay: 5, maxDelay: 120 }; + return createWaiter({ ...serviceDefaults, ...params }, input, checkState); +}; +/** + * Wait until resource operation request is successful + * @param params - Waiter configuration options. + * @param input - The input to GetResourceRequestStatusCommand for polling. + */ +export const waitUntilResourceRequestSuccess = async ( + params: WaiterConfiguration, + input: GetResourceRequestStatusCommandInput +): Promise => { + const serviceDefaults = { minDelay: 5, maxDelay: 120 }; + const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState); + return checkExceptions(result); +}; diff --git a/clients/client-cloudcontrol/tsconfig.es.json b/clients/client-cloudcontrol/tsconfig.es.json new file mode 100644 index 0000000000000..4c72364cd1a07 --- /dev/null +++ b/clients/client-cloudcontrol/tsconfig.es.json @@ -0,0 +1,10 @@ +{ + "extends": "./tsconfig", + "compilerOptions": { + "target": "es5", + "module": "esnext", + "moduleResolution": "node", + "lib": ["dom", "es5", "es2015.promise", "es2015.collection", "es2015.iterable", "es2015.symbol.wellknown"], + "outDir": "dist-es" + } +} diff --git a/clients/client-cloudcontrol/tsconfig.json b/clients/client-cloudcontrol/tsconfig.json new file mode 100644 index 0000000000000..3d15a85b2981b --- /dev/null +++ b/clients/client-cloudcontrol/tsconfig.json @@ -0,0 +1,33 @@ +{ + "compilerOptions": { + "rootDir": "./src", + "alwaysStrict": true, + "target": "ES2018", + "module": "commonjs", + "strict": true, + "sourceMap": true, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "incremental": true, + "resolveJsonModule": true, + "esModuleInterop": true, + "outDir": "dist-cjs", + "removeComments": true + }, + "typedocOptions": { + "exclude": ["**/node_modules/**", "**/*.spec.ts", "**/protocols/*.ts", "**/e2e/*.ts", "**/endpoints.ts"], + "excludeNotExported": true, + "excludePrivate": true, + "hideGenerator": true, + "ignoreCompilerErrors": true, + "includeDeclarations": true, + "stripInternal": true, + "readme": "README.md", + "mode": "file", + "out": "docs", + "theme": "minimal", + "plugin": ["@aws-sdk/client-documentation-generator"] + }, + "exclude": ["test/**/*"] +} diff --git a/clients/client-cloudcontrol/tsconfig.types.json b/clients/client-cloudcontrol/tsconfig.types.json new file mode 100644 index 0000000000000..b7018298d8ae6 --- /dev/null +++ b/clients/client-cloudcontrol/tsconfig.types.json @@ -0,0 +1,9 @@ +{ + "extends": "./tsconfig", + "compilerOptions": { + "removeComments": false, + "declaration": true, + "declarationDir": "dist-types" + }, + "exclude": ["test/**/*", "dist-types/**/*"] +} diff --git a/clients/client-connect/src/Connect.ts b/clients/client-connect/src/Connect.ts index 3126a31677014..695d7d1f1507e 100644 --- a/clients/client-connect/src/Connect.ts +++ b/clients/client-connect/src/Connect.ts @@ -930,7 +930,7 @@ export class Connect extends ConnectClient { } /** - *

Create an AppIntegration association with an Amazon Connect instance.

+ *

Creates an AWS resource association with an Amazon Connect instance.

*/ public createIntegrationAssociation( args: CreateIntegrationAssociationCommandInput, @@ -1053,7 +1053,7 @@ export class Connect extends ConnectClient { } /** - *

Creates a use case for an AppIntegration association.

+ *

Creates a use case for an integration association.

*/ public createUseCase( args: CreateUseCaseCommandInput, @@ -1214,7 +1214,7 @@ export class Connect extends ConnectClient { } /** - *

Deletes an AppIntegration association from an Amazon Connect instance. The association must not have + *

Deletes an AWS resource association from an Amazon Connect instance. The association must not have * any use cases associated with it.

*/ public deleteIntegrationAssociation( @@ -1279,7 +1279,7 @@ export class Connect extends ConnectClient { } /** - *

Deletes a use case from an AppIntegration association.

+ *

Deletes a use case from an integration association.

*/ public deleteUseCase( args: DeleteUseCaseCommandInput, @@ -2443,7 +2443,7 @@ export class Connect extends ConnectClient { } /** - *

Provides summary information about the AppIntegration associations for the specified Amazon Connect + *

Provides summary information about the AWS resource associations for the specified Amazon Connect * instance.

*/ public listIntegrationAssociations( @@ -2864,7 +2864,7 @@ export class Connect extends ConnectClient { } /** - *

Lists the use cases.

+ *

Lists the use cases for the integration association.

*/ public listUseCases( args: ListUseCasesCommandInput, @@ -3094,6 +3094,11 @@ export class Connect extends ConnectClient { * mobile numbers, you must submit a service quota increase request. For more information, see * Amazon Connect Service Quotas in the Amazon Connect Administrator Guide.

* + * + *

Campaign calls are not allowed by default. Before you can make a call with + * TrafficType = CAMPAIGN, you must submit a service quota increase request. For more information, see + * Amazon Connect Service Quotas in the Amazon Connect Administrator Guide.

+ *
*/ public startOutboundVoiceContact( args: StartOutboundVoiceContactCommandInput, diff --git a/clients/client-connect/src/commands/CreateIntegrationAssociationCommand.ts b/clients/client-connect/src/commands/CreateIntegrationAssociationCommand.ts index e3bdf9d1988f0..2cef9d04667e3 100644 --- a/clients/client-connect/src/commands/CreateIntegrationAssociationCommand.ts +++ b/clients/client-connect/src/commands/CreateIntegrationAssociationCommand.ts @@ -24,7 +24,7 @@ export interface CreateIntegrationAssociationCommandOutput __MetadataBearer {} /** - *

Create an AppIntegration association with an Amazon Connect instance.

+ *

Creates an AWS resource association with an Amazon Connect instance.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript diff --git a/clients/client-connect/src/commands/CreateUseCaseCommand.ts b/clients/client-connect/src/commands/CreateUseCaseCommand.ts index 23d4f3879d9f5..2f394d8ebbede 100644 --- a/clients/client-connect/src/commands/CreateUseCaseCommand.ts +++ b/clients/client-connect/src/commands/CreateUseCaseCommand.ts @@ -22,7 +22,7 @@ export interface CreateUseCaseCommandInput extends CreateUseCaseRequest {} export interface CreateUseCaseCommandOutput extends CreateUseCaseResponse, __MetadataBearer {} /** - *

Creates a use case for an AppIntegration association.

+ *

Creates a use case for an integration association.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript diff --git a/clients/client-connect/src/commands/DeleteIntegrationAssociationCommand.ts b/clients/client-connect/src/commands/DeleteIntegrationAssociationCommand.ts index 82f8378fbd532..62425034ca4ea 100644 --- a/clients/client-connect/src/commands/DeleteIntegrationAssociationCommand.ts +++ b/clients/client-connect/src/commands/DeleteIntegrationAssociationCommand.ts @@ -22,7 +22,7 @@ export interface DeleteIntegrationAssociationCommandInput extends DeleteIntegrat export interface DeleteIntegrationAssociationCommandOutput extends __MetadataBearer {} /** - *

Deletes an AppIntegration association from an Amazon Connect instance. The association must not have + *

Deletes an AWS resource association from an Amazon Connect instance. The association must not have * any use cases associated with it.

* @example * Use a bare-bones client and the command you need to make an API call. diff --git a/clients/client-connect/src/commands/DeleteUseCaseCommand.ts b/clients/client-connect/src/commands/DeleteUseCaseCommand.ts index 0171d10d5e152..74c8ebb4942ce 100644 --- a/clients/client-connect/src/commands/DeleteUseCaseCommand.ts +++ b/clients/client-connect/src/commands/DeleteUseCaseCommand.ts @@ -22,7 +22,7 @@ export interface DeleteUseCaseCommandInput extends DeleteUseCaseRequest {} export interface DeleteUseCaseCommandOutput extends __MetadataBearer {} /** - *

Deletes a use case from an AppIntegration association.

+ *

Deletes a use case from an integration association.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript diff --git a/clients/client-connect/src/commands/ListIntegrationAssociationsCommand.ts b/clients/client-connect/src/commands/ListIntegrationAssociationsCommand.ts index c13e851c06a76..553bee306b381 100644 --- a/clients/client-connect/src/commands/ListIntegrationAssociationsCommand.ts +++ b/clients/client-connect/src/commands/ListIntegrationAssociationsCommand.ts @@ -24,7 +24,7 @@ export interface ListIntegrationAssociationsCommandOutput __MetadataBearer {} /** - *

Provides summary information about the AppIntegration associations for the specified Amazon Connect + *

Provides summary information about the AWS resource associations for the specified Amazon Connect * instance.

* @example * Use a bare-bones client and the command you need to make an API call. diff --git a/clients/client-connect/src/commands/ListUseCasesCommand.ts b/clients/client-connect/src/commands/ListUseCasesCommand.ts index 521f601c2b316..aea66b83d10bd 100644 --- a/clients/client-connect/src/commands/ListUseCasesCommand.ts +++ b/clients/client-connect/src/commands/ListUseCasesCommand.ts @@ -22,7 +22,7 @@ export interface ListUseCasesCommandInput extends ListUseCasesRequest {} export interface ListUseCasesCommandOutput extends ListUseCasesResponse, __MetadataBearer {} /** - *

Lists the use cases.

+ *

Lists the use cases for the integration association.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript diff --git a/clients/client-connect/src/commands/StartOutboundVoiceContactCommand.ts b/clients/client-connect/src/commands/StartOutboundVoiceContactCommand.ts index 48aab861e952b..a1312e41c0d9b 100644 --- a/clients/client-connect/src/commands/StartOutboundVoiceContactCommand.ts +++ b/clients/client-connect/src/commands/StartOutboundVoiceContactCommand.ts @@ -36,6 +36,11 @@ export interface StartOutboundVoiceContactCommandOutput extends StartOutboundVoi * mobile numbers, you must submit a service quota increase request. For more information, see * Amazon Connect Service Quotas in the Amazon Connect Administrator Guide.

* + * + *

Campaign calls are not allowed by default. Before you can make a call with + * TrafficType = CAMPAIGN, you must submit a service quota increase request. For more information, see + * Amazon Connect Service Quotas in the Amazon Connect Administrator Guide.

+ *
* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript diff --git a/clients/client-connect/src/models/models_0.ts b/clients/client-connect/src/models/models_0.ts index af0665d50f69a..511400743c3f1 100644 --- a/clients/client-connect/src/models/models_0.ts +++ b/clients/client-connect/src/models/models_0.ts @@ -410,7 +410,10 @@ export interface EncryptionConfig { EncryptionType: EncryptionType | string | undefined; /** - *

The identifier of the encryption key.

+ *

The full ARN of the encryption key.

+ * + *

Be sure to provide the full ARN of the encryption key, not just the ID.

+ *
*/ KeyId: string | undefined; } @@ -1166,6 +1169,10 @@ export namespace CreateInstanceResponse { export enum IntegrationType { EVENT = "EVENT", + PINPOINT_APP = "PINPOINT_APP", + VOICE_ID = "VOICE_ID", + WISDOM_ASSISTANT = "WISDOM_ASSISTANT", + WISDOM_KNOWLEDGE_BASE = "WISDOM_KNOWLEDGE_BASE", } export enum SourceType { @@ -1190,19 +1197,19 @@ export interface CreateIntegrationAssociationRequest { IntegrationArn: string | undefined; /** - *

The URL for the external application.

+ *

The URL for the external application. This field is only required for the EVENT integration type.

*/ - SourceApplicationUrl: string | undefined; + SourceApplicationUrl?: string; /** - *

The name of the external application.

+ *

The name of the external application. This field is only required for the EVENT integration type.

*/ - SourceApplicationName: string | undefined; + SourceApplicationName?: string; /** - *

The type of the data source.

+ *

The type of the data source. This field is only required for the EVENT integration type.

*/ - SourceType: SourceType | string | undefined; + SourceType?: SourceType | string; /** *

One or more tags.

@@ -1221,7 +1228,7 @@ export namespace CreateIntegrationAssociationRequest { export interface CreateIntegrationAssociationResponse { /** - *

The identifier for the association.

+ *

The identifier for the integration association.

*/ IntegrationAssociationId?: string; @@ -1607,6 +1614,7 @@ export namespace CreateRoutingProfileResponse { } export enum UseCaseType { + CONNECT_CAMPAIGNS = "CONNECT_CAMPAIGNS", RULES_EVALUATION = "RULES_EVALUATION", } @@ -1617,12 +1625,12 @@ export interface CreateUseCaseRequest { InstanceId: string | undefined; /** - *

The identifier for the AppIntegration association.

+ *

The identifier for the integration association.

*/ IntegrationAssociationId: string | undefined; /** - *

The type of use case to associate to the AppIntegration association. Each AppIntegration + *

The type of use case to associate to the integration association. Each integration * association can have only one of each use case type.

*/ UseCaseType: UseCaseType | string | undefined; @@ -1917,7 +1925,7 @@ export interface DeleteIntegrationAssociationRequest { InstanceId: string | undefined; /** - *

The identifier for the AppIntegration association.

+ *

The identifier for the integration association.

*/ IntegrationAssociationId: string | undefined; } @@ -1959,7 +1967,7 @@ export interface DeleteUseCaseRequest { InstanceId: string | undefined; /** - *

The identifier for the AppIntegration association.

+ *

The identifier for the integration association.

*/ IntegrationAssociationId: string | undefined; @@ -3547,11 +3555,12 @@ export interface GetCurrentMetricDataRequest { *
OLDEST_CONTACT_AGE
*
*

Unit: SECONDS

- *

When you use groupings, Unit says SECONDS but the Value is returned in MILLISECONDS. For + *

When you use groupings, Unit says SECONDS and the Value is returned in SECONDS.

+ *

When you do not use groupings, Unit says SECONDS but the Value is returned in MILLISECONDS. For * example, if you get a response like this:

*

* { "Metric": { "Name": "OLDEST_CONTACT_AGE", "Unit": "SECONDS" }, "Value": 24113.0 - * }

+ * }

*

The actual OLDEST_CONTACT_AGE is 24 seconds.

* *

Name in real-time metrics report: Oldest @@ -4747,6 +4756,11 @@ export interface ListIntegrationAssociationsRequest { */ InstanceId: string | undefined; + /** + *

+ */ + IntegrationType?: IntegrationType | string; + /** *

The token for the next set of results. Use the value returned in the previous * response in the next request to retrieve the next set of results.

@@ -4824,7 +4838,7 @@ export namespace IntegrationAssociationSummary { export interface ListIntegrationAssociationsResponse { /** - *

The AppIntegration associations.

+ *

The associations.

*/ IntegrationAssociationSummaryList?: IntegrationAssociationSummary[]; @@ -5957,7 +5971,7 @@ export namespace ListTagsForResourceResponse { } /** - *

Provides summary information about the use cases for the specified Amazon Connect AppIntegration + *

Provides summary information about the use cases for the specified integration * association.

*/ export interface ListUseCasesRequest { @@ -6009,7 +6023,7 @@ export interface UseCase { UseCaseArn?: string; /** - *

The type of use case to associate to the AppIntegration association. Each AppIntegration + *

The type of use case to associate to the integration association. Each integration * association can have only one of each use case type.

*/ UseCaseType?: UseCaseType | string; @@ -6440,6 +6454,37 @@ export namespace OutboundContactNotPermittedException { }); } +/** + *

Configuration of the answering machine detection.

+ */ +export interface AnswerMachineDetectionConfig { + /** + *

The flag to indicate if answer machine detection analysis needs to be performed for a voice + * call. If set to true, TrafficType must be set as CAMPAIGN. + *

+ */ + EnableAnswerMachineDetection?: boolean; + + /** + *

Wait for the answering machine prompt.

+ */ + AwaitAnswerMachinePrompt?: boolean; +} + +export namespace AnswerMachineDetectionConfig { + /** + * @internal + */ + export const filterSensitiveLog = (obj: AnswerMachineDetectionConfig): any => ({ + ...obj, + }); +} + +export enum TrafficType { + CAMPAIGN = "CAMPAIGN", + GENERAL = "GENERAL", +} + export interface StartOutboundVoiceContactRequest { /** *

The phone number of the customer, in E.164 format.

@@ -6492,6 +6537,24 @@ export interface StartOutboundVoiceContactRequest { * can include only alphanumeric, dash, and underscore characters.

*/ Attributes?: { [key: string]: string }; + + /** + *

Configuration of the answering machine detection for this outbound call.

+ */ + AnswerMachineDetectionConfig?: AnswerMachineDetectionConfig; + + /** + *

The campaign identifier of the outbound communication.

+ */ + CampaignId?: string; + + /** + *

Denotes the class of traffic. Calls with different traffic types are handled differently by + * Amazon Connect. The default value is GENERAL. Use CAMPAIGN if + * EnableAnswerMachineDetection is set to true. For all other cases, use + * GENERAL.

+ */ + TrafficType?: TrafficType | string; } export namespace StartOutboundVoiceContactRequest { @@ -6993,6 +7056,9 @@ export interface UpdateInstanceAttributeRequest { /** *

The type of attribute.

+ * + *

Only allowlisted customers can consume USE_CUSTOM_TTS_VOICES. To access this feature, contact AWS Support for allowlisting.

+ *
*/ AttributeType: InstanceAttributeType | string | undefined; diff --git a/clients/client-connect/src/protocols/Aws_restJson1.ts b/clients/client-connect/src/protocols/Aws_restJson1.ts index c2ffcc100814d..70ed15d4956c1 100644 --- a/clients/client-connect/src/protocols/Aws_restJson1.ts +++ b/clients/client-connect/src/protocols/Aws_restJson1.ts @@ -339,6 +339,7 @@ import { import { AgentStatus, AgentStatusSummary, + AnswerMachineDetectionConfig, Attribute, Channel, ChatMessage, @@ -2665,6 +2666,7 @@ export const serializeAws_restJson1ListIntegrationAssociationsCommand = async ( throw new Error("No value provided for input HTTP label: InstanceId."); } const query: any = { + ...(input.IntegrationType !== undefined && { integrationType: input.IntegrationType }), ...(input.NextToken !== undefined && { nextToken: input.NextToken }), ...(input.MaxResults !== undefined && { maxResults: input.MaxResults.toString() }), }; @@ -3337,8 +3339,16 @@ export const serializeAws_restJson1StartOutboundVoiceContactCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/contact/outbound-voice"; let body: any; body = JSON.stringify({ + ...(input.AnswerMachineDetectionConfig !== undefined && + input.AnswerMachineDetectionConfig !== null && { + AnswerMachineDetectionConfig: serializeAws_restJson1AnswerMachineDetectionConfig( + input.AnswerMachineDetectionConfig, + context + ), + }), ...(input.Attributes !== undefined && input.Attributes !== null && { Attributes: serializeAws_restJson1Attributes(input.Attributes, context) }), + ...(input.CampaignId !== undefined && input.CampaignId !== null && { CampaignId: input.CampaignId }), ClientToken: input.ClientToken ?? generateIdempotencyToken(), ...(input.ContactFlowId !== undefined && input.ContactFlowId !== null && { ContactFlowId: input.ContactFlowId }), ...(input.DestinationPhoneNumber !== undefined && @@ -3347,6 +3357,7 @@ export const serializeAws_restJson1StartOutboundVoiceContactCommand = async ( ...(input.QueueId !== undefined && input.QueueId !== null && { QueueId: input.QueueId }), ...(input.SourcePhoneNumber !== undefined && input.SourcePhoneNumber !== null && { SourcePhoneNumber: input.SourcePhoneNumber }), + ...(input.TrafficType !== undefined && input.TrafficType !== null && { TrafficType: input.TrafficType }), }); return new __HttpRequest({ protocol, @@ -14563,6 +14574,20 @@ const deserializeAws_restJson1UserNotFoundExceptionResponse = async ( return contents; }; +const serializeAws_restJson1AnswerMachineDetectionConfig = ( + input: AnswerMachineDetectionConfig, + context: __SerdeContext +): any => { + return { + ...(input.AwaitAnswerMachinePrompt !== undefined && + input.AwaitAnswerMachinePrompt !== null && { AwaitAnswerMachinePrompt: input.AwaitAnswerMachinePrompt }), + ...(input.EnableAnswerMachineDetection !== undefined && + input.EnableAnswerMachineDetection !== null && { + EnableAnswerMachineDetection: input.EnableAnswerMachineDetection, + }), + }; +}; + const serializeAws_restJson1Attributes = (input: { [key: string]: string }, context: __SerdeContext): any => { return Object.entries(input).reduce((acc: { [key: string]: any }, [key, value]: [string, any]) => { if (value === null) { diff --git a/clients/client-dataexchange/src/DataExchange.ts b/clients/client-dataexchange/src/DataExchange.ts index a1ee0e08ac76d..730a17b86e734 100644 --- a/clients/client-dataexchange/src/DataExchange.ts +++ b/clients/client-dataexchange/src/DataExchange.ts @@ -6,6 +6,11 @@ import { CreateDataSetCommandInput, CreateDataSetCommandOutput, } from "./commands/CreateDataSetCommand"; +import { + CreateEventActionCommand, + CreateEventActionCommandInput, + CreateEventActionCommandOutput, +} from "./commands/CreateEventActionCommand"; import { CreateJobCommand, CreateJobCommandInput, CreateJobCommandOutput } from "./commands/CreateJobCommand"; import { CreateRevisionCommand, @@ -18,6 +23,11 @@ import { DeleteDataSetCommandInput, DeleteDataSetCommandOutput, } from "./commands/DeleteDataSetCommand"; +import { + DeleteEventActionCommand, + DeleteEventActionCommandInput, + DeleteEventActionCommandOutput, +} from "./commands/DeleteEventActionCommand"; import { DeleteRevisionCommand, DeleteRevisionCommandInput, @@ -25,6 +35,11 @@ import { } from "./commands/DeleteRevisionCommand"; import { GetAssetCommand, GetAssetCommandInput, GetAssetCommandOutput } from "./commands/GetAssetCommand"; import { GetDataSetCommand, GetDataSetCommandInput, GetDataSetCommandOutput } from "./commands/GetDataSetCommand"; +import { + GetEventActionCommand, + GetEventActionCommandInput, + GetEventActionCommandOutput, +} from "./commands/GetEventActionCommand"; import { GetJobCommand, GetJobCommandInput, GetJobCommandOutput } from "./commands/GetJobCommand"; import { GetRevisionCommand, GetRevisionCommandInput, GetRevisionCommandOutput } from "./commands/GetRevisionCommand"; import { @@ -37,6 +52,11 @@ import { ListDataSetsCommandInput, ListDataSetsCommandOutput, } from "./commands/ListDataSetsCommand"; +import { + ListEventActionsCommand, + ListEventActionsCommandInput, + ListEventActionsCommandOutput, +} from "./commands/ListEventActionsCommand"; import { ListJobsCommand, ListJobsCommandInput, ListJobsCommandOutput } from "./commands/ListJobsCommand"; import { ListRevisionAssetsCommand, @@ -61,6 +81,11 @@ import { UpdateDataSetCommandInput, UpdateDataSetCommandOutput, } from "./commands/UpdateDataSetCommand"; +import { + UpdateEventActionCommand, + UpdateEventActionCommandInput, + UpdateEventActionCommandOutput, +} from "./commands/UpdateEventActionCommand"; import { UpdateRevisionCommand, UpdateRevisionCommandInput, @@ -130,6 +155,38 @@ export class DataExchange extends DataExchangeClient { } } + /** + *

This operation creates an event action.

+ */ + public createEventAction( + args: CreateEventActionCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public createEventAction( + args: CreateEventActionCommandInput, + cb: (err: any, data?: CreateEventActionCommandOutput) => void + ): void; + public createEventAction( + args: CreateEventActionCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateEventActionCommandOutput) => void + ): void; + public createEventAction( + args: CreateEventActionCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: CreateEventActionCommandOutput) => void), + cb?: (err: any, data?: CreateEventActionCommandOutput) => void + ): Promise | void { + const command = new CreateEventActionCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + /** *

This operation creates a job.

*/ @@ -246,6 +303,38 @@ export class DataExchange extends DataExchangeClient { } } + /** + *

This operation deletes the event action.

+ */ + public deleteEventAction( + args: DeleteEventActionCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public deleteEventAction( + args: DeleteEventActionCommandInput, + cb: (err: any, data?: DeleteEventActionCommandOutput) => void + ): void; + public deleteEventAction( + args: DeleteEventActionCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteEventActionCommandOutput) => void + ): void; + public deleteEventAction( + args: DeleteEventActionCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DeleteEventActionCommandOutput) => void), + cb?: (err: any, data?: DeleteEventActionCommandOutput) => void + ): Promise | void { + const command = new DeleteEventActionCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + /** *

This operation deletes a revision.

*/ @@ -330,6 +419,38 @@ export class DataExchange extends DataExchangeClient { } } + /** + *

This operation retrieves information about an event action.

+ */ + public getEventAction( + args: GetEventActionCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public getEventAction( + args: GetEventActionCommandInput, + cb: (err: any, data?: GetEventActionCommandOutput) => void + ): void; + public getEventAction( + args: GetEventActionCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetEventActionCommandOutput) => void + ): void; + public getEventAction( + args: GetEventActionCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetEventActionCommandOutput) => void), + cb?: (err: any, data?: GetEventActionCommandOutput) => void + ): Promise | void { + const command = new GetEventActionCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + /** *

This operation returns information about a job.

*/ @@ -443,6 +564,38 @@ export class DataExchange extends DataExchangeClient { } } + /** + *

This operation lists your event actions.

+ */ + public listEventActions( + args: ListEventActionsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public listEventActions( + args: ListEventActionsCommandInput, + cb: (err: any, data?: ListEventActionsCommandOutput) => void + ): void; + public listEventActions( + args: ListEventActionsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListEventActionsCommandOutput) => void + ): void; + public listEventActions( + args: ListEventActionsCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ListEventActionsCommandOutput) => void), + cb?: (err: any, data?: ListEventActionsCommandOutput) => void + ): Promise | void { + const command = new ListEventActionsCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + /** *

This operation lists your jobs sorted by CreatedAt in descending order.

*/ @@ -675,6 +828,38 @@ export class DataExchange extends DataExchangeClient { } } + /** + *

This operation updates the event action.

+ */ + public updateEventAction( + args: UpdateEventActionCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public updateEventAction( + args: UpdateEventActionCommandInput, + cb: (err: any, data?: UpdateEventActionCommandOutput) => void + ): void; + public updateEventAction( + args: UpdateEventActionCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateEventActionCommandOutput) => void + ): void; + public updateEventAction( + args: UpdateEventActionCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: UpdateEventActionCommandOutput) => void), + cb?: (err: any, data?: UpdateEventActionCommandOutput) => void + ): Promise | void { + const command = new UpdateEventActionCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + /** *

This operation updates a revision.

*/ diff --git a/clients/client-dataexchange/src/DataExchangeClient.ts b/clients/client-dataexchange/src/DataExchangeClient.ts index 8a92dfaf9571a..21cf42dd3fe13 100644 --- a/clients/client-dataexchange/src/DataExchangeClient.ts +++ b/clients/client-dataexchange/src/DataExchangeClient.ts @@ -51,13 +51,16 @@ import { import { CancelJobCommandInput, CancelJobCommandOutput } from "./commands/CancelJobCommand"; import { CreateDataSetCommandInput, CreateDataSetCommandOutput } from "./commands/CreateDataSetCommand"; +import { CreateEventActionCommandInput, CreateEventActionCommandOutput } from "./commands/CreateEventActionCommand"; import { CreateJobCommandInput, CreateJobCommandOutput } from "./commands/CreateJobCommand"; import { CreateRevisionCommandInput, CreateRevisionCommandOutput } from "./commands/CreateRevisionCommand"; import { DeleteAssetCommandInput, DeleteAssetCommandOutput } from "./commands/DeleteAssetCommand"; import { DeleteDataSetCommandInput, DeleteDataSetCommandOutput } from "./commands/DeleteDataSetCommand"; +import { DeleteEventActionCommandInput, DeleteEventActionCommandOutput } from "./commands/DeleteEventActionCommand"; import { DeleteRevisionCommandInput, DeleteRevisionCommandOutput } from "./commands/DeleteRevisionCommand"; import { GetAssetCommandInput, GetAssetCommandOutput } from "./commands/GetAssetCommand"; import { GetDataSetCommandInput, GetDataSetCommandOutput } from "./commands/GetDataSetCommand"; +import { GetEventActionCommandInput, GetEventActionCommandOutput } from "./commands/GetEventActionCommand"; import { GetJobCommandInput, GetJobCommandOutput } from "./commands/GetJobCommand"; import { GetRevisionCommandInput, GetRevisionCommandOutput } from "./commands/GetRevisionCommand"; import { @@ -65,6 +68,7 @@ import { ListDataSetRevisionsCommandOutput, } from "./commands/ListDataSetRevisionsCommand"; import { ListDataSetsCommandInput, ListDataSetsCommandOutput } from "./commands/ListDataSetsCommand"; +import { ListEventActionsCommandInput, ListEventActionsCommandOutput } from "./commands/ListEventActionsCommand"; import { ListJobsCommandInput, ListJobsCommandOutput } from "./commands/ListJobsCommand"; import { ListRevisionAssetsCommandInput, ListRevisionAssetsCommandOutput } from "./commands/ListRevisionAssetsCommand"; import { @@ -76,23 +80,28 @@ import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/Ta import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand"; import { UpdateAssetCommandInput, UpdateAssetCommandOutput } from "./commands/UpdateAssetCommand"; import { UpdateDataSetCommandInput, UpdateDataSetCommandOutput } from "./commands/UpdateDataSetCommand"; +import { UpdateEventActionCommandInput, UpdateEventActionCommandOutput } from "./commands/UpdateEventActionCommand"; import { UpdateRevisionCommandInput, UpdateRevisionCommandOutput } from "./commands/UpdateRevisionCommand"; import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig"; export type ServiceInputTypes = | CancelJobCommandInput | CreateDataSetCommandInput + | CreateEventActionCommandInput | CreateJobCommandInput | CreateRevisionCommandInput | DeleteAssetCommandInput | DeleteDataSetCommandInput + | DeleteEventActionCommandInput | DeleteRevisionCommandInput | GetAssetCommandInput | GetDataSetCommandInput + | GetEventActionCommandInput | GetJobCommandInput | GetRevisionCommandInput | ListDataSetRevisionsCommandInput | ListDataSetsCommandInput + | ListEventActionsCommandInput | ListJobsCommandInput | ListRevisionAssetsCommandInput | ListTagsForResourceCommandInput @@ -101,22 +110,27 @@ export type ServiceInputTypes = | UntagResourceCommandInput | UpdateAssetCommandInput | UpdateDataSetCommandInput + | UpdateEventActionCommandInput | UpdateRevisionCommandInput; export type ServiceOutputTypes = | CancelJobCommandOutput | CreateDataSetCommandOutput + | CreateEventActionCommandOutput | CreateJobCommandOutput | CreateRevisionCommandOutput | DeleteAssetCommandOutput | DeleteDataSetCommandOutput + | DeleteEventActionCommandOutput | DeleteRevisionCommandOutput | GetAssetCommandOutput | GetDataSetCommandOutput + | GetEventActionCommandOutput | GetJobCommandOutput | GetRevisionCommandOutput | ListDataSetRevisionsCommandOutput | ListDataSetsCommandOutput + | ListEventActionsCommandOutput | ListJobsCommandOutput | ListRevisionAssetsCommandOutput | ListTagsForResourceCommandOutput @@ -125,6 +139,7 @@ export type ServiceOutputTypes = | UntagResourceCommandOutput | UpdateAssetCommandOutput | UpdateDataSetCommandOutput + | UpdateEventActionCommandOutput | UpdateRevisionCommandOutput; export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { diff --git a/clients/client-dataexchange/src/commands/CreateEventActionCommand.ts b/clients/client-dataexchange/src/commands/CreateEventActionCommand.ts new file mode 100644 index 0000000000000..5850f736536bb --- /dev/null +++ b/clients/client-dataexchange/src/commands/CreateEventActionCommand.ts @@ -0,0 +1,95 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { DataExchangeClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DataExchangeClient"; +import { CreateEventActionRequest, CreateEventActionResponse } from "../models/models_0"; +import { + deserializeAws_restJson1CreateEventActionCommand, + serializeAws_restJson1CreateEventActionCommand, +} from "../protocols/Aws_restJson1"; + +export interface CreateEventActionCommandInput extends CreateEventActionRequest {} +export interface CreateEventActionCommandOutput extends CreateEventActionResponse, __MetadataBearer {} + +/** + *

This operation creates an event action.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { DataExchangeClient, CreateEventActionCommand } from "@aws-sdk/client-dataexchange"; // ES Modules import + * // const { DataExchangeClient, CreateEventActionCommand } = require("@aws-sdk/client-dataexchange"); // CommonJS import + * const client = new DataExchangeClient(config); + * const command = new CreateEventActionCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link CreateEventActionCommandInput} for command's `input` shape. + * @see {@link CreateEventActionCommandOutput} for command's `response` shape. + * @see {@link DataExchangeClientResolvedConfig | config} for command's `input` shape. + * + */ +export class CreateEventActionCommand extends $Command< + CreateEventActionCommandInput, + CreateEventActionCommandOutput, + DataExchangeClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: CreateEventActionCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DataExchangeClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "DataExchangeClient"; + const commandName = "CreateEventActionCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: CreateEventActionRequest.filterSensitiveLog, + outputFilterSensitiveLog: CreateEventActionResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: CreateEventActionCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1CreateEventActionCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1CreateEventActionCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-dataexchange/src/commands/DeleteEventActionCommand.ts b/clients/client-dataexchange/src/commands/DeleteEventActionCommand.ts new file mode 100644 index 0000000000000..76d5e307b7de7 --- /dev/null +++ b/clients/client-dataexchange/src/commands/DeleteEventActionCommand.ts @@ -0,0 +1,95 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { DataExchangeClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DataExchangeClient"; +import { DeleteEventActionRequest } from "../models/models_0"; +import { + deserializeAws_restJson1DeleteEventActionCommand, + serializeAws_restJson1DeleteEventActionCommand, +} from "../protocols/Aws_restJson1"; + +export interface DeleteEventActionCommandInput extends DeleteEventActionRequest {} +export interface DeleteEventActionCommandOutput extends __MetadataBearer {} + +/** + *

This operation deletes the event action.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { DataExchangeClient, DeleteEventActionCommand } from "@aws-sdk/client-dataexchange"; // ES Modules import + * // const { DataExchangeClient, DeleteEventActionCommand } = require("@aws-sdk/client-dataexchange"); // CommonJS import + * const client = new DataExchangeClient(config); + * const command = new DeleteEventActionCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link DeleteEventActionCommandInput} for command's `input` shape. + * @see {@link DeleteEventActionCommandOutput} for command's `response` shape. + * @see {@link DataExchangeClientResolvedConfig | config} for command's `input` shape. + * + */ +export class DeleteEventActionCommand extends $Command< + DeleteEventActionCommandInput, + DeleteEventActionCommandOutput, + DataExchangeClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DeleteEventActionCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DataExchangeClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "DataExchangeClient"; + const commandName = "DeleteEventActionCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: DeleteEventActionRequest.filterSensitiveLog, + outputFilterSensitiveLog: (output: any) => output, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: DeleteEventActionCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1DeleteEventActionCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1DeleteEventActionCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-dataexchange/src/commands/GetEventActionCommand.ts b/clients/client-dataexchange/src/commands/GetEventActionCommand.ts new file mode 100644 index 0000000000000..81b95eb14741e --- /dev/null +++ b/clients/client-dataexchange/src/commands/GetEventActionCommand.ts @@ -0,0 +1,95 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { DataExchangeClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DataExchangeClient"; +import { GetEventActionRequest, GetEventActionResponse } from "../models/models_0"; +import { + deserializeAws_restJson1GetEventActionCommand, + serializeAws_restJson1GetEventActionCommand, +} from "../protocols/Aws_restJson1"; + +export interface GetEventActionCommandInput extends GetEventActionRequest {} +export interface GetEventActionCommandOutput extends GetEventActionResponse, __MetadataBearer {} + +/** + *

This operation retrieves information about an event action.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { DataExchangeClient, GetEventActionCommand } from "@aws-sdk/client-dataexchange"; // ES Modules import + * // const { DataExchangeClient, GetEventActionCommand } = require("@aws-sdk/client-dataexchange"); // CommonJS import + * const client = new DataExchangeClient(config); + * const command = new GetEventActionCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link GetEventActionCommandInput} for command's `input` shape. + * @see {@link GetEventActionCommandOutput} for command's `response` shape. + * @see {@link DataExchangeClientResolvedConfig | config} for command's `input` shape. + * + */ +export class GetEventActionCommand extends $Command< + GetEventActionCommandInput, + GetEventActionCommandOutput, + DataExchangeClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetEventActionCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DataExchangeClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "DataExchangeClient"; + const commandName = "GetEventActionCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: GetEventActionRequest.filterSensitiveLog, + outputFilterSensitiveLog: GetEventActionResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: GetEventActionCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1GetEventActionCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1GetEventActionCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-dataexchange/src/commands/ListEventActionsCommand.ts b/clients/client-dataexchange/src/commands/ListEventActionsCommand.ts new file mode 100644 index 0000000000000..4d3d0fdf5d305 --- /dev/null +++ b/clients/client-dataexchange/src/commands/ListEventActionsCommand.ts @@ -0,0 +1,95 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { DataExchangeClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DataExchangeClient"; +import { ListEventActionsRequest, ListEventActionsResponse } from "../models/models_0"; +import { + deserializeAws_restJson1ListEventActionsCommand, + serializeAws_restJson1ListEventActionsCommand, +} from "../protocols/Aws_restJson1"; + +export interface ListEventActionsCommandInput extends ListEventActionsRequest {} +export interface ListEventActionsCommandOutput extends ListEventActionsResponse, __MetadataBearer {} + +/** + *

This operation lists your event actions.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { DataExchangeClient, ListEventActionsCommand } from "@aws-sdk/client-dataexchange"; // ES Modules import + * // const { DataExchangeClient, ListEventActionsCommand } = require("@aws-sdk/client-dataexchange"); // CommonJS import + * const client = new DataExchangeClient(config); + * const command = new ListEventActionsCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link ListEventActionsCommandInput} for command's `input` shape. + * @see {@link ListEventActionsCommandOutput} for command's `response` shape. + * @see {@link DataExchangeClientResolvedConfig | config} for command's `input` shape. + * + */ +export class ListEventActionsCommand extends $Command< + ListEventActionsCommandInput, + ListEventActionsCommandOutput, + DataExchangeClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: ListEventActionsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DataExchangeClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "DataExchangeClient"; + const commandName = "ListEventActionsCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: ListEventActionsRequest.filterSensitiveLog, + outputFilterSensitiveLog: ListEventActionsResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: ListEventActionsCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1ListEventActionsCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1ListEventActionsCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-dataexchange/src/commands/UpdateEventActionCommand.ts b/clients/client-dataexchange/src/commands/UpdateEventActionCommand.ts new file mode 100644 index 0000000000000..a46f67fbb6779 --- /dev/null +++ b/clients/client-dataexchange/src/commands/UpdateEventActionCommand.ts @@ -0,0 +1,95 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { DataExchangeClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DataExchangeClient"; +import { UpdateEventActionRequest, UpdateEventActionResponse } from "../models/models_0"; +import { + deserializeAws_restJson1UpdateEventActionCommand, + serializeAws_restJson1UpdateEventActionCommand, +} from "../protocols/Aws_restJson1"; + +export interface UpdateEventActionCommandInput extends UpdateEventActionRequest {} +export interface UpdateEventActionCommandOutput extends UpdateEventActionResponse, __MetadataBearer {} + +/** + *

This operation updates the event action.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { DataExchangeClient, UpdateEventActionCommand } from "@aws-sdk/client-dataexchange"; // ES Modules import + * // const { DataExchangeClient, UpdateEventActionCommand } = require("@aws-sdk/client-dataexchange"); // CommonJS import + * const client = new DataExchangeClient(config); + * const command = new UpdateEventActionCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link UpdateEventActionCommandInput} for command's `input` shape. + * @see {@link UpdateEventActionCommandOutput} for command's `response` shape. + * @see {@link DataExchangeClientResolvedConfig | config} for command's `input` shape. + * + */ +export class UpdateEventActionCommand extends $Command< + UpdateEventActionCommandInput, + UpdateEventActionCommandOutput, + DataExchangeClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: UpdateEventActionCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DataExchangeClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "DataExchangeClient"; + const commandName = "UpdateEventActionCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: UpdateEventActionRequest.filterSensitiveLog, + outputFilterSensitiveLog: UpdateEventActionResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: UpdateEventActionCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1UpdateEventActionCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1UpdateEventActionCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-dataexchange/src/index.ts b/clients/client-dataexchange/src/index.ts index f429b0794e0a1..aab55c2d935de 100644 --- a/clients/client-dataexchange/src/index.ts +++ b/clients/client-dataexchange/src/index.ts @@ -2,19 +2,24 @@ export * from "./DataExchangeClient"; export * from "./DataExchange"; export * from "./commands/CancelJobCommand"; export * from "./commands/CreateDataSetCommand"; +export * from "./commands/CreateEventActionCommand"; export * from "./commands/CreateJobCommand"; export * from "./commands/CreateRevisionCommand"; export * from "./commands/DeleteAssetCommand"; export * from "./commands/DeleteDataSetCommand"; +export * from "./commands/DeleteEventActionCommand"; export * from "./commands/DeleteRevisionCommand"; export * from "./commands/GetAssetCommand"; export * from "./commands/GetDataSetCommand"; +export * from "./commands/GetEventActionCommand"; export * from "./commands/GetJobCommand"; export * from "./commands/GetRevisionCommand"; export * from "./commands/ListDataSetRevisionsCommand"; export * from "./pagination/ListDataSetRevisionsPaginator"; export * from "./commands/ListDataSetsCommand"; export * from "./pagination/ListDataSetsPaginator"; +export * from "./commands/ListEventActionsCommand"; +export * from "./pagination/ListEventActionsPaginator"; export * from "./commands/ListJobsCommand"; export * from "./pagination/ListJobsPaginator"; export * from "./commands/ListRevisionAssetsCommand"; @@ -25,6 +30,7 @@ export * from "./commands/TagResourceCommand"; export * from "./commands/UntagResourceCommand"; export * from "./commands/UpdateAssetCommand"; export * from "./commands/UpdateDataSetCommand"; +export * from "./commands/UpdateEventActionCommand"; export * from "./commands/UpdateRevisionCommand"; export * from "./pagination/Interfaces"; export * from "./models/index"; diff --git a/clients/client-dataexchange/src/models/models_0.ts b/clients/client-dataexchange/src/models/models_0.ts index 7538ecc8b2b8e..95221a2c49c66 100644 --- a/clients/client-dataexchange/src/models/models_0.ts +++ b/clients/client-dataexchange/src/models/models_0.ts @@ -21,6 +21,99 @@ export namespace AccessDeniedException { }); } +export enum ServerSideEncryptionTypes { + AES256 = "AES256", + aws_kms = "aws:kms", +} + +/** + *

Encryption configuration of the export job. Includes the encryption type in addition to the AWS KMS key. The KMS key is only necessary if you chose the KMS encryption. type.

+ */ +export interface ExportServerSideEncryption { + /** + *

The Amazon Resource Name (ARN) of the AWS KMS key you want to use to encrypt the Amazon S3 objects. This parameter is required if you choose aws:kms as an encryption type.

+ */ + KmsKeyArn?: string; + + /** + *

The type of server side encryption used for encrypting the objects in Amazon S3.

+ */ + Type: ServerSideEncryptionTypes | string | undefined; +} + +export namespace ExportServerSideEncryption { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ExportServerSideEncryption): any => ({ + ...obj, + }); +} + +/** + *

A revision destination is the Amazon S3 bucket folder destination to where the export will be sent.

+ */ +export interface AutoExportRevisionDestinationEntry { + /** + *

The S3 bucket that is the destination for the event action.

+ */ + Bucket: string | undefined; + + /** + *

A string representing the pattern for generated names of the individual assets in the revision. For more information about key patterns, see Key patterns when exporting revisions.

+ */ + KeyPattern?: string; +} + +export namespace AutoExportRevisionDestinationEntry { + /** + * @internal + */ + export const filterSensitiveLog = (obj: AutoExportRevisionDestinationEntry): any => ({ + ...obj, + }); +} + +/** + *

Details of the operation to be performed by the job.

+ */ +export interface AutoExportRevisionToS3RequestDetails { + /** + *

Encryption configuration of the export job. Includes the encryption type in addition to the AWS KMS key. The KMS key is only necessary if you chose the KMS encryption. type.

+ */ + Encryption?: ExportServerSideEncryption; + + /** + *

A revision destination is the Amazon S3 bucket folder destination to where the export will be sent.

+ */ + RevisionDestination: AutoExportRevisionDestinationEntry | undefined; +} + +export namespace AutoExportRevisionToS3RequestDetails { + /** + * @internal + */ + export const filterSensitiveLog = (obj: AutoExportRevisionToS3RequestDetails): any => ({ + ...obj, + }); +} + +export interface Action { + /** + *

Details of the operation to be performed by the job.

+ */ + ExportRevisionToS3?: AutoExportRevisionToS3RequestDetails; +} + +export namespace Action { + /** + * @internal + */ + export const filterSensitiveLog = (obj: Action): any => ({ + ...obj, + }); +} + /** *

The destination for the asset.

*/ @@ -196,6 +289,7 @@ export namespace CancelJobRequest { export enum ResourceType { ASSET = "ASSET", DATA_SET = "DATA_SET", + EVENT_ACTION = "EVENT_ACTION", JOB = "JOB", REVISION = "REVISION", } @@ -304,6 +398,11 @@ export namespace ThrottlingException { }); } +export enum ExceptionCause { + InsufficientS3BucketPolicy = "InsufficientS3BucketPolicy", + S3AccessDenied = "S3AccessDenied", +} + /** *

The request was invalid.

*/ @@ -314,6 +413,11 @@ export interface ValidationException extends __SmithyException, $MetadataBearer *

The message that informs you about what was invalid about the request.

*/ Message: string | undefined; + + /** + *

The message that informs you about what the exception was.

+ */ + ExceptionCause?: ExceptionCause | string; } export namespace ValidationException { @@ -458,12 +562,15 @@ export enum LimitName { Asset_size_in_GB = "Asset size in GB", Assets_per_import_job_from_Amazon_S3 = "Assets per import job from Amazon S3", Assets_per_revision = "Assets per revision", + Auto_export_event_actions_per_data_set = "Auto export event actions per data set", Concurrent_in_progress_jobs_to_export_assets_to_Amazon_S3 = "Concurrent in progress jobs to export assets to Amazon S3", Concurrent_in_progress_jobs_to_export_assets_to_a_signed_URL = "Concurrent in progress jobs to export assets to a signed URL", + Concurrent_in_progress_jobs_to_export_revisions_to_Amazon_S3 = "Concurrent in progress jobs to export revisions to Amazon S3", Concurrent_in_progress_jobs_to_import_assets_from_Amazon_S3 = "Concurrent in progress jobs to import assets from Amazon S3", Concurrent_in_progress_jobs_to_import_assets_from_a_signed_URL = "Concurrent in progress jobs to import assets from a signed URL", Data_sets_per_account = "Data sets per account", Data_sets_per_product = "Data sets per product", + Event_actions_per_account = "Event actions per account", Products_per_account = "Products per account", Revisions_per_data_set = "Revisions per data set", } @@ -499,31 +606,96 @@ export namespace ServiceLimitExceededException { }); } -export enum ServerSideEncryptionTypes { - AES256 = "AES256", - aws_kms = "aws:kms", +export interface RevisionPublished { + /** + *

A unique identifier.

+ */ + DataSetId: string | undefined; +} + +export namespace RevisionPublished { + /** + * @internal + */ + export const filterSensitiveLog = (obj: RevisionPublished): any => ({ + ...obj, + }); +} + +export interface Event { + RevisionPublished?: RevisionPublished; +} + +export namespace Event { + /** + * @internal + */ + export const filterSensitiveLog = (obj: Event): any => ({ + ...obj, + }); } /** - *

Encryption configuration of the export job. Includes the encryption type as well as the AWS KMS key. The KMS key is only necessary if you chose the KMS encryption type.

+ *

The request body for CreateEventAction.

*/ -export interface ExportServerSideEncryption { +export interface CreateEventActionRequest { /** - *

The Amazon Resource Name (ARN) of the the AWS KMS key you want to use to encrypt the Amazon S3 objects. This parameter is required if you choose aws:kms as an encryption type.

+ *

What occurs after a certain event.

*/ - KmsKeyArn?: string; + Action: Action | undefined; /** - *

The type of server side encryption used for encrypting the objects in Amazon S3.

+ *

What occurs to start an action.

*/ - Type: ServerSideEncryptionTypes | string | undefined; + Event: Event | undefined; } -export namespace ExportServerSideEncryption { +export namespace CreateEventActionRequest { /** * @internal */ - export const filterSensitiveLog = (obj: ExportServerSideEncryption): any => ({ + export const filterSensitiveLog = (obj: CreateEventActionRequest): any => ({ + ...obj, + }); +} + +export interface CreateEventActionResponse { + /** + *

What occurs after a certain event.

+ */ + Action?: Action; + + /** + *

The ARN for the event action.

+ */ + Arn?: string; + + /** + *

The date and time that the event action was created, in ISO 8601 format.

+ */ + CreatedAt?: Date; + + /** + *

What occurs to start an action.

+ */ + Event?: Event; + + /** + *

The unique identifier for the event action.

+ */ + Id?: string; + + /** + *

The date and time that the event action was last updated, in ISO 8601 format.

+ */ + UpdatedAt?: Date; +} + +export namespace CreateEventActionResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: CreateEventActionResponse): any => ({ ...obj, }); } @@ -1037,6 +1209,7 @@ export enum JobErrorLimitName { export enum JobErrorResourceTypes { ASSET = "ASSET", + DATA_SET = "DATA_SET", REVISION = "REVISION", } @@ -1272,6 +1445,22 @@ export namespace DeleteDataSetRequest { }); } +export interface DeleteEventActionRequest { + /** + *

The unique identifier for the event action.

+ */ + EventActionId: string | undefined; +} + +export namespace DeleteEventActionRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DeleteEventActionRequest): any => ({ + ...obj, + }); +} + export interface DeleteRevisionRequest { /** *

The unique identifier for a data set.

@@ -1462,6 +1651,63 @@ export namespace GetDataSetResponse { }); } +export interface GetEventActionRequest { + /** + *

The unique identifier for the event action.

+ */ + EventActionId: string | undefined; +} + +export namespace GetEventActionRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetEventActionRequest): any => ({ + ...obj, + }); +} + +export interface GetEventActionResponse { + /** + *

What occurs after a certain event.

+ */ + Action?: Action; + + /** + *

The ARN for the event action.

+ */ + Arn?: string; + + /** + *

The date and time that the event action was created, in ISO 8601 format.

+ */ + CreatedAt?: Date; + + /** + *

What occurs to start an action.

+ */ + Event?: Event; + + /** + *

The unique identifier for the event action.

+ */ + Id?: string; + + /** + *

The date and time that the event action was last updated, in ISO 8601 format.

+ */ + UpdatedAt?: Date; +} + +export namespace GetEventActionResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetEventActionResponse): any => ({ + ...obj, + }); +} + export interface GetJobRequest { /** *

The unique identifier for a job.

@@ -1818,6 +2064,97 @@ export namespace ListDataSetsResponse { }); } +export interface ListEventActionsRequest { + /** + *

The unique identifier for the event source.

+ */ + EventSourceId?: string; + + /** + *

The maximum number of results returned by a single call.

+ */ + MaxResults?: number; + + /** + *

The token value retrieved from a previous call to access the next page of results.

+ */ + NextToken?: string; +} + +export namespace ListEventActionsRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ListEventActionsRequest): any => ({ + ...obj, + }); +} + +/** + *

An event action is an object that defines the relationship between a specific event and an automated action that will be taken on behalf of the customer.

+ */ +export interface EventActionEntry { + /** + *

What occurs after a certain event.

+ */ + Action: Action | undefined; + + /** + *

The ARN for the event action.

+ */ + Arn: string | undefined; + + /** + *

The date and time that the event action was created, in ISO 8601 format.

+ */ + CreatedAt: Date | undefined; + + /** + *

What occurs to start an action.

+ */ + Event: Event | undefined; + + /** + *

The unique identifier for the event action.

+ */ + Id: string | undefined; + + /** + *

The date and time that the event action was last updated, in ISO 8601 format.

+ */ + UpdatedAt: Date | undefined; +} + +export namespace EventActionEntry { + /** + * @internal + */ + export const filterSensitiveLog = (obj: EventActionEntry): any => ({ + ...obj, + }); +} + +export interface ListEventActionsResponse { + /** + *

The event action objects listed by the request.

+ */ + EventActions?: EventActionEntry[]; + + /** + *

The token value retrieved from a previous call to access the next page of results.

+ */ + NextToken?: string; +} + +export namespace ListEventActionsResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ListEventActionsResponse): any => ({ + ...obj, + }); +} + export interface ListJobsRequest { /** *

The unique identifier for a data set.

@@ -2265,6 +2602,71 @@ export namespace UpdateDataSetResponse { }); } +/** + *

The request body for UpdateEventAction.

+ */ +export interface UpdateEventActionRequest { + /** + *

What occurs after a certain event.

+ */ + Action?: Action; + + /** + *

The unique identifier for the event action.

+ */ + EventActionId: string | undefined; +} + +export namespace UpdateEventActionRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UpdateEventActionRequest): any => ({ + ...obj, + }); +} + +export interface UpdateEventActionResponse { + /** + *

What occurs after a certain event.

+ */ + Action?: Action; + + /** + *

The ARN for the event action.

+ */ + Arn?: string; + + /** + *

The date and time that the event action was created, in ISO 8601 format.

+ */ + CreatedAt?: Date; + + /** + *

What occurs to start an action.

+ */ + Event?: Event; + + /** + *

The unique identifier for the event action.

+ */ + Id?: string; + + /** + *

The date and time that the event action was last updated, in ISO 8601 format.

+ */ + UpdatedAt?: Date; +} + +export namespace UpdateEventActionResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UpdateEventActionResponse): any => ({ + ...obj, + }); +} + /** *

The request body for UpdateRevision.

*/ diff --git a/clients/client-dataexchange/src/pagination/ListEventActionsPaginator.ts b/clients/client-dataexchange/src/pagination/ListEventActionsPaginator.ts new file mode 100644 index 0000000000000..277abaec9c39c --- /dev/null +++ b/clients/client-dataexchange/src/pagination/ListEventActionsPaginator.ts @@ -0,0 +1,59 @@ +import { Paginator } from "@aws-sdk/types"; + +import { + ListEventActionsCommand, + ListEventActionsCommandInput, + ListEventActionsCommandOutput, +} from "../commands/ListEventActionsCommand"; +import { DataExchange } from "../DataExchange"; +import { DataExchangeClient } from "../DataExchangeClient"; +import { DataExchangePaginationConfiguration } from "./Interfaces"; + +/** + * @private + */ +const makePagedClientRequest = async ( + client: DataExchangeClient, + input: ListEventActionsCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new ListEventActionsCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async ( + client: DataExchange, + input: ListEventActionsCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.listEventActions(input, ...args); +}; +export async function* paginateListEventActions( + config: DataExchangePaginationConfiguration, + input: ListEventActionsCommandInput, + ...additionalArguments: any +): Paginator { + // ToDo: replace with actual type instead of typeof input.NextToken + let token: typeof input.NextToken | undefined = config.startingToken || undefined; + let hasNext = true; + let page: ListEventActionsCommandOutput; + while (hasNext) { + input.NextToken = token; + input["MaxResults"] = config.pageSize; + if (config.client instanceof DataExchange) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } else if (config.client instanceof DataExchangeClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected DataExchange | DataExchangeClient"); + } + yield page; + token = page.NextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-dataexchange/src/protocols/Aws_restJson1.ts b/clients/client-dataexchange/src/protocols/Aws_restJson1.ts index 5d8a4ab1d398c..373ca1fde4195 100644 --- a/clients/client-dataexchange/src/protocols/Aws_restJson1.ts +++ b/clients/client-dataexchange/src/protocols/Aws_restJson1.ts @@ -18,13 +18,16 @@ import { import { CancelJobCommandInput, CancelJobCommandOutput } from "../commands/CancelJobCommand"; import { CreateDataSetCommandInput, CreateDataSetCommandOutput } from "../commands/CreateDataSetCommand"; +import { CreateEventActionCommandInput, CreateEventActionCommandOutput } from "../commands/CreateEventActionCommand"; import { CreateJobCommandInput, CreateJobCommandOutput } from "../commands/CreateJobCommand"; import { CreateRevisionCommandInput, CreateRevisionCommandOutput } from "../commands/CreateRevisionCommand"; import { DeleteAssetCommandInput, DeleteAssetCommandOutput } from "../commands/DeleteAssetCommand"; import { DeleteDataSetCommandInput, DeleteDataSetCommandOutput } from "../commands/DeleteDataSetCommand"; +import { DeleteEventActionCommandInput, DeleteEventActionCommandOutput } from "../commands/DeleteEventActionCommand"; import { DeleteRevisionCommandInput, DeleteRevisionCommandOutput } from "../commands/DeleteRevisionCommand"; import { GetAssetCommandInput, GetAssetCommandOutput } from "../commands/GetAssetCommand"; import { GetDataSetCommandInput, GetDataSetCommandOutput } from "../commands/GetDataSetCommand"; +import { GetEventActionCommandInput, GetEventActionCommandOutput } from "../commands/GetEventActionCommand"; import { GetJobCommandInput, GetJobCommandOutput } from "../commands/GetJobCommand"; import { GetRevisionCommandInput, GetRevisionCommandOutput } from "../commands/GetRevisionCommand"; import { @@ -32,6 +35,7 @@ import { ListDataSetRevisionsCommandOutput, } from "../commands/ListDataSetRevisionsCommand"; import { ListDataSetsCommandInput, ListDataSetsCommandOutput } from "../commands/ListDataSetsCommand"; +import { ListEventActionsCommandInput, ListEventActionsCommandOutput } from "../commands/ListEventActionsCommand"; import { ListJobsCommandInput, ListJobsCommandOutput } from "../commands/ListJobsCommand"; import { ListRevisionAssetsCommandInput, ListRevisionAssetsCommandOutput } from "../commands/ListRevisionAssetsCommand"; import { @@ -43,16 +47,22 @@ import { TagResourceCommandInput, TagResourceCommandOutput } from "../commands/T import { UntagResourceCommandInput, UntagResourceCommandOutput } from "../commands/UntagResourceCommand"; import { UpdateAssetCommandInput, UpdateAssetCommandOutput } from "../commands/UpdateAssetCommand"; import { UpdateDataSetCommandInput, UpdateDataSetCommandOutput } from "../commands/UpdateDataSetCommand"; +import { UpdateEventActionCommandInput, UpdateEventActionCommandOutput } from "../commands/UpdateEventActionCommand"; import { UpdateRevisionCommandInput, UpdateRevisionCommandOutput } from "../commands/UpdateRevisionCommand"; import { AccessDeniedException, + Action, AssetDestinationEntry, AssetDetails, AssetEntry, AssetSourceEntry, + AutoExportRevisionDestinationEntry, + AutoExportRevisionToS3RequestDetails, ConflictException, DataSetEntry, Details, + Event, + EventActionEntry, ExportAssetsToS3RequestDetails, ExportAssetsToS3ResponseDetails, ExportAssetToSignedUrlRequestDetails, @@ -74,6 +84,7 @@ import { ResponseDetails, RevisionDestinationEntry, RevisionEntry, + RevisionPublished, S3SnapshotAsset, ServiceLimitExceededException, ThrottlingException, @@ -136,6 +147,33 @@ export const serializeAws_restJson1CreateDataSetCommand = async ( }); }; +export const serializeAws_restJson1CreateEventActionCommand = async ( + input: CreateEventActionCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/event-actions"; + let body: any; + body = JSON.stringify({ + ...(input.Action !== undefined && + input.Action !== null && { Action: serializeAws_restJson1Action(input.Action, context) }), + ...(input.Event !== undefined && + input.Event !== null && { Event: serializeAws_restJson1Event(input.Event, context) }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + export const serializeAws_restJson1CreateJobCommand = async ( input: CreateJobCommandInput, context: __SerdeContext @@ -275,6 +313,35 @@ export const serializeAws_restJson1DeleteDataSetCommand = async ( }); }; +export const serializeAws_restJson1DeleteEventActionCommand = async ( + input: DeleteEventActionCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/event-actions/{EventActionId}"; + if (input.EventActionId !== undefined) { + const labelValue: string = input.EventActionId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: EventActionId."); + } + resolvedPath = resolvedPath.replace("{EventActionId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: EventActionId."); + } + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "DELETE", + headers, + path: resolvedPath, + body, + }); +}; + export const serializeAws_restJson1DeleteRevisionCommand = async ( input: DeleteRevisionCommandInput, context: __SerdeContext @@ -391,6 +458,35 @@ export const serializeAws_restJson1GetDataSetCommand = async ( }); }; +export const serializeAws_restJson1GetEventActionCommand = async ( + input: GetEventActionCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/event-actions/{EventActionId}"; + if (input.EventActionId !== undefined) { + const labelValue: string = input.EventActionId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: EventActionId."); + } + resolvedPath = resolvedPath.replace("{EventActionId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: EventActionId."); + } + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; + export const serializeAws_restJson1GetJobCommand = async ( input: GetJobCommandInput, context: __SerdeContext @@ -517,6 +613,31 @@ export const serializeAws_restJson1ListDataSetsCommand = async ( }); }; +export const serializeAws_restJson1ListEventActionsCommand = async ( + input: ListEventActionsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/event-actions"; + const query: any = { + ...(input.EventSourceId !== undefined && { eventSourceId: input.EventSourceId }), + ...(input.MaxResults !== undefined && { maxResults: input.MaxResults.toString() }), + ...(input.NextToken !== undefined && { nextToken: input.NextToken }), + }; + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; + export const serializeAws_restJson1ListJobsCommand = async ( input: ListJobsCommandInput, context: __SerdeContext @@ -797,6 +918,41 @@ export const serializeAws_restJson1UpdateDataSetCommand = async ( }); }; +export const serializeAws_restJson1UpdateEventActionCommand = async ( + input: UpdateEventActionCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/event-actions/{EventActionId}"; + if (input.EventActionId !== undefined) { + const labelValue: string = input.EventActionId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: EventActionId."); + } + resolvedPath = resolvedPath.replace("{EventActionId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: EventActionId."); + } + let body: any; + body = JSON.stringify({ + ...(input.Action !== undefined && + input.Action !== null && { Action: serializeAws_restJson1Action(input.Action, context) }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "PATCH", + headers, + path: resolvedPath, + body, + }); +}; + export const serializeAws_restJson1UpdateRevisionCommand = async ( input: UpdateRevisionCommandInput, context: __SerdeContext @@ -1052,6 +1208,113 @@ const deserializeAws_restJson1CreateDataSetCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; +export const deserializeAws_restJson1CreateEventActionCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 201 && output.statusCode >= 300) { + return deserializeAws_restJson1CreateEventActionCommandError(output, context); + } + const contents: CreateEventActionCommandOutput = { + $metadata: deserializeMetadata(output), + Action: undefined, + Arn: undefined, + CreatedAt: undefined, + Event: undefined, + Id: undefined, + UpdatedAt: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.Action !== undefined && data.Action !== null) { + contents.Action = deserializeAws_restJson1Action(data.Action, context); + } + if (data.Arn !== undefined && data.Arn !== null) { + contents.Arn = __expectString(data.Arn); + } + if (data.CreatedAt !== undefined && data.CreatedAt !== null) { + contents.CreatedAt = __expectNonNull(__parseRfc3339DateTime(data.CreatedAt)); + } + if (data.Event !== undefined && data.Event !== null) { + contents.Event = deserializeAws_restJson1Event(data.Event, context); + } + if (data.Id !== undefined && data.Id !== null) { + contents.Id = __expectString(data.Id); + } + if (data.UpdatedAt !== undefined && data.UpdatedAt !== null) { + contents.UpdatedAt = __expectNonNull(__parseRfc3339DateTime(data.UpdatedAt)); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1CreateEventActionCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.dataexchange#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.dataexchange#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceLimitExceededException": + case "com.amazonaws.dataexchange#ServiceLimitExceededException": + response = { + ...(await deserializeAws_restJson1ServiceLimitExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.dataexchange#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.dataexchange#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + export const deserializeAws_restJson1CreateJobCommand = async ( output: __HttpResponse, context: __SerdeContext @@ -1468,6 +1731,81 @@ const deserializeAws_restJson1DeleteDataSetCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; +export const deserializeAws_restJson1DeleteEventActionCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 204 && output.statusCode >= 300) { + return deserializeAws_restJson1DeleteEventActionCommandError(output, context); + } + const contents: DeleteEventActionCommandOutput = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1DeleteEventActionCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InternalServerException": + case "com.amazonaws.dataexchange#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.dataexchange#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.dataexchange#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.dataexchange#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + export const deserializeAws_restJson1DeleteRevisionCommand = async ( output: __HttpResponse, context: __SerdeContext @@ -1793,6 +2131,105 @@ const deserializeAws_restJson1GetDataSetCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; +export const deserializeAws_restJson1GetEventActionCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1GetEventActionCommandError(output, context); + } + const contents: GetEventActionCommandOutput = { + $metadata: deserializeMetadata(output), + Action: undefined, + Arn: undefined, + CreatedAt: undefined, + Event: undefined, + Id: undefined, + UpdatedAt: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.Action !== undefined && data.Action !== null) { + contents.Action = deserializeAws_restJson1Action(data.Action, context); + } + if (data.Arn !== undefined && data.Arn !== null) { + contents.Arn = __expectString(data.Arn); + } + if (data.CreatedAt !== undefined && data.CreatedAt !== null) { + contents.CreatedAt = __expectNonNull(__parseRfc3339DateTime(data.CreatedAt)); + } + if (data.Event !== undefined && data.Event !== null) { + contents.Event = deserializeAws_restJson1Event(data.Event, context); + } + if (data.Id !== undefined && data.Id !== null) { + contents.Id = __expectString(data.Id); + } + if (data.UpdatedAt !== undefined && data.UpdatedAt !== null) { + contents.UpdatedAt = __expectNonNull(__parseRfc3339DateTime(data.UpdatedAt)); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1GetEventActionCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InternalServerException": + case "com.amazonaws.dataexchange#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.dataexchange#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.dataexchange#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.dataexchange#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + export const deserializeAws_restJson1GetJobCommand = async ( output: __HttpResponse, context: __SerdeContext @@ -1938,22 +2375,105 @@ export const deserializeAws_restJson1GetRevisionCommand = async ( if (data.Id !== undefined && data.Id !== null) { contents.Id = __expectString(data.Id); } - if (data.SourceId !== undefined && data.SourceId !== null) { - contents.SourceId = __expectString(data.SourceId); + if (data.SourceId !== undefined && data.SourceId !== null) { + contents.SourceId = __expectString(data.SourceId); + } + if (data.Tags !== undefined && data.Tags !== null) { + contents.Tags = deserializeAws_restJson1MapOf__string(data.Tags, context); + } + if (data.UpdatedAt !== undefined && data.UpdatedAt !== null) { + contents.UpdatedAt = __expectNonNull(__parseRfc3339DateTime(data.UpdatedAt)); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1GetRevisionCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InternalServerException": + case "com.amazonaws.dataexchange#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.dataexchange#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.dataexchange#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.dataexchange#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1ListDataSetRevisionsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1ListDataSetRevisionsCommandError(output, context); } - if (data.Tags !== undefined && data.Tags !== null) { - contents.Tags = deserializeAws_restJson1MapOf__string(data.Tags, context); + const contents: ListDataSetRevisionsCommandOutput = { + $metadata: deserializeMetadata(output), + NextToken: undefined, + Revisions: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.NextToken !== undefined && data.NextToken !== null) { + contents.NextToken = __expectString(data.NextToken); } - if (data.UpdatedAt !== undefined && data.UpdatedAt !== null) { - contents.UpdatedAt = __expectNonNull(__parseRfc3339DateTime(data.UpdatedAt)); + if (data.Revisions !== undefined && data.Revisions !== null) { + contents.Revisions = deserializeAws_restJson1ListOfRevisionEntry(data.Revisions, context); } return Promise.resolve(contents); }; -const deserializeAws_restJson1GetRevisionCommandError = async ( +const deserializeAws_restJson1ListDataSetRevisionsCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -2011,32 +2531,32 @@ const deserializeAws_restJson1GetRevisionCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1ListDataSetRevisionsCommand = async ( +export const deserializeAws_restJson1ListDataSetsCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restJson1ListDataSetRevisionsCommandError(output, context); + return deserializeAws_restJson1ListDataSetsCommandError(output, context); } - const contents: ListDataSetRevisionsCommandOutput = { + const contents: ListDataSetsCommandOutput = { $metadata: deserializeMetadata(output), + DataSets: undefined, NextToken: undefined, - Revisions: undefined, }; const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.DataSets !== undefined && data.DataSets !== null) { + contents.DataSets = deserializeAws_restJson1ListOfDataSetEntry(data.DataSets, context); + } if (data.NextToken !== undefined && data.NextToken !== null) { contents.NextToken = __expectString(data.NextToken); } - if (data.Revisions !== undefined && data.Revisions !== null) { - contents.Revisions = deserializeAws_restJson1ListOfRevisionEntry(data.Revisions, context); - } return Promise.resolve(contents); }; -const deserializeAws_restJson1ListDataSetRevisionsCommandError = async ( +const deserializeAws_restJson1ListDataSetsCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -2094,21 +2614,21 @@ const deserializeAws_restJson1ListDataSetRevisionsCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1ListDataSetsCommand = async ( +export const deserializeAws_restJson1ListEventActionsCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restJson1ListDataSetsCommandError(output, context); + return deserializeAws_restJson1ListEventActionsCommandError(output, context); } - const contents: ListDataSetsCommandOutput = { + const contents: ListEventActionsCommandOutput = { $metadata: deserializeMetadata(output), - DataSets: undefined, + EventActions: undefined, NextToken: undefined, }; const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DataSets !== undefined && data.DataSets !== null) { - contents.DataSets = deserializeAws_restJson1ListOfDataSetEntry(data.DataSets, context); + if (data.EventActions !== undefined && data.EventActions !== null) { + contents.EventActions = deserializeAws_restJson1ListOfEventActionEntry(data.EventActions, context); } if (data.NextToken !== undefined && data.NextToken !== null) { contents.NextToken = __expectString(data.NextToken); @@ -2116,10 +2636,10 @@ export const deserializeAws_restJson1ListDataSetsCommand = async ( return Promise.resolve(contents); }; -const deserializeAws_restJson1ListDataSetsCommandError = async ( +const deserializeAws_restJson1ListEventActionsCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -2821,6 +3341,113 @@ const deserializeAws_restJson1UpdateDataSetCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; +export const deserializeAws_restJson1UpdateEventActionCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1UpdateEventActionCommandError(output, context); + } + const contents: UpdateEventActionCommandOutput = { + $metadata: deserializeMetadata(output), + Action: undefined, + Arn: undefined, + CreatedAt: undefined, + Event: undefined, + Id: undefined, + UpdatedAt: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.Action !== undefined && data.Action !== null) { + contents.Action = deserializeAws_restJson1Action(data.Action, context); + } + if (data.Arn !== undefined && data.Arn !== null) { + contents.Arn = __expectString(data.Arn); + } + if (data.CreatedAt !== undefined && data.CreatedAt !== null) { + contents.CreatedAt = __expectNonNull(__parseRfc3339DateTime(data.CreatedAt)); + } + if (data.Event !== undefined && data.Event !== null) { + contents.Event = deserializeAws_restJson1Event(data.Event, context); + } + if (data.Id !== undefined && data.Id !== null) { + contents.Id = __expectString(data.Id); + } + if (data.UpdatedAt !== undefined && data.UpdatedAt !== null) { + contents.UpdatedAt = __expectNonNull(__parseRfc3339DateTime(data.UpdatedAt)); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1UpdateEventActionCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.dataexchange#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.dataexchange#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.dataexchange#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.dataexchange#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.dataexchange#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + export const deserializeAws_restJson1UpdateRevisionCommand = async ( output: __HttpResponse, context: __SerdeContext @@ -3078,15 +3705,31 @@ const deserializeAws_restJson1ValidationExceptionResponse = async ( name: "ValidationException", $fault: "client", $metadata: deserializeMetadata(parsedOutput), + ExceptionCause: undefined, Message: undefined, }; const data: any = parsedOutput.body; + if (data.ExceptionCause !== undefined && data.ExceptionCause !== null) { + contents.ExceptionCause = __expectString(data.ExceptionCause); + } if (data.Message !== undefined && data.Message !== null) { contents.Message = __expectString(data.Message); } return contents; }; +const serializeAws_restJson1Action = (input: Action, context: __SerdeContext): any => { + return { + ...(input.ExportRevisionToS3 !== undefined && + input.ExportRevisionToS3 !== null && { + ExportRevisionToS3: serializeAws_restJson1AutoExportRevisionToS3RequestDetails( + input.ExportRevisionToS3, + context + ), + }), + }; +}; + const serializeAws_restJson1AssetDestinationEntry = (input: AssetDestinationEntry, context: __SerdeContext): any => { return { ...(input.AssetId !== undefined && input.AssetId !== null && { AssetId: input.AssetId }), @@ -3102,6 +3745,44 @@ const serializeAws_restJson1AssetSourceEntry = (input: AssetSourceEntry, context }; }; +const serializeAws_restJson1AutoExportRevisionDestinationEntry = ( + input: AutoExportRevisionDestinationEntry, + context: __SerdeContext +): any => { + return { + ...(input.Bucket !== undefined && input.Bucket !== null && { Bucket: input.Bucket }), + ...(input.KeyPattern !== undefined && input.KeyPattern !== null && { KeyPattern: input.KeyPattern }), + }; +}; + +const serializeAws_restJson1AutoExportRevisionToS3RequestDetails = ( + input: AutoExportRevisionToS3RequestDetails, + context: __SerdeContext +): any => { + return { + ...(input.Encryption !== undefined && + input.Encryption !== null && { + Encryption: serializeAws_restJson1ExportServerSideEncryption(input.Encryption, context), + }), + ...(input.RevisionDestination !== undefined && + input.RevisionDestination !== null && { + RevisionDestination: serializeAws_restJson1AutoExportRevisionDestinationEntry( + input.RevisionDestination, + context + ), + }), + }; +}; + +const serializeAws_restJson1Event = (input: Event, context: __SerdeContext): any => { + return { + ...(input.RevisionPublished !== undefined && + input.RevisionPublished !== null && { + RevisionPublished: serializeAws_restJson1RevisionPublished(input.RevisionPublished, context), + }), + }; +}; + const serializeAws_restJson1ExportAssetsToS3RequestDetails = ( input: ExportAssetsToS3RequestDetails, context: __SerdeContext @@ -3280,6 +3961,21 @@ const serializeAws_restJson1RevisionDestinationEntry = ( }; }; +const serializeAws_restJson1RevisionPublished = (input: RevisionPublished, context: __SerdeContext): any => { + return { + ...(input.DataSetId !== undefined && input.DataSetId !== null && { DataSetId: input.DataSetId }), + }; +}; + +const deserializeAws_restJson1Action = (output: any, context: __SerdeContext): Action => { + return { + ExportRevisionToS3: + output.ExportRevisionToS3 !== undefined && output.ExportRevisionToS3 !== null + ? deserializeAws_restJson1AutoExportRevisionToS3RequestDetails(output.ExportRevisionToS3, context) + : undefined, + } as any; +}; + const deserializeAws_restJson1AssetDestinationEntry = (output: any, context: __SerdeContext): AssetDestinationEntry => { return { AssetId: __expectString(output.AssetId), @@ -3328,6 +4024,32 @@ const deserializeAws_restJson1AssetSourceEntry = (output: any, context: __SerdeC } as any; }; +const deserializeAws_restJson1AutoExportRevisionDestinationEntry = ( + output: any, + context: __SerdeContext +): AutoExportRevisionDestinationEntry => { + return { + Bucket: __expectString(output.Bucket), + KeyPattern: __expectString(output.KeyPattern), + } as any; +}; + +const deserializeAws_restJson1AutoExportRevisionToS3RequestDetails = ( + output: any, + context: __SerdeContext +): AutoExportRevisionToS3RequestDetails => { + return { + Encryption: + output.Encryption !== undefined && output.Encryption !== null + ? deserializeAws_restJson1ExportServerSideEncryption(output.Encryption, context) + : undefined, + RevisionDestination: + output.RevisionDestination !== undefined && output.RevisionDestination !== null + ? deserializeAws_restJson1AutoExportRevisionDestinationEntry(output.RevisionDestination, context) + : undefined, + } as any; +}; + const deserializeAws_restJson1DataSetEntry = (output: any, context: __SerdeContext): DataSetEntry => { return { Arn: __expectString(output.Arn), @@ -3369,6 +4091,38 @@ const deserializeAws_restJson1Details = (output: any, context: __SerdeContext): } as any; }; +const deserializeAws_restJson1Event = (output: any, context: __SerdeContext): Event => { + return { + RevisionPublished: + output.RevisionPublished !== undefined && output.RevisionPublished !== null + ? deserializeAws_restJson1RevisionPublished(output.RevisionPublished, context) + : undefined, + } as any; +}; + +const deserializeAws_restJson1EventActionEntry = (output: any, context: __SerdeContext): EventActionEntry => { + return { + Action: + output.Action !== undefined && output.Action !== null + ? deserializeAws_restJson1Action(output.Action, context) + : undefined, + Arn: __expectString(output.Arn), + CreatedAt: + output.CreatedAt !== undefined && output.CreatedAt !== null + ? __expectNonNull(__parseRfc3339DateTime(output.CreatedAt)) + : undefined, + Event: + output.Event !== undefined && output.Event !== null + ? deserializeAws_restJson1Event(output.Event, context) + : undefined, + Id: __expectString(output.Id), + UpdatedAt: + output.UpdatedAt !== undefined && output.UpdatedAt !== null + ? __expectNonNull(__parseRfc3339DateTime(output.UpdatedAt)) + : undefined, + } as any; +}; + const deserializeAws_restJson1ExportAssetsToS3ResponseDetails = ( output: any, context: __SerdeContext @@ -3557,6 +4311,17 @@ const deserializeAws_restJson1ListOfDataSetEntry = (output: any, context: __Serd }); }; +const deserializeAws_restJson1ListOfEventActionEntry = (output: any, context: __SerdeContext): EventActionEntry[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return deserializeAws_restJson1EventActionEntry(entry, context); + }); +}; + const deserializeAws_restJson1ListOfJobEntry = (output: any, context: __SerdeContext): JobEntry[] => { return (output || []) .filter((e: any) => e != null) @@ -3677,6 +4442,12 @@ const deserializeAws_restJson1RevisionEntry = (output: any, context: __SerdeCont } as any; }; +const deserializeAws_restJson1RevisionPublished = (output: any, context: __SerdeContext): RevisionPublished => { + return { + DataSetId: __expectString(output.DataSetId), + } as any; +}; + const deserializeAws_restJson1S3SnapshotAsset = (output: any, context: __SerdeContext): S3SnapshotAsset => { return { Size: __limitedParseDouble(output.Size), diff --git a/clients/client-elastic-load-balancing-v2/src/models/models_0.ts b/clients/client-elastic-load-balancing-v2/src/models/models_0.ts index c1599f26a917f..849ed32259657 100644 --- a/clients/client-elastic-load-balancing-v2/src/models/models_0.ts +++ b/clients/client-elastic-load-balancing-v2/src/models/models_0.ts @@ -657,6 +657,24 @@ export namespace LoadBalancerNotFoundException { }); } +/** + *

The specified rule does not exist.

+ */ +export interface RuleNotFoundException extends __SmithyException, $MetadataBearer { + name: "RuleNotFoundException"; + $fault: "client"; + Message?: string; +} + +export namespace RuleNotFoundException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: RuleNotFoundException): any => ({ + ...obj, + }); +} + /** *

The specified target group does not exist.

*/ @@ -2165,6 +2183,7 @@ export namespace Matcher { } export enum TargetTypeEnum { + ALB = "alb", INSTANCE = "instance", IP = "ip", LAMBDA = "lambda", @@ -2228,8 +2247,8 @@ export interface CreateTargetGroupInput { /** *

Indicates whether health checks are enabled. If the target type is lambda, * health checks are disabled by default but can be enabled. If the target type is - * instance or ip, health checks are always enabled and cannot be - * disabled.

+ * instance, ip, or alb, health checks are always + * enabled and cannot be disabled.

*/ HealthCheckEnabled?: boolean; @@ -2302,6 +2321,10 @@ export interface CreateTargetGroupInput { *

* lambda - Register a single Lambda function as a target.

* + *
  • + *

    + * alb - Register a single Application Load Balancer as a target.

    + *
  • * */ TargetType?: TargetTypeEnum | string; @@ -2411,8 +2434,9 @@ export interface TargetGroup { /** *

    The type of target that you must specify when registering targets with this target group. * The possible values are instance (register targets by instance ID), - * ip (register targets by IP address), or lambda (register a single - * Lambda function as a target).

    + * ip (register targets by IP address), lambda (register a single + * Lambda function as a target), or alb (register a single Application Load Balancer + * as a target).

    */ TargetType?: TargetTypeEnum | string; @@ -2547,24 +2571,6 @@ export namespace DeleteRuleOutput { }); } -/** - *

    The specified rule does not exist.

    - */ -export interface RuleNotFoundException extends __SmithyException, $MetadataBearer { - name: "RuleNotFoundException"; - $fault: "client"; - Message?: string; -} - -export namespace RuleNotFoundException { - /** - * @internal - */ - export const filterSensitiveLog = (obj: RuleNotFoundException): any => ({ - ...obj, - }); -} - export interface DeleteTargetGroupInput { /** *

    The Amazon Resource Name (ARN) of the target group.

    @@ -2599,13 +2605,16 @@ export interface TargetDescription { /** *

    The ID of the target. If the target type of the target group is instance, * specify an instance ID. If the target type is ip, specify an IP address. If the - * target type is lambda, specify the ARN of the Lambda function.

    + * target type is lambda, specify the ARN of the Lambda function. If the target type + * is alb, specify the ARN of the Application Load Balancer target.

    */ Id: string | undefined; /** *

    The port on which the target is listening. If the target group protocol is GENEVE, the - * supported port is 6081. Not used if the target is a Lambda function.

    + * supported port is 6081. If the target type is alb, the targeted Application Load + * Balancer must have at least one listener whose port matches the target group port. Not used if + * the target is a Lambda function.

    */ Port?: number; @@ -2614,7 +2623,7 @@ export interface TargetDescription { * traffic from the load balancer nodes in the specified Availability Zone or from all enabled * Availability Zones for the load balancer.

    *

    This parameter is not supported if the target type of the target group is - * instance.

    + * instance or alb.

    *

    If the target type is ip and the IP address is in a subnet of the VPC for the * target group, the Availability Zone is automatically detected and this parameter is optional. * If the IP address is outside the VPC, this parameter is required.

    @@ -2994,22 +3003,22 @@ export interface LoadBalancerAttribute { * *
  • *

    - * routing.http.x_amzn_tls_version_and_cipher_suite.enabled - Indicates - * whether the two headers (x-amzn-tls-version and - * x-amzn-tls-cipher-suite), which contain information about the negotiated - * TLS version and cipher suite, are added to the client request before sending it to the - * target. The x-amzn-tls-version header has information about the TLS protocol - * version negotiated with the client, and the x-amzn-tls-cipher-suite header - * has information about the cipher suite negotiated with the client. Both headers are in - * OpenSSL format. The possible values for the attribute are true and - * false. The default is false.

    + * routing.http.x_amzn_tls_version_and_cipher_suite.enabled - Indicates whether the two headers (x-amzn-tls-version and + * x-amzn-tls-cipher-suite), which contain information about + * the negotiated TLS version and cipher suite, are added to the client request + * before sending it to the target. The x-amzn-tls-version header + * has information about the TLS protocol version negotiated with the client, + * and the x-amzn-tls-cipher-suite header has information about + * the cipher suite negotiated with the client. Both headers are in OpenSSL + * format. The possible values for the attribute are true and + * false. The default is false.

    *
  • *
  • *

    * routing.http.xff_client_port.enabled - Indicates whether the - * X-Forwarded-For header should preserve the source port that the client used + * X-Forwarded-For header should preserve the source port that the client used * to connect to the load balancer. The possible values are true and - * false. The default is false.

    + * false. The default is false.

    *
  • *
  • *

    @@ -3017,7 +3026,6 @@ export interface LoadBalancerAttribute { * values are true and false. The default is true. * Elastic Load Balancing requires that message header names contain only alphanumeric * characters and hyphens.

    - * *
  • *
  • *

    diff --git a/clients/client-elastic-load-balancing-v2/src/protocols/Aws_query.ts b/clients/client-elastic-load-balancing-v2/src/protocols/Aws_query.ts index fcf8960bae9d0..6516a1858f669 100644 --- a/clients/client-elastic-load-balancing-v2/src/protocols/Aws_query.ts +++ b/clients/client-elastic-load-balancing-v2/src/protocols/Aws_query.ts @@ -887,6 +887,14 @@ const deserializeAws_queryAddTagsCommandError = async ( $metadata: deserializeMetadata(output), }; break; + case "ListenerNotFoundException": + case "com.amazonaws.elasticloadbalancingv2#ListenerNotFoundException": + response = { + ...(await deserializeAws_queryListenerNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; case "LoadBalancerNotFoundException": case "com.amazonaws.elasticloadbalancingv2#LoadBalancerNotFoundException": response = { @@ -895,6 +903,14 @@ const deserializeAws_queryAddTagsCommandError = async ( $metadata: deserializeMetadata(output), }; break; + case "RuleNotFoundException": + case "com.amazonaws.elasticloadbalancingv2#RuleNotFoundException": + response = { + ...(await deserializeAws_queryRuleNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; case "TargetGroupNotFoundException": case "com.amazonaws.elasticloadbalancingv2#TargetGroupNotFoundException": response = { @@ -1549,6 +1565,14 @@ const deserializeAws_queryDeleteListenerCommandError = async ( $metadata: deserializeMetadata(output), }; break; + case "ResourceInUseException": + case "com.amazonaws.elasticloadbalancingv2#ResourceInUseException": + response = { + ...(await deserializeAws_queryResourceInUseExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; default: const parsedBody = parsedOutput.body; errorCode = parsedBody.Error.code || parsedBody.Error.Code || errorCode; diff --git a/clients/client-identitystore/src/endpoints.ts b/clients/client-identitystore/src/endpoints.ts index 5f56f705e0283..adafeccc8695b 100644 --- a/clients/client-identitystore/src/endpoints.ts +++ b/clients/client-identitystore/src/endpoints.ts @@ -1,7 +1,12 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; import { RegionInfoProvider } from "@aws-sdk/types"; -const regionHash: RegionHash = {}; +const regionHash: RegionHash = { + "fips-us-gov-west-1": { + hostname: "identitystore.us-gov-west-1.amazonaws.com", + signingRegion: "us-gov-west-1", + }, +}; const partitionHash: PartitionHash = { aws: { @@ -43,7 +48,7 @@ const partitionHash: PartitionHash = { hostname: "identitystore.{region}.sc2s.sgov.gov", }, "aws-us-gov": { - regions: ["us-gov-east-1", "us-gov-west-1"], + regions: ["fips-us-gov-west-1", "us-gov-east-1", "us-gov-west-1"], hostname: "identitystore.{region}.amazonaws.com", }, }; diff --git a/clients/client-imagebuilder/src/Imagebuilder.ts b/clients/client-imagebuilder/src/Imagebuilder.ts index 074b6d2c52d62..7c003036d82b3 100644 --- a/clients/client-imagebuilder/src/Imagebuilder.ts +++ b/clients/client-imagebuilder/src/Imagebuilder.ts @@ -1112,7 +1112,7 @@ export class Imagebuilder extends ImagebuilderClient { * You can assign values for the first three, and can filter on all of them.

    *

    * Filtering: With semantic versioning, you have the flexibility to use wildcards (x) - * to specify the most recent versions or nodes when selecting the source image or components for your + * to specify the most recent versions or nodes when selecting the base image or components for your * recipe. When you use a wildcard in any node, all nodes to the right of the first wildcard must also be * wildcards.

    * @@ -1153,7 +1153,7 @@ export class Imagebuilder extends ImagebuilderClient { * You can assign values for the first three, and can filter on all of them.

    *

    * Filtering: With semantic versioning, you have the flexibility to use wildcards (x) - * to specify the most recent versions or nodes when selecting the source image or components for your + * to specify the most recent versions or nodes when selecting the base image or components for your * recipe. When you use a wildcard in any node, all nodes to the right of the first wildcard must also be * wildcards.

    * diff --git a/clients/client-imagebuilder/src/commands/ListComponentBuildVersionsCommand.ts b/clients/client-imagebuilder/src/commands/ListComponentBuildVersionsCommand.ts index fd04b2d268ca0..c924c585c7393 100644 --- a/clients/client-imagebuilder/src/commands/ListComponentBuildVersionsCommand.ts +++ b/clients/client-imagebuilder/src/commands/ListComponentBuildVersionsCommand.ts @@ -28,7 +28,7 @@ export interface ListComponentBuildVersionsCommandOutput extends ListComponentBu * You can assign values for the first three, and can filter on all of them.

    *

    * Filtering: With semantic versioning, you have the flexibility to use wildcards (x) - * to specify the most recent versions or nodes when selecting the source image or components for your + * to specify the most recent versions or nodes when selecting the base image or components for your * recipe. When you use a wildcard in any node, all nodes to the right of the first wildcard must also be * wildcards.

    * diff --git a/clients/client-imagebuilder/src/commands/ListComponentsCommand.ts b/clients/client-imagebuilder/src/commands/ListComponentsCommand.ts index 09b20f4d75d71..a854027385fb8 100644 --- a/clients/client-imagebuilder/src/commands/ListComponentsCommand.ts +++ b/clients/client-imagebuilder/src/commands/ListComponentsCommand.ts @@ -28,7 +28,7 @@ export interface ListComponentsCommandOutput extends ListComponentsResponse, __M * You can assign values for the first three, and can filter on all of them.

    *

    * Filtering: With semantic versioning, you have the flexibility to use wildcards (x) - * to specify the most recent versions or nodes when selecting the source image or components for your + * to specify the most recent versions or nodes when selecting the base image or components for your * recipe. When you use a wildcard in any node, all nodes to the right of the first wildcard must also be * wildcards.

    * diff --git a/clients/client-imagebuilder/src/models/models_0.ts b/clients/client-imagebuilder/src/models/models_0.ts index d9cb59e1e1ee4..8217634e20209 100644 --- a/clients/client-imagebuilder/src/models/models_0.ts +++ b/clients/client-imagebuilder/src/models/models_0.ts @@ -41,7 +41,7 @@ export interface AdditionalInstanceConfiguration { *

    The userDataOverride property replaces any commands that Image Builder might have added to ensure * that Systems Manager is installed on your Linux build instance. If you override the user data, * make sure that you add commands to install Systems Manager, if it is not pre-installed on your - * source image.

    + * base image.

    * */ userDataOverride?: string; @@ -171,7 +171,7 @@ export namespace LaunchPermissionConfiguration { */ export interface AmiDistributionConfiguration { /** - *

    The name of the distribution configuration.

    + *

    The name of the output AMI.

    */ name?: string; @@ -521,7 +521,7 @@ export interface Component { /** *

    The operating system (OS) version supported by the component. If the OS information is - * available, a prefix match is performed against the parent image OS version during image recipe + * available, a prefix match is performed against the base image OS version during image recipe * creation.

    */ supportedOsVersions?: string[]; @@ -655,7 +655,7 @@ export interface ComponentSummary { /** *

    The operating system (OS) version supported by the component. If the OS information is - * available, a prefix match is performed against the parent image OS version during image recipe + * available, a prefix match is performed against the base image OS version during image recipe * creation.

    */ supportedOsVersions?: string[]; @@ -751,7 +751,7 @@ export interface ComponentVersion { * a date, such as 2021.01.01.

    *

    * Filtering: With semantic versioning, you have the flexibility to use wildcards (x) - * to specify the most recent versions or nodes when selecting the source image or components for your + * to specify the most recent versions or nodes when selecting the base image or components for your * recipe. When you use a wildcard in any node, all nodes to the right of the first wildcard must also be * wildcards.

    * @@ -770,7 +770,7 @@ export interface ComponentVersion { /** *

    he operating system (OS) version supported by the component. If the OS information is - * available, a prefix match is performed against the parent image OS version during image recipe + * available, a prefix match is performed against the base image OS version during image recipe * creation.

    */ supportedOsVersions?: string[]; @@ -972,7 +972,7 @@ export interface InstanceBlockDeviceMapping { virtualName?: string; /** - *

    Use to remove a mapping from the parent image.

    + *

    Use to remove a mapping from the base image.

    */ noDevice?: string; } @@ -987,7 +987,7 @@ export namespace InstanceBlockDeviceMapping { } /** - *

    Defines a custom source AMI and block device mapping configurations of an instance + *

    Defines a custom base AMI and block device mapping configurations of an instance * used for building and testing container images.

    */ export interface InstanceConfiguration { @@ -1077,7 +1077,7 @@ export interface ContainerRecipe { * a date, such as 2021.01.01.

    *

    * Filtering: With semantic versioning, you have the flexibility to use wildcards (x) - * to specify the most recent versions or nodes when selecting the source image or components for your + * to specify the most recent versions or nodes when selecting the base image or components for your * recipe. When you use a wildcard in any node, all nodes to the right of the first wildcard must also be * wildcards.

    * @@ -1110,7 +1110,7 @@ export interface ContainerRecipe { encrypted?: boolean; /** - *

    The source image for the container recipe.

    + *

    The base image for the container recipe.

    */ parentImage?: string; @@ -1174,7 +1174,7 @@ export interface ContainerRecipeSummary { owner?: string; /** - *

    The source image for the container recipe.

    + *

    The base image for the container recipe.

    */ parentImage?: string; @@ -1239,7 +1239,7 @@ export interface CreateComponentRequest { /** *

    The operating system (OS) version supported by the component. If the OS information is - * available, a prefix match is performed against the parent image OS version during image recipe + * available, a prefix match is performed against the base image OS version during image recipe * creation.

    */ supportedOsVersions?: string[]; @@ -1418,17 +1418,17 @@ export interface CreateContainerRecipeRequest { dockerfileTemplateUri?: string; /** - *

    Specifies the operating system platform when you use a custom source image.

    + *

    Specifies the operating system platform when you use a custom base image.

    */ platformOverride?: Platform | string; /** - *

    Specifies the operating system version for the source image.

    + *

    Specifies the operating system version for the base image.

    */ imageOsVersionOverride?: string; /** - *

    The source image for the container recipe.

    + *

    The base image for the container recipe.

    */ parentImage: string | undefined; @@ -1779,7 +1779,7 @@ export interface Schedule { *

    The condition configures when the pipeline should trigger a new image build. When the * pipelineExecutionStartCondition is set to * EXPRESSION_MATCH_AND_DEPENDENCY_UPDATES_AVAILABLE, and you use semantic version - * filters on the source image or components in your image recipe, EC2 Image Builder will build a + * filters on the base image or components in your image recipe, EC2 Image Builder will build a * new image only when there are new versions of the image or components in your recipe that * match the semantic version filter. When it is set to EXPRESSION_MATCH_ONLY, it * will build a new image every time the CRON expression matches the current time. For semantic @@ -1939,7 +1939,7 @@ export interface CreateImageRecipeRequest { components: ComponentConfiguration[] | undefined; /** - *

    The parent image of the image recipe. The value of the string can be the ARN of the parent + *

    The base image of the image recipe. The value of the string can be the ARN of the base * image or an AMI ID. The format for the ARN follows this example: * arn:aws:imagebuilder:us-west-2:aws:image/windows-server-2016-english-full-base-x86/x.x.x. * You can provide the specific version that you want to use, or you can use a wildcard in @@ -2115,27 +2115,9 @@ export interface CreateInfrastructureConfigurationRequest { description?: string; /** - *

    The instance metadata options that you can set for the HTTP requests that pipeline builds - * use to launch EC2 build and test instances. For more information about instance metadata - * options, see one of the following links:

    - * + *

    The instance types of the infrastructure configuration. You can specify one or more + * instance types to use for this build. The service will pick one of these instance types based + * on availability.

    */ instanceTypes?: string[]; @@ -2915,7 +2897,7 @@ export interface ImageRecipe { components?: ComponentConfiguration[]; /** - *

    The parent image of the image recipe.

    + *

    The base image of the image recipe.

    */ parentImage?: string; @@ -3128,7 +3110,7 @@ export interface Image { * a date, such as 2021.01.01.

    *

    * Filtering: With semantic versioning, you have the flexibility to use wildcards (x) - * to specify the most recent versions or nodes when selecting the source image or components for your + * to specify the most recent versions or nodes when selecting the base image or components for your * recipe. When you use a wildcard in any node, all nodes to the right of the first wildcard must also be * wildcards.

    * @@ -3548,7 +3530,7 @@ export interface ImportComponentRequest { * You can assign values for the first three, and can filter on all of them.

    *

    * Filtering: With semantic versioning, you have the flexibility to use wildcards (x) - * to specify the most recent versions or nodes when selecting the source image or components for your + * to specify the most recent versions or nodes when selecting the base image or components for your * recipe. When you use a wildcard in any node, all nodes to the right of the first wildcard must also be * wildcards.

    * @@ -4433,7 +4415,7 @@ export interface ImageRecipeSummary { owner?: string; /** - *

    The parent image of the image recipe.

    + *

    The base image of the image recipe.

    */ parentImage?: string; @@ -4607,7 +4589,7 @@ export interface ImageVersion { * a date, such as 2021.01.01.

    *

    * Filtering: With semantic versioning, you have the flexibility to use wildcards (x) - * to specify the most recent versions or nodes when selecting the source image or components for your + * to specify the most recent versions or nodes when selecting the base image or components for your * recipe. When you use a wildcard in any node, all nodes to the right of the first wildcard must also be * wildcards.

    * @@ -4658,7 +4640,7 @@ export interface ListImagesResponse { * You can assign values for the first three, and can filter on all of them.

    *

    * Filtering: With semantic versioning, you have the flexibility to use wildcards (x) - * to specify the most recent versions or nodes when selecting the source image or components for your + * to specify the most recent versions or nodes when selecting the base image or components for your * recipe. When you use a wildcard in any node, all nodes to the right of the first wildcard must also be * wildcards.

    * diff --git a/clients/client-lambda/src/Lambda.ts b/clients/client-lambda/src/Lambda.ts index 83a542c735b42..8de844877319a 100644 --- a/clients/client-lambda/src/Lambda.ts +++ b/clients/client-lambda/src/Lambda.ts @@ -294,7 +294,8 @@ export class Lambda extends LambdaClient { /** *

    Grants an Amazon Web Services service or another account permission to use a function. You can apply the policy at the * function level, or specify a qualifier to restrict access to a single version or alias. If you use a qualifier, - * the invoker must use the full Amazon Resource Name (ARN) of that version or alias to invoke the function.

    + * the invoker must use the full Amazon Resource Name (ARN) of that version or alias to invoke the function. + * Note: Lambda does not support adding policies to version $LATEST.

    * *

    To grant permission to another account, specify the account ID as the Principal. For Amazon Web Services * services, the principal is a domain-style identifier defined by the service, like s3.amazonaws.com or @@ -400,48 +401,48 @@ export class Lambda extends LambdaClient { } /** - *

    Creates a mapping between an event source and an Lambda function. Lambda reads items from the event source - * and triggers the function.

    - *

    For details about each event source type, see the following topics. In particular, each of the topics - * describes the required and optional parameters for the specific event source.

    + *

    Creates a mapping between an event source and an Lambda function. Lambda reads items from the + * event source and triggers the function.

    + *

    For details about each event source type, see the following topics.

    * + * *

    The following error handling options are only available for stream sources (DynamoDB and Kinesis):

    *
      *
    • @@ -505,10 +506,12 @@ export class Lambda extends LambdaClient { * the code property must include the URI of a container image in the Amazon ECR registry. * You do not need to specify the handler and runtime properties.

      * - *

      You set the package type to Zip if the deployment package is a - * .zip file archive. - * For a .zip file archive, the code property specifies the location of the .zip file. You must also specify the handler and - * runtime properties.

      + *

      You set the package type to Zip if the deployment package is a .zip file + * archive. For a .zip file archive, the code property specifies the location of the + * .zip file. You must also specify the handler and runtime properties. The code in the + * deployment package must be compatible with the target instruction set architecture of the + * function (x86-64 or arm64). If you do not specify the architecture, the default value is + * x86-64.

      * *

      When you create a function, Lambda provisions an instance of the function and its supporting resources. If * your function connects to a VPC, this process can take a minute or so. During this time, you can't invoke or @@ -632,8 +635,9 @@ export class Lambda extends LambdaClient { /** *

      Deletes an event source - * mapping. You can get the identifier of a mapping from the output of ListEventSourceMappings.

      - *

      When you delete an event source mapping, it enters a Deleting state and might not be completely deleted for several seconds.

      + * mapping. You can get the identifier of a mapping from the output of ListEventSourceMappings.

      + *

      When you delete an event source mapping, it enters a Deleting state and might not be completely + * deleted for several seconds.

      */ public deleteEventSourceMapping( args: DeleteEventSourceMappingCommandInput, @@ -955,7 +959,8 @@ export class Lambda extends LambdaClient { } /** - *

      Returns details about an event source mapping. You can get the identifier of a mapping from the output of ListEventSourceMappings.

      + *

      Returns details about an event source mapping. You can get the identifier of a mapping from the output of + * ListEventSourceMappings.

      */ public getEventSourceMapping( args: GetEventSourceMappingCommandInput, @@ -1589,9 +1594,12 @@ export class Lambda extends LambdaClient { } /** - *

      Lists Lambda - * layers and shows information about the latest version of each. Specify a runtime identifier to list only layers - * that indicate that they're compatible with that runtime.

      + *

      Lists Lambda + * layers and shows information about the latest version of each. Specify a + * runtime + * identifier to list only layers that indicate that they're compatible with that + * runtime. Specify a compatible architecture to include only layers that are compatible with + * that instruction set architecture.

      */ public listLayers(args: ListLayersCommandInput, options?: __HttpHandlerOptions): Promise; public listLayers(args: ListLayersCommandInput, cb: (err: any, data?: ListLayersCommandOutput) => void): void; @@ -1619,7 +1627,8 @@ export class Lambda extends LambdaClient { /** *

      Lists the versions of an Lambda * layer. Versions that have been deleted aren't listed. Specify a runtime identifier to list only - * versions that indicate that they're compatible with that runtime.

      + * versions that indicate that they're compatible with that runtime. Specify a compatible architecture to include only + * layer versions that are compatible with that architecture.

      */ public listLayerVersions( args: ListLayerVersionsCommandInput, @@ -2149,7 +2158,9 @@ export class Lambda extends LambdaClient { } /** - *

      Updates an event source mapping. You can change the function that Lambda invokes, or pause invocation and resume later from the same location.

      + *

      Updates an event source mapping. You can change the function that Lambda invokes, or pause + * invocation and resume later from the same location.

      + * *

      The following error handling options are only available for stream sources (DynamoDB and Kinesis):

      *
        *
      • diff --git a/clients/client-lambda/src/commands/AddPermissionCommand.ts b/clients/client-lambda/src/commands/AddPermissionCommand.ts index 775f0530a9976..4de1ad14d1418 100644 --- a/clients/client-lambda/src/commands/AddPermissionCommand.ts +++ b/clients/client-lambda/src/commands/AddPermissionCommand.ts @@ -24,7 +24,8 @@ export interface AddPermissionCommandOutput extends AddPermissionResponse, __Met /** *

        Grants an Amazon Web Services service or another account permission to use a function. You can apply the policy at the * function level, or specify a qualifier to restrict access to a single version or alias. If you use a qualifier, - * the invoker must use the full Amazon Resource Name (ARN) of that version or alias to invoke the function.

        + * the invoker must use the full Amazon Resource Name (ARN) of that version or alias to invoke the function. + * Note: Lambda does not support adding policies to version $LATEST.

        * *

        To grant permission to another account, specify the account ID as the Principal. For Amazon Web Services * services, the principal is a domain-style identifier defined by the service, like s3.amazonaws.com or diff --git a/clients/client-lambda/src/commands/CreateEventSourceMappingCommand.ts b/clients/client-lambda/src/commands/CreateEventSourceMappingCommand.ts index 7b5199bd6f000..353aa8c93bd58 100644 --- a/clients/client-lambda/src/commands/CreateEventSourceMappingCommand.ts +++ b/clients/client-lambda/src/commands/CreateEventSourceMappingCommand.ts @@ -22,48 +22,48 @@ export interface CreateEventSourceMappingCommandInput extends CreateEventSourceM export interface CreateEventSourceMappingCommandOutput extends EventSourceMappingConfiguration, __MetadataBearer {} /** - *

        Creates a mapping between an event source and an Lambda function. Lambda reads items from the event source - * and triggers the function.

        - *

        For details about each event source type, see the following topics. In particular, each of the topics - * describes the required and optional parameters for the specific event source.

        + *

        Creates a mapping between an event source and an Lambda function. Lambda reads items from the + * event source and triggers the function.

        + *

        For details about each event source type, see the following topics.

        * + * *

        The following error handling options are only available for stream sources (DynamoDB and Kinesis):

        *
          *
        • diff --git a/clients/client-lambda/src/commands/CreateFunctionCommand.ts b/clients/client-lambda/src/commands/CreateFunctionCommand.ts index e9c78cbce1fbf..34de414e70e21 100644 --- a/clients/client-lambda/src/commands/CreateFunctionCommand.ts +++ b/clients/client-lambda/src/commands/CreateFunctionCommand.ts @@ -31,10 +31,12 @@ export interface CreateFunctionCommandOutput extends FunctionConfiguration, __Me * the code property must include the URI of a container image in the Amazon ECR registry. * You do not need to specify the handler and runtime properties.

          * - *

          You set the package type to Zip if the deployment package is a - * .zip file archive. - * For a .zip file archive, the code property specifies the location of the .zip file. You must also specify the handler and - * runtime properties.

          + *

          You set the package type to Zip if the deployment package is a .zip file + * archive. For a .zip file archive, the code property specifies the location of the + * .zip file. You must also specify the handler and runtime properties. The code in the + * deployment package must be compatible with the target instruction set architecture of the + * function (x86-64 or arm64). If you do not specify the architecture, the default value is + * x86-64.

          * *

          When you create a function, Lambda provisions an instance of the function and its supporting resources. If * your function connects to a VPC, this process can take a minute or so. During this time, you can't invoke or diff --git a/clients/client-lambda/src/commands/DeleteEventSourceMappingCommand.ts b/clients/client-lambda/src/commands/DeleteEventSourceMappingCommand.ts index 618d1dc1fc894..89d2ee0618d24 100644 --- a/clients/client-lambda/src/commands/DeleteEventSourceMappingCommand.ts +++ b/clients/client-lambda/src/commands/DeleteEventSourceMappingCommand.ts @@ -23,8 +23,9 @@ export interface DeleteEventSourceMappingCommandOutput extends EventSourceMappin /** *

          Deletes an event source - * mapping. You can get the identifier of a mapping from the output of ListEventSourceMappings.

          - *

          When you delete an event source mapping, it enters a Deleting state and might not be completely deleted for several seconds.

          + * mapping. You can get the identifier of a mapping from the output of ListEventSourceMappings.

          + *

          When you delete an event source mapping, it enters a Deleting state and might not be completely + * deleted for several seconds.

          * @example * Use a bare-bones client and the command you need to make an API call. * ```javascript diff --git a/clients/client-lambda/src/commands/GetEventSourceMappingCommand.ts b/clients/client-lambda/src/commands/GetEventSourceMappingCommand.ts index 91128dba06599..af8b1464b56c0 100644 --- a/clients/client-lambda/src/commands/GetEventSourceMappingCommand.ts +++ b/clients/client-lambda/src/commands/GetEventSourceMappingCommand.ts @@ -22,7 +22,8 @@ export interface GetEventSourceMappingCommandInput extends GetEventSourceMapping export interface GetEventSourceMappingCommandOutput extends EventSourceMappingConfiguration, __MetadataBearer {} /** - *

          Returns details about an event source mapping. You can get the identifier of a mapping from the output of ListEventSourceMappings.

          + *

          Returns details about an event source mapping. You can get the identifier of a mapping from the output of + * ListEventSourceMappings.

          * @example * Use a bare-bones client and the command you need to make an API call. * ```javascript diff --git a/clients/client-lambda/src/commands/ListLayerVersionsCommand.ts b/clients/client-lambda/src/commands/ListLayerVersionsCommand.ts index ec44b2b5d92f5..566ce2fb5153e 100644 --- a/clients/client-lambda/src/commands/ListLayerVersionsCommand.ts +++ b/clients/client-lambda/src/commands/ListLayerVersionsCommand.ts @@ -24,7 +24,8 @@ export interface ListLayerVersionsCommandOutput extends ListLayerVersionsRespons /** *

          Lists the versions of an Lambda * layer. Versions that have been deleted aren't listed. Specify a runtime identifier to list only - * versions that indicate that they're compatible with that runtime.

          + * versions that indicate that they're compatible with that runtime. Specify a compatible architecture to include only + * layer versions that are compatible with that architecture.

          * @example * Use a bare-bones client and the command you need to make an API call. * ```javascript diff --git a/clients/client-lambda/src/commands/ListLayersCommand.ts b/clients/client-lambda/src/commands/ListLayersCommand.ts index a0ca0f7e17100..48b06b7d83e73 100644 --- a/clients/client-lambda/src/commands/ListLayersCommand.ts +++ b/clients/client-lambda/src/commands/ListLayersCommand.ts @@ -22,9 +22,12 @@ export interface ListLayersCommandInput extends ListLayersRequest {} export interface ListLayersCommandOutput extends ListLayersResponse, __MetadataBearer {} /** - *

          Lists Lambda - * layers and shows information about the latest version of each. Specify a runtime identifier to list only layers - * that indicate that they're compatible with that runtime.

          + *

          Lists Lambda + * layers and shows information about the latest version of each. Specify a + * runtime + * identifier to list only layers that indicate that they're compatible with that + * runtime. Specify a compatible architecture to include only layers that are compatible with + * that instruction set architecture.

          * @example * Use a bare-bones client and the command you need to make an API call. * ```javascript diff --git a/clients/client-lambda/src/commands/UpdateEventSourceMappingCommand.ts b/clients/client-lambda/src/commands/UpdateEventSourceMappingCommand.ts index dd1bbda8fc2d9..0ac653704157f 100644 --- a/clients/client-lambda/src/commands/UpdateEventSourceMappingCommand.ts +++ b/clients/client-lambda/src/commands/UpdateEventSourceMappingCommand.ts @@ -22,7 +22,9 @@ export interface UpdateEventSourceMappingCommandInput extends UpdateEventSourceM export interface UpdateEventSourceMappingCommandOutput extends EventSourceMappingConfiguration, __MetadataBearer {} /** - *

          Updates an event source mapping. You can change the function that Lambda invokes, or pause invocation and resume later from the same location.

          + *

          Updates an event source mapping. You can change the function that Lambda invokes, or pause + * invocation and resume later from the same location.

          + * *

          The following error handling options are only available for stream sources (DynamoDB and Kinesis):

          *
            *
          • diff --git a/clients/client-lambda/src/models/models_0.ts b/clients/client-lambda/src/models/models_0.ts index bcfd309ed2e66..0605f53f7953d 100644 --- a/clients/client-lambda/src/models/models_0.ts +++ b/clients/client-lambda/src/models/models_0.ts @@ -355,6 +355,7 @@ export interface AddPermissionRequest { /** *

            For Amazon Web Services services, the ARN of the Amazon Web Services resource that invokes the function. For example, an Amazon S3 bucket or * Amazon SNS topic.

            + *

            Note that Lambda configures the comparison using the StringLike operator.

            */ SourceArn?: string; @@ -491,6 +492,11 @@ export namespace AllowedPublishers { }); } +export enum Architecture { + arm64 = "arm64", + x86_64 = "x86_64", +} + export interface CreateAliasRequest { /** *

            The name of the Lambda function.

            @@ -874,12 +880,14 @@ export interface CreateEventSourceMappingRequest { FunctionName: string | undefined; /** - *

            If true, the event source mapping is active. Set to false to pause polling and invocation.

            + *

            When true, the event source mapping is active. When false, Lambda pauses polling and invocation.

            + *

            Default: True

            */ Enabled?: boolean; /** - *

            The maximum number of items to retrieve in a single batch.

            + *

            The maximum number of records in each batch that Lambda pulls from your stream or queue and sends to your function. Lambda passes all of the records in the batch to the function in a single call, up to the payload limit for synchronous invocation + * (6 MB).

            *
              *
            • *

              @@ -906,7 +914,9 @@ export interface CreateEventSourceMappingRequest { BatchSize?: number; /** - *

              (Streams and SQS standard queues) The maximum amount of time to gather records before invoking the function, in seconds.

              + *

              (Streams and Amazon SQS standard queues) The maximum amount of time, in seconds, that Lambda spends gathering records before invoking the function.

              + *

              Default: 0

              + *

              Related setting: When you set BatchSize to a value greater than 10, you must set MaximumBatchingWindowInSeconds to at least 1.

              */ MaximumBatchingWindowInSeconds?: number; @@ -916,8 +926,8 @@ export interface CreateEventSourceMappingRequest { ParallelizationFactor?: number; /** - *

              The position in a stream from which to start reading. Required for Amazon Kinesis, Amazon DynamoDB, and Amazon MSK Streams - * sources. AT_TIMESTAMP is only supported for Amazon Kinesis streams.

              + *

              The position in a stream from which to start reading. Required for Amazon Kinesis, Amazon DynamoDB, and Amazon + * MSK Streams sources. AT_TIMESTAMP is only supported for Amazon Kinesis streams.

              */ StartingPosition?: EventSourcePosition | string; @@ -958,9 +968,7 @@ export interface CreateEventSourceMappingRequest { Topics?: string[]; /** - *

              - * (MQ) The name of the Amazon MQ broker destination queue to consume. - *

              + *

              (MQ) The name of the Amazon MQ broker destination queue to consume.

              */ Queues?: string[]; @@ -1011,12 +1019,16 @@ export interface EventSourceMappingConfiguration { StartingPositionTimestamp?: Date; /** - *

              The maximum number of items to retrieve in a single batch.

              + *

              The maximum number of records in each batch that Lambda pulls from your stream or queue and sends to your function. Lambda passes all of the records in the batch to the function in a single call, up to the payload limit for synchronous invocation (6 MB).

              + *

              Default value: Varies by service. For Amazon SQS, the default is 10. For all other services, the default is 100.

              + *

              Related setting: When you set BatchSize to a value greater than 10, you must set MaximumBatchingWindowInSeconds to at least 1.

              */ BatchSize?: number; /** - *

              (Streams and Amazon SQS standard queues) The maximum amount of time to gather records before invoking the function, in seconds. The default value is zero.

              + *

              (Streams and Amazon SQS standard queues) The maximum amount of time, in seconds, that Lambda spends gathering records before invoking the function.

              + *

              Default: 0

              + *

              Related setting: When you set BatchSize to a value greater than 10, you must set MaximumBatchingWindowInSeconds to at least 1.

              */ MaximumBatchingWindowInSeconds?: number; @@ -1537,6 +1549,12 @@ export interface CreateFunctionRequest { * includes a set of signing profiles, which define the trusted publishers for this function.

              */ CodeSigningConfigArn?: string; + + /** + *

              The instruction set architecture that the function supports. Enter a string array with one of the valid values. + * The default value is x86_64.

              + */ + Architectures?: (Architecture | string)[]; } export namespace CreateFunctionRequest { @@ -1940,6 +1958,12 @@ export interface FunctionConfiguration { *

              The ARN of the signing job.

              */ SigningJobArn?: string; + + /** + *

              The instruction set architecture that the function supports. Architecture is a string array with one of the + * valid values. The default architecture value is x86_64.

              + */ + Architectures?: (Architecture | string)[]; } export namespace FunctionConfiguration { @@ -2485,7 +2509,7 @@ export namespace FunctionCodeLocation { export interface Concurrency { /** - *

              The number of concurrent executions that are reserved for this function. For more information, see Managing Concurrency.

              + *

              The number of concurrent executions that are reserved for this function. For more information, see Managing Concurrency.

              */ ReservedConcurrentExecutions?: number; } @@ -2896,6 +2920,12 @@ export interface GetLayerVersionResponse { *

              The layer's software license.

              */ LicenseInfo?: string; + + /** + *

              A list of compatible + * instruction set architectures.

              + */ + CompatibleArchitectures?: (Architecture | string)[]; } export namespace GetLayerVersionResponse { @@ -3192,7 +3222,7 @@ export namespace EC2UnexpectedException { } /** - *

              An error occured when reading from or writing to a connected file system.

              + *

              An error occurred when reading from or writing to a connected file system.

              */ export interface EFSIOException extends __SmithyException, $MetadataBearer { name: "EFSIOException"; @@ -3450,7 +3480,7 @@ export interface InvocationRequest { InvocationType?: InvocationType | string; /** - *

              Set to Tail to include the execution log in the response.

              + *

              Set to Tail to include the execution log in the response. Applies to synchronously invoked functions only.

              */ LogType?: LogType | string; @@ -3920,8 +3950,8 @@ export interface ListEventSourceMappingsRequest { Marker?: string; /** - *

              The maximum number of event source mappings to return. Note that ListEventSourceMappings returns - * a maximum of 100 items in each response, even if you set the number higher.

              + *

              The maximum number of event source mappings to return. Note that ListEventSourceMappings returns a maximum of + * 100 items in each response, even if you set the number higher.

              */ MaxItems?: number; } @@ -4147,6 +4177,12 @@ export interface ListLayersRequest { *

              The maximum number of layers to return.

              */ MaxItems?: number; + + /** + *

              The compatible + * instruction set architecture.

              + */ + CompatibleArchitecture?: Architecture | string; } export namespace ListLayersRequest { @@ -4192,6 +4228,12 @@ export interface LayerVersionsListItem { *

              The layer's open-source license.

              */ LicenseInfo?: string; + + /** + *

              A list of compatible + * instruction set architectures.

              + */ + CompatibleArchitectures?: (Architecture | string)[]; } export namespace LayerVersionsListItem { @@ -4274,6 +4316,12 @@ export interface ListLayerVersionsRequest { *

              The maximum number of versions to return.

              */ MaxItems?: number; + + /** + *

              The compatible + * instruction set architecture.

              + */ + CompatibleArchitecture?: Architecture | string; } export namespace ListLayerVersionsRequest { @@ -4423,7 +4471,8 @@ export namespace ListProvisionedConcurrencyConfigsResponse { export interface ListTagsRequest { /** - *

              The function's Amazon Resource Name (ARN).

              + *

              The function's Amazon Resource Name (ARN). + * Note: Lambda does not support adding tags to aliases or versions.

              */ Resource: string | undefined; } @@ -4598,6 +4647,12 @@ export interface PublishLayerVersionRequest { *
            */ LicenseInfo?: string; + + /** + *

            A list of compatible + * instruction set architectures.

            + */ + CompatibleArchitectures?: (Architecture | string)[]; } export namespace PublishLayerVersionRequest { @@ -4650,6 +4705,12 @@ export interface PublishLayerVersionResponse { *

            The layer's software license.

            */ LicenseInfo?: string; + + /** + *

            A list of compatible + * instruction set architectures.

            + */ + CompatibleArchitectures?: (Architecture | string)[]; } export namespace PublishLayerVersionResponse { @@ -5265,12 +5326,14 @@ export interface UpdateEventSourceMappingRequest { FunctionName?: string; /** - *

            If true, the event source mapping is active. Set to false to pause polling and invocation.

            + *

            When true, the event source mapping is active. When false, Lambda pauses polling and invocation.

            + *

            Default: True

            */ Enabled?: boolean; /** - *

            The maximum number of items to retrieve in a single batch.

            + *

            The maximum number of records in each batch that Lambda pulls from your stream or queue and sends to your function. Lambda passes all of the records in the batch to the function in a single call, up to the payload limit for synchronous invocation + * (6 MB).

            *
              *
            • *

              @@ -5297,7 +5360,9 @@ export interface UpdateEventSourceMappingRequest { BatchSize?: number; /** - *

              (Streams and SQS standard queues) The maximum amount of time to gather records before invoking the function, in seconds.

              + *

              (Streams and Amazon SQS standard queues) The maximum amount of time, in seconds, that Lambda spends gathering records before invoking the function.

              + *

              Default: 0

              + *

              Related setting: When you set BatchSize to a value greater than 10, you must set MaximumBatchingWindowInSeconds to at least 1.

              */ MaximumBatchingWindowInSeconds?: number; @@ -5419,6 +5484,12 @@ export interface UpdateFunctionCodeRequest { * function that has changed since you last read it.

              */ RevisionId?: string; + + /** + *

              The instruction set architecture that the function supports. Enter a string array with one of the valid values. + * The default value is x86_64.

              + */ + Architectures?: (Architecture | string)[]; } export namespace UpdateFunctionCodeRequest { @@ -5540,7 +5611,7 @@ export interface UpdateFunctionConfigurationRequest { /** *

              * Container image configuration - * values that override the values in the container image Dockerfile.

              + * values that override the values in the container image Docker file.

              */ ImageConfig?: ImageConfig; } diff --git a/clients/client-lambda/src/protocols/Aws_restJson1.ts b/clients/client-lambda/src/protocols/Aws_restJson1.ts index e91732b67bb26..c0a58d310861b 100644 --- a/clients/client-lambda/src/protocols/Aws_restJson1.ts +++ b/clients/client-lambda/src/protocols/Aws_restJson1.ts @@ -186,6 +186,7 @@ import { AliasConfiguration, AliasRoutingConfiguration, AllowedPublishers, + Architecture, CodeSigningConfig, CodeSigningConfigNotFoundException, CodeSigningPolicies, @@ -512,6 +513,10 @@ export const serializeAws_restJson1CreateFunctionCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2015-03-31/functions"; let body: any; body = JSON.stringify({ + ...(input.Architectures !== undefined && + input.Architectures !== null && { + Architectures: serializeAws_restJson1ArchitecturesList(input.Architectures, context), + }), ...(input.Code !== undefined && input.Code !== null && { Code: serializeAws_restJson1FunctionCode(input.Code, context) }), ...(input.CodeSigningConfigArn !== undefined && @@ -1581,6 +1586,7 @@ export const serializeAws_restJson1ListLayersCommand = async ( ...(input.CompatibleRuntime !== undefined && { CompatibleRuntime: input.CompatibleRuntime }), ...(input.Marker !== undefined && { Marker: input.Marker }), ...(input.MaxItems !== undefined && { MaxItems: input.MaxItems.toString() }), + ...(input.CompatibleArchitecture !== undefined && { CompatibleArchitecture: input.CompatibleArchitecture }), }; let body: any; return new __HttpRequest({ @@ -1616,6 +1622,7 @@ export const serializeAws_restJson1ListLayerVersionsCommand = async ( ...(input.CompatibleRuntime !== undefined && { CompatibleRuntime: input.CompatibleRuntime }), ...(input.Marker !== undefined && { Marker: input.Marker }), ...(input.MaxItems !== undefined && { MaxItems: input.MaxItems.toString() }), + ...(input.CompatibleArchitecture !== undefined && { CompatibleArchitecture: input.CompatibleArchitecture }), }; let body: any; return new __HttpRequest({ @@ -1751,6 +1758,10 @@ export const serializeAws_restJson1PublishLayerVersionCommand = async ( } let body: any; body = JSON.stringify({ + ...(input.CompatibleArchitectures !== undefined && + input.CompatibleArchitectures !== null && { + CompatibleArchitectures: serializeAws_restJson1CompatibleArchitectures(input.CompatibleArchitectures, context), + }), ...(input.CompatibleRuntimes !== undefined && input.CompatibleRuntimes !== null && { CompatibleRuntimes: serializeAws_restJson1CompatibleRuntimes(input.CompatibleRuntimes, context), @@ -2313,6 +2324,10 @@ export const serializeAws_restJson1UpdateFunctionCodeCommand = async ( } let body: any; body = JSON.stringify({ + ...(input.Architectures !== undefined && + input.Architectures !== null && { + Architectures: serializeAws_restJson1ArchitecturesList(input.Architectures, context), + }), ...(input.DryRun !== undefined && input.DryRun !== null && { DryRun: input.DryRun }), ...(input.ImageUri !== undefined && input.ImageUri !== null && { ImageUri: input.ImageUri }), ...(input.Publish !== undefined && input.Publish !== null && { Publish: input.Publish }), @@ -3013,6 +3028,7 @@ export const deserializeAws_restJson1CreateFunctionCommand = async ( } const contents: CreateFunctionCommandOutput = { $metadata: deserializeMetadata(output), + Architectures: undefined, CodeSha256: undefined, CodeSize: undefined, DeadLetterConfig: undefined, @@ -3046,6 +3062,9 @@ export const deserializeAws_restJson1CreateFunctionCommand = async ( VpcConfig: undefined, }; const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.Architectures !== undefined && data.Architectures !== null) { + contents.Architectures = deserializeAws_restJson1ArchitecturesList(data.Architectures, context); + } if (data.CodeSha256 !== undefined && data.CodeSha256 !== null) { contents.CodeSha256 = __expectString(data.CodeSha256); } @@ -4730,6 +4749,7 @@ export const deserializeAws_restJson1GetFunctionConfigurationCommand = async ( } const contents: GetFunctionConfigurationCommandOutput = { $metadata: deserializeMetadata(output), + Architectures: undefined, CodeSha256: undefined, CodeSize: undefined, DeadLetterConfig: undefined, @@ -4763,6 +4783,9 @@ export const deserializeAws_restJson1GetFunctionConfigurationCommand = async ( VpcConfig: undefined, }; const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.Architectures !== undefined && data.Architectures !== null) { + contents.Architectures = deserializeAws_restJson1ArchitecturesList(data.Architectures, context); + } if (data.CodeSha256 !== undefined && data.CodeSha256 !== null) { contents.CodeSha256 = __expectString(data.CodeSha256); } @@ -5024,6 +5047,7 @@ export const deserializeAws_restJson1GetLayerVersionCommand = async ( } const contents: GetLayerVersionCommandOutput = { $metadata: deserializeMetadata(output), + CompatibleArchitectures: undefined, CompatibleRuntimes: undefined, Content: undefined, CreatedDate: undefined, @@ -5034,6 +5058,12 @@ export const deserializeAws_restJson1GetLayerVersionCommand = async ( Version: undefined, }; const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.CompatibleArchitectures !== undefined && data.CompatibleArchitectures !== null) { + contents.CompatibleArchitectures = deserializeAws_restJson1CompatibleArchitectures( + data.CompatibleArchitectures, + context + ); + } if (data.CompatibleRuntimes !== undefined && data.CompatibleRuntimes !== null) { contents.CompatibleRuntimes = deserializeAws_restJson1CompatibleRuntimes(data.CompatibleRuntimes, context); } @@ -5131,6 +5161,7 @@ export const deserializeAws_restJson1GetLayerVersionByArnCommand = async ( } const contents: GetLayerVersionByArnCommandOutput = { $metadata: deserializeMetadata(output), + CompatibleArchitectures: undefined, CompatibleRuntimes: undefined, Content: undefined, CreatedDate: undefined, @@ -5141,6 +5172,12 @@ export const deserializeAws_restJson1GetLayerVersionByArnCommand = async ( Version: undefined, }; const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.CompatibleArchitectures !== undefined && data.CompatibleArchitectures !== null) { + contents.CompatibleArchitectures = deserializeAws_restJson1CompatibleArchitectures( + data.CompatibleArchitectures, + context + ); + } if (data.CompatibleRuntimes !== undefined && data.CompatibleRuntimes !== null) { contents.CompatibleRuntimes = deserializeAws_restJson1CompatibleRuntimes(data.CompatibleRuntimes, context); } @@ -6751,6 +6788,7 @@ export const deserializeAws_restJson1PublishLayerVersionCommand = async ( } const contents: PublishLayerVersionCommandOutput = { $metadata: deserializeMetadata(output), + CompatibleArchitectures: undefined, CompatibleRuntimes: undefined, Content: undefined, CreatedDate: undefined, @@ -6761,6 +6799,12 @@ export const deserializeAws_restJson1PublishLayerVersionCommand = async ( Version: undefined, }; const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.CompatibleArchitectures !== undefined && data.CompatibleArchitectures !== null) { + contents.CompatibleArchitectures = deserializeAws_restJson1CompatibleArchitectures( + data.CompatibleArchitectures, + context + ); + } if (data.CompatibleRuntimes !== undefined && data.CompatibleRuntimes !== null) { contents.CompatibleRuntimes = deserializeAws_restJson1CompatibleRuntimes(data.CompatibleRuntimes, context); } @@ -6866,6 +6910,7 @@ export const deserializeAws_restJson1PublishVersionCommand = async ( } const contents: PublishVersionCommandOutput = { $metadata: deserializeMetadata(output), + Architectures: undefined, CodeSha256: undefined, CodeSize: undefined, DeadLetterConfig: undefined, @@ -6899,6 +6944,9 @@ export const deserializeAws_restJson1PublishVersionCommand = async ( VpcConfig: undefined, }; const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.Architectures !== undefined && data.Architectures !== null) { + contents.Architectures = deserializeAws_restJson1ArchitecturesList(data.Architectures, context); + } if (data.CodeSha256 !== undefined && data.CodeSha256 !== null) { contents.CodeSha256 = __expectString(data.CodeSha256); } @@ -8202,6 +8250,7 @@ export const deserializeAws_restJson1UpdateFunctionCodeCommand = async ( } const contents: UpdateFunctionCodeCommandOutput = { $metadata: deserializeMetadata(output), + Architectures: undefined, CodeSha256: undefined, CodeSize: undefined, DeadLetterConfig: undefined, @@ -8235,6 +8284,9 @@ export const deserializeAws_restJson1UpdateFunctionCodeCommand = async ( VpcConfig: undefined, }; const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.Architectures !== undefined && data.Architectures !== null) { + contents.Architectures = deserializeAws_restJson1ArchitecturesList(data.Architectures, context); + } if (data.CodeSha256 !== undefined && data.CodeSha256 !== null) { contents.CodeSha256 = __expectString(data.CodeSha256); } @@ -8449,6 +8501,7 @@ export const deserializeAws_restJson1UpdateFunctionConfigurationCommand = async } const contents: UpdateFunctionConfigurationCommandOutput = { $metadata: deserializeMetadata(output), + Architectures: undefined, CodeSha256: undefined, CodeSize: undefined, DeadLetterConfig: undefined, @@ -8482,6 +8535,9 @@ export const deserializeAws_restJson1UpdateFunctionConfigurationCommand = async VpcConfig: undefined, }; const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.Architectures !== undefined && data.Architectures !== null) { + contents.Architectures = deserializeAws_restJson1ArchitecturesList(data.Architectures, context); + } if (data.CodeSha256 !== undefined && data.CodeSha256 !== null) { contents.CodeSha256 = __expectString(data.CodeSha256); } @@ -9550,6 +9606,17 @@ const serializeAws_restJson1AllowedPublishers = (input: AllowedPublishers, conte }; }; +const serializeAws_restJson1ArchitecturesList = (input: (Architecture | string)[], context: __SerdeContext): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + if (entry === null) { + return null as any; + } + return entry; + }); +}; + const serializeAws_restJson1CodeSigningPolicies = (input: CodeSigningPolicies, context: __SerdeContext): any => { return { ...(input.UntrustedArtifactOnDeployment !== undefined && @@ -9559,6 +9626,20 @@ const serializeAws_restJson1CodeSigningPolicies = (input: CodeSigningPolicies, c }; }; +const serializeAws_restJson1CompatibleArchitectures = ( + input: (Architecture | string)[], + context: __SerdeContext +): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + if (entry === null) { + return null as any; + } + return entry; + }); +}; + const serializeAws_restJson1CompatibleRuntimes = (input: (Runtime | string)[], context: __SerdeContext): any => { return input .filter((e: any) => e != null) @@ -9922,6 +10003,17 @@ const deserializeAws_restJson1AllowedPublishers = (output: any, context: __Serde } as any; }; +const deserializeAws_restJson1ArchitecturesList = (output: any, context: __SerdeContext): (Architecture | string)[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return __expectString(entry) as any; + }); +}; + const deserializeAws_restJson1CodeSigningConfig = (output: any, context: __SerdeContext): CodeSigningConfig => { return { AllowedPublishers: @@ -9956,6 +10048,20 @@ const deserializeAws_restJson1CodeSigningPolicies = (output: any, context: __Ser } as any; }; +const deserializeAws_restJson1CompatibleArchitectures = ( + output: any, + context: __SerdeContext +): (Architecture | string)[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return __expectString(entry) as any; + }); +}; + const deserializeAws_restJson1CompatibleRuntimes = (output: any, context: __SerdeContext): (Runtime | string)[] => { return (output || []) .filter((e: any) => e != null) @@ -10161,6 +10267,10 @@ const deserializeAws_restJson1FunctionCodeLocation = (output: any, context: __Se const deserializeAws_restJson1FunctionConfiguration = (output: any, context: __SerdeContext): FunctionConfiguration => { return { + Architectures: + output.Architectures !== undefined && output.Architectures !== null + ? deserializeAws_restJson1ArchitecturesList(output.Architectures, context) + : undefined, CodeSha256: __expectString(output.CodeSha256), CodeSize: __expectLong(output.CodeSize), DeadLetterConfig: @@ -10376,6 +10486,10 @@ const deserializeAws_restJson1LayerVersionsList = (output: any, context: __Serde const deserializeAws_restJson1LayerVersionsListItem = (output: any, context: __SerdeContext): LayerVersionsListItem => { return { + CompatibleArchitectures: + output.CompatibleArchitectures !== undefined && output.CompatibleArchitectures !== null + ? deserializeAws_restJson1CompatibleArchitectures(output.CompatibleArchitectures, context) + : undefined, CompatibleRuntimes: output.CompatibleRuntimes !== undefined && output.CompatibleRuntimes !== null ? deserializeAws_restJson1CompatibleRuntimes(output.CompatibleRuntimes, context) diff --git a/clients/client-macie2/src/models/models_0.ts b/clients/client-macie2/src/models/models_0.ts index 89d3ec09b600c..c65b40d51ffdd 100644 --- a/clients/client-macie2/src/models/models_0.ts +++ b/clients/client-macie2/src/models/models_0.ts @@ -79,6 +79,10 @@ export enum AllowsUnencryptedObjectUploads { UNKNOWN = "UNKNOWN", } +export enum BucketMetadataErrorCode { + ACCESS_DENIED = "ACCESS_DENIED", +} + export enum IsDefinedInJob { FALSE = "FALSE", TRUE = "TRUE", @@ -130,12 +134,12 @@ export namespace JobDetails { */ export interface ObjectCountByEncryptionType { /** - *

              The total number of objects that are encrypted with a customer-managed key. The objects use customer-provided server-side encryption (SSE-C).

              + *

              The total number of objects that are encrypted with a customer-provided key. The objects use customer-provided server-side encryption (SSE-C).

              */ customerManaged?: number; /** - *

              The total number of objects that are encrypted with an Key Management Service (KMS) customer master key (CMK). The objects use Amazon Web Services managed KMS encryption (AWS-KMS) or customer managed KMS encryption (SSE-KMS).

              + *

              The total number of objects that are encrypted with an KMS key, either an Amazon Web Services managed key or a customer managed key. The objects use KMS encryption (SSE-KMS).

              */ kmsManaged?: number; @@ -388,12 +392,12 @@ export enum Type { */ export interface BucketServerSideEncryption { /** - *

              The Amazon Resource Name (ARN) or unique identifier (key ID) for the Key Management Service (KMS) customer master key (CMK) that's used by default to encrypt objects that are added to the bucket. This value is null if the bucket uses an Amazon S3 managed key to encrypt new objects or the bucket doesn't encrypt new objects by default.

              + *

              The Amazon Resource Name (ARN) or unique identifier (key ID) for the KMS key that's used by default to encrypt objects that are added to the bucket. This value is null if the bucket uses an Amazon S3 managed key to encrypt new objects or the bucket doesn't encrypt new objects by default.

              */ kmsMasterKeyId?: string; /** - *

              The type of server-side encryption that's used by default when storing new objects in the bucket. Possible values are:

              • AES256 - New objects are encrypted with an Amazon S3 managed key and use Amazon S3 managed encryption (SSE-S3).

              • aws:kms - New objects are encrypted with an KMS CMK, specified by the kmsMasterKeyId property, and use Amazon Web Services managed KMS encryption (AWS-KMS) or customer managed KMS encryption (SSE-KMS).

              • NONE - New objects aren't encrypted by default. Default encryption is disabled for the bucket.

              + *

              The type of server-side encryption that's used by default when storing new objects in the bucket. Possible values are:

              • AES256 - New objects are encrypted with an Amazon S3 managed key. They use SSE-S3 encryption.

              • aws:kms - New objects are encrypted with an KMS key (kmsMasterKeyId), either an Amazon Web Services managed key or a customer managed key. They use SSE-KMS encryption.

              • NONE - New objects aren't encrypted by default. Default encryption is disabled for the bucket.

              */ type?: Type | string; } @@ -439,7 +443,7 @@ export namespace KeyValuePair { } /** - *

              Provides information about the total storage size (in bytes) or number of objects that Amazon Macie can't analyze in one or more S3 buckets. In a BucketMetadata or MatchingBucket object, this data is for a specific bucket. In a GetBucketStatisticsResponse object, this data is aggregated for all the buckets in the query results. If versioning is enabled for a bucket, total storage size values are based on the size of the latest version of each applicable object in the bucket.

              + *

              Provides information about the total storage size (in bytes) or number of objects that Amazon Macie can't analyze in one or more S3 buckets. In a BucketMetadata or MatchingBucket object, this data is for a specific bucket. In a GetBucketStatisticsResponse object, this data is aggregated for the buckets in the query results. If versioning is enabled for a bucket, total storage size values are based on the size of the latest version of each applicable object in the bucket.

              */ export interface ObjectLevelStatistics { /** @@ -468,7 +472,7 @@ export namespace ObjectLevelStatistics { } /** - *

              Provides information about an S3 bucket that Amazon Macie monitors and analyzes.

              + *

              Provides statistical data and other information about an S3 bucket that Amazon Macie monitors and analyzes for your account. If an error occurs when Macie attempts to retrieve and process information about the bucket or the bucket's objects, the value for most of these properties is null. Exceptions are accountId, bucketArn, bucketCreatedAt, bucketName, lastUpdated, and region. To identify the cause of the error, refer to the errorCode and errorMessage values.

              */ export interface BucketMetadata { /** @@ -506,6 +510,16 @@ export interface BucketMetadata { */ classifiableSizeInBytes?: number; + /** + *

              Specifies the error code for an error that prevented Amazon Macie from retrieving and processing information about the bucket and the bucket's objects. If this value is ACCESS_DENIED, Macie doesn't have permission to retrieve the information. For example, the bucket has a restrictive bucket policy and Amazon S3 denied the request. If this value is null, Macie was able to retrieve and process the information.

              + */ + errorCode?: BucketMetadataErrorCode | string; + + /** + *

              A brief description of the error (errorCode) that prevented Amazon Macie from retrieving and processing information about the bucket and the bucket's objects. This value is null if Macie was able to retrieve and process the information.

              + */ + errorMessage?: string; + /** *

              Specifies whether any one-time or recurring classification jobs are configured to analyze data in the bucket, and, if so, the details of the job that ran most recently.

              */ @@ -557,7 +571,7 @@ export interface BucketMetadata { sizeInBytes?: number; /** - *

              The total storage size, in bytes, of the objects that are compressed (.gz, .gzip, .zip) files in the bucket.

              If versioning is enabled for the bucket, Macie calculates this value based on the size of the latest version of each applicable object in the bucket. This value doesn't reflect the storage size of all versions of each applicable object in the bucket.

              + *

              The total storage size, in bytes, of the objects that are compressed (.gz, .gzip, .zip) files in the bucket.

              If versioning is enabled for the bucket, Amazon Macie calculates this value based on the size of the latest version of each applicable object in the bucket. This value doesn't reflect the storage size of all versions of each applicable object in the bucket.

              */ sizeInBytesCompressed?: number; @@ -1754,7 +1768,7 @@ export interface ServerSideEncryption { encryptionType?: EncryptionType | string; /** - *

              The Amazon Resource Name (ARN) or unique identifier (key ID) for the Key Management Service (KMS) customer master key (CMK) that's used to encrypt data in the bucket or the object. If an KMS CMK isn't used, this value is null.

              + *

              The Amazon Resource Name (ARN) or unique identifier (key ID) for the KMS key that's used to encrypt data in the bucket or the object. This value is null if an KMS key isn't used to encrypt the data.

              */ kmsMasterKeyId?: string; } @@ -2592,7 +2606,7 @@ export namespace ManagedDataIdentifierSummary { } /** - *

              Provides statistical data and other information about an S3 bucket that Amazon Macie monitors and analyzes.

              + *

              Provides statistical data and other information about an S3 bucket that Amazon Macie monitors and analyzes for your account. If an error occurs when Macie attempts to retrieve and process information about the bucket or the bucket's objects, the value for most of these properties is null. Exceptions are accountId and bucketName. To identify the cause of the error, refer to the errorCode and errorMessage values.

              */ export interface MatchingBucket { /** @@ -2615,6 +2629,16 @@ export interface MatchingBucket { */ classifiableSizeInBytes?: number; + /** + *

              Specifies the error code for an error that prevented Amazon Macie from retrieving and processing information about the bucket and the bucket's objects. If this value is ACCESS_DENIED, Macie doesn't have permission to retrieve the information. For example, the bucket has a restrictive bucket policy and Amazon S3 denied the request. If this value is null, Macie was able to retrieve and process the information.

              + */ + errorCode?: BucketMetadataErrorCode | string; + + /** + *

              A brief description of the error (errorCode) that prevented Amazon Macie from retrieving and processing information about the bucket and the bucket's objects. This value is null if Macie was able to retrieve and process the information.

              + */ + errorMessage?: string; + /** *

              Specifies whether any one-time or recurring classification jobs are configured to analyze objects in the bucket, and, if so, the details of the job that ran most recently.

              */ @@ -2636,7 +2660,7 @@ export interface MatchingBucket { sizeInBytes?: number; /** - *

              The total storage size, in bytes, of the objects that are compressed (.gz, .gzip, .zip) files in the bucket.

              If versioning is enabled for the bucket, Macie calculates this value based on the size of the latest version of each applicable object in the bucket. This value doesn't reflect the storage size of all versions of each applicable object in the bucket.

              + *

              The total storage size, in bytes, of the objects that are compressed (.gz, .gzip, .zip) files in the bucket.

              If versioning is enabled for the bucket, Amazon Macie calculates this value based on the size of the latest version of each applicable object in the bucket. This value doesn't reflect the storage size of all versions of each applicable object in the bucket.

              */ sizeInBytesCompressed?: number; @@ -2661,7 +2685,7 @@ export namespace MatchingBucket { } /** - *

              Provides statistical data and other information about an Amazon Web Services resource that Amazon Macie monitors and analyzes.

              + *

              Provides statistical data and other information about an Amazon Web Services resource that Amazon Macie monitors and analyzes for your account.

              */ export interface MatchingResource { /** @@ -3349,7 +3373,7 @@ export namespace BucketCountByEffectivePermission { */ export interface BucketCountByEncryptionType { /** - *

              The total number of buckets that use an Key Management Service (KMS) customer master key (CMK) to encrypt new objects by default. These buckets use Amazon Web Services managed KMS encryption (AWS-KMS) or customer managed KMS encryption (SSE-KMS) by default.

              + *

              The total number of buckets that use an KMS key to encrypt new objects by default, either an Amazon Web Services managed key or a customer managed key. These buckets use KMS encryption (SSE-KMS) by default.

              */ kmsManaged?: number; @@ -3446,7 +3470,7 @@ export namespace BucketCountPolicyAllowsUnencryptedObjectUploads { */ export interface BucketCriteriaAdditionalProperties { /** - *

              The value for the property matches (equals) the specified value. If you specify multiple values, Macie uses OR logic to join the values.

              + *

              The value for the property matches (equals) the specified value. If you specify multiple values, Amazon Macie uses OR logic to join the values.

              */ eq?: string[]; @@ -3534,7 +3558,7 @@ export interface S3Destination { keyPrefix?: string; /** - *

              The Amazon Resource Name (ARN) of the Key Management Service (KMS) customer master key (CMK) to use for encryption of the results. This must be the ARN of an existing CMK that's in the same Amazon Web Services Region as the bucket.

              + *

              The Amazon Resource Name (ARN) of the KMS key to use for encryption of the results. This must be the ARN of an existing, symmetric, customer managed KMS key that's in the same Amazon Web Services Region as the bucket.

              */ kmsKeyArn: string | undefined; } @@ -4836,12 +4860,12 @@ export interface GetBucketStatisticsResponse { objectCount?: number; /** - *

              The total storage size, in bytes, of the buckets.

              If versioning is enabled for any of the buckets, Macie calculates this value based on the size of the latest version of each object in those buckets. This value doesn't reflect the storage size of all versions of the objects in the buckets.

              + *

              The total storage size, in bytes, of the buckets.

              If versioning is enabled for any of the buckets, Amazon Macie calculates this value based on the size of the latest version of each object in those buckets. This value doesn't reflect the storage size of all versions of the objects in the buckets.

              */ sizeInBytes?: number; /** - *

              The total storage size, in bytes, of the objects that are compressed (.gz, .gzip, .zip) files in the buckets.

              If versioning is enabled for any of the buckets, Macie calculates this value based on the size of the latest version of each applicable object in those buckets. This value doesn't reflect the storage size of all versions of the applicable objects in the buckets.

              + *

              The total storage size, in bytes, of the objects that are compressed (.gz, .gzip, .zip) files in the buckets.

              If versioning is enabled for any of the buckets, Amazon Macie calculates this value based on the size of the latest version of each applicable object in those buckets. This value doesn't reflect the storage size of all versions of the applicable objects in the buckets.

              */ sizeInBytesCompressed?: number; diff --git a/clients/client-macie2/src/protocols/Aws_restJson1.ts b/clients/client-macie2/src/protocols/Aws_restJson1.ts index 61e9bd871a50c..344be14e35b5c 100644 --- a/clients/client-macie2/src/protocols/Aws_restJson1.ts +++ b/clients/client-macie2/src/protocols/Aws_restJson1.ts @@ -8974,6 +8974,8 @@ const deserializeAws_restJson1BucketMetadata = (output: any, context: __SerdeCon bucketName: __expectString(output.bucketName), classifiableObjectCount: __expectLong(output.classifiableObjectCount), classifiableSizeInBytes: __expectLong(output.classifiableSizeInBytes), + errorCode: __expectString(output.errorCode), + errorMessage: __expectString(output.errorMessage), jobDetails: output.jobDetails !== undefined && output.jobDetails !== null ? deserializeAws_restJson1JobDetails(output.jobDetails, context) @@ -9586,6 +9588,8 @@ const deserializeAws_restJson1MatchingBucket = (output: any, context: __SerdeCon bucketName: __expectString(output.bucketName), classifiableObjectCount: __expectLong(output.classifiableObjectCount), classifiableSizeInBytes: __expectLong(output.classifiableSizeInBytes), + errorCode: __expectString(output.errorCode), + errorMessage: __expectString(output.errorMessage), jobDetails: output.jobDetails !== undefined && output.jobDetails !== null ? deserializeAws_restJson1JobDetails(output.jobDetails, context) diff --git a/clients/client-network-firewall/README.md b/clients/client-network-firewall/README.md index 6ec45eecd7a65..7b512ddc6d0af 100644 --- a/clients/client-network-firewall/README.md +++ b/clients/client-network-firewall/README.md @@ -33,7 +33,8 @@ Guide.

              prevention service for Amazon Virtual Private Cloud (Amazon VPC). With Network Firewall, you can filter traffic at the perimeter of your VPC. This includes filtering traffic going to and coming from an internet gateway, NAT gateway, or over VPN or AWS Direct Connect. Network Firewall uses rules that are compatible -with Suricata, a free, open source intrusion detection system (IDS) engine. For information about Suricata, +with Suricata, a free, open source intrusion detection system (IDS) engine. +AWS Network Firewall supports Suricata version 5.0.2. For information about Suricata, see the Suricata website.

              You can use Network Firewall to monitor and protect your VPC traffic in a number of ways. The following are just a few examples:

              diff --git a/clients/client-network-firewall/src/NetworkFirewall.ts b/clients/client-network-firewall/src/NetworkFirewall.ts index 25dfd0a353705..7fab7eff1a14e 100644 --- a/clients/client-network-firewall/src/NetworkFirewall.ts +++ b/clients/client-network-firewall/src/NetworkFirewall.ts @@ -170,7 +170,8 @@ import { NetworkFirewallClient } from "./NetworkFirewallClient"; * prevention service for Amazon Virtual Private Cloud (Amazon VPC). With Network Firewall, you can filter traffic at the * perimeter of your VPC. This includes filtering traffic going to and coming from an internet * gateway, NAT gateway, or over VPN or AWS Direct Connect. Network Firewall uses rules that are compatible - * with Suricata, a free, open source intrusion detection system (IDS) engine. For information about Suricata, + * with Suricata, a free, open source intrusion detection system (IDS) engine. + * AWS Network Firewall supports Suricata version 5.0.2. For information about Suricata, * see the Suricata website.

              *

              You can use Network Firewall to monitor and protect your VPC traffic in a number of ways. * The following are just a few examples:

              @@ -405,7 +406,8 @@ export class NetworkFirewall extends NetworkFirewallClient { } /** - *

              Deletes the specified Firewall and its FirewallStatus. This operation requires the firewall's DeleteProtection flag to be + *

              Deletes the specified Firewall and its FirewallStatus. + * This operation requires the firewall's DeleteProtection flag to be * FALSE. You can't revert this operation.

              *

              You can check whether a firewall is * in use by reviewing the route tables for the Availability Zones where you have diff --git a/clients/client-network-firewall/src/NetworkFirewallClient.ts b/clients/client-network-firewall/src/NetworkFirewallClient.ts index 79daa1e9080d6..65ae282ca5866 100644 --- a/clients/client-network-firewall/src/NetworkFirewallClient.ts +++ b/clients/client-network-firewall/src/NetworkFirewallClient.ts @@ -355,7 +355,8 @@ export interface NetworkFirewallClientResolvedConfig extends NetworkFirewallClie * prevention service for Amazon Virtual Private Cloud (Amazon VPC). With Network Firewall, you can filter traffic at the * perimeter of your VPC. This includes filtering traffic going to and coming from an internet * gateway, NAT gateway, or over VPN or AWS Direct Connect. Network Firewall uses rules that are compatible - * with Suricata, a free, open source intrusion detection system (IDS) engine. For information about Suricata, + * with Suricata, a free, open source intrusion detection system (IDS) engine. + * AWS Network Firewall supports Suricata version 5.0.2. For information about Suricata, * see the Suricata website.

              *

              You can use Network Firewall to monitor and protect your VPC traffic in a number of ways. * The following are just a few examples:

              diff --git a/clients/client-network-firewall/src/commands/DeleteFirewallCommand.ts b/clients/client-network-firewall/src/commands/DeleteFirewallCommand.ts index 77eb162605884..69502d01fd52e 100644 --- a/clients/client-network-firewall/src/commands/DeleteFirewallCommand.ts +++ b/clients/client-network-firewall/src/commands/DeleteFirewallCommand.ts @@ -22,7 +22,8 @@ export interface DeleteFirewallCommandInput extends DeleteFirewallRequest {} export interface DeleteFirewallCommandOutput extends DeleteFirewallResponse, __MetadataBearer {} /** - *

              Deletes the specified Firewall and its FirewallStatus. This operation requires the firewall's DeleteProtection flag to be + *

              Deletes the specified Firewall and its FirewallStatus. + * This operation requires the firewall's DeleteProtection flag to be * FALSE. You can't revert this operation.

              *

              You can check whether a firewall is * in use by reviewing the route tables for the Availability Zones where you have diff --git a/clients/client-network-firewall/src/models/models_0.ts b/clients/client-network-firewall/src/models/models_0.ts index 4c9fdbb78733d..8c93a392e6c7a 100644 --- a/clients/client-network-firewall/src/models/models_0.ts +++ b/clients/client-network-firewall/src/models/models_0.ts @@ -111,13 +111,13 @@ export interface AssociateFirewallPolicyRequest { /** *

              The Amazon Resource Name (ARN) of the firewall.

              - *

              You must specify the ARN or the name, and you can specify both.

              + *

              You must specify the ARN or the name, and you can specify both.

              */ FirewallArn?: string; /** *

              The descriptive name of the firewall. You can't change the name of a firewall after you create it.

              - *

              You must specify the ARN or the name, and you can specify both.

              + *

              You must specify the ARN or the name, and you can specify both.

              */ FirewallName?: string; @@ -324,13 +324,13 @@ export interface AssociateSubnetsRequest { /** *

              The Amazon Resource Name (ARN) of the firewall.

              - *

              You must specify the ARN or the name, and you can specify both.

              + *

              You must specify the ARN or the name, and you can specify both.

              */ FirewallArn?: string; /** *

              The descriptive name of the firewall. You can't change the name of a firewall after you create it.

              - *

              You must specify the ARN or the name, and you can specify both.

              + *

              You must specify the ARN or the name, and you can specify both.

              */ FirewallName?: string; @@ -797,6 +797,34 @@ export namespace LimitExceededException { }); } +export enum RuleOrder { + DEFAULT_ACTION_ORDER = "DEFAULT_ACTION_ORDER", + STRICT_ORDER = "STRICT_ORDER", +} + +/** + *

              Configuration settings for the handling of the stateful rule groups in a firewall policy.

              + */ +export interface StatefulEngineOptions { + /** + *

              Indicates how to manage the order of stateful rule evaluation for the policy. By default, Network Firewall + * leaves the rule evaluation order up to the Suricata rule processing engine. If you set + * this to STRICT_ORDER, your rules are evaluated in the exact order that you provide them + * in the policy. With strict ordering, the rule groups are evaluated by order of priority, starting from the lowest number, and + * the rules in each rule group are processed in the order that they're defined.

              + */ + RuleOrder?: RuleOrder | string; +} + +export namespace StatefulEngineOptions { + /** + * @internal + */ + export const filterSensitiveLog = (obj: StatefulEngineOptions): any => ({ + ...obj, + }); +} + /** *

              Identifier for a single stateful rule group, used in a firewall policy to refer to a * rule group.

              @@ -806,6 +834,19 @@ export interface StatefulRuleGroupReference { *

              The Amazon Resource Name (ARN) of the stateful rule group.

              */ ResourceArn: string | undefined; + + /** + *

              An integer setting that indicates the order in which to run the stateful rule groups in + * a single FirewallPolicy. This setting only applies to firewall policies + * that specify the STRICT_ORDER rule order in the stateful engine options settings.

              + *

              Network Firewall evalutes each stateful rule group + * against a packet starting with the group that has the lowest priority setting. You must ensure + * that the priority settings are unique within each policy.

              + *

              You can change the priority settings of your rule groups at any time. To make it easier to + * insert rule groups later, number them so there's a wide range in between, for example use 100, + * 200, and so on.

              + */ + Priority?: number; } export namespace StatefulRuleGroupReference { @@ -938,10 +979,21 @@ export interface FirewallPolicy { StatelessCustomActions?: CustomAction[]; /** - *

              References to the stateless rule groups that are used in the policy. These define the + *

              References to the stateful rule groups that are used in the policy. These define the * inspection criteria in stateful rules.

              */ StatefulRuleGroupReferences?: StatefulRuleGroupReference[]; + + /** + *

              The default actions to take on a packet that doesn't match any stateful rules.

              + */ + StatefulDefaultActions?: string[]; + + /** + *

              Additional options governing how Network Firewall handles stateful rules. The stateful + * rule groups that you use in your policy must have stateful rule options settings that are compatible with these settings.

              + */ + StatefulEngineOptions?: StatefulEngineOptions; } export namespace FirewallPolicy { @@ -1039,6 +1091,21 @@ export interface FirewallPolicyResponse { *

              The key:value pairs to associate with the resource.

              */ Tags?: Tag[]; + + /** + *

              The number of capacity units currently consumed by the policy's stateless rules.

              + */ + ConsumedStatelessRuleCapacity?: number; + + /** + *

              The number of capacity units currently consumed by the policy's stateful rules.

              + */ + ConsumedStatefulRuleCapacity?: number; + + /** + *

              The number of firewalls that are associated with this firewall policy.

              + */ + NumberOfAssociations?: number; } export namespace FirewallPolicyResponse { @@ -1085,8 +1152,7 @@ export enum TargetType { /** *

              Stateful inspection criteria for a domain list rule group.

              *

              For HTTPS traffic, domain filtering is SNI-based. It uses the server name indicator extension of the TLS handshake.

              - *

              By default, Network Firewall domain list inspection only includes traffic coming from the VPC where you deploy the firewall. To inspect traffic from IP addresses outside of the deployment VPC, you set the HOME_NET rule variable to include the CIDR range of the deployment VPC plus the other CIDR ranges. For more information, see RuleVariables in this guide and Stateful domain list rule groups in AWS Network Firewall in the Network Firewall Developer Guide - *

              + *

              By default, Network Firewall domain list inspection only includes traffic coming from the VPC where you deploy the firewall. To inspect traffic from IP addresses outside of the deployment VPC, you set the HOME_NET rule variable to include the CIDR range of the deployment VPC plus the other CIDR ranges. For more information, see RuleVariables in this guide and Stateful domain list rule groups in AWS Network Firewall in the Network Firewall Developer Guide.

              */ export interface RulesSourceList { /** @@ -1104,7 +1170,7 @@ export interface RulesSourceList { Targets: string[] | undefined; /** - *

              The protocols you want to inspect. Specify TLS_SNI for HTTPS. Specity HTTP_HOST for HTTP. You can specify either or both.

              + *

              The protocols you want to inspect. Specify TLS_SNI for HTTPS. Specify HTTP_HOST for HTTP. You can specify either or both.

              */ TargetTypes: (TargetType | string)[] | undefined; @@ -1157,7 +1223,7 @@ export enum StatefulRuleProtocol { } /** - *

              The 5-tuple criteria for AWS Network Firewall to use to inspect packet headers in stateful + *

              The basic rule criteria for AWS Network Firewall to use to inspect packet headers in stateful * traffic flow inspection. Traffic flows that match the criteria are a match for the * corresponding StatefulRule.

              */ @@ -1188,7 +1254,7 @@ export interface Header { /** *

              The source port to inspect for. You can specify an individual port, for * example 1994 and you can specify a port - * range, for example 1990-1994. + * range, for example 1990:1994. * To match with any port, specify ANY.

              */ SourcePort: string | undefined; @@ -1222,7 +1288,7 @@ export interface Header { /** *

              The destination port to inspect for. You can specify an individual port, for * example 1994 and you can specify - * a port range, for example 1990-1994. + * a port range, for example 1990:1994. * To match with any port, specify ANY.

              */ DestinationPort: string | undefined; @@ -1262,7 +1328,10 @@ export namespace RuleOption { } /** - *

              A single 5-tuple stateful rule, for use in a stateful rule group.

              + *

              A single Suricata rules specification, for use in a stateful rule group. + * Use this option to specify a simple Suricata rule with protocol, source and destination, ports, direction, and rule options. + * For information about the Suricata Rules format, see + * Rules Format.

              */ export interface StatefulRule { /** @@ -1296,13 +1365,13 @@ export interface StatefulRule { Action: StatefulAction | string | undefined; /** - *

              The stateful 5-tuple inspection criteria for this rule, used to inspect traffic flows. + *

              The stateful inspection criteria for this rule, used to inspect traffic flows. *

              */ Header: Header | undefined; /** - *

              + *

              Additional options for the rule. These are the Suricata RuleOptions settings.

              */ RuleOptions: RuleOption[] | undefined; } @@ -1408,7 +1477,7 @@ export interface MatchAttributes { *

              The source ports to inspect for. If not specified, this matches with any source port. * This setting is only used for protocols 6 (TCP) and 17 (UDP).

              *

              You can specify individual ports, for example 1994 and you can specify port - * ranges, for example 1990-1994.

              + * ranges, for example 1990:1994.

              */ SourcePorts?: PortRange[]; @@ -1416,7 +1485,7 @@ export interface MatchAttributes { *

              The destination ports to inspect for. If not specified, this matches with any * destination port. This setting is only used for protocols 6 (TCP) and 17 (UDP).

              *

              You can specify individual ports, for example 1994 and you can specify port - * ranges, for example 1990-1994.

              + * ranges, for example 1990:1994.

              */ DestinationPorts?: PortRange[]; @@ -1515,7 +1584,7 @@ export interface StatelessRule { RuleDefinition: RuleDefinition | undefined; /** - *

              A setting that indicates the order in which to run this rule relative to all of the + *

              Indicates the order in which to run this rule relative to all of the * rules that are defined for a stateless rule group. Network Firewall evaluates the rules in a * rule group starting with the lowest priority setting. You must ensure that the priority * settings are unique for the rule group.

              @@ -1591,8 +1660,10 @@ export interface RulesSource { RulesSourceList?: RulesSourceList; /** - *

              The 5-tuple stateful inspection criteria. This contains an array of individual 5-tuple - * stateful rules to be used together in a stateful rule group.

              + *

              An array of individual stateful rules inspection criteria to be used together in a stateful rule group. + * Use this option to specify simple Suricata rules with protocol, source and destination, ports, direction, and rule options. + * For information about the Suricata Rules format, see + * Rules Format.

              */ StatefulRules?: StatefulRule[]; @@ -1677,6 +1748,28 @@ export namespace RuleVariables { }); } +/** + *

              Additional options governing how Network Firewall handles the rule group. You can only use these for stateful rule groups.

              + */ +export interface StatefulRuleOptions { + /** + *

              Indicates how to manage the order of the rule evaluation for the rule group. By default, Network Firewall + * leaves the rule evaluation order up to the Suricata rule processing engine. If you set + * this to STRICT_ORDER, your rules are evaluated in the exact order that they're listed + * in your Suricata rules string.

              + */ + RuleOrder?: RuleOrder | string; +} + +export namespace StatefulRuleOptions { + /** + * @internal + */ + export const filterSensitiveLog = (obj: StatefulRuleOptions): any => ({ + ...obj, + }); +} + /** *

              The object that defines the rules in a rule group. This, along with RuleGroupResponse, define the rule group. You can retrieve all objects for a rule group by calling DescribeRuleGroup.

              *

              AWS Network Firewall uses a rule group to inspect and control network traffic. @@ -1696,6 +1789,12 @@ export interface RuleGroup { *

              The stateful rules or stateless rules for the rule group.

              */ RulesSource: RulesSource | undefined; + + /** + *

              Additional options governing how Network Firewall handles stateful rules. The policies where you use your stateful + * rule group must have stateful rule options settings that are compatible with these settings.

              + */ + StatefulRuleOptions?: StatefulRuleOptions; } export namespace RuleGroup { @@ -1871,6 +1970,16 @@ export interface RuleGroupResponse { *

              The key:value pairs to associate with the resource.

              */ Tags?: Tag[]; + + /** + *

              The number of capacity units currently consumed by the rule group rules.

              + */ + ConsumedCapacity?: number; + + /** + *

              The number of firewall policies that use this rule group.

              + */ + NumberOfAssociations?: number; } export namespace RuleGroupResponse { @@ -1907,13 +2016,13 @@ export namespace CreateRuleGroupResponse { export interface DeleteFirewallRequest { /** *

              The descriptive name of the firewall. You can't change the name of a firewall after you create it.

              - *

              You must specify the ARN or the name, and you can specify both.

              + *

              You must specify the ARN or the name, and you can specify both.

              */ FirewallName?: string; /** *

              The Amazon Resource Name (ARN) of the firewall.

              - *

              You must specify the ARN or the name, and you can specify both.

              + *

              You must specify the ARN or the name, and you can specify both.

              */ FirewallArn?: string; } @@ -2036,6 +2145,24 @@ export namespace DeleteResourcePolicyResponse { }); } +/** + *

              The policy statement failed validation.

              + */ +export interface InvalidResourcePolicyException extends __SmithyException, $MetadataBearer { + name: "InvalidResourcePolicyException"; + $fault: "client"; + Message?: string; +} + +export namespace InvalidResourcePolicyException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: InvalidResourcePolicyException): any => ({ + ...obj, + }); +} + export interface DeleteRuleGroupRequest { /** *

              The descriptive name of the rule group. You can't change the name of a rule group after you create it.

              @@ -2087,13 +2214,13 @@ export namespace DeleteRuleGroupResponse { export interface DescribeFirewallRequest { /** *

              The descriptive name of the firewall. You can't change the name of a firewall after you create it.

              - *

              You must specify the ARN or the name, and you can specify both.

              + *

              You must specify the ARN or the name, and you can specify both.

              */ FirewallName?: string; /** *

              The Amazon Resource Name (ARN) of the firewall.

              - *

              You must specify the ARN or the name, and you can specify both.

              + *

              You must specify the ARN or the name, and you can specify both.

              */ FirewallArn?: string; } @@ -2138,13 +2265,13 @@ export namespace DescribeFirewallResponse { export interface DescribeFirewallPolicyRequest { /** *

              The descriptive name of the firewall policy. You can't change the name of a firewall policy after you create it.

              - *

              You must specify the ARN or the name, and you can specify both.

              + *

              You must specify the ARN or the name, and you can specify both.

              */ FirewallPolicyName?: string; /** *

              The Amazon Resource Name (ARN) of the firewall policy.

              - *

              You must specify the ARN or the name, and you can specify both.

              + *

              You must specify the ARN or the name, and you can specify both.

              */ FirewallPolicyArn?: string; } @@ -2188,13 +2315,13 @@ export namespace DescribeFirewallPolicyResponse { export interface DescribeLoggingConfigurationRequest { /** *

              The Amazon Resource Name (ARN) of the firewall.

              - *

              You must specify the ARN or the name, and you can specify both.

              + *

              You must specify the ARN or the name, and you can specify both.

              */ FirewallArn?: string; /** *

              The descriptive name of the firewall. You can't change the name of a firewall after you create it.

              - *

              You must specify the ARN or the name, and you can specify both.

              + *

              You must specify the ARN or the name, and you can specify both.

              */ FirewallName?: string; } @@ -2361,20 +2488,20 @@ export namespace DescribeResourcePolicyResponse { export interface DescribeRuleGroupRequest { /** *

              The descriptive name of the rule group. You can't change the name of a rule group after you create it.

              - *

              You must specify the ARN or the name, and you can specify both.

              + *

              You must specify the ARN or the name, and you can specify both.

              */ RuleGroupName?: string; /** *

              The Amazon Resource Name (ARN) of the rule group.

              - *

              You must specify the ARN or the name, and you can specify both.

              + *

              You must specify the ARN or the name, and you can specify both.

              */ RuleGroupArn?: string; /** *

              Indicates whether the rule group is stateless or stateful. If the rule group is stateless, it contains * stateless rules. If it is stateful, it contains stateful rules.

              - * + * *

              This setting is required for requests that do not include the RuleGroupARN.

              *
              */ @@ -2432,13 +2559,13 @@ export interface DisassociateSubnetsRequest { /** *

              The Amazon Resource Name (ARN) of the firewall.

              - *

              You must specify the ARN or the name, and you can specify both.

              + *

              You must specify the ARN or the name, and you can specify both.

              */ FirewallArn?: string; /** *

              The descriptive name of the firewall. You can't change the name of a firewall after you create it.

              - *

              You must specify the ARN or the name, and you can specify both.

              + *

              You must specify the ARN or the name, and you can specify both.

              */ FirewallName?: string; @@ -2542,24 +2669,6 @@ export namespace FirewallPolicyMetadata { }); } -/** - *

              - */ -export interface InvalidResourcePolicyException extends __SmithyException, $MetadataBearer { - name: "InvalidResourcePolicyException"; - $fault: "client"; - Message?: string; -} - -export namespace InvalidResourcePolicyException { - /** - * @internal - */ - export const filterSensitiveLog = (obj: InvalidResourcePolicyException): any => ({ - ...obj, - }); -} - export interface ListFirewallPoliciesRequest { /** *

              When you request a list of objects with a MaxResults setting, if the number of objects that are still available @@ -2937,7 +3046,7 @@ export namespace UntagResourceResponse { } /** - *

              + *

              Unable to change the resource because your account doesn't own it.

              */ export interface ResourceOwnerCheckException extends __SmithyException, $MetadataBearer { name: "ResourceOwnerCheckException"; @@ -2964,13 +3073,13 @@ export interface UpdateFirewallDeleteProtectionRequest { /** *

              The Amazon Resource Name (ARN) of the firewall.

              - *

              You must specify the ARN or the name, and you can specify both.

              + *

              You must specify the ARN or the name, and you can specify both.

              */ FirewallArn?: string; /** *

              The descriptive name of the firewall. You can't change the name of a firewall after you create it.

              - *

              You must specify the ARN or the name, and you can specify both.

              + *

              You must specify the ARN or the name, and you can specify both.

              */ FirewallName?: string; @@ -3034,13 +3143,13 @@ export interface UpdateFirewallDescriptionRequest { /** *

              The Amazon Resource Name (ARN) of the firewall.

              - *

              You must specify the ARN or the name, and you can specify both.

              + *

              You must specify the ARN or the name, and you can specify both.

              */ FirewallArn?: string; /** *

              The descriptive name of the firewall. You can't change the name of a firewall after you create it.

              - *

              You must specify the ARN or the name, and you can specify both.

              + *

              You must specify the ARN or the name, and you can specify both.

              */ FirewallName?: string; @@ -3102,13 +3211,13 @@ export interface UpdateFirewallPolicyRequest { /** *

              The Amazon Resource Name (ARN) of the firewall policy.

              - *

              You must specify the ARN or the name, and you can specify both.

              + *

              You must specify the ARN or the name, and you can specify both.

              */ FirewallPolicyArn?: string; /** *

              The descriptive name of the firewall policy. You can't change the name of a firewall policy after you create it.

              - *

              You must specify the ARN or the name, and you can specify both.

              + *

              You must specify the ARN or the name, and you can specify both.

              */ FirewallPolicyName?: string; @@ -3174,13 +3283,13 @@ export interface UpdateFirewallPolicyChangeProtectionRequest { /** *

              The Amazon Resource Name (ARN) of the firewall.

              - *

              You must specify the ARN or the name, and you can specify both.

              + *

              You must specify the ARN or the name, and you can specify both.

              */ FirewallArn?: string; /** *

              The descriptive name of the firewall. You can't change the name of a firewall after you create it.

              - *

              You must specify the ARN or the name, and you can specify both.

              + *

              You must specify the ARN or the name, and you can specify both.

              */ FirewallName?: string; @@ -3239,13 +3348,13 @@ export namespace UpdateFirewallPolicyChangeProtectionResponse { export interface UpdateLoggingConfigurationRequest { /** *

              The Amazon Resource Name (ARN) of the firewall.

              - *

              You must specify the ARN or the name, and you can specify both.

              + *

              You must specify the ARN or the name, and you can specify both.

              */ FirewallArn?: string; /** *

              The descriptive name of the firewall. You can't change the name of a firewall after you create it.

              - *

              You must specify the ARN or the name, and you can specify both.

              + *

              You must specify the ARN or the name, and you can specify both.

              */ FirewallName?: string; @@ -3300,13 +3409,13 @@ export interface UpdateRuleGroupRequest { /** *

              The Amazon Resource Name (ARN) of the rule group.

              - *

              You must specify the ARN or the name, and you can specify both.

              + *

              You must specify the ARN or the name, and you can specify both.

              */ RuleGroupArn?: string; /** *

              The descriptive name of the rule group. You can't change the name of a rule group after you create it.

              - *

              You must specify the ARN or the name, and you can specify both.

              + *

              You must specify the ARN or the name, and you can specify both.

              */ RuleGroupName?: string; @@ -3332,7 +3441,7 @@ export interface UpdateRuleGroupRequest { /** *

              Indicates whether the rule group is stateless or stateful. If the rule group is stateless, it contains * stateless rules. If it is stateful, it contains stateful rules.

              - * + * *

              This setting is required for requests that do not include the RuleGroupARN.

              *
              */ @@ -3395,13 +3504,13 @@ export interface UpdateSubnetChangeProtectionRequest { /** *

              The Amazon Resource Name (ARN) of the firewall.

              - *

              You must specify the ARN or the name, and you can specify both.

              + *

              You must specify the ARN or the name, and you can specify both.

              */ FirewallArn?: string; /** *

              The descriptive name of the firewall. You can't change the name of a firewall after you create it.

              - *

              You must specify the ARN or the name, and you can specify both.

              + *

              You must specify the ARN or the name, and you can specify both.

              */ FirewallName?: string; diff --git a/clients/client-network-firewall/src/protocols/Aws_json1_0.ts b/clients/client-network-firewall/src/protocols/Aws_json1_0.ts index 2c3cd4d42b298..6b5c5bc7ad910 100644 --- a/clients/client-network-firewall/src/protocols/Aws_json1_0.ts +++ b/clients/client-network-firewall/src/protocols/Aws_json1_0.ts @@ -169,8 +169,10 @@ import { RulesSource, RulesSourceList, RuleVariables, + StatefulEngineOptions, StatefulRule, StatefulRuleGroupReference, + StatefulRuleOptions, StatelessRule, StatelessRuleGroupReference, StatelessRulesAndCustomActions, @@ -1274,6 +1276,14 @@ const deserializeAws_json1_0DeleteResourcePolicyCommandError = async ( $metadata: deserializeMetadata(output), }; break; + case "InvalidResourcePolicyException": + case "com.amazonaws.networkfirewall#InvalidResourcePolicyException": + response = { + ...(await deserializeAws_json1_0InvalidResourcePolicyExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; case "ResourceNotFoundException": case "com.amazonaws.networkfirewall#ResourceNotFoundException": response = { @@ -3436,6 +3446,14 @@ const serializeAws_json1_0DisassociateSubnetsRequest = ( const serializeAws_json1_0FirewallPolicy = (input: FirewallPolicy, context: __SerdeContext): any => { return { + ...(input.StatefulDefaultActions !== undefined && + input.StatefulDefaultActions !== null && { + StatefulDefaultActions: serializeAws_json1_0StatefulActions(input.StatefulDefaultActions, context), + }), + ...(input.StatefulEngineOptions !== undefined && + input.StatefulEngineOptions !== null && { + StatefulEngineOptions: serializeAws_json1_0StatefulEngineOptions(input.StatefulEngineOptions, context), + }), ...(input.StatefulRuleGroupReferences !== undefined && input.StatefulRuleGroupReferences !== null && { StatefulRuleGroupReferences: serializeAws_json1_0StatefulRuleGroupReferences( @@ -3698,6 +3716,10 @@ const serializeAws_json1_0RuleGroup = (input: RuleGroup, context: __SerdeContext }), ...(input.RulesSource !== undefined && input.RulesSource !== null && { RulesSource: serializeAws_json1_0RulesSource(input.RulesSource, context) }), + ...(input.StatefulRuleOptions !== undefined && + input.StatefulRuleOptions !== null && { + StatefulRuleOptions: serializeAws_json1_0StatefulRuleOptions(input.StatefulRuleOptions, context), + }), }; }; @@ -3783,6 +3805,23 @@ const serializeAws_json1_0Settings = (input: string[], context: __SerdeContext): }); }; +const serializeAws_json1_0StatefulActions = (input: string[], context: __SerdeContext): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + if (entry === null) { + return null as any; + } + return entry; + }); +}; + +const serializeAws_json1_0StatefulEngineOptions = (input: StatefulEngineOptions, context: __SerdeContext): any => { + return { + ...(input.RuleOrder !== undefined && input.RuleOrder !== null && { RuleOrder: input.RuleOrder }), + }; +}; + const serializeAws_json1_0StatefulRule = (input: StatefulRule, context: __SerdeContext): any => { return { ...(input.Action !== undefined && input.Action !== null && { Action: input.Action }), @@ -3798,6 +3837,7 @@ const serializeAws_json1_0StatefulRuleGroupReference = ( context: __SerdeContext ): any => { return { + ...(input.Priority !== undefined && input.Priority !== null && { Priority: input.Priority }), ...(input.ResourceArn !== undefined && input.ResourceArn !== null && { ResourceArn: input.ResourceArn }), }; }; @@ -3816,6 +3856,12 @@ const serializeAws_json1_0StatefulRuleGroupReferences = ( }); }; +const serializeAws_json1_0StatefulRuleOptions = (input: StatefulRuleOptions, context: __SerdeContext): any => { + return { + ...(input.RuleOrder !== undefined && input.RuleOrder !== null && { RuleOrder: input.RuleOrder }), + }; +}; + const serializeAws_json1_0StatefulRules = (input: StatefulRule[], context: __SerdeContext): any => { return input .filter((e: any) => e != null) @@ -4425,6 +4471,14 @@ const deserializeAws_json1_0FirewallPolicies = (output: any, context: __SerdeCon const deserializeAws_json1_0FirewallPolicy = (output: any, context: __SerdeContext): FirewallPolicy => { return { + StatefulDefaultActions: + output.StatefulDefaultActions !== undefined && output.StatefulDefaultActions !== null + ? deserializeAws_json1_0StatefulActions(output.StatefulDefaultActions, context) + : undefined, + StatefulEngineOptions: + output.StatefulEngineOptions !== undefined && output.StatefulEngineOptions !== null + ? deserializeAws_json1_0StatefulEngineOptions(output.StatefulEngineOptions, context) + : undefined, StatefulRuleGroupReferences: output.StatefulRuleGroupReferences !== undefined && output.StatefulRuleGroupReferences !== null ? deserializeAws_json1_0StatefulRuleGroupReferences(output.StatefulRuleGroupReferences, context) @@ -4457,11 +4511,14 @@ const deserializeAws_json1_0FirewallPolicyMetadata = (output: any, context: __Se const deserializeAws_json1_0FirewallPolicyResponse = (output: any, context: __SerdeContext): FirewallPolicyResponse => { return { + ConsumedStatefulRuleCapacity: __expectInt32(output.ConsumedStatefulRuleCapacity), + ConsumedStatelessRuleCapacity: __expectInt32(output.ConsumedStatelessRuleCapacity), Description: __expectString(output.Description), FirewallPolicyArn: __expectString(output.FirewallPolicyArn), FirewallPolicyId: __expectString(output.FirewallPolicyId), FirewallPolicyName: __expectString(output.FirewallPolicyName), FirewallPolicyStatus: __expectString(output.FirewallPolicyStatus), + NumberOfAssociations: __expectInt32(output.NumberOfAssociations), Tags: output.Tags !== undefined && output.Tags !== null ? deserializeAws_json1_0TagList(output.Tags, context) @@ -4829,6 +4886,10 @@ const deserializeAws_json1_0RuleGroup = (output: any, context: __SerdeContext): output.RulesSource !== undefined && output.RulesSource !== null ? deserializeAws_json1_0RulesSource(output.RulesSource, context) : undefined, + StatefulRuleOptions: + output.StatefulRuleOptions !== undefined && output.StatefulRuleOptions !== null + ? deserializeAws_json1_0StatefulRuleOptions(output.StatefulRuleOptions, context) + : undefined, } as any; }; @@ -4842,7 +4903,9 @@ const deserializeAws_json1_0RuleGroupMetadata = (output: any, context: __SerdeCo const deserializeAws_json1_0RuleGroupResponse = (output: any, context: __SerdeContext): RuleGroupResponse => { return { Capacity: __expectInt32(output.Capacity), + ConsumedCapacity: __expectInt32(output.ConsumedCapacity), Description: __expectString(output.Description), + NumberOfAssociations: __expectInt32(output.NumberOfAssociations), RuleGroupArn: __expectString(output.RuleGroupArn), RuleGroupId: __expectString(output.RuleGroupId), RuleGroupName: __expectString(output.RuleGroupName), @@ -4954,6 +5017,23 @@ const deserializeAws_json1_0Settings = (output: any, context: __SerdeContext): s }); }; +const deserializeAws_json1_0StatefulActions = (output: any, context: __SerdeContext): string[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return __expectString(entry) as any; + }); +}; + +const deserializeAws_json1_0StatefulEngineOptions = (output: any, context: __SerdeContext): StatefulEngineOptions => { + return { + RuleOrder: __expectString(output.RuleOrder), + } as any; +}; + const deserializeAws_json1_0StatefulRule = (output: any, context: __SerdeContext): StatefulRule => { return { Action: __expectString(output.Action), @@ -4973,6 +5053,7 @@ const deserializeAws_json1_0StatefulRuleGroupReference = ( context: __SerdeContext ): StatefulRuleGroupReference => { return { + Priority: __expectInt32(output.Priority), ResourceArn: __expectString(output.ResourceArn), } as any; }; @@ -4991,6 +5072,12 @@ const deserializeAws_json1_0StatefulRuleGroupReferences = ( }); }; +const deserializeAws_json1_0StatefulRuleOptions = (output: any, context: __SerdeContext): StatefulRuleOptions => { + return { + RuleOrder: __expectString(output.RuleOrder), + } as any; +}; + const deserializeAws_json1_0StatefulRules = (output: any, context: __SerdeContext): StatefulRule[] => { return (output || []) .filter((e: any) => e != null) diff --git a/clients/client-pinpoint/src/commands/GetEmailTemplateCommand.ts b/clients/client-pinpoint/src/commands/GetEmailTemplateCommand.ts index 767ef4029e093..8da638b33382f 100644 --- a/clients/client-pinpoint/src/commands/GetEmailTemplateCommand.ts +++ b/clients/client-pinpoint/src/commands/GetEmailTemplateCommand.ts @@ -11,7 +11,8 @@ import { SerdeContext as __SerdeContext, } from "@aws-sdk/types"; -import { GetEmailTemplateRequest, GetEmailTemplateResponse } from "../models/models_0"; +import { GetEmailTemplateRequest } from "../models/models_0"; +import { GetEmailTemplateResponse } from "../models/models_1"; import { PinpointClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../PinpointClient"; import { deserializeAws_restJson1GetEmailTemplateCommand, diff --git a/clients/client-pinpoint/src/commands/GetEndpointCommand.ts b/clients/client-pinpoint/src/commands/GetEndpointCommand.ts index 1c23855a10958..b934d8e845361 100644 --- a/clients/client-pinpoint/src/commands/GetEndpointCommand.ts +++ b/clients/client-pinpoint/src/commands/GetEndpointCommand.ts @@ -11,8 +11,7 @@ import { SerdeContext as __SerdeContext, } from "@aws-sdk/types"; -import { GetEndpointRequest } from "../models/models_0"; -import { GetEndpointResponse } from "../models/models_1"; +import { GetEndpointRequest, GetEndpointResponse } from "../models/models_1"; import { PinpointClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../PinpointClient"; import { deserializeAws_restJson1GetEndpointCommand, diff --git a/clients/client-pinpoint/src/models/models_0.ts b/clients/client-pinpoint/src/models/models_0.ts index fdb2dac48adaa..74712ff500a46 100644 --- a/clients/client-pinpoint/src/models/models_0.ts +++ b/clients/client-pinpoint/src/models/models_0.ts @@ -615,6 +615,22 @@ export namespace ConditionalSplitActivity { }); } +export interface ContactCenterActivity { + /** + *

              The unique identifier for the next activity to perform after the this activity.

              + */ + NextActivity?: string; +} + +export namespace ContactCenterActivity { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ContactCenterActivity): any => ({ + ...obj, + }); +} + /** *

              Specifies the message content for a custom channel message that's sent to participants in a journey.

              */ @@ -1059,6 +1075,11 @@ export interface Activity { *

              The settings for a wait activity. This type of activity waits for a certain amount of time or until a specific date and time before moving participants to the next activity in a journey.

              */ Wait?: WaitActivity; + + /** + *

              The settings for a connect activity. This type of activity initiates a contact center call to participants.

              + */ + ContactCenter?: ContactCenterActivity; } export namespace Activity { @@ -4952,6 +4973,30 @@ export namespace CreateJourneyRequest { }); } +/** + *

              The channel-specific configurations for the journey.

              + */ +export interface JourneyChannelSettings { + /** + *

              Amazon Resource Name (ARN) of the Connect Campaign.

              + */ + ConnectCampaignArn?: string; + + /** + *

              IAM role ARN to be assumed when invoking Connect campaign execution APIs for dialing.

              + */ + ConnectCampaignExecutionRoleArn?: string; +} + +export namespace JourneyChannelSettings { + /** + * @internal + */ + export const filterSensitiveLog = (obj: JourneyChannelSettings): any => ({ + ...obj, + }); +} + /** *

              Provides information about the status, configuration, and other settings for a journey.

              */ @@ -5040,6 +5085,11 @@ export interface JourneyResponse { *

              Specifies whether a journey should be refreshed on segment update.

              */ RefreshOnSegmentUpdate?: boolean; + + /** + *

              The channel-specific configurations for the journey.

              + */ + JourneyChannelSettings?: JourneyChannelSettings; } export namespace JourneyResponse { @@ -9101,40 +9151,3 @@ export namespace GetEmailTemplateRequest { ...obj, }); } - -export interface GetEmailTemplateResponse { - /** - *

              Provides information about the content and settings for a message template that can be used in messages that are sent through the email channel.

              - */ - EmailTemplateResponse: EmailTemplateResponse | undefined; -} - -export namespace GetEmailTemplateResponse { - /** - * @internal - */ - export const filterSensitiveLog = (obj: GetEmailTemplateResponse): any => ({ - ...obj, - }); -} - -export interface GetEndpointRequest { - /** - *

              The unique identifier for the application. This identifier is displayed as the Project ID on the Amazon Pinpoint console.

              - */ - ApplicationId: string | undefined; - - /** - *

              The unique identifier for the endpoint.

              - */ - EndpointId: string | undefined; -} - -export namespace GetEndpointRequest { - /** - * @internal - */ - export const filterSensitiveLog = (obj: GetEndpointRequest): any => ({ - ...obj, - }); -} diff --git a/clients/client-pinpoint/src/models/models_1.ts b/clients/client-pinpoint/src/models/models_1.ts index 24c39bfa1316b..493de90620718 100644 --- a/clients/client-pinpoint/src/models/models_1.ts +++ b/clients/client-pinpoint/src/models/models_1.ts @@ -27,6 +27,7 @@ import { EmailChannelRequest, EmailChannelResponse, EmailTemplateRequest, + EmailTemplateResponse, EndpointBatchRequest, EndpointMessageResult, EndpointRequest, @@ -62,6 +63,43 @@ import { WriteSegmentRequest, } from "./models_0"; +export interface GetEmailTemplateResponse { + /** + *

              Provides information about the content and settings for a message template that can be used in messages that are sent through the email channel.

              + */ + EmailTemplateResponse: EmailTemplateResponse | undefined; +} + +export namespace GetEmailTemplateResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetEmailTemplateResponse): any => ({ + ...obj, + }); +} + +export interface GetEndpointRequest { + /** + *

              The unique identifier for the application. This identifier is displayed as the Project ID on the Amazon Pinpoint console.

              + */ + ApplicationId: string | undefined; + + /** + *

              The unique identifier for the endpoint.

              + */ + EndpointId: string | undefined; +} + +export namespace GetEndpointRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetEndpointRequest): any => ({ + ...obj, + }); +} + export interface GetEndpointResponse { /** *

              Provides information about the channel type and other settings for an endpoint.

              diff --git a/clients/client-pinpoint/src/protocols/Aws_restJson1.ts b/clients/client-pinpoint/src/protocols/Aws_restJson1.ts index 6278cec6d7af9..ecdc13daeae5d 100644 --- a/clients/client-pinpoint/src/protocols/Aws_restJson1.ts +++ b/clients/client-pinpoint/src/protocols/Aws_restJson1.ts @@ -299,6 +299,7 @@ import { Condition, ConditionalSplitActivity, ConflictException, + ContactCenterActivity, CreateApplicationRequest, CreateRecommenderConfigurationShape, CreateTemplateMessageBody, @@ -357,6 +358,7 @@ import { InAppTemplateRequest, InternalServerErrorException, ItemResponse, + JourneyChannelSettings, JourneyCustomMessage, JourneyEmailMessage, JourneyLimits, @@ -16474,6 +16476,10 @@ const serializeAws_restJson1Activity = (input: Activity, context: __SerdeContext input.ConditionalSplit !== null && { ConditionalSplit: serializeAws_restJson1ConditionalSplitActivity(input.ConditionalSplit, context), }), + ...(input.ContactCenter !== undefined && + input.ContactCenter !== null && { + ContactCenter: serializeAws_restJson1ContactCenterActivity(input.ContactCenter, context), + }), ...(input.Description !== undefined && input.Description !== null && { Description: input.Description }), ...(input.EMAIL !== undefined && input.EMAIL !== null && { EMAIL: serializeAws_restJson1EmailMessageActivity(input.EMAIL, context) }), @@ -16806,6 +16812,12 @@ const serializeAws_restJson1ConditionalSplitActivity = ( }; }; +const serializeAws_restJson1ContactCenterActivity = (input: ContactCenterActivity, context: __SerdeContext): any => { + return { + ...(input.NextActivity !== undefined && input.NextActivity !== null && { NextActivity: input.NextActivity }), + }; +}; + const serializeAws_restJson1CreateApplicationRequest = ( input: CreateApplicationRequest, context: __SerdeContext @@ -18455,6 +18467,10 @@ const deserializeAws_restJson1Activity = (output: any, context: __SerdeContext): output.ConditionalSplit !== undefined && output.ConditionalSplit !== null ? deserializeAws_restJson1ConditionalSplitActivity(output.ConditionalSplit, context) : undefined, + ContactCenter: + output.ContactCenter !== undefined && output.ContactCenter !== null + ? deserializeAws_restJson1ContactCenterActivity(output.ContactCenter, context) + : undefined, Description: __expectString(output.Description), EMAIL: output.EMAIL !== undefined && output.EMAIL !== null @@ -18962,6 +18978,12 @@ const deserializeAws_restJson1ConditionalSplitActivity = ( } as any; }; +const deserializeAws_restJson1ContactCenterActivity = (output: any, context: __SerdeContext): ContactCenterActivity => { + return { + NextActivity: __expectString(output.NextActivity), + } as any; +}; + const deserializeAws_restJson1CreateTemplateMessageBody = ( output: any, context: __SerdeContext @@ -19543,6 +19565,16 @@ const deserializeAws_restJson1ItemResponse = (output: any, context: __SerdeConte } as any; }; +const deserializeAws_restJson1JourneyChannelSettings = ( + output: any, + context: __SerdeContext +): JourneyChannelSettings => { + return { + ConnectCampaignArn: __expectString(output.ConnectCampaignArn), + ConnectCampaignExecutionRoleArn: __expectString(output.ConnectCampaignExecutionRoleArn), + } as any; +}; + const deserializeAws_restJson1JourneyCustomMessage = (output: any, context: __SerdeContext): JourneyCustomMessage => { return { Data: __expectString(output.Data), @@ -19635,6 +19667,10 @@ const deserializeAws_restJson1JourneyResponse = (output: any, context: __SerdeCo ApplicationId: __expectString(output.ApplicationId), CreationDate: __expectString(output.CreationDate), Id: __expectString(output.Id), + JourneyChannelSettings: + output.JourneyChannelSettings !== undefined && output.JourneyChannelSettings !== null + ? deserializeAws_restJson1JourneyChannelSettings(output.JourneyChannelSettings, context) + : undefined, LastModifiedDate: __expectString(output.LastModifiedDate), Limits: output.Limits !== undefined && output.Limits !== null diff --git a/clients/client-quicksight/src/endpoints.ts b/clients/client-quicksight/src/endpoints.ts index 50466d0a30d31..5c40b1f6976cc 100644 --- a/clients/client-quicksight/src/endpoints.ts +++ b/clients/client-quicksight/src/endpoints.ts @@ -14,6 +14,7 @@ const partitionHash: PartitionHash = { "ap-south-1", "ap-southeast-1", "ap-southeast-2", + "api", "ca-central-1", "eu-central-1", "eu-north-1", @@ -43,7 +44,7 @@ const partitionHash: PartitionHash = { hostname: "quicksight.{region}.sc2s.sgov.gov", }, "aws-us-gov": { - regions: ["us-gov-east-1", "us-gov-west-1"], + regions: ["api", "us-gov-east-1", "us-gov-west-1"], hostname: "quicksight.{region}.amazonaws.com", }, }; diff --git a/clients/client-sesv2/README.md b/clients/client-sesv2/README.md index 51acef0b008a5..c9827aca3c01b 100644 --- a/clients/client-sesv2/README.md +++ b/clients/client-sesv2/README.md @@ -9,25 +9,12 @@ AWS SDK for JavaScript SESv2 Client for Node.js, Browser and React Native. Amazon SES API v2 -

              Welcome to the Amazon SES API v2 Reference. This guide provides information about the Amazon SES API v2, -including supported operations, data types, parameters, and schemas.

              -Amazon SES is an AWS service that +Amazon SES is an Amazon Web Services service that you can use to send email messages to your customers.

              -

              If you're new to Amazon SES API v2, you might find it helpful to also review the Amazon Simple Email Service Developer +

              If you're new to Amazon SES API v2, you might find it helpful to review the Amazon Simple Email Service Developer Guide. The Amazon SES Developer Guide provides information and code samples that demonstrate how to use Amazon SES API v2 features programmatically.

              -

              The Amazon SES API v2 is available in several AWS Regions and it provides an endpoint for each -of these Regions. For a list of all the Regions and endpoints where the API is currently -available, see AWS Service Endpoints in the Amazon Web Services General Reference. To -learn more about AWS Regions, see Managing AWS Regions in the -Amazon Web Services General Reference.

              -

              In each Region, AWS maintains multiple Availability Zones. These Availability Zones -are physically isolated from each other, but are united by private, low-latency, -high-throughput, and highly redundant network connections. These Availability Zones -enable us to provide very high levels of availability and redundancy, while also -minimizing latency. To learn more about the number of Availability Zones that are -available in each Region, see AWS Global Infrastructure.

              ## Installing diff --git a/clients/client-sesv2/src/SESv2.ts b/clients/client-sesv2/src/SESv2.ts index d4d8f1e020457..691796c7eddd8 100644 --- a/clients/client-sesv2/src/SESv2.ts +++ b/clients/client-sesv2/src/SESv2.ts @@ -393,25 +393,13 @@ import { SESv2Client } from "./SESv2Client"; /** * Amazon SES API v2 - *

              Welcome to the Amazon SES API v2 Reference. This guide provides information about the Amazon SES API v2, - * including supported operations, data types, parameters, and schemas.

              + * *

              - * Amazon SES is an AWS service that + * Amazon SES is an Amazon Web Services service that * you can use to send email messages to your customers.

              - *

              If you're new to Amazon SES API v2, you might find it helpful to also review the Amazon Simple Email Service Developer + *

              If you're new to Amazon SES API v2, you might find it helpful to review the Amazon Simple Email Service Developer * Guide. The Amazon SES Developer Guide provides information * and code samples that demonstrate how to use Amazon SES API v2 features programmatically.

              - *

              The Amazon SES API v2 is available in several AWS Regions and it provides an endpoint for each - * of these Regions. For a list of all the Regions and endpoints where the API is currently - * available, see AWS Service Endpoints in the Amazon Web Services General Reference. To - * learn more about AWS Regions, see Managing AWS Regions in the - * Amazon Web Services General Reference.

              - *

              In each Region, AWS maintains multiple Availability Zones. These Availability Zones - * are physically isolated from each other, but are united by private, low-latency, - * high-throughput, and highly redundant network connections. These Availability Zones - * enable us to provide very high levels of availability and redundancy, while also - * minimizing latency. To learn more about the number of Availability Zones that are - * available in each Region, see AWS Global Infrastructure.

              */ export class SESv2 extends SESv2Client { /** @@ -594,7 +582,7 @@ export class SESv2 extends SESv2Client { /** *

              Create a new pool of dedicated IP addresses. A pool can include one or more dedicated - * IP addresses that are associated with your AWS account. You can associate a pool with + * IP addresses that are associated with your Amazon Web Services account. You can associate a pool with * a configuration set. When you send an email that uses that configuration set, the * message is sent from one of the addresses in the associated pool.

              */ @@ -685,7 +673,7 @@ export class SESv2 extends SESv2Client { * (BYODKIM). To use BYODKIM, your call to the CreateEmailIdentity operation * has to include the DkimSigningAttributes object. When you specify this * object, you provide a selector (a component of the DNS record name that identifies the - * public key that you want to use for DKIM authentication) and a private key.

              + * public key to use for DKIM authentication) and a private key.

              *

              When you verify a domain, this operation provides a set of DKIM tokens, which you can * convert into CNAME tokens. You add these CNAME tokens to the DNS configuration for your * domain. Your domain is verified when Amazon SES detects these records in the DNS @@ -767,8 +755,8 @@ export class SESv2 extends SESv2Client { /** *

              Creates an email template. Email templates enable you to send personalized email to - * one or more destinations in a single API operation. For more information, see the Amazon SES - * Developer Guide.

              + * one or more destinations in a single API operation. For more information, see the Amazon SES Developer + * Guide.

              *

              You can execute this operation no more than once per second.

              */ public createEmailTemplate( @@ -975,7 +963,7 @@ export class SESv2 extends SESv2Client { /** *

              Deletes an existing custom verification email template.

              - *

              For more information about custom verification email templates, see Using Custom Verification Email Templates in the Amazon SES Developer + *

              For more information about custom verification email templates, see Using Custom Verification Email Templates in the Amazon SES Developer * Guide.

              *

              You can execute this operation no more than once per second.

              */ @@ -1187,7 +1175,7 @@ export class SESv2 extends SESv2Client { /** *

              Obtain information about the email-sending status and capabilities of your Amazon SES - * account in the current AWS Region.

              + * account in the current Amazon Web Services Region.

              */ public getAccount(args: GetAccountCommandInput, options?: __HttpHandlerOptions): Promise; public getAccount(args: GetAccountCommandInput, cb: (err: any, data?: GetAccountCommandOutput) => void): void; @@ -1452,7 +1440,7 @@ export class SESv2 extends SESv2Client { } /** - *

              List the dedicated IP addresses that are associated with your AWS + *

              List the dedicated IP addresses that are associated with your Amazon Web Services * account.

              */ public getDedicatedIps( @@ -1491,7 +1479,7 @@ export class SESv2 extends SESv2Client { * predictive inbox placement tests.

              * *

              When you use the Deliverability dashboard, you pay a monthly subscription charge, in addition - * to any other fees that you accrue by using Amazon SES and other AWS services. For more + * to any other fees that you accrue by using Amazon SES and other Amazon Web Services services. For more * information about the features and cost of a Deliverability dashboard subscription, see Amazon SES Pricing.

              */ public getDeliverabilityDashboardOptions( @@ -1897,7 +1885,7 @@ export class SESv2 extends SESv2Client { /** *

              Lists the existing custom verification email templates for your account in the current - * AWS Region.

              + * Amazon Web Services Region.

              *

              For more information about custom verification email templates, see Using Custom Verification Email Templates in the Amazon SES Developer * Guide.

              *

              You can execute this operation no more than once per second.

              @@ -1932,7 +1920,7 @@ export class SESv2 extends SESv2Client { } /** - *

              List all of the dedicated IP pools that exist in your AWS account in the current + *

              List all of the dedicated IP pools that exist in your Amazon Web Services account in the current * Region.

              */ public listDedicatedIpPools( @@ -2033,7 +2021,7 @@ export class SESv2 extends SESv2Client { } /** - *

              Returns a list of all of the email identities that are associated with your AWS + *

              Returns a list of all of the email identities that are associated with your Amazon Web Services * account. An identity can be either an email address or a domain. This operation returns * identities that are verified as well as those that aren't. This operation returns * identities that are associated with Amazon SES and Amazon Pinpoint.

              @@ -2068,7 +2056,7 @@ export class SESv2 extends SESv2Client { } /** - *

              Lists the email templates present in your Amazon SES account in the current AWS + *

              Lists the email templates present in your Amazon SES account in the current Amazon Web Services * Region.

              * *

              You can execute this operation no more than once per second.

              @@ -2369,7 +2357,7 @@ export class SESv2 extends SESv2Client { /** *

              Enable or disable collection of reputation metrics for emails that you send using a - * particular configuration set in a specific AWS Region.

              + * particular configuration set in a specific Amazon Web Services Region.

              */ public putConfigurationSetReputationOptions( args: PutConfigurationSetReputationOptionsCommandInput, @@ -2402,7 +2390,7 @@ export class SESv2 extends SESv2Client { /** *

              Enable or disable email sending for messages that use a particular configuration set - * in a specific AWS Region.

              + * in a specific Amazon Web Services Region.

              */ public putConfigurationSetSendingOptions( args: PutConfigurationSetSendingOptionsCommandInput, @@ -2504,7 +2492,7 @@ export class SESv2 extends SESv2Client { *

              Move a dedicated IP address to an existing dedicated IP pool.

              * *

              The dedicated IP address that you specify must already exist, and must be - * associated with your AWS account. + * associated with your Amazon Web Services account. * *

              *

              The dedicated IP pool you specify must already exist. You can create a new pool by @@ -2579,7 +2567,7 @@ export class SESv2 extends SESv2Client { * send email. You also gain the ability to perform predictive inbox placement tests.

              * *

              When you use the Deliverability dashboard, you pay a monthly subscription charge, in addition - * to any other fees that you accrue by using Amazon SES and other AWS services. For more + * to any other fees that you accrue by using Amazon SES and other Amazon Web Services services. For more * information about the features and cost of a Deliverability dashboard subscription, see Amazon SES Pricing.

              */ public putDeliverabilityDashboardOption( @@ -2686,6 +2674,9 @@ export class SESv2 extends SESv2Client { * (BYODKIM).

              *
            • *
            • + *

              Update the key length that should be used for Easy DKIM.

              + *
            • + *
            • *

              Change from using no DKIM authentication to using Easy DKIM.

              *
            • *
            • @@ -2870,7 +2861,7 @@ export class SESv2 extends SESv2Client { /** *

              Adds an email address to the list of identities for your Amazon SES account in the current - * AWS Region and attempts to verify it. As a result of executing this operation, a + * Amazon Web Services Region and attempts to verify it. As a result of executing this operation, a * customized verification email is sent to the specified address.

              *

              To use this operation, you must first create a custom verification email template. For * more information about creating and using custom verification email templates, see @@ -2908,7 +2899,7 @@ export class SESv2 extends SESv2Client { } /** - *

              Sends an email message. You can use the Amazon SES API v2 to send two types of + *

              Sends an email message. You can use the Amazon SES API v2 to send the following types of * messages:

              *
                *
              • @@ -3246,8 +3237,8 @@ export class SESv2 extends SESv2Client { /** *

                Updates an email template. Email templates enable you to send personalized email to - * one or more destinations in a single API operation. For more information, see the Amazon SES - * Developer Guide.

                + * one or more destinations in a single API operation. For more information, see the Amazon SES Developer + * Guide.

                *

                You can execute this operation no more than once per second.

                */ public updateEmailTemplate( diff --git a/clients/client-sesv2/src/SESv2Client.ts b/clients/client-sesv2/src/SESv2Client.ts index d3eebd371659e..ef5128364138c 100644 --- a/clients/client-sesv2/src/SESv2Client.ts +++ b/clients/client-sesv2/src/SESv2Client.ts @@ -609,25 +609,13 @@ export interface SESv2ClientResolvedConfig extends SESv2ClientResolvedConfigType /** * Amazon SES API v2 - *

                Welcome to the Amazon SES API v2 Reference. This guide provides information about the Amazon SES API v2, - * including supported operations, data types, parameters, and schemas.

                + * *

                - * Amazon SES is an AWS service that + * Amazon SES is an Amazon Web Services service that * you can use to send email messages to your customers.

                - *

                If you're new to Amazon SES API v2, you might find it helpful to also review the Amazon Simple Email Service Developer + *

                If you're new to Amazon SES API v2, you might find it helpful to review the Amazon Simple Email Service Developer * Guide. The Amazon SES Developer Guide provides information * and code samples that demonstrate how to use Amazon SES API v2 features programmatically.

                - *

                The Amazon SES API v2 is available in several AWS Regions and it provides an endpoint for each - * of these Regions. For a list of all the Regions and endpoints where the API is currently - * available, see AWS Service Endpoints in the Amazon Web Services General Reference. To - * learn more about AWS Regions, see Managing AWS Regions in the - * Amazon Web Services General Reference.

                - *

                In each Region, AWS maintains multiple Availability Zones. These Availability Zones - * are physically isolated from each other, but are united by private, low-latency, - * high-throughput, and highly redundant network connections. These Availability Zones - * enable us to provide very high levels of availability and redundancy, while also - * minimizing latency. To learn more about the number of Availability Zones that are - * available in each Region, see AWS Global Infrastructure.

                */ export class SESv2Client extends __Client< __HttpHandlerOptions, diff --git a/clients/client-sesv2/src/commands/CreateDedicatedIpPoolCommand.ts b/clients/client-sesv2/src/commands/CreateDedicatedIpPoolCommand.ts index cb4c732993c18..dfd6c65867abd 100644 --- a/clients/client-sesv2/src/commands/CreateDedicatedIpPoolCommand.ts +++ b/clients/client-sesv2/src/commands/CreateDedicatedIpPoolCommand.ts @@ -23,7 +23,7 @@ export interface CreateDedicatedIpPoolCommandOutput extends CreateDedicatedIpPoo /** *

                Create a new pool of dedicated IP addresses. A pool can include one or more dedicated - * IP addresses that are associated with your AWS account. You can associate a pool with + * IP addresses that are associated with your Amazon Web Services account. You can associate a pool with * a configuration set. When you send an email that uses that configuration set, the * message is sent from one of the addresses in the associated pool.

                * @example diff --git a/clients/client-sesv2/src/commands/CreateEmailIdentityCommand.ts b/clients/client-sesv2/src/commands/CreateEmailIdentityCommand.ts index f5950545187dc..9a536a94126f9 100644 --- a/clients/client-sesv2/src/commands/CreateEmailIdentityCommand.ts +++ b/clients/client-sesv2/src/commands/CreateEmailIdentityCommand.ts @@ -41,7 +41,7 @@ export interface CreateEmailIdentityCommandOutput extends CreateEmailIdentityRes * (BYODKIM). To use BYODKIM, your call to the CreateEmailIdentity operation * has to include the DkimSigningAttributes object. When you specify this * object, you provide a selector (a component of the DNS record name that identifies the - * public key that you want to use for DKIM authentication) and a private key.

                + * public key to use for DKIM authentication) and a private key.

                *

                When you verify a domain, this operation provides a set of DKIM tokens, which you can * convert into CNAME tokens. You add these CNAME tokens to the DNS configuration for your * domain. Your domain is verified when Amazon SES detects these records in the DNS diff --git a/clients/client-sesv2/src/commands/CreateEmailTemplateCommand.ts b/clients/client-sesv2/src/commands/CreateEmailTemplateCommand.ts index e672b9bd862c9..bc050509bb282 100644 --- a/clients/client-sesv2/src/commands/CreateEmailTemplateCommand.ts +++ b/clients/client-sesv2/src/commands/CreateEmailTemplateCommand.ts @@ -23,8 +23,8 @@ export interface CreateEmailTemplateCommandOutput extends CreateEmailTemplateRes /** *

                Creates an email template. Email templates enable you to send personalized email to - * one or more destinations in a single API operation. For more information, see the Amazon SES - * Developer Guide.

                + * one or more destinations in a single API operation. For more information, see the Amazon SES Developer + * Guide.

                *

                You can execute this operation no more than once per second.

                * @example * Use a bare-bones client and the command you need to make an API call. diff --git a/clients/client-sesv2/src/commands/DeleteCustomVerificationEmailTemplateCommand.ts b/clients/client-sesv2/src/commands/DeleteCustomVerificationEmailTemplateCommand.ts index 7a73e7fd218b3..dfaa49d67dd44 100644 --- a/clients/client-sesv2/src/commands/DeleteCustomVerificationEmailTemplateCommand.ts +++ b/clients/client-sesv2/src/commands/DeleteCustomVerificationEmailTemplateCommand.ts @@ -29,7 +29,7 @@ export interface DeleteCustomVerificationEmailTemplateCommandOutput /** *

                Deletes an existing custom verification email template.

                - *

                For more information about custom verification email templates, see Using Custom Verification Email Templates in the Amazon SES Developer + *

                For more information about custom verification email templates, see Using Custom Verification Email Templates in the Amazon SES Developer * Guide.

                *

                You can execute this operation no more than once per second.

                * @example diff --git a/clients/client-sesv2/src/commands/GetAccountCommand.ts b/clients/client-sesv2/src/commands/GetAccountCommand.ts index c2e42fab2b009..c3e16b4046aad 100644 --- a/clients/client-sesv2/src/commands/GetAccountCommand.ts +++ b/clients/client-sesv2/src/commands/GetAccountCommand.ts @@ -23,7 +23,7 @@ export interface GetAccountCommandOutput extends GetAccountResponse, __MetadataB /** *

                Obtain information about the email-sending status and capabilities of your Amazon SES - * account in the current AWS Region.

                + * account in the current Amazon Web Services Region.

                * @example * Use a bare-bones client and the command you need to make an API call. * ```javascript diff --git a/clients/client-sesv2/src/commands/GetDedicatedIpsCommand.ts b/clients/client-sesv2/src/commands/GetDedicatedIpsCommand.ts index 2f0c01e69b3df..23e2ace7ebb74 100644 --- a/clients/client-sesv2/src/commands/GetDedicatedIpsCommand.ts +++ b/clients/client-sesv2/src/commands/GetDedicatedIpsCommand.ts @@ -22,7 +22,7 @@ export interface GetDedicatedIpsCommandInput extends GetDedicatedIpsRequest {} export interface GetDedicatedIpsCommandOutput extends GetDedicatedIpsResponse, __MetadataBearer {} /** - *

                List the dedicated IP addresses that are associated with your AWS + *

                List the dedicated IP addresses that are associated with your Amazon Web Services * account.

                * @example * Use a bare-bones client and the command you need to make an API call. diff --git a/clients/client-sesv2/src/commands/GetDeliverabilityDashboardOptionsCommand.ts b/clients/client-sesv2/src/commands/GetDeliverabilityDashboardOptionsCommand.ts index 0b88c8fa302d1..bb69893341d46 100644 --- a/clients/client-sesv2/src/commands/GetDeliverabilityDashboardOptionsCommand.ts +++ b/clients/client-sesv2/src/commands/GetDeliverabilityDashboardOptionsCommand.ts @@ -33,7 +33,7 @@ export interface GetDeliverabilityDashboardOptionsCommandOutput * predictive inbox placement tests.

                * *

                When you use the Deliverability dashboard, you pay a monthly subscription charge, in addition - * to any other fees that you accrue by using Amazon SES and other AWS services. For more + * to any other fees that you accrue by using Amazon SES and other Amazon Web Services services. For more * information about the features and cost of a Deliverability dashboard subscription, see Amazon SES Pricing.

                * @example * Use a bare-bones client and the command you need to make an API call. diff --git a/clients/client-sesv2/src/commands/ListCustomVerificationEmailTemplatesCommand.ts b/clients/client-sesv2/src/commands/ListCustomVerificationEmailTemplatesCommand.ts index 208eed6eade85..131f34718006e 100644 --- a/clients/client-sesv2/src/commands/ListCustomVerificationEmailTemplatesCommand.ts +++ b/clients/client-sesv2/src/commands/ListCustomVerificationEmailTemplatesCommand.ts @@ -28,7 +28,7 @@ export interface ListCustomVerificationEmailTemplatesCommandOutput /** *

                Lists the existing custom verification email templates for your account in the current - * AWS Region.

                + * Amazon Web Services Region.

                *

                For more information about custom verification email templates, see Using Custom Verification Email Templates in the Amazon SES Developer * Guide.

                *

                You can execute this operation no more than once per second.

                diff --git a/clients/client-sesv2/src/commands/ListDedicatedIpPoolsCommand.ts b/clients/client-sesv2/src/commands/ListDedicatedIpPoolsCommand.ts index b7381d0692031..9c776dd9e77b9 100644 --- a/clients/client-sesv2/src/commands/ListDedicatedIpPoolsCommand.ts +++ b/clients/client-sesv2/src/commands/ListDedicatedIpPoolsCommand.ts @@ -22,7 +22,7 @@ export interface ListDedicatedIpPoolsCommandInput extends ListDedicatedIpPoolsRe export interface ListDedicatedIpPoolsCommandOutput extends ListDedicatedIpPoolsResponse, __MetadataBearer {} /** - *

                List all of the dedicated IP pools that exist in your AWS account in the current + *

                List all of the dedicated IP pools that exist in your Amazon Web Services account in the current * Region.

                * @example * Use a bare-bones client and the command you need to make an API call. diff --git a/clients/client-sesv2/src/commands/ListEmailIdentitiesCommand.ts b/clients/client-sesv2/src/commands/ListEmailIdentitiesCommand.ts index fc0fa8699fcd6..f566c2dc7ea26 100644 --- a/clients/client-sesv2/src/commands/ListEmailIdentitiesCommand.ts +++ b/clients/client-sesv2/src/commands/ListEmailIdentitiesCommand.ts @@ -22,7 +22,7 @@ export interface ListEmailIdentitiesCommandInput extends ListEmailIdentitiesRequ export interface ListEmailIdentitiesCommandOutput extends ListEmailIdentitiesResponse, __MetadataBearer {} /** - *

                Returns a list of all of the email identities that are associated with your AWS + *

                Returns a list of all of the email identities that are associated with your Amazon Web Services * account. An identity can be either an email address or a domain. This operation returns * identities that are verified as well as those that aren't. This operation returns * identities that are associated with Amazon SES and Amazon Pinpoint.

                diff --git a/clients/client-sesv2/src/commands/ListEmailTemplatesCommand.ts b/clients/client-sesv2/src/commands/ListEmailTemplatesCommand.ts index 4f9177b5f72cd..43b72ece91131 100644 --- a/clients/client-sesv2/src/commands/ListEmailTemplatesCommand.ts +++ b/clients/client-sesv2/src/commands/ListEmailTemplatesCommand.ts @@ -22,7 +22,7 @@ export interface ListEmailTemplatesCommandInput extends ListEmailTemplatesReques export interface ListEmailTemplatesCommandOutput extends ListEmailTemplatesResponse, __MetadataBearer {} /** - *

                Lists the email templates present in your Amazon SES account in the current AWS + *

                Lists the email templates present in your Amazon SES account in the current Amazon Web Services * Region.

                * *

                You can execute this operation no more than once per second.

                diff --git a/clients/client-sesv2/src/commands/PutConfigurationSetReputationOptionsCommand.ts b/clients/client-sesv2/src/commands/PutConfigurationSetReputationOptionsCommand.ts index 2280b985d527c..9071fbbef84b9 100644 --- a/clients/client-sesv2/src/commands/PutConfigurationSetReputationOptionsCommand.ts +++ b/clients/client-sesv2/src/commands/PutConfigurationSetReputationOptionsCommand.ts @@ -28,7 +28,7 @@ export interface PutConfigurationSetReputationOptionsCommandOutput /** *

                Enable or disable collection of reputation metrics for emails that you send using a - * particular configuration set in a specific AWS Region.

                + * particular configuration set in a specific Amazon Web Services Region.

                * @example * Use a bare-bones client and the command you need to make an API call. * ```javascript diff --git a/clients/client-sesv2/src/commands/PutConfigurationSetSendingOptionsCommand.ts b/clients/client-sesv2/src/commands/PutConfigurationSetSendingOptionsCommand.ts index d9e11bd273c28..eb2e7df8be0dc 100644 --- a/clients/client-sesv2/src/commands/PutConfigurationSetSendingOptionsCommand.ts +++ b/clients/client-sesv2/src/commands/PutConfigurationSetSendingOptionsCommand.ts @@ -28,7 +28,7 @@ export interface PutConfigurationSetSendingOptionsCommandOutput /** *

                Enable or disable email sending for messages that use a particular configuration set - * in a specific AWS Region.

                + * in a specific Amazon Web Services Region.

                * @example * Use a bare-bones client and the command you need to make an API call. * ```javascript diff --git a/clients/client-sesv2/src/commands/PutDedicatedIpInPoolCommand.ts b/clients/client-sesv2/src/commands/PutDedicatedIpInPoolCommand.ts index 7bca0cc4b2549..d6908fcf1ea04 100644 --- a/clients/client-sesv2/src/commands/PutDedicatedIpInPoolCommand.ts +++ b/clients/client-sesv2/src/commands/PutDedicatedIpInPoolCommand.ts @@ -25,7 +25,7 @@ export interface PutDedicatedIpInPoolCommandOutput extends PutDedicatedIpInPoolR *

                Move a dedicated IP address to an existing dedicated IP pool.

                * *

                The dedicated IP address that you specify must already exist, and must be - * associated with your AWS account. + * associated with your Amazon Web Services account. * *

                *

                The dedicated IP pool you specify must already exist. You can create a new pool by diff --git a/clients/client-sesv2/src/commands/PutDeliverabilityDashboardOptionCommand.ts b/clients/client-sesv2/src/commands/PutDeliverabilityDashboardOptionCommand.ts index 5b4521dabd178..88a0c3e721afc 100644 --- a/clients/client-sesv2/src/commands/PutDeliverabilityDashboardOptionCommand.ts +++ b/clients/client-sesv2/src/commands/PutDeliverabilityDashboardOptionCommand.ts @@ -29,7 +29,7 @@ export interface PutDeliverabilityDashboardOptionCommandOutput * send email. You also gain the ability to perform predictive inbox placement tests.

                * *

                When you use the Deliverability dashboard, you pay a monthly subscription charge, in addition - * to any other fees that you accrue by using Amazon SES and other AWS services. For more + * to any other fees that you accrue by using Amazon SES and other Amazon Web Services services. For more * information about the features and cost of a Deliverability dashboard subscription, see Amazon SES Pricing.

                * @example * Use a bare-bones client and the command you need to make an API call. diff --git a/clients/client-sesv2/src/commands/PutEmailIdentityDkimSigningAttributesCommand.ts b/clients/client-sesv2/src/commands/PutEmailIdentityDkimSigningAttributesCommand.ts index f48f6851d3f49..cc96485eff77f 100644 --- a/clients/client-sesv2/src/commands/PutEmailIdentityDkimSigningAttributesCommand.ts +++ b/clients/client-sesv2/src/commands/PutEmailIdentityDkimSigningAttributesCommand.ts @@ -36,6 +36,9 @@ export interface PutEmailIdentityDkimSigningAttributesCommandOutput * (BYODKIM).

                *
              • *
              • + *

                Update the key length that should be used for Easy DKIM.

                + *
              • + *
              • *

                Change from using no DKIM authentication to using Easy DKIM.

                *
              • *
              • diff --git a/clients/client-sesv2/src/commands/SendCustomVerificationEmailCommand.ts b/clients/client-sesv2/src/commands/SendCustomVerificationEmailCommand.ts index 12ca6c9c75711..694d840cb46b4 100644 --- a/clients/client-sesv2/src/commands/SendCustomVerificationEmailCommand.ts +++ b/clients/client-sesv2/src/commands/SendCustomVerificationEmailCommand.ts @@ -25,7 +25,7 @@ export interface SendCustomVerificationEmailCommandOutput /** *

                Adds an email address to the list of identities for your Amazon SES account in the current - * AWS Region and attempts to verify it. As a result of executing this operation, a + * Amazon Web Services Region and attempts to verify it. As a result of executing this operation, a * customized verification email is sent to the specified address.

                *

                To use this operation, you must first create a custom verification email template. For * more information about creating and using custom verification email templates, see diff --git a/clients/client-sesv2/src/commands/SendEmailCommand.ts b/clients/client-sesv2/src/commands/SendEmailCommand.ts index 482f69a62083f..f4df7d81226bf 100644 --- a/clients/client-sesv2/src/commands/SendEmailCommand.ts +++ b/clients/client-sesv2/src/commands/SendEmailCommand.ts @@ -22,7 +22,7 @@ export interface SendEmailCommandInput extends SendEmailRequest {} export interface SendEmailCommandOutput extends SendEmailResponse, __MetadataBearer {} /** - *

                Sends an email message. You can use the Amazon SES API v2 to send two types of + *

                Sends an email message. You can use the Amazon SES API v2 to send the following types of * messages:

                *
                  *
                • diff --git a/clients/client-sesv2/src/commands/UpdateEmailTemplateCommand.ts b/clients/client-sesv2/src/commands/UpdateEmailTemplateCommand.ts index 4edc8e1ebadb8..737d32e95b7fd 100644 --- a/clients/client-sesv2/src/commands/UpdateEmailTemplateCommand.ts +++ b/clients/client-sesv2/src/commands/UpdateEmailTemplateCommand.ts @@ -23,8 +23,8 @@ export interface UpdateEmailTemplateCommandOutput extends UpdateEmailTemplateRes /** *

                  Updates an email template. Email templates enable you to send personalized email to - * one or more destinations in a single API operation. For more information, see the Amazon SES - * Developer Guide.

                  + * one or more destinations in a single API operation. For more information, see the Amazon SES Developer + * Guide.

                  *

                  You can execute this operation no more than once per second.

                  * @example * Use a bare-bones client and the command you need to make an API call. diff --git a/clients/client-sesv2/src/models/models_0.ts b/clients/client-sesv2/src/models/models_0.ts index 369789b232efe..a440f00fc6280 100644 --- a/clients/client-sesv2/src/models/models_0.ts +++ b/clients/client-sesv2/src/models/models_0.ts @@ -333,6 +333,14 @@ export namespace BulkEmailContent { /** *

                  An object that describes the recipients for an email.

                  + * + *

                  Amazon SES does not support the SMTPUTF8 extension, as described in RFC6531. For this reason, the + * local part of a destination email address (the part of the + * email address that precedes the @ sign) may only contain 7-bit ASCII + * characters. If the domain part of an address (the + * part after the @ sign) contains non-ASCII characters, they must be encoded using + * Punycode, as described in RFC3492.

                  + *
                  */ export interface Destination { /** @@ -628,12 +636,11 @@ export interface CloudWatchDimensionConfiguration { DimensionName: string | undefined; /** - *

                  The location where the Amazon SES API v2 finds the value of a dimension to publish to Amazon CloudWatch. If - * you want to use the message tags that you specify using an - * X-SES-MESSAGE-TAGS header or a parameter to the SendEmail - * or SendRawEmail API, choose messageTag. If you want to use - * your own email headers, choose emailHeader. If you want to use link tags, - * choose linkTags.

                  + *

                  The location where the Amazon SES API v2 finds the value of a dimension to publish to Amazon CloudWatch. To + * use the message tags that you specify using an X-SES-MESSAGE-TAGS header or + * a parameter to the SendEmail or SendRawEmail API, choose + * messageTag. To use your own email headers, choose + * emailHeader. To use link tags, choose linkTags.

                  */ DimensionValueSource: DimensionValueSource | string | undefined; @@ -830,8 +837,8 @@ export interface ContactListDestination { ContactListName: string | undefined; /** - *

                  >The type of action that you want to perform on the addresses. Acceptable - * values:

                  + *

                  >The type of action to perform on the addresses. The following are the + * possible values:

                  *
                    *
                  • *

                    PUT: add the addresses to the contact list. If the record already exists, it @@ -872,8 +879,7 @@ export interface DeliveryOptions { TlsPolicy?: TlsPolicy | string; /** - *

                    The name of the dedicated IP pool that you want to associate with the configuration - * set.

                    + *

                    The name of the dedicated IP pool to associate with the configuration set.

                    */ SendingPoolName?: string; } @@ -889,7 +895,7 @@ export namespace DeliveryOptions { /** *

                    Enable or disable collection of reputation metrics for emails that you send using this - * configuration set in the current AWS Region.

                    + * configuration set in the current Amazon Web Services Region.

                    */ export interface ReputationOptions { /** @@ -918,7 +924,7 @@ export namespace ReputationOptions { /** *

                    Used to enable or disable email sending for messages that use this configuration set - * in the current AWS Region.

                    + * in the current Amazon Web Services Region.

                    */ export interface SendingOptions { /** @@ -1000,16 +1006,16 @@ export namespace SuppressionOptions { * one value.

                    *
                  • *
                  • - *

                    The aws: prefix is reserved for use by AWS; you can’t use it in + *

                    The aws: prefix is reserved for use by Amazon Web Services; you can’t use it in * any tag keys or values that you define. In addition, you can't edit or remove * tag keys or values that use this prefix. Tags that use this prefix don’t count * against the limit of 50 tags per resource.

                    *
                  • *
                  • *

                    You can associate tags with public or shared resources, but the tags are - * available only for your AWS account, not any other accounts that share the + * available only for your Amazon Web Services account, not any other accounts that share the * resource. In addition, the tags are available only for resources that are - * located in the specified AWS Region for your AWS account.

                    + * located in the specified Amazon Web Services Region for your Amazon Web Services account.

                    *
                  • *
                  */ @@ -1043,13 +1049,13 @@ export namespace Tag { * Amazon SES API v2 to send an email, it contains an invisible image that's used to track when * recipients open your email. If your email contains links, those links are changed * slightly in order to track when recipients click them.

                  - *

                  These images and links include references to a domain operated by AWS. You can + *

                  These images and links include references to a domain operated by Amazon Web Services. You can * optionally configure the Amazon SES to use a domain that you operate for these images and * links.

                  */ export interface TrackingOptions { /** - *

                  The domain that you want to use for tracking open and click events.

                  + *

                  The domain to use for tracking open and click events.

                  */ CustomRedirectDomain: string | undefined; } @@ -1068,7 +1074,8 @@ export namespace TrackingOptions { */ export interface CreateConfigurationSetRequest { /** - *

                  The name of the configuration set.

                  + *

                  The name of the configuration set. The name can contain up to 64 alphanumeric + * characters, including letters, numbers, hyphens (-) and underscores (_) only.

                  */ ConfigurationSetName: string | undefined; @@ -1097,8 +1104,8 @@ export interface CreateConfigurationSetRequest { SendingOptions?: SendingOptions; /** - *

                  An array of objects that define the tags (keys and values) that you want to associate - * with the configuration set.

                  + *

                  An array of objects that define the tags (keys and values) to associate with the + * configuration set.

                  */ Tags?: Tag[]; @@ -1235,8 +1242,7 @@ export enum EventType { */ export interface PinpointDestination { /** - *

                  The Amazon Resource Name (ARN) of the Amazon Pinpoint project that you want to send email - * events to.

                  + *

                  The Amazon Resource Name (ARN) of the Amazon Pinpoint project to send email events to.

                  */ ApplicationArn?: string; } @@ -1256,9 +1262,8 @@ export namespace PinpointDestination { */ export interface SnsDestination { /** - *

                  The Amazon Resource Name (ARN) of the Amazon SNS topic that you want to publish email - * events to. For more information about Amazon SNS topics, see the Amazon SNS Developer - * Guide.

                  + *

                  The Amazon Resource Name (ARN) of the Amazon SNS topic to publish email events to. For + * more information about Amazon SNS topics, see the Amazon SNS Developer Guide.

                  */ TopicArn: string | undefined; } @@ -1335,7 +1340,7 @@ export namespace EventDestinationDefinition { */ export interface CreateConfigurationSetEventDestinationRequest { /** - *

                  The name of the configuration set that you want to add an event destination to.

                  + *

                  The name of the configuration set .

                  */ ConfigurationSetName: string | undefined; @@ -1870,23 +1875,32 @@ export namespace SendingPausedException { }); } +export enum DkimSigningKeyLength { + RSA_1024_BIT = "RSA_1024_BIT", + RSA_2048_BIT = "RSA_2048_BIT", +} + /** - *

                  An object that contains information about the tokens used for setting up Bring Your - * Own DKIM (BYODKIM).

                  + *

                  An object that contains configuration for Bring Your Own DKIM (BYODKIM), or, for Easy DKIM

                  */ export interface DkimSigningAttributes { /** - *

                  A string that's used to identify a public key in the DNS configuration for a + *

                  [Bring Your Own DKIM] A string that's used to identify a public key in the DNS configuration for a * domain.

                  */ - DomainSigningSelector: string | undefined; + DomainSigningSelector?: string; + + /** + *

                  [Bring Your Own DKIM] A private key that's used to generate a DKIM signature.

                  + *

                  The private key must use 1024 or 2048-bit RSA encryption, and must be encoded using + * base64 encoding.

                  + */ + DomainSigningPrivateKey?: string; /** - *

                  A private key that's used to generate a DKIM signature.

                  - *

                  The private key must use 1024-bit RSA encryption, and must be encoded using base64 - * encoding.

                  + *

                  [Easy DKIM] The key length of the future DKIM key pair to be generated. This can be changed at most once per day.

                  */ - DomainSigningPrivateKey: string | undefined; + NextSigningKeyLength?: DkimSigningKeyLength | string; } export namespace DkimSigningAttributes { @@ -1905,30 +1919,28 @@ export namespace DkimSigningAttributes { */ export interface CreateEmailIdentityRequest { /** - *

                  The email address or domain that you want to verify.

                  + *

                  The email address or domain to verify.

                  */ EmailIdentity: string | undefined; /** - *

                  An array of objects that define the tags (keys and values) that you want to associate - * with the email identity.

                  + *

                  An array of objects that define the tags (keys and values) to associate with the email + * identity.

                  */ Tags?: Tag[]; /** *

                  If your request includes this object, Amazon SES configures the identity to use Bring Your - * Own DKIM (BYODKIM) for DKIM authentication purposes, as opposed to the default method, - * Easy - * DKIM.

                  + * Own DKIM (BYODKIM) for DKIM authentication purposes, or, configures the key length to be used for + * Easy DKIM.

                  *

                  You can only specify this object if the email identity is a domain, as opposed to an * address.

                  */ DkimSigningAttributes?: DkimSigningAttributes; /** - *

                  The configuration set to use by default when sending from this identity. - * Note that any configuration set defined in the email sending request takes precedence. - *

                  + *

                  The configuration set to use by default when sending from this identity. Note that any + * configuration set defined in the email sending request takes precedence.

                  */ ConfigurationSetName?: string; } @@ -2026,7 +2038,7 @@ export interface DkimAttributes { Tokens?: string[]; /** - *

                  A string that indicates how DKIM was configured for the identity. There are two + *

                  A string that indicates how DKIM was configured for the identity. These are the * possible values:

                  *
                    *
                  • @@ -2042,6 +2054,21 @@ export interface DkimAttributes { *
                  */ SigningAttributesOrigin?: DkimSigningAttributesOrigin | string; + + /** + *

                  [Easy DKIM] The key length of the future DKIM key pair to be generated. This can be changed at most once per day.

                  + */ + NextSigningKeyLength?: DkimSigningKeyLength | string; + + /** + *

                  [Easy DKIM] The key length of the DKIM key pair in use.

                  + */ + CurrentSigningKeyLength?: DkimSigningKeyLength | string; + + /** + *

                  [Easy DKIM] The last time a key pair was generated for this identity.

                  + */ + LastKeyGenerationTimestamp?: Date; } export namespace DkimAttributes { @@ -2066,7 +2093,8 @@ export enum IdentityType { */ export interface CreateEmailIdentityResponse { /** - *

                  The email identity type.

                  + *

                  The email identity type. Note: the MANAGED_DOMAIN identity type is not + * supported.

                  */ IdentityType?: IdentityType | string; @@ -2099,7 +2127,7 @@ export namespace CreateEmailIdentityResponse { */ export interface CreateEmailIdentityPolicyRequest { /** - *

                  The email identity for which you want to create a policy.

                  + *

                  The email identity.

                  */ EmailIdentity: string | undefined; @@ -2180,7 +2208,7 @@ export namespace EmailTemplateContent { */ export interface CreateEmailTemplateRequest { /** - *

                  The name of the template you want to create.

                  + *

                  The name of the template.

                  */ TemplateName: string | undefined; @@ -2255,7 +2283,7 @@ export enum SuppressionListImportAction { */ export interface SuppressionListDestination { /** - *

                  The type of action that you want to perform on the address. Acceptable values:

                  + *

                  The type of action to perform on the address. The following are possible values:

                  *
                    *
                  • *

                    PUT: add the addresses to the suppression list. If the record already exists, @@ -2565,7 +2593,7 @@ export namespace DedicatedIp { */ export interface DeleteConfigurationSetRequest { /** - *

                    The name of the configuration set that you want to delete.

                    + *

                    The name of the configuration set.

                    */ ConfigurationSetName: string | undefined; } @@ -2599,13 +2627,13 @@ export namespace DeleteConfigurationSetResponse { */ export interface DeleteConfigurationSetEventDestinationRequest { /** - *

                    The name of the configuration set that contains the event destination that you want to + *

                    The name of the configuration set that contains the event destination to * delete.

                    */ ConfigurationSetName: string | undefined; /** - *

                    The name of the event destination that you want to delete.

                    + *

                    The name of the event destination to delete.

                    */ EventDestinationName: string | undefined; } @@ -2768,7 +2796,7 @@ export namespace DeleteDedicatedIpPoolResponse { */ export interface DeleteEmailIdentityRequest { /** - *

                    The identity (that is, the email address or domain) that you want to delete.

                    + *

                    The identity (that is, the email address or domain) to delete.

                    */ EmailIdentity: string | undefined; } @@ -2804,7 +2832,7 @@ export namespace DeleteEmailIdentityResponse { */ export interface DeleteEmailIdentityPolicyRequest { /** - *

                    The email identity for which you want to delete a policy.

                    + *

                    The email identity.

                    */ EmailIdentity: string | undefined; @@ -3066,7 +3094,7 @@ export namespace DomainDeliverabilityCampaign { /** *

                    An object that contains information about the inbox placement data settings for a - * verified domain that’s associated with your AWS account. This data is available only + * verified domain that’s associated with your Amazon Web Services account. This data is available only * if you enabled the Deliverability dashboard for the domain.

                    */ export interface InboxPlacementTrackingOption { @@ -3099,7 +3127,7 @@ export namespace InboxPlacementTrackingOption { */ export interface DomainDeliverabilityTrackingOption { /** - *

                    A verified domain that’s associated with your AWS account and currently has an + *

                    A verified domain that’s associated with your Amazon Web Services account and currently has an * active Deliverability dashboard subscription.

                    */ Domain?: string; @@ -3152,10 +3180,10 @@ export namespace EmailTemplateMetadata { /** *

                    In the Amazon SES API v2, events include message sends, deliveries, opens, - * clicks, bounces, complaints and delivery delays. Event destinations are places that - * you can send information about these events to. For example, you can send event data to - * Amazon SNS to receive notifications when you receive bounces or complaints, or you can use - * Amazon Kinesis Data Firehose to stream data to Amazon S3 for long-term storage.

                    + * clicks, bounces, complaints and delivery delays. Event destinations + * are places that you can send information about these events to. For example, you can + * send event data to Amazon SNS to receive notifications when you receive bounces or + * complaints, or you can use Amazon Kinesis Data Firehose to stream data to Amazon S3 for long-term storage.

                    */ export interface EventDestination { /** @@ -3255,25 +3283,25 @@ export namespace GetAccountRequest { /** *

                    An object that contains information about the per-day and per-second sending limits - * for your Amazon SES account in the current AWS Region.

                    + * for your Amazon SES account in the current Amazon Web Services Region.

                    */ export interface SendQuota { /** - *

                    The maximum number of emails that you can send in the current AWS Region over a + *

                    The maximum number of emails that you can send in the current Amazon Web Services Region over a * 24-hour period. This value is also called your sending * quota.

                    */ Max24HourSend?: number; /** - *

                    The maximum number of emails that you can send per second in the current AWS Region. + *

                    The maximum number of emails that you can send per second in the current Amazon Web Services Region. * This value is also called your maximum sending rate or your * maximum TPS (transactions per second) rate.

                    */ MaxSendRate?: number; /** - *

                    The number of emails sent from your Amazon SES account in the current AWS Region over the + *

                    The number of emails sent from your Amazon SES account in the current Amazon Web Services Region over the * past 24 hours.

                    */ SentLast24Hours?: number; @@ -3290,7 +3318,7 @@ export namespace SendQuota { /** *

                    An object that contains information about the email address suppression preferences - * for your account in the current AWS Region.

                    + * for your account in the current Amazon Web Services Region.

                    */ export interface SuppressionAttributes { /** @@ -3326,7 +3354,7 @@ export namespace SuppressionAttributes { /** *

                    A list of details about the email-sending capabilities of your Amazon SES account in the - * current AWS Region.

                    + * current Amazon Web Services Region.

                    */ export interface GetAccountResponse { /** @@ -3362,7 +3390,7 @@ export interface GetAccountResponse { EnforcementStatus?: string; /** - *

                    Indicates whether or not your account has production access in the current AWS + *

                    Indicates whether or not your account has production access in the current Amazon Web Services * Region.

                    *

                    If the value is false, then your account is in the * sandbox. When your account is in the sandbox, you can only send @@ -3377,19 +3405,19 @@ export interface GetAccountResponse { /** *

                    An object that contains information about the per-day and per-second sending limits - * for your Amazon SES account in the current AWS Region.

                    + * for your Amazon SES account in the current Amazon Web Services Region.

                    */ SendQuota?: SendQuota; /** *

                    Indicates whether or not email sending is enabled for your Amazon SES account in the - * current AWS Region.

                    + * current Amazon Web Services Region.

                    */ SendingEnabled?: boolean; /** *

                    An object that contains information about the email address suppression preferences - * for your account in the current AWS Region.

                    + * for your account in the current Amazon Web Services Region.

                    */ SuppressionAttributes?: SuppressionAttributes; @@ -3456,8 +3484,7 @@ export namespace GetBlacklistReportsResponse { */ export interface GetConfigurationSetRequest { /** - *

                    The name of the configuration set that you want to obtain more information - * about.

                    + *

                    The name of the configuration set.

                    */ ConfigurationSetName: string | undefined; } @@ -3769,7 +3796,7 @@ export namespace GetCustomVerificationEmailTemplateResponse { export interface GetDedicatedIpRequest { /** *

                    The IP address that you want to obtain more information about. The value you specify - * has to be a dedicated IP address that's assocaited with your AWS account.

                    + * has to be a dedicated IP address that's assocaited with your Amazon Web Services account.

                    */ Ip: string | undefined; } @@ -3836,12 +3863,12 @@ export namespace GetDedicatedIpsRequest { } /** - *

                    Information about the dedicated IP addresses that are associated with your AWS + *

                    Information about the dedicated IP addresses that are associated with your Amazon Web Services * account.

                    */ export interface GetDedicatedIpsResponse { /** - *

                    A list of dedicated IP addresses that are associated with your AWS account.

                    + *

                    A list of dedicated IP addresses that are associated with your Amazon Web Services account.

                    */ DedicatedIps?: DedicatedIp[]; @@ -3863,12 +3890,12 @@ export namespace GetDedicatedIpsResponse { } /** - *

                    Retrieve information about the status of the Deliverability dashboard for your AWS account. + *

                    Retrieve information about the status of the Deliverability dashboard for your Amazon Web Services account. * When the Deliverability dashboard is enabled, you gain access to reputation, deliverability, and * other metrics for your domains. You also gain the ability to perform predictive inbox placement tests.

                    * *

                    When you use the Deliverability dashboard, you pay a monthly subscription charge, in addition - * to any other fees that you accrue by using Amazon SES and other AWS services. For more + * to any other fees that you accrue by using Amazon SES and other Amazon Web Services services. For more * information about the features and cost of a Deliverability dashboard subscription, see Amazon Pinpoint Pricing.

                    */ export interface GetDeliverabilityDashboardOptionsRequest {} @@ -4205,7 +4232,7 @@ export namespace GetDomainStatisticsReportResponse { */ export interface GetEmailIdentityRequest { /** - *

                    The email identity that you want to retrieve details for.

                    + *

                    The email identity.

                    */ EmailIdentity: string | undefined; } @@ -4263,10 +4290,10 @@ export interface MailFromAttributes { MailFromDomainStatus: MailFromDomainStatus | string | undefined; /** - *

                    The action that you want to take if the required MX record can't be found when you - * send an email. When you set this value to UseDefaultValue, the mail is sent - * using amazonses.com as the MAIL FROM domain. When you set this - * value to RejectMessage, the Amazon SES API v2 returns a + *

                    The action to take if the required MX record can't be found when you send an email. + * When you set this value to UseDefaultValue, the mail is sent using + * amazonses.com as the MAIL FROM domain. When you set this value + * to RejectMessage, the Amazon SES API v2 returns a * MailFromDomainNotVerified error, and doesn't attempt to deliver the * email.

                    *

                    These behaviors are taken when the custom MAIL FROM domain configuration is in the @@ -4290,7 +4317,8 @@ export namespace MailFromAttributes { */ export interface GetEmailIdentityResponse { /** - *

                    The email identity type.

                    + *

                    The email identity type. Note: the MANAGED_DOMAIN identity type is not + * supported.

                    */ IdentityType?: IdentityType | string; @@ -4355,7 +4383,7 @@ export namespace GetEmailIdentityResponse { */ export interface GetEmailIdentityPoliciesRequest { /** - *

                    The email identity that you want to retrieve policies for.

                    + *

                    The email identity.

                    */ EmailIdentity: string | undefined; } @@ -4394,7 +4422,7 @@ export namespace GetEmailIdentityPoliciesResponse { */ export interface GetEmailTemplateRequest { /** - *

                    The name of the template you want to retrieve.

                    + *

                    The name of the template.

                    */ TemplateName: string | undefined; } @@ -4413,7 +4441,7 @@ export namespace GetEmailTemplateRequest { */ export interface GetEmailTemplateResponse { /** - *

                    The name of the template you want to retrieve.

                    + *

                    The name of the template.

                    */ TemplateName: string | undefined; @@ -4629,22 +4657,8 @@ export namespace GetSuppressedDestinationResponse { */ export interface IdentityInfo { /** - *

                    The email identity type. The identity type can be one of the following:

                    - *
                      - *
                    • - *

                      - * EMAIL_ADDRESS – The identity is an email address.

                      - *
                    • - *
                    • - *

                      - * DOMAIN – The identity is a domain.

                      - *
                    • - *
                    • - *

                      - * MANAGED_DOMAIN – The identity is a domain that is managed - * by AWS.

                      - *
                    • - *
                    + *

                    The email identity type. Note: the MANAGED_DOMAIN type is not supported + * for email identity types.

                    */ IdentityType?: IdentityType | string; @@ -4731,7 +4745,7 @@ export namespace InvalidNextTokenException { /** *

                    A request to obtain a list of configuration sets for your Amazon SES account in the current - * AWS Region.

                    + * Amazon Web Services Region.

                    */ export interface ListConfigurationSetsRequest { /** @@ -4759,12 +4773,12 @@ export namespace ListConfigurationSetsRequest { } /** - *

                    A list of configuration sets in your Amazon SES account in the current AWS Region.

                    + *

                    A list of configuration sets in your Amazon SES account in the current Amazon Web Services Region.

                    */ export interface ListConfigurationSetsResponse { /** *

                    An array that contains all of the configuration sets in your Amazon SES account in the - * current AWS Region.

                    + * current Amazon Web Services Region.

                    */ ConfigurationSets?: string[]; @@ -5040,7 +5054,7 @@ export namespace ListDedicatedIpPoolsRequest { */ export interface ListDedicatedIpPoolsResponse { /** - *

                    A list of all of the dedicated IP pools that are associated with your AWS account in + *

                    A list of all of the dedicated IP pools that are associated with your Amazon Web Services account in * the current Region.

                    */ DedicatedIpPools?: string[]; @@ -5199,7 +5213,7 @@ export namespace ListDomainDeliverabilityCampaignsResponse { } /** - *

                    A request to list all of the email identities associated with your AWS account. This + *

                    A request to list all of the email identities associated with your Amazon Web Services account. This * list includes identities that you've already verified, identities that are unverified, * and identities that were verified in the past, but are no longer verified.

                    */ @@ -5235,7 +5249,7 @@ export namespace ListEmailIdentitiesRequest { */ export interface ListEmailIdentitiesResponse { /** - *

                    An array that includes all of the email identities associated with your AWS + *

                    An array that includes all of the email identities associated with your Amazon Web Services * account.

                    */ EmailIdentities?: IdentityInfo[]; @@ -5260,7 +5274,7 @@ export namespace ListEmailIdentitiesResponse { /** *

                    Represents a request to list the email templates present in your Amazon SES account in the - * current AWS Region. For more information, see the Amazon SES Developer + * current Amazon Web Services Region. For more information, see the Amazon SES Developer * Guide.

                    */ export interface ListEmailTemplatesRequest { @@ -5552,7 +5566,7 @@ export namespace ListTagsForResourceResponse { export interface PutAccountDedicatedIpWarmupAttributesRequest { /** *

                    Enables or disables the automatic warm-up feature for dedicated IP addresses that are - * associated with your Amazon SES account in the current AWS Region. Set to true + * associated with your Amazon SES account in the current Amazon Web Services Region. Set to true * to enable the automatic warm-up feature, or set to false to disable * it.

                    */ @@ -5616,7 +5630,7 @@ export interface PutAccountDetailsRequest { /** *

                    Indicates whether or not your account should have production access in the current - * AWS Region.

                    + * Amazon Web Services Region.

                    *

                    If the value is false, then your account is in the * sandbox. When your account is in the sandbox, you can only send * email to verified identities. Additionally, the maximum number of emails you can send in @@ -5664,7 +5678,7 @@ export interface PutAccountSendingAttributesRequest { *

                    Enables or disables your account's ability to send email. Set to true to * enable email sending, or set to false to disable email sending.

                    * - *

                    If AWS paused your account's ability to send email, you can't use this operation + *

                    If Amazon Web Services paused your account's ability to send email, you can't use this operation * to resume your account's ability to send email.

                    *
                    */ @@ -5750,8 +5764,7 @@ export namespace PutAccountSuppressionAttributesResponse { */ export interface PutConfigurationSetDeliveryOptionsRequest { /** - *

                    The name of the configuration set that you want to associate with a dedicated IP - * pool.

                    + *

                    The name of the configuration set to associate with a dedicated IP pool.

                    */ ConfigurationSetName: string | undefined; @@ -5764,8 +5777,7 @@ export interface PutConfigurationSetDeliveryOptionsRequest { TlsPolicy?: TlsPolicy | string; /** - *

                    The name of the dedicated IP pool that you want to associate with the configuration - * set.

                    + *

                    The name of the dedicated IP pool to associate with the configuration set.

                    */ SendingPoolName?: string; } @@ -5800,8 +5812,7 @@ export namespace PutConfigurationSetDeliveryOptionsResponse { */ export interface PutConfigurationSetReputationOptionsRequest { /** - *

                    The name of the configuration set that you want to enable or disable reputation metric - * tracking for.

                    + *

                    The name of the configuration set.

                    */ ConfigurationSetName: string | undefined; @@ -5843,8 +5854,7 @@ export namespace PutConfigurationSetReputationOptionsResponse { */ export interface PutConfigurationSetSendingOptionsRequest { /** - *

                    The name of the configuration set that you want to enable or disable email sending - * for.

                    + *

                    The name of the configuration set to enable or disable email sending for.

                    */ ConfigurationSetName: string | undefined; @@ -5885,8 +5895,8 @@ export namespace PutConfigurationSetSendingOptionsResponse { */ export interface PutConfigurationSetSuppressionOptionsRequest { /** - *

                    The name of the configuration set that you want to change the suppression list - * preferences for.

                    + *

                    The name of the configuration set to change the suppression list preferences + * for.

                    */ ConfigurationSetName: string | undefined; @@ -5904,8 +5914,8 @@ export interface PutConfigurationSetSuppressionOptionsRequest { *
                  • *

                    * BOUNCE – Amazon SES adds an email address to the suppression - * list for your account when a message sent to that address results in a - * hard bounce.

                    + * list for your account when a message sent to that address results in a hard + * bounce.

                    *
                  • *
                  */ @@ -5942,13 +5952,12 @@ export namespace PutConfigurationSetSuppressionOptionsResponse { */ export interface PutConfigurationSetTrackingOptionsRequest { /** - *

                  The name of the configuration set that you want to add a custom tracking domain - * to.

                  + *

                  The name of the configuration set.

                  */ ConfigurationSetName: string | undefined; /** - *

                  The domain that you want to use to track open and click events.

                  + *

                  The domain to use to track open and click events.

                  */ CustomRedirectDomain?: string; } @@ -5983,7 +5992,7 @@ export namespace PutConfigurationSetTrackingOptionsResponse { export interface PutDedicatedIpInPoolRequest { /** *

                  The IP address that you want to move to the dedicated IP pool. The value you specify - * has to be a dedicated IP address that's associated with your AWS account.

                  + * has to be a dedicated IP address that's associated with your Amazon Web Services account.

                  */ Ip: string | undefined; @@ -6064,7 +6073,7 @@ export namespace PutDedicatedIpWarmupAttributesResponse { * access to reputation, deliverability, and other metrics for the domains that you use to * send email using Amazon SES API v2. You also gain the ability to perform predictive inbox placement tests.

                  *

                  When you use the Deliverability dashboard, you pay a monthly subscription charge, in addition - * to any other fees that you accrue by using Amazon SES and other AWS services. For more + * to any other fees that you accrue by using Amazon SES and other Amazon Web Services services. For more * information about the features and cost of a Deliverability dashboard subscription, see Amazon Pinpoint Pricing.

                  */ export interface PutDeliverabilityDashboardOptionRequest { @@ -6109,12 +6118,12 @@ export namespace PutDeliverabilityDashboardOptionResponse { */ export interface PutEmailIdentityConfigurationSetAttributesRequest { /** - *

                  The email address or domain that you want to associate with a configuration set.

                  + *

                  The email address or domain to associate with a configuration set.

                  */ EmailIdentity: string | undefined; /** - *

                  The configuration set that you want to associate with an email identity.

                  + *

                  The configuration set to associate with an email identity.

                  */ ConfigurationSetName?: string; } @@ -6129,7 +6138,8 @@ export namespace PutEmailIdentityConfigurationSetAttributesRequest { } /** - *

                  If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

                  + *

                  If the action is successful, the service sends back an HTTP 200 response with an empty + * HTTP body.

                  */ export interface PutEmailIdentityConfigurationSetAttributesResponse {} @@ -6148,7 +6158,7 @@ export namespace PutEmailIdentityConfigurationSetAttributesResponse { */ export interface PutEmailIdentityDkimAttributesRequest { /** - *

                  The email identity that you want to change the DKIM settings for.

                  + *

                  The email identity.

                  */ EmailIdentity: string | undefined; @@ -6190,13 +6200,13 @@ export namespace PutEmailIdentityDkimAttributesResponse { */ export interface PutEmailIdentityDkimSigningAttributesRequest { /** - *

                  The email identity that you want to configure DKIM for.

                  + *

                  The email identity.

                  */ EmailIdentity: string | undefined; /** - *

                  The method that you want to use to configure DKIM for the identity. There are two - * possible values:

                  + *

                  The method to use to configure DKIM for the identity. There are the following possible + * values:

                  *
                    *
                  • *

                    @@ -6214,8 +6224,9 @@ export interface PutEmailIdentityDkimSigningAttributesRequest { /** *

                    An object that contains information about the private key and selector that you want - * to use to configure DKIM for the identity. This object is only required if you want to - * configure Bring Your Own DKIM (BYODKIM) for the identity.

                    + * to use to configure DKIM for the identity for Bring Your Own DKIM (BYODKIM) for the identity, or, + * configures the key length to be used for + * Easy DKIM.

                    */ SigningAttributes?: DkimSigningAttributes; } @@ -6309,8 +6320,7 @@ export namespace PutEmailIdentityDkimSigningAttributesResponse { */ export interface PutEmailIdentityFeedbackAttributesRequest { /** - *

                    The email identity that you want to configure bounce and complaint feedback forwarding - * for.

                    + *

                    The email identity.

                    */ EmailIdentity: string | undefined; @@ -6356,8 +6366,7 @@ export namespace PutEmailIdentityFeedbackAttributesResponse { */ export interface PutEmailIdentityMailFromAttributesRequest { /** - *

                    The verified email identity that you want to set up the custom MAIL FROM domain - * for.

                    + *

                    The verified email identity.

                    */ EmailIdentity: string | undefined; @@ -6380,10 +6389,10 @@ export interface PutEmailIdentityMailFromAttributesRequest { MailFromDomain?: string; /** - *

                    The action that you want to take if the required MX record isn't found when you send - * an email. When you set this value to UseDefaultValue, the mail is sent - * using amazonses.com as the MAIL FROM domain. When you set this - * value to RejectMessage, the Amazon SES API v2 returns a + *

                    The action to take if the required MX record isn't found when you send an email. When + * you set this value to UseDefaultValue, the mail is sent using + * amazonses.com as the MAIL FROM domain. When you set this value + * to RejectMessage, the Amazon SES API v2 returns a * MailFromDomainNotVerified error, and doesn't attempt to deliver the * email.

                    *

                    These behaviors are taken when the custom MAIL FROM domain configuration is in the @@ -6465,7 +6474,7 @@ export namespace PutSuppressedDestinationResponse { */ export interface SendBulkEmailRequest { /** - *

                    The email address that you want to use as the "From" address for the email. The + *

                    The email address to use as the "From" address for the email. The * address that you specify has to be verified.

                    */ FromEmailAddress?: string; @@ -6531,7 +6540,7 @@ export interface SendBulkEmailRequest { BulkEmailEntries: BulkEmailEntry[] | undefined; /** - *

                    The name of the configuration set that you want to use when sending the email.

                    + *

                    The name of the configuration set to use when sending the email.

                    */ ConfigurationSetName?: string; } @@ -6550,7 +6559,8 @@ export namespace SendBulkEmailRequest { */ export interface SendBulkEmailResponse { /** - *

                    A list of BulkMailEntry objects.

                    + *

                    One object per intended recipient. Check each response object and retry any messages + * with a failure status.

                    */ BulkEmailEntryResults: BulkEmailEntryResult[] | undefined; } @@ -6622,7 +6632,7 @@ export namespace SendCustomVerificationEmailResponse { */ export interface SendEmailRequest { /** - *

                    The email address that you want to use as the "From" address for the email. The + *

                    The email address to use as the "From" address for the email. The * address that you specify has to be verified. *

                    */ @@ -6692,7 +6702,7 @@ export interface SendEmailRequest { EmailTags?: MessageTag[]; /** - *

                    The name of the configuration set that you want to use when sending the email.

                    + *

                    The name of the configuration set to use when sending the email.

                    */ ConfigurationSetName?: string; @@ -6780,7 +6790,7 @@ export namespace TagResourceResponse { */ export interface TestRenderEmailTemplateRequest { /** - *

                    The name of the template that you want to render.

                    + *

                    The name of the template.

                    */ TemplateName: string | undefined; @@ -6867,13 +6877,13 @@ export namespace UntagResourceResponse { */ export interface UpdateConfigurationSetEventDestinationRequest { /** - *

                    The name of the configuration set that contains the event destination that you want to + *

                    The name of the configuration set that contains the event destination to * modify.

                    */ ConfigurationSetName: string | undefined; /** - *

                    The name of the event destination that you want to modify.

                    + *

                    The name of the event destination.

                    */ EventDestinationName: string | undefined; @@ -7064,7 +7074,7 @@ export namespace UpdateCustomVerificationEmailTemplateResponse { */ export interface UpdateEmailIdentityPolicyRequest { /** - *

                    The email identity for which you want to update policy.

                    + *

                    The email identity.

                    */ EmailIdentity: string | undefined; @@ -7114,7 +7124,7 @@ export namespace UpdateEmailIdentityPolicyResponse { */ export interface UpdateEmailTemplateRequest { /** - *

                    The name of the template you want to update.

                    + *

                    The name of the template.

                    */ TemplateName: string | undefined; diff --git a/clients/client-sesv2/src/protocols/Aws_restJson1.ts b/clients/client-sesv2/src/protocols/Aws_restJson1.ts index f87a117f82f80..064f9abb5b83b 100644 --- a/clients/client-sesv2/src/protocols/Aws_restJson1.ts +++ b/clients/client-sesv2/src/protocols/Aws_restJson1.ts @@ -9533,6 +9533,8 @@ const serializeAws_restJson1DkimSigningAttributes = (input: DkimSigningAttribute input.DomainSigningPrivateKey !== null && { DomainSigningPrivateKey: input.DomainSigningPrivateKey }), ...(input.DomainSigningSelector !== undefined && input.DomainSigningSelector !== null && { DomainSigningSelector: input.DomainSigningSelector }), + ...(input.NextSigningKeyLength !== undefined && + input.NextSigningKeyLength !== null && { NextSigningKeyLength: input.NextSigningKeyLength }), }; }; @@ -10197,6 +10199,12 @@ const deserializeAws_restJson1DeliveryOptions = (output: any, context: __SerdeCo const deserializeAws_restJson1DkimAttributes = (output: any, context: __SerdeContext): DkimAttributes => { return { + CurrentSigningKeyLength: __expectString(output.CurrentSigningKeyLength), + LastKeyGenerationTimestamp: + output.LastKeyGenerationTimestamp !== undefined && output.LastKeyGenerationTimestamp !== null + ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastKeyGenerationTimestamp))) + : undefined, + NextSigningKeyLength: __expectString(output.NextSigningKeyLength), SigningAttributesOrigin: __expectString(output.SigningAttributesOrigin), SigningEnabled: __expectBoolean(output.SigningEnabled), Status: __expectString(output.Status), diff --git a/clients/client-ssm/src/models/models_0.ts b/clients/client-ssm/src/models/models_0.ts index c89f7f36620e8..ebd7dcc242933 100644 --- a/clients/client-ssm/src/models/models_0.ts +++ b/clients/client-ssm/src/models/models_0.ts @@ -758,8 +758,7 @@ export enum AssociationComplianceSeverity { */ export interface S3OutputLocation { /** - *

                    (Deprecated) You can no longer specify this parameter. The system ignores it. Instead, - * Amazon Web Services Systems Manager automatically determines the Region of the S3 bucket.

                    + *

                    The Amazon Web Services Region of the S3 bucket.

                    */ OutputS3Region?: string; @@ -1034,8 +1033,9 @@ export interface CreateAssociationRequest { /** *

                    The targets for the association. You can target instances by using tags, Amazon Web Services resource - * groups, all instances in an Amazon Web Services account, or individual instance IDs. For more information about - * choosing targets for an association, see Using targets and rate controls with State Manager associations in the + * groups, all instances in an Amazon Web Services account, or individual instance IDs. You can target all + * instances in an Amazon Web Services account by specifying the InstanceIds key with a value of + * *. For more information about choosing targets for an association, see Using targets and rate controls with State Manager associations in the * Amazon Web Services Systems Manager User Guide.

                    */ Targets?: Target[]; diff --git a/clients/client-ssm/src/models/models_1.ts b/clients/client-ssm/src/models/models_1.ts index d7f61e63b5c33..26f1172eff224 100644 --- a/clients/client-ssm/src/models/models_1.ts +++ b/clients/client-ssm/src/models/models_1.ts @@ -4352,7 +4352,9 @@ export interface Association { DocumentVersion?: string; /** - *

                    The instances targeted by the request to create an association.

                    + *

                    The instances targeted by the request to create an association. You can target all instances + * in an Amazon Web Services account by specifying the InstanceIds key with a value of + * *.

                    */ Targets?: Target[]; @@ -9568,6 +9570,21 @@ export interface StartChangeRequestExecutionRequest { */ ClientToken?: string; + /** + *

                    Indicates whether the change request can be approved automatically without the need for + * manual approvals.

                    + *

                    If AutoApprovable is enabled in a change template, then setting + * AutoApprove to true in StartChangeRequestExecution + * creates a change request that bypasses approver review.

                    + * + *

                    Change Calendar restrictions are not bypassed in this scenario. If the state of an + * associated calendar is CLOSED, change freeze approvers must still grant permission + * for this change request to run. If they don't, the change won't be processed until the calendar + * state is again OPEN.

                    + *
                    + */ + AutoApprove?: boolean; + /** *

                    Information about the Automation runbooks that are run during the runbook workflow.

                    * diff --git a/clients/client-ssm/src/protocols/Aws_json1_1.ts b/clients/client-ssm/src/protocols/Aws_json1_1.ts index 51f93d5ce6238..1e635f5a1df04 100644 --- a/clients/client-ssm/src/protocols/Aws_json1_1.ts +++ b/clients/client-ssm/src/protocols/Aws_json1_1.ts @@ -18120,6 +18120,7 @@ const serializeAws_json1_1StartChangeRequestExecutionRequest = ( context: __SerdeContext ): any => { return { + ...(input.AutoApprove !== undefined && input.AutoApprove !== null && { AutoApprove: input.AutoApprove }), ...(input.ChangeDetails !== undefined && input.ChangeDetails !== null && { ChangeDetails: input.ChangeDetails }), ...(input.ChangeRequestName !== undefined && input.ChangeRequestName !== null && { ChangeRequestName: input.ChangeRequestName }), diff --git a/clients/client-synthetics/src/models/models_0.ts b/clients/client-synthetics/src/models/models_0.ts index 78b2b32bf34c5..1f37571ec70b7 100644 --- a/clients/client-synthetics/src/models/models_0.ts +++ b/clients/client-synthetics/src/models/models_0.ts @@ -1,5 +1,90 @@ import { MetadataBearer as $MetadataBearer, SmithyException as __SmithyException } from "@aws-sdk/types"; +export enum EncryptionMode { + SSE_KMS = "SSE_KMS", + SSE_S3 = "SSE_S3", +} + +/** + *

                    A structure that contains the configuration of encryption-at-rest settings for canary artifacts that the canary + * uploads to Amazon S3.

                    + *

                    For more information, see + * Encrypting canary artifacts + *

                    + */ +export interface S3EncryptionConfig { + /** + *

                    The encryption method to use for artifacts created by this canary. Specify SSE_S3 to use + * server-side encryption (SSE) with an Amazon S3-managed + * key. Specify SSE-KMS to use server-side encryption with a customer-managed KMS key.

                    + *

                    If you omit this parameter, an + * Amazon Web Services-managed KMS key is used. + *

                    + */ + EncryptionMode?: EncryptionMode | string; + + /** + *

                    The ARN of the customer-managed KMS key to use, if you specify SSE-KMS + * for EncryptionMode + *

                    + */ + KmsKeyArn?: string; +} + +export namespace S3EncryptionConfig { + /** + * @internal + */ + export const filterSensitiveLog = (obj: S3EncryptionConfig): any => ({ + ...obj, + }); +} + +/** + *

                    A structure that contains the configuration for canary artifacts, including the + * encryption-at-rest settings for artifacts that the canary uploads to Amazon S3.

                    + */ +export interface ArtifactConfigInput { + /** + *

                    A structure that contains the configuration of the encryption-at-rest settings for artifacts that the canary uploads + * to Amazon S3. + * Artifact encryption functionality is available only for canaries that use Synthetics runtime version + * syn-nodejs-puppeteer-3.3 or later. For more information, see + * Encrypting canary artifacts + *

                    + */ + S3Encryption?: S3EncryptionConfig; +} + +export namespace ArtifactConfigInput { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ArtifactConfigInput): any => ({ + ...obj, + }); +} + +/** + *

                    A structure that contains the configuration for canary artifacts, including + * the encryption-at-rest settings for artifacts that the canary uploads to Amazon S3.

                    + */ +export interface ArtifactConfigOutput { + /** + *

                    A structure that contains the configuration of encryption settings for canary artifacts that are stored in Amazon S3.

                    + */ + S3Encryption?: S3EncryptionConfig; +} + +export namespace ArtifactConfigOutput { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ArtifactConfigOutput): any => ({ + ...obj, + }); +} + /** *

                    A structure representing a screenshot that is used as a baseline during visual monitoring comparisons made by the canary.

                    */ @@ -353,6 +438,12 @@ export interface Canary { *

                    The list of key-value pairs that are associated with the canary.

                    */ Tags?: { [key: string]: string }; + + /** + *

                    A structure that contains the configuration for canary artifacts, including + * the encryption-at-rest settings for artifacts that the canary uploads to Amazon S3.

                    + */ + ArtifactConfig?: ArtifactConfigOutput; } export namespace Canary { @@ -796,6 +887,12 @@ export interface CreateCanaryRequest { * certain tag values.

                    */ Tags?: { [key: string]: string }; + + /** + *

                    A structure that contains the configuration for canary artifacts, including + * the encryption-at-rest settings for artifacts that the canary uploads to Amazon S3.

                    + */ + ArtifactConfig?: ArtifactConfigInput; } export namespace CreateCanaryRequest { @@ -1475,6 +1572,20 @@ export interface UpdateCanaryRequest { *

                    */ VisualReference?: VisualReferenceInput; + + /** + *

                    The location in Amazon S3 where Synthetics stores artifacts from the test runs of this canary. + * Artifacts include the log file, screenshots, and HAR files. The name of the + * S3 bucket can't include a period (.).

                    + */ + ArtifactS3Location?: string; + + /** + *

                    A structure that contains the configuration for canary artifacts, + * including the encryption-at-rest settings for artifacts that + * the canary uploads to Amazon S3.

                    + */ + ArtifactConfig?: ArtifactConfigInput; } export namespace UpdateCanaryRequest { diff --git a/clients/client-synthetics/src/protocols/Aws_restJson1.ts b/clients/client-synthetics/src/protocols/Aws_restJson1.ts index 116f5da4b2adc..94843c6eaf0f5 100644 --- a/clients/client-synthetics/src/protocols/Aws_restJson1.ts +++ b/clients/client-synthetics/src/protocols/Aws_restJson1.ts @@ -41,6 +41,8 @@ import { TagResourceCommandInput, TagResourceCommandOutput } from "../commands/T import { UntagResourceCommandInput, UntagResourceCommandOutput } from "../commands/UntagResourceCommand"; import { UpdateCanaryCommandInput, UpdateCanaryCommandOutput } from "../commands/UpdateCanaryCommand"; import { + ArtifactConfigInput, + ArtifactConfigOutput, BaseScreenshot, Canary, CanaryCodeInput, @@ -59,6 +61,7 @@ import { InternalServerException, ResourceNotFoundException, RuntimeVersion, + S3EncryptionConfig, ValidationException, VisualReferenceInput, VisualReferenceOutput, @@ -77,6 +80,10 @@ export const serializeAws_restJson1CreateCanaryCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/canary"; let body: any; body = JSON.stringify({ + ...(input.ArtifactConfig !== undefined && + input.ArtifactConfig !== null && { + ArtifactConfig: serializeAws_restJson1ArtifactConfigInput(input.ArtifactConfig, context), + }), ...(input.ArtifactS3Location !== undefined && input.ArtifactS3Location !== null && { ArtifactS3Location: input.ArtifactS3Location }), ...(input.Code !== undefined && @@ -447,6 +454,12 @@ export const serializeAws_restJson1UpdateCanaryCommand = async ( } let body: any; body = JSON.stringify({ + ...(input.ArtifactConfig !== undefined && + input.ArtifactConfig !== null && { + ArtifactConfig: serializeAws_restJson1ArtifactConfigInput(input.ArtifactConfig, context), + }), + ...(input.ArtifactS3Location !== undefined && + input.ArtifactS3Location !== null && { ArtifactS3Location: input.ArtifactS3Location }), ...(input.Code !== undefined && input.Code !== null && { Code: serializeAws_restJson1CanaryCodeInput(input.Code, context) }), ...(input.ExecutionRoleArn !== undefined && @@ -1458,6 +1471,15 @@ const deserializeAws_restJson1ValidationExceptionResponse = async ( return contents; }; +const serializeAws_restJson1ArtifactConfigInput = (input: ArtifactConfigInput, context: __SerdeContext): any => { + return { + ...(input.S3Encryption !== undefined && + input.S3Encryption !== null && { + S3Encryption: serializeAws_restJson1S3EncryptionConfig(input.S3Encryption, context), + }), + }; +}; + const serializeAws_restJson1BaseScreenshot = (input: BaseScreenshot, context: __SerdeContext): any => { return { ...(input.IgnoreCoordinates !== undefined && @@ -1537,6 +1559,14 @@ const serializeAws_restJson1EnvironmentVariablesMap = ( }, {}); }; +const serializeAws_restJson1S3EncryptionConfig = (input: S3EncryptionConfig, context: __SerdeContext): any => { + return { + ...(input.EncryptionMode !== undefined && + input.EncryptionMode !== null && { EncryptionMode: input.EncryptionMode }), + ...(input.KmsKeyArn !== undefined && input.KmsKeyArn !== null && { KmsKeyArn: input.KmsKeyArn }), + }; +}; + const serializeAws_restJson1SecurityGroupIds = (input: string[], context: __SerdeContext): any => { return input .filter((e: any) => e != null) @@ -1593,6 +1623,15 @@ const serializeAws_restJson1VpcConfigInput = (input: VpcConfigInput, context: __ }; }; +const deserializeAws_restJson1ArtifactConfigOutput = (output: any, context: __SerdeContext): ArtifactConfigOutput => { + return { + S3Encryption: + output.S3Encryption !== undefined && output.S3Encryption !== null + ? deserializeAws_restJson1S3EncryptionConfig(output.S3Encryption, context) + : undefined, + } as any; +}; + const deserializeAws_restJson1BaseScreenshot = (output: any, context: __SerdeContext): BaseScreenshot => { return { IgnoreCoordinates: @@ -1649,6 +1688,10 @@ const deserializeAws_restJson1CanariesLastRun = (output: any, context: __SerdeCo const deserializeAws_restJson1Canary = (output: any, context: __SerdeContext): Canary => { return { + ArtifactConfig: + output.ArtifactConfig !== undefined && output.ArtifactConfig !== null + ? deserializeAws_restJson1ArtifactConfigOutput(output.ArtifactConfig, context) + : undefined, ArtifactS3Location: __expectString(output.ArtifactS3Location), Code: output.Code !== undefined && output.Code !== null @@ -1827,6 +1870,13 @@ const deserializeAws_restJson1RuntimeVersionList = (output: any, context: __Serd }); }; +const deserializeAws_restJson1S3EncryptionConfig = (output: any, context: __SerdeContext): S3EncryptionConfig => { + return { + EncryptionMode: __expectString(output.EncryptionMode), + KmsKeyArn: __expectString(output.KmsKeyArn), + } as any; +}; + const deserializeAws_restJson1SecurityGroupIds = (output: any, context: __SerdeContext): string[] => { return (output || []) .filter((e: any) => e != null) diff --git a/clients/client-transfer/src/models/models_0.ts b/clients/client-transfer/src/models/models_0.ts index 7c0e5728375ef..5c32d51162127 100644 --- a/clients/client-transfer/src/models/models_0.ts +++ b/clients/client-transfer/src/models/models_0.ts @@ -40,17 +40,10 @@ export namespace ConflictException { } /** - *

                    Specifies the details for the file location for the file being used in the workflow. Only applicable if you are using Amazon EFS for storage.

                    + *

                    Reserved for future use.

                    *

                    - * You need to provide the file system ID and the pathname. - * The pathname can represent either a path or a file. - * This is determined by whether or not you end the path value with the forward slash (/) character. - * If the final character is "/", then your file is copied to the folder, and its name does not change. - * If, rather, the final character is alphanumeric, your uploaded file is renamed to the path value. In this case, if a file with that name already exists, it is overwritten. + * *

                    - *

                    For example, if your path is shared-files/bob/, your uploaded files are copied to the shared-files/bob/, folder. - * If your path is shared-files/today, each uploaded file is copied to the shared-files folder and named today: - * each upload overwrites the previous version of the bob file.

                    */ export interface EfsFileLocation { /** @@ -74,11 +67,21 @@ export namespace EfsFileLocation { } /** - *

                    Specifies the details for the S3 file being copied.

                    + *

                    Specifies the customer input S3 file location. If it is used inside copyStepDetails.DestinationFileLocation, it should be the S3 copy destination.

                    + *

                    + * You need to provide the bucket and key. + * The key can represent either a path or a file. + * This is determined by whether or not you end the key value with the forward slash (/) character. + * If the final character is "/", then your file is copied to the folder, and its name does not change. + * If, rather, the final character is alphanumeric, your uploaded file is renamed to the path value. In this case, if a file with that name already exists, it is overwritten. + *

                    + *

                    For example, if your path is shared-files/bob/, your uploaded files are copied to the shared-files/bob/, folder. + * If your path is shared-files/today, each uploaded file is copied to the shared-files folder and named today: + * each upload overwrites the previous version of the bob file.

                    */ export interface S3InputFileLocation { /** - *

                    Specifies the S3 bucket that contains the file being copied.

                    + *

                    Specifies the S3 bucket for the customer input file.

                    */ Bucket?: string; @@ -107,7 +110,7 @@ export interface InputFileLocation { S3FileLocation?: S3InputFileLocation; /** - *

                    Specifies the details for the Amazon EFS file being copied.

                    + *

                    Reserved for future use.

                    */ EfsFileLocation?: EfsFileLocation; } @@ -258,7 +261,7 @@ export interface CreateAccessRequest { * LOGICAL.

                    *

                    The following is an Entry and Target pair example.

                    *

                    - * [ { "Entry": "your-personal-report.pdf", "Target": "/bucket3/customized-reports/${transfer:UserName}.pdf" } ] + * [ { "Entry": "/directory1", "Target": "/bucket_name/home/mydirectory" } ] *

                    *

                    In most cases, you can use this value instead of the session policy to lock down your * user to the designated home directory ("chroot"). To do this, you can set @@ -945,8 +948,8 @@ export interface CreateUserRequest { *

                    The following is an Entry and Target pair example.

                    * *

                    - * [ { "Entry": "your-personal-report.pdf", "Target": - * "/bucket3/customized-reports/${transfer:UserName}.pdf" } ] + * [ { "Entry": "/directory1", "Target": + * "/bucket_name/home/mydirectory" } ] *

                    * *

                    In most cases, you can use this value instead of the session policy to lock your user @@ -1097,7 +1100,7 @@ export namespace CustomStepDetails { } /** - *

                    The name of the step, used to identify the step that is being deleted.

                    + *

                    The name of the step, used to identify the delete step.

                    */ export interface DeleteStepDetails { /** @@ -1210,7 +1213,7 @@ export interface WorkflowStep { *

                    A description

                    *
                  • *
                  • - *

                    An S3 or EFS location for the destination of the file copy.

                    + *

                    An S3 location for the destination of the file copy.

                    *
                  • *
                  • *

                    A flag that indicates whether or not to overwrite an existing file of the same name. @@ -1229,7 +1232,7 @@ export interface WorkflowStep { CustomStepDetails?: CustomStepDetails; /** - *

                    You need to specify the name of the file to be deleted.

                    + *

                    Details for a step that deletes the file.

                    */ DeleteStepDetails?: DeleteStepDetails; @@ -1278,6 +1281,11 @@ export interface CreateWorkflowRequest { * Tag: add a tag to the file

                    *
                  • *
                  + * + *

                  + * Currently, copying and tagging are supported only on S3. + *

                  + *
                  *

                  * For file location, you specify either the S3 bucket and key, or the EFS filesystem ID and path. *

                  @@ -1285,7 +1293,12 @@ export interface CreateWorkflowRequest { Steps: WorkflowStep[] | undefined; /** - *

                  Specifies the steps (actions) to take if any errors are encountered during execution of the workflow.

                  + *

                  Specifies the steps (actions) to take if errors are encountered during execution of the workflow.

                  + * + *

                  For custom steps, the lambda function needs to send FAILURE to the call + * back API to kick off the exception steps. Additionally, if the lambda does not send + * SUCCESS before it times out, the exception steps are executed.

                  + *
                  */ OnExceptionSteps?: WorkflowStep[]; @@ -1582,16 +1595,6 @@ export namespace DescribeAccessResponse { /** *

                  Specifies the details for the file location for the file being used in the workflow. Only applicable if you are using S3 storage.

                  - *

                  - * You need to provide the bucket and key. - * The key can represent either a path or a file. - * This is determined by whether or not you end the key value with the forward slash (/) character. - * If the final character is "/", then your file is copied to the folder, and its name does not change. - * If, rather, the final character is alphanumeric, your uploaded file is renamed to the path value. In this case, if a file with that name already exists, it is overwritten. - *

                  - *

                  For example, if your path is shared-files/bob/, your uploaded files are copied to the shared-files/bob/, folder. - * If your path is shared-files/today, each uploaded file is copied to the shared-files folder and named today: - * each upload overwrites the previous version of the bob file.

                  */ export interface S3FileLocation { /** @@ -1760,7 +1763,7 @@ export interface ExecutionResults { Steps?: ExecutionStepResult[]; /** - *

                  Specifies the steps (actions) to take if any errors are encountered during execution of the workflow.

                  + *

                  Specifies the steps (actions) to take if errors are encountered during execution of the workflow.

                  */ OnExceptionSteps?: ExecutionStepResult[]; } @@ -2299,7 +2302,7 @@ export interface DescribedWorkflow { Steps?: WorkflowStep[]; /** - *

                  Specifies the steps (actions) to take if any errors are encountered during execution of the workflow.

                  + *

                  Specifies the steps (actions) to take if errors are encountered during execution of the workflow.

                  */ OnExceptionSteps?: WorkflowStep[]; @@ -3485,7 +3488,7 @@ export interface UpdateAccessRequest { * LOGICAL.

                  *

                  The following is an Entry and Target pair example.

                  *

                  - * [ { "Entry": "your-personal-report.pdf", "Target": "/bucket3/customized-reports/${transfer:UserName}.pdf" } ] + * [ { "Entry": "/directory1", "Target": "/bucket_name/home/mydirectory" } ] *

                  *

                  In most cases, you can use this value instead of the session policy to lock down your * user to the designated home directory ("chroot"). To do this, you can set @@ -3820,8 +3823,8 @@ export interface UpdateUserRequest { * *

                  The following is an Entry and Target pair example.

                  *

                  - * [ { "Entry": "your-personal-report.pdf", "Target": - * "/bucket3/customized-reports/${transfer:UserName}.pdf" } ] + * [ { "Entry": "/directory1", "Target": + * "/bucket_name/home/mydirectory" } ] *

                  * *

                  In most cases, you can use this value instead of the session policy to lock down your diff --git a/clients/client-voice-id/.gitignore b/clients/client-voice-id/.gitignore new file mode 100644 index 0000000000000..54f14c9aef253 --- /dev/null +++ b/clients/client-voice-id/.gitignore @@ -0,0 +1,9 @@ +/node_modules/ +/build/ +/coverage/ +/docs/ +/dist-* +*.tsbuildinfo +*.tgz +*.log +package-lock.json diff --git a/clients/client-voice-id/.npmignore b/clients/client-voice-id/.npmignore new file mode 100644 index 0000000000000..b7ff81137c4ad --- /dev/null +++ b/clients/client-voice-id/.npmignore @@ -0,0 +1,4 @@ +/coverage/ +/docs/ +tsconfig.test.json +*.tsbuildinfo diff --git a/clients/client-voice-id/LICENSE b/clients/client-voice-id/LICENSE new file mode 100644 index 0000000000000..f9e0c8672bca6 --- /dev/null +++ b/clients/client-voice-id/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-2021 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-voice-id/README.md b/clients/client-voice-id/README.md new file mode 100644 index 0000000000000..3bf8b9c2f3a97 --- /dev/null +++ b/clients/client-voice-id/README.md @@ -0,0 +1,205 @@ +# @aws-sdk/client-voice-id + +[![NPM version](https://img.shields.io/npm/v/@aws-sdk/client-voice-id/latest.svg)](https://www.npmjs.com/package/@aws-sdk/client-voice-id) +[![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/client-voice-id.svg)](https://www.npmjs.com/package/@aws-sdk/client-voice-id) + +## Description + +AWS SDK for JavaScript VoiceID Client for Node.js, Browser and React Native. + +

                  Amazon Connect Voice ID provides real-time caller authentication and fraud screening. This guide +describes the APIs used for this service. +

                  + +## Installing + +To install the this package, simply type add or install @aws-sdk/client-voice-id +using your favorite package manager: + +- `npm install @aws-sdk/client-voice-id` +- `yarn add @aws-sdk/client-voice-id` +- `pnpm add @aws-sdk/client-voice-id` + +## Getting Started + +### Import + +The AWS SDK is modulized by clients and commands. +To send a request, you only need to import the `VoiceIDClient` and +the commands you need, for example `CreateDomainCommand`: + +```js +// ES5 example +const { VoiceIDClient, CreateDomainCommand } = require("@aws-sdk/client-voice-id"); +``` + +```ts +// ES6+ example +import { VoiceIDClient, CreateDomainCommand } from "@aws-sdk/client-voice-id"; +``` + +### 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 VoiceIDClient({ region: "REGION" }); + +const params = { + /** input parameters */ +}; +const command = new CreateDomainCommand(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) => { + // proccess 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-voice-id"; +const client = new AWS.VoiceID({ region: "REGION" }); + +// async/await. +try { + const data = await client.createDomain(params); + // process data. +} catch (error) { + // error handling. +} + +// Promises. +client + .createDomain(params) + .then((data) => { + // process data. + }) + .catch((error) => { + // error handling. + }); + +// callbacks. +client.createDomain(params, (err, data) => { + // proccess 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-voice-id` 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. diff --git a/clients/client-voice-id/jest.config.js b/clients/client-voice-id/jest.config.js new file mode 100644 index 0000000000000..02eed352c6a86 --- /dev/null +++ b/clients/client-voice-id/jest.config.js @@ -0,0 +1,4 @@ +module.exports = { + preset: "ts-jest", + testMatch: ["**/*.spec.ts", "!**/*.browser.spec.ts", "!**/*.integ.spec.ts"], +}; diff --git a/clients/client-voice-id/package.json b/clients/client-voice-id/package.json new file mode 100644 index 0000000000000..d3c9488646c0c --- /dev/null +++ b/clients/client-voice-id/package.json @@ -0,0 +1,93 @@ +{ + "name": "@aws-sdk/client-voice-id", + "description": "AWS SDK for JavaScript Voice Id Client for Node.js, Browser and React Native", + "version": "3.0.0", + "scripts": { + "build": "yarn build:cjs && yarn build:es && yarn build:types", + "build:cjs": "tsc -p tsconfig.json", + "build:docs": "yarn clean:docs && typedoc ./", + "build:es": "tsc -p tsconfig.es.json", + "build:types": "tsc -p tsconfig.types.json", + "clean": "yarn clean:dist && yarn clean:docs", + "clean:dist": "rimraf ./dist-*", + "clean:docs": "rimraf ./docs", + "downlevel-dts": "downlevel-dts dist-types dist-types/ts3.4", + "test": "jest --coverage --passWithNoTests" + }, + "main": "./dist-cjs/index.js", + "types": "./dist-types/index.d.ts", + "module": "./dist-es/index.js", + "sideEffects": false, + "dependencies": { + "@aws-crypto/sha256-browser": "^1.1.0", + "@aws-crypto/sha256-js": "^1.1.0", + "@aws-sdk/client-sts": "3.34.0", + "@aws-sdk/config-resolver": "3.34.0", + "@aws-sdk/credential-provider-node": "3.34.0", + "@aws-sdk/fetch-http-handler": "3.34.0", + "@aws-sdk/hash-node": "3.34.0", + "@aws-sdk/invalid-dependency": "3.34.0", + "@aws-sdk/middleware-content-length": "3.34.0", + "@aws-sdk/middleware-host-header": "3.34.0", + "@aws-sdk/middleware-logger": "3.34.0", + "@aws-sdk/middleware-retry": "3.34.0", + "@aws-sdk/middleware-serde": "3.34.0", + "@aws-sdk/middleware-signing": "3.34.0", + "@aws-sdk/middleware-stack": "3.34.0", + "@aws-sdk/middleware-user-agent": "3.34.0", + "@aws-sdk/node-config-provider": "3.34.0", + "@aws-sdk/node-http-handler": "3.34.0", + "@aws-sdk/protocol-http": "3.34.0", + "@aws-sdk/smithy-client": "3.34.0", + "@aws-sdk/types": "3.34.0", + "@aws-sdk/url-parser": "3.34.0", + "@aws-sdk/util-base64-browser": "3.34.0", + "@aws-sdk/util-base64-node": "3.34.0", + "@aws-sdk/util-body-length-browser": "3.34.0", + "@aws-sdk/util-body-length-node": "3.34.0", + "@aws-sdk/util-user-agent-browser": "3.34.0", + "@aws-sdk/util-user-agent-node": "3.34.0", + "@aws-sdk/util-utf8-browser": "3.34.0", + "@aws-sdk/util-utf8-node": "3.34.0", + "tslib": "^2.3.0", + "uuid": "^8.3.2" + }, + "devDependencies": { + "@aws-sdk/client-documentation-generator": "3.34.0", + "@types/node": "^12.7.5", + "@types/uuid": "^8.3.0", + "downlevel-dts": "0.7.0", + "jest": "^26.1.0", + "rimraf": "^3.0.0", + "ts-jest": "^26.4.1", + "typedoc": "^0.19.2", + "typescript": "~4.3.5" + }, + "engines": { + "node": ">=10.0.0" + }, + "typesVersions": { + "<4.0": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + "author": { + "name": "AWS SDK for JavaScript Team", + "url": "https://aws.amazon.com/javascript/" + }, + "license": "Apache-2.0", + "browser": { + "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.browser" + }, + "react-native": { + "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.native" + }, + "homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-voice-id", + "repository": { + "type": "git", + "url": "https://github.com/aws/aws-sdk-js-v3.git", + "directory": "clients/client-voice-id" + } +} diff --git a/clients/client-voice-id/src/VoiceID.ts b/clients/client-voice-id/src/VoiceID.ts new file mode 100644 index 0000000000000..6e04aa247131f --- /dev/null +++ b/clients/client-voice-id/src/VoiceID.ts @@ -0,0 +1,769 @@ +import { HttpHandlerOptions as __HttpHandlerOptions } from "@aws-sdk/types"; + +import { + CreateDomainCommand, + CreateDomainCommandInput, + CreateDomainCommandOutput, +} from "./commands/CreateDomainCommand"; +import { + DeleteDomainCommand, + DeleteDomainCommandInput, + DeleteDomainCommandOutput, +} from "./commands/DeleteDomainCommand"; +import { + DeleteFraudsterCommand, + DeleteFraudsterCommandInput, + DeleteFraudsterCommandOutput, +} from "./commands/DeleteFraudsterCommand"; +import { + DeleteSpeakerCommand, + DeleteSpeakerCommandInput, + DeleteSpeakerCommandOutput, +} from "./commands/DeleteSpeakerCommand"; +import { + DescribeDomainCommand, + DescribeDomainCommandInput, + DescribeDomainCommandOutput, +} from "./commands/DescribeDomainCommand"; +import { + DescribeFraudsterCommand, + DescribeFraudsterCommandInput, + DescribeFraudsterCommandOutput, +} from "./commands/DescribeFraudsterCommand"; +import { + DescribeFraudsterRegistrationJobCommand, + DescribeFraudsterRegistrationJobCommandInput, + DescribeFraudsterRegistrationJobCommandOutput, +} from "./commands/DescribeFraudsterRegistrationJobCommand"; +import { + DescribeSpeakerCommand, + DescribeSpeakerCommandInput, + DescribeSpeakerCommandOutput, +} from "./commands/DescribeSpeakerCommand"; +import { + DescribeSpeakerEnrollmentJobCommand, + DescribeSpeakerEnrollmentJobCommandInput, + DescribeSpeakerEnrollmentJobCommandOutput, +} from "./commands/DescribeSpeakerEnrollmentJobCommand"; +import { + EvaluateSessionCommand, + EvaluateSessionCommandInput, + EvaluateSessionCommandOutput, +} from "./commands/EvaluateSessionCommand"; +import { ListDomainsCommand, ListDomainsCommandInput, ListDomainsCommandOutput } from "./commands/ListDomainsCommand"; +import { + ListFraudsterRegistrationJobsCommand, + ListFraudsterRegistrationJobsCommandInput, + ListFraudsterRegistrationJobsCommandOutput, +} from "./commands/ListFraudsterRegistrationJobsCommand"; +import { + ListSpeakerEnrollmentJobsCommand, + ListSpeakerEnrollmentJobsCommandInput, + ListSpeakerEnrollmentJobsCommandOutput, +} from "./commands/ListSpeakerEnrollmentJobsCommand"; +import { + ListSpeakersCommand, + ListSpeakersCommandInput, + ListSpeakersCommandOutput, +} from "./commands/ListSpeakersCommand"; +import { + ListTagsForResourceCommand, + ListTagsForResourceCommandInput, + ListTagsForResourceCommandOutput, +} from "./commands/ListTagsForResourceCommand"; +import { + OptOutSpeakerCommand, + OptOutSpeakerCommandInput, + OptOutSpeakerCommandOutput, +} from "./commands/OptOutSpeakerCommand"; +import { + StartFraudsterRegistrationJobCommand, + StartFraudsterRegistrationJobCommandInput, + StartFraudsterRegistrationJobCommandOutput, +} from "./commands/StartFraudsterRegistrationJobCommand"; +import { + StartSpeakerEnrollmentJobCommand, + StartSpeakerEnrollmentJobCommandInput, + StartSpeakerEnrollmentJobCommandOutput, +} from "./commands/StartSpeakerEnrollmentJobCommand"; +import { TagResourceCommand, TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand"; +import { + UntagResourceCommand, + UntagResourceCommandInput, + UntagResourceCommandOutput, +} from "./commands/UntagResourceCommand"; +import { + UpdateDomainCommand, + UpdateDomainCommandInput, + UpdateDomainCommandOutput, +} from "./commands/UpdateDomainCommand"; +import { VoiceIDClient } from "./VoiceIDClient"; + +/** + *

                  Amazon Connect Voice ID provides real-time caller authentication and fraud screening. This guide + * describes the APIs used for this service. + *

                  + */ +export class VoiceID extends VoiceIDClient { + /** + *

                  Creates a domain that contains all Amazon Connect Voice ID data, such as speakers, fraudsters, customer + * audio, and voiceprints. + *

                  + */ + public createDomain( + args: CreateDomainCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public createDomain(args: CreateDomainCommandInput, cb: (err: any, data?: CreateDomainCommandOutput) => void): void; + public createDomain( + args: CreateDomainCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateDomainCommandOutput) => void + ): void; + public createDomain( + args: CreateDomainCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: CreateDomainCommandOutput) => void), + cb?: (err: any, data?: CreateDomainCommandOutput) => void + ): Promise | void { + const command = new CreateDomainCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

                  Deletes the specified domain from the Amazon Connect Voice ID system.

                  + */ + public deleteDomain( + args: DeleteDomainCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public deleteDomain(args: DeleteDomainCommandInput, cb: (err: any, data?: DeleteDomainCommandOutput) => void): void; + public deleteDomain( + args: DeleteDomainCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteDomainCommandOutput) => void + ): void; + public deleteDomain( + args: DeleteDomainCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DeleteDomainCommandOutput) => void), + cb?: (err: any, data?: DeleteDomainCommandOutput) => void + ): Promise | void { + const command = new DeleteDomainCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

                  Deletes the specified fraudster from the Amazon Connect Voice ID system.

                  + */ + public deleteFraudster( + args: DeleteFraudsterCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public deleteFraudster( + args: DeleteFraudsterCommandInput, + cb: (err: any, data?: DeleteFraudsterCommandOutput) => void + ): void; + public deleteFraudster( + args: DeleteFraudsterCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteFraudsterCommandOutput) => void + ): void; + public deleteFraudster( + args: DeleteFraudsterCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DeleteFraudsterCommandOutput) => void), + cb?: (err: any, data?: DeleteFraudsterCommandOutput) => void + ): Promise | void { + const command = new DeleteFraudsterCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

                  Deletes the specified speaker from the Amazon Connect Voice ID system.

                  + */ + public deleteSpeaker( + args: DeleteSpeakerCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public deleteSpeaker( + args: DeleteSpeakerCommandInput, + cb: (err: any, data?: DeleteSpeakerCommandOutput) => void + ): void; + public deleteSpeaker( + args: DeleteSpeakerCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteSpeakerCommandOutput) => void + ): void; + public deleteSpeaker( + args: DeleteSpeakerCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DeleteSpeakerCommandOutput) => void), + cb?: (err: any, data?: DeleteSpeakerCommandOutput) => void + ): Promise | void { + const command = new DeleteSpeakerCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

                  Describes the specified domain.

                  + */ + public describeDomain( + args: DescribeDomainCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public describeDomain( + args: DescribeDomainCommandInput, + cb: (err: any, data?: DescribeDomainCommandOutput) => void + ): void; + public describeDomain( + args: DescribeDomainCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DescribeDomainCommandOutput) => void + ): void; + public describeDomain( + args: DescribeDomainCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DescribeDomainCommandOutput) => void), + cb?: (err: any, data?: DescribeDomainCommandOutput) => void + ): Promise | void { + const command = new DescribeDomainCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

                  Describes the specified fraudster.

                  + */ + public describeFraudster( + args: DescribeFraudsterCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public describeFraudster( + args: DescribeFraudsterCommandInput, + cb: (err: any, data?: DescribeFraudsterCommandOutput) => void + ): void; + public describeFraudster( + args: DescribeFraudsterCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DescribeFraudsterCommandOutput) => void + ): void; + public describeFraudster( + args: DescribeFraudsterCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DescribeFraudsterCommandOutput) => void), + cb?: (err: any, data?: DescribeFraudsterCommandOutput) => void + ): Promise | void { + const command = new DescribeFraudsterCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

                  Describes the specified fraudster registration job.

                  + */ + public describeFraudsterRegistrationJob( + args: DescribeFraudsterRegistrationJobCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public describeFraudsterRegistrationJob( + args: DescribeFraudsterRegistrationJobCommandInput, + cb: (err: any, data?: DescribeFraudsterRegistrationJobCommandOutput) => void + ): void; + public describeFraudsterRegistrationJob( + args: DescribeFraudsterRegistrationJobCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DescribeFraudsterRegistrationJobCommandOutput) => void + ): void; + public describeFraudsterRegistrationJob( + args: DescribeFraudsterRegistrationJobCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DescribeFraudsterRegistrationJobCommandOutput) => void), + cb?: (err: any, data?: DescribeFraudsterRegistrationJobCommandOutput) => void + ): Promise | void { + const command = new DescribeFraudsterRegistrationJobCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

                  Describes the specified speaker.

                  + */ + public describeSpeaker( + args: DescribeSpeakerCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public describeSpeaker( + args: DescribeSpeakerCommandInput, + cb: (err: any, data?: DescribeSpeakerCommandOutput) => void + ): void; + public describeSpeaker( + args: DescribeSpeakerCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DescribeSpeakerCommandOutput) => void + ): void; + public describeSpeaker( + args: DescribeSpeakerCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DescribeSpeakerCommandOutput) => void), + cb?: (err: any, data?: DescribeSpeakerCommandOutput) => void + ): Promise | void { + const command = new DescribeSpeakerCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

                  Describes the specified speaker enrollment job.

                  + */ + public describeSpeakerEnrollmentJob( + args: DescribeSpeakerEnrollmentJobCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public describeSpeakerEnrollmentJob( + args: DescribeSpeakerEnrollmentJobCommandInput, + cb: (err: any, data?: DescribeSpeakerEnrollmentJobCommandOutput) => void + ): void; + public describeSpeakerEnrollmentJob( + args: DescribeSpeakerEnrollmentJobCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DescribeSpeakerEnrollmentJobCommandOutput) => void + ): void; + public describeSpeakerEnrollmentJob( + args: DescribeSpeakerEnrollmentJobCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DescribeSpeakerEnrollmentJobCommandOutput) => void), + cb?: (err: any, data?: DescribeSpeakerEnrollmentJobCommandOutput) => void + ): Promise | void { + const command = new DescribeSpeakerEnrollmentJobCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

                  Evaluates a specified session based on audio data accumulated during a streaming Amazon Connect Voice + * ID call.

                  + */ + public evaluateSession( + args: EvaluateSessionCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public evaluateSession( + args: EvaluateSessionCommandInput, + cb: (err: any, data?: EvaluateSessionCommandOutput) => void + ): void; + public evaluateSession( + args: EvaluateSessionCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: EvaluateSessionCommandOutput) => void + ): void; + public evaluateSession( + args: EvaluateSessionCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: EvaluateSessionCommandOutput) => void), + cb?: (err: any, data?: EvaluateSessionCommandOutput) => void + ): Promise | void { + const command = new EvaluateSessionCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

                  Lists all the domains in the Amazon Web Services account. + *

                  + */ + public listDomains(args: ListDomainsCommandInput, options?: __HttpHandlerOptions): Promise; + public listDomains(args: ListDomainsCommandInput, cb: (err: any, data?: ListDomainsCommandOutput) => void): void; + public listDomains( + args: ListDomainsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListDomainsCommandOutput) => void + ): void; + public listDomains( + args: ListDomainsCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ListDomainsCommandOutput) => void), + cb?: (err: any, data?: ListDomainsCommandOutput) => void + ): Promise | void { + const command = new ListDomainsCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

                  Lists all the fraudster registration jobs in the domain with the given JobStatus. + * If JobStatus is not provided, this lists all fraudster registration jobs in the given + * domain. + *

                  + */ + public listFraudsterRegistrationJobs( + args: ListFraudsterRegistrationJobsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public listFraudsterRegistrationJobs( + args: ListFraudsterRegistrationJobsCommandInput, + cb: (err: any, data?: ListFraudsterRegistrationJobsCommandOutput) => void + ): void; + public listFraudsterRegistrationJobs( + args: ListFraudsterRegistrationJobsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListFraudsterRegistrationJobsCommandOutput) => void + ): void; + public listFraudsterRegistrationJobs( + args: ListFraudsterRegistrationJobsCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ListFraudsterRegistrationJobsCommandOutput) => void), + cb?: (err: any, data?: ListFraudsterRegistrationJobsCommandOutput) => void + ): Promise | void { + const command = new ListFraudsterRegistrationJobsCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

                  Lists all the speaker enrollment jobs in the domain with the specified JobStatus. If + * JobStatus is not provided, this lists all jobs with all possible speaker enrollment job + * statuses.

                  + */ + public listSpeakerEnrollmentJobs( + args: ListSpeakerEnrollmentJobsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public listSpeakerEnrollmentJobs( + args: ListSpeakerEnrollmentJobsCommandInput, + cb: (err: any, data?: ListSpeakerEnrollmentJobsCommandOutput) => void + ): void; + public listSpeakerEnrollmentJobs( + args: ListSpeakerEnrollmentJobsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListSpeakerEnrollmentJobsCommandOutput) => void + ): void; + public listSpeakerEnrollmentJobs( + args: ListSpeakerEnrollmentJobsCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ListSpeakerEnrollmentJobsCommandOutput) => void), + cb?: (err: any, data?: ListSpeakerEnrollmentJobsCommandOutput) => void + ): Promise | void { + const command = new ListSpeakerEnrollmentJobsCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

                  Lists all speakers in a specified domain.

                  + */ + public listSpeakers( + args: ListSpeakersCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public listSpeakers(args: ListSpeakersCommandInput, cb: (err: any, data?: ListSpeakersCommandOutput) => void): void; + public listSpeakers( + args: ListSpeakersCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListSpeakersCommandOutput) => void + ): void; + public listSpeakers( + args: ListSpeakersCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ListSpeakersCommandOutput) => void), + cb?: (err: any, data?: ListSpeakersCommandOutput) => void + ): Promise | void { + const command = new ListSpeakersCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

                  Lists all tags associated with a specified Voice ID resource.

                  + */ + public listTagsForResource( + args: ListTagsForResourceCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public listTagsForResource( + args: ListTagsForResourceCommandInput, + cb: (err: any, data?: ListTagsForResourceCommandOutput) => void + ): void; + public listTagsForResource( + args: ListTagsForResourceCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListTagsForResourceCommandOutput) => void + ): void; + public listTagsForResource( + args: ListTagsForResourceCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ListTagsForResourceCommandOutput) => void), + cb?: (err: any, data?: ListTagsForResourceCommandOutput) => void + ): Promise | void { + const command = new ListTagsForResourceCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

                  Opts out a speaker from Voice ID system. A speaker can be opted out regardless of whether or not they + * already exist in the system. If they don't yet exist, a new speaker is created in an opted out state. + * If they already exist, their existing status is overridden and they are opted out. Enrollment and + * evaluation authentication requests are rejected for opted out speakers, and opted out speakers have + * no voice embeddings stored in the system.

                  + */ + public optOutSpeaker( + args: OptOutSpeakerCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public optOutSpeaker( + args: OptOutSpeakerCommandInput, + cb: (err: any, data?: OptOutSpeakerCommandOutput) => void + ): void; + public optOutSpeaker( + args: OptOutSpeakerCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: OptOutSpeakerCommandOutput) => void + ): void; + public optOutSpeaker( + args: OptOutSpeakerCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: OptOutSpeakerCommandOutput) => void), + cb?: (err: any, data?: OptOutSpeakerCommandOutput) => void + ): Promise | void { + const command = new OptOutSpeakerCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

                  Starts a new batch fraudster registration job using provided details.

                  + */ + public startFraudsterRegistrationJob( + args: StartFraudsterRegistrationJobCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public startFraudsterRegistrationJob( + args: StartFraudsterRegistrationJobCommandInput, + cb: (err: any, data?: StartFraudsterRegistrationJobCommandOutput) => void + ): void; + public startFraudsterRegistrationJob( + args: StartFraudsterRegistrationJobCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: StartFraudsterRegistrationJobCommandOutput) => void + ): void; + public startFraudsterRegistrationJob( + args: StartFraudsterRegistrationJobCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: StartFraudsterRegistrationJobCommandOutput) => void), + cb?: (err: any, data?: StartFraudsterRegistrationJobCommandOutput) => void + ): Promise | void { + const command = new StartFraudsterRegistrationJobCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

                  Starts a new batch speaker enrollment job using specified details.

                  + */ + public startSpeakerEnrollmentJob( + args: StartSpeakerEnrollmentJobCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public startSpeakerEnrollmentJob( + args: StartSpeakerEnrollmentJobCommandInput, + cb: (err: any, data?: StartSpeakerEnrollmentJobCommandOutput) => void + ): void; + public startSpeakerEnrollmentJob( + args: StartSpeakerEnrollmentJobCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: StartSpeakerEnrollmentJobCommandOutput) => void + ): void; + public startSpeakerEnrollmentJob( + args: StartSpeakerEnrollmentJobCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: StartSpeakerEnrollmentJobCommandOutput) => void), + cb?: (err: any, data?: StartSpeakerEnrollmentJobCommandOutput) => void + ): Promise | void { + const command = new StartSpeakerEnrollmentJobCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

                  Tags an Amazon Connect Voice ID resource with the provided list of tags.

                  + */ + public tagResource(args: TagResourceCommandInput, options?: __HttpHandlerOptions): Promise; + public tagResource(args: TagResourceCommandInput, cb: (err: any, data?: TagResourceCommandOutput) => void): void; + public tagResource( + args: TagResourceCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: TagResourceCommandOutput) => void + ): void; + public tagResource( + args: TagResourceCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: TagResourceCommandOutput) => void), + cb?: (err: any, data?: TagResourceCommandOutput) => void + ): Promise | void { + const command = new TagResourceCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

                  Removes specified tags from a specified Amazon Connect Voice ID resource.

                  + */ + public untagResource( + args: UntagResourceCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public untagResource( + args: UntagResourceCommandInput, + cb: (err: any, data?: UntagResourceCommandOutput) => void + ): void; + public untagResource( + args: UntagResourceCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UntagResourceCommandOutput) => void + ): void; + public untagResource( + args: UntagResourceCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: UntagResourceCommandOutput) => void), + cb?: (err: any, data?: UntagResourceCommandOutput) => void + ): Promise | void { + const command = new UntagResourceCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

                  Updates the specified domain. This API has clobber behavior, and clears and replaces all attributes. + * If an optional field, such as 'Description' is not provided, it is removed from the domain.

                  + */ + public updateDomain( + args: UpdateDomainCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public updateDomain(args: UpdateDomainCommandInput, cb: (err: any, data?: UpdateDomainCommandOutput) => void): void; + public updateDomain( + args: UpdateDomainCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateDomainCommandOutput) => void + ): void; + public updateDomain( + args: UpdateDomainCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: UpdateDomainCommandOutput) => void), + cb?: (err: any, data?: UpdateDomainCommandOutput) => void + ): Promise | void { + const command = new UpdateDomainCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } +} diff --git a/clients/client-voice-id/src/VoiceIDClient.ts b/clients/client-voice-id/src/VoiceIDClient.ts new file mode 100644 index 0000000000000..10591304a314b --- /dev/null +++ b/clients/client-voice-id/src/VoiceIDClient.ts @@ -0,0 +1,322 @@ +import { + EndpointsInputConfig, + EndpointsResolvedConfig, + RegionInputConfig, + RegionResolvedConfig, + resolveEndpointsConfig, + resolveRegionConfig, +} from "@aws-sdk/config-resolver"; +import { getContentLengthPlugin } from "@aws-sdk/middleware-content-length"; +import { + getHostHeaderPlugin, + HostHeaderInputConfig, + HostHeaderResolvedConfig, + resolveHostHeaderConfig, +} from "@aws-sdk/middleware-host-header"; +import { getLoggerPlugin } from "@aws-sdk/middleware-logger"; +import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@aws-sdk/middleware-retry"; +import { + AwsAuthInputConfig, + AwsAuthResolvedConfig, + getAwsAuthPlugin, + resolveAwsAuthConfig, +} from "@aws-sdk/middleware-signing"; +import { + getUserAgentPlugin, + resolveUserAgentConfig, + UserAgentInputConfig, + UserAgentResolvedConfig, +} from "@aws-sdk/middleware-user-agent"; +import { HttpHandler as __HttpHandler } from "@aws-sdk/protocol-http"; +import { + Client as __Client, + SmithyConfiguration as __SmithyConfiguration, + SmithyResolvedConfiguration as __SmithyResolvedConfiguration, +} from "@aws-sdk/smithy-client"; +import { + Credentials as __Credentials, + Decoder as __Decoder, + Encoder as __Encoder, + Hash as __Hash, + HashConstructor as __HashConstructor, + HttpHandlerOptions as __HttpHandlerOptions, + Logger as __Logger, + Provider as __Provider, + Provider, + RegionInfoProvider, + StreamCollector as __StreamCollector, + UrlParser as __UrlParser, + UserAgent as __UserAgent, +} from "@aws-sdk/types"; + +import { CreateDomainCommandInput, CreateDomainCommandOutput } from "./commands/CreateDomainCommand"; +import { DeleteDomainCommandInput, DeleteDomainCommandOutput } from "./commands/DeleteDomainCommand"; +import { DeleteFraudsterCommandInput, DeleteFraudsterCommandOutput } from "./commands/DeleteFraudsterCommand"; +import { DeleteSpeakerCommandInput, DeleteSpeakerCommandOutput } from "./commands/DeleteSpeakerCommand"; +import { DescribeDomainCommandInput, DescribeDomainCommandOutput } from "./commands/DescribeDomainCommand"; +import { DescribeFraudsterCommandInput, DescribeFraudsterCommandOutput } from "./commands/DescribeFraudsterCommand"; +import { + DescribeFraudsterRegistrationJobCommandInput, + DescribeFraudsterRegistrationJobCommandOutput, +} from "./commands/DescribeFraudsterRegistrationJobCommand"; +import { DescribeSpeakerCommandInput, DescribeSpeakerCommandOutput } from "./commands/DescribeSpeakerCommand"; +import { + DescribeSpeakerEnrollmentJobCommandInput, + DescribeSpeakerEnrollmentJobCommandOutput, +} from "./commands/DescribeSpeakerEnrollmentJobCommand"; +import { EvaluateSessionCommandInput, EvaluateSessionCommandOutput } from "./commands/EvaluateSessionCommand"; +import { ListDomainsCommandInput, ListDomainsCommandOutput } from "./commands/ListDomainsCommand"; +import { + ListFraudsterRegistrationJobsCommandInput, + ListFraudsterRegistrationJobsCommandOutput, +} from "./commands/ListFraudsterRegistrationJobsCommand"; +import { + ListSpeakerEnrollmentJobsCommandInput, + ListSpeakerEnrollmentJobsCommandOutput, +} from "./commands/ListSpeakerEnrollmentJobsCommand"; +import { ListSpeakersCommandInput, ListSpeakersCommandOutput } from "./commands/ListSpeakersCommand"; +import { + ListTagsForResourceCommandInput, + ListTagsForResourceCommandOutput, +} from "./commands/ListTagsForResourceCommand"; +import { OptOutSpeakerCommandInput, OptOutSpeakerCommandOutput } from "./commands/OptOutSpeakerCommand"; +import { + StartFraudsterRegistrationJobCommandInput, + StartFraudsterRegistrationJobCommandOutput, +} from "./commands/StartFraudsterRegistrationJobCommand"; +import { + StartSpeakerEnrollmentJobCommandInput, + StartSpeakerEnrollmentJobCommandOutput, +} from "./commands/StartSpeakerEnrollmentJobCommand"; +import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand"; +import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand"; +import { UpdateDomainCommandInput, UpdateDomainCommandOutput } from "./commands/UpdateDomainCommand"; +import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig"; + +export type ServiceInputTypes = + | CreateDomainCommandInput + | DeleteDomainCommandInput + | DeleteFraudsterCommandInput + | DeleteSpeakerCommandInput + | DescribeDomainCommandInput + | DescribeFraudsterCommandInput + | DescribeFraudsterRegistrationJobCommandInput + | DescribeSpeakerCommandInput + | DescribeSpeakerEnrollmentJobCommandInput + | EvaluateSessionCommandInput + | ListDomainsCommandInput + | ListFraudsterRegistrationJobsCommandInput + | ListSpeakerEnrollmentJobsCommandInput + | ListSpeakersCommandInput + | ListTagsForResourceCommandInput + | OptOutSpeakerCommandInput + | StartFraudsterRegistrationJobCommandInput + | StartSpeakerEnrollmentJobCommandInput + | TagResourceCommandInput + | UntagResourceCommandInput + | UpdateDomainCommandInput; + +export type ServiceOutputTypes = + | CreateDomainCommandOutput + | DeleteDomainCommandOutput + | DeleteFraudsterCommandOutput + | DeleteSpeakerCommandOutput + | DescribeDomainCommandOutput + | DescribeFraudsterCommandOutput + | DescribeFraudsterRegistrationJobCommandOutput + | DescribeSpeakerCommandOutput + | DescribeSpeakerEnrollmentJobCommandOutput + | EvaluateSessionCommandOutput + | ListDomainsCommandOutput + | ListFraudsterRegistrationJobsCommandOutput + | ListSpeakerEnrollmentJobsCommandOutput + | ListSpeakersCommandOutput + | ListTagsForResourceCommandOutput + | OptOutSpeakerCommandOutput + | StartFraudsterRegistrationJobCommandOutput + | StartSpeakerEnrollmentJobCommandOutput + | TagResourceCommandOutput + | UntagResourceCommandOutput + | UpdateDomainCommandOutput; + +export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { + /** + * The HTTP handler to use. Fetch in browser and Https in Nodejs. + */ + requestHandler?: __HttpHandler; + + /** + * A constructor for a class implementing the {@link __Hash} interface + * that computes the SHA-256 HMAC or checksum of a string or binary buffer. + * @internal + */ + sha256?: __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?: (body: any) => number | undefined; + + /** + * 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 dyanamically changing the endpoint of the client based on the hostPrefix + * trait of an operation. + */ + disableHostPrefix?: boolean; + + /** + * Value for how many times a request will be made at most in case of retry. + */ + maxAttempts?: number | __Provider; + + /** + * Specifies which retry algorithm to use. + */ + retryMode?: string | __Provider; + + /** + * Optional logger for logging debug/info/warn/error. + */ + logger?: __Logger; + + /** + * Unique service identifier. + * @internal + */ + serviceId?: string; + + /** + * The AWS region to which this client will send requests + */ + region?: string | __Provider; + + /** + * Default credentials provider; Not available in browser runtime. + * @internal + */ + credentialDefaultProvider?: (input: any) => __Provider<__Credentials>; + + /** + * Fetch related hostname, signing name or signing region with given region. + * @internal + */ + regionInfoProvider?: RegionInfoProvider; + + /** + * The provider populating default tracking information to be sent with `user-agent`, `x-amz-user-agent` header + * @internal + */ + defaultUserAgentProvider?: Provider<__UserAgent>; +} + +type VoiceIDClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> & + ClientDefaults & + RegionInputConfig & + EndpointsInputConfig & + RetryInputConfig & + HostHeaderInputConfig & + AwsAuthInputConfig & + UserAgentInputConfig; +/** + * The configuration interface of VoiceIDClient class constructor that set the region, credentials and other options. + */ +export interface VoiceIDClientConfig extends VoiceIDClientConfigType {} + +type VoiceIDClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> & + Required & + RegionResolvedConfig & + EndpointsResolvedConfig & + RetryResolvedConfig & + HostHeaderResolvedConfig & + AwsAuthResolvedConfig & + UserAgentResolvedConfig; +/** + * The resolved configuration interface of VoiceIDClient class. This is resolved and normalized from the {@link VoiceIDClientConfig | constructor configuration interface}. + */ +export interface VoiceIDClientResolvedConfig extends VoiceIDClientResolvedConfigType {} + +/** + *

                  Amazon Connect Voice ID provides real-time caller authentication and fraud screening. This guide + * describes the APIs used for this service. + *

                  + */ +export class VoiceIDClient extends __Client< + __HttpHandlerOptions, + ServiceInputTypes, + ServiceOutputTypes, + VoiceIDClientResolvedConfig +> { + /** + * The resolved configuration of VoiceIDClient class. This is resolved and normalized from the {@link VoiceIDClientConfig | constructor configuration interface}. + */ + readonly config: VoiceIDClientResolvedConfig; + + constructor(configuration: VoiceIDClientConfig) { + const _config_0 = __getRuntimeConfig(configuration); + const _config_1 = resolveRegionConfig(_config_0); + const _config_2 = resolveEndpointsConfig(_config_1); + const _config_3 = resolveRetryConfig(_config_2); + const _config_4 = resolveHostHeaderConfig(_config_3); + const _config_5 = resolveAwsAuthConfig(_config_4); + const _config_6 = resolveUserAgentConfig(_config_5); + super(_config_6); + this.config = _config_6; + this.middlewareStack.use(getRetryPlugin(this.config)); + this.middlewareStack.use(getContentLengthPlugin(this.config)); + this.middlewareStack.use(getHostHeaderPlugin(this.config)); + this.middlewareStack.use(getLoggerPlugin(this.config)); + this.middlewareStack.use(getAwsAuthPlugin(this.config)); + this.middlewareStack.use(getUserAgentPlugin(this.config)); + } + + /** + * Destroy underlying resources, like sockets. It's usually not necessary to do this. + * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed. + * Otherwise, sockets might stay open for quite a long time before the server terminates them. + */ + destroy(): void { + super.destroy(); + } +} diff --git a/clients/client-voice-id/src/commands/CreateDomainCommand.ts b/clients/client-voice-id/src/commands/CreateDomainCommand.ts new file mode 100644 index 0000000000000..7cf7ca691e791 --- /dev/null +++ b/clients/client-voice-id/src/commands/CreateDomainCommand.ts @@ -0,0 +1,97 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { CreateDomainRequest, CreateDomainResponse } from "../models/models_0"; +import { + deserializeAws_json1_0CreateDomainCommand, + serializeAws_json1_0CreateDomainCommand, +} from "../protocols/Aws_json1_0"; +import { ServiceInputTypes, ServiceOutputTypes, VoiceIDClientResolvedConfig } from "../VoiceIDClient"; + +export interface CreateDomainCommandInput extends CreateDomainRequest {} +export interface CreateDomainCommandOutput extends CreateDomainResponse, __MetadataBearer {} + +/** + *

                  Creates a domain that contains all Amazon Connect Voice ID data, such as speakers, fraudsters, customer + * audio, and voiceprints. + *

                  + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { VoiceIDClient, CreateDomainCommand } from "@aws-sdk/client-voice-id"; // ES Modules import + * // const { VoiceIDClient, CreateDomainCommand } = require("@aws-sdk/client-voice-id"); // CommonJS import + * const client = new VoiceIDClient(config); + * const command = new CreateDomainCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link CreateDomainCommandInput} for command's `input` shape. + * @see {@link CreateDomainCommandOutput} for command's `response` shape. + * @see {@link VoiceIDClientResolvedConfig | config} for command's `input` shape. + * + */ +export class CreateDomainCommand extends $Command< + CreateDomainCommandInput, + CreateDomainCommandOutput, + VoiceIDClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: CreateDomainCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: VoiceIDClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "VoiceIDClient"; + const commandName = "CreateDomainCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: CreateDomainRequest.filterSensitiveLog, + outputFilterSensitiveLog: CreateDomainResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: CreateDomainCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_json1_0CreateDomainCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_json1_0CreateDomainCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-voice-id/src/commands/DeleteDomainCommand.ts b/clients/client-voice-id/src/commands/DeleteDomainCommand.ts new file mode 100644 index 0000000000000..48ef3a446fe92 --- /dev/null +++ b/clients/client-voice-id/src/commands/DeleteDomainCommand.ts @@ -0,0 +1,95 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { DeleteDomainRequest } from "../models/models_0"; +import { + deserializeAws_json1_0DeleteDomainCommand, + serializeAws_json1_0DeleteDomainCommand, +} from "../protocols/Aws_json1_0"; +import { ServiceInputTypes, ServiceOutputTypes, VoiceIDClientResolvedConfig } from "../VoiceIDClient"; + +export interface DeleteDomainCommandInput extends DeleteDomainRequest {} +export interface DeleteDomainCommandOutput extends __MetadataBearer {} + +/** + *

                  Deletes the specified domain from the Amazon Connect Voice ID system.

                  + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { VoiceIDClient, DeleteDomainCommand } from "@aws-sdk/client-voice-id"; // ES Modules import + * // const { VoiceIDClient, DeleteDomainCommand } = require("@aws-sdk/client-voice-id"); // CommonJS import + * const client = new VoiceIDClient(config); + * const command = new DeleteDomainCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link DeleteDomainCommandInput} for command's `input` shape. + * @see {@link DeleteDomainCommandOutput} for command's `response` shape. + * @see {@link VoiceIDClientResolvedConfig | config} for command's `input` shape. + * + */ +export class DeleteDomainCommand extends $Command< + DeleteDomainCommandInput, + DeleteDomainCommandOutput, + VoiceIDClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DeleteDomainCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: VoiceIDClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "VoiceIDClient"; + const commandName = "DeleteDomainCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: DeleteDomainRequest.filterSensitiveLog, + outputFilterSensitiveLog: (output: any) => output, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: DeleteDomainCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_json1_0DeleteDomainCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_json1_0DeleteDomainCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-voice-id/src/commands/DeleteFraudsterCommand.ts b/clients/client-voice-id/src/commands/DeleteFraudsterCommand.ts new file mode 100644 index 0000000000000..f70ab483dd360 --- /dev/null +++ b/clients/client-voice-id/src/commands/DeleteFraudsterCommand.ts @@ -0,0 +1,95 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { DeleteFraudsterRequest } from "../models/models_0"; +import { + deserializeAws_json1_0DeleteFraudsterCommand, + serializeAws_json1_0DeleteFraudsterCommand, +} from "../protocols/Aws_json1_0"; +import { ServiceInputTypes, ServiceOutputTypes, VoiceIDClientResolvedConfig } from "../VoiceIDClient"; + +export interface DeleteFraudsterCommandInput extends DeleteFraudsterRequest {} +export interface DeleteFraudsterCommandOutput extends __MetadataBearer {} + +/** + *

                  Deletes the specified fraudster from the Amazon Connect Voice ID system.

                  + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { VoiceIDClient, DeleteFraudsterCommand } from "@aws-sdk/client-voice-id"; // ES Modules import + * // const { VoiceIDClient, DeleteFraudsterCommand } = require("@aws-sdk/client-voice-id"); // CommonJS import + * const client = new VoiceIDClient(config); + * const command = new DeleteFraudsterCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link DeleteFraudsterCommandInput} for command's `input` shape. + * @see {@link DeleteFraudsterCommandOutput} for command's `response` shape. + * @see {@link VoiceIDClientResolvedConfig | config} for command's `input` shape. + * + */ +export class DeleteFraudsterCommand extends $Command< + DeleteFraudsterCommandInput, + DeleteFraudsterCommandOutput, + VoiceIDClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DeleteFraudsterCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: VoiceIDClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "VoiceIDClient"; + const commandName = "DeleteFraudsterCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: DeleteFraudsterRequest.filterSensitiveLog, + outputFilterSensitiveLog: (output: any) => output, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: DeleteFraudsterCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_json1_0DeleteFraudsterCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_json1_0DeleteFraudsterCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-voice-id/src/commands/DeleteSpeakerCommand.ts b/clients/client-voice-id/src/commands/DeleteSpeakerCommand.ts new file mode 100644 index 0000000000000..8c63ee0d274dd --- /dev/null +++ b/clients/client-voice-id/src/commands/DeleteSpeakerCommand.ts @@ -0,0 +1,95 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { DeleteSpeakerRequest } from "../models/models_0"; +import { + deserializeAws_json1_0DeleteSpeakerCommand, + serializeAws_json1_0DeleteSpeakerCommand, +} from "../protocols/Aws_json1_0"; +import { ServiceInputTypes, ServiceOutputTypes, VoiceIDClientResolvedConfig } from "../VoiceIDClient"; + +export interface DeleteSpeakerCommandInput extends DeleteSpeakerRequest {} +export interface DeleteSpeakerCommandOutput extends __MetadataBearer {} + +/** + *

                  Deletes the specified speaker from the Amazon Connect Voice ID system.

                  + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { VoiceIDClient, DeleteSpeakerCommand } from "@aws-sdk/client-voice-id"; // ES Modules import + * // const { VoiceIDClient, DeleteSpeakerCommand } = require("@aws-sdk/client-voice-id"); // CommonJS import + * const client = new VoiceIDClient(config); + * const command = new DeleteSpeakerCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link DeleteSpeakerCommandInput} for command's `input` shape. + * @see {@link DeleteSpeakerCommandOutput} for command's `response` shape. + * @see {@link VoiceIDClientResolvedConfig | config} for command's `input` shape. + * + */ +export class DeleteSpeakerCommand extends $Command< + DeleteSpeakerCommandInput, + DeleteSpeakerCommandOutput, + VoiceIDClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DeleteSpeakerCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: VoiceIDClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "VoiceIDClient"; + const commandName = "DeleteSpeakerCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: DeleteSpeakerRequest.filterSensitiveLog, + outputFilterSensitiveLog: (output: any) => output, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: DeleteSpeakerCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_json1_0DeleteSpeakerCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_json1_0DeleteSpeakerCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-voice-id/src/commands/DescribeDomainCommand.ts b/clients/client-voice-id/src/commands/DescribeDomainCommand.ts new file mode 100644 index 0000000000000..e075a36fbcd60 --- /dev/null +++ b/clients/client-voice-id/src/commands/DescribeDomainCommand.ts @@ -0,0 +1,95 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { DescribeDomainRequest, DescribeDomainResponse } from "../models/models_0"; +import { + deserializeAws_json1_0DescribeDomainCommand, + serializeAws_json1_0DescribeDomainCommand, +} from "../protocols/Aws_json1_0"; +import { ServiceInputTypes, ServiceOutputTypes, VoiceIDClientResolvedConfig } from "../VoiceIDClient"; + +export interface DescribeDomainCommandInput extends DescribeDomainRequest {} +export interface DescribeDomainCommandOutput extends DescribeDomainResponse, __MetadataBearer {} + +/** + *

                  Describes the specified domain.

                  + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { VoiceIDClient, DescribeDomainCommand } from "@aws-sdk/client-voice-id"; // ES Modules import + * // const { VoiceIDClient, DescribeDomainCommand } = require("@aws-sdk/client-voice-id"); // CommonJS import + * const client = new VoiceIDClient(config); + * const command = new DescribeDomainCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link DescribeDomainCommandInput} for command's `input` shape. + * @see {@link DescribeDomainCommandOutput} for command's `response` shape. + * @see {@link VoiceIDClientResolvedConfig | config} for command's `input` shape. + * + */ +export class DescribeDomainCommand extends $Command< + DescribeDomainCommandInput, + DescribeDomainCommandOutput, + VoiceIDClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DescribeDomainCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: VoiceIDClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "VoiceIDClient"; + const commandName = "DescribeDomainCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: DescribeDomainRequest.filterSensitiveLog, + outputFilterSensitiveLog: DescribeDomainResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: DescribeDomainCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_json1_0DescribeDomainCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_json1_0DescribeDomainCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-voice-id/src/commands/DescribeFraudsterCommand.ts b/clients/client-voice-id/src/commands/DescribeFraudsterCommand.ts new file mode 100644 index 0000000000000..24a35f6e8ff97 --- /dev/null +++ b/clients/client-voice-id/src/commands/DescribeFraudsterCommand.ts @@ -0,0 +1,95 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { DescribeFraudsterRequest, DescribeFraudsterResponse } from "../models/models_0"; +import { + deserializeAws_json1_0DescribeFraudsterCommand, + serializeAws_json1_0DescribeFraudsterCommand, +} from "../protocols/Aws_json1_0"; +import { ServiceInputTypes, ServiceOutputTypes, VoiceIDClientResolvedConfig } from "../VoiceIDClient"; + +export interface DescribeFraudsterCommandInput extends DescribeFraudsterRequest {} +export interface DescribeFraudsterCommandOutput extends DescribeFraudsterResponse, __MetadataBearer {} + +/** + *

                  Describes the specified fraudster.

                  + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { VoiceIDClient, DescribeFraudsterCommand } from "@aws-sdk/client-voice-id"; // ES Modules import + * // const { VoiceIDClient, DescribeFraudsterCommand } = require("@aws-sdk/client-voice-id"); // CommonJS import + * const client = new VoiceIDClient(config); + * const command = new DescribeFraudsterCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link DescribeFraudsterCommandInput} for command's `input` shape. + * @see {@link DescribeFraudsterCommandOutput} for command's `response` shape. + * @see {@link VoiceIDClientResolvedConfig | config} for command's `input` shape. + * + */ +export class DescribeFraudsterCommand extends $Command< + DescribeFraudsterCommandInput, + DescribeFraudsterCommandOutput, + VoiceIDClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DescribeFraudsterCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: VoiceIDClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "VoiceIDClient"; + const commandName = "DescribeFraudsterCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: DescribeFraudsterRequest.filterSensitiveLog, + outputFilterSensitiveLog: DescribeFraudsterResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: DescribeFraudsterCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_json1_0DescribeFraudsterCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_json1_0DescribeFraudsterCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-voice-id/src/commands/DescribeFraudsterRegistrationJobCommand.ts b/clients/client-voice-id/src/commands/DescribeFraudsterRegistrationJobCommand.ts new file mode 100644 index 0000000000000..db2e2712a4d1c --- /dev/null +++ b/clients/client-voice-id/src/commands/DescribeFraudsterRegistrationJobCommand.ts @@ -0,0 +1,103 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { DescribeFraudsterRegistrationJobRequest, DescribeFraudsterRegistrationJobResponse } from "../models/models_0"; +import { + deserializeAws_json1_0DescribeFraudsterRegistrationJobCommand, + serializeAws_json1_0DescribeFraudsterRegistrationJobCommand, +} from "../protocols/Aws_json1_0"; +import { ServiceInputTypes, ServiceOutputTypes, VoiceIDClientResolvedConfig } from "../VoiceIDClient"; + +export interface DescribeFraudsterRegistrationJobCommandInput extends DescribeFraudsterRegistrationJobRequest {} +export interface DescribeFraudsterRegistrationJobCommandOutput + extends DescribeFraudsterRegistrationJobResponse, + __MetadataBearer {} + +/** + *

                  Describes the specified fraudster registration job.

                  + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { VoiceIDClient, DescribeFraudsterRegistrationJobCommand } from "@aws-sdk/client-voice-id"; // ES Modules import + * // const { VoiceIDClient, DescribeFraudsterRegistrationJobCommand } = require("@aws-sdk/client-voice-id"); // CommonJS import + * const client = new VoiceIDClient(config); + * const command = new DescribeFraudsterRegistrationJobCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link DescribeFraudsterRegistrationJobCommandInput} for command's `input` shape. + * @see {@link DescribeFraudsterRegistrationJobCommandOutput} for command's `response` shape. + * @see {@link VoiceIDClientResolvedConfig | config} for command's `input` shape. + * + */ +export class DescribeFraudsterRegistrationJobCommand extends $Command< + DescribeFraudsterRegistrationJobCommandInput, + DescribeFraudsterRegistrationJobCommandOutput, + VoiceIDClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DescribeFraudsterRegistrationJobCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: VoiceIDClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "VoiceIDClient"; + const commandName = "DescribeFraudsterRegistrationJobCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: DescribeFraudsterRegistrationJobRequest.filterSensitiveLog, + outputFilterSensitiveLog: DescribeFraudsterRegistrationJobResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: DescribeFraudsterRegistrationJobCommandInput, + context: __SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_0DescribeFraudsterRegistrationJobCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return deserializeAws_json1_0DescribeFraudsterRegistrationJobCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-voice-id/src/commands/DescribeSpeakerCommand.ts b/clients/client-voice-id/src/commands/DescribeSpeakerCommand.ts new file mode 100644 index 0000000000000..e4106cbc25744 --- /dev/null +++ b/clients/client-voice-id/src/commands/DescribeSpeakerCommand.ts @@ -0,0 +1,95 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { DescribeSpeakerRequest, DescribeSpeakerResponse } from "../models/models_0"; +import { + deserializeAws_json1_0DescribeSpeakerCommand, + serializeAws_json1_0DescribeSpeakerCommand, +} from "../protocols/Aws_json1_0"; +import { ServiceInputTypes, ServiceOutputTypes, VoiceIDClientResolvedConfig } from "../VoiceIDClient"; + +export interface DescribeSpeakerCommandInput extends DescribeSpeakerRequest {} +export interface DescribeSpeakerCommandOutput extends DescribeSpeakerResponse, __MetadataBearer {} + +/** + *

                  Describes the specified speaker.

                  + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { VoiceIDClient, DescribeSpeakerCommand } from "@aws-sdk/client-voice-id"; // ES Modules import + * // const { VoiceIDClient, DescribeSpeakerCommand } = require("@aws-sdk/client-voice-id"); // CommonJS import + * const client = new VoiceIDClient(config); + * const command = new DescribeSpeakerCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link DescribeSpeakerCommandInput} for command's `input` shape. + * @see {@link DescribeSpeakerCommandOutput} for command's `response` shape. + * @see {@link VoiceIDClientResolvedConfig | config} for command's `input` shape. + * + */ +export class DescribeSpeakerCommand extends $Command< + DescribeSpeakerCommandInput, + DescribeSpeakerCommandOutput, + VoiceIDClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DescribeSpeakerCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: VoiceIDClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "VoiceIDClient"; + const commandName = "DescribeSpeakerCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: DescribeSpeakerRequest.filterSensitiveLog, + outputFilterSensitiveLog: DescribeSpeakerResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: DescribeSpeakerCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_json1_0DescribeSpeakerCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_json1_0DescribeSpeakerCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-voice-id/src/commands/DescribeSpeakerEnrollmentJobCommand.ts b/clients/client-voice-id/src/commands/DescribeSpeakerEnrollmentJobCommand.ts new file mode 100644 index 0000000000000..983d57cd2da3e --- /dev/null +++ b/clients/client-voice-id/src/commands/DescribeSpeakerEnrollmentJobCommand.ts @@ -0,0 +1,100 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { DescribeSpeakerEnrollmentJobRequest, DescribeSpeakerEnrollmentJobResponse } from "../models/models_0"; +import { + deserializeAws_json1_0DescribeSpeakerEnrollmentJobCommand, + serializeAws_json1_0DescribeSpeakerEnrollmentJobCommand, +} from "../protocols/Aws_json1_0"; +import { ServiceInputTypes, ServiceOutputTypes, VoiceIDClientResolvedConfig } from "../VoiceIDClient"; + +export interface DescribeSpeakerEnrollmentJobCommandInput extends DescribeSpeakerEnrollmentJobRequest {} +export interface DescribeSpeakerEnrollmentJobCommandOutput + extends DescribeSpeakerEnrollmentJobResponse, + __MetadataBearer {} + +/** + *

                  Describes the specified speaker enrollment job.

                  + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { VoiceIDClient, DescribeSpeakerEnrollmentJobCommand } from "@aws-sdk/client-voice-id"; // ES Modules import + * // const { VoiceIDClient, DescribeSpeakerEnrollmentJobCommand } = require("@aws-sdk/client-voice-id"); // CommonJS import + * const client = new VoiceIDClient(config); + * const command = new DescribeSpeakerEnrollmentJobCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link DescribeSpeakerEnrollmentJobCommandInput} for command's `input` shape. + * @see {@link DescribeSpeakerEnrollmentJobCommandOutput} for command's `response` shape. + * @see {@link VoiceIDClientResolvedConfig | config} for command's `input` shape. + * + */ +export class DescribeSpeakerEnrollmentJobCommand extends $Command< + DescribeSpeakerEnrollmentJobCommandInput, + DescribeSpeakerEnrollmentJobCommandOutput, + VoiceIDClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DescribeSpeakerEnrollmentJobCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: VoiceIDClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "VoiceIDClient"; + const commandName = "DescribeSpeakerEnrollmentJobCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: DescribeSpeakerEnrollmentJobRequest.filterSensitiveLog, + outputFilterSensitiveLog: DescribeSpeakerEnrollmentJobResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: DescribeSpeakerEnrollmentJobCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_json1_0DescribeSpeakerEnrollmentJobCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return deserializeAws_json1_0DescribeSpeakerEnrollmentJobCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-voice-id/src/commands/EvaluateSessionCommand.ts b/clients/client-voice-id/src/commands/EvaluateSessionCommand.ts new file mode 100644 index 0000000000000..8ca5e948da80e --- /dev/null +++ b/clients/client-voice-id/src/commands/EvaluateSessionCommand.ts @@ -0,0 +1,96 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { EvaluateSessionRequest, EvaluateSessionResponse } from "../models/models_0"; +import { + deserializeAws_json1_0EvaluateSessionCommand, + serializeAws_json1_0EvaluateSessionCommand, +} from "../protocols/Aws_json1_0"; +import { ServiceInputTypes, ServiceOutputTypes, VoiceIDClientResolvedConfig } from "../VoiceIDClient"; + +export interface EvaluateSessionCommandInput extends EvaluateSessionRequest {} +export interface EvaluateSessionCommandOutput extends EvaluateSessionResponse, __MetadataBearer {} + +/** + *

                  Evaluates a specified session based on audio data accumulated during a streaming Amazon Connect Voice + * ID call.

                  + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { VoiceIDClient, EvaluateSessionCommand } from "@aws-sdk/client-voice-id"; // ES Modules import + * // const { VoiceIDClient, EvaluateSessionCommand } = require("@aws-sdk/client-voice-id"); // CommonJS import + * const client = new VoiceIDClient(config); + * const command = new EvaluateSessionCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link EvaluateSessionCommandInput} for command's `input` shape. + * @see {@link EvaluateSessionCommandOutput} for command's `response` shape. + * @see {@link VoiceIDClientResolvedConfig | config} for command's `input` shape. + * + */ +export class EvaluateSessionCommand extends $Command< + EvaluateSessionCommandInput, + EvaluateSessionCommandOutput, + VoiceIDClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: EvaluateSessionCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: VoiceIDClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "VoiceIDClient"; + const commandName = "EvaluateSessionCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: EvaluateSessionRequest.filterSensitiveLog, + outputFilterSensitiveLog: EvaluateSessionResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: EvaluateSessionCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_json1_0EvaluateSessionCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_json1_0EvaluateSessionCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-voice-id/src/commands/ListDomainsCommand.ts b/clients/client-voice-id/src/commands/ListDomainsCommand.ts new file mode 100644 index 0000000000000..53e6557a1aa0c --- /dev/null +++ b/clients/client-voice-id/src/commands/ListDomainsCommand.ts @@ -0,0 +1,96 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { ListDomainsRequest, ListDomainsResponse } from "../models/models_0"; +import { + deserializeAws_json1_0ListDomainsCommand, + serializeAws_json1_0ListDomainsCommand, +} from "../protocols/Aws_json1_0"; +import { ServiceInputTypes, ServiceOutputTypes, VoiceIDClientResolvedConfig } from "../VoiceIDClient"; + +export interface ListDomainsCommandInput extends ListDomainsRequest {} +export interface ListDomainsCommandOutput extends ListDomainsResponse, __MetadataBearer {} + +/** + *

                  Lists all the domains in the Amazon Web Services account. + *

                  + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { VoiceIDClient, ListDomainsCommand } from "@aws-sdk/client-voice-id"; // ES Modules import + * // const { VoiceIDClient, ListDomainsCommand } = require("@aws-sdk/client-voice-id"); // CommonJS import + * const client = new VoiceIDClient(config); + * const command = new ListDomainsCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link ListDomainsCommandInput} for command's `input` shape. + * @see {@link ListDomainsCommandOutput} for command's `response` shape. + * @see {@link VoiceIDClientResolvedConfig | config} for command's `input` shape. + * + */ +export class ListDomainsCommand extends $Command< + ListDomainsCommandInput, + ListDomainsCommandOutput, + VoiceIDClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: ListDomainsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: VoiceIDClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "VoiceIDClient"; + const commandName = "ListDomainsCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: ListDomainsRequest.filterSensitiveLog, + outputFilterSensitiveLog: ListDomainsResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: ListDomainsCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_json1_0ListDomainsCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_json1_0ListDomainsCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-voice-id/src/commands/ListFraudsterRegistrationJobsCommand.ts b/clients/client-voice-id/src/commands/ListFraudsterRegistrationJobsCommand.ts new file mode 100644 index 0000000000000..6460468064b8d --- /dev/null +++ b/clients/client-voice-id/src/commands/ListFraudsterRegistrationJobsCommand.ts @@ -0,0 +1,103 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { ListFraudsterRegistrationJobsRequest, ListFraudsterRegistrationJobsResponse } from "../models/models_0"; +import { + deserializeAws_json1_0ListFraudsterRegistrationJobsCommand, + serializeAws_json1_0ListFraudsterRegistrationJobsCommand, +} from "../protocols/Aws_json1_0"; +import { ServiceInputTypes, ServiceOutputTypes, VoiceIDClientResolvedConfig } from "../VoiceIDClient"; + +export interface ListFraudsterRegistrationJobsCommandInput extends ListFraudsterRegistrationJobsRequest {} +export interface ListFraudsterRegistrationJobsCommandOutput + extends ListFraudsterRegistrationJobsResponse, + __MetadataBearer {} + +/** + *

                  Lists all the fraudster registration jobs in the domain with the given JobStatus. + * If JobStatus is not provided, this lists all fraudster registration jobs in the given + * domain. + *

                  + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { VoiceIDClient, ListFraudsterRegistrationJobsCommand } from "@aws-sdk/client-voice-id"; // ES Modules import + * // const { VoiceIDClient, ListFraudsterRegistrationJobsCommand } = require("@aws-sdk/client-voice-id"); // CommonJS import + * const client = new VoiceIDClient(config); + * const command = new ListFraudsterRegistrationJobsCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link ListFraudsterRegistrationJobsCommandInput} for command's `input` shape. + * @see {@link ListFraudsterRegistrationJobsCommandOutput} for command's `response` shape. + * @see {@link VoiceIDClientResolvedConfig | config} for command's `input` shape. + * + */ +export class ListFraudsterRegistrationJobsCommand extends $Command< + ListFraudsterRegistrationJobsCommandInput, + ListFraudsterRegistrationJobsCommandOutput, + VoiceIDClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: ListFraudsterRegistrationJobsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: VoiceIDClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "VoiceIDClient"; + const commandName = "ListFraudsterRegistrationJobsCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: ListFraudsterRegistrationJobsRequest.filterSensitiveLog, + outputFilterSensitiveLog: ListFraudsterRegistrationJobsResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: ListFraudsterRegistrationJobsCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_json1_0ListFraudsterRegistrationJobsCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return deserializeAws_json1_0ListFraudsterRegistrationJobsCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-voice-id/src/commands/ListSpeakerEnrollmentJobsCommand.ts b/clients/client-voice-id/src/commands/ListSpeakerEnrollmentJobsCommand.ts new file mode 100644 index 0000000000000..93c6260464bcc --- /dev/null +++ b/clients/client-voice-id/src/commands/ListSpeakerEnrollmentJobsCommand.ts @@ -0,0 +1,100 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { ListSpeakerEnrollmentJobsRequest, ListSpeakerEnrollmentJobsResponse } from "../models/models_0"; +import { + deserializeAws_json1_0ListSpeakerEnrollmentJobsCommand, + serializeAws_json1_0ListSpeakerEnrollmentJobsCommand, +} from "../protocols/Aws_json1_0"; +import { ServiceInputTypes, ServiceOutputTypes, VoiceIDClientResolvedConfig } from "../VoiceIDClient"; + +export interface ListSpeakerEnrollmentJobsCommandInput extends ListSpeakerEnrollmentJobsRequest {} +export interface ListSpeakerEnrollmentJobsCommandOutput extends ListSpeakerEnrollmentJobsResponse, __MetadataBearer {} + +/** + *

                  Lists all the speaker enrollment jobs in the domain with the specified JobStatus. If + * JobStatus is not provided, this lists all jobs with all possible speaker enrollment job + * statuses.

                  + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { VoiceIDClient, ListSpeakerEnrollmentJobsCommand } from "@aws-sdk/client-voice-id"; // ES Modules import + * // const { VoiceIDClient, ListSpeakerEnrollmentJobsCommand } = require("@aws-sdk/client-voice-id"); // CommonJS import + * const client = new VoiceIDClient(config); + * const command = new ListSpeakerEnrollmentJobsCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link ListSpeakerEnrollmentJobsCommandInput} for command's `input` shape. + * @see {@link ListSpeakerEnrollmentJobsCommandOutput} for command's `response` shape. + * @see {@link VoiceIDClientResolvedConfig | config} for command's `input` shape. + * + */ +export class ListSpeakerEnrollmentJobsCommand extends $Command< + ListSpeakerEnrollmentJobsCommandInput, + ListSpeakerEnrollmentJobsCommandOutput, + VoiceIDClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: ListSpeakerEnrollmentJobsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: VoiceIDClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "VoiceIDClient"; + const commandName = "ListSpeakerEnrollmentJobsCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: ListSpeakerEnrollmentJobsRequest.filterSensitiveLog, + outputFilterSensitiveLog: ListSpeakerEnrollmentJobsResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: ListSpeakerEnrollmentJobsCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_json1_0ListSpeakerEnrollmentJobsCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return deserializeAws_json1_0ListSpeakerEnrollmentJobsCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-voice-id/src/commands/ListSpeakersCommand.ts b/clients/client-voice-id/src/commands/ListSpeakersCommand.ts new file mode 100644 index 0000000000000..0fa38ef499a5f --- /dev/null +++ b/clients/client-voice-id/src/commands/ListSpeakersCommand.ts @@ -0,0 +1,95 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { ListSpeakersRequest, ListSpeakersResponse } from "../models/models_0"; +import { + deserializeAws_json1_0ListSpeakersCommand, + serializeAws_json1_0ListSpeakersCommand, +} from "../protocols/Aws_json1_0"; +import { ServiceInputTypes, ServiceOutputTypes, VoiceIDClientResolvedConfig } from "../VoiceIDClient"; + +export interface ListSpeakersCommandInput extends ListSpeakersRequest {} +export interface ListSpeakersCommandOutput extends ListSpeakersResponse, __MetadataBearer {} + +/** + *

                  Lists all speakers in a specified domain.

                  + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { VoiceIDClient, ListSpeakersCommand } from "@aws-sdk/client-voice-id"; // ES Modules import + * // const { VoiceIDClient, ListSpeakersCommand } = require("@aws-sdk/client-voice-id"); // CommonJS import + * const client = new VoiceIDClient(config); + * const command = new ListSpeakersCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link ListSpeakersCommandInput} for command's `input` shape. + * @see {@link ListSpeakersCommandOutput} for command's `response` shape. + * @see {@link VoiceIDClientResolvedConfig | config} for command's `input` shape. + * + */ +export class ListSpeakersCommand extends $Command< + ListSpeakersCommandInput, + ListSpeakersCommandOutput, + VoiceIDClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: ListSpeakersCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: VoiceIDClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "VoiceIDClient"; + const commandName = "ListSpeakersCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: ListSpeakersRequest.filterSensitiveLog, + outputFilterSensitiveLog: ListSpeakersResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: ListSpeakersCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_json1_0ListSpeakersCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_json1_0ListSpeakersCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-voice-id/src/commands/ListTagsForResourceCommand.ts b/clients/client-voice-id/src/commands/ListTagsForResourceCommand.ts new file mode 100644 index 0000000000000..250a96c8c4d5e --- /dev/null +++ b/clients/client-voice-id/src/commands/ListTagsForResourceCommand.ts @@ -0,0 +1,95 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { ListTagsForResourceRequest, ListTagsForResourceResponse } from "../models/models_0"; +import { + deserializeAws_json1_0ListTagsForResourceCommand, + serializeAws_json1_0ListTagsForResourceCommand, +} from "../protocols/Aws_json1_0"; +import { ServiceInputTypes, ServiceOutputTypes, VoiceIDClientResolvedConfig } from "../VoiceIDClient"; + +export interface ListTagsForResourceCommandInput extends ListTagsForResourceRequest {} +export interface ListTagsForResourceCommandOutput extends ListTagsForResourceResponse, __MetadataBearer {} + +/** + *

                  Lists all tags associated with a specified Voice ID resource.

                  + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { VoiceIDClient, ListTagsForResourceCommand } from "@aws-sdk/client-voice-id"; // ES Modules import + * // const { VoiceIDClient, ListTagsForResourceCommand } = require("@aws-sdk/client-voice-id"); // CommonJS import + * const client = new VoiceIDClient(config); + * const command = new ListTagsForResourceCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link ListTagsForResourceCommandInput} for command's `input` shape. + * @see {@link ListTagsForResourceCommandOutput} for command's `response` shape. + * @see {@link VoiceIDClientResolvedConfig | config} for command's `input` shape. + * + */ +export class ListTagsForResourceCommand extends $Command< + ListTagsForResourceCommandInput, + ListTagsForResourceCommandOutput, + VoiceIDClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: ListTagsForResourceCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: VoiceIDClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "VoiceIDClient"; + const commandName = "ListTagsForResourceCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: ListTagsForResourceRequest.filterSensitiveLog, + outputFilterSensitiveLog: ListTagsForResourceResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: ListTagsForResourceCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_json1_0ListTagsForResourceCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_json1_0ListTagsForResourceCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-voice-id/src/commands/OptOutSpeakerCommand.ts b/clients/client-voice-id/src/commands/OptOutSpeakerCommand.ts new file mode 100644 index 0000000000000..412af7fc8feb5 --- /dev/null +++ b/clients/client-voice-id/src/commands/OptOutSpeakerCommand.ts @@ -0,0 +1,99 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { OptOutSpeakerRequest, OptOutSpeakerResponse } from "../models/models_0"; +import { + deserializeAws_json1_0OptOutSpeakerCommand, + serializeAws_json1_0OptOutSpeakerCommand, +} from "../protocols/Aws_json1_0"; +import { ServiceInputTypes, ServiceOutputTypes, VoiceIDClientResolvedConfig } from "../VoiceIDClient"; + +export interface OptOutSpeakerCommandInput extends OptOutSpeakerRequest {} +export interface OptOutSpeakerCommandOutput extends OptOutSpeakerResponse, __MetadataBearer {} + +/** + *

                  Opts out a speaker from Voice ID system. A speaker can be opted out regardless of whether or not they + * already exist in the system. If they don't yet exist, a new speaker is created in an opted out state. + * If they already exist, their existing status is overridden and they are opted out. Enrollment and + * evaluation authentication requests are rejected for opted out speakers, and opted out speakers have + * no voice embeddings stored in the system.

                  + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { VoiceIDClient, OptOutSpeakerCommand } from "@aws-sdk/client-voice-id"; // ES Modules import + * // const { VoiceIDClient, OptOutSpeakerCommand } = require("@aws-sdk/client-voice-id"); // CommonJS import + * const client = new VoiceIDClient(config); + * const command = new OptOutSpeakerCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link OptOutSpeakerCommandInput} for command's `input` shape. + * @see {@link OptOutSpeakerCommandOutput} for command's `response` shape. + * @see {@link VoiceIDClientResolvedConfig | config} for command's `input` shape. + * + */ +export class OptOutSpeakerCommand extends $Command< + OptOutSpeakerCommandInput, + OptOutSpeakerCommandOutput, + VoiceIDClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: OptOutSpeakerCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: VoiceIDClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "VoiceIDClient"; + const commandName = "OptOutSpeakerCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: OptOutSpeakerRequest.filterSensitiveLog, + outputFilterSensitiveLog: OptOutSpeakerResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: OptOutSpeakerCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_json1_0OptOutSpeakerCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_json1_0OptOutSpeakerCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-voice-id/src/commands/StartFraudsterRegistrationJobCommand.ts b/clients/client-voice-id/src/commands/StartFraudsterRegistrationJobCommand.ts new file mode 100644 index 0000000000000..e75ed0cd11265 --- /dev/null +++ b/clients/client-voice-id/src/commands/StartFraudsterRegistrationJobCommand.ts @@ -0,0 +1,100 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { StartFraudsterRegistrationJobRequest, StartFraudsterRegistrationJobResponse } from "../models/models_0"; +import { + deserializeAws_json1_0StartFraudsterRegistrationJobCommand, + serializeAws_json1_0StartFraudsterRegistrationJobCommand, +} from "../protocols/Aws_json1_0"; +import { ServiceInputTypes, ServiceOutputTypes, VoiceIDClientResolvedConfig } from "../VoiceIDClient"; + +export interface StartFraudsterRegistrationJobCommandInput extends StartFraudsterRegistrationJobRequest {} +export interface StartFraudsterRegistrationJobCommandOutput + extends StartFraudsterRegistrationJobResponse, + __MetadataBearer {} + +/** + *

                  Starts a new batch fraudster registration job using provided details.

                  + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { VoiceIDClient, StartFraudsterRegistrationJobCommand } from "@aws-sdk/client-voice-id"; // ES Modules import + * // const { VoiceIDClient, StartFraudsterRegistrationJobCommand } = require("@aws-sdk/client-voice-id"); // CommonJS import + * const client = new VoiceIDClient(config); + * const command = new StartFraudsterRegistrationJobCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link StartFraudsterRegistrationJobCommandInput} for command's `input` shape. + * @see {@link StartFraudsterRegistrationJobCommandOutput} for command's `response` shape. + * @see {@link VoiceIDClientResolvedConfig | config} for command's `input` shape. + * + */ +export class StartFraudsterRegistrationJobCommand extends $Command< + StartFraudsterRegistrationJobCommandInput, + StartFraudsterRegistrationJobCommandOutput, + VoiceIDClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: StartFraudsterRegistrationJobCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: VoiceIDClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "VoiceIDClient"; + const commandName = "StartFraudsterRegistrationJobCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: StartFraudsterRegistrationJobRequest.filterSensitiveLog, + outputFilterSensitiveLog: StartFraudsterRegistrationJobResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: StartFraudsterRegistrationJobCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_json1_0StartFraudsterRegistrationJobCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return deserializeAws_json1_0StartFraudsterRegistrationJobCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-voice-id/src/commands/StartSpeakerEnrollmentJobCommand.ts b/clients/client-voice-id/src/commands/StartSpeakerEnrollmentJobCommand.ts new file mode 100644 index 0000000000000..cf4f7d9b8460c --- /dev/null +++ b/clients/client-voice-id/src/commands/StartSpeakerEnrollmentJobCommand.ts @@ -0,0 +1,98 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { StartSpeakerEnrollmentJobRequest, StartSpeakerEnrollmentJobResponse } from "../models/models_0"; +import { + deserializeAws_json1_0StartSpeakerEnrollmentJobCommand, + serializeAws_json1_0StartSpeakerEnrollmentJobCommand, +} from "../protocols/Aws_json1_0"; +import { ServiceInputTypes, ServiceOutputTypes, VoiceIDClientResolvedConfig } from "../VoiceIDClient"; + +export interface StartSpeakerEnrollmentJobCommandInput extends StartSpeakerEnrollmentJobRequest {} +export interface StartSpeakerEnrollmentJobCommandOutput extends StartSpeakerEnrollmentJobResponse, __MetadataBearer {} + +/** + *

                  Starts a new batch speaker enrollment job using specified details.

                  + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { VoiceIDClient, StartSpeakerEnrollmentJobCommand } from "@aws-sdk/client-voice-id"; // ES Modules import + * // const { VoiceIDClient, StartSpeakerEnrollmentJobCommand } = require("@aws-sdk/client-voice-id"); // CommonJS import + * const client = new VoiceIDClient(config); + * const command = new StartSpeakerEnrollmentJobCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link StartSpeakerEnrollmentJobCommandInput} for command's `input` shape. + * @see {@link StartSpeakerEnrollmentJobCommandOutput} for command's `response` shape. + * @see {@link VoiceIDClientResolvedConfig | config} for command's `input` shape. + * + */ +export class StartSpeakerEnrollmentJobCommand extends $Command< + StartSpeakerEnrollmentJobCommandInput, + StartSpeakerEnrollmentJobCommandOutput, + VoiceIDClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: StartSpeakerEnrollmentJobCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: VoiceIDClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "VoiceIDClient"; + const commandName = "StartSpeakerEnrollmentJobCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: StartSpeakerEnrollmentJobRequest.filterSensitiveLog, + outputFilterSensitiveLog: StartSpeakerEnrollmentJobResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: StartSpeakerEnrollmentJobCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_json1_0StartSpeakerEnrollmentJobCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return deserializeAws_json1_0StartSpeakerEnrollmentJobCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-voice-id/src/commands/TagResourceCommand.ts b/clients/client-voice-id/src/commands/TagResourceCommand.ts new file mode 100644 index 0000000000000..7c788b14738ee --- /dev/null +++ b/clients/client-voice-id/src/commands/TagResourceCommand.ts @@ -0,0 +1,95 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { TagResourceRequest, TagResourceResponse } from "../models/models_0"; +import { + deserializeAws_json1_0TagResourceCommand, + serializeAws_json1_0TagResourceCommand, +} from "../protocols/Aws_json1_0"; +import { ServiceInputTypes, ServiceOutputTypes, VoiceIDClientResolvedConfig } from "../VoiceIDClient"; + +export interface TagResourceCommandInput extends TagResourceRequest {} +export interface TagResourceCommandOutput extends TagResourceResponse, __MetadataBearer {} + +/** + *

                  Tags an Amazon Connect Voice ID resource with the provided list of tags.

                  + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { VoiceIDClient, TagResourceCommand } from "@aws-sdk/client-voice-id"; // ES Modules import + * // const { VoiceIDClient, TagResourceCommand } = require("@aws-sdk/client-voice-id"); // CommonJS import + * const client = new VoiceIDClient(config); + * const command = new TagResourceCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link TagResourceCommandInput} for command's `input` shape. + * @see {@link TagResourceCommandOutput} for command's `response` shape. + * @see {@link VoiceIDClientResolvedConfig | config} for command's `input` shape. + * + */ +export class TagResourceCommand extends $Command< + TagResourceCommandInput, + TagResourceCommandOutput, + VoiceIDClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: TagResourceCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: VoiceIDClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "VoiceIDClient"; + const commandName = "TagResourceCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: TagResourceRequest.filterSensitiveLog, + outputFilterSensitiveLog: TagResourceResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: TagResourceCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_json1_0TagResourceCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_json1_0TagResourceCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-voice-id/src/commands/UntagResourceCommand.ts b/clients/client-voice-id/src/commands/UntagResourceCommand.ts new file mode 100644 index 0000000000000..3caf09cf42b78 --- /dev/null +++ b/clients/client-voice-id/src/commands/UntagResourceCommand.ts @@ -0,0 +1,95 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { UntagResourceRequest, UntagResourceResponse } from "../models/models_0"; +import { + deserializeAws_json1_0UntagResourceCommand, + serializeAws_json1_0UntagResourceCommand, +} from "../protocols/Aws_json1_0"; +import { ServiceInputTypes, ServiceOutputTypes, VoiceIDClientResolvedConfig } from "../VoiceIDClient"; + +export interface UntagResourceCommandInput extends UntagResourceRequest {} +export interface UntagResourceCommandOutput extends UntagResourceResponse, __MetadataBearer {} + +/** + *

                  Removes specified tags from a specified Amazon Connect Voice ID resource.

                  + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { VoiceIDClient, UntagResourceCommand } from "@aws-sdk/client-voice-id"; // ES Modules import + * // const { VoiceIDClient, UntagResourceCommand } = require("@aws-sdk/client-voice-id"); // CommonJS import + * const client = new VoiceIDClient(config); + * const command = new UntagResourceCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link UntagResourceCommandInput} for command's `input` shape. + * @see {@link UntagResourceCommandOutput} for command's `response` shape. + * @see {@link VoiceIDClientResolvedConfig | config} for command's `input` shape. + * + */ +export class UntagResourceCommand extends $Command< + UntagResourceCommandInput, + UntagResourceCommandOutput, + VoiceIDClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: UntagResourceCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: VoiceIDClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "VoiceIDClient"; + const commandName = "UntagResourceCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: UntagResourceRequest.filterSensitiveLog, + outputFilterSensitiveLog: UntagResourceResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: UntagResourceCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_json1_0UntagResourceCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_json1_0UntagResourceCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-voice-id/src/commands/UpdateDomainCommand.ts b/clients/client-voice-id/src/commands/UpdateDomainCommand.ts new file mode 100644 index 0000000000000..aca342a9f166a --- /dev/null +++ b/clients/client-voice-id/src/commands/UpdateDomainCommand.ts @@ -0,0 +1,96 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { UpdateDomainRequest, UpdateDomainResponse } from "../models/models_0"; +import { + deserializeAws_json1_0UpdateDomainCommand, + serializeAws_json1_0UpdateDomainCommand, +} from "../protocols/Aws_json1_0"; +import { ServiceInputTypes, ServiceOutputTypes, VoiceIDClientResolvedConfig } from "../VoiceIDClient"; + +export interface UpdateDomainCommandInput extends UpdateDomainRequest {} +export interface UpdateDomainCommandOutput extends UpdateDomainResponse, __MetadataBearer {} + +/** + *

                  Updates the specified domain. This API has clobber behavior, and clears and replaces all attributes. + * If an optional field, such as 'Description' is not provided, it is removed from the domain.

                  + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { VoiceIDClient, UpdateDomainCommand } from "@aws-sdk/client-voice-id"; // ES Modules import + * // const { VoiceIDClient, UpdateDomainCommand } = require("@aws-sdk/client-voice-id"); // CommonJS import + * const client = new VoiceIDClient(config); + * const command = new UpdateDomainCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link UpdateDomainCommandInput} for command's `input` shape. + * @see {@link UpdateDomainCommandOutput} for command's `response` shape. + * @see {@link VoiceIDClientResolvedConfig | config} for command's `input` shape. + * + */ +export class UpdateDomainCommand extends $Command< + UpdateDomainCommandInput, + UpdateDomainCommandOutput, + VoiceIDClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: UpdateDomainCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: VoiceIDClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "VoiceIDClient"; + const commandName = "UpdateDomainCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: UpdateDomainRequest.filterSensitiveLog, + outputFilterSensitiveLog: UpdateDomainResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: UpdateDomainCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_json1_0UpdateDomainCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_json1_0UpdateDomainCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-voice-id/src/endpoints.ts b/clients/client-voice-id/src/endpoints.ts new file mode 100644 index 0000000000000..f3462094c5007 --- /dev/null +++ b/clients/client-voice-id/src/endpoints.ts @@ -0,0 +1,57 @@ +import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; +import { RegionInfoProvider } from "@aws-sdk/types"; + +const regionHash: RegionHash = {}; + +const partitionHash: PartitionHash = { + aws: { + regions: [ + "af-south-1", + "ap-east-1", + "ap-northeast-1", + "ap-northeast-2", + "ap-northeast-3", + "ap-south-1", + "ap-southeast-1", + "ap-southeast-2", + "ca-central-1", + "eu-central-1", + "eu-north-1", + "eu-south-1", + "eu-west-1", + "eu-west-2", + "eu-west-3", + "me-south-1", + "sa-east-1", + "us-east-1", + "us-east-2", + "us-west-1", + "us-west-2", + ], + hostname: "voiceid.{region}.amazonaws.com", + }, + "aws-cn": { + regions: ["cn-north-1", "cn-northwest-1"], + hostname: "voiceid.{region}.amazonaws.com.cn", + }, + "aws-iso": { + regions: ["us-iso-east-1"], + hostname: "voiceid.{region}.c2s.ic.gov", + }, + "aws-iso-b": { + regions: ["us-isob-east-1"], + hostname: "voiceid.{region}.sc2s.sgov.gov", + }, + "aws-us-gov": { + regions: ["us-gov-east-1", "us-gov-west-1"], + hostname: "voiceid.{region}.amazonaws.com", + }, +}; + +export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => + getRegionInfo(region, { + ...options, + signingService: "voiceid", + regionHash, + partitionHash, + }); diff --git a/clients/client-voice-id/src/index.ts b/clients/client-voice-id/src/index.ts new file mode 100644 index 0000000000000..dd562f495f609 --- /dev/null +++ b/clients/client-voice-id/src/index.ts @@ -0,0 +1,29 @@ +export * from "./VoiceIDClient"; +export * from "./VoiceID"; +export * from "./commands/CreateDomainCommand"; +export * from "./commands/DeleteDomainCommand"; +export * from "./commands/DeleteFraudsterCommand"; +export * from "./commands/DeleteSpeakerCommand"; +export * from "./commands/DescribeDomainCommand"; +export * from "./commands/DescribeFraudsterCommand"; +export * from "./commands/DescribeFraudsterRegistrationJobCommand"; +export * from "./commands/DescribeSpeakerCommand"; +export * from "./commands/DescribeSpeakerEnrollmentJobCommand"; +export * from "./commands/EvaluateSessionCommand"; +export * from "./commands/ListDomainsCommand"; +export * from "./pagination/ListDomainsPaginator"; +export * from "./commands/ListFraudsterRegistrationJobsCommand"; +export * from "./pagination/ListFraudsterRegistrationJobsPaginator"; +export * from "./commands/ListSpeakerEnrollmentJobsCommand"; +export * from "./pagination/ListSpeakerEnrollmentJobsPaginator"; +export * from "./commands/ListSpeakersCommand"; +export * from "./pagination/ListSpeakersPaginator"; +export * from "./commands/ListTagsForResourceCommand"; +export * from "./commands/OptOutSpeakerCommand"; +export * from "./commands/StartFraudsterRegistrationJobCommand"; +export * from "./commands/StartSpeakerEnrollmentJobCommand"; +export * from "./commands/TagResourceCommand"; +export * from "./commands/UntagResourceCommand"; +export * from "./commands/UpdateDomainCommand"; +export * from "./pagination/Interfaces"; +export * from "./models/index"; diff --git a/clients/client-voice-id/src/models/index.ts b/clients/client-voice-id/src/models/index.ts new file mode 100644 index 0000000000000..09c5d6e09b8c5 --- /dev/null +++ b/clients/client-voice-id/src/models/index.ts @@ -0,0 +1 @@ +export * from "./models_0"; diff --git a/clients/client-voice-id/src/models/models_0.ts b/clients/client-voice-id/src/models/models_0.ts new file mode 100644 index 0000000000000..d712f07e339dc --- /dev/null +++ b/clients/client-voice-id/src/models/models_0.ts @@ -0,0 +1,2153 @@ +import { SENSITIVE_STRING } from "@aws-sdk/smithy-client"; +import { MetadataBearer as $MetadataBearer, SmithyException as __SmithyException } from "@aws-sdk/types"; + +/** + *

                  You do not have sufficient permissions to perform this action. Check the error message and try + * again.

                  + */ +export interface AccessDeniedException extends __SmithyException, $MetadataBearer { + name: "AccessDeniedException"; + $fault: "client"; + Message?: string; +} + +export namespace AccessDeniedException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: AccessDeniedException): any => ({ + ...obj, + }); +} + +/** + *

                  The configuration used to authenticate a speaker during a session.

                  + */ +export interface AuthenticationConfiguration { + /** + *

                  The minimum threshold needed to successfully authenticate a speaker.

                  + */ + AcceptanceThreshold: number | undefined; +} + +export namespace AuthenticationConfiguration { + /** + * @internal + */ + export const filterSensitiveLog = (obj: AuthenticationConfiguration): any => ({ + ...obj, + }); +} + +export enum AuthenticationDecision { + ACCEPT = "ACCEPT", + NOT_ENOUGH_SPEECH = "NOT_ENOUGH_SPEECH", + REJECT = "REJECT", + SPEAKER_ID_NOT_PROVIDED = "SPEAKER_ID_NOT_PROVIDED", + SPEAKER_NOT_ENROLLED = "SPEAKER_NOT_ENROLLED", + SPEAKER_OPTED_OUT = "SPEAKER_OPTED_OUT", +} + +/** + *

                  The authentication result produced by Voice ID, processed against the current session state and streamed + * audio of the speaker.

                  + */ +export interface AuthenticationResult { + /** + *

                  The unique identifier for this authentication result. Because there can be multiple authentications + * for a given session, this field helps to identify if the returned result is from a previous streaming + * activity or a new result. Note that in absence of any new streaming activity, + * AcceptanceThreshold changes, or SpeakerId changes, Voice ID + * always returns cached Authentication Result for this API.

                  + */ + AuthenticationResultId?: string; + + /** + *

                  A timestamp indicating when audio aggregation started for this authentication result.

                  + */ + AudioAggregationStartedAt?: Date; + + /** + *

                  A timestamp indicating when audio aggregation ended for this authentication result.

                  + */ + AudioAggregationEndedAt?: Date; + + /** + *

                  The client-provided identifier for the speaker whose authentication result is produced. Only present if a + * SpeakerId is provided for the session.

                  + */ + CustomerSpeakerId?: string; + + /** + *

                  The service-generated identifier for the speaker whose authentication result is produced.

                  + */ + GeneratedSpeakerId?: string; + + /** + *

                  The authentication decision produced by Voice ID, processed against the current session state and streamed + * audio of the speaker.

                  + */ + Decision?: AuthenticationDecision | string; + + /** + *

                  The authentication score for the speaker whose authentication result is produced. This value is + * only present if the authentication decision is either ACCEPT or REJECT.

                  + */ + Score?: number; + + /** + *

                  The AuthenticationConfiguration used to generate this authentication result.

                  + */ + Configuration?: AuthenticationConfiguration; +} + +export namespace AuthenticationResult { + /** + * @internal + */ + export const filterSensitiveLog = (obj: AuthenticationResult): any => ({ + ...obj, + ...(obj.CustomerSpeakerId && { CustomerSpeakerId: SENSITIVE_STRING }), + }); +} + +export enum ConflictType { + ANOTHER_ACTIVE_STREAM = "ANOTHER_ACTIVE_STREAM", + CANNOT_CHANGE_SPEAKER_AFTER_ENROLLMENT = "CANNOT_CHANGE_SPEAKER_AFTER_ENROLLMENT", + CONCURRENT_CHANGES = "CONCURRENT_CHANGES", + DOMAIN_NOT_ACTIVE = "DOMAIN_NOT_ACTIVE", + ENROLLMENT_ALREADY_EXISTS = "ENROLLMENT_ALREADY_EXISTS", + SPEAKER_NOT_SET = "SPEAKER_NOT_SET", + SPEAKER_OPTED_OUT = "SPEAKER_OPTED_OUT", +} + +/** + *

                  The request failed due to a conflict. Check the ConflictType and error message for + * more details.

                  + */ +export interface ConflictException extends __SmithyException, $MetadataBearer { + name: "ConflictException"; + $fault: "client"; + Message?: string; + /** + *

                  The type of conflict which caused a ConflictException. Possible types and the corresponding error messages + * are as follows:

                  + *
                    + *
                  • + *

                    + * DOMAIN_NOT_ACTIVE: The domain is not active.

                    + *
                  • + *
                  • + *

                    + * CANNOT_CHANGE_SPEAKER_AFTER_ENROLLMENT: You cannot change the speaker ID after an enrollment has been requested.

                    + *
                  • + *
                  • + *

                    + * ENROLLMENT_ALREADY_EXISTS: There is already an enrollment for this session.

                    + *
                  • + *
                  • + *

                    + * SPEAKER_NOT_SET: You must set the speaker ID before requesting an enrollment.

                    + *
                  • + *
                  • + *

                    + * SPEAKER_OPTED_OUT: You cannot request an enrollment for an opted out speaker.

                    + *
                  • + *
                  • + *

                    + * CONCURRENT_CHANGES: The request could not be processed as the resource was modified by another request during execution.

                    + *
                  • + *
                  + */ + ConflictType?: ConflictType | string; +} + +export namespace ConflictException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ConflictException): any => ({ + ...obj, + }); +} + +/** + *

                  The configuration containing information about the customer-managed KMS Key used for encrypting + * customer data.

                  + */ +export interface ServerSideEncryptionConfiguration { + /** + *

                  The identifier of the KMS Key you want Voice ID to use to encrypt your data.

                  + */ + KmsKeyId: string | undefined; +} + +export namespace ServerSideEncryptionConfiguration { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ServerSideEncryptionConfiguration): any => ({ + ...obj, + }); +} + +/** + *

                  A tag that can be assigned to a Voice ID resource.

                  + */ +export interface Tag { + /** + *

                  The first part of a key:value pair that forms a tag associated with a given resource. For example, + * in the tag ‘Department’:’Sales’, the key is 'Department'. + *

                  + */ + Key: string | undefined; + + /** + *

                  The second part of a key:value pair that forms a tag associated with a given resource. For example, + * in the tag ‘Department’:’Sales’, the value is 'Sales'. + *

                  + */ + Value: string | undefined; +} + +export namespace Tag { + /** + * @internal + */ + export const filterSensitiveLog = (obj: Tag): any => ({ + ...obj, + ...(obj.Key && { Key: SENSITIVE_STRING }), + ...(obj.Value && { Value: SENSITIVE_STRING }), + }); +} + +export interface CreateDomainRequest { + /** + *

                  The name of the domain.

                  + */ + Name: string | undefined; + + /** + *

                  A brief description of this domain.

                  + */ + Description?: string; + + /** + *

                  The configuration, containing the KMS Key Identifier, to be used by Voice ID for + * the server-side encryption of your data. Refer to + * Amazon Connect VoiceID encryption at rest for more details on how the KMS Key is used. + *

                  + */ + ServerSideEncryptionConfiguration: ServerSideEncryptionConfiguration | undefined; + + /** + *

                  The idempotency token for creating a new domain. If not provided, Amazon Web Services SDK populates + * this field.

                  + */ + ClientToken?: string; + + /** + *

                  A list of tags you want added to the domain.

                  + */ + Tags?: Tag[]; +} + +export namespace CreateDomainRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: CreateDomainRequest): any => ({ + ...obj, + ...(obj.Name && { Name: SENSITIVE_STRING }), + ...(obj.Description && { Description: SENSITIVE_STRING }), + ...(obj.Tags && { Tags: obj.Tags.map((item) => Tag.filterSensitiveLog(item)) }), + }); +} + +export enum DomainStatus { + ACTIVE = "ACTIVE", + PENDING = "PENDING", + SUSPENDED = "SUSPENDED", +} + +/** + *

                  Contains all the information about a domain.

                  + */ +export interface Domain { + /** + *

                  The service-generated identifier for the domain.

                  + */ + DomainId?: string; + + /** + *

                  The Amazon Resource Name (ARN) for the domain.

                  + */ + Arn?: string; + + /** + *

                  The client-provided name for the domain.

                  + */ + Name?: string; + + /** + *

                  The client-provided description of the domain.

                  + */ + Description?: string; + + /** + *

                  The current status of the domain.

                  + */ + DomainStatus?: DomainStatus | string; + + /** + *

                  The server-side encryption configuration containing the KMS Key Identifier you want Voice ID to use + * to encrypt your data.

                  + */ + ServerSideEncryptionConfiguration?: ServerSideEncryptionConfiguration; + + /** + *

                  The timestamp at which the domain is created.

                  + */ + CreatedAt?: Date; + + /** + *

                  The timestamp showing the domain's last update.

                  + */ + UpdatedAt?: Date; +} + +export namespace Domain { + /** + * @internal + */ + export const filterSensitiveLog = (obj: Domain): any => ({ + ...obj, + ...(obj.Name && { Name: SENSITIVE_STRING }), + ...(obj.Description && { Description: SENSITIVE_STRING }), + }); +} + +export interface CreateDomainResponse { + /** + *

                  Information about the newly created domain.

                  + */ + Domain?: Domain; +} + +export namespace CreateDomainResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: CreateDomainResponse): any => ({ + ...obj, + ...(obj.Domain && { Domain: Domain.filterSensitiveLog(obj.Domain) }), + }); +} + +/** + *

                  The request failed due to an unknown error on the server side.

                  + */ +export interface InternalServerException extends __SmithyException, $MetadataBearer { + name: "InternalServerException"; + $fault: "server"; + Message?: string; +} + +export namespace InternalServerException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: InternalServerException): any => ({ + ...obj, + }); +} + +export enum ResourceType { + BATCH_JOB = "BATCH_JOB", + COMPLIANCE_CONSENT = "COMPLIANCE_CONSENT", + DOMAIN = "DOMAIN", + FRAUDSTER = "FRAUDSTER", + SESSION = "SESSION", + SPEAKER = "SPEAKER", +} + +/** + *

                  The specified resource cannot be found. Check the ResourceType and error message for + * more details.

                  + */ +export interface ResourceNotFoundException extends __SmithyException, $MetadataBearer { + name: "ResourceNotFoundException"; + $fault: "client"; + Message?: string; + /** + *

                  The type of resource which cannot not be found. Possible types are BATCH_JOB, COMPLIANCE_CONSENT, + * DOMAIN, FRAUDSTER, SESSION and SPEAKER.

                  + */ + ResourceType?: ResourceType | string; +} + +export namespace ResourceNotFoundException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ResourceNotFoundException): any => ({ + ...obj, + }); +} + +/** + *

                  The request exceeded the service quota. Refer to Voice ID Service + * Quotas and try your request again.

                  + */ +export interface ServiceQuotaExceededException extends __SmithyException, $MetadataBearer { + name: "ServiceQuotaExceededException"; + $fault: "client"; + Message?: string; +} + +export namespace ServiceQuotaExceededException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ServiceQuotaExceededException): any => ({ + ...obj, + }); +} + +/** + *

                  The request was denied due to request throttling. Please slow down your request rate. Refer to + * + * Amazon Connect Voice ID Service API throttling quotas + * and try your request again.

                  + */ +export interface ThrottlingException extends __SmithyException, $MetadataBearer { + name: "ThrottlingException"; + $fault: "client"; + Message?: string; +} + +export namespace ThrottlingException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ThrottlingException): any => ({ + ...obj, + }); +} + +/** + *

                  The request failed one or more validations; check the error message for more details.

                  + */ +export interface ValidationException extends __SmithyException, $MetadataBearer { + name: "ValidationException"; + $fault: "client"; + Message?: string; +} + +export namespace ValidationException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ValidationException): any => ({ + ...obj, + }); +} + +export interface DeleteDomainRequest { + /** + *

                  The identifier of the domain you want to delete.

                  + */ + DomainId: string | undefined; +} + +export namespace DeleteDomainRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DeleteDomainRequest): any => ({ + ...obj, + }); +} + +export interface DeleteFraudsterRequest { + /** + *

                  The identifier of the domain containing the fraudster.

                  + */ + DomainId: string | undefined; + + /** + *

                  The identifier of the fraudster you want to delete.

                  + */ + FraudsterId: string | undefined; +} + +export namespace DeleteFraudsterRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DeleteFraudsterRequest): any => ({ + ...obj, + ...(obj.FraudsterId && { FraudsterId: SENSITIVE_STRING }), + }); +} + +export interface DeleteSpeakerRequest { + /** + *

                  The identifier of the domain containing the speaker.

                  + */ + DomainId: string | undefined; + + /** + *

                  The identifier of the speaker you want to delete.

                  + */ + SpeakerId: string | undefined; +} + +export namespace DeleteSpeakerRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DeleteSpeakerRequest): any => ({ + ...obj, + ...(obj.SpeakerId && { SpeakerId: SENSITIVE_STRING }), + }); +} + +export interface DescribeDomainRequest { + /** + *

                  The identifier of the domain you are describing.

                  + */ + DomainId: string | undefined; +} + +export namespace DescribeDomainRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DescribeDomainRequest): any => ({ + ...obj, + }); +} + +export interface DescribeDomainResponse { + /** + *

                  Information about the specified domain.

                  + */ + Domain?: Domain; +} + +export namespace DescribeDomainResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DescribeDomainResponse): any => ({ + ...obj, + ...(obj.Domain && { Domain: Domain.filterSensitiveLog(obj.Domain) }), + }); +} + +export interface DescribeFraudsterRequest { + /** + *

                  The identifier of the domain containing the fraudster.

                  + */ + DomainId: string | undefined; + + /** + *

                  The identifier of the fraudster you are describing.

                  + */ + FraudsterId: string | undefined; +} + +export namespace DescribeFraudsterRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DescribeFraudsterRequest): any => ({ + ...obj, + ...(obj.FraudsterId && { FraudsterId: SENSITIVE_STRING }), + }); +} + +/** + *

                  Contains all the information about a fraudster.

                  + */ +export interface Fraudster { + /** + *

                  The identifier for the domain containing the fraudster.

                  + */ + DomainId?: string; + + /** + *

                  The service-generated identifier for the fraudster.

                  + */ + GeneratedFraudsterId?: string; + + /** + *

                  The timestamp when Voice ID identified the fraudster.

                  + */ + CreatedAt?: Date; +} + +export namespace Fraudster { + /** + * @internal + */ + export const filterSensitiveLog = (obj: Fraudster): any => ({ + ...obj, + }); +} + +export interface DescribeFraudsterResponse { + /** + *

                  Information about the specified fraudster.

                  + */ + Fraudster?: Fraudster; +} + +export namespace DescribeFraudsterResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DescribeFraudsterResponse): any => ({ + ...obj, + }); +} + +export interface DescribeFraudsterRegistrationJobRequest { + /** + *

                  The identifier for the domain containing the fraudster registration job.

                  + */ + DomainId: string | undefined; + + /** + *

                  The identifier for the fraudster registration job you are describing.

                  + */ + JobId: string | undefined; +} + +export namespace DescribeFraudsterRegistrationJobRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DescribeFraudsterRegistrationJobRequest): any => ({ + ...obj, + }); +} + +/** + *

                  Contains error details for a failed batch job.

                  + */ +export interface FailureDetails { + /** + *

                  An HTTP status code representing the nature of the error.

                  + */ + StatusCode?: number; + + /** + *

                  A description of the error that caused the batch job failure.

                  + */ + Message?: string; +} + +export namespace FailureDetails { + /** + * @internal + */ + export const filterSensitiveLog = (obj: FailureDetails): any => ({ + ...obj, + }); +} + +/** + *

                  The configuration containing input file information for a batch job.

                  + */ +export interface InputDataConfig { + /** + *

                  The S3 location for the input manifest file that contains the list of individual enrollment or registration + * job requests.

                  + */ + S3Uri: string | undefined; +} + +export namespace InputDataConfig { + /** + * @internal + */ + export const filterSensitiveLog = (obj: InputDataConfig): any => ({ + ...obj, + }); +} + +/** + *

                  Indicates the completion progress for a batch job.

                  + */ +export interface JobProgress { + /** + *

                  Shows the completed percentage of enrollment or registration requests listed in the input file.

                  + */ + PercentComplete?: number; +} + +export namespace JobProgress { + /** + * @internal + */ + export const filterSensitiveLog = (obj: JobProgress): any => ({ + ...obj, + }); +} + +export enum FraudsterRegistrationJobStatus { + COMPLETED = "COMPLETED", + COMPLETED_WITH_ERRORS = "COMPLETED_WITH_ERRORS", + FAILED = "FAILED", + IN_PROGRESS = "IN_PROGRESS", + SUBMITTED = "SUBMITTED", +} + +/** + *

                  The configuration containing output file information for a batch job.

                  + */ +export interface OutputDataConfig { + /** + *

                  The S3 path of the folder to which Voice ID writes the job output file, which has a + * *.out extension. For example, if the input file name is input-file.json and + * the output folder path is s3://output-bucket/output-folder, the full output file path is + * s3://output-bucket/output-folder/job-Id/input-file.json.out.

                  + */ + S3Uri: string | undefined; + + /** + *

                  the identifier of the KMS key you want Voice ID to use to encrypt the output file of the fraudster + * registration job.

                  + */ + KmsKeyId?: string; +} + +export namespace OutputDataConfig { + /** + * @internal + */ + export const filterSensitiveLog = (obj: OutputDataConfig): any => ({ + ...obj, + }); +} + +export enum DuplicateRegistrationAction { + REGISTER_AS_NEW = "REGISTER_AS_NEW", + SKIP = "SKIP", +} + +/** + *

                  The configuration definining the action to take when a duplicate fraudster is detected, and the + * similarity threshold to use for detecting a duplicate fraudster during a batch fraudster registration job.

                  + */ +export interface RegistrationConfig { + /** + *

                  The action to take when a fraudster is identified as a duplicate. The default action is + * SKIP, which skips registering the duplicate fraudster. Setting the value to + * REGISTER_AS_NEW always registers a new fraudster into the specified domain.

                  + */ + DuplicateRegistrationAction?: DuplicateRegistrationAction | string; + + /** + *

                  The minimum similarity score between the new and old fraudsters in order to consider the new + * fraudster a duplicate.

                  + */ + FraudsterSimilarityThreshold?: number; +} + +export namespace RegistrationConfig { + /** + * @internal + */ + export const filterSensitiveLog = (obj: RegistrationConfig): any => ({ + ...obj, + }); +} + +/** + *

                  Contains all the information about a fraudster registration job.

                  + */ +export interface FraudsterRegistrationJob { + /** + *

                  The client-provied name for the fraudster registration job.

                  + */ + JobName?: string; + + /** + *

                  The service-generated identifier for the fraudster registration job.

                  + */ + JobId?: string; + + /** + *

                  The current status of the fraudster registration job.

                  + */ + JobStatus?: FraudsterRegistrationJobStatus | string; + + /** + *

                  The identifier of the domain containing the fraudster registration job.

                  + */ + DomainId?: string; + + /** + *

                  The IAM role Amazon Resource Name (ARN) that grants Voice ID permissions to access customer's buckets + * to read the input manifest file and write the job output file.

                  + */ + DataAccessRoleArn?: string; + + /** + *

                  The registration config containing details such as the action to take when a duplicate fraudster is + * detected, and the similarity threshold to use for detecting a duplicate fraudster.

                  + */ + RegistrationConfig?: RegistrationConfig; + + /** + *

                  The input data config containing an S3 URI for the input manifest file that contains the list + * of fraudster registration job requests.

                  + */ + InputDataConfig?: InputDataConfig; + + /** + *

                  The output data config containing the S3 location where you want Voice ID to write your job output + * file; you must also include a KMS Key ID in order to encrypt the file.

                  + */ + OutputDataConfig?: OutputDataConfig; + + /** + *

                  A timestamp showing the creation time of the fraudster registration job.

                  + */ + CreatedAt?: Date; + + /** + *

                  A timestamp showing when the fraudster registration job ended.

                  + */ + EndedAt?: Date; + + /** + *

                  Contains details that are populated when an entire batch job fails. In cases of individual registration + * job failures, the batch job as a whole doesn't fail; it is completed with a JobStatus of + * COMPLETED_WITH_ERRORS. You can use the job output file to identify the individual + * registration requests that failed.

                  + */ + FailureDetails?: FailureDetails; + + /** + *

                  Shows the completed percentage of registration requests listed in the input file.

                  + */ + JobProgress?: JobProgress; +} + +export namespace FraudsterRegistrationJob { + /** + * @internal + */ + export const filterSensitiveLog = (obj: FraudsterRegistrationJob): any => ({ + ...obj, + ...(obj.JobName && { JobName: SENSITIVE_STRING }), + }); +} + +export interface DescribeFraudsterRegistrationJobResponse { + /** + *

                  Contains details about the specified fraudster registration job.

                  + */ + Job?: FraudsterRegistrationJob; +} + +export namespace DescribeFraudsterRegistrationJobResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DescribeFraudsterRegistrationJobResponse): any => ({ + ...obj, + ...(obj.Job && { Job: FraudsterRegistrationJob.filterSensitiveLog(obj.Job) }), + }); +} + +export interface DescribeSpeakerRequest { + /** + *

                  The identifier of the domain that contains the speaker.

                  + */ + DomainId: string | undefined; + + /** + *

                  The identifier of the speaker you are describing.

                  + */ + SpeakerId: string | undefined; +} + +export namespace DescribeSpeakerRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DescribeSpeakerRequest): any => ({ + ...obj, + ...(obj.SpeakerId && { SpeakerId: SENSITIVE_STRING }), + }); +} + +export enum SpeakerStatus { + ENROLLED = "ENROLLED", + EXPIRED = "EXPIRED", + OPTED_OUT = "OPTED_OUT", + PENDING = "PENDING", +} + +/** + *

                  Contains all the information about a speaker.

                  + */ +export interface Speaker { + /** + *

                  The identifier of the domain that contains the speaker.

                  + */ + DomainId?: string; + + /** + *

                  The client-provided identifier for the speaker.

                  + */ + CustomerSpeakerId?: string; + + /** + *

                  The service-generated identifier for the speaker.

                  + */ + GeneratedSpeakerId?: string; + + /** + *

                  The current status of the speaker.

                  + */ + Status?: SpeakerStatus | string; + + /** + *

                  A timestamp showing when the speaker is created.

                  + */ + CreatedAt?: Date; + + /** + *

                  A timestamp showing the speaker's last update.

                  + */ + UpdatedAt?: Date; +} + +export namespace Speaker { + /** + * @internal + */ + export const filterSensitiveLog = (obj: Speaker): any => ({ + ...obj, + ...(obj.CustomerSpeakerId && { CustomerSpeakerId: SENSITIVE_STRING }), + }); +} + +export interface DescribeSpeakerResponse { + /** + *

                  Information about the specified speaker.

                  + */ + Speaker?: Speaker; +} + +export namespace DescribeSpeakerResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DescribeSpeakerResponse): any => ({ + ...obj, + ...(obj.Speaker && { Speaker: Speaker.filterSensitiveLog(obj.Speaker) }), + }); +} + +export interface DescribeSpeakerEnrollmentJobRequest { + /** + *

                  The identifier of the domain containing the speaker enrollment job.

                  + */ + DomainId: string | undefined; + + /** + *

                  The identifier of the speaker enrollment job you are describing.

                  + */ + JobId: string | undefined; +} + +export namespace DescribeSpeakerEnrollmentJobRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DescribeSpeakerEnrollmentJobRequest): any => ({ + ...obj, + }); +} + +export enum ExistingEnrollmentAction { + OVERWRITE = "OVERWRITE", + SKIP = "SKIP", +} + +export enum FraudDetectionAction { + FAIL = "FAIL", + IGNORE = "IGNORE", +} + +/** + *

                  The configuration defining the action to take when a speaker is flagged by the fraud detection system + * during a batch speaker enrollment job, and the risk threshold to use for identification.

                  + */ +export interface EnrollmentJobFraudDetectionConfig { + /** + *

                  The action to take when the given speaker is flagged by the fraud detection system. The default value is + * FAIL, which fails the speaker enrollment. Changing this value to IGNORE + * results in the speaker being enrolled even if they are flagged by the fraud detection system.

                  + */ + FraudDetectionAction?: FraudDetectionAction | string; + + /** + *

                  Threshold value for determining whether the speaker is a high risk to be fraudulent. If the detected risk + * score calculated by Voice ID is greater than or equal to the threshold, the speaker is considered a fraudster.

                  + */ + RiskThreshold?: number; +} + +export namespace EnrollmentJobFraudDetectionConfig { + /** + * @internal + */ + export const filterSensitiveLog = (obj: EnrollmentJobFraudDetectionConfig): any => ({ + ...obj, + }); +} + +/** + *

                  Contains configurations defining enrollment behavior for the batch job.

                  + */ +export interface EnrollmentConfig { + /** + *

                  The action to take when the specified speaker is already enrolled in the specified domain. The default + * value is SKIP, which skips the enrollment for the existing speaker. Setting the value to + * OVERWRITE replaces the existing voice prints and enrollment audio stored for that speaker + * with new data generated from the latest audio.

                  + */ + ExistingEnrollmentAction?: ExistingEnrollmentAction | string; + + /** + *

                  The fraud detection configuration to use for the speaker enrollment job.

                  + */ + FraudDetectionConfig?: EnrollmentJobFraudDetectionConfig; +} + +export namespace EnrollmentConfig { + /** + * @internal + */ + export const filterSensitiveLog = (obj: EnrollmentConfig): any => ({ + ...obj, + }); +} + +export enum SpeakerEnrollmentJobStatus { + COMPLETED = "COMPLETED", + COMPLETED_WITH_ERRORS = "COMPLETED_WITH_ERRORS", + FAILED = "FAILED", + IN_PROGRESS = "IN_PROGRESS", + SUBMITTED = "SUBMITTED", +} + +/** + *

                  Contains all the information about a speaker enrollment job.

                  + */ +export interface SpeakerEnrollmentJob { + /** + *

                  The client-provided name for the speaker enrollment job.

                  + */ + JobName?: string; + + /** + *

                  The service-generated identifier for the speaker enrollment job.

                  + */ + JobId?: string; + + /** + *

                  The current status of the speaker enrollment job.

                  + */ + JobStatus?: SpeakerEnrollmentJobStatus | string; + + /** + *

                  The identifier of the domain that contains the speaker enrollment job.

                  + */ + DomainId?: string; + + /** + *

                  The IAM role Amazon Resource Name (ARN) that grants Voice ID permissions to access customer's buckets + * to read the input manifest file and write the job output file.

                  + */ + DataAccessRoleArn?: string; + + /** + *

                  The configuration that defines the action to take when the speaker is already enrolled in Voice ID, and the + * FraudDetectionConfig to use.

                  + */ + EnrollmentConfig?: EnrollmentConfig; + + /** + *

                  The input data config containing an S3 URI for the input manifest file that contains the list + * of speaker enrollment job requests.

                  + */ + InputDataConfig?: InputDataConfig; + + /** + *

                  The output data config containing the S3 location where Voice ID writes the job output file; you must + * also include a KMS Key ID to encrypt the file.

                  + */ + OutputDataConfig?: OutputDataConfig; + + /** + *

                  A timestamp showing the creation of the speaker enrollment job.

                  + */ + CreatedAt?: Date; + + /** + *

                  A timestamp showing when the speaker enrollment job ended.

                  + */ + EndedAt?: Date; + + /** + *

                  Contains details that are populated when an entire batch job fails. In cases of individual registration + * job failures, the batch job as a whole doesn't fail; it is completed with a JobStatus of + * COMPLETED_WITH_ERRORS. You can use the job output file to identify the individual + * registration requests that failed.

                  + */ + FailureDetails?: FailureDetails; + + /** + *

                  Provides details on job progress. This field shows the completed percentage of registration + * requests listed in the input file.

                  + */ + JobProgress?: JobProgress; +} + +export namespace SpeakerEnrollmentJob { + /** + * @internal + */ + export const filterSensitiveLog = (obj: SpeakerEnrollmentJob): any => ({ + ...obj, + ...(obj.JobName && { JobName: SENSITIVE_STRING }), + }); +} + +export interface DescribeSpeakerEnrollmentJobResponse { + /** + *

                  Contains details about the specified speaker enrollment job.

                  + */ + Job?: SpeakerEnrollmentJob; +} + +export namespace DescribeSpeakerEnrollmentJobResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DescribeSpeakerEnrollmentJobResponse): any => ({ + ...obj, + ...(obj.Job && { Job: SpeakerEnrollmentJob.filterSensitiveLog(obj.Job) }), + }); +} + +/** + *

                  Contains a summary of information about a domain.

                  + */ +export interface DomainSummary { + /** + *

                  The service-generated identifier for the domain.

                  + */ + DomainId?: string; + + /** + *

                  The Amazon Resource Name (ARN) for the domain.

                  + */ + Arn?: string; + + /** + *

                  The client-provided name for the domain.

                  + */ + Name?: string; + + /** + *

                  The client-provided description of the domain.

                  + */ + Description?: string; + + /** + *

                  The current status of the domain.

                  + */ + DomainStatus?: DomainStatus | string; + + /** + *

                  The server-side encryption configuration containing the KMS Key Identifier you want Voice ID to use + * to encrypt your data..

                  + */ + ServerSideEncryptionConfiguration?: ServerSideEncryptionConfiguration; + + /** + *

                  The timestamp showing when the domain is created.

                  + */ + CreatedAt?: Date; + + /** + *

                  The timestamp showing the domain's last update.

                  + */ + UpdatedAt?: Date; +} + +export namespace DomainSummary { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DomainSummary): any => ({ + ...obj, + ...(obj.Name && { Name: SENSITIVE_STRING }), + ...(obj.Description && { Description: SENSITIVE_STRING }), + }); +} + +export interface EvaluateSessionRequest { + /** + *

                  The identifier of the domain where the session started.

                  + */ + DomainId: string | undefined; + + /** + *

                  The session identifier, or name of the session, that you want to evaluate. In Voice ID + * integration, this is the Contact-Id.

                  + */ + SessionNameOrId: string | undefined; +} + +export namespace EvaluateSessionRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: EvaluateSessionRequest): any => ({ + ...obj, + }); +} + +/** + *

                  The configuration used for performing fraud detection over a speaker during a session.

                  + */ +export interface FraudDetectionConfiguration { + /** + *

                  Threshold value for determining whether the speaker is a fraudster. If the detected risk score + * calculated by Voice ID is higher than the threshold, the speaker is considered a fraudster.

                  + */ + RiskThreshold: number | undefined; +} + +export namespace FraudDetectionConfiguration { + /** + * @internal + */ + export const filterSensitiveLog = (obj: FraudDetectionConfiguration): any => ({ + ...obj, + }); +} + +export enum FraudDetectionDecision { + HIGH_RISK = "HIGH_RISK", + LOW_RISK = "LOW_RISK", + NOT_ENOUGH_SPEECH = "NOT_ENOUGH_SPEECH", +} + +export enum FraudDetectionReason { + KNOWN_FRAUDSTER = "KNOWN_FRAUDSTER", +} + +/** + *

                  Contains details produced as a result of performing known fraudster risk analysis on a speaker.

                  + */ +export interface KnownFraudsterRisk { + /** + *

                  The score indicating the likelihood the speaker is a known fraudster.

                  + */ + RiskScore: number | undefined; + + /** + *

                  The identifier of the fraudster that is the closest match to the speaker. If there are no fraudsters + * registered in a given domain, or if there are no fraudsters with a non-zero RiskScore, this value is + * null.

                  + */ + GeneratedFraudsterId?: string; +} + +export namespace KnownFraudsterRisk { + /** + * @internal + */ + export const filterSensitiveLog = (obj: KnownFraudsterRisk): any => ({ + ...obj, + }); +} + +/** + *

                  Details regarding various fraud risk analyses performed against the current session state and streamed + * audio of the speaker.

                  + */ +export interface FraudRiskDetails { + /** + *

                  The details resulting from 'Known Fraudster Risk' analysis of the speaker.

                  + */ + KnownFraudsterRisk: KnownFraudsterRisk | undefined; +} + +export namespace FraudRiskDetails { + /** + * @internal + */ + export const filterSensitiveLog = (obj: FraudRiskDetails): any => ({ + ...obj, + }); +} + +/** + *

                  The fraud detection result produced by Voice ID, processed against the current session state and streamed + * audio of the speaker.

                  + */ +export interface FraudDetectionResult { + /** + *

                  The unique identifier for this fraud detection result. Given there can be multiple fraud detections + * for a given session, this field helps in identifying if the returned result is from previous streaming + * activity or a new result. Note that in the absence of any new streaming activity or risk threshold + * changes, Voice ID always returns cached Fraud Detection result for this API.

                  + */ + FraudDetectionResultId?: string; + + /** + *

                  A timestamp indicating when audio aggregation started for this fraud detection result.

                  + */ + AudioAggregationStartedAt?: Date; + + /** + *

                  A timestamp indicating when audio aggregation ended for this fraud detection result.

                  + */ + AudioAggregationEndedAt?: Date; + + /** + *

                  The FraudDetectionConfiguration used to generate this fraud detection result.

                  + */ + Configuration?: FraudDetectionConfiguration; + + /** + *

                  The fraud detection decision produced by Voice ID, processed against the current session state and + * streamed audio of the speaker.

                  + */ + Decision?: FraudDetectionDecision | string; + + /** + *

                  The reason speaker was flagged by the fraud detection system. This is only be populated if fraud + * detection Decision is HIGH_RISK, and only has one possible value: + * KNOWN_FRAUDSTER.

                  + */ + Reasons?: (FraudDetectionReason | string)[]; + + /** + *

                  Details about each risk analyzed for this speaker.

                  + */ + RiskDetails?: FraudRiskDetails; +} + +export namespace FraudDetectionResult { + /** + * @internal + */ + export const filterSensitiveLog = (obj: FraudDetectionResult): any => ({ + ...obj, + }); +} + +export enum StreamingStatus { + ENDED = "ENDED", + ONGOING = "ONGOING", + PENDING_CONFIGURATION = "PENDING_CONFIGURATION", +} + +export interface EvaluateSessionResponse { + /** + *

                  The identifier of the domain containing the session.

                  + */ + DomainId?: string; + + /** + *

                  The service-generated identifier of the session.

                  + */ + SessionId?: string; + + /** + *

                  The client-provided name of the session.

                  + */ + SessionName?: string; + + /** + *

                  The current status of audio streaming for this session. This field is useful to infer next steps when + * the Authentication or Fraud Detection results are empty or the decision is NOT_ENOUGH_SPEECH. + * In this situation, if the StreamingStatus is ONGOING/PENDING_CONFIGURATION, it can + * mean that the client should call the API again later, once Voice ID has enough audio to produce a result. + * If the decision remains NOT_ENOUGH_SPEECH even after StreamingStatus is ENDED, + * it means that the previously streamed session did not have enough speech to perform evaluation, and a new + * streaming session is needed to try again.

                  + */ + StreamingStatus?: StreamingStatus | string; + + /** + *

                  Details resulting from the authentication process, such as authentication decision and + * authentication score.

                  + */ + AuthenticationResult?: AuthenticationResult; + + /** + *

                  Details resulting from the fraud detection process, such as fraud detection decision and risk score.

                  + */ + FraudDetectionResult?: FraudDetectionResult; +} + +export namespace EvaluateSessionResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: EvaluateSessionResponse): any => ({ + ...obj, + ...(obj.AuthenticationResult && { + AuthenticationResult: AuthenticationResult.filterSensitiveLog(obj.AuthenticationResult), + }), + }); +} + +/** + *

                  Contains a summary of information about a fraudster registration job.

                  + */ +export interface FraudsterRegistrationJobSummary { + /** + *

                  The client-provied name for the fraudster registration job.

                  + */ + JobName?: string; + + /** + *

                  The service-generated identifier for the fraudster registration job.

                  + */ + JobId?: string; + + /** + *

                  The current status of the fraudster registration job.

                  + */ + JobStatus?: FraudsterRegistrationJobStatus | string; + + /** + *

                  The identifier of the domain containing the fraudster registration job.

                  + */ + DomainId?: string; + + /** + *

                  A timestamp showing when the fraudster registration job is created.

                  + */ + CreatedAt?: Date; + + /** + *

                  A timestamp showing when the fraudster registration job ended.

                  + */ + EndedAt?: Date; + + /** + *

                  Contains details that are populated when an entire batch job fails. In cases of individual registration + * job failures, the batch job as a whole doesn't fail; it is completed with a JobStatus of + * COMPLETED_WITH_ERRORS. You can use the job output file to identify the individual + * registration requests that failed.

                  + */ + FailureDetails?: FailureDetails; + + /** + *

                  Shows the completed percentage of registration requests listed in the input file.

                  + */ + JobProgress?: JobProgress; +} + +export namespace FraudsterRegistrationJobSummary { + /** + * @internal + */ + export const filterSensitiveLog = (obj: FraudsterRegistrationJobSummary): any => ({ + ...obj, + ...(obj.JobName && { JobName: SENSITIVE_STRING }), + }); +} + +export interface ListDomainsRequest { + /** + *

                  The maximum number of results that are returned per call. You can use NextToken to obtain + * further pages of results. The default is 100; the maximum allowed page size is also 100. + *

                  + */ + MaxResults?: number; + + /** + *

                  If NextToken is returned, there are more results available. The value of NextToken + * is a unique pagination token for each page. Make the call again using the returned token to retrieve the + * next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. + *

                  + */ + NextToken?: string; +} + +export namespace ListDomainsRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ListDomainsRequest): any => ({ + ...obj, + }); +} + +export interface ListDomainsResponse { + /** + *

                  A list containing details about each domain in the Amazon Web Services account.

                  + */ + DomainSummaries?: DomainSummary[]; + + /** + *

                  If NextToken is returned, there are more results available. The value of NextToken + * is a unique pagination token for each page. Make the call again using the returned token to retrieve the + * next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. + *

                  + */ + NextToken?: string; +} + +export namespace ListDomainsResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ListDomainsResponse): any => ({ + ...obj, + ...(obj.DomainSummaries && { + DomainSummaries: obj.DomainSummaries.map((item) => DomainSummary.filterSensitiveLog(item)), + }), + }); +} + +export interface ListFraudsterRegistrationJobsRequest { + /** + *

                  The identifier of the domain containing the fraudster registration Jobs.

                  + */ + DomainId: string | undefined; + + /** + *

                  Provides the status of your fraudster registration job.

                  + */ + JobStatus?: FraudsterRegistrationJobStatus | string; + + /** + *

                  The maximum number of results that are returned per call. You can use NextToken to obtain + * further pages of results. The default is 100; the maximum allowed page size is also 100. + *

                  + */ + MaxResults?: number; + + /** + *

                  If NextToken is returned, there are more results available. The value of NextToken + * is a unique pagination token for each page. Make the call again using the returned token to retrieve the + * next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. + *

                  + */ + NextToken?: string; +} + +export namespace ListFraudsterRegistrationJobsRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ListFraudsterRegistrationJobsRequest): any => ({ + ...obj, + }); +} + +export interface ListFraudsterRegistrationJobsResponse { + /** + *

                  A list containing details about each specified fraudster registration job.

                  + */ + JobSummaries?: FraudsterRegistrationJobSummary[]; + + /** + *

                  If NextToken is returned, there are more results available. The value of NextToken + * is a unique pagination token for each page. Make the call again using the returned token to retrieve the + * next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. + *

                  + */ + NextToken?: string; +} + +export namespace ListFraudsterRegistrationJobsResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ListFraudsterRegistrationJobsResponse): any => ({ + ...obj, + ...(obj.JobSummaries && { + JobSummaries: obj.JobSummaries.map((item) => FraudsterRegistrationJobSummary.filterSensitiveLog(item)), + }), + }); +} + +export interface ListSpeakerEnrollmentJobsRequest { + /** + *

                  The identifier of the domain containing the speaker enrollment jobs.

                  + */ + DomainId: string | undefined; + + /** + *

                  Provides the status of your speaker enrollment Job.

                  + */ + JobStatus?: SpeakerEnrollmentJobStatus | string; + + /** + *

                  The maximum number of results that are returned per call. You can use NextToken to obtain + * further pages of results. The default is 100; the maximum allowed page size is also 100. + *

                  + */ + MaxResults?: number; + + /** + *

                  If NextToken is returned, there are more results available. The value of NextToken + * is a unique pagination token for each page. Make the call again using the returned token to retrieve the + * next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. + *

                  + */ + NextToken?: string; +} + +export namespace ListSpeakerEnrollmentJobsRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ListSpeakerEnrollmentJobsRequest): any => ({ + ...obj, + }); +} + +/** + *

                  Contains a summary of information about a speaker enrollment job.

                  + */ +export interface SpeakerEnrollmentJobSummary { + /** + *

                  The client-provided name for the speaker enrollment job.

                  + */ + JobName?: string; + + /** + *

                  The service-generated identifier for the speaker enrollment job.

                  + */ + JobId?: string; + + /** + *

                  The current status of the speaker enrollment job.

                  + */ + JobStatus?: SpeakerEnrollmentJobStatus | string; + + /** + *

                  The identifier of the domain that contains the speaker enrollment job.

                  + */ + DomainId?: string; + + /** + *

                  A timestamp showing the creation time of the speaker enrollment job.

                  + */ + CreatedAt?: Date; + + /** + *

                  A timestamp showing when the speaker enrollment job ended.

                  + */ + EndedAt?: Date; + + /** + *

                  Contains details that are populated when an entire batch job fails. In cases of individual registration + * job failures, the batch job as a whole doesn't fail; it is completed with a JobStatus of + * COMPLETED_WITH_ERRORS. You can use the job output file to identify the individual + * registration requests that failed.

                  + */ + FailureDetails?: FailureDetails; + + /** + *

                  Provides details regarding job progress. This field shows the completed percentage of enrollment + * requests listed in the input file.

                  + */ + JobProgress?: JobProgress; +} + +export namespace SpeakerEnrollmentJobSummary { + /** + * @internal + */ + export const filterSensitiveLog = (obj: SpeakerEnrollmentJobSummary): any => ({ + ...obj, + ...(obj.JobName && { JobName: SENSITIVE_STRING }), + }); +} + +export interface ListSpeakerEnrollmentJobsResponse { + /** + *

                  A list containing details about each specified speaker enrollment job.

                  + */ + JobSummaries?: SpeakerEnrollmentJobSummary[]; + + /** + *

                  If NextToken is returned, there are more results available. The value of NextToken + * is a unique pagination token for each page. Make the call again using the returned token to retrieve the + * next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. + *

                  + */ + NextToken?: string; +} + +export namespace ListSpeakerEnrollmentJobsResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ListSpeakerEnrollmentJobsResponse): any => ({ + ...obj, + ...(obj.JobSummaries && { + JobSummaries: obj.JobSummaries.map((item) => SpeakerEnrollmentJobSummary.filterSensitiveLog(item)), + }), + }); +} + +export interface ListSpeakersRequest { + /** + *

                  The identifier of the domain.

                  + */ + DomainId: string | undefined; + + /** + *

                  The maximum number of results that are returned per call. You can use NextToken to obtain + * further pages of results. The default is 100; the maximum allowed page size is also 100. + *

                  + */ + MaxResults?: number; + + /** + *

                  If NextToken is returned, there are more results available. The value of NextToken + * is a unique pagination token for each page. Make the call again using the returned token to retrieve the + * next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. + *

                  + */ + NextToken?: string; +} + +export namespace ListSpeakersRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ListSpeakersRequest): any => ({ + ...obj, + }); +} + +/** + *

                  Contains a summary of information about a speaker.

                  + */ +export interface SpeakerSummary { + /** + *

                  The identifier of the domain that contains the speaker.

                  + */ + DomainId?: string; + + /** + *

                  The client-provided identifier for the speaker.

                  + */ + CustomerSpeakerId?: string; + + /** + *

                  The service-generated identifier for the speaker.

                  + */ + GeneratedSpeakerId?: string; + + /** + *

                  The current status of the speaker.

                  + */ + Status?: SpeakerStatus | string; + + /** + *

                  A timestamp showing the speaker's creation time.

                  + */ + CreatedAt?: Date; + + /** + *

                  A timestamp showing the speaker's last update.

                  + */ + UpdatedAt?: Date; +} + +export namespace SpeakerSummary { + /** + * @internal + */ + export const filterSensitiveLog = (obj: SpeakerSummary): any => ({ + ...obj, + ...(obj.CustomerSpeakerId && { CustomerSpeakerId: SENSITIVE_STRING }), + }); +} + +export interface ListSpeakersResponse { + /** + *

                  A list containing details about each speaker in the Amazon Web Services account. + *

                  + */ + SpeakerSummaries?: SpeakerSummary[]; + + /** + *

                  If NextToken is returned, there are more results available. The value of NextToken + * is a unique pagination token for each page. Make the call again using the returned token to retrieve the + * next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. + *

                  + */ + NextToken?: string; +} + +export namespace ListSpeakersResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ListSpeakersResponse): any => ({ + ...obj, + ...(obj.SpeakerSummaries && { + SpeakerSummaries: obj.SpeakerSummaries.map((item) => SpeakerSummary.filterSensitiveLog(item)), + }), + }); +} + +export interface ListTagsForResourceRequest { + /** + *

                  The Amazon Resource Name (ARN) of the Voice ID resource for which you want to list the tags.

                  + */ + ResourceArn: string | undefined; +} + +export namespace ListTagsForResourceRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ListTagsForResourceRequest): any => ({ + ...obj, + }); +} + +export interface ListTagsForResourceResponse { + /** + *

                  The list of tags associated with the specified resource.

                  + */ + Tags?: Tag[]; +} + +export namespace ListTagsForResourceResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ListTagsForResourceResponse): any => ({ + ...obj, + ...(obj.Tags && { Tags: obj.Tags.map((item) => Tag.filterSensitiveLog(item)) }), + }); +} + +export interface OptOutSpeakerRequest { + /** + *

                  The identifier of the domain containing the speaker.

                  + */ + DomainId: string | undefined; + + /** + *

                  The identifier of the speaker you want opted-out.

                  + */ + SpeakerId: string | undefined; +} + +export namespace OptOutSpeakerRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: OptOutSpeakerRequest): any => ({ + ...obj, + ...(obj.SpeakerId && { SpeakerId: SENSITIVE_STRING }), + }); +} + +export interface OptOutSpeakerResponse { + /** + *

                  Details about the opted-out speaker.

                  + */ + Speaker?: Speaker; +} + +export namespace OptOutSpeakerResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: OptOutSpeakerResponse): any => ({ + ...obj, + ...(obj.Speaker && { Speaker: Speaker.filterSensitiveLog(obj.Speaker) }), + }); +} + +export interface StartFraudsterRegistrationJobRequest { + /** + *

                  The idempotency token for starting a new fraudster registration job. If not provided, Amazon Web Services + * SDK populates this field.

                  + */ + ClientToken?: string; + + /** + *

                  The name of the new fraudster registration job.

                  + */ + JobName?: string; + + /** + *

                  The identifier of the domain containing the fraudster registration job and in which the fraudsters are + * registered.

                  + */ + DomainId: string | undefined; + + /** + *

                  The IAM role Amazon Resource Name (ARN) that grants Voice ID permissions to access customer's buckets + * to read the input manifest file and write the Job output file. Refer to the + * Create and + * edit a fraudster watchlist documentation for the permissions needed in this role.

                  + */ + DataAccessRoleArn: string | undefined; + + /** + *

                  The registration config containing details such as the action to take when a duplicate fraudster is + * detected, and the similarity threshold to use for detecting a duplicate fraudster.

                  + */ + RegistrationConfig?: RegistrationConfig; + + /** + *

                  The input data config containing an S3 URI for the input manifest file that contains the list + * of fraudster registration requests.

                  + */ + InputDataConfig: InputDataConfig | undefined; + + /** + *

                  The output data config containing the S3 location where Voice ID writes the job output file; you must + * also include a KMS Key ID to encrypt the file.

                  + */ + OutputDataConfig: OutputDataConfig | undefined; +} + +export namespace StartFraudsterRegistrationJobRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: StartFraudsterRegistrationJobRequest): any => ({ + ...obj, + ...(obj.JobName && { JobName: SENSITIVE_STRING }), + }); +} + +export interface StartFraudsterRegistrationJobResponse { + /** + *

                  Details about the started fraudster registration job.

                  + */ + Job?: FraudsterRegistrationJob; +} + +export namespace StartFraudsterRegistrationJobResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: StartFraudsterRegistrationJobResponse): any => ({ + ...obj, + ...(obj.Job && { Job: FraudsterRegistrationJob.filterSensitiveLog(obj.Job) }), + }); +} + +export interface StartSpeakerEnrollmentJobRequest { + /** + *

                  The idempotency token for starting a new speaker enrollment Job. If not provided, Amazon Web Services + * SDK populates this field.

                  + */ + ClientToken?: string; + + /** + *

                  A name for your speaker enrollment job.

                  + */ + JobName?: string; + + /** + *

                  The identifier of the domain that contains the speaker enrollment job and in which the speakers are + * enrolled. + *

                  + */ + DomainId: string | undefined; + + /** + *

                  The IAM role Amazon Resource Name (ARN) that grants Voice ID permissions to access customer's buckets + * to read the input manifest file and write the job output file. Refer to Batch enrollment using audio data from prior + * calls documentation for the permissions needed in this role.

                  + */ + DataAccessRoleArn: string | undefined; + + /** + *

                  The enrollment config that contains details such as the action to take when a speaker is already + * enrolled in the Voice ID system or when a speaker is identified as a fraudster.

                  + */ + EnrollmentConfig?: EnrollmentConfig; + + /** + *

                  The input data config containing the S3 location for the input manifest file that contains the list of + * speaker enrollment requests.

                  + */ + InputDataConfig: InputDataConfig | undefined; + + /** + *

                  The output data config containing the S3 location where Voice ID writes the job output file; you must + * also include a KMS Key ID to encrypt the file.

                  + */ + OutputDataConfig: OutputDataConfig | undefined; +} + +export namespace StartSpeakerEnrollmentJobRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: StartSpeakerEnrollmentJobRequest): any => ({ + ...obj, + ...(obj.JobName && { JobName: SENSITIVE_STRING }), + }); +} + +export interface StartSpeakerEnrollmentJobResponse { + /** + *

                  Details about the started speaker enrollment job.

                  + */ + Job?: SpeakerEnrollmentJob; +} + +export namespace StartSpeakerEnrollmentJobResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: StartSpeakerEnrollmentJobResponse): any => ({ + ...obj, + ...(obj.Job && { Job: SpeakerEnrollmentJob.filterSensitiveLog(obj.Job) }), + }); +} + +export interface TagResourceRequest { + /** + *

                  The Amazon Resource Name (ARN) of the Voice ID resource you want to tag.

                  + */ + ResourceArn: string | undefined; + + /** + *

                  The list of tags to assign to the specified resource.

                  + */ + Tags: Tag[] | undefined; +} + +export namespace TagResourceRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: TagResourceRequest): any => ({ + ...obj, + ...(obj.Tags && { Tags: obj.Tags.map((item) => Tag.filterSensitiveLog(item)) }), + }); +} + +export interface TagResourceResponse {} + +export namespace TagResourceResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: TagResourceResponse): any => ({ + ...obj, + }); +} + +export interface UntagResourceRequest { + /** + *

                  The Amazon Resource Name (ARN) of the Voice ID resource you want to remove tags from.

                  + */ + ResourceArn: string | undefined; + + /** + *

                  The list of tag keys you want to remove from the specified resource.

                  + */ + TagKeys: string[] | undefined; +} + +export namespace UntagResourceRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UntagResourceRequest): any => ({ + ...obj, + ...(obj.TagKeys && { TagKeys: SENSITIVE_STRING }), + }); +} + +export interface UntagResourceResponse {} + +export namespace UntagResourceResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UntagResourceResponse): any => ({ + ...obj, + }); +} + +export interface UpdateDomainRequest { + /** + *

                  The identifier of the domain to be updated.

                  + */ + DomainId: string | undefined; + + /** + *

                  The name of the domain.

                  + */ + Name: string | undefined; + + /** + *

                  A brief description about this domain.

                  + */ + Description?: string; + + /** + *

                  The configuration, containing the KMS Key Identifier, to be used by Voice ID for the server-side + * encryption of your data. Note that all the existing data in the domain are still encrypted using the + * existing key, only the data added to domain after updating the key is encrypted using the new key.

                  + */ + ServerSideEncryptionConfiguration: ServerSideEncryptionConfiguration | undefined; +} + +export namespace UpdateDomainRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UpdateDomainRequest): any => ({ + ...obj, + ...(obj.Name && { Name: SENSITIVE_STRING }), + ...(obj.Description && { Description: SENSITIVE_STRING }), + }); +} + +export interface UpdateDomainResponse { + /** + *

                  Details about the updated domain

                  + */ + Domain?: Domain; +} + +export namespace UpdateDomainResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UpdateDomainResponse): any => ({ + ...obj, + ...(obj.Domain && { Domain: Domain.filterSensitiveLog(obj.Domain) }), + }); +} diff --git a/clients/client-voice-id/src/pagination/Interfaces.ts b/clients/client-voice-id/src/pagination/Interfaces.ts new file mode 100644 index 0000000000000..2b69ac0d275a2 --- /dev/null +++ b/clients/client-voice-id/src/pagination/Interfaces.ts @@ -0,0 +1,8 @@ +import { PaginationConfiguration } from "@aws-sdk/types"; + +import { VoiceID } from "../VoiceID"; +import { VoiceIDClient } from "../VoiceIDClient"; + +export interface VoiceIDPaginationConfiguration extends PaginationConfiguration { + client: VoiceID | VoiceIDClient; +} diff --git a/clients/client-voice-id/src/pagination/ListDomainsPaginator.ts b/clients/client-voice-id/src/pagination/ListDomainsPaginator.ts new file mode 100644 index 0000000000000..a63a449755810 --- /dev/null +++ b/clients/client-voice-id/src/pagination/ListDomainsPaginator.ts @@ -0,0 +1,55 @@ +import { Paginator } from "@aws-sdk/types"; + +import { ListDomainsCommand, ListDomainsCommandInput, ListDomainsCommandOutput } from "../commands/ListDomainsCommand"; +import { VoiceID } from "../VoiceID"; +import { VoiceIDClient } from "../VoiceIDClient"; +import { VoiceIDPaginationConfiguration } from "./Interfaces"; + +/** + * @private + */ +const makePagedClientRequest = async ( + client: VoiceIDClient, + input: ListDomainsCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new ListDomainsCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async ( + client: VoiceID, + input: ListDomainsCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.listDomains(input, ...args); +}; +export async function* paginateListDomains( + config: VoiceIDPaginationConfiguration, + input: ListDomainsCommandInput, + ...additionalArguments: any +): Paginator { + // ToDo: replace with actual type instead of typeof input.NextToken + let token: typeof input.NextToken | undefined = config.startingToken || undefined; + let hasNext = true; + let page: ListDomainsCommandOutput; + while (hasNext) { + input.NextToken = token; + input["MaxResults"] = config.pageSize; + if (config.client instanceof VoiceID) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } else if (config.client instanceof VoiceIDClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected VoiceID | VoiceIDClient"); + } + yield page; + token = page.NextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-voice-id/src/pagination/ListFraudsterRegistrationJobsPaginator.ts b/clients/client-voice-id/src/pagination/ListFraudsterRegistrationJobsPaginator.ts new file mode 100644 index 0000000000000..b9a81e20cb875 --- /dev/null +++ b/clients/client-voice-id/src/pagination/ListFraudsterRegistrationJobsPaginator.ts @@ -0,0 +1,59 @@ +import { Paginator } from "@aws-sdk/types"; + +import { + ListFraudsterRegistrationJobsCommand, + ListFraudsterRegistrationJobsCommandInput, + ListFraudsterRegistrationJobsCommandOutput, +} from "../commands/ListFraudsterRegistrationJobsCommand"; +import { VoiceID } from "../VoiceID"; +import { VoiceIDClient } from "../VoiceIDClient"; +import { VoiceIDPaginationConfiguration } from "./Interfaces"; + +/** + * @private + */ +const makePagedClientRequest = async ( + client: VoiceIDClient, + input: ListFraudsterRegistrationJobsCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new ListFraudsterRegistrationJobsCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async ( + client: VoiceID, + input: ListFraudsterRegistrationJobsCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.listFraudsterRegistrationJobs(input, ...args); +}; +export async function* paginateListFraudsterRegistrationJobs( + config: VoiceIDPaginationConfiguration, + input: ListFraudsterRegistrationJobsCommandInput, + ...additionalArguments: any +): Paginator { + // ToDo: replace with actual type instead of typeof input.NextToken + let token: typeof input.NextToken | undefined = config.startingToken || undefined; + let hasNext = true; + let page: ListFraudsterRegistrationJobsCommandOutput; + while (hasNext) { + input.NextToken = token; + input["MaxResults"] = config.pageSize; + if (config.client instanceof VoiceID) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } else if (config.client instanceof VoiceIDClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected VoiceID | VoiceIDClient"); + } + yield page; + token = page.NextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-voice-id/src/pagination/ListSpeakerEnrollmentJobsPaginator.ts b/clients/client-voice-id/src/pagination/ListSpeakerEnrollmentJobsPaginator.ts new file mode 100644 index 0000000000000..d382a2cc42743 --- /dev/null +++ b/clients/client-voice-id/src/pagination/ListSpeakerEnrollmentJobsPaginator.ts @@ -0,0 +1,59 @@ +import { Paginator } from "@aws-sdk/types"; + +import { + ListSpeakerEnrollmentJobsCommand, + ListSpeakerEnrollmentJobsCommandInput, + ListSpeakerEnrollmentJobsCommandOutput, +} from "../commands/ListSpeakerEnrollmentJobsCommand"; +import { VoiceID } from "../VoiceID"; +import { VoiceIDClient } from "../VoiceIDClient"; +import { VoiceIDPaginationConfiguration } from "./Interfaces"; + +/** + * @private + */ +const makePagedClientRequest = async ( + client: VoiceIDClient, + input: ListSpeakerEnrollmentJobsCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new ListSpeakerEnrollmentJobsCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async ( + client: VoiceID, + input: ListSpeakerEnrollmentJobsCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.listSpeakerEnrollmentJobs(input, ...args); +}; +export async function* paginateListSpeakerEnrollmentJobs( + config: VoiceIDPaginationConfiguration, + input: ListSpeakerEnrollmentJobsCommandInput, + ...additionalArguments: any +): Paginator { + // ToDo: replace with actual type instead of typeof input.NextToken + let token: typeof input.NextToken | undefined = config.startingToken || undefined; + let hasNext = true; + let page: ListSpeakerEnrollmentJobsCommandOutput; + while (hasNext) { + input.NextToken = token; + input["MaxResults"] = config.pageSize; + if (config.client instanceof VoiceID) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } else if (config.client instanceof VoiceIDClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected VoiceID | VoiceIDClient"); + } + yield page; + token = page.NextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-voice-id/src/pagination/ListSpeakersPaginator.ts b/clients/client-voice-id/src/pagination/ListSpeakersPaginator.ts new file mode 100644 index 0000000000000..3e713f13eeed6 --- /dev/null +++ b/clients/client-voice-id/src/pagination/ListSpeakersPaginator.ts @@ -0,0 +1,59 @@ +import { Paginator } from "@aws-sdk/types"; + +import { + ListSpeakersCommand, + ListSpeakersCommandInput, + ListSpeakersCommandOutput, +} from "../commands/ListSpeakersCommand"; +import { VoiceID } from "../VoiceID"; +import { VoiceIDClient } from "../VoiceIDClient"; +import { VoiceIDPaginationConfiguration } from "./Interfaces"; + +/** + * @private + */ +const makePagedClientRequest = async ( + client: VoiceIDClient, + input: ListSpeakersCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new ListSpeakersCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async ( + client: VoiceID, + input: ListSpeakersCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.listSpeakers(input, ...args); +}; +export async function* paginateListSpeakers( + config: VoiceIDPaginationConfiguration, + input: ListSpeakersCommandInput, + ...additionalArguments: any +): Paginator { + // ToDo: replace with actual type instead of typeof input.NextToken + let token: typeof input.NextToken | undefined = config.startingToken || undefined; + let hasNext = true; + let page: ListSpeakersCommandOutput; + while (hasNext) { + input.NextToken = token; + input["MaxResults"] = config.pageSize; + if (config.client instanceof VoiceID) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } else if (config.client instanceof VoiceIDClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected VoiceID | VoiceIDClient"); + } + yield page; + token = page.NextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-voice-id/src/protocols/Aws_json1_0.ts b/clients/client-voice-id/src/protocols/Aws_json1_0.ts new file mode 100644 index 0000000000000..70f5499a52405 --- /dev/null +++ b/clients/client-voice-id/src/protocols/Aws_json1_0.ts @@ -0,0 +1,3488 @@ +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { + expectInt32 as __expectInt32, + expectNonNull as __expectNonNull, + expectNumber as __expectNumber, + expectString as __expectString, + parseEpochTimestamp as __parseEpochTimestamp, +} from "@aws-sdk/smithy-client"; +import { + Endpoint as __Endpoint, + HeaderBag as __HeaderBag, + MetadataBearer as __MetadataBearer, + ResponseMetadata as __ResponseMetadata, + SerdeContext as __SerdeContext, + SmithyException as __SmithyException, +} from "@aws-sdk/types"; +import { v4 as generateIdempotencyToken } from "uuid"; + +import { CreateDomainCommandInput, CreateDomainCommandOutput } from "../commands/CreateDomainCommand"; +import { DeleteDomainCommandInput, DeleteDomainCommandOutput } from "../commands/DeleteDomainCommand"; +import { DeleteFraudsterCommandInput, DeleteFraudsterCommandOutput } from "../commands/DeleteFraudsterCommand"; +import { DeleteSpeakerCommandInput, DeleteSpeakerCommandOutput } from "../commands/DeleteSpeakerCommand"; +import { DescribeDomainCommandInput, DescribeDomainCommandOutput } from "../commands/DescribeDomainCommand"; +import { DescribeFraudsterCommandInput, DescribeFraudsterCommandOutput } from "../commands/DescribeFraudsterCommand"; +import { + DescribeFraudsterRegistrationJobCommandInput, + DescribeFraudsterRegistrationJobCommandOutput, +} from "../commands/DescribeFraudsterRegistrationJobCommand"; +import { DescribeSpeakerCommandInput, DescribeSpeakerCommandOutput } from "../commands/DescribeSpeakerCommand"; +import { + DescribeSpeakerEnrollmentJobCommandInput, + DescribeSpeakerEnrollmentJobCommandOutput, +} from "../commands/DescribeSpeakerEnrollmentJobCommand"; +import { EvaluateSessionCommandInput, EvaluateSessionCommandOutput } from "../commands/EvaluateSessionCommand"; +import { ListDomainsCommandInput, ListDomainsCommandOutput } from "../commands/ListDomainsCommand"; +import { + ListFraudsterRegistrationJobsCommandInput, + ListFraudsterRegistrationJobsCommandOutput, +} from "../commands/ListFraudsterRegistrationJobsCommand"; +import { + ListSpeakerEnrollmentJobsCommandInput, + ListSpeakerEnrollmentJobsCommandOutput, +} from "../commands/ListSpeakerEnrollmentJobsCommand"; +import { ListSpeakersCommandInput, ListSpeakersCommandOutput } from "../commands/ListSpeakersCommand"; +import { + ListTagsForResourceCommandInput, + ListTagsForResourceCommandOutput, +} from "../commands/ListTagsForResourceCommand"; +import { OptOutSpeakerCommandInput, OptOutSpeakerCommandOutput } from "../commands/OptOutSpeakerCommand"; +import { + StartFraudsterRegistrationJobCommandInput, + StartFraudsterRegistrationJobCommandOutput, +} from "../commands/StartFraudsterRegistrationJobCommand"; +import { + StartSpeakerEnrollmentJobCommandInput, + StartSpeakerEnrollmentJobCommandOutput, +} from "../commands/StartSpeakerEnrollmentJobCommand"; +import { TagResourceCommandInput, TagResourceCommandOutput } from "../commands/TagResourceCommand"; +import { UntagResourceCommandInput, UntagResourceCommandOutput } from "../commands/UntagResourceCommand"; +import { UpdateDomainCommandInput, UpdateDomainCommandOutput } from "../commands/UpdateDomainCommand"; +import { + AccessDeniedException, + AuthenticationConfiguration, + AuthenticationResult, + ConflictException, + CreateDomainRequest, + CreateDomainResponse, + DeleteDomainRequest, + DeleteFraudsterRequest, + DeleteSpeakerRequest, + DescribeDomainRequest, + DescribeDomainResponse, + DescribeFraudsterRegistrationJobRequest, + DescribeFraudsterRegistrationJobResponse, + DescribeFraudsterRequest, + DescribeFraudsterResponse, + DescribeSpeakerEnrollmentJobRequest, + DescribeSpeakerEnrollmentJobResponse, + DescribeSpeakerRequest, + DescribeSpeakerResponse, + Domain, + DomainSummary, + EnrollmentConfig, + EnrollmentJobFraudDetectionConfig, + EvaluateSessionRequest, + EvaluateSessionResponse, + FailureDetails, + FraudDetectionConfiguration, + FraudDetectionReason, + FraudDetectionResult, + FraudRiskDetails, + Fraudster, + FraudsterRegistrationJob, + FraudsterRegistrationJobSummary, + InputDataConfig, + InternalServerException, + JobProgress, + KnownFraudsterRisk, + ListDomainsRequest, + ListDomainsResponse, + ListFraudsterRegistrationJobsRequest, + ListFraudsterRegistrationJobsResponse, + ListSpeakerEnrollmentJobsRequest, + ListSpeakerEnrollmentJobsResponse, + ListSpeakersRequest, + ListSpeakersResponse, + ListTagsForResourceRequest, + ListTagsForResourceResponse, + OptOutSpeakerRequest, + OptOutSpeakerResponse, + OutputDataConfig, + RegistrationConfig, + ResourceNotFoundException, + ServerSideEncryptionConfiguration, + ServiceQuotaExceededException, + Speaker, + SpeakerEnrollmentJob, + SpeakerEnrollmentJobSummary, + SpeakerSummary, + StartFraudsterRegistrationJobRequest, + StartFraudsterRegistrationJobResponse, + StartSpeakerEnrollmentJobRequest, + StartSpeakerEnrollmentJobResponse, + Tag, + TagResourceRequest, + TagResourceResponse, + ThrottlingException, + UntagResourceRequest, + UntagResourceResponse, + UpdateDomainRequest, + UpdateDomainResponse, + ValidationException, +} from "../models/models_0"; + +export const serializeAws_json1_0CreateDomainCommand = async ( + input: CreateDomainCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = { + "content-type": "application/x-amz-json-1.0", + "x-amz-target": "VoiceID.CreateDomain", + }; + let body: any; + body = JSON.stringify(serializeAws_json1_0CreateDomainRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +export const serializeAws_json1_0DeleteDomainCommand = async ( + input: DeleteDomainCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = { + "content-type": "application/x-amz-json-1.0", + "x-amz-target": "VoiceID.DeleteDomain", + }; + let body: any; + body = JSON.stringify(serializeAws_json1_0DeleteDomainRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +export const serializeAws_json1_0DeleteFraudsterCommand = async ( + input: DeleteFraudsterCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = { + "content-type": "application/x-amz-json-1.0", + "x-amz-target": "VoiceID.DeleteFraudster", + }; + let body: any; + body = JSON.stringify(serializeAws_json1_0DeleteFraudsterRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +export const serializeAws_json1_0DeleteSpeakerCommand = async ( + input: DeleteSpeakerCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = { + "content-type": "application/x-amz-json-1.0", + "x-amz-target": "VoiceID.DeleteSpeaker", + }; + let body: any; + body = JSON.stringify(serializeAws_json1_0DeleteSpeakerRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +export const serializeAws_json1_0DescribeDomainCommand = async ( + input: DescribeDomainCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = { + "content-type": "application/x-amz-json-1.0", + "x-amz-target": "VoiceID.DescribeDomain", + }; + let body: any; + body = JSON.stringify(serializeAws_json1_0DescribeDomainRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +export const serializeAws_json1_0DescribeFraudsterCommand = async ( + input: DescribeFraudsterCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = { + "content-type": "application/x-amz-json-1.0", + "x-amz-target": "VoiceID.DescribeFraudster", + }; + let body: any; + body = JSON.stringify(serializeAws_json1_0DescribeFraudsterRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +export const serializeAws_json1_0DescribeFraudsterRegistrationJobCommand = async ( + input: DescribeFraudsterRegistrationJobCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = { + "content-type": "application/x-amz-json-1.0", + "x-amz-target": "VoiceID.DescribeFraudsterRegistrationJob", + }; + let body: any; + body = JSON.stringify(serializeAws_json1_0DescribeFraudsterRegistrationJobRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +export const serializeAws_json1_0DescribeSpeakerCommand = async ( + input: DescribeSpeakerCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = { + "content-type": "application/x-amz-json-1.0", + "x-amz-target": "VoiceID.DescribeSpeaker", + }; + let body: any; + body = JSON.stringify(serializeAws_json1_0DescribeSpeakerRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +export const serializeAws_json1_0DescribeSpeakerEnrollmentJobCommand = async ( + input: DescribeSpeakerEnrollmentJobCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = { + "content-type": "application/x-amz-json-1.0", + "x-amz-target": "VoiceID.DescribeSpeakerEnrollmentJob", + }; + let body: any; + body = JSON.stringify(serializeAws_json1_0DescribeSpeakerEnrollmentJobRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +export const serializeAws_json1_0EvaluateSessionCommand = async ( + input: EvaluateSessionCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = { + "content-type": "application/x-amz-json-1.0", + "x-amz-target": "VoiceID.EvaluateSession", + }; + let body: any; + body = JSON.stringify(serializeAws_json1_0EvaluateSessionRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +export const serializeAws_json1_0ListDomainsCommand = async ( + input: ListDomainsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = { + "content-type": "application/x-amz-json-1.0", + "x-amz-target": "VoiceID.ListDomains", + }; + let body: any; + body = JSON.stringify(serializeAws_json1_0ListDomainsRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +export const serializeAws_json1_0ListFraudsterRegistrationJobsCommand = async ( + input: ListFraudsterRegistrationJobsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = { + "content-type": "application/x-amz-json-1.0", + "x-amz-target": "VoiceID.ListFraudsterRegistrationJobs", + }; + let body: any; + body = JSON.stringify(serializeAws_json1_0ListFraudsterRegistrationJobsRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +export const serializeAws_json1_0ListSpeakerEnrollmentJobsCommand = async ( + input: ListSpeakerEnrollmentJobsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = { + "content-type": "application/x-amz-json-1.0", + "x-amz-target": "VoiceID.ListSpeakerEnrollmentJobs", + }; + let body: any; + body = JSON.stringify(serializeAws_json1_0ListSpeakerEnrollmentJobsRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +export const serializeAws_json1_0ListSpeakersCommand = async ( + input: ListSpeakersCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = { + "content-type": "application/x-amz-json-1.0", + "x-amz-target": "VoiceID.ListSpeakers", + }; + let body: any; + body = JSON.stringify(serializeAws_json1_0ListSpeakersRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +export const serializeAws_json1_0ListTagsForResourceCommand = async ( + input: ListTagsForResourceCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = { + "content-type": "application/x-amz-json-1.0", + "x-amz-target": "VoiceID.ListTagsForResource", + }; + let body: any; + body = JSON.stringify(serializeAws_json1_0ListTagsForResourceRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +export const serializeAws_json1_0OptOutSpeakerCommand = async ( + input: OptOutSpeakerCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = { + "content-type": "application/x-amz-json-1.0", + "x-amz-target": "VoiceID.OptOutSpeaker", + }; + let body: any; + body = JSON.stringify(serializeAws_json1_0OptOutSpeakerRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +export const serializeAws_json1_0StartFraudsterRegistrationJobCommand = async ( + input: StartFraudsterRegistrationJobCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = { + "content-type": "application/x-amz-json-1.0", + "x-amz-target": "VoiceID.StartFraudsterRegistrationJob", + }; + let body: any; + body = JSON.stringify(serializeAws_json1_0StartFraudsterRegistrationJobRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +export const serializeAws_json1_0StartSpeakerEnrollmentJobCommand = async ( + input: StartSpeakerEnrollmentJobCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = { + "content-type": "application/x-amz-json-1.0", + "x-amz-target": "VoiceID.StartSpeakerEnrollmentJob", + }; + let body: any; + body = JSON.stringify(serializeAws_json1_0StartSpeakerEnrollmentJobRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +export const serializeAws_json1_0TagResourceCommand = async ( + input: TagResourceCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = { + "content-type": "application/x-amz-json-1.0", + "x-amz-target": "VoiceID.TagResource", + }; + let body: any; + body = JSON.stringify(serializeAws_json1_0TagResourceRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +export const serializeAws_json1_0UntagResourceCommand = async ( + input: UntagResourceCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = { + "content-type": "application/x-amz-json-1.0", + "x-amz-target": "VoiceID.UntagResource", + }; + let body: any; + body = JSON.stringify(serializeAws_json1_0UntagResourceRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +export const serializeAws_json1_0UpdateDomainCommand = async ( + input: UpdateDomainCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = { + "content-type": "application/x-amz-json-1.0", + "x-amz-target": "VoiceID.UpdateDomain", + }; + let body: any; + body = JSON.stringify(serializeAws_json1_0UpdateDomainRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +export const deserializeAws_json1_0CreateDomainCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return deserializeAws_json1_0CreateDomainCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_0CreateDomainResponse(data, context); + const response: CreateDomainCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; + +const deserializeAws_json1_0CreateDomainCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.voiceid#AccessDeniedException": + response = { + ...(await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ConflictException": + case "com.amazonaws.voiceid#ConflictException": + response = { + ...(await deserializeAws_json1_0ConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.voiceid#InternalServerException": + response = { + ...(await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.voiceid#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceQuotaExceededException": + case "com.amazonaws.voiceid#ServiceQuotaExceededException": + response = { + ...(await deserializeAws_json1_0ServiceQuotaExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.voiceid#ThrottlingException": + response = { + ...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.voiceid#ValidationException": + response = { + ...(await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_json1_0DeleteDomainCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return deserializeAws_json1_0DeleteDomainCommandError(output, context); + } + await collectBody(output.body, context); + const response: DeleteDomainCommandOutput = { + $metadata: deserializeMetadata(output), + }; + return Promise.resolve(response); +}; + +const deserializeAws_json1_0DeleteDomainCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.voiceid#AccessDeniedException": + response = { + ...(await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ConflictException": + case "com.amazonaws.voiceid#ConflictException": + response = { + ...(await deserializeAws_json1_0ConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.voiceid#InternalServerException": + response = { + ...(await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.voiceid#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.voiceid#ThrottlingException": + response = { + ...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.voiceid#ValidationException": + response = { + ...(await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_json1_0DeleteFraudsterCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return deserializeAws_json1_0DeleteFraudsterCommandError(output, context); + } + await collectBody(output.body, context); + const response: DeleteFraudsterCommandOutput = { + $metadata: deserializeMetadata(output), + }; + return Promise.resolve(response); +}; + +const deserializeAws_json1_0DeleteFraudsterCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.voiceid#AccessDeniedException": + response = { + ...(await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.voiceid#InternalServerException": + response = { + ...(await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.voiceid#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.voiceid#ThrottlingException": + response = { + ...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.voiceid#ValidationException": + response = { + ...(await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_json1_0DeleteSpeakerCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return deserializeAws_json1_0DeleteSpeakerCommandError(output, context); + } + await collectBody(output.body, context); + const response: DeleteSpeakerCommandOutput = { + $metadata: deserializeMetadata(output), + }; + return Promise.resolve(response); +}; + +const deserializeAws_json1_0DeleteSpeakerCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.voiceid#AccessDeniedException": + response = { + ...(await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ConflictException": + case "com.amazonaws.voiceid#ConflictException": + response = { + ...(await deserializeAws_json1_0ConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.voiceid#InternalServerException": + response = { + ...(await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.voiceid#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.voiceid#ThrottlingException": + response = { + ...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.voiceid#ValidationException": + response = { + ...(await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_json1_0DescribeDomainCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return deserializeAws_json1_0DescribeDomainCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_0DescribeDomainResponse(data, context); + const response: DescribeDomainCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; + +const deserializeAws_json1_0DescribeDomainCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.voiceid#AccessDeniedException": + response = { + ...(await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.voiceid#InternalServerException": + response = { + ...(await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.voiceid#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.voiceid#ThrottlingException": + response = { + ...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.voiceid#ValidationException": + response = { + ...(await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_json1_0DescribeFraudsterCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return deserializeAws_json1_0DescribeFraudsterCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_0DescribeFraudsterResponse(data, context); + const response: DescribeFraudsterCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; + +const deserializeAws_json1_0DescribeFraudsterCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.voiceid#AccessDeniedException": + response = { + ...(await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.voiceid#InternalServerException": + response = { + ...(await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.voiceid#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.voiceid#ThrottlingException": + response = { + ...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.voiceid#ValidationException": + response = { + ...(await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_json1_0DescribeFraudsterRegistrationJobCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return deserializeAws_json1_0DescribeFraudsterRegistrationJobCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_0DescribeFraudsterRegistrationJobResponse(data, context); + const response: DescribeFraudsterRegistrationJobCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; + +const deserializeAws_json1_0DescribeFraudsterRegistrationJobCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.voiceid#AccessDeniedException": + response = { + ...(await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.voiceid#InternalServerException": + response = { + ...(await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.voiceid#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.voiceid#ThrottlingException": + response = { + ...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.voiceid#ValidationException": + response = { + ...(await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_json1_0DescribeSpeakerCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return deserializeAws_json1_0DescribeSpeakerCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_0DescribeSpeakerResponse(data, context); + const response: DescribeSpeakerCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; + +const deserializeAws_json1_0DescribeSpeakerCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.voiceid#AccessDeniedException": + response = { + ...(await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.voiceid#InternalServerException": + response = { + ...(await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.voiceid#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.voiceid#ThrottlingException": + response = { + ...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.voiceid#ValidationException": + response = { + ...(await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_json1_0DescribeSpeakerEnrollmentJobCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return deserializeAws_json1_0DescribeSpeakerEnrollmentJobCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_0DescribeSpeakerEnrollmentJobResponse(data, context); + const response: DescribeSpeakerEnrollmentJobCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; + +const deserializeAws_json1_0DescribeSpeakerEnrollmentJobCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.voiceid#AccessDeniedException": + response = { + ...(await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.voiceid#InternalServerException": + response = { + ...(await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.voiceid#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.voiceid#ThrottlingException": + response = { + ...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.voiceid#ValidationException": + response = { + ...(await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_json1_0EvaluateSessionCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return deserializeAws_json1_0EvaluateSessionCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_0EvaluateSessionResponse(data, context); + const response: EvaluateSessionCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; + +const deserializeAws_json1_0EvaluateSessionCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.voiceid#AccessDeniedException": + response = { + ...(await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.voiceid#InternalServerException": + response = { + ...(await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.voiceid#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.voiceid#ThrottlingException": + response = { + ...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.voiceid#ValidationException": + response = { + ...(await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_json1_0ListDomainsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return deserializeAws_json1_0ListDomainsCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_0ListDomainsResponse(data, context); + const response: ListDomainsCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; + +const deserializeAws_json1_0ListDomainsCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.voiceid#AccessDeniedException": + response = { + ...(await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.voiceid#InternalServerException": + response = { + ...(await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.voiceid#ThrottlingException": + response = { + ...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.voiceid#ValidationException": + response = { + ...(await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_json1_0ListFraudsterRegistrationJobsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return deserializeAws_json1_0ListFraudsterRegistrationJobsCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_0ListFraudsterRegistrationJobsResponse(data, context); + const response: ListFraudsterRegistrationJobsCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; + +const deserializeAws_json1_0ListFraudsterRegistrationJobsCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.voiceid#AccessDeniedException": + response = { + ...(await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.voiceid#InternalServerException": + response = { + ...(await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.voiceid#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.voiceid#ThrottlingException": + response = { + ...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.voiceid#ValidationException": + response = { + ...(await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_json1_0ListSpeakerEnrollmentJobsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return deserializeAws_json1_0ListSpeakerEnrollmentJobsCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_0ListSpeakerEnrollmentJobsResponse(data, context); + const response: ListSpeakerEnrollmentJobsCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; + +const deserializeAws_json1_0ListSpeakerEnrollmentJobsCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.voiceid#AccessDeniedException": + response = { + ...(await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.voiceid#InternalServerException": + response = { + ...(await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.voiceid#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.voiceid#ThrottlingException": + response = { + ...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.voiceid#ValidationException": + response = { + ...(await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_json1_0ListSpeakersCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return deserializeAws_json1_0ListSpeakersCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_0ListSpeakersResponse(data, context); + const response: ListSpeakersCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; + +const deserializeAws_json1_0ListSpeakersCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.voiceid#AccessDeniedException": + response = { + ...(await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.voiceid#InternalServerException": + response = { + ...(await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.voiceid#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.voiceid#ThrottlingException": + response = { + ...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.voiceid#ValidationException": + response = { + ...(await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_json1_0ListTagsForResourceCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return deserializeAws_json1_0ListTagsForResourceCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_0ListTagsForResourceResponse(data, context); + const response: ListTagsForResourceCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; + +const deserializeAws_json1_0ListTagsForResourceCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.voiceid#AccessDeniedException": + response = { + ...(await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.voiceid#InternalServerException": + response = { + ...(await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.voiceid#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.voiceid#ThrottlingException": + response = { + ...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.voiceid#ValidationException": + response = { + ...(await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_json1_0OptOutSpeakerCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return deserializeAws_json1_0OptOutSpeakerCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_0OptOutSpeakerResponse(data, context); + const response: OptOutSpeakerCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; + +const deserializeAws_json1_0OptOutSpeakerCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.voiceid#AccessDeniedException": + response = { + ...(await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ConflictException": + case "com.amazonaws.voiceid#ConflictException": + response = { + ...(await deserializeAws_json1_0ConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.voiceid#InternalServerException": + response = { + ...(await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.voiceid#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.voiceid#ThrottlingException": + response = { + ...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.voiceid#ValidationException": + response = { + ...(await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_json1_0StartFraudsterRegistrationJobCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return deserializeAws_json1_0StartFraudsterRegistrationJobCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_0StartFraudsterRegistrationJobResponse(data, context); + const response: StartFraudsterRegistrationJobCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; + +const deserializeAws_json1_0StartFraudsterRegistrationJobCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.voiceid#AccessDeniedException": + response = { + ...(await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ConflictException": + case "com.amazonaws.voiceid#ConflictException": + response = { + ...(await deserializeAws_json1_0ConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.voiceid#InternalServerException": + response = { + ...(await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.voiceid#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceQuotaExceededException": + case "com.amazonaws.voiceid#ServiceQuotaExceededException": + response = { + ...(await deserializeAws_json1_0ServiceQuotaExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.voiceid#ThrottlingException": + response = { + ...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.voiceid#ValidationException": + response = { + ...(await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_json1_0StartSpeakerEnrollmentJobCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return deserializeAws_json1_0StartSpeakerEnrollmentJobCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_0StartSpeakerEnrollmentJobResponse(data, context); + const response: StartSpeakerEnrollmentJobCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; + +const deserializeAws_json1_0StartSpeakerEnrollmentJobCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.voiceid#AccessDeniedException": + response = { + ...(await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ConflictException": + case "com.amazonaws.voiceid#ConflictException": + response = { + ...(await deserializeAws_json1_0ConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.voiceid#InternalServerException": + response = { + ...(await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.voiceid#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceQuotaExceededException": + case "com.amazonaws.voiceid#ServiceQuotaExceededException": + response = { + ...(await deserializeAws_json1_0ServiceQuotaExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.voiceid#ThrottlingException": + response = { + ...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.voiceid#ValidationException": + response = { + ...(await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_json1_0TagResourceCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return deserializeAws_json1_0TagResourceCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_0TagResourceResponse(data, context); + const response: TagResourceCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; + +const deserializeAws_json1_0TagResourceCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.voiceid#AccessDeniedException": + response = { + ...(await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ConflictException": + case "com.amazonaws.voiceid#ConflictException": + response = { + ...(await deserializeAws_json1_0ConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.voiceid#InternalServerException": + response = { + ...(await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.voiceid#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.voiceid#ThrottlingException": + response = { + ...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.voiceid#ValidationException": + response = { + ...(await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_json1_0UntagResourceCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return deserializeAws_json1_0UntagResourceCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_0UntagResourceResponse(data, context); + const response: UntagResourceCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; + +const deserializeAws_json1_0UntagResourceCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.voiceid#AccessDeniedException": + response = { + ...(await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ConflictException": + case "com.amazonaws.voiceid#ConflictException": + response = { + ...(await deserializeAws_json1_0ConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.voiceid#InternalServerException": + response = { + ...(await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.voiceid#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.voiceid#ThrottlingException": + response = { + ...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.voiceid#ValidationException": + response = { + ...(await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_json1_0UpdateDomainCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return deserializeAws_json1_0UpdateDomainCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_0UpdateDomainResponse(data, context); + const response: UpdateDomainCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; + +const deserializeAws_json1_0UpdateDomainCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.voiceid#AccessDeniedException": + response = { + ...(await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ConflictException": + case "com.amazonaws.voiceid#ConflictException": + response = { + ...(await deserializeAws_json1_0ConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.voiceid#InternalServerException": + response = { + ...(await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.voiceid#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.voiceid#ThrottlingException": + response = { + ...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.voiceid#ValidationException": + response = { + ...(await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +const deserializeAws_json1_0AccessDeniedExceptionResponse = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = deserializeAws_json1_0AccessDeniedException(body, context); + const contents: AccessDeniedException = { + name: "AccessDeniedException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; + +const deserializeAws_json1_0ConflictExceptionResponse = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = deserializeAws_json1_0ConflictException(body, context); + const contents: ConflictException = { + name: "ConflictException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; + +const deserializeAws_json1_0InternalServerExceptionResponse = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = deserializeAws_json1_0InternalServerException(body, context); + const contents: InternalServerException = { + name: "InternalServerException", + $fault: "server", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; + +const deserializeAws_json1_0ResourceNotFoundExceptionResponse = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = deserializeAws_json1_0ResourceNotFoundException(body, context); + const contents: ResourceNotFoundException = { + name: "ResourceNotFoundException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; + +const deserializeAws_json1_0ServiceQuotaExceededExceptionResponse = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = deserializeAws_json1_0ServiceQuotaExceededException(body, context); + const contents: ServiceQuotaExceededException = { + name: "ServiceQuotaExceededException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; + +const deserializeAws_json1_0ThrottlingExceptionResponse = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = deserializeAws_json1_0ThrottlingException(body, context); + const contents: ThrottlingException = { + name: "ThrottlingException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; + +const deserializeAws_json1_0ValidationExceptionResponse = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = deserializeAws_json1_0ValidationException(body, context); + const contents: ValidationException = { + name: "ValidationException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; + +const serializeAws_json1_0CreateDomainRequest = (input: CreateDomainRequest, context: __SerdeContext): any => { + return { + ClientToken: input.ClientToken ?? generateIdempotencyToken(), + ...(input.Description !== undefined && input.Description !== null && { Description: input.Description }), + ...(input.Name !== undefined && input.Name !== null && { Name: input.Name }), + ...(input.ServerSideEncryptionConfiguration !== undefined && + input.ServerSideEncryptionConfiguration !== null && { + ServerSideEncryptionConfiguration: serializeAws_json1_0ServerSideEncryptionConfiguration( + input.ServerSideEncryptionConfiguration, + context + ), + }), + ...(input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_json1_0TagList(input.Tags, context) }), + }; +}; + +const serializeAws_json1_0DeleteDomainRequest = (input: DeleteDomainRequest, context: __SerdeContext): any => { + return { + ...(input.DomainId !== undefined && input.DomainId !== null && { DomainId: input.DomainId }), + }; +}; + +const serializeAws_json1_0DeleteFraudsterRequest = (input: DeleteFraudsterRequest, context: __SerdeContext): any => { + return { + ...(input.DomainId !== undefined && input.DomainId !== null && { DomainId: input.DomainId }), + ...(input.FraudsterId !== undefined && input.FraudsterId !== null && { FraudsterId: input.FraudsterId }), + }; +}; + +const serializeAws_json1_0DeleteSpeakerRequest = (input: DeleteSpeakerRequest, context: __SerdeContext): any => { + return { + ...(input.DomainId !== undefined && input.DomainId !== null && { DomainId: input.DomainId }), + ...(input.SpeakerId !== undefined && input.SpeakerId !== null && { SpeakerId: input.SpeakerId }), + }; +}; + +const serializeAws_json1_0DescribeDomainRequest = (input: DescribeDomainRequest, context: __SerdeContext): any => { + return { + ...(input.DomainId !== undefined && input.DomainId !== null && { DomainId: input.DomainId }), + }; +}; + +const serializeAws_json1_0DescribeFraudsterRegistrationJobRequest = ( + input: DescribeFraudsterRegistrationJobRequest, + context: __SerdeContext +): any => { + return { + ...(input.DomainId !== undefined && input.DomainId !== null && { DomainId: input.DomainId }), + ...(input.JobId !== undefined && input.JobId !== null && { JobId: input.JobId }), + }; +}; + +const serializeAws_json1_0DescribeFraudsterRequest = ( + input: DescribeFraudsterRequest, + context: __SerdeContext +): any => { + return { + ...(input.DomainId !== undefined && input.DomainId !== null && { DomainId: input.DomainId }), + ...(input.FraudsterId !== undefined && input.FraudsterId !== null && { FraudsterId: input.FraudsterId }), + }; +}; + +const serializeAws_json1_0DescribeSpeakerEnrollmentJobRequest = ( + input: DescribeSpeakerEnrollmentJobRequest, + context: __SerdeContext +): any => { + return { + ...(input.DomainId !== undefined && input.DomainId !== null && { DomainId: input.DomainId }), + ...(input.JobId !== undefined && input.JobId !== null && { JobId: input.JobId }), + }; +}; + +const serializeAws_json1_0DescribeSpeakerRequest = (input: DescribeSpeakerRequest, context: __SerdeContext): any => { + return { + ...(input.DomainId !== undefined && input.DomainId !== null && { DomainId: input.DomainId }), + ...(input.SpeakerId !== undefined && input.SpeakerId !== null && { SpeakerId: input.SpeakerId }), + }; +}; + +const serializeAws_json1_0EnrollmentConfig = (input: EnrollmentConfig, context: __SerdeContext): any => { + return { + ...(input.ExistingEnrollmentAction !== undefined && + input.ExistingEnrollmentAction !== null && { ExistingEnrollmentAction: input.ExistingEnrollmentAction }), + ...(input.FraudDetectionConfig !== undefined && + input.FraudDetectionConfig !== null && { + FraudDetectionConfig: serializeAws_json1_0EnrollmentJobFraudDetectionConfig( + input.FraudDetectionConfig, + context + ), + }), + }; +}; + +const serializeAws_json1_0EnrollmentJobFraudDetectionConfig = ( + input: EnrollmentJobFraudDetectionConfig, + context: __SerdeContext +): any => { + return { + ...(input.FraudDetectionAction !== undefined && + input.FraudDetectionAction !== null && { FraudDetectionAction: input.FraudDetectionAction }), + ...(input.RiskThreshold !== undefined && input.RiskThreshold !== null && { RiskThreshold: input.RiskThreshold }), + }; +}; + +const serializeAws_json1_0EvaluateSessionRequest = (input: EvaluateSessionRequest, context: __SerdeContext): any => { + return { + ...(input.DomainId !== undefined && input.DomainId !== null && { DomainId: input.DomainId }), + ...(input.SessionNameOrId !== undefined && + input.SessionNameOrId !== null && { SessionNameOrId: input.SessionNameOrId }), + }; +}; + +const serializeAws_json1_0InputDataConfig = (input: InputDataConfig, context: __SerdeContext): any => { + return { + ...(input.S3Uri !== undefined && input.S3Uri !== null && { S3Uri: input.S3Uri }), + }; +}; + +const serializeAws_json1_0ListDomainsRequest = (input: ListDomainsRequest, context: __SerdeContext): any => { + return { + ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }), + ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }), + }; +}; + +const serializeAws_json1_0ListFraudsterRegistrationJobsRequest = ( + input: ListFraudsterRegistrationJobsRequest, + context: __SerdeContext +): any => { + return { + ...(input.DomainId !== undefined && input.DomainId !== null && { DomainId: input.DomainId }), + ...(input.JobStatus !== undefined && input.JobStatus !== null && { JobStatus: input.JobStatus }), + ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }), + ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }), + }; +}; + +const serializeAws_json1_0ListSpeakerEnrollmentJobsRequest = ( + input: ListSpeakerEnrollmentJobsRequest, + context: __SerdeContext +): any => { + return { + ...(input.DomainId !== undefined && input.DomainId !== null && { DomainId: input.DomainId }), + ...(input.JobStatus !== undefined && input.JobStatus !== null && { JobStatus: input.JobStatus }), + ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }), + ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }), + }; +}; + +const serializeAws_json1_0ListSpeakersRequest = (input: ListSpeakersRequest, context: __SerdeContext): any => { + return { + ...(input.DomainId !== undefined && input.DomainId !== null && { DomainId: input.DomainId }), + ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }), + ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }), + }; +}; + +const serializeAws_json1_0ListTagsForResourceRequest = ( + input: ListTagsForResourceRequest, + context: __SerdeContext +): any => { + return { + ...(input.ResourceArn !== undefined && input.ResourceArn !== null && { ResourceArn: input.ResourceArn }), + }; +}; + +const serializeAws_json1_0OptOutSpeakerRequest = (input: OptOutSpeakerRequest, context: __SerdeContext): any => { + return { + ...(input.DomainId !== undefined && input.DomainId !== null && { DomainId: input.DomainId }), + ...(input.SpeakerId !== undefined && input.SpeakerId !== null && { SpeakerId: input.SpeakerId }), + }; +}; + +const serializeAws_json1_0OutputDataConfig = (input: OutputDataConfig, context: __SerdeContext): any => { + return { + ...(input.KmsKeyId !== undefined && input.KmsKeyId !== null && { KmsKeyId: input.KmsKeyId }), + ...(input.S3Uri !== undefined && input.S3Uri !== null && { S3Uri: input.S3Uri }), + }; +}; + +const serializeAws_json1_0RegistrationConfig = (input: RegistrationConfig, context: __SerdeContext): any => { + return { + ...(input.DuplicateRegistrationAction !== undefined && + input.DuplicateRegistrationAction !== null && { DuplicateRegistrationAction: input.DuplicateRegistrationAction }), + ...(input.FraudsterSimilarityThreshold !== undefined && + input.FraudsterSimilarityThreshold !== null && { + FraudsterSimilarityThreshold: input.FraudsterSimilarityThreshold, + }), + }; +}; + +const serializeAws_json1_0ServerSideEncryptionConfiguration = ( + input: ServerSideEncryptionConfiguration, + context: __SerdeContext +): any => { + return { + ...(input.KmsKeyId !== undefined && input.KmsKeyId !== null && { KmsKeyId: input.KmsKeyId }), + }; +}; + +const serializeAws_json1_0StartFraudsterRegistrationJobRequest = ( + input: StartFraudsterRegistrationJobRequest, + context: __SerdeContext +): any => { + return { + ClientToken: input.ClientToken ?? generateIdempotencyToken(), + ...(input.DataAccessRoleArn !== undefined && + input.DataAccessRoleArn !== null && { DataAccessRoleArn: input.DataAccessRoleArn }), + ...(input.DomainId !== undefined && input.DomainId !== null && { DomainId: input.DomainId }), + ...(input.InputDataConfig !== undefined && + input.InputDataConfig !== null && { + InputDataConfig: serializeAws_json1_0InputDataConfig(input.InputDataConfig, context), + }), + ...(input.JobName !== undefined && input.JobName !== null && { JobName: input.JobName }), + ...(input.OutputDataConfig !== undefined && + input.OutputDataConfig !== null && { + OutputDataConfig: serializeAws_json1_0OutputDataConfig(input.OutputDataConfig, context), + }), + ...(input.RegistrationConfig !== undefined && + input.RegistrationConfig !== null && { + RegistrationConfig: serializeAws_json1_0RegistrationConfig(input.RegistrationConfig, context), + }), + }; +}; + +const serializeAws_json1_0StartSpeakerEnrollmentJobRequest = ( + input: StartSpeakerEnrollmentJobRequest, + context: __SerdeContext +): any => { + return { + ClientToken: input.ClientToken ?? generateIdempotencyToken(), + ...(input.DataAccessRoleArn !== undefined && + input.DataAccessRoleArn !== null && { DataAccessRoleArn: input.DataAccessRoleArn }), + ...(input.DomainId !== undefined && input.DomainId !== null && { DomainId: input.DomainId }), + ...(input.EnrollmentConfig !== undefined && + input.EnrollmentConfig !== null && { + EnrollmentConfig: serializeAws_json1_0EnrollmentConfig(input.EnrollmentConfig, context), + }), + ...(input.InputDataConfig !== undefined && + input.InputDataConfig !== null && { + InputDataConfig: serializeAws_json1_0InputDataConfig(input.InputDataConfig, context), + }), + ...(input.JobName !== undefined && input.JobName !== null && { JobName: input.JobName }), + ...(input.OutputDataConfig !== undefined && + input.OutputDataConfig !== null && { + OutputDataConfig: serializeAws_json1_0OutputDataConfig(input.OutputDataConfig, context), + }), + }; +}; + +const serializeAws_json1_0Tag = (input: Tag, context: __SerdeContext): any => { + return { + ...(input.Key !== undefined && input.Key !== null && { Key: input.Key }), + ...(input.Value !== undefined && input.Value !== null && { Value: input.Value }), + }; +}; + +const serializeAws_json1_0TagKeyList = (input: string[], context: __SerdeContext): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + if (entry === null) { + return null as any; + } + return entry; + }); +}; + +const serializeAws_json1_0TagList = (input: Tag[], context: __SerdeContext): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + if (entry === null) { + return null as any; + } + return serializeAws_json1_0Tag(entry, context); + }); +}; + +const serializeAws_json1_0TagResourceRequest = (input: TagResourceRequest, context: __SerdeContext): any => { + return { + ...(input.ResourceArn !== undefined && input.ResourceArn !== null && { ResourceArn: input.ResourceArn }), + ...(input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_json1_0TagList(input.Tags, context) }), + }; +}; + +const serializeAws_json1_0UntagResourceRequest = (input: UntagResourceRequest, context: __SerdeContext): any => { + return { + ...(input.ResourceArn !== undefined && input.ResourceArn !== null && { ResourceArn: input.ResourceArn }), + ...(input.TagKeys !== undefined && + input.TagKeys !== null && { TagKeys: serializeAws_json1_0TagKeyList(input.TagKeys, context) }), + }; +}; + +const serializeAws_json1_0UpdateDomainRequest = (input: UpdateDomainRequest, context: __SerdeContext): any => { + return { + ...(input.Description !== undefined && input.Description !== null && { Description: input.Description }), + ...(input.DomainId !== undefined && input.DomainId !== null && { DomainId: input.DomainId }), + ...(input.Name !== undefined && input.Name !== null && { Name: input.Name }), + ...(input.ServerSideEncryptionConfiguration !== undefined && + input.ServerSideEncryptionConfiguration !== null && { + ServerSideEncryptionConfiguration: serializeAws_json1_0ServerSideEncryptionConfiguration( + input.ServerSideEncryptionConfiguration, + context + ), + }), + }; +}; + +const deserializeAws_json1_0AccessDeniedException = (output: any, context: __SerdeContext): AccessDeniedException => { + return { + Message: __expectString(output.Message), + } as any; +}; + +const deserializeAws_json1_0AuthenticationConfiguration = ( + output: any, + context: __SerdeContext +): AuthenticationConfiguration => { + return { + AcceptanceThreshold: __expectInt32(output.AcceptanceThreshold), + } as any; +}; + +const deserializeAws_json1_0AuthenticationResult = (output: any, context: __SerdeContext): AuthenticationResult => { + return { + AudioAggregationEndedAt: + output.AudioAggregationEndedAt !== undefined && output.AudioAggregationEndedAt !== null + ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.AudioAggregationEndedAt))) + : undefined, + AudioAggregationStartedAt: + output.AudioAggregationStartedAt !== undefined && output.AudioAggregationStartedAt !== null + ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.AudioAggregationStartedAt))) + : undefined, + AuthenticationResultId: __expectString(output.AuthenticationResultId), + Configuration: + output.Configuration !== undefined && output.Configuration !== null + ? deserializeAws_json1_0AuthenticationConfiguration(output.Configuration, context) + : undefined, + CustomerSpeakerId: __expectString(output.CustomerSpeakerId), + Decision: __expectString(output.Decision), + GeneratedSpeakerId: __expectString(output.GeneratedSpeakerId), + Score: __expectInt32(output.Score), + } as any; +}; + +const deserializeAws_json1_0ConflictException = (output: any, context: __SerdeContext): ConflictException => { + return { + ConflictType: __expectString(output.ConflictType), + Message: __expectString(output.Message), + } as any; +}; + +const deserializeAws_json1_0CreateDomainResponse = (output: any, context: __SerdeContext): CreateDomainResponse => { + return { + Domain: + output.Domain !== undefined && output.Domain !== null + ? deserializeAws_json1_0Domain(output.Domain, context) + : undefined, + } as any; +}; + +const deserializeAws_json1_0DescribeDomainResponse = (output: any, context: __SerdeContext): DescribeDomainResponse => { + return { + Domain: + output.Domain !== undefined && output.Domain !== null + ? deserializeAws_json1_0Domain(output.Domain, context) + : undefined, + } as any; +}; + +const deserializeAws_json1_0DescribeFraudsterRegistrationJobResponse = ( + output: any, + context: __SerdeContext +): DescribeFraudsterRegistrationJobResponse => { + return { + Job: + output.Job !== undefined && output.Job !== null + ? deserializeAws_json1_0FraudsterRegistrationJob(output.Job, context) + : undefined, + } as any; +}; + +const deserializeAws_json1_0DescribeFraudsterResponse = ( + output: any, + context: __SerdeContext +): DescribeFraudsterResponse => { + return { + Fraudster: + output.Fraudster !== undefined && output.Fraudster !== null + ? deserializeAws_json1_0Fraudster(output.Fraudster, context) + : undefined, + } as any; +}; + +const deserializeAws_json1_0DescribeSpeakerEnrollmentJobResponse = ( + output: any, + context: __SerdeContext +): DescribeSpeakerEnrollmentJobResponse => { + return { + Job: + output.Job !== undefined && output.Job !== null + ? deserializeAws_json1_0SpeakerEnrollmentJob(output.Job, context) + : undefined, + } as any; +}; + +const deserializeAws_json1_0DescribeSpeakerResponse = ( + output: any, + context: __SerdeContext +): DescribeSpeakerResponse => { + return { + Speaker: + output.Speaker !== undefined && output.Speaker !== null + ? deserializeAws_json1_0Speaker(output.Speaker, context) + : undefined, + } as any; +}; + +const deserializeAws_json1_0Domain = (output: any, context: __SerdeContext): Domain => { + return { + Arn: __expectString(output.Arn), + CreatedAt: + output.CreatedAt !== undefined && output.CreatedAt !== null + ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) + : undefined, + Description: __expectString(output.Description), + DomainId: __expectString(output.DomainId), + DomainStatus: __expectString(output.DomainStatus), + Name: __expectString(output.Name), + ServerSideEncryptionConfiguration: + output.ServerSideEncryptionConfiguration !== undefined && output.ServerSideEncryptionConfiguration !== null + ? deserializeAws_json1_0ServerSideEncryptionConfiguration(output.ServerSideEncryptionConfiguration, context) + : undefined, + UpdatedAt: + output.UpdatedAt !== undefined && output.UpdatedAt !== null + ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdatedAt))) + : undefined, + } as any; +}; + +const deserializeAws_json1_0DomainSummaries = (output: any, context: __SerdeContext): DomainSummary[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return deserializeAws_json1_0DomainSummary(entry, context); + }); +}; + +const deserializeAws_json1_0DomainSummary = (output: any, context: __SerdeContext): DomainSummary => { + return { + Arn: __expectString(output.Arn), + CreatedAt: + output.CreatedAt !== undefined && output.CreatedAt !== null + ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) + : undefined, + Description: __expectString(output.Description), + DomainId: __expectString(output.DomainId), + DomainStatus: __expectString(output.DomainStatus), + Name: __expectString(output.Name), + ServerSideEncryptionConfiguration: + output.ServerSideEncryptionConfiguration !== undefined && output.ServerSideEncryptionConfiguration !== null + ? deserializeAws_json1_0ServerSideEncryptionConfiguration(output.ServerSideEncryptionConfiguration, context) + : undefined, + UpdatedAt: + output.UpdatedAt !== undefined && output.UpdatedAt !== null + ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdatedAt))) + : undefined, + } as any; +}; + +const deserializeAws_json1_0EnrollmentConfig = (output: any, context: __SerdeContext): EnrollmentConfig => { + return { + ExistingEnrollmentAction: __expectString(output.ExistingEnrollmentAction), + FraudDetectionConfig: + output.FraudDetectionConfig !== undefined && output.FraudDetectionConfig !== null + ? deserializeAws_json1_0EnrollmentJobFraudDetectionConfig(output.FraudDetectionConfig, context) + : undefined, + } as any; +}; + +const deserializeAws_json1_0EnrollmentJobFraudDetectionConfig = ( + output: any, + context: __SerdeContext +): EnrollmentJobFraudDetectionConfig => { + return { + FraudDetectionAction: __expectString(output.FraudDetectionAction), + RiskThreshold: __expectInt32(output.RiskThreshold), + } as any; +}; + +const deserializeAws_json1_0EvaluateSessionResponse = ( + output: any, + context: __SerdeContext +): EvaluateSessionResponse => { + return { + AuthenticationResult: + output.AuthenticationResult !== undefined && output.AuthenticationResult !== null + ? deserializeAws_json1_0AuthenticationResult(output.AuthenticationResult, context) + : undefined, + DomainId: __expectString(output.DomainId), + FraudDetectionResult: + output.FraudDetectionResult !== undefined && output.FraudDetectionResult !== null + ? deserializeAws_json1_0FraudDetectionResult(output.FraudDetectionResult, context) + : undefined, + SessionId: __expectString(output.SessionId), + SessionName: __expectString(output.SessionName), + StreamingStatus: __expectString(output.StreamingStatus), + } as any; +}; + +const deserializeAws_json1_0FailureDetails = (output: any, context: __SerdeContext): FailureDetails => { + return { + Message: __expectString(output.Message), + StatusCode: __expectInt32(output.StatusCode), + } as any; +}; + +const deserializeAws_json1_0FraudDetectionConfiguration = ( + output: any, + context: __SerdeContext +): FraudDetectionConfiguration => { + return { + RiskThreshold: __expectInt32(output.RiskThreshold), + } as any; +}; + +const deserializeAws_json1_0FraudDetectionReasons = ( + output: any, + context: __SerdeContext +): (FraudDetectionReason | string)[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return __expectString(entry) as any; + }); +}; + +const deserializeAws_json1_0FraudDetectionResult = (output: any, context: __SerdeContext): FraudDetectionResult => { + return { + AudioAggregationEndedAt: + output.AudioAggregationEndedAt !== undefined && output.AudioAggregationEndedAt !== null + ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.AudioAggregationEndedAt))) + : undefined, + AudioAggregationStartedAt: + output.AudioAggregationStartedAt !== undefined && output.AudioAggregationStartedAt !== null + ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.AudioAggregationStartedAt))) + : undefined, + Configuration: + output.Configuration !== undefined && output.Configuration !== null + ? deserializeAws_json1_0FraudDetectionConfiguration(output.Configuration, context) + : undefined, + Decision: __expectString(output.Decision), + FraudDetectionResultId: __expectString(output.FraudDetectionResultId), + Reasons: + output.Reasons !== undefined && output.Reasons !== null + ? deserializeAws_json1_0FraudDetectionReasons(output.Reasons, context) + : undefined, + RiskDetails: + output.RiskDetails !== undefined && output.RiskDetails !== null + ? deserializeAws_json1_0FraudRiskDetails(output.RiskDetails, context) + : undefined, + } as any; +}; + +const deserializeAws_json1_0FraudRiskDetails = (output: any, context: __SerdeContext): FraudRiskDetails => { + return { + KnownFraudsterRisk: + output.KnownFraudsterRisk !== undefined && output.KnownFraudsterRisk !== null + ? deserializeAws_json1_0KnownFraudsterRisk(output.KnownFraudsterRisk, context) + : undefined, + } as any; +}; + +const deserializeAws_json1_0Fraudster = (output: any, context: __SerdeContext): Fraudster => { + return { + CreatedAt: + output.CreatedAt !== undefined && output.CreatedAt !== null + ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) + : undefined, + DomainId: __expectString(output.DomainId), + GeneratedFraudsterId: __expectString(output.GeneratedFraudsterId), + } as any; +}; + +const deserializeAws_json1_0FraudsterRegistrationJob = ( + output: any, + context: __SerdeContext +): FraudsterRegistrationJob => { + return { + CreatedAt: + output.CreatedAt !== undefined && output.CreatedAt !== null + ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) + : undefined, + DataAccessRoleArn: __expectString(output.DataAccessRoleArn), + DomainId: __expectString(output.DomainId), + EndedAt: + output.EndedAt !== undefined && output.EndedAt !== null + ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndedAt))) + : undefined, + FailureDetails: + output.FailureDetails !== undefined && output.FailureDetails !== null + ? deserializeAws_json1_0FailureDetails(output.FailureDetails, context) + : undefined, + InputDataConfig: + output.InputDataConfig !== undefined && output.InputDataConfig !== null + ? deserializeAws_json1_0InputDataConfig(output.InputDataConfig, context) + : undefined, + JobId: __expectString(output.JobId), + JobName: __expectString(output.JobName), + JobProgress: + output.JobProgress !== undefined && output.JobProgress !== null + ? deserializeAws_json1_0JobProgress(output.JobProgress, context) + : undefined, + JobStatus: __expectString(output.JobStatus), + OutputDataConfig: + output.OutputDataConfig !== undefined && output.OutputDataConfig !== null + ? deserializeAws_json1_0OutputDataConfig(output.OutputDataConfig, context) + : undefined, + RegistrationConfig: + output.RegistrationConfig !== undefined && output.RegistrationConfig !== null + ? deserializeAws_json1_0RegistrationConfig(output.RegistrationConfig, context) + : undefined, + } as any; +}; + +const deserializeAws_json1_0FraudsterRegistrationJobSummaries = ( + output: any, + context: __SerdeContext +): FraudsterRegistrationJobSummary[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return deserializeAws_json1_0FraudsterRegistrationJobSummary(entry, context); + }); +}; + +const deserializeAws_json1_0FraudsterRegistrationJobSummary = ( + output: any, + context: __SerdeContext +): FraudsterRegistrationJobSummary => { + return { + CreatedAt: + output.CreatedAt !== undefined && output.CreatedAt !== null + ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) + : undefined, + DomainId: __expectString(output.DomainId), + EndedAt: + output.EndedAt !== undefined && output.EndedAt !== null + ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndedAt))) + : undefined, + FailureDetails: + output.FailureDetails !== undefined && output.FailureDetails !== null + ? deserializeAws_json1_0FailureDetails(output.FailureDetails, context) + : undefined, + JobId: __expectString(output.JobId), + JobName: __expectString(output.JobName), + JobProgress: + output.JobProgress !== undefined && output.JobProgress !== null + ? deserializeAws_json1_0JobProgress(output.JobProgress, context) + : undefined, + JobStatus: __expectString(output.JobStatus), + } as any; +}; + +const deserializeAws_json1_0InputDataConfig = (output: any, context: __SerdeContext): InputDataConfig => { + return { + S3Uri: __expectString(output.S3Uri), + } as any; +}; + +const deserializeAws_json1_0InternalServerException = ( + output: any, + context: __SerdeContext +): InternalServerException => { + return { + Message: __expectString(output.Message), + } as any; +}; + +const deserializeAws_json1_0JobProgress = (output: any, context: __SerdeContext): JobProgress => { + return { + PercentComplete: __expectInt32(output.PercentComplete), + } as any; +}; + +const deserializeAws_json1_0KnownFraudsterRisk = (output: any, context: __SerdeContext): KnownFraudsterRisk => { + return { + GeneratedFraudsterId: __expectString(output.GeneratedFraudsterId), + RiskScore: __expectInt32(output.RiskScore), + } as any; +}; + +const deserializeAws_json1_0ListDomainsResponse = (output: any, context: __SerdeContext): ListDomainsResponse => { + return { + DomainSummaries: + output.DomainSummaries !== undefined && output.DomainSummaries !== null + ? deserializeAws_json1_0DomainSummaries(output.DomainSummaries, context) + : undefined, + NextToken: __expectString(output.NextToken), + } as any; +}; + +const deserializeAws_json1_0ListFraudsterRegistrationJobsResponse = ( + output: any, + context: __SerdeContext +): ListFraudsterRegistrationJobsResponse => { + return { + JobSummaries: + output.JobSummaries !== undefined && output.JobSummaries !== null + ? deserializeAws_json1_0FraudsterRegistrationJobSummaries(output.JobSummaries, context) + : undefined, + NextToken: __expectString(output.NextToken), + } as any; +}; + +const deserializeAws_json1_0ListSpeakerEnrollmentJobsResponse = ( + output: any, + context: __SerdeContext +): ListSpeakerEnrollmentJobsResponse => { + return { + JobSummaries: + output.JobSummaries !== undefined && output.JobSummaries !== null + ? deserializeAws_json1_0SpeakerEnrollmentJobSummaries(output.JobSummaries, context) + : undefined, + NextToken: __expectString(output.NextToken), + } as any; +}; + +const deserializeAws_json1_0ListSpeakersResponse = (output: any, context: __SerdeContext): ListSpeakersResponse => { + return { + NextToken: __expectString(output.NextToken), + SpeakerSummaries: + output.SpeakerSummaries !== undefined && output.SpeakerSummaries !== null + ? deserializeAws_json1_0SpeakerSummaries(output.SpeakerSummaries, context) + : undefined, + } as any; +}; + +const deserializeAws_json1_0ListTagsForResourceResponse = ( + output: any, + context: __SerdeContext +): ListTagsForResourceResponse => { + return { + Tags: + output.Tags !== undefined && output.Tags !== null + ? deserializeAws_json1_0TagList(output.Tags, context) + : undefined, + } as any; +}; + +const deserializeAws_json1_0OptOutSpeakerResponse = (output: any, context: __SerdeContext): OptOutSpeakerResponse => { + return { + Speaker: + output.Speaker !== undefined && output.Speaker !== null + ? deserializeAws_json1_0Speaker(output.Speaker, context) + : undefined, + } as any; +}; + +const deserializeAws_json1_0OutputDataConfig = (output: any, context: __SerdeContext): OutputDataConfig => { + return { + KmsKeyId: __expectString(output.KmsKeyId), + S3Uri: __expectString(output.S3Uri), + } as any; +}; + +const deserializeAws_json1_0RegistrationConfig = (output: any, context: __SerdeContext): RegistrationConfig => { + return { + DuplicateRegistrationAction: __expectString(output.DuplicateRegistrationAction), + FraudsterSimilarityThreshold: __expectInt32(output.FraudsterSimilarityThreshold), + } as any; +}; + +const deserializeAws_json1_0ResourceNotFoundException = ( + output: any, + context: __SerdeContext +): ResourceNotFoundException => { + return { + Message: __expectString(output.Message), + ResourceType: __expectString(output.ResourceType), + } as any; +}; + +const deserializeAws_json1_0ServerSideEncryptionConfiguration = ( + output: any, + context: __SerdeContext +): ServerSideEncryptionConfiguration => { + return { + KmsKeyId: __expectString(output.KmsKeyId), + } as any; +}; + +const deserializeAws_json1_0ServiceQuotaExceededException = ( + output: any, + context: __SerdeContext +): ServiceQuotaExceededException => { + return { + Message: __expectString(output.Message), + } as any; +}; + +const deserializeAws_json1_0Speaker = (output: any, context: __SerdeContext): Speaker => { + return { + CreatedAt: + output.CreatedAt !== undefined && output.CreatedAt !== null + ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) + : undefined, + CustomerSpeakerId: __expectString(output.CustomerSpeakerId), + DomainId: __expectString(output.DomainId), + GeneratedSpeakerId: __expectString(output.GeneratedSpeakerId), + Status: __expectString(output.Status), + UpdatedAt: + output.UpdatedAt !== undefined && output.UpdatedAt !== null + ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdatedAt))) + : undefined, + } as any; +}; + +const deserializeAws_json1_0SpeakerEnrollmentJob = (output: any, context: __SerdeContext): SpeakerEnrollmentJob => { + return { + CreatedAt: + output.CreatedAt !== undefined && output.CreatedAt !== null + ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) + : undefined, + DataAccessRoleArn: __expectString(output.DataAccessRoleArn), + DomainId: __expectString(output.DomainId), + EndedAt: + output.EndedAt !== undefined && output.EndedAt !== null + ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndedAt))) + : undefined, + EnrollmentConfig: + output.EnrollmentConfig !== undefined && output.EnrollmentConfig !== null + ? deserializeAws_json1_0EnrollmentConfig(output.EnrollmentConfig, context) + : undefined, + FailureDetails: + output.FailureDetails !== undefined && output.FailureDetails !== null + ? deserializeAws_json1_0FailureDetails(output.FailureDetails, context) + : undefined, + InputDataConfig: + output.InputDataConfig !== undefined && output.InputDataConfig !== null + ? deserializeAws_json1_0InputDataConfig(output.InputDataConfig, context) + : undefined, + JobId: __expectString(output.JobId), + JobName: __expectString(output.JobName), + JobProgress: + output.JobProgress !== undefined && output.JobProgress !== null + ? deserializeAws_json1_0JobProgress(output.JobProgress, context) + : undefined, + JobStatus: __expectString(output.JobStatus), + OutputDataConfig: + output.OutputDataConfig !== undefined && output.OutputDataConfig !== null + ? deserializeAws_json1_0OutputDataConfig(output.OutputDataConfig, context) + : undefined, + } as any; +}; + +const deserializeAws_json1_0SpeakerEnrollmentJobSummaries = ( + output: any, + context: __SerdeContext +): SpeakerEnrollmentJobSummary[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return deserializeAws_json1_0SpeakerEnrollmentJobSummary(entry, context); + }); +}; + +const deserializeAws_json1_0SpeakerEnrollmentJobSummary = ( + output: any, + context: __SerdeContext +): SpeakerEnrollmentJobSummary => { + return { + CreatedAt: + output.CreatedAt !== undefined && output.CreatedAt !== null + ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) + : undefined, + DomainId: __expectString(output.DomainId), + EndedAt: + output.EndedAt !== undefined && output.EndedAt !== null + ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndedAt))) + : undefined, + FailureDetails: + output.FailureDetails !== undefined && output.FailureDetails !== null + ? deserializeAws_json1_0FailureDetails(output.FailureDetails, context) + : undefined, + JobId: __expectString(output.JobId), + JobName: __expectString(output.JobName), + JobProgress: + output.JobProgress !== undefined && output.JobProgress !== null + ? deserializeAws_json1_0JobProgress(output.JobProgress, context) + : undefined, + JobStatus: __expectString(output.JobStatus), + } as any; +}; + +const deserializeAws_json1_0SpeakerSummaries = (output: any, context: __SerdeContext): SpeakerSummary[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return deserializeAws_json1_0SpeakerSummary(entry, context); + }); +}; + +const deserializeAws_json1_0SpeakerSummary = (output: any, context: __SerdeContext): SpeakerSummary => { + return { + CreatedAt: + output.CreatedAt !== undefined && output.CreatedAt !== null + ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) + : undefined, + CustomerSpeakerId: __expectString(output.CustomerSpeakerId), + DomainId: __expectString(output.DomainId), + GeneratedSpeakerId: __expectString(output.GeneratedSpeakerId), + Status: __expectString(output.Status), + UpdatedAt: + output.UpdatedAt !== undefined && output.UpdatedAt !== null + ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdatedAt))) + : undefined, + } as any; +}; + +const deserializeAws_json1_0StartFraudsterRegistrationJobResponse = ( + output: any, + context: __SerdeContext +): StartFraudsterRegistrationJobResponse => { + return { + Job: + output.Job !== undefined && output.Job !== null + ? deserializeAws_json1_0FraudsterRegistrationJob(output.Job, context) + : undefined, + } as any; +}; + +const deserializeAws_json1_0StartSpeakerEnrollmentJobResponse = ( + output: any, + context: __SerdeContext +): StartSpeakerEnrollmentJobResponse => { + return { + Job: + output.Job !== undefined && output.Job !== null + ? deserializeAws_json1_0SpeakerEnrollmentJob(output.Job, context) + : undefined, + } as any; +}; + +const deserializeAws_json1_0Tag = (output: any, context: __SerdeContext): Tag => { + return { + Key: __expectString(output.Key), + Value: __expectString(output.Value), + } as any; +}; + +const deserializeAws_json1_0TagList = (output: any, context: __SerdeContext): Tag[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return deserializeAws_json1_0Tag(entry, context); + }); +}; + +const deserializeAws_json1_0TagResourceResponse = (output: any, context: __SerdeContext): TagResourceResponse => { + return {} as any; +}; + +const deserializeAws_json1_0ThrottlingException = (output: any, context: __SerdeContext): ThrottlingException => { + return { + Message: __expectString(output.Message), + } as any; +}; + +const deserializeAws_json1_0UntagResourceResponse = (output: any, context: __SerdeContext): UntagResourceResponse => { + return {} as any; +}; + +const deserializeAws_json1_0UpdateDomainResponse = (output: any, context: __SerdeContext): UpdateDomainResponse => { + return { + Domain: + output.Domain !== undefined && output.Domain !== null + ? deserializeAws_json1_0Domain(output.Domain, context) + : undefined, + } as any; +}; + +const deserializeAws_json1_0ValidationException = (output: any, context: __SerdeContext): ValidationException => { + return { + Message: __expectString(output.Message), + } as any; +}; + +const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ + httpStatusCode: output.statusCode, + requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"], + extendedRequestId: output.headers["x-amz-id-2"], + cfId: output.headers["x-amz-cf-id"], +}); + +// Collect low-level response body stream to Uint8Array. +const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext): Promise => { + if (streamBody instanceof Uint8Array) { + return Promise.resolve(streamBody); + } + return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array()); +}; + +// Encode Uint8Array data into string with utf-8. +const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => + collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); + +const buildHttpRpcRequest = async ( + context: __SerdeContext, + headers: __HeaderBag, + path: string, + resolvedHostname: string | undefined, + body: any +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const contents: any = { + protocol, + hostname, + port, + method: "POST", + path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path, + headers, + }; + if (resolvedHostname !== undefined) { + contents.hostname = resolvedHostname; + } + if (body !== undefined) { + contents.body = body; + } + return new __HttpRequest(contents); +}; + +const parseBody = (streamBody: any, context: __SerdeContext): any => + collectBodyString(streamBody, context).then((encoded) => { + if (encoded.length) { + return JSON.parse(encoded); + } + return {}; + }); + +/** + * Load an error code for the aws.rest-json-1.1 protocol. + */ +const loadRestJsonErrorCode = (output: __HttpResponse, data: any): string => { + const findKey = (object: any, key: string) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()); + + const sanitizeErrorCode = (rawValue: string): string => { + let cleanValue = rawValue; + if (cleanValue.indexOf(":") >= 0) { + cleanValue = cleanValue.split(":")[0]; + } + if (cleanValue.indexOf("#") >= 0) { + cleanValue = cleanValue.split("#")[1]; + } + return cleanValue; + }; + + const headerKey = findKey(output.headers, "x-amzn-errortype"); + if (headerKey !== undefined) { + return sanitizeErrorCode(output.headers[headerKey]); + } + + if (data.code !== undefined) { + return sanitizeErrorCode(data.code); + } + + if (data["__type"] !== undefined) { + return sanitizeErrorCode(data["__type"]); + } + + return ""; +}; diff --git a/clients/client-voice-id/src/runtimeConfig.browser.ts b/clients/client-voice-id/src/runtimeConfig.browser.ts new file mode 100644 index 0000000000000..1a98fb415402b --- /dev/null +++ b/clients/client-voice-id/src/runtimeConfig.browser.ts @@ -0,0 +1,41 @@ +import { Sha256 } from "@aws-crypto/sha256-browser"; +import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; +import { invalidProvider } from "@aws-sdk/invalid-dependency"; +import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; +import { fromBase64, toBase64 } from "@aws-sdk/util-base64-browser"; +import { calculateBodyLength } from "@aws-sdk/util-body-length-browser"; +import { defaultUserAgent } from "@aws-sdk/util-user-agent-browser"; +import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-browser"; + +// @ts-ignore: package.json will be imported from dist folders +import packageInfo from "../package.json"; +import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared"; +import { VoiceIDClientConfig } from "./VoiceIDClient"; + +/** + * @internal + */ +export const getRuntimeConfig = (config: VoiceIDClientConfig) => { + const clientSharedValues = getSharedRuntimeConfig(config); + return { + ...clientSharedValues, + ...config, + runtime: "browser", + base64Decoder: config?.base64Decoder ?? fromBase64, + base64Encoder: config?.base64Encoder ?? toBase64, + bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength, + credentialDefaultProvider: + config?.credentialDefaultProvider ?? ((_: unknown) => () => Promise.reject(new Error("Credential is missing"))), + defaultUserAgentProvider: + config?.defaultUserAgentProvider ?? + defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), + maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, + region: config?.region ?? invalidProvider("Region is missing"), + requestHandler: config?.requestHandler ?? new FetchHttpHandler(), + retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), + sha256: config?.sha256 ?? Sha256, + streamCollector: config?.streamCollector ?? streamCollector, + utf8Decoder: config?.utf8Decoder ?? fromUtf8, + utf8Encoder: config?.utf8Encoder ?? toUtf8, + }; +}; diff --git a/clients/client-voice-id/src/runtimeConfig.native.ts b/clients/client-voice-id/src/runtimeConfig.native.ts new file mode 100644 index 0000000000000..8444b87084b5b --- /dev/null +++ b/clients/client-voice-id/src/runtimeConfig.native.ts @@ -0,0 +1,17 @@ +import { Sha256 } from "@aws-crypto/sha256-js"; + +import { getRuntimeConfig as getBrowserRuntimeConfig } from "./runtimeConfig.browser"; +import { VoiceIDClientConfig } from "./VoiceIDClient"; + +/** + * @internal + */ +export const getRuntimeConfig = (config: VoiceIDClientConfig) => { + const browserDefaults = getBrowserRuntimeConfig(config); + return { + ...browserDefaults, + ...config, + runtime: "react-native", + sha256: config?.sha256 ?? Sha256, + }; +}; diff --git a/clients/client-voice-id/src/runtimeConfig.shared.ts b/clients/client-voice-id/src/runtimeConfig.shared.ts new file mode 100644 index 0000000000000..12b3dc7750c5d --- /dev/null +++ b/clients/client-voice-id/src/runtimeConfig.shared.ts @@ -0,0 +1,17 @@ +import { Logger as __Logger } from "@aws-sdk/types"; +import { parseUrl } from "@aws-sdk/url-parser"; + +import { defaultRegionInfoProvider } from "./endpoints"; +import { VoiceIDClientConfig } from "./VoiceIDClient"; + +/** + * @internal + */ +export const getRuntimeConfig = (config: VoiceIDClientConfig) => ({ + apiVersion: "2021-09-27", + disableHostPrefix: config?.disableHostPrefix ?? false, + logger: config?.logger ?? ({} as __Logger), + regionInfoProvider: config?.regionInfoProvider ?? defaultRegionInfoProvider, + serviceId: config?.serviceId ?? "Voice ID", + urlParser: config?.urlParser ?? parseUrl, +}); diff --git a/clients/client-voice-id/src/runtimeConfig.ts b/clients/client-voice-id/src/runtimeConfig.ts new file mode 100644 index 0000000000000..9900c0d6e5b89 --- /dev/null +++ b/clients/client-voice-id/src/runtimeConfig.ts @@ -0,0 +1,46 @@ +import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; +import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; +import { Hash } from "@aws-sdk/hash-node"; +import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; +import { loadConfig as loadNodeConfig } from "@aws-sdk/node-config-provider"; +import { NodeHttpHandler, streamCollector } from "@aws-sdk/node-http-handler"; +import { emitWarningIfUnsupportedVersion } from "@aws-sdk/smithy-client"; +import { fromBase64, toBase64 } from "@aws-sdk/util-base64-node"; +import { calculateBodyLength } from "@aws-sdk/util-body-length-node"; +import { defaultUserAgent } from "@aws-sdk/util-user-agent-node"; +import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-node"; + +// @ts-ignore: package.json will be imported from dist folders +import packageInfo from "../package.json"; +import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared"; +import { VoiceIDClientConfig } from "./VoiceIDClient"; + +/** + * @internal + */ +export const getRuntimeConfig = (config: VoiceIDClientConfig) => { + emitWarningIfUnsupportedVersion(process.version); + const clientSharedValues = getSharedRuntimeConfig(config); + return { + ...clientSharedValues, + ...config, + runtime: "node", + base64Decoder: config?.base64Decoder ?? fromBase64, + base64Encoder: config?.base64Encoder ?? toBase64, + bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength, + credentialDefaultProvider: + config?.credentialDefaultProvider ?? decorateDefaultCredentialProvider(credentialDefaultProvider), + defaultUserAgentProvider: + config?.defaultUserAgentProvider ?? + defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), + maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), + region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), + requestHandler: config?.requestHandler ?? new NodeHttpHandler(), + retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), + sha256: config?.sha256 ?? Hash.bind(null, "sha256"), + streamCollector: config?.streamCollector ?? streamCollector, + utf8Decoder: config?.utf8Decoder ?? fromUtf8, + utf8Encoder: config?.utf8Encoder ?? toUtf8, + }; +}; diff --git a/clients/client-voice-id/tsconfig.es.json b/clients/client-voice-id/tsconfig.es.json new file mode 100644 index 0000000000000..4c72364cd1a07 --- /dev/null +++ b/clients/client-voice-id/tsconfig.es.json @@ -0,0 +1,10 @@ +{ + "extends": "./tsconfig", + "compilerOptions": { + "target": "es5", + "module": "esnext", + "moduleResolution": "node", + "lib": ["dom", "es5", "es2015.promise", "es2015.collection", "es2015.iterable", "es2015.symbol.wellknown"], + "outDir": "dist-es" + } +} diff --git a/clients/client-voice-id/tsconfig.json b/clients/client-voice-id/tsconfig.json new file mode 100644 index 0000000000000..3d15a85b2981b --- /dev/null +++ b/clients/client-voice-id/tsconfig.json @@ -0,0 +1,33 @@ +{ + "compilerOptions": { + "rootDir": "./src", + "alwaysStrict": true, + "target": "ES2018", + "module": "commonjs", + "strict": true, + "sourceMap": true, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "incremental": true, + "resolveJsonModule": true, + "esModuleInterop": true, + "outDir": "dist-cjs", + "removeComments": true + }, + "typedocOptions": { + "exclude": ["**/node_modules/**", "**/*.spec.ts", "**/protocols/*.ts", "**/e2e/*.ts", "**/endpoints.ts"], + "excludeNotExported": true, + "excludePrivate": true, + "hideGenerator": true, + "ignoreCompilerErrors": true, + "includeDeclarations": true, + "stripInternal": true, + "readme": "README.md", + "mode": "file", + "out": "docs", + "theme": "minimal", + "plugin": ["@aws-sdk/client-documentation-generator"] + }, + "exclude": ["test/**/*"] +} diff --git a/clients/client-voice-id/tsconfig.types.json b/clients/client-voice-id/tsconfig.types.json new file mode 100644 index 0000000000000..b7018298d8ae6 --- /dev/null +++ b/clients/client-voice-id/tsconfig.types.json @@ -0,0 +1,9 @@ +{ + "extends": "./tsconfig", + "compilerOptions": { + "removeComments": false, + "declaration": true, + "declarationDir": "dist-types" + }, + "exclude": ["test/**/*", "dist-types/**/*"] +} diff --git a/clients/client-wisdom/.gitignore b/clients/client-wisdom/.gitignore new file mode 100644 index 0000000000000..54f14c9aef253 --- /dev/null +++ b/clients/client-wisdom/.gitignore @@ -0,0 +1,9 @@ +/node_modules/ +/build/ +/coverage/ +/docs/ +/dist-* +*.tsbuildinfo +*.tgz +*.log +package-lock.json diff --git a/clients/client-wisdom/.npmignore b/clients/client-wisdom/.npmignore new file mode 100644 index 0000000000000..b7ff81137c4ad --- /dev/null +++ b/clients/client-wisdom/.npmignore @@ -0,0 +1,4 @@ +/coverage/ +/docs/ +tsconfig.test.json +*.tsbuildinfo diff --git a/clients/client-wisdom/LICENSE b/clients/client-wisdom/LICENSE new file mode 100644 index 0000000000000..f9e0c8672bca6 --- /dev/null +++ b/clients/client-wisdom/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-2021 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-wisdom/README.md b/clients/client-wisdom/README.md new file mode 100644 index 0000000000000..1e9b653e5babf --- /dev/null +++ b/clients/client-wisdom/README.md @@ -0,0 +1,207 @@ +# @aws-sdk/client-wisdom + +[![NPM version](https://img.shields.io/npm/v/@aws-sdk/client-wisdom/latest.svg)](https://www.npmjs.com/package/@aws-sdk/client-wisdom) +[![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/client-wisdom.svg)](https://www.npmjs.com/package/@aws-sdk/client-wisdom) + +## Description + +AWS SDK for JavaScript Wisdom Client for Node.js, Browser and React Native. + +

                  All Amazon Connect Wisdom functionality is accessible using the API. For example, you can create an +assistant and a knowledge base.

                  + +

                  Some more advanced features are only accessible using the Wisdom API. For example, you +can manually manage content by uploading custom files and control their lifecycle.

                  + +## Installing + +To install the this package, simply type add or install @aws-sdk/client-wisdom +using your favorite package manager: + +- `npm install @aws-sdk/client-wisdom` +- `yarn add @aws-sdk/client-wisdom` +- `pnpm add @aws-sdk/client-wisdom` + +## Getting Started + +### Import + +The AWS SDK is modulized by clients and commands. +To send a request, you only need to import the `WisdomClient` and +the commands you need, for example `CreateAssistantCommand`: + +```js +// ES5 example +const { WisdomClient, CreateAssistantCommand } = require("@aws-sdk/client-wisdom"); +``` + +```ts +// ES6+ example +import { WisdomClient, CreateAssistantCommand } from "@aws-sdk/client-wisdom"; +``` + +### 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 WisdomClient({ region: "REGION" }); + +const params = { + /** input parameters */ +}; +const command = new CreateAssistantCommand(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) => { + // proccess 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-wisdom"; +const client = new AWS.Wisdom({ region: "REGION" }); + +// async/await. +try { + const data = await client.createAssistant(params); + // process data. +} catch (error) { + // error handling. +} + +// Promises. +client + .createAssistant(params) + .then((data) => { + // process data. + }) + .catch((error) => { + // error handling. + }); + +// callbacks. +client.createAssistant(params, (err, data) => { + // proccess 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-wisdom` 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. diff --git a/clients/client-wisdom/jest.config.js b/clients/client-wisdom/jest.config.js new file mode 100644 index 0000000000000..02eed352c6a86 --- /dev/null +++ b/clients/client-wisdom/jest.config.js @@ -0,0 +1,4 @@ +module.exports = { + preset: "ts-jest", + testMatch: ["**/*.spec.ts", "!**/*.browser.spec.ts", "!**/*.integ.spec.ts"], +}; diff --git a/clients/client-wisdom/package.json b/clients/client-wisdom/package.json new file mode 100644 index 0000000000000..ef1fcaa349dc0 --- /dev/null +++ b/clients/client-wisdom/package.json @@ -0,0 +1,93 @@ +{ + "name": "@aws-sdk/client-wisdom", + "description": "AWS SDK for JavaScript Wisdom Client for Node.js, Browser and React Native", + "version": "3.0.0", + "scripts": { + "build": "yarn build:cjs && yarn build:es && yarn build:types", + "build:cjs": "tsc -p tsconfig.json", + "build:docs": "yarn clean:docs && typedoc ./", + "build:es": "tsc -p tsconfig.es.json", + "build:types": "tsc -p tsconfig.types.json", + "clean": "yarn clean:dist && yarn clean:docs", + "clean:dist": "rimraf ./dist-*", + "clean:docs": "rimraf ./docs", + "downlevel-dts": "downlevel-dts dist-types dist-types/ts3.4", + "test": "jest --coverage --passWithNoTests" + }, + "main": "./dist-cjs/index.js", + "types": "./dist-types/index.d.ts", + "module": "./dist-es/index.js", + "sideEffects": false, + "dependencies": { + "@aws-crypto/sha256-browser": "^1.1.0", + "@aws-crypto/sha256-js": "^1.1.0", + "@aws-sdk/client-sts": "3.34.0", + "@aws-sdk/config-resolver": "3.34.0", + "@aws-sdk/credential-provider-node": "3.34.0", + "@aws-sdk/fetch-http-handler": "3.34.0", + "@aws-sdk/hash-node": "3.34.0", + "@aws-sdk/invalid-dependency": "3.34.0", + "@aws-sdk/middleware-content-length": "3.34.0", + "@aws-sdk/middleware-host-header": "3.34.0", + "@aws-sdk/middleware-logger": "3.34.0", + "@aws-sdk/middleware-retry": "3.34.0", + "@aws-sdk/middleware-serde": "3.34.0", + "@aws-sdk/middleware-signing": "3.34.0", + "@aws-sdk/middleware-stack": "3.34.0", + "@aws-sdk/middleware-user-agent": "3.34.0", + "@aws-sdk/node-config-provider": "3.34.0", + "@aws-sdk/node-http-handler": "3.34.0", + "@aws-sdk/protocol-http": "3.34.0", + "@aws-sdk/smithy-client": "3.34.0", + "@aws-sdk/types": "3.34.0", + "@aws-sdk/url-parser": "3.34.0", + "@aws-sdk/util-base64-browser": "3.34.0", + "@aws-sdk/util-base64-node": "3.34.0", + "@aws-sdk/util-body-length-browser": "3.34.0", + "@aws-sdk/util-body-length-node": "3.34.0", + "@aws-sdk/util-user-agent-browser": "3.34.0", + "@aws-sdk/util-user-agent-node": "3.34.0", + "@aws-sdk/util-utf8-browser": "3.34.0", + "@aws-sdk/util-utf8-node": "3.34.0", + "tslib": "^2.3.0", + "uuid": "^8.3.2" + }, + "devDependencies": { + "@aws-sdk/client-documentation-generator": "3.34.0", + "@types/node": "^12.7.5", + "@types/uuid": "^8.3.0", + "downlevel-dts": "0.7.0", + "jest": "^26.1.0", + "rimraf": "^3.0.0", + "ts-jest": "^26.4.1", + "typedoc": "^0.19.2", + "typescript": "~4.3.5" + }, + "engines": { + "node": ">=10.0.0" + }, + "typesVersions": { + "<4.0": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + "author": { + "name": "AWS SDK for JavaScript Team", + "url": "https://aws.amazon.com/javascript/" + }, + "license": "Apache-2.0", + "browser": { + "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.browser" + }, + "react-native": { + "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.native" + }, + "homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-wisdom", + "repository": { + "type": "git", + "url": "https://github.com/aws/aws-sdk-js-v3.git", + "directory": "clients/client-wisdom" + } +} diff --git a/clients/client-wisdom/src/Wisdom.ts b/clients/client-wisdom/src/Wisdom.ts new file mode 100644 index 0000000000000..12bef8c3b71ec --- /dev/null +++ b/clients/client-wisdom/src/Wisdom.ts @@ -0,0 +1,1175 @@ +import { HttpHandlerOptions as __HttpHandlerOptions } from "@aws-sdk/types"; + +import { + CreateAssistantAssociationCommand, + CreateAssistantAssociationCommandInput, + CreateAssistantAssociationCommandOutput, +} from "./commands/CreateAssistantAssociationCommand"; +import { + CreateAssistantCommand, + CreateAssistantCommandInput, + CreateAssistantCommandOutput, +} from "./commands/CreateAssistantCommand"; +import { + CreateContentCommand, + CreateContentCommandInput, + CreateContentCommandOutput, +} from "./commands/CreateContentCommand"; +import { + CreateKnowledgeBaseCommand, + CreateKnowledgeBaseCommandInput, + CreateKnowledgeBaseCommandOutput, +} from "./commands/CreateKnowledgeBaseCommand"; +import { + CreateSessionCommand, + CreateSessionCommandInput, + CreateSessionCommandOutput, +} from "./commands/CreateSessionCommand"; +import { + DeleteAssistantAssociationCommand, + DeleteAssistantAssociationCommandInput, + DeleteAssistantAssociationCommandOutput, +} from "./commands/DeleteAssistantAssociationCommand"; +import { + DeleteAssistantCommand, + DeleteAssistantCommandInput, + DeleteAssistantCommandOutput, +} from "./commands/DeleteAssistantCommand"; +import { + DeleteContentCommand, + DeleteContentCommandInput, + DeleteContentCommandOutput, +} from "./commands/DeleteContentCommand"; +import { + DeleteKnowledgeBaseCommand, + DeleteKnowledgeBaseCommandInput, + DeleteKnowledgeBaseCommandOutput, +} from "./commands/DeleteKnowledgeBaseCommand"; +import { + GetAssistantAssociationCommand, + GetAssistantAssociationCommandInput, + GetAssistantAssociationCommandOutput, +} from "./commands/GetAssistantAssociationCommand"; +import { + GetAssistantCommand, + GetAssistantCommandInput, + GetAssistantCommandOutput, +} from "./commands/GetAssistantCommand"; +import { GetContentCommand, GetContentCommandInput, GetContentCommandOutput } from "./commands/GetContentCommand"; +import { + GetContentSummaryCommand, + GetContentSummaryCommandInput, + GetContentSummaryCommandOutput, +} from "./commands/GetContentSummaryCommand"; +import { + GetKnowledgeBaseCommand, + GetKnowledgeBaseCommandInput, + GetKnowledgeBaseCommandOutput, +} from "./commands/GetKnowledgeBaseCommand"; +import { + GetRecommendationsCommand, + GetRecommendationsCommandInput, + GetRecommendationsCommandOutput, +} from "./commands/GetRecommendationsCommand"; +import { GetSessionCommand, GetSessionCommandInput, GetSessionCommandOutput } from "./commands/GetSessionCommand"; +import { + ListAssistantAssociationsCommand, + ListAssistantAssociationsCommandInput, + ListAssistantAssociationsCommandOutput, +} from "./commands/ListAssistantAssociationsCommand"; +import { + ListAssistantsCommand, + ListAssistantsCommandInput, + ListAssistantsCommandOutput, +} from "./commands/ListAssistantsCommand"; +import { + ListContentsCommand, + ListContentsCommandInput, + ListContentsCommandOutput, +} from "./commands/ListContentsCommand"; +import { + ListKnowledgeBasesCommand, + ListKnowledgeBasesCommandInput, + ListKnowledgeBasesCommandOutput, +} from "./commands/ListKnowledgeBasesCommand"; +import { + ListTagsForResourceCommand, + ListTagsForResourceCommandInput, + ListTagsForResourceCommandOutput, +} from "./commands/ListTagsForResourceCommand"; +import { + NotifyRecommendationsReceivedCommand, + NotifyRecommendationsReceivedCommandInput, + NotifyRecommendationsReceivedCommandOutput, +} from "./commands/NotifyRecommendationsReceivedCommand"; +import { + QueryAssistantCommand, + QueryAssistantCommandInput, + QueryAssistantCommandOutput, +} from "./commands/QueryAssistantCommand"; +import { + RemoveKnowledgeBaseTemplateUriCommand, + RemoveKnowledgeBaseTemplateUriCommandInput, + RemoveKnowledgeBaseTemplateUriCommandOutput, +} from "./commands/RemoveKnowledgeBaseTemplateUriCommand"; +import { + SearchContentCommand, + SearchContentCommandInput, + SearchContentCommandOutput, +} from "./commands/SearchContentCommand"; +import { + SearchSessionsCommand, + SearchSessionsCommandInput, + SearchSessionsCommandOutput, +} from "./commands/SearchSessionsCommand"; +import { + StartContentUploadCommand, + StartContentUploadCommandInput, + StartContentUploadCommandOutput, +} from "./commands/StartContentUploadCommand"; +import { TagResourceCommand, TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand"; +import { + UntagResourceCommand, + UntagResourceCommandInput, + UntagResourceCommandOutput, +} from "./commands/UntagResourceCommand"; +import { + UpdateContentCommand, + UpdateContentCommandInput, + UpdateContentCommandOutput, +} from "./commands/UpdateContentCommand"; +import { + UpdateKnowledgeBaseTemplateUriCommand, + UpdateKnowledgeBaseTemplateUriCommandInput, + UpdateKnowledgeBaseTemplateUriCommandOutput, +} from "./commands/UpdateKnowledgeBaseTemplateUriCommand"; +import { WisdomClient } from "./WisdomClient"; + +/** + *

                  All Amazon Connect Wisdom functionality is accessible using the API. For example, you can create an + * assistant and a knowledge base.

                  + * + *

                  Some more advanced features are only accessible using the Wisdom API. For example, you + * can manually manage content by uploading custom files and control their lifecycle.

                  + */ +export class Wisdom extends WisdomClient { + /** + *

                  Creates an Amazon Connect Wisdom assistant.

                  + */ + public createAssistant( + args: CreateAssistantCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public createAssistant( + args: CreateAssistantCommandInput, + cb: (err: any, data?: CreateAssistantCommandOutput) => void + ): void; + public createAssistant( + args: CreateAssistantCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateAssistantCommandOutput) => void + ): void; + public createAssistant( + args: CreateAssistantCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: CreateAssistantCommandOutput) => void), + cb?: (err: any, data?: CreateAssistantCommandOutput) => void + ): Promise | void { + const command = new CreateAssistantCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

                  Creates an association between an Amazon Connect Wisdom assistant and another resource. Currently, the + * only supported association is with a knowledge base. An assistant can have only a single + * association.

                  + */ + public createAssistantAssociation( + args: CreateAssistantAssociationCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public createAssistantAssociation( + args: CreateAssistantAssociationCommandInput, + cb: (err: any, data?: CreateAssistantAssociationCommandOutput) => void + ): void; + public createAssistantAssociation( + args: CreateAssistantAssociationCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateAssistantAssociationCommandOutput) => void + ): void; + public createAssistantAssociation( + args: CreateAssistantAssociationCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: CreateAssistantAssociationCommandOutput) => void), + cb?: (err: any, data?: CreateAssistantAssociationCommandOutput) => void + ): Promise | void { + const command = new CreateAssistantAssociationCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

                  Creates Wisdom content. Before to calling this API, use StartContentUpload to + * upload an asset.

                  + */ + public createContent( + args: CreateContentCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public createContent( + args: CreateContentCommandInput, + cb: (err: any, data?: CreateContentCommandOutput) => void + ): void; + public createContent( + args: CreateContentCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateContentCommandOutput) => void + ): void; + public createContent( + args: CreateContentCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: CreateContentCommandOutput) => void), + cb?: (err: any, data?: CreateContentCommandOutput) => void + ): Promise | void { + const command = new CreateContentCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

                  Creates a knowledge base.

                  + * + *

                  When using this API, you cannot reuse Amazon AppIntegrations + * DataIntegrations with external knowledge bases such as Salesforce and ServiceNow. If you do, + * you'll get an InvalidRequestException error.

                  + * + *

                  For example, you're programmatically managing your external knowledge base, and you want + * to add or remove one of the fields that is being ingested from Salesforce. Do the + * following:

                  + *
                    + *
                  1. + *

                    Call DeleteKnowledgeBase.

                    + *
                  2. + *
                  3. + *

                    Call DeleteDataIntegration.

                    + *
                  4. + *
                  5. + *

                    Call CreateDataIntegration to recreate the DataIntegration or a create different + * one.

                    + *
                  6. + *
                  7. + *

                    Call CreateKnowledgeBase.

                    + *
                  8. + *
                  + *
                  + */ + public createKnowledgeBase( + args: CreateKnowledgeBaseCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public createKnowledgeBase( + args: CreateKnowledgeBaseCommandInput, + cb: (err: any, data?: CreateKnowledgeBaseCommandOutput) => void + ): void; + public createKnowledgeBase( + args: CreateKnowledgeBaseCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateKnowledgeBaseCommandOutput) => void + ): void; + public createKnowledgeBase( + args: CreateKnowledgeBaseCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: CreateKnowledgeBaseCommandOutput) => void), + cb?: (err: any, data?: CreateKnowledgeBaseCommandOutput) => void + ): Promise | void { + const command = new CreateKnowledgeBaseCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

                  Creates a session. A session is a contextual container used for generating + * recommendations. Amazon Connect creates a new Wisdom session for each contact on which Wisdom is + * enabled.

                  + */ + public createSession( + args: CreateSessionCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public createSession( + args: CreateSessionCommandInput, + cb: (err: any, data?: CreateSessionCommandOutput) => void + ): void; + public createSession( + args: CreateSessionCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateSessionCommandOutput) => void + ): void; + public createSession( + args: CreateSessionCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: CreateSessionCommandOutput) => void), + cb?: (err: any, data?: CreateSessionCommandOutput) => void + ): Promise | void { + const command = new CreateSessionCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

                  Deletes an assistant.

                  + */ + public deleteAssistant( + args: DeleteAssistantCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public deleteAssistant( + args: DeleteAssistantCommandInput, + cb: (err: any, data?: DeleteAssistantCommandOutput) => void + ): void; + public deleteAssistant( + args: DeleteAssistantCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteAssistantCommandOutput) => void + ): void; + public deleteAssistant( + args: DeleteAssistantCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DeleteAssistantCommandOutput) => void), + cb?: (err: any, data?: DeleteAssistantCommandOutput) => void + ): Promise | void { + const command = new DeleteAssistantCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

                  Deletes an assistant association.

                  + */ + public deleteAssistantAssociation( + args: DeleteAssistantAssociationCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public deleteAssistantAssociation( + args: DeleteAssistantAssociationCommandInput, + cb: (err: any, data?: DeleteAssistantAssociationCommandOutput) => void + ): void; + public deleteAssistantAssociation( + args: DeleteAssistantAssociationCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteAssistantAssociationCommandOutput) => void + ): void; + public deleteAssistantAssociation( + args: DeleteAssistantAssociationCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DeleteAssistantAssociationCommandOutput) => void), + cb?: (err: any, data?: DeleteAssistantAssociationCommandOutput) => void + ): Promise | void { + const command = new DeleteAssistantAssociationCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

                  Deletes the content.

                  + */ + public deleteContent( + args: DeleteContentCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public deleteContent( + args: DeleteContentCommandInput, + cb: (err: any, data?: DeleteContentCommandOutput) => void + ): void; + public deleteContent( + args: DeleteContentCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteContentCommandOutput) => void + ): void; + public deleteContent( + args: DeleteContentCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DeleteContentCommandOutput) => void), + cb?: (err: any, data?: DeleteContentCommandOutput) => void + ): Promise | void { + const command = new DeleteContentCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

                  Deletes the knowledge base.

                  + * + *

                  When you use this API to delete an external knowledge base such as Salesforce or + * ServiceNow, you must also delete the Amazon AppIntegrations DataIntegration. + * This is because you can't reuse the DataIntegration after it's been associated with an + * external knowledge base. However, you can delete and recreate it. See DeleteDataIntegration and CreateDataIntegration in the Amazon AppIntegrations API + * Reference.

                  + *
                  + */ + public deleteKnowledgeBase( + args: DeleteKnowledgeBaseCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public deleteKnowledgeBase( + args: DeleteKnowledgeBaseCommandInput, + cb: (err: any, data?: DeleteKnowledgeBaseCommandOutput) => void + ): void; + public deleteKnowledgeBase( + args: DeleteKnowledgeBaseCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteKnowledgeBaseCommandOutput) => void + ): void; + public deleteKnowledgeBase( + args: DeleteKnowledgeBaseCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DeleteKnowledgeBaseCommandOutput) => void), + cb?: (err: any, data?: DeleteKnowledgeBaseCommandOutput) => void + ): Promise | void { + const command = new DeleteKnowledgeBaseCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

                  Retrieves information about an assistant.

                  + */ + public getAssistant( + args: GetAssistantCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public getAssistant(args: GetAssistantCommandInput, cb: (err: any, data?: GetAssistantCommandOutput) => void): void; + public getAssistant( + args: GetAssistantCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetAssistantCommandOutput) => void + ): void; + public getAssistant( + args: GetAssistantCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetAssistantCommandOutput) => void), + cb?: (err: any, data?: GetAssistantCommandOutput) => void + ): Promise | void { + const command = new GetAssistantCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

                  Retrieves information about an assistant association.

                  + */ + public getAssistantAssociation( + args: GetAssistantAssociationCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public getAssistantAssociation( + args: GetAssistantAssociationCommandInput, + cb: (err: any, data?: GetAssistantAssociationCommandOutput) => void + ): void; + public getAssistantAssociation( + args: GetAssistantAssociationCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetAssistantAssociationCommandOutput) => void + ): void; + public getAssistantAssociation( + args: GetAssistantAssociationCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetAssistantAssociationCommandOutput) => void), + cb?: (err: any, data?: GetAssistantAssociationCommandOutput) => void + ): Promise | void { + const command = new GetAssistantAssociationCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

                  Retrieves content, including a pre-signed URL to download the content.

                  + */ + public getContent(args: GetContentCommandInput, options?: __HttpHandlerOptions): Promise; + public getContent(args: GetContentCommandInput, cb: (err: any, data?: GetContentCommandOutput) => void): void; + public getContent( + args: GetContentCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetContentCommandOutput) => void + ): void; + public getContent( + args: GetContentCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetContentCommandOutput) => void), + cb?: (err: any, data?: GetContentCommandOutput) => void + ): Promise | void { + const command = new GetContentCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

                  Retrieves summary information about the content.

                  + */ + public getContentSummary( + args: GetContentSummaryCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public getContentSummary( + args: GetContentSummaryCommandInput, + cb: (err: any, data?: GetContentSummaryCommandOutput) => void + ): void; + public getContentSummary( + args: GetContentSummaryCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetContentSummaryCommandOutput) => void + ): void; + public getContentSummary( + args: GetContentSummaryCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetContentSummaryCommandOutput) => void), + cb?: (err: any, data?: GetContentSummaryCommandOutput) => void + ): Promise | void { + const command = new GetContentSummaryCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

                  Retrieves information about the knowledge base.

                  + */ + public getKnowledgeBase( + args: GetKnowledgeBaseCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public getKnowledgeBase( + args: GetKnowledgeBaseCommandInput, + cb: (err: any, data?: GetKnowledgeBaseCommandOutput) => void + ): void; + public getKnowledgeBase( + args: GetKnowledgeBaseCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetKnowledgeBaseCommandOutput) => void + ): void; + public getKnowledgeBase( + args: GetKnowledgeBaseCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetKnowledgeBaseCommandOutput) => void), + cb?: (err: any, data?: GetKnowledgeBaseCommandOutput) => void + ): Promise | void { + const command = new GetKnowledgeBaseCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

                  Retrieves recommendations for the specified session. To avoid retrieving the same + * recommendations in subsequent calls, use NotifyRecommendationsReceived. This API supports long-polling behavior with the + * waitTimeSeconds parameter. Short poll is the default behavior and only returns + * recommendations already available. To perform a manual query against an assistant, use QueryAssistant.

                  + */ + public getRecommendations( + args: GetRecommendationsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public getRecommendations( + args: GetRecommendationsCommandInput, + cb: (err: any, data?: GetRecommendationsCommandOutput) => void + ): void; + public getRecommendations( + args: GetRecommendationsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetRecommendationsCommandOutput) => void + ): void; + public getRecommendations( + args: GetRecommendationsCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetRecommendationsCommandOutput) => void), + cb?: (err: any, data?: GetRecommendationsCommandOutput) => void + ): Promise | void { + const command = new GetRecommendationsCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

                  Retrieves information for a specified session.

                  + */ + public getSession(args: GetSessionCommandInput, options?: __HttpHandlerOptions): Promise; + public getSession(args: GetSessionCommandInput, cb: (err: any, data?: GetSessionCommandOutput) => void): void; + public getSession( + args: GetSessionCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetSessionCommandOutput) => void + ): void; + public getSession( + args: GetSessionCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetSessionCommandOutput) => void), + cb?: (err: any, data?: GetSessionCommandOutput) => void + ): Promise | void { + const command = new GetSessionCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

                  Lists information about assistant associations.

                  + */ + public listAssistantAssociations( + args: ListAssistantAssociationsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public listAssistantAssociations( + args: ListAssistantAssociationsCommandInput, + cb: (err: any, data?: ListAssistantAssociationsCommandOutput) => void + ): void; + public listAssistantAssociations( + args: ListAssistantAssociationsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListAssistantAssociationsCommandOutput) => void + ): void; + public listAssistantAssociations( + args: ListAssistantAssociationsCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ListAssistantAssociationsCommandOutput) => void), + cb?: (err: any, data?: ListAssistantAssociationsCommandOutput) => void + ): Promise | void { + const command = new ListAssistantAssociationsCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

                  Lists information about assistants.

                  + */ + public listAssistants( + args: ListAssistantsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public listAssistants( + args: ListAssistantsCommandInput, + cb: (err: any, data?: ListAssistantsCommandOutput) => void + ): void; + public listAssistants( + args: ListAssistantsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListAssistantsCommandOutput) => void + ): void; + public listAssistants( + args: ListAssistantsCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ListAssistantsCommandOutput) => void), + cb?: (err: any, data?: ListAssistantsCommandOutput) => void + ): Promise | void { + const command = new ListAssistantsCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

                  Lists the content.

                  + */ + public listContents( + args: ListContentsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public listContents(args: ListContentsCommandInput, cb: (err: any, data?: ListContentsCommandOutput) => void): void; + public listContents( + args: ListContentsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListContentsCommandOutput) => void + ): void; + public listContents( + args: ListContentsCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ListContentsCommandOutput) => void), + cb?: (err: any, data?: ListContentsCommandOutput) => void + ): Promise | void { + const command = new ListContentsCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

                  Lists the knowledge bases.

                  + */ + public listKnowledgeBases( + args: ListKnowledgeBasesCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public listKnowledgeBases( + args: ListKnowledgeBasesCommandInput, + cb: (err: any, data?: ListKnowledgeBasesCommandOutput) => void + ): void; + public listKnowledgeBases( + args: ListKnowledgeBasesCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListKnowledgeBasesCommandOutput) => void + ): void; + public listKnowledgeBases( + args: ListKnowledgeBasesCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ListKnowledgeBasesCommandOutput) => void), + cb?: (err: any, data?: ListKnowledgeBasesCommandOutput) => void + ): Promise | void { + const command = new ListKnowledgeBasesCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

                  Lists the tags for the specified resource.

                  + */ + public listTagsForResource( + args: ListTagsForResourceCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public listTagsForResource( + args: ListTagsForResourceCommandInput, + cb: (err: any, data?: ListTagsForResourceCommandOutput) => void + ): void; + public listTagsForResource( + args: ListTagsForResourceCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListTagsForResourceCommandOutput) => void + ): void; + public listTagsForResource( + args: ListTagsForResourceCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ListTagsForResourceCommandOutput) => void), + cb?: (err: any, data?: ListTagsForResourceCommandOutput) => void + ): Promise | void { + const command = new ListTagsForResourceCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

                  Removes the specified recommendations from the specified assistant's queue of newly + * available recommendations. You can use this API in conjunction with GetRecommendations and a waitTimeSeconds input for long-polling + * behavior and avoiding duplicate recommendations.

                  + */ + public notifyRecommendationsReceived( + args: NotifyRecommendationsReceivedCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public notifyRecommendationsReceived( + args: NotifyRecommendationsReceivedCommandInput, + cb: (err: any, data?: NotifyRecommendationsReceivedCommandOutput) => void + ): void; + public notifyRecommendationsReceived( + args: NotifyRecommendationsReceivedCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: NotifyRecommendationsReceivedCommandOutput) => void + ): void; + public notifyRecommendationsReceived( + args: NotifyRecommendationsReceivedCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: NotifyRecommendationsReceivedCommandOutput) => void), + cb?: (err: any, data?: NotifyRecommendationsReceivedCommandOutput) => void + ): Promise | void { + const command = new NotifyRecommendationsReceivedCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

                  Performs a manual search against the specified assistant. To retrieve recommendations for + * an assistant, use GetRecommendations. + *

                  + */ + public queryAssistant( + args: QueryAssistantCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public queryAssistant( + args: QueryAssistantCommandInput, + cb: (err: any, data?: QueryAssistantCommandOutput) => void + ): void; + public queryAssistant( + args: QueryAssistantCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: QueryAssistantCommandOutput) => void + ): void; + public queryAssistant( + args: QueryAssistantCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: QueryAssistantCommandOutput) => void), + cb?: (err: any, data?: QueryAssistantCommandOutput) => void + ): Promise | void { + const command = new QueryAssistantCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

                  Removes a URI template from a knowledge base.

                  + */ + public removeKnowledgeBaseTemplateUri( + args: RemoveKnowledgeBaseTemplateUriCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public removeKnowledgeBaseTemplateUri( + args: RemoveKnowledgeBaseTemplateUriCommandInput, + cb: (err: any, data?: RemoveKnowledgeBaseTemplateUriCommandOutput) => void + ): void; + public removeKnowledgeBaseTemplateUri( + args: RemoveKnowledgeBaseTemplateUriCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: RemoveKnowledgeBaseTemplateUriCommandOutput) => void + ): void; + public removeKnowledgeBaseTemplateUri( + args: RemoveKnowledgeBaseTemplateUriCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: RemoveKnowledgeBaseTemplateUriCommandOutput) => void), + cb?: (err: any, data?: RemoveKnowledgeBaseTemplateUriCommandOutput) => void + ): Promise | void { + const command = new RemoveKnowledgeBaseTemplateUriCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

                  Searches for content in a specified knowledge base. Can be used to get a specific content + * resource by its name.

                  + */ + public searchContent( + args: SearchContentCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public searchContent( + args: SearchContentCommandInput, + cb: (err: any, data?: SearchContentCommandOutput) => void + ): void; + public searchContent( + args: SearchContentCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: SearchContentCommandOutput) => void + ): void; + public searchContent( + args: SearchContentCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: SearchContentCommandOutput) => void), + cb?: (err: any, data?: SearchContentCommandOutput) => void + ): Promise | void { + const command = new SearchContentCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

                  Searches for sessions.

                  + */ + public searchSessions( + args: SearchSessionsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public searchSessions( + args: SearchSessionsCommandInput, + cb: (err: any, data?: SearchSessionsCommandOutput) => void + ): void; + public searchSessions( + args: SearchSessionsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: SearchSessionsCommandOutput) => void + ): void; + public searchSessions( + args: SearchSessionsCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: SearchSessionsCommandOutput) => void), + cb?: (err: any, data?: SearchSessionsCommandOutput) => void + ): Promise | void { + const command = new SearchSessionsCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

                  Get a URL to upload content to a knowledge base. To upload content, first make a PUT + * request to the returned URL with your file, making sure to include the required headers. Then + * use CreateContent to finalize the content creation process or UpdateContent to modify an existing resource. You can only upload content to a + * knowledge base of type CUSTOM.

                  + */ + public startContentUpload( + args: StartContentUploadCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public startContentUpload( + args: StartContentUploadCommandInput, + cb: (err: any, data?: StartContentUploadCommandOutput) => void + ): void; + public startContentUpload( + args: StartContentUploadCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: StartContentUploadCommandOutput) => void + ): void; + public startContentUpload( + args: StartContentUploadCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: StartContentUploadCommandOutput) => void), + cb?: (err: any, data?: StartContentUploadCommandOutput) => void + ): Promise | void { + const command = new StartContentUploadCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

                  Adds the specified tags to the specified resource.

                  + */ + public tagResource(args: TagResourceCommandInput, options?: __HttpHandlerOptions): Promise; + public tagResource(args: TagResourceCommandInput, cb: (err: any, data?: TagResourceCommandOutput) => void): void; + public tagResource( + args: TagResourceCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: TagResourceCommandOutput) => void + ): void; + public tagResource( + args: TagResourceCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: TagResourceCommandOutput) => void), + cb?: (err: any, data?: TagResourceCommandOutput) => void + ): Promise | void { + const command = new TagResourceCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

                  Removes the specified tags from the specified resource.

                  + */ + public untagResource( + args: UntagResourceCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public untagResource( + args: UntagResourceCommandInput, + cb: (err: any, data?: UntagResourceCommandOutput) => void + ): void; + public untagResource( + args: UntagResourceCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UntagResourceCommandOutput) => void + ): void; + public untagResource( + args: UntagResourceCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: UntagResourceCommandOutput) => void), + cb?: (err: any, data?: UntagResourceCommandOutput) => void + ): Promise | void { + const command = new UntagResourceCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

                  Updates information about the content.

                  + */ + public updateContent( + args: UpdateContentCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public updateContent( + args: UpdateContentCommandInput, + cb: (err: any, data?: UpdateContentCommandOutput) => void + ): void; + public updateContent( + args: UpdateContentCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateContentCommandOutput) => void + ): void; + public updateContent( + args: UpdateContentCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: UpdateContentCommandOutput) => void), + cb?: (err: any, data?: UpdateContentCommandOutput) => void + ): Promise | void { + const command = new UpdateContentCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

                  Updates the template URI of a knowledge base. This is only supported for knowledge bases + * of type EXTERNAL. Include a single variable in ${variable} format; this + * interpolated by Wisdom using ingested content. For example, if you ingest a Salesforce + * article, it has an Id value, and you can set the template URI to + * https://myInstanceName.lightning.force.com/lightning/r/Knowledge__kav/*${Id}*\/view. + *

                  + */ + public updateKnowledgeBaseTemplateUri( + args: UpdateKnowledgeBaseTemplateUriCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public updateKnowledgeBaseTemplateUri( + args: UpdateKnowledgeBaseTemplateUriCommandInput, + cb: (err: any, data?: UpdateKnowledgeBaseTemplateUriCommandOutput) => void + ): void; + public updateKnowledgeBaseTemplateUri( + args: UpdateKnowledgeBaseTemplateUriCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateKnowledgeBaseTemplateUriCommandOutput) => void + ): void; + public updateKnowledgeBaseTemplateUri( + args: UpdateKnowledgeBaseTemplateUriCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: UpdateKnowledgeBaseTemplateUriCommandOutput) => void), + cb?: (err: any, data?: UpdateKnowledgeBaseTemplateUriCommandOutput) => void + ): Promise | void { + const command = new UpdateKnowledgeBaseTemplateUriCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } +} diff --git a/clients/client-wisdom/src/WisdomClient.ts b/clients/client-wisdom/src/WisdomClient.ts new file mode 100644 index 0000000000000..c1afc63ab35e9 --- /dev/null +++ b/clients/client-wisdom/src/WisdomClient.ts @@ -0,0 +1,363 @@ +import { + EndpointsInputConfig, + EndpointsResolvedConfig, + RegionInputConfig, + RegionResolvedConfig, + resolveEndpointsConfig, + resolveRegionConfig, +} from "@aws-sdk/config-resolver"; +import { getContentLengthPlugin } from "@aws-sdk/middleware-content-length"; +import { + getHostHeaderPlugin, + HostHeaderInputConfig, + HostHeaderResolvedConfig, + resolveHostHeaderConfig, +} from "@aws-sdk/middleware-host-header"; +import { getLoggerPlugin } from "@aws-sdk/middleware-logger"; +import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@aws-sdk/middleware-retry"; +import { + AwsAuthInputConfig, + AwsAuthResolvedConfig, + getAwsAuthPlugin, + resolveAwsAuthConfig, +} from "@aws-sdk/middleware-signing"; +import { + getUserAgentPlugin, + resolveUserAgentConfig, + UserAgentInputConfig, + UserAgentResolvedConfig, +} from "@aws-sdk/middleware-user-agent"; +import { HttpHandler as __HttpHandler } from "@aws-sdk/protocol-http"; +import { + Client as __Client, + SmithyConfiguration as __SmithyConfiguration, + SmithyResolvedConfiguration as __SmithyResolvedConfiguration, +} from "@aws-sdk/smithy-client"; +import { + Credentials as __Credentials, + Decoder as __Decoder, + Encoder as __Encoder, + Hash as __Hash, + HashConstructor as __HashConstructor, + HttpHandlerOptions as __HttpHandlerOptions, + Logger as __Logger, + Provider as __Provider, + Provider, + RegionInfoProvider, + StreamCollector as __StreamCollector, + UrlParser as __UrlParser, + UserAgent as __UserAgent, +} from "@aws-sdk/types"; + +import { + CreateAssistantAssociationCommandInput, + CreateAssistantAssociationCommandOutput, +} from "./commands/CreateAssistantAssociationCommand"; +import { CreateAssistantCommandInput, CreateAssistantCommandOutput } from "./commands/CreateAssistantCommand"; +import { CreateContentCommandInput, CreateContentCommandOutput } from "./commands/CreateContentCommand"; +import { + CreateKnowledgeBaseCommandInput, + CreateKnowledgeBaseCommandOutput, +} from "./commands/CreateKnowledgeBaseCommand"; +import { CreateSessionCommandInput, CreateSessionCommandOutput } from "./commands/CreateSessionCommand"; +import { + DeleteAssistantAssociationCommandInput, + DeleteAssistantAssociationCommandOutput, +} from "./commands/DeleteAssistantAssociationCommand"; +import { DeleteAssistantCommandInput, DeleteAssistantCommandOutput } from "./commands/DeleteAssistantCommand"; +import { DeleteContentCommandInput, DeleteContentCommandOutput } from "./commands/DeleteContentCommand"; +import { + DeleteKnowledgeBaseCommandInput, + DeleteKnowledgeBaseCommandOutput, +} from "./commands/DeleteKnowledgeBaseCommand"; +import { + GetAssistantAssociationCommandInput, + GetAssistantAssociationCommandOutput, +} from "./commands/GetAssistantAssociationCommand"; +import { GetAssistantCommandInput, GetAssistantCommandOutput } from "./commands/GetAssistantCommand"; +import { GetContentCommandInput, GetContentCommandOutput } from "./commands/GetContentCommand"; +import { GetContentSummaryCommandInput, GetContentSummaryCommandOutput } from "./commands/GetContentSummaryCommand"; +import { GetKnowledgeBaseCommandInput, GetKnowledgeBaseCommandOutput } from "./commands/GetKnowledgeBaseCommand"; +import { GetRecommendationsCommandInput, GetRecommendationsCommandOutput } from "./commands/GetRecommendationsCommand"; +import { GetSessionCommandInput, GetSessionCommandOutput } from "./commands/GetSessionCommand"; +import { + ListAssistantAssociationsCommandInput, + ListAssistantAssociationsCommandOutput, +} from "./commands/ListAssistantAssociationsCommand"; +import { ListAssistantsCommandInput, ListAssistantsCommandOutput } from "./commands/ListAssistantsCommand"; +import { ListContentsCommandInput, ListContentsCommandOutput } from "./commands/ListContentsCommand"; +import { ListKnowledgeBasesCommandInput, ListKnowledgeBasesCommandOutput } from "./commands/ListKnowledgeBasesCommand"; +import { + ListTagsForResourceCommandInput, + ListTagsForResourceCommandOutput, +} from "./commands/ListTagsForResourceCommand"; +import { + NotifyRecommendationsReceivedCommandInput, + NotifyRecommendationsReceivedCommandOutput, +} from "./commands/NotifyRecommendationsReceivedCommand"; +import { QueryAssistantCommandInput, QueryAssistantCommandOutput } from "./commands/QueryAssistantCommand"; +import { + RemoveKnowledgeBaseTemplateUriCommandInput, + RemoveKnowledgeBaseTemplateUriCommandOutput, +} from "./commands/RemoveKnowledgeBaseTemplateUriCommand"; +import { SearchContentCommandInput, SearchContentCommandOutput } from "./commands/SearchContentCommand"; +import { SearchSessionsCommandInput, SearchSessionsCommandOutput } from "./commands/SearchSessionsCommand"; +import { StartContentUploadCommandInput, StartContentUploadCommandOutput } from "./commands/StartContentUploadCommand"; +import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand"; +import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand"; +import { UpdateContentCommandInput, UpdateContentCommandOutput } from "./commands/UpdateContentCommand"; +import { + UpdateKnowledgeBaseTemplateUriCommandInput, + UpdateKnowledgeBaseTemplateUriCommandOutput, +} from "./commands/UpdateKnowledgeBaseTemplateUriCommand"; +import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig"; + +export type ServiceInputTypes = + | CreateAssistantAssociationCommandInput + | CreateAssistantCommandInput + | CreateContentCommandInput + | CreateKnowledgeBaseCommandInput + | CreateSessionCommandInput + | DeleteAssistantAssociationCommandInput + | DeleteAssistantCommandInput + | DeleteContentCommandInput + | DeleteKnowledgeBaseCommandInput + | GetAssistantAssociationCommandInput + | GetAssistantCommandInput + | GetContentCommandInput + | GetContentSummaryCommandInput + | GetKnowledgeBaseCommandInput + | GetRecommendationsCommandInput + | GetSessionCommandInput + | ListAssistantAssociationsCommandInput + | ListAssistantsCommandInput + | ListContentsCommandInput + | ListKnowledgeBasesCommandInput + | ListTagsForResourceCommandInput + | NotifyRecommendationsReceivedCommandInput + | QueryAssistantCommandInput + | RemoveKnowledgeBaseTemplateUriCommandInput + | SearchContentCommandInput + | SearchSessionsCommandInput + | StartContentUploadCommandInput + | TagResourceCommandInput + | UntagResourceCommandInput + | UpdateContentCommandInput + | UpdateKnowledgeBaseTemplateUriCommandInput; + +export type ServiceOutputTypes = + | CreateAssistantAssociationCommandOutput + | CreateAssistantCommandOutput + | CreateContentCommandOutput + | CreateKnowledgeBaseCommandOutput + | CreateSessionCommandOutput + | DeleteAssistantAssociationCommandOutput + | DeleteAssistantCommandOutput + | DeleteContentCommandOutput + | DeleteKnowledgeBaseCommandOutput + | GetAssistantAssociationCommandOutput + | GetAssistantCommandOutput + | GetContentCommandOutput + | GetContentSummaryCommandOutput + | GetKnowledgeBaseCommandOutput + | GetRecommendationsCommandOutput + | GetSessionCommandOutput + | ListAssistantAssociationsCommandOutput + | ListAssistantsCommandOutput + | ListContentsCommandOutput + | ListKnowledgeBasesCommandOutput + | ListTagsForResourceCommandOutput + | NotifyRecommendationsReceivedCommandOutput + | QueryAssistantCommandOutput + | RemoveKnowledgeBaseTemplateUriCommandOutput + | SearchContentCommandOutput + | SearchSessionsCommandOutput + | StartContentUploadCommandOutput + | TagResourceCommandOutput + | UntagResourceCommandOutput + | UpdateContentCommandOutput + | UpdateKnowledgeBaseTemplateUriCommandOutput; + +export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { + /** + * The HTTP handler to use. Fetch in browser and Https in Nodejs. + */ + requestHandler?: __HttpHandler; + + /** + * A constructor for a class implementing the {@link __Hash} interface + * that computes the SHA-256 HMAC or checksum of a string or binary buffer. + * @internal + */ + sha256?: __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?: (body: any) => number | undefined; + + /** + * 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 dyanamically changing the endpoint of the client based on the hostPrefix + * trait of an operation. + */ + disableHostPrefix?: boolean; + + /** + * Value for how many times a request will be made at most in case of retry. + */ + maxAttempts?: number | __Provider; + + /** + * Specifies which retry algorithm to use. + */ + retryMode?: string | __Provider; + + /** + * Optional logger for logging debug/info/warn/error. + */ + logger?: __Logger; + + /** + * Unique service identifier. + * @internal + */ + serviceId?: string; + + /** + * The AWS region to which this client will send requests + */ + region?: string | __Provider; + + /** + * Default credentials provider; Not available in browser runtime. + * @internal + */ + credentialDefaultProvider?: (input: any) => __Provider<__Credentials>; + + /** + * Fetch related hostname, signing name or signing region with given region. + * @internal + */ + regionInfoProvider?: RegionInfoProvider; + + /** + * The provider populating default tracking information to be sent with `user-agent`, `x-amz-user-agent` header + * @internal + */ + defaultUserAgentProvider?: Provider<__UserAgent>; +} + +type WisdomClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> & + ClientDefaults & + RegionInputConfig & + EndpointsInputConfig & + RetryInputConfig & + HostHeaderInputConfig & + AwsAuthInputConfig & + UserAgentInputConfig; +/** + * The configuration interface of WisdomClient class constructor that set the region, credentials and other options. + */ +export interface WisdomClientConfig extends WisdomClientConfigType {} + +type WisdomClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> & + Required & + RegionResolvedConfig & + EndpointsResolvedConfig & + RetryResolvedConfig & + HostHeaderResolvedConfig & + AwsAuthResolvedConfig & + UserAgentResolvedConfig; +/** + * The resolved configuration interface of WisdomClient class. This is resolved and normalized from the {@link WisdomClientConfig | constructor configuration interface}. + */ +export interface WisdomClientResolvedConfig extends WisdomClientResolvedConfigType {} + +/** + *

                  All Amazon Connect Wisdom functionality is accessible using the API. For example, you can create an + * assistant and a knowledge base.

                  + * + *

                  Some more advanced features are only accessible using the Wisdom API. For example, you + * can manually manage content by uploading custom files and control their lifecycle.

                  + */ +export class WisdomClient extends __Client< + __HttpHandlerOptions, + ServiceInputTypes, + ServiceOutputTypes, + WisdomClientResolvedConfig +> { + /** + * The resolved configuration of WisdomClient class. This is resolved and normalized from the {@link WisdomClientConfig | constructor configuration interface}. + */ + readonly config: WisdomClientResolvedConfig; + + constructor(configuration: WisdomClientConfig) { + const _config_0 = __getRuntimeConfig(configuration); + const _config_1 = resolveRegionConfig(_config_0); + const _config_2 = resolveEndpointsConfig(_config_1); + const _config_3 = resolveRetryConfig(_config_2); + const _config_4 = resolveHostHeaderConfig(_config_3); + const _config_5 = resolveAwsAuthConfig(_config_4); + const _config_6 = resolveUserAgentConfig(_config_5); + super(_config_6); + this.config = _config_6; + this.middlewareStack.use(getRetryPlugin(this.config)); + this.middlewareStack.use(getContentLengthPlugin(this.config)); + this.middlewareStack.use(getHostHeaderPlugin(this.config)); + this.middlewareStack.use(getLoggerPlugin(this.config)); + this.middlewareStack.use(getAwsAuthPlugin(this.config)); + this.middlewareStack.use(getUserAgentPlugin(this.config)); + } + + /** + * Destroy underlying resources, like sockets. It's usually not necessary to do this. + * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed. + * Otherwise, sockets might stay open for quite a long time before the server terminates them. + */ + destroy(): void { + super.destroy(); + } +} diff --git a/clients/client-wisdom/src/commands/CreateAssistantAssociationCommand.ts b/clients/client-wisdom/src/commands/CreateAssistantAssociationCommand.ts new file mode 100644 index 0000000000000..493505c028e59 --- /dev/null +++ b/clients/client-wisdom/src/commands/CreateAssistantAssociationCommand.ts @@ -0,0 +1,100 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { CreateAssistantAssociationRequest, CreateAssistantAssociationResponse } from "../models/models_0"; +import { + deserializeAws_restJson1CreateAssistantAssociationCommand, + serializeAws_restJson1CreateAssistantAssociationCommand, +} from "../protocols/Aws_restJson1"; +import { ServiceInputTypes, ServiceOutputTypes, WisdomClientResolvedConfig } from "../WisdomClient"; + +export interface CreateAssistantAssociationCommandInput extends CreateAssistantAssociationRequest {} +export interface CreateAssistantAssociationCommandOutput extends CreateAssistantAssociationResponse, __MetadataBearer {} + +/** + *

                  Creates an association between an Amazon Connect Wisdom assistant and another resource. Currently, the + * only supported association is with a knowledge base. An assistant can have only a single + * association.

                  + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { WisdomClient, CreateAssistantAssociationCommand } from "@aws-sdk/client-wisdom"; // ES Modules import + * // const { WisdomClient, CreateAssistantAssociationCommand } = require("@aws-sdk/client-wisdom"); // CommonJS import + * const client = new WisdomClient(config); + * const command = new CreateAssistantAssociationCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link CreateAssistantAssociationCommandInput} for command's `input` shape. + * @see {@link CreateAssistantAssociationCommandOutput} for command's `response` shape. + * @see {@link WisdomClientResolvedConfig | config} for command's `input` shape. + * + */ +export class CreateAssistantAssociationCommand extends $Command< + CreateAssistantAssociationCommandInput, + CreateAssistantAssociationCommandOutput, + WisdomClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: CreateAssistantAssociationCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WisdomClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "WisdomClient"; + const commandName = "CreateAssistantAssociationCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: CreateAssistantAssociationRequest.filterSensitiveLog, + outputFilterSensitiveLog: CreateAssistantAssociationResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: CreateAssistantAssociationCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1CreateAssistantAssociationCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return deserializeAws_restJson1CreateAssistantAssociationCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-wisdom/src/commands/CreateAssistantCommand.ts b/clients/client-wisdom/src/commands/CreateAssistantCommand.ts new file mode 100644 index 0000000000000..e0a5a304b8e42 --- /dev/null +++ b/clients/client-wisdom/src/commands/CreateAssistantCommand.ts @@ -0,0 +1,95 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { CreateAssistantRequest, CreateAssistantResponse } from "../models/models_0"; +import { + deserializeAws_restJson1CreateAssistantCommand, + serializeAws_restJson1CreateAssistantCommand, +} from "../protocols/Aws_restJson1"; +import { ServiceInputTypes, ServiceOutputTypes, WisdomClientResolvedConfig } from "../WisdomClient"; + +export interface CreateAssistantCommandInput extends CreateAssistantRequest {} +export interface CreateAssistantCommandOutput extends CreateAssistantResponse, __MetadataBearer {} + +/** + *

                  Creates an Amazon Connect Wisdom assistant.

                  + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { WisdomClient, CreateAssistantCommand } from "@aws-sdk/client-wisdom"; // ES Modules import + * // const { WisdomClient, CreateAssistantCommand } = require("@aws-sdk/client-wisdom"); // CommonJS import + * const client = new WisdomClient(config); + * const command = new CreateAssistantCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link CreateAssistantCommandInput} for command's `input` shape. + * @see {@link CreateAssistantCommandOutput} for command's `response` shape. + * @see {@link WisdomClientResolvedConfig | config} for command's `input` shape. + * + */ +export class CreateAssistantCommand extends $Command< + CreateAssistantCommandInput, + CreateAssistantCommandOutput, + WisdomClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: CreateAssistantCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WisdomClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "WisdomClient"; + const commandName = "CreateAssistantCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: CreateAssistantRequest.filterSensitiveLog, + outputFilterSensitiveLog: CreateAssistantResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: CreateAssistantCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1CreateAssistantCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1CreateAssistantCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-wisdom/src/commands/CreateContentCommand.ts b/clients/client-wisdom/src/commands/CreateContentCommand.ts new file mode 100644 index 0000000000000..d769a91d649d8 --- /dev/null +++ b/clients/client-wisdom/src/commands/CreateContentCommand.ts @@ -0,0 +1,96 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { CreateContentRequest, CreateContentResponse } from "../models/models_0"; +import { + deserializeAws_restJson1CreateContentCommand, + serializeAws_restJson1CreateContentCommand, +} from "../protocols/Aws_restJson1"; +import { ServiceInputTypes, ServiceOutputTypes, WisdomClientResolvedConfig } from "../WisdomClient"; + +export interface CreateContentCommandInput extends CreateContentRequest {} +export interface CreateContentCommandOutput extends CreateContentResponse, __MetadataBearer {} + +/** + *

                  Creates Wisdom content. Before to calling this API, use StartContentUpload to + * upload an asset.

                  + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { WisdomClient, CreateContentCommand } from "@aws-sdk/client-wisdom"; // ES Modules import + * // const { WisdomClient, CreateContentCommand } = require("@aws-sdk/client-wisdom"); // CommonJS import + * const client = new WisdomClient(config); + * const command = new CreateContentCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link CreateContentCommandInput} for command's `input` shape. + * @see {@link CreateContentCommandOutput} for command's `response` shape. + * @see {@link WisdomClientResolvedConfig | config} for command's `input` shape. + * + */ +export class CreateContentCommand extends $Command< + CreateContentCommandInput, + CreateContentCommandOutput, + WisdomClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: CreateContentCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WisdomClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "WisdomClient"; + const commandName = "CreateContentCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: CreateContentRequest.filterSensitiveLog, + outputFilterSensitiveLog: CreateContentResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: CreateContentCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1CreateContentCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1CreateContentCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-wisdom/src/commands/CreateKnowledgeBaseCommand.ts b/clients/client-wisdom/src/commands/CreateKnowledgeBaseCommand.ts new file mode 100644 index 0000000000000..f7fe6086a11fb --- /dev/null +++ b/clients/client-wisdom/src/commands/CreateKnowledgeBaseCommand.ts @@ -0,0 +1,119 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { CreateKnowledgeBaseRequest, CreateKnowledgeBaseResponse } from "../models/models_0"; +import { + deserializeAws_restJson1CreateKnowledgeBaseCommand, + serializeAws_restJson1CreateKnowledgeBaseCommand, +} from "../protocols/Aws_restJson1"; +import { ServiceInputTypes, ServiceOutputTypes, WisdomClientResolvedConfig } from "../WisdomClient"; + +export interface CreateKnowledgeBaseCommandInput extends CreateKnowledgeBaseRequest {} +export interface CreateKnowledgeBaseCommandOutput extends CreateKnowledgeBaseResponse, __MetadataBearer {} + +/** + *

                  Creates a knowledge base.

                  + * + *

                  When using this API, you cannot reuse Amazon AppIntegrations + * DataIntegrations with external knowledge bases such as Salesforce and ServiceNow. If you do, + * you'll get an InvalidRequestException error.

                  + * + *

                  For example, you're programmatically managing your external knowledge base, and you want + * to add or remove one of the fields that is being ingested from Salesforce. Do the + * following:

                  + *
                    + *
                  1. + *

                    Call DeleteKnowledgeBase.

                    + *
                  2. + *
                  3. + *

                    Call DeleteDataIntegration.

                    + *
                  4. + *
                  5. + *

                    Call CreateDataIntegration to recreate the DataIntegration or a create different + * one.

                    + *
                  6. + *
                  7. + *

                    Call CreateKnowledgeBase.

                    + *
                  8. + *
                  + *
                  + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { WisdomClient, CreateKnowledgeBaseCommand } from "@aws-sdk/client-wisdom"; // ES Modules import + * // const { WisdomClient, CreateKnowledgeBaseCommand } = require("@aws-sdk/client-wisdom"); // CommonJS import + * const client = new WisdomClient(config); + * const command = new CreateKnowledgeBaseCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link CreateKnowledgeBaseCommandInput} for command's `input` shape. + * @see {@link CreateKnowledgeBaseCommandOutput} for command's `response` shape. + * @see {@link WisdomClientResolvedConfig | config} for command's `input` shape. + * + */ +export class CreateKnowledgeBaseCommand extends $Command< + CreateKnowledgeBaseCommandInput, + CreateKnowledgeBaseCommandOutput, + WisdomClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: CreateKnowledgeBaseCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WisdomClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "WisdomClient"; + const commandName = "CreateKnowledgeBaseCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: CreateKnowledgeBaseRequest.filterSensitiveLog, + outputFilterSensitiveLog: CreateKnowledgeBaseResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: CreateKnowledgeBaseCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1CreateKnowledgeBaseCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1CreateKnowledgeBaseCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-wisdom/src/commands/CreateSessionCommand.ts b/clients/client-wisdom/src/commands/CreateSessionCommand.ts new file mode 100644 index 0000000000000..748c54c4d189b --- /dev/null +++ b/clients/client-wisdom/src/commands/CreateSessionCommand.ts @@ -0,0 +1,97 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { CreateSessionRequest, CreateSessionResponse } from "../models/models_0"; +import { + deserializeAws_restJson1CreateSessionCommand, + serializeAws_restJson1CreateSessionCommand, +} from "../protocols/Aws_restJson1"; +import { ServiceInputTypes, ServiceOutputTypes, WisdomClientResolvedConfig } from "../WisdomClient"; + +export interface CreateSessionCommandInput extends CreateSessionRequest {} +export interface CreateSessionCommandOutput extends CreateSessionResponse, __MetadataBearer {} + +/** + *

                  Creates a session. A session is a contextual container used for generating + * recommendations. Amazon Connect creates a new Wisdom session for each contact on which Wisdom is + * enabled.

                  + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { WisdomClient, CreateSessionCommand } from "@aws-sdk/client-wisdom"; // ES Modules import + * // const { WisdomClient, CreateSessionCommand } = require("@aws-sdk/client-wisdom"); // CommonJS import + * const client = new WisdomClient(config); + * const command = new CreateSessionCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link CreateSessionCommandInput} for command's `input` shape. + * @see {@link CreateSessionCommandOutput} for command's `response` shape. + * @see {@link WisdomClientResolvedConfig | config} for command's `input` shape. + * + */ +export class CreateSessionCommand extends $Command< + CreateSessionCommandInput, + CreateSessionCommandOutput, + WisdomClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: CreateSessionCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WisdomClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "WisdomClient"; + const commandName = "CreateSessionCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: CreateSessionRequest.filterSensitiveLog, + outputFilterSensitiveLog: CreateSessionResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: CreateSessionCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1CreateSessionCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1CreateSessionCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-wisdom/src/commands/DeleteAssistantAssociationCommand.ts b/clients/client-wisdom/src/commands/DeleteAssistantAssociationCommand.ts new file mode 100644 index 0000000000000..8e7651fd32ee2 --- /dev/null +++ b/clients/client-wisdom/src/commands/DeleteAssistantAssociationCommand.ts @@ -0,0 +1,98 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { DeleteAssistantAssociationRequest, DeleteAssistantAssociationResponse } from "../models/models_0"; +import { + deserializeAws_restJson1DeleteAssistantAssociationCommand, + serializeAws_restJson1DeleteAssistantAssociationCommand, +} from "../protocols/Aws_restJson1"; +import { ServiceInputTypes, ServiceOutputTypes, WisdomClientResolvedConfig } from "../WisdomClient"; + +export interface DeleteAssistantAssociationCommandInput extends DeleteAssistantAssociationRequest {} +export interface DeleteAssistantAssociationCommandOutput extends DeleteAssistantAssociationResponse, __MetadataBearer {} + +/** + *

                  Deletes an assistant association.

                  + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { WisdomClient, DeleteAssistantAssociationCommand } from "@aws-sdk/client-wisdom"; // ES Modules import + * // const { WisdomClient, DeleteAssistantAssociationCommand } = require("@aws-sdk/client-wisdom"); // CommonJS import + * const client = new WisdomClient(config); + * const command = new DeleteAssistantAssociationCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link DeleteAssistantAssociationCommandInput} for command's `input` shape. + * @see {@link DeleteAssistantAssociationCommandOutput} for command's `response` shape. + * @see {@link WisdomClientResolvedConfig | config} for command's `input` shape. + * + */ +export class DeleteAssistantAssociationCommand extends $Command< + DeleteAssistantAssociationCommandInput, + DeleteAssistantAssociationCommandOutput, + WisdomClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DeleteAssistantAssociationCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WisdomClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "WisdomClient"; + const commandName = "DeleteAssistantAssociationCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: DeleteAssistantAssociationRequest.filterSensitiveLog, + outputFilterSensitiveLog: DeleteAssistantAssociationResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: DeleteAssistantAssociationCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1DeleteAssistantAssociationCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return deserializeAws_restJson1DeleteAssistantAssociationCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-wisdom/src/commands/DeleteAssistantCommand.ts b/clients/client-wisdom/src/commands/DeleteAssistantCommand.ts new file mode 100644 index 0000000000000..4a940f72cfd14 --- /dev/null +++ b/clients/client-wisdom/src/commands/DeleteAssistantCommand.ts @@ -0,0 +1,95 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { DeleteAssistantRequest, DeleteAssistantResponse } from "../models/models_0"; +import { + deserializeAws_restJson1DeleteAssistantCommand, + serializeAws_restJson1DeleteAssistantCommand, +} from "../protocols/Aws_restJson1"; +import { ServiceInputTypes, ServiceOutputTypes, WisdomClientResolvedConfig } from "../WisdomClient"; + +export interface DeleteAssistantCommandInput extends DeleteAssistantRequest {} +export interface DeleteAssistantCommandOutput extends DeleteAssistantResponse, __MetadataBearer {} + +/** + *

                  Deletes an assistant.

                  + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { WisdomClient, DeleteAssistantCommand } from "@aws-sdk/client-wisdom"; // ES Modules import + * // const { WisdomClient, DeleteAssistantCommand } = require("@aws-sdk/client-wisdom"); // CommonJS import + * const client = new WisdomClient(config); + * const command = new DeleteAssistantCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link DeleteAssistantCommandInput} for command's `input` shape. + * @see {@link DeleteAssistantCommandOutput} for command's `response` shape. + * @see {@link WisdomClientResolvedConfig | config} for command's `input` shape. + * + */ +export class DeleteAssistantCommand extends $Command< + DeleteAssistantCommandInput, + DeleteAssistantCommandOutput, + WisdomClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DeleteAssistantCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WisdomClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "WisdomClient"; + const commandName = "DeleteAssistantCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: DeleteAssistantRequest.filterSensitiveLog, + outputFilterSensitiveLog: DeleteAssistantResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: DeleteAssistantCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1DeleteAssistantCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1DeleteAssistantCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-wisdom/src/commands/DeleteContentCommand.ts b/clients/client-wisdom/src/commands/DeleteContentCommand.ts new file mode 100644 index 0000000000000..13d5f7f787c82 --- /dev/null +++ b/clients/client-wisdom/src/commands/DeleteContentCommand.ts @@ -0,0 +1,95 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { DeleteContentRequest, DeleteContentResponse } from "../models/models_0"; +import { + deserializeAws_restJson1DeleteContentCommand, + serializeAws_restJson1DeleteContentCommand, +} from "../protocols/Aws_restJson1"; +import { ServiceInputTypes, ServiceOutputTypes, WisdomClientResolvedConfig } from "../WisdomClient"; + +export interface DeleteContentCommandInput extends DeleteContentRequest {} +export interface DeleteContentCommandOutput extends DeleteContentResponse, __MetadataBearer {} + +/** + *

                  Deletes the content.

                  + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { WisdomClient, DeleteContentCommand } from "@aws-sdk/client-wisdom"; // ES Modules import + * // const { WisdomClient, DeleteContentCommand } = require("@aws-sdk/client-wisdom"); // CommonJS import + * const client = new WisdomClient(config); + * const command = new DeleteContentCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link DeleteContentCommandInput} for command's `input` shape. + * @see {@link DeleteContentCommandOutput} for command's `response` shape. + * @see {@link WisdomClientResolvedConfig | config} for command's `input` shape. + * + */ +export class DeleteContentCommand extends $Command< + DeleteContentCommandInput, + DeleteContentCommandOutput, + WisdomClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DeleteContentCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WisdomClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "WisdomClient"; + const commandName = "DeleteContentCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: DeleteContentRequest.filterSensitiveLog, + outputFilterSensitiveLog: DeleteContentResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: DeleteContentCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1DeleteContentCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1DeleteContentCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-wisdom/src/commands/DeleteKnowledgeBaseCommand.ts b/clients/client-wisdom/src/commands/DeleteKnowledgeBaseCommand.ts new file mode 100644 index 0000000000000..f8746b7a9cf32 --- /dev/null +++ b/clients/client-wisdom/src/commands/DeleteKnowledgeBaseCommand.ts @@ -0,0 +1,102 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { DeleteKnowledgeBaseRequest, DeleteKnowledgeBaseResponse } from "../models/models_0"; +import { + deserializeAws_restJson1DeleteKnowledgeBaseCommand, + serializeAws_restJson1DeleteKnowledgeBaseCommand, +} from "../protocols/Aws_restJson1"; +import { ServiceInputTypes, ServiceOutputTypes, WisdomClientResolvedConfig } from "../WisdomClient"; + +export interface DeleteKnowledgeBaseCommandInput extends DeleteKnowledgeBaseRequest {} +export interface DeleteKnowledgeBaseCommandOutput extends DeleteKnowledgeBaseResponse, __MetadataBearer {} + +/** + *

                  Deletes the knowledge base.

                  + * + *

                  When you use this API to delete an external knowledge base such as Salesforce or + * ServiceNow, you must also delete the Amazon AppIntegrations DataIntegration. + * This is because you can't reuse the DataIntegration after it's been associated with an + * external knowledge base. However, you can delete and recreate it. See DeleteDataIntegration and CreateDataIntegration in the Amazon AppIntegrations API + * Reference.

                  + *
                  + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { WisdomClient, DeleteKnowledgeBaseCommand } from "@aws-sdk/client-wisdom"; // ES Modules import + * // const { WisdomClient, DeleteKnowledgeBaseCommand } = require("@aws-sdk/client-wisdom"); // CommonJS import + * const client = new WisdomClient(config); + * const command = new DeleteKnowledgeBaseCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link DeleteKnowledgeBaseCommandInput} for command's `input` shape. + * @see {@link DeleteKnowledgeBaseCommandOutput} for command's `response` shape. + * @see {@link WisdomClientResolvedConfig | config} for command's `input` shape. + * + */ +export class DeleteKnowledgeBaseCommand extends $Command< + DeleteKnowledgeBaseCommandInput, + DeleteKnowledgeBaseCommandOutput, + WisdomClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DeleteKnowledgeBaseCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WisdomClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "WisdomClient"; + const commandName = "DeleteKnowledgeBaseCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: DeleteKnowledgeBaseRequest.filterSensitiveLog, + outputFilterSensitiveLog: DeleteKnowledgeBaseResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: DeleteKnowledgeBaseCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1DeleteKnowledgeBaseCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1DeleteKnowledgeBaseCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-wisdom/src/commands/GetAssistantAssociationCommand.ts b/clients/client-wisdom/src/commands/GetAssistantAssociationCommand.ts new file mode 100644 index 0000000000000..4c65377b28839 --- /dev/null +++ b/clients/client-wisdom/src/commands/GetAssistantAssociationCommand.ts @@ -0,0 +1,95 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { GetAssistantAssociationRequest, GetAssistantAssociationResponse } from "../models/models_0"; +import { + deserializeAws_restJson1GetAssistantAssociationCommand, + serializeAws_restJson1GetAssistantAssociationCommand, +} from "../protocols/Aws_restJson1"; +import { ServiceInputTypes, ServiceOutputTypes, WisdomClientResolvedConfig } from "../WisdomClient"; + +export interface GetAssistantAssociationCommandInput extends GetAssistantAssociationRequest {} +export interface GetAssistantAssociationCommandOutput extends GetAssistantAssociationResponse, __MetadataBearer {} + +/** + *

                  Retrieves information about an assistant association.

                  + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { WisdomClient, GetAssistantAssociationCommand } from "@aws-sdk/client-wisdom"; // ES Modules import + * // const { WisdomClient, GetAssistantAssociationCommand } = require("@aws-sdk/client-wisdom"); // CommonJS import + * const client = new WisdomClient(config); + * const command = new GetAssistantAssociationCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link GetAssistantAssociationCommandInput} for command's `input` shape. + * @see {@link GetAssistantAssociationCommandOutput} for command's `response` shape. + * @see {@link WisdomClientResolvedConfig | config} for command's `input` shape. + * + */ +export class GetAssistantAssociationCommand extends $Command< + GetAssistantAssociationCommandInput, + GetAssistantAssociationCommandOutput, + WisdomClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetAssistantAssociationCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WisdomClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "WisdomClient"; + const commandName = "GetAssistantAssociationCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: GetAssistantAssociationRequest.filterSensitiveLog, + outputFilterSensitiveLog: GetAssistantAssociationResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: GetAssistantAssociationCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1GetAssistantAssociationCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1GetAssistantAssociationCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-wisdom/src/commands/GetAssistantCommand.ts b/clients/client-wisdom/src/commands/GetAssistantCommand.ts new file mode 100644 index 0000000000000..c095a42e0eeee --- /dev/null +++ b/clients/client-wisdom/src/commands/GetAssistantCommand.ts @@ -0,0 +1,95 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { GetAssistantRequest, GetAssistantResponse } from "../models/models_0"; +import { + deserializeAws_restJson1GetAssistantCommand, + serializeAws_restJson1GetAssistantCommand, +} from "../protocols/Aws_restJson1"; +import { ServiceInputTypes, ServiceOutputTypes, WisdomClientResolvedConfig } from "../WisdomClient"; + +export interface GetAssistantCommandInput extends GetAssistantRequest {} +export interface GetAssistantCommandOutput extends GetAssistantResponse, __MetadataBearer {} + +/** + *

                  Retrieves information about an assistant.

                  + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { WisdomClient, GetAssistantCommand } from "@aws-sdk/client-wisdom"; // ES Modules import + * // const { WisdomClient, GetAssistantCommand } = require("@aws-sdk/client-wisdom"); // CommonJS import + * const client = new WisdomClient(config); + * const command = new GetAssistantCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link GetAssistantCommandInput} for command's `input` shape. + * @see {@link GetAssistantCommandOutput} for command's `response` shape. + * @see {@link WisdomClientResolvedConfig | config} for command's `input` shape. + * + */ +export class GetAssistantCommand extends $Command< + GetAssistantCommandInput, + GetAssistantCommandOutput, + WisdomClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetAssistantCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WisdomClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "WisdomClient"; + const commandName = "GetAssistantCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: GetAssistantRequest.filterSensitiveLog, + outputFilterSensitiveLog: GetAssistantResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: GetAssistantCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1GetAssistantCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1GetAssistantCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-wisdom/src/commands/GetContentCommand.ts b/clients/client-wisdom/src/commands/GetContentCommand.ts new file mode 100644 index 0000000000000..81458684529e5 --- /dev/null +++ b/clients/client-wisdom/src/commands/GetContentCommand.ts @@ -0,0 +1,95 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { GetContentRequest, GetContentResponse } from "../models/models_0"; +import { + deserializeAws_restJson1GetContentCommand, + serializeAws_restJson1GetContentCommand, +} from "../protocols/Aws_restJson1"; +import { ServiceInputTypes, ServiceOutputTypes, WisdomClientResolvedConfig } from "../WisdomClient"; + +export interface GetContentCommandInput extends GetContentRequest {} +export interface GetContentCommandOutput extends GetContentResponse, __MetadataBearer {} + +/** + *

                  Retrieves content, including a pre-signed URL to download the content.

                  + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { WisdomClient, GetContentCommand } from "@aws-sdk/client-wisdom"; // ES Modules import + * // const { WisdomClient, GetContentCommand } = require("@aws-sdk/client-wisdom"); // CommonJS import + * const client = new WisdomClient(config); + * const command = new GetContentCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link GetContentCommandInput} for command's `input` shape. + * @see {@link GetContentCommandOutput} for command's `response` shape. + * @see {@link WisdomClientResolvedConfig | config} for command's `input` shape. + * + */ +export class GetContentCommand extends $Command< + GetContentCommandInput, + GetContentCommandOutput, + WisdomClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetContentCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WisdomClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "WisdomClient"; + const commandName = "GetContentCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: GetContentRequest.filterSensitiveLog, + outputFilterSensitiveLog: GetContentResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: GetContentCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1GetContentCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1GetContentCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-wisdom/src/commands/GetContentSummaryCommand.ts b/clients/client-wisdom/src/commands/GetContentSummaryCommand.ts new file mode 100644 index 0000000000000..ab208f895adac --- /dev/null +++ b/clients/client-wisdom/src/commands/GetContentSummaryCommand.ts @@ -0,0 +1,95 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { GetContentSummaryRequest, GetContentSummaryResponse } from "../models/models_0"; +import { + deserializeAws_restJson1GetContentSummaryCommand, + serializeAws_restJson1GetContentSummaryCommand, +} from "../protocols/Aws_restJson1"; +import { ServiceInputTypes, ServiceOutputTypes, WisdomClientResolvedConfig } from "../WisdomClient"; + +export interface GetContentSummaryCommandInput extends GetContentSummaryRequest {} +export interface GetContentSummaryCommandOutput extends GetContentSummaryResponse, __MetadataBearer {} + +/** + *

                  Retrieves summary information about the content.

                  + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { WisdomClient, GetContentSummaryCommand } from "@aws-sdk/client-wisdom"; // ES Modules import + * // const { WisdomClient, GetContentSummaryCommand } = require("@aws-sdk/client-wisdom"); // CommonJS import + * const client = new WisdomClient(config); + * const command = new GetContentSummaryCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link GetContentSummaryCommandInput} for command's `input` shape. + * @see {@link GetContentSummaryCommandOutput} for command's `response` shape. + * @see {@link WisdomClientResolvedConfig | config} for command's `input` shape. + * + */ +export class GetContentSummaryCommand extends $Command< + GetContentSummaryCommandInput, + GetContentSummaryCommandOutput, + WisdomClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetContentSummaryCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WisdomClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "WisdomClient"; + const commandName = "GetContentSummaryCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: GetContentSummaryRequest.filterSensitiveLog, + outputFilterSensitiveLog: GetContentSummaryResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: GetContentSummaryCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1GetContentSummaryCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1GetContentSummaryCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-wisdom/src/commands/GetKnowledgeBaseCommand.ts b/clients/client-wisdom/src/commands/GetKnowledgeBaseCommand.ts new file mode 100644 index 0000000000000..e945e1679fe9a --- /dev/null +++ b/clients/client-wisdom/src/commands/GetKnowledgeBaseCommand.ts @@ -0,0 +1,95 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { GetKnowledgeBaseRequest, GetKnowledgeBaseResponse } from "../models/models_0"; +import { + deserializeAws_restJson1GetKnowledgeBaseCommand, + serializeAws_restJson1GetKnowledgeBaseCommand, +} from "../protocols/Aws_restJson1"; +import { ServiceInputTypes, ServiceOutputTypes, WisdomClientResolvedConfig } from "../WisdomClient"; + +export interface GetKnowledgeBaseCommandInput extends GetKnowledgeBaseRequest {} +export interface GetKnowledgeBaseCommandOutput extends GetKnowledgeBaseResponse, __MetadataBearer {} + +/** + *

                  Retrieves information about the knowledge base.

                  + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { WisdomClient, GetKnowledgeBaseCommand } from "@aws-sdk/client-wisdom"; // ES Modules import + * // const { WisdomClient, GetKnowledgeBaseCommand } = require("@aws-sdk/client-wisdom"); // CommonJS import + * const client = new WisdomClient(config); + * const command = new GetKnowledgeBaseCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link GetKnowledgeBaseCommandInput} for command's `input` shape. + * @see {@link GetKnowledgeBaseCommandOutput} for command's `response` shape. + * @see {@link WisdomClientResolvedConfig | config} for command's `input` shape. + * + */ +export class GetKnowledgeBaseCommand extends $Command< + GetKnowledgeBaseCommandInput, + GetKnowledgeBaseCommandOutput, + WisdomClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetKnowledgeBaseCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WisdomClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "WisdomClient"; + const commandName = "GetKnowledgeBaseCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: GetKnowledgeBaseRequest.filterSensitiveLog, + outputFilterSensitiveLog: GetKnowledgeBaseResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: GetKnowledgeBaseCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1GetKnowledgeBaseCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1GetKnowledgeBaseCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-wisdom/src/commands/GetRecommendationsCommand.ts b/clients/client-wisdom/src/commands/GetRecommendationsCommand.ts new file mode 100644 index 0000000000000..1dc30ab067ac6 --- /dev/null +++ b/clients/client-wisdom/src/commands/GetRecommendationsCommand.ts @@ -0,0 +1,98 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { GetRecommendationsRequest, GetRecommendationsResponse } from "../models/models_0"; +import { + deserializeAws_restJson1GetRecommendationsCommand, + serializeAws_restJson1GetRecommendationsCommand, +} from "../protocols/Aws_restJson1"; +import { ServiceInputTypes, ServiceOutputTypes, WisdomClientResolvedConfig } from "../WisdomClient"; + +export interface GetRecommendationsCommandInput extends GetRecommendationsRequest {} +export interface GetRecommendationsCommandOutput extends GetRecommendationsResponse, __MetadataBearer {} + +/** + *

                  Retrieves recommendations for the specified session. To avoid retrieving the same + * recommendations in subsequent calls, use NotifyRecommendationsReceived. This API supports long-polling behavior with the + * waitTimeSeconds parameter. Short poll is the default behavior and only returns + * recommendations already available. To perform a manual query against an assistant, use QueryAssistant.

                  + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { WisdomClient, GetRecommendationsCommand } from "@aws-sdk/client-wisdom"; // ES Modules import + * // const { WisdomClient, GetRecommendationsCommand } = require("@aws-sdk/client-wisdom"); // CommonJS import + * const client = new WisdomClient(config); + * const command = new GetRecommendationsCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link GetRecommendationsCommandInput} for command's `input` shape. + * @see {@link GetRecommendationsCommandOutput} for command's `response` shape. + * @see {@link WisdomClientResolvedConfig | config} for command's `input` shape. + * + */ +export class GetRecommendationsCommand extends $Command< + GetRecommendationsCommandInput, + GetRecommendationsCommandOutput, + WisdomClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetRecommendationsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WisdomClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "WisdomClient"; + const commandName = "GetRecommendationsCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: GetRecommendationsRequest.filterSensitiveLog, + outputFilterSensitiveLog: GetRecommendationsResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: GetRecommendationsCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1GetRecommendationsCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1GetRecommendationsCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-wisdom/src/commands/GetSessionCommand.ts b/clients/client-wisdom/src/commands/GetSessionCommand.ts new file mode 100644 index 0000000000000..f25e79913e55d --- /dev/null +++ b/clients/client-wisdom/src/commands/GetSessionCommand.ts @@ -0,0 +1,95 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { GetSessionRequest, GetSessionResponse } from "../models/models_0"; +import { + deserializeAws_restJson1GetSessionCommand, + serializeAws_restJson1GetSessionCommand, +} from "../protocols/Aws_restJson1"; +import { ServiceInputTypes, ServiceOutputTypes, WisdomClientResolvedConfig } from "../WisdomClient"; + +export interface GetSessionCommandInput extends GetSessionRequest {} +export interface GetSessionCommandOutput extends GetSessionResponse, __MetadataBearer {} + +/** + *

                  Retrieves information for a specified session.

                  + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { WisdomClient, GetSessionCommand } from "@aws-sdk/client-wisdom"; // ES Modules import + * // const { WisdomClient, GetSessionCommand } = require("@aws-sdk/client-wisdom"); // CommonJS import + * const client = new WisdomClient(config); + * const command = new GetSessionCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link GetSessionCommandInput} for command's `input` shape. + * @see {@link GetSessionCommandOutput} for command's `response` shape. + * @see {@link WisdomClientResolvedConfig | config} for command's `input` shape. + * + */ +export class GetSessionCommand extends $Command< + GetSessionCommandInput, + GetSessionCommandOutput, + WisdomClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetSessionCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WisdomClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "WisdomClient"; + const commandName = "GetSessionCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: GetSessionRequest.filterSensitiveLog, + outputFilterSensitiveLog: GetSessionResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: GetSessionCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1GetSessionCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1GetSessionCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-wisdom/src/commands/ListAssistantAssociationsCommand.ts b/clients/client-wisdom/src/commands/ListAssistantAssociationsCommand.ts new file mode 100644 index 0000000000000..bccb7cee118cc --- /dev/null +++ b/clients/client-wisdom/src/commands/ListAssistantAssociationsCommand.ts @@ -0,0 +1,98 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { ListAssistantAssociationsRequest, ListAssistantAssociationsResponse } from "../models/models_0"; +import { + deserializeAws_restJson1ListAssistantAssociationsCommand, + serializeAws_restJson1ListAssistantAssociationsCommand, +} from "../protocols/Aws_restJson1"; +import { ServiceInputTypes, ServiceOutputTypes, WisdomClientResolvedConfig } from "../WisdomClient"; + +export interface ListAssistantAssociationsCommandInput extends ListAssistantAssociationsRequest {} +export interface ListAssistantAssociationsCommandOutput extends ListAssistantAssociationsResponse, __MetadataBearer {} + +/** + *

                  Lists information about assistant associations.

                  + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { WisdomClient, ListAssistantAssociationsCommand } from "@aws-sdk/client-wisdom"; // ES Modules import + * // const { WisdomClient, ListAssistantAssociationsCommand } = require("@aws-sdk/client-wisdom"); // CommonJS import + * const client = new WisdomClient(config); + * const command = new ListAssistantAssociationsCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link ListAssistantAssociationsCommandInput} for command's `input` shape. + * @see {@link ListAssistantAssociationsCommandOutput} for command's `response` shape. + * @see {@link WisdomClientResolvedConfig | config} for command's `input` shape. + * + */ +export class ListAssistantAssociationsCommand extends $Command< + ListAssistantAssociationsCommandInput, + ListAssistantAssociationsCommandOutput, + WisdomClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: ListAssistantAssociationsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WisdomClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "WisdomClient"; + const commandName = "ListAssistantAssociationsCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: ListAssistantAssociationsRequest.filterSensitiveLog, + outputFilterSensitiveLog: ListAssistantAssociationsResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: ListAssistantAssociationsCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1ListAssistantAssociationsCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return deserializeAws_restJson1ListAssistantAssociationsCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-wisdom/src/commands/ListAssistantsCommand.ts b/clients/client-wisdom/src/commands/ListAssistantsCommand.ts new file mode 100644 index 0000000000000..67b8cd14e349b --- /dev/null +++ b/clients/client-wisdom/src/commands/ListAssistantsCommand.ts @@ -0,0 +1,95 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { ListAssistantsRequest, ListAssistantsResponse } from "../models/models_0"; +import { + deserializeAws_restJson1ListAssistantsCommand, + serializeAws_restJson1ListAssistantsCommand, +} from "../protocols/Aws_restJson1"; +import { ServiceInputTypes, ServiceOutputTypes, WisdomClientResolvedConfig } from "../WisdomClient"; + +export interface ListAssistantsCommandInput extends ListAssistantsRequest {} +export interface ListAssistantsCommandOutput extends ListAssistantsResponse, __MetadataBearer {} + +/** + *

                  Lists information about assistants.

                  + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { WisdomClient, ListAssistantsCommand } from "@aws-sdk/client-wisdom"; // ES Modules import + * // const { WisdomClient, ListAssistantsCommand } = require("@aws-sdk/client-wisdom"); // CommonJS import + * const client = new WisdomClient(config); + * const command = new ListAssistantsCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link ListAssistantsCommandInput} for command's `input` shape. + * @see {@link ListAssistantsCommandOutput} for command's `response` shape. + * @see {@link WisdomClientResolvedConfig | config} for command's `input` shape. + * + */ +export class ListAssistantsCommand extends $Command< + ListAssistantsCommandInput, + ListAssistantsCommandOutput, + WisdomClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: ListAssistantsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WisdomClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "WisdomClient"; + const commandName = "ListAssistantsCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: ListAssistantsRequest.filterSensitiveLog, + outputFilterSensitiveLog: ListAssistantsResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: ListAssistantsCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1ListAssistantsCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1ListAssistantsCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-wisdom/src/commands/ListContentsCommand.ts b/clients/client-wisdom/src/commands/ListContentsCommand.ts new file mode 100644 index 0000000000000..26ca620653a30 --- /dev/null +++ b/clients/client-wisdom/src/commands/ListContentsCommand.ts @@ -0,0 +1,95 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { ListContentsRequest, ListContentsResponse } from "../models/models_0"; +import { + deserializeAws_restJson1ListContentsCommand, + serializeAws_restJson1ListContentsCommand, +} from "../protocols/Aws_restJson1"; +import { ServiceInputTypes, ServiceOutputTypes, WisdomClientResolvedConfig } from "../WisdomClient"; + +export interface ListContentsCommandInput extends ListContentsRequest {} +export interface ListContentsCommandOutput extends ListContentsResponse, __MetadataBearer {} + +/** + *

                  Lists the content.

                  + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { WisdomClient, ListContentsCommand } from "@aws-sdk/client-wisdom"; // ES Modules import + * // const { WisdomClient, ListContentsCommand } = require("@aws-sdk/client-wisdom"); // CommonJS import + * const client = new WisdomClient(config); + * const command = new ListContentsCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link ListContentsCommandInput} for command's `input` shape. + * @see {@link ListContentsCommandOutput} for command's `response` shape. + * @see {@link WisdomClientResolvedConfig | config} for command's `input` shape. + * + */ +export class ListContentsCommand extends $Command< + ListContentsCommandInput, + ListContentsCommandOutput, + WisdomClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: ListContentsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WisdomClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "WisdomClient"; + const commandName = "ListContentsCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: ListContentsRequest.filterSensitiveLog, + outputFilterSensitiveLog: ListContentsResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: ListContentsCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1ListContentsCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1ListContentsCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-wisdom/src/commands/ListKnowledgeBasesCommand.ts b/clients/client-wisdom/src/commands/ListKnowledgeBasesCommand.ts new file mode 100644 index 0000000000000..976b253734453 --- /dev/null +++ b/clients/client-wisdom/src/commands/ListKnowledgeBasesCommand.ts @@ -0,0 +1,95 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { ListKnowledgeBasesRequest, ListKnowledgeBasesResponse } from "../models/models_0"; +import { + deserializeAws_restJson1ListKnowledgeBasesCommand, + serializeAws_restJson1ListKnowledgeBasesCommand, +} from "../protocols/Aws_restJson1"; +import { ServiceInputTypes, ServiceOutputTypes, WisdomClientResolvedConfig } from "../WisdomClient"; + +export interface ListKnowledgeBasesCommandInput extends ListKnowledgeBasesRequest {} +export interface ListKnowledgeBasesCommandOutput extends ListKnowledgeBasesResponse, __MetadataBearer {} + +/** + *

                  Lists the knowledge bases.

                  + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { WisdomClient, ListKnowledgeBasesCommand } from "@aws-sdk/client-wisdom"; // ES Modules import + * // const { WisdomClient, ListKnowledgeBasesCommand } = require("@aws-sdk/client-wisdom"); // CommonJS import + * const client = new WisdomClient(config); + * const command = new ListKnowledgeBasesCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link ListKnowledgeBasesCommandInput} for command's `input` shape. + * @see {@link ListKnowledgeBasesCommandOutput} for command's `response` shape. + * @see {@link WisdomClientResolvedConfig | config} for command's `input` shape. + * + */ +export class ListKnowledgeBasesCommand extends $Command< + ListKnowledgeBasesCommandInput, + ListKnowledgeBasesCommandOutput, + WisdomClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: ListKnowledgeBasesCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WisdomClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "WisdomClient"; + const commandName = "ListKnowledgeBasesCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: ListKnowledgeBasesRequest.filterSensitiveLog, + outputFilterSensitiveLog: ListKnowledgeBasesResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: ListKnowledgeBasesCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1ListKnowledgeBasesCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1ListKnowledgeBasesCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-wisdom/src/commands/ListTagsForResourceCommand.ts b/clients/client-wisdom/src/commands/ListTagsForResourceCommand.ts new file mode 100644 index 0000000000000..e01fcc702d58a --- /dev/null +++ b/clients/client-wisdom/src/commands/ListTagsForResourceCommand.ts @@ -0,0 +1,95 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { ListTagsForResourceRequest, ListTagsForResourceResponse } from "../models/models_0"; +import { + deserializeAws_restJson1ListTagsForResourceCommand, + serializeAws_restJson1ListTagsForResourceCommand, +} from "../protocols/Aws_restJson1"; +import { ServiceInputTypes, ServiceOutputTypes, WisdomClientResolvedConfig } from "../WisdomClient"; + +export interface ListTagsForResourceCommandInput extends ListTagsForResourceRequest {} +export interface ListTagsForResourceCommandOutput extends ListTagsForResourceResponse, __MetadataBearer {} + +/** + *

                  Lists the tags for the specified resource.

                  + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { WisdomClient, ListTagsForResourceCommand } from "@aws-sdk/client-wisdom"; // ES Modules import + * // const { WisdomClient, ListTagsForResourceCommand } = require("@aws-sdk/client-wisdom"); // CommonJS import + * const client = new WisdomClient(config); + * const command = new ListTagsForResourceCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link ListTagsForResourceCommandInput} for command's `input` shape. + * @see {@link ListTagsForResourceCommandOutput} for command's `response` shape. + * @see {@link WisdomClientResolvedConfig | config} for command's `input` shape. + * + */ +export class ListTagsForResourceCommand extends $Command< + ListTagsForResourceCommandInput, + ListTagsForResourceCommandOutput, + WisdomClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: ListTagsForResourceCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WisdomClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "WisdomClient"; + const commandName = "ListTagsForResourceCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: ListTagsForResourceRequest.filterSensitiveLog, + outputFilterSensitiveLog: ListTagsForResourceResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: ListTagsForResourceCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1ListTagsForResourceCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1ListTagsForResourceCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-wisdom/src/commands/NotifyRecommendationsReceivedCommand.ts b/clients/client-wisdom/src/commands/NotifyRecommendationsReceivedCommand.ts new file mode 100644 index 0000000000000..5839f002b6d1e --- /dev/null +++ b/clients/client-wisdom/src/commands/NotifyRecommendationsReceivedCommand.ts @@ -0,0 +1,102 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { NotifyRecommendationsReceivedRequest, NotifyRecommendationsReceivedResponse } from "../models/models_0"; +import { + deserializeAws_restJson1NotifyRecommendationsReceivedCommand, + serializeAws_restJson1NotifyRecommendationsReceivedCommand, +} from "../protocols/Aws_restJson1"; +import { ServiceInputTypes, ServiceOutputTypes, WisdomClientResolvedConfig } from "../WisdomClient"; + +export interface NotifyRecommendationsReceivedCommandInput extends NotifyRecommendationsReceivedRequest {} +export interface NotifyRecommendationsReceivedCommandOutput + extends NotifyRecommendationsReceivedResponse, + __MetadataBearer {} + +/** + *

                  Removes the specified recommendations from the specified assistant's queue of newly + * available recommendations. You can use this API in conjunction with GetRecommendations and a waitTimeSeconds input for long-polling + * behavior and avoiding duplicate recommendations.

                  + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { WisdomClient, NotifyRecommendationsReceivedCommand } from "@aws-sdk/client-wisdom"; // ES Modules import + * // const { WisdomClient, NotifyRecommendationsReceivedCommand } = require("@aws-sdk/client-wisdom"); // CommonJS import + * const client = new WisdomClient(config); + * const command = new NotifyRecommendationsReceivedCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link NotifyRecommendationsReceivedCommandInput} for command's `input` shape. + * @see {@link NotifyRecommendationsReceivedCommandOutput} for command's `response` shape. + * @see {@link WisdomClientResolvedConfig | config} for command's `input` shape. + * + */ +export class NotifyRecommendationsReceivedCommand extends $Command< + NotifyRecommendationsReceivedCommandInput, + NotifyRecommendationsReceivedCommandOutput, + WisdomClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: NotifyRecommendationsReceivedCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WisdomClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "WisdomClient"; + const commandName = "NotifyRecommendationsReceivedCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: NotifyRecommendationsReceivedRequest.filterSensitiveLog, + outputFilterSensitiveLog: NotifyRecommendationsReceivedResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: NotifyRecommendationsReceivedCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1NotifyRecommendationsReceivedCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return deserializeAws_restJson1NotifyRecommendationsReceivedCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-wisdom/src/commands/QueryAssistantCommand.ts b/clients/client-wisdom/src/commands/QueryAssistantCommand.ts new file mode 100644 index 0000000000000..f795ee5dd4645 --- /dev/null +++ b/clients/client-wisdom/src/commands/QueryAssistantCommand.ts @@ -0,0 +1,97 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { QueryAssistantRequest, QueryAssistantResponse } from "../models/models_0"; +import { + deserializeAws_restJson1QueryAssistantCommand, + serializeAws_restJson1QueryAssistantCommand, +} from "../protocols/Aws_restJson1"; +import { ServiceInputTypes, ServiceOutputTypes, WisdomClientResolvedConfig } from "../WisdomClient"; + +export interface QueryAssistantCommandInput extends QueryAssistantRequest {} +export interface QueryAssistantCommandOutput extends QueryAssistantResponse, __MetadataBearer {} + +/** + *

                  Performs a manual search against the specified assistant. To retrieve recommendations for + * an assistant, use GetRecommendations. + *

                  + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { WisdomClient, QueryAssistantCommand } from "@aws-sdk/client-wisdom"; // ES Modules import + * // const { WisdomClient, QueryAssistantCommand } = require("@aws-sdk/client-wisdom"); // CommonJS import + * const client = new WisdomClient(config); + * const command = new QueryAssistantCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link QueryAssistantCommandInput} for command's `input` shape. + * @see {@link QueryAssistantCommandOutput} for command's `response` shape. + * @see {@link WisdomClientResolvedConfig | config} for command's `input` shape. + * + */ +export class QueryAssistantCommand extends $Command< + QueryAssistantCommandInput, + QueryAssistantCommandOutput, + WisdomClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: QueryAssistantCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WisdomClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "WisdomClient"; + const commandName = "QueryAssistantCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: QueryAssistantRequest.filterSensitiveLog, + outputFilterSensitiveLog: QueryAssistantResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: QueryAssistantCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1QueryAssistantCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1QueryAssistantCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-wisdom/src/commands/RemoveKnowledgeBaseTemplateUriCommand.ts b/clients/client-wisdom/src/commands/RemoveKnowledgeBaseTemplateUriCommand.ts new file mode 100644 index 0000000000000..e88ccfc831b11 --- /dev/null +++ b/clients/client-wisdom/src/commands/RemoveKnowledgeBaseTemplateUriCommand.ts @@ -0,0 +1,103 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { RemoveKnowledgeBaseTemplateUriRequest, RemoveKnowledgeBaseTemplateUriResponse } from "../models/models_0"; +import { + deserializeAws_restJson1RemoveKnowledgeBaseTemplateUriCommand, + serializeAws_restJson1RemoveKnowledgeBaseTemplateUriCommand, +} from "../protocols/Aws_restJson1"; +import { ServiceInputTypes, ServiceOutputTypes, WisdomClientResolvedConfig } from "../WisdomClient"; + +export interface RemoveKnowledgeBaseTemplateUriCommandInput extends RemoveKnowledgeBaseTemplateUriRequest {} +export interface RemoveKnowledgeBaseTemplateUriCommandOutput + extends RemoveKnowledgeBaseTemplateUriResponse, + __MetadataBearer {} + +/** + *

                  Removes a URI template from a knowledge base.

                  + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { WisdomClient, RemoveKnowledgeBaseTemplateUriCommand } from "@aws-sdk/client-wisdom"; // ES Modules import + * // const { WisdomClient, RemoveKnowledgeBaseTemplateUriCommand } = require("@aws-sdk/client-wisdom"); // CommonJS import + * const client = new WisdomClient(config); + * const command = new RemoveKnowledgeBaseTemplateUriCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link RemoveKnowledgeBaseTemplateUriCommandInput} for command's `input` shape. + * @see {@link RemoveKnowledgeBaseTemplateUriCommandOutput} for command's `response` shape. + * @see {@link WisdomClientResolvedConfig | config} for command's `input` shape. + * + */ +export class RemoveKnowledgeBaseTemplateUriCommand extends $Command< + RemoveKnowledgeBaseTemplateUriCommandInput, + RemoveKnowledgeBaseTemplateUriCommandOutput, + WisdomClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: RemoveKnowledgeBaseTemplateUriCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WisdomClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "WisdomClient"; + const commandName = "RemoveKnowledgeBaseTemplateUriCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: RemoveKnowledgeBaseTemplateUriRequest.filterSensitiveLog, + outputFilterSensitiveLog: RemoveKnowledgeBaseTemplateUriResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: RemoveKnowledgeBaseTemplateUriCommandInput, + context: __SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1RemoveKnowledgeBaseTemplateUriCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return deserializeAws_restJson1RemoveKnowledgeBaseTemplateUriCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-wisdom/src/commands/SearchContentCommand.ts b/clients/client-wisdom/src/commands/SearchContentCommand.ts new file mode 100644 index 0000000000000..4e18a58915863 --- /dev/null +++ b/clients/client-wisdom/src/commands/SearchContentCommand.ts @@ -0,0 +1,96 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { SearchContentRequest, SearchContentResponse } from "../models/models_0"; +import { + deserializeAws_restJson1SearchContentCommand, + serializeAws_restJson1SearchContentCommand, +} from "../protocols/Aws_restJson1"; +import { ServiceInputTypes, ServiceOutputTypes, WisdomClientResolvedConfig } from "../WisdomClient"; + +export interface SearchContentCommandInput extends SearchContentRequest {} +export interface SearchContentCommandOutput extends SearchContentResponse, __MetadataBearer {} + +/** + *

                  Searches for content in a specified knowledge base. Can be used to get a specific content + * resource by its name.

                  + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { WisdomClient, SearchContentCommand } from "@aws-sdk/client-wisdom"; // ES Modules import + * // const { WisdomClient, SearchContentCommand } = require("@aws-sdk/client-wisdom"); // CommonJS import + * const client = new WisdomClient(config); + * const command = new SearchContentCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link SearchContentCommandInput} for command's `input` shape. + * @see {@link SearchContentCommandOutput} for command's `response` shape. + * @see {@link WisdomClientResolvedConfig | config} for command's `input` shape. + * + */ +export class SearchContentCommand extends $Command< + SearchContentCommandInput, + SearchContentCommandOutput, + WisdomClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: SearchContentCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WisdomClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "WisdomClient"; + const commandName = "SearchContentCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: SearchContentRequest.filterSensitiveLog, + outputFilterSensitiveLog: SearchContentResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: SearchContentCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1SearchContentCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1SearchContentCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-wisdom/src/commands/SearchSessionsCommand.ts b/clients/client-wisdom/src/commands/SearchSessionsCommand.ts new file mode 100644 index 0000000000000..d023d1c2b716e --- /dev/null +++ b/clients/client-wisdom/src/commands/SearchSessionsCommand.ts @@ -0,0 +1,95 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { SearchSessionsRequest, SearchSessionsResponse } from "../models/models_0"; +import { + deserializeAws_restJson1SearchSessionsCommand, + serializeAws_restJson1SearchSessionsCommand, +} from "../protocols/Aws_restJson1"; +import { ServiceInputTypes, ServiceOutputTypes, WisdomClientResolvedConfig } from "../WisdomClient"; + +export interface SearchSessionsCommandInput extends SearchSessionsRequest {} +export interface SearchSessionsCommandOutput extends SearchSessionsResponse, __MetadataBearer {} + +/** + *

                  Searches for sessions.

                  + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { WisdomClient, SearchSessionsCommand } from "@aws-sdk/client-wisdom"; // ES Modules import + * // const { WisdomClient, SearchSessionsCommand } = require("@aws-sdk/client-wisdom"); // CommonJS import + * const client = new WisdomClient(config); + * const command = new SearchSessionsCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link SearchSessionsCommandInput} for command's `input` shape. + * @see {@link SearchSessionsCommandOutput} for command's `response` shape. + * @see {@link WisdomClientResolvedConfig | config} for command's `input` shape. + * + */ +export class SearchSessionsCommand extends $Command< + SearchSessionsCommandInput, + SearchSessionsCommandOutput, + WisdomClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: SearchSessionsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WisdomClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "WisdomClient"; + const commandName = "SearchSessionsCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: SearchSessionsRequest.filterSensitiveLog, + outputFilterSensitiveLog: SearchSessionsResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: SearchSessionsCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1SearchSessionsCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1SearchSessionsCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-wisdom/src/commands/StartContentUploadCommand.ts b/clients/client-wisdom/src/commands/StartContentUploadCommand.ts new file mode 100644 index 0000000000000..e8c74088b5baa --- /dev/null +++ b/clients/client-wisdom/src/commands/StartContentUploadCommand.ts @@ -0,0 +1,98 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { StartContentUploadRequest, StartContentUploadResponse } from "../models/models_0"; +import { + deserializeAws_restJson1StartContentUploadCommand, + serializeAws_restJson1StartContentUploadCommand, +} from "../protocols/Aws_restJson1"; +import { ServiceInputTypes, ServiceOutputTypes, WisdomClientResolvedConfig } from "../WisdomClient"; + +export interface StartContentUploadCommandInput extends StartContentUploadRequest {} +export interface StartContentUploadCommandOutput extends StartContentUploadResponse, __MetadataBearer {} + +/** + *

                  Get a URL to upload content to a knowledge base. To upload content, first make a PUT + * request to the returned URL with your file, making sure to include the required headers. Then + * use CreateContent to finalize the content creation process or UpdateContent to modify an existing resource. You can only upload content to a + * knowledge base of type CUSTOM.

                  + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { WisdomClient, StartContentUploadCommand } from "@aws-sdk/client-wisdom"; // ES Modules import + * // const { WisdomClient, StartContentUploadCommand } = require("@aws-sdk/client-wisdom"); // CommonJS import + * const client = new WisdomClient(config); + * const command = new StartContentUploadCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link StartContentUploadCommandInput} for command's `input` shape. + * @see {@link StartContentUploadCommandOutput} for command's `response` shape. + * @see {@link WisdomClientResolvedConfig | config} for command's `input` shape. + * + */ +export class StartContentUploadCommand extends $Command< + StartContentUploadCommandInput, + StartContentUploadCommandOutput, + WisdomClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: StartContentUploadCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WisdomClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "WisdomClient"; + const commandName = "StartContentUploadCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: StartContentUploadRequest.filterSensitiveLog, + outputFilterSensitiveLog: StartContentUploadResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: StartContentUploadCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1StartContentUploadCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1StartContentUploadCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-wisdom/src/commands/TagResourceCommand.ts b/clients/client-wisdom/src/commands/TagResourceCommand.ts new file mode 100644 index 0000000000000..0d0c324f8ab65 --- /dev/null +++ b/clients/client-wisdom/src/commands/TagResourceCommand.ts @@ -0,0 +1,95 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { TagResourceRequest, TagResourceResponse } from "../models/models_0"; +import { + deserializeAws_restJson1TagResourceCommand, + serializeAws_restJson1TagResourceCommand, +} from "../protocols/Aws_restJson1"; +import { ServiceInputTypes, ServiceOutputTypes, WisdomClientResolvedConfig } from "../WisdomClient"; + +export interface TagResourceCommandInput extends TagResourceRequest {} +export interface TagResourceCommandOutput extends TagResourceResponse, __MetadataBearer {} + +/** + *

                  Adds the specified tags to the specified resource.

                  + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { WisdomClient, TagResourceCommand } from "@aws-sdk/client-wisdom"; // ES Modules import + * // const { WisdomClient, TagResourceCommand } = require("@aws-sdk/client-wisdom"); // CommonJS import + * const client = new WisdomClient(config); + * const command = new TagResourceCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link TagResourceCommandInput} for command's `input` shape. + * @see {@link TagResourceCommandOutput} for command's `response` shape. + * @see {@link WisdomClientResolvedConfig | config} for command's `input` shape. + * + */ +export class TagResourceCommand extends $Command< + TagResourceCommandInput, + TagResourceCommandOutput, + WisdomClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: TagResourceCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WisdomClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "WisdomClient"; + const commandName = "TagResourceCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: TagResourceRequest.filterSensitiveLog, + outputFilterSensitiveLog: TagResourceResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: TagResourceCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1TagResourceCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1TagResourceCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-wisdom/src/commands/UntagResourceCommand.ts b/clients/client-wisdom/src/commands/UntagResourceCommand.ts new file mode 100644 index 0000000000000..632fe3075bb98 --- /dev/null +++ b/clients/client-wisdom/src/commands/UntagResourceCommand.ts @@ -0,0 +1,95 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { UntagResourceRequest, UntagResourceResponse } from "../models/models_0"; +import { + deserializeAws_restJson1UntagResourceCommand, + serializeAws_restJson1UntagResourceCommand, +} from "../protocols/Aws_restJson1"; +import { ServiceInputTypes, ServiceOutputTypes, WisdomClientResolvedConfig } from "../WisdomClient"; + +export interface UntagResourceCommandInput extends UntagResourceRequest {} +export interface UntagResourceCommandOutput extends UntagResourceResponse, __MetadataBearer {} + +/** + *

                  Removes the specified tags from the specified resource.

                  + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { WisdomClient, UntagResourceCommand } from "@aws-sdk/client-wisdom"; // ES Modules import + * // const { WisdomClient, UntagResourceCommand } = require("@aws-sdk/client-wisdom"); // CommonJS import + * const client = new WisdomClient(config); + * const command = new UntagResourceCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link UntagResourceCommandInput} for command's `input` shape. + * @see {@link UntagResourceCommandOutput} for command's `response` shape. + * @see {@link WisdomClientResolvedConfig | config} for command's `input` shape. + * + */ +export class UntagResourceCommand extends $Command< + UntagResourceCommandInput, + UntagResourceCommandOutput, + WisdomClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: UntagResourceCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WisdomClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "WisdomClient"; + const commandName = "UntagResourceCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: UntagResourceRequest.filterSensitiveLog, + outputFilterSensitiveLog: UntagResourceResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: UntagResourceCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1UntagResourceCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1UntagResourceCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-wisdom/src/commands/UpdateContentCommand.ts b/clients/client-wisdom/src/commands/UpdateContentCommand.ts new file mode 100644 index 0000000000000..3017cc93abe4d --- /dev/null +++ b/clients/client-wisdom/src/commands/UpdateContentCommand.ts @@ -0,0 +1,95 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { UpdateContentRequest, UpdateContentResponse } from "../models/models_0"; +import { + deserializeAws_restJson1UpdateContentCommand, + serializeAws_restJson1UpdateContentCommand, +} from "../protocols/Aws_restJson1"; +import { ServiceInputTypes, ServiceOutputTypes, WisdomClientResolvedConfig } from "../WisdomClient"; + +export interface UpdateContentCommandInput extends UpdateContentRequest {} +export interface UpdateContentCommandOutput extends UpdateContentResponse, __MetadataBearer {} + +/** + *

                  Updates information about the content.

                  + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { WisdomClient, UpdateContentCommand } from "@aws-sdk/client-wisdom"; // ES Modules import + * // const { WisdomClient, UpdateContentCommand } = require("@aws-sdk/client-wisdom"); // CommonJS import + * const client = new WisdomClient(config); + * const command = new UpdateContentCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link UpdateContentCommandInput} for command's `input` shape. + * @see {@link UpdateContentCommandOutput} for command's `response` shape. + * @see {@link WisdomClientResolvedConfig | config} for command's `input` shape. + * + */ +export class UpdateContentCommand extends $Command< + UpdateContentCommandInput, + UpdateContentCommandOutput, + WisdomClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: UpdateContentCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WisdomClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "WisdomClient"; + const commandName = "UpdateContentCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: UpdateContentRequest.filterSensitiveLog, + outputFilterSensitiveLog: UpdateContentResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: UpdateContentCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1UpdateContentCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1UpdateContentCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-wisdom/src/commands/UpdateKnowledgeBaseTemplateUriCommand.ts b/clients/client-wisdom/src/commands/UpdateKnowledgeBaseTemplateUriCommand.ts new file mode 100644 index 0000000000000..45d731df76457 --- /dev/null +++ b/clients/client-wisdom/src/commands/UpdateKnowledgeBaseTemplateUriCommand.ts @@ -0,0 +1,108 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { UpdateKnowledgeBaseTemplateUriRequest, UpdateKnowledgeBaseTemplateUriResponse } from "../models/models_0"; +import { + deserializeAws_restJson1UpdateKnowledgeBaseTemplateUriCommand, + serializeAws_restJson1UpdateKnowledgeBaseTemplateUriCommand, +} from "../protocols/Aws_restJson1"; +import { ServiceInputTypes, ServiceOutputTypes, WisdomClientResolvedConfig } from "../WisdomClient"; + +export interface UpdateKnowledgeBaseTemplateUriCommandInput extends UpdateKnowledgeBaseTemplateUriRequest {} +export interface UpdateKnowledgeBaseTemplateUriCommandOutput + extends UpdateKnowledgeBaseTemplateUriResponse, + __MetadataBearer {} + +/** + *

                  Updates the template URI of a knowledge base. This is only supported for knowledge bases + * of type EXTERNAL. Include a single variable in ${variable} format; this + * interpolated by Wisdom using ingested content. For example, if you ingest a Salesforce + * article, it has an Id value, and you can set the template URI to + * https://myInstanceName.lightning.force.com/lightning/r/Knowledge__kav/*${Id}*\/view. + *

                  + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { WisdomClient, UpdateKnowledgeBaseTemplateUriCommand } from "@aws-sdk/client-wisdom"; // ES Modules import + * // const { WisdomClient, UpdateKnowledgeBaseTemplateUriCommand } = require("@aws-sdk/client-wisdom"); // CommonJS import + * const client = new WisdomClient(config); + * const command = new UpdateKnowledgeBaseTemplateUriCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link UpdateKnowledgeBaseTemplateUriCommandInput} for command's `input` shape. + * @see {@link UpdateKnowledgeBaseTemplateUriCommandOutput} for command's `response` shape. + * @see {@link WisdomClientResolvedConfig | config} for command's `input` shape. + * + */ +export class UpdateKnowledgeBaseTemplateUriCommand extends $Command< + UpdateKnowledgeBaseTemplateUriCommandInput, + UpdateKnowledgeBaseTemplateUriCommandOutput, + WisdomClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: UpdateKnowledgeBaseTemplateUriCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WisdomClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "WisdomClient"; + const commandName = "UpdateKnowledgeBaseTemplateUriCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: UpdateKnowledgeBaseTemplateUriRequest.filterSensitiveLog, + outputFilterSensitiveLog: UpdateKnowledgeBaseTemplateUriResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: UpdateKnowledgeBaseTemplateUriCommandInput, + context: __SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1UpdateKnowledgeBaseTemplateUriCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return deserializeAws_restJson1UpdateKnowledgeBaseTemplateUriCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-wisdom/src/endpoints.ts b/clients/client-wisdom/src/endpoints.ts new file mode 100644 index 0000000000000..774ff3ef8c714 --- /dev/null +++ b/clients/client-wisdom/src/endpoints.ts @@ -0,0 +1,57 @@ +import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; +import { RegionInfoProvider } from "@aws-sdk/types"; + +const regionHash: RegionHash = {}; + +const partitionHash: PartitionHash = { + aws: { + regions: [ + "af-south-1", + "ap-east-1", + "ap-northeast-1", + "ap-northeast-2", + "ap-northeast-3", + "ap-south-1", + "ap-southeast-1", + "ap-southeast-2", + "ca-central-1", + "eu-central-1", + "eu-north-1", + "eu-south-1", + "eu-west-1", + "eu-west-2", + "eu-west-3", + "me-south-1", + "sa-east-1", + "us-east-1", + "us-east-2", + "us-west-1", + "us-west-2", + ], + hostname: "wisdom.{region}.amazonaws.com", + }, + "aws-cn": { + regions: ["cn-north-1", "cn-northwest-1"], + hostname: "wisdom.{region}.amazonaws.com.cn", + }, + "aws-iso": { + regions: ["us-iso-east-1"], + hostname: "wisdom.{region}.c2s.ic.gov", + }, + "aws-iso-b": { + regions: ["us-isob-east-1"], + hostname: "wisdom.{region}.sc2s.sgov.gov", + }, + "aws-us-gov": { + regions: ["us-gov-east-1", "us-gov-west-1"], + hostname: "wisdom.{region}.amazonaws.com", + }, +}; + +export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => + getRegionInfo(region, { + ...options, + signingService: "wisdom", + regionHash, + partitionHash, + }); diff --git a/clients/client-wisdom/src/index.ts b/clients/client-wisdom/src/index.ts new file mode 100644 index 0000000000000..b5e34693251f5 --- /dev/null +++ b/clients/client-wisdom/src/index.ts @@ -0,0 +1,42 @@ +export * from "./WisdomClient"; +export * from "./Wisdom"; +export * from "./commands/CreateAssistantCommand"; +export * from "./commands/CreateAssistantAssociationCommand"; +export * from "./commands/CreateContentCommand"; +export * from "./commands/CreateKnowledgeBaseCommand"; +export * from "./commands/CreateSessionCommand"; +export * from "./commands/DeleteAssistantCommand"; +export * from "./commands/DeleteAssistantAssociationCommand"; +export * from "./commands/DeleteContentCommand"; +export * from "./commands/DeleteKnowledgeBaseCommand"; +export * from "./commands/GetAssistantCommand"; +export * from "./commands/GetAssistantAssociationCommand"; +export * from "./commands/GetContentCommand"; +export * from "./commands/GetContentSummaryCommand"; +export * from "./commands/GetKnowledgeBaseCommand"; +export * from "./commands/GetRecommendationsCommand"; +export * from "./commands/GetSessionCommand"; +export * from "./commands/ListAssistantAssociationsCommand"; +export * from "./pagination/ListAssistantAssociationsPaginator"; +export * from "./commands/ListAssistantsCommand"; +export * from "./pagination/ListAssistantsPaginator"; +export * from "./commands/ListContentsCommand"; +export * from "./pagination/ListContentsPaginator"; +export * from "./commands/ListKnowledgeBasesCommand"; +export * from "./pagination/ListKnowledgeBasesPaginator"; +export * from "./commands/ListTagsForResourceCommand"; +export * from "./commands/NotifyRecommendationsReceivedCommand"; +export * from "./commands/QueryAssistantCommand"; +export * from "./pagination/QueryAssistantPaginator"; +export * from "./commands/RemoveKnowledgeBaseTemplateUriCommand"; +export * from "./commands/SearchContentCommand"; +export * from "./pagination/SearchContentPaginator"; +export * from "./commands/SearchSessionsCommand"; +export * from "./pagination/SearchSessionsPaginator"; +export * from "./commands/StartContentUploadCommand"; +export * from "./commands/TagResourceCommand"; +export * from "./commands/UntagResourceCommand"; +export * from "./commands/UpdateContentCommand"; +export * from "./commands/UpdateKnowledgeBaseTemplateUriCommand"; +export * from "./pagination/Interfaces"; +export * from "./models/index"; diff --git a/clients/client-wisdom/src/models/index.ts b/clients/client-wisdom/src/models/index.ts new file mode 100644 index 0000000000000..09c5d6e09b8c5 --- /dev/null +++ b/clients/client-wisdom/src/models/index.ts @@ -0,0 +1 @@ +export * from "./models_0"; diff --git a/clients/client-wisdom/src/models/models_0.ts b/clients/client-wisdom/src/models/models_0.ts new file mode 100644 index 0000000000000..9077b41d51608 --- /dev/null +++ b/clients/client-wisdom/src/models/models_0.ts @@ -0,0 +1,2662 @@ +import { SENSITIVE_STRING } from "@aws-sdk/smithy-client"; +import { MetadataBearer as $MetadataBearer, SmithyException as __SmithyException } from "@aws-sdk/types"; + +/** + *

                  You do not have sufficient access to perform this action.

                  + */ +export interface AccessDeniedException extends __SmithyException, $MetadataBearer { + name: "AccessDeniedException"; + $fault: "client"; + message?: string; +} + +export namespace AccessDeniedException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: AccessDeniedException): any => ({ + ...obj, + }); +} + +/** + *

                  Configuration information for Amazon AppIntegrations to automatically ingest content.

                  + */ +export interface AppIntegrationsConfiguration { + /** + *

                  The Amazon Resource Name (ARN) of the AppIntegrations DataIntegration to use for ingesting content.

                  + */ + appIntegrationArn: string | undefined; + + /** + *

                  The fields from the source that are made available to your agents in Wisdom.

                  + *
                    + *
                  • + *

                    For Salesforce, you must include at least Id, + * ArticleNumber, VersionNumber, Title, + * PublishStatus, and IsDeleted.

                    + *
                  • + *
                  • + *

                    For ServiceNow, you must include at least number, + * short_description, sys_mod_count, workflow_state, + * and active.

                    + *
                  • + *
                  + *

                  Make sure to include additional field(s); these are indexed and used to source + * recommendations.

                  + */ + objectFields: string[] | undefined; +} + +export namespace AppIntegrationsConfiguration { + /** + * @internal + */ + export const filterSensitiveLog = (obj: AppIntegrationsConfiguration): any => ({ + ...obj, + }); +} + +/** + *

                  The request could not be processed because of conflict in the current state of the + * resource. For example, if you're using a Create API (such as + * CreateAssistant) that accepts name, a conflicting resource (usually with the + * same name) is being created or mutated.

                  + */ +export interface ConflictException extends __SmithyException, $MetadataBearer { + name: "ConflictException"; + $fault: "client"; + message?: string; +} + +export namespace ConflictException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ConflictException): any => ({ + ...obj, + }); +} + +/** + *

                  The data that is input into Wisdom as a result of the assistant association.

                  + */ +export type AssistantAssociationInputData = + | AssistantAssociationInputData.KnowledgeBaseIdMember + | AssistantAssociationInputData.$UnknownMember; + +export namespace AssistantAssociationInputData { + /** + *

                  The the identifier of the knowledge base.

                  + */ + export interface KnowledgeBaseIdMember { + knowledgeBaseId: string; + $unknown?: never; + } + + export interface $UnknownMember { + knowledgeBaseId?: never; + $unknown: [string, any]; + } + + export interface Visitor { + knowledgeBaseId: (value: string) => T; + _: (name: string, value: any) => T; + } + + export const visit = (value: AssistantAssociationInputData, visitor: Visitor): T => { + if (value.knowledgeBaseId !== undefined) return visitor.knowledgeBaseId(value.knowledgeBaseId); + return visitor._(value.$unknown[0], value.$unknown[1]); + }; + + /** + * @internal + */ + export const filterSensitiveLog = (obj: AssistantAssociationInputData): any => { + if (obj.knowledgeBaseId !== undefined) return { knowledgeBaseId: obj.knowledgeBaseId }; + if (obj.$unknown !== undefined) return { [obj.$unknown[0]]: "UNKNOWN" }; + }; +} + +export enum AssociationType { + KNOWLEDGE_BASE = "KNOWLEDGE_BASE", +} + +export interface CreateAssistantAssociationRequest { + /** + *

                  The identifier of the Wisdom assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

                  + */ + assistantId: string | undefined; + + /** + *

                  The type of association.

                  + */ + associationType: AssociationType | string | undefined; + + /** + *

                  The identifier of the associated resource.

                  + */ + association: AssistantAssociationInputData | undefined; + + /** + *

                  A unique, case-sensitive identifier that you provide to ensure the idempotency of the + * request.

                  + */ + clientToken?: string; + + /** + *

                  The tags used to organize, track, or control access for this resource.

                  + */ + tags?: { [key: string]: string }; +} + +export namespace CreateAssistantAssociationRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: CreateAssistantAssociationRequest): any => ({ + ...obj, + ...(obj.association && { association: AssistantAssociationInputData.filterSensitiveLog(obj.association) }), + }); +} + +/** + *

                  Association information about the knowledge base.

                  + */ +export interface KnowledgeBaseAssociationData { + /** + *

                  The the identifier of the knowledge base.

                  + */ + knowledgeBaseId?: string; + + /** + *

                  The Amazon Resource Name (ARN) of the knowledge base.

                  + */ + knowledgeBaseArn?: string; +} + +export namespace KnowledgeBaseAssociationData { + /** + * @internal + */ + export const filterSensitiveLog = (obj: KnowledgeBaseAssociationData): any => ({ + ...obj, + }); +} + +/** + *

                  The data that is output as a result of the assistant association.

                  + */ +export type AssistantAssociationOutputData = + | AssistantAssociationOutputData.KnowledgeBaseAssociationMember + | AssistantAssociationOutputData.$UnknownMember; + +export namespace AssistantAssociationOutputData { + /** + *

                  The knowledge base where output data is sent.

                  + */ + export interface KnowledgeBaseAssociationMember { + knowledgeBaseAssociation: KnowledgeBaseAssociationData; + $unknown?: never; + } + + export interface $UnknownMember { + knowledgeBaseAssociation?: never; + $unknown: [string, any]; + } + + export interface Visitor { + knowledgeBaseAssociation: (value: KnowledgeBaseAssociationData) => T; + _: (name: string, value: any) => T; + } + + export const visit = (value: AssistantAssociationOutputData, visitor: Visitor): T => { + if (value.knowledgeBaseAssociation !== undefined) + return visitor.knowledgeBaseAssociation(value.knowledgeBaseAssociation); + return visitor._(value.$unknown[0], value.$unknown[1]); + }; + + /** + * @internal + */ + export const filterSensitiveLog = (obj: AssistantAssociationOutputData): any => { + if (obj.knowledgeBaseAssociation !== undefined) + return { + knowledgeBaseAssociation: KnowledgeBaseAssociationData.filterSensitiveLog(obj.knowledgeBaseAssociation), + }; + if (obj.$unknown !== undefined) return { [obj.$unknown[0]]: "UNKNOWN" }; + }; +} + +/** + *

                  Information about the assistant association.

                  + */ +export interface AssistantAssociationData { + /** + *

                  The identifier of the assistant association.

                  + */ + assistantAssociationId: string | undefined; + + /** + *

                  The Amazon Resource Name (ARN) of the assistant association.

                  + */ + assistantAssociationArn: string | undefined; + + /** + *

                  The identifier of the Wisdom assistant.

                  + */ + assistantId: string | undefined; + + /** + *

                  The Amazon Resource Name (ARN) of the Wisdom assistant

                  + */ + assistantArn: string | undefined; + + /** + *

                  The type of association.

                  + */ + associationType: AssociationType | string | undefined; + + /** + *

                  A union type that currently has a single argument, the knowledge base ID.

                  + */ + associationData: AssistantAssociationOutputData | undefined; + + /** + *

                  The tags used to organize, track, or control access for this resource.

                  + */ + tags?: { [key: string]: string }; +} + +export namespace AssistantAssociationData { + /** + * @internal + */ + export const filterSensitiveLog = (obj: AssistantAssociationData): any => ({ + ...obj, + ...(obj.associationData && { + associationData: AssistantAssociationOutputData.filterSensitiveLog(obj.associationData), + }), + }); +} + +export interface CreateAssistantAssociationResponse { + /** + *

                  The assistant association.

                  + */ + assistantAssociation?: AssistantAssociationData; +} + +export namespace CreateAssistantAssociationResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: CreateAssistantAssociationResponse): any => ({ + ...obj, + ...(obj.assistantAssociation && { + assistantAssociation: AssistantAssociationData.filterSensitiveLog(obj.assistantAssociation), + }), + }); +} + +/** + *

                  The specified resource does not exist.

                  + */ +export interface ResourceNotFoundException extends __SmithyException, $MetadataBearer { + name: "ResourceNotFoundException"; + $fault: "client"; + message?: string; + /** + *

                  The specified resource name.

                  + */ + resourceName?: string; +} + +export namespace ResourceNotFoundException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ResourceNotFoundException): any => ({ + ...obj, + }); +} + +/** + *

                  You've exceeded your service quota. To perform the requested action, remove some of the + * relevant resources, or use service quotas to request a service quota increase.

                  + */ +export interface ServiceQuotaExceededException extends __SmithyException, $MetadataBearer { + name: "ServiceQuotaExceededException"; + $fault: "client"; + message?: string; +} + +export namespace ServiceQuotaExceededException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ServiceQuotaExceededException): any => ({ + ...obj, + }); +} + +/** + *

                  The input fails to satisfy the constraints specified by an AWS service.

                  + */ +export interface ValidationException extends __SmithyException, $MetadataBearer { + name: "ValidationException"; + $fault: "client"; + message?: string; +} + +export namespace ValidationException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ValidationException): any => ({ + ...obj, + }); +} + +export interface DeleteAssistantAssociationRequest { + /** + *

                  The identifier of the assistant association. Can be either the ID or the ARN. URLs cannot contain the ARN.

                  + */ + assistantAssociationId: string | undefined; + + /** + *

                  The identifier of the Wisdom assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

                  + */ + assistantId: string | undefined; +} + +export namespace DeleteAssistantAssociationRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DeleteAssistantAssociationRequest): any => ({ + ...obj, + }); +} + +export interface DeleteAssistantAssociationResponse {} + +export namespace DeleteAssistantAssociationResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DeleteAssistantAssociationResponse): any => ({ + ...obj, + }); +} + +export interface GetAssistantAssociationRequest { + /** + *

                  The identifier of the assistant association. Can be either the ID or the ARN. URLs cannot contain the ARN.

                  + */ + assistantAssociationId: string | undefined; + + /** + *

                  The identifier of the Wisdom assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

                  + */ + assistantId: string | undefined; +} + +export namespace GetAssistantAssociationRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetAssistantAssociationRequest): any => ({ + ...obj, + }); +} + +export interface GetAssistantAssociationResponse { + /** + *

                  The assistant association.

                  + */ + assistantAssociation?: AssistantAssociationData; +} + +export namespace GetAssistantAssociationResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetAssistantAssociationResponse): any => ({ + ...obj, + ...(obj.assistantAssociation && { + assistantAssociation: AssistantAssociationData.filterSensitiveLog(obj.assistantAssociation), + }), + }); +} + +export interface ListAssistantAssociationsRequest { + /** + *

                  The token for the next set of results. Use the value returned in the previous + * response in the next request to retrieve the next set of results.

                  + */ + nextToken?: string; + + /** + *

                  The maximum number of results to return per page.

                  + */ + maxResults?: number; + + /** + *

                  The identifier of the Wisdom assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

                  + */ + assistantId: string | undefined; +} + +export namespace ListAssistantAssociationsRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ListAssistantAssociationsRequest): any => ({ + ...obj, + }); +} + +/** + *

                  Summary information about the assistant association.

                  + */ +export interface AssistantAssociationSummary { + /** + *

                  The identifier of the assistant association.

                  + */ + assistantAssociationId: string | undefined; + + /** + *

                  The Amazon Resource Name (ARN) of the assistant association.

                  + */ + assistantAssociationArn: string | undefined; + + /** + *

                  The identifier of the Wisdom assistant.

                  + */ + assistantId: string | undefined; + + /** + *

                  The Amazon Resource Name (ARN) of the Wisdom assistant

                  + */ + assistantArn: string | undefined; + + /** + *

                  The type of association.

                  + */ + associationType: AssociationType | string | undefined; + + /** + *

                  The association data.

                  + */ + associationData: AssistantAssociationOutputData | undefined; + + /** + *

                  The tags used to organize, track, or control access for this resource.

                  + */ + tags?: { [key: string]: string }; +} + +export namespace AssistantAssociationSummary { + /** + * @internal + */ + export const filterSensitiveLog = (obj: AssistantAssociationSummary): any => ({ + ...obj, + ...(obj.associationData && { + associationData: AssistantAssociationOutputData.filterSensitiveLog(obj.associationData), + }), + }); +} + +export interface ListAssistantAssociationsResponse { + /** + *

                  Summary information about assistant associations.

                  + */ + assistantAssociationSummaries: AssistantAssociationSummary[] | undefined; + + /** + *

                  If there are additional results, this is the token for the next set of results.

                  + */ + nextToken?: string; +} + +export namespace ListAssistantAssociationsResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ListAssistantAssociationsResponse): any => ({ + ...obj, + ...(obj.assistantAssociationSummaries && { + assistantAssociationSummaries: obj.assistantAssociationSummaries.map((item) => + AssistantAssociationSummary.filterSensitiveLog(item) + ), + }), + }); +} + +/** + *

                  The KMS key used for encryption.

                  + */ +export interface ServerSideEncryptionConfiguration { + /** + *

                  The KMS key. For information about valid ID values, see Key identifiers (KeyId) in the + * AWS Key Management Service Developer Guide.

                  + */ + kmsKeyId?: string; +} + +export namespace ServerSideEncryptionConfiguration { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ServerSideEncryptionConfiguration): any => ({ + ...obj, + }); +} + +export enum AssistantType { + AGENT = "AGENT", +} + +export interface CreateAssistantRequest { + /** + *

                  A unique, case-sensitive identifier that you provide to ensure the idempotency of the + * request.

                  + */ + clientToken?: string; + + /** + *

                  The name of the assistant.

                  + */ + name: string | undefined; + + /** + *

                  The type of assistant.

                  + */ + type: AssistantType | string | undefined; + + /** + *

                  The description of the assistant.

                  + */ + description?: string; + + /** + *

                  The tags used to organize, track, or control access for this resource.

                  + */ + tags?: { [key: string]: string }; + + /** + *

                  The KMS key used for encryption.

                  + */ + serverSideEncryptionConfiguration?: ServerSideEncryptionConfiguration; +} + +export namespace CreateAssistantRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: CreateAssistantRequest): any => ({ + ...obj, + }); +} + +export enum AssistantStatus { + ACTIVE = "ACTIVE", + CREATE_FAILED = "CREATE_FAILED", + CREATE_IN_PROGRESS = "CREATE_IN_PROGRESS", + DELETED = "DELETED", + DELETE_FAILED = "DELETE_FAILED", + DELETE_IN_PROGRESS = "DELETE_IN_PROGRESS", +} + +/** + *

                  The assistant data.

                  + */ +export interface AssistantData { + /** + *

                  The identifier of the Wisdom assistant.

                  + */ + assistantId: string | undefined; + + /** + *

                  The Amazon Resource Name (ARN) of the Wisdom assistant

                  + */ + assistantArn: string | undefined; + + /** + *

                  The name.

                  + */ + name: string | undefined; + + /** + *

                  The type of assistant.

                  + */ + type: AssistantType | string | undefined; + + /** + *

                  The status of the assistant.

                  + */ + status: AssistantStatus | string | undefined; + + /** + *

                  The description.

                  + */ + description?: string; + + /** + *

                  The tags used to organize, track, or control access for this resource.

                  + */ + tags?: { [key: string]: string }; + + /** + *

                  The KMS key used for encryption.

                  + */ + serverSideEncryptionConfiguration?: ServerSideEncryptionConfiguration; +} + +export namespace AssistantData { + /** + * @internal + */ + export const filterSensitiveLog = (obj: AssistantData): any => ({ + ...obj, + }); +} + +export interface CreateAssistantResponse { + /** + *

                  Information about the assistant.

                  + */ + assistant?: AssistantData; +} + +export namespace CreateAssistantResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: CreateAssistantResponse): any => ({ + ...obj, + }); +} + +export interface DeleteAssistantRequest { + /** + *

                  The identifier of the Wisdom assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

                  + */ + assistantId: string | undefined; +} + +export namespace DeleteAssistantRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DeleteAssistantRequest): any => ({ + ...obj, + }); +} + +export interface DeleteAssistantResponse {} + +export namespace DeleteAssistantResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DeleteAssistantResponse): any => ({ + ...obj, + }); +} + +export interface GetAssistantRequest { + /** + *

                  The identifier of the Wisdom assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

                  + */ + assistantId: string | undefined; +} + +export namespace GetAssistantRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetAssistantRequest): any => ({ + ...obj, + }); +} + +export interface GetAssistantResponse { + /** + *

                  Information about the assistant.

                  + */ + assistant?: AssistantData; +} + +export namespace GetAssistantResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetAssistantResponse): any => ({ + ...obj, + }); +} + +export interface GetRecommendationsRequest { + /** + *

                  The identifier of the Wisdom assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

                  + */ + assistantId: string | undefined; + + /** + *

                  The identifier of the session. Can be either the ID or the ARN. URLs cannot contain the ARN.

                  + */ + sessionId: string | undefined; + + /** + *

                  The maximum number of results to return per page.

                  + */ + maxResults?: number; + + /** + *

                  The duration (in seconds) for which the call waits for a recommendation to be made + * available before returning. If a recommendation is available, the call returns sooner than + * WaitTimeSeconds. If no messages are available and the wait time expires, the + * call returns successfully with an empty list.

                  + */ + waitTimeSeconds?: number; +} + +export namespace GetRecommendationsRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetRecommendationsRequest): any => ({ + ...obj, + }); +} + +/** + *

                  Reference information about the content.

                  + */ +export interface ContentReference { + /** + *

                  The Amazon Resource Name (ARN) of the knowledge base.

                  + */ + knowledgeBaseArn?: string; + + /** + *

                  The the identifier of the knowledge base.

                  + */ + knowledgeBaseId?: string; + + /** + *

                  The Amazon Resource Name (ARN) of the content.

                  + */ + contentArn?: string; + + /** + *

                  The identifier of the content.

                  + */ + contentId?: string; +} + +export namespace ContentReference { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ContentReference): any => ({ + ...obj, + }); +} + +/** + *

                  Offset specification to describe highlighting of document excerpts for rendering search + * results and recommendations.

                  + */ +export interface Highlight { + /** + *

                  The offset for the start of the highlight.

                  + */ + beginOffsetInclusive?: number; + + /** + *

                  The offset for the end of the highlight.

                  + */ + endOffsetExclusive?: number; +} + +export namespace Highlight { + /** + * @internal + */ + export const filterSensitiveLog = (obj: Highlight): any => ({ + ...obj, + }); +} + +/** + *

                  The text of the document.

                  + */ +export interface DocumentText { + /** + *

                  Text in the document.

                  + */ + text?: string; + + /** + *

                  Highlights in the document text.

                  + */ + highlights?: Highlight[]; +} + +export namespace DocumentText { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DocumentText): any => ({ + ...obj, + ...(obj.text && { text: SENSITIVE_STRING }), + }); +} + +/** + *

                  The document.

                  + */ +export interface Document { + /** + *

                  A reference to the content resource.

                  + */ + contentReference: ContentReference | undefined; + + /** + *

                  The title of the document.

                  + */ + title?: DocumentText; + + /** + *

                  The excerpt from the document.

                  + */ + excerpt?: DocumentText; +} + +export namespace Document { + /** + * @internal + */ + export const filterSensitiveLog = (obj: Document): any => ({ + ...obj, + ...(obj.title && { title: DocumentText.filterSensitiveLog(obj.title) }), + ...(obj.excerpt && { excerpt: DocumentText.filterSensitiveLog(obj.excerpt) }), + }); +} + +export enum RelevanceLevel { + HIGH = "HIGH", + LOW = "LOW", + MEDIUM = "MEDIUM", +} + +/** + *

                  Information about the recommendation.

                  + */ +export interface RecommendationData { + /** + *

                  The identifier of the recommendation.

                  + */ + recommendationId: string | undefined; + + /** + *

                  The recommended document.

                  + */ + document: Document | undefined; + + /** + *

                  The relevance score of the recommendation.

                  + */ + relevanceScore?: number; + + /** + *

                  The relevance level of the recommendation.

                  + */ + relevanceLevel?: RelevanceLevel | string; +} + +export namespace RecommendationData { + /** + * @internal + */ + export const filterSensitiveLog = (obj: RecommendationData): any => ({ + ...obj, + ...(obj.document && { document: Document.filterSensitiveLog(obj.document) }), + }); +} + +export interface GetRecommendationsResponse { + /** + *

                  The recommendations.

                  + */ + recommendations: RecommendationData[] | undefined; +} + +export namespace GetRecommendationsResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetRecommendationsResponse): any => ({ + ...obj, + ...(obj.recommendations && { + recommendations: obj.recommendations.map((item) => RecommendationData.filterSensitiveLog(item)), + }), + }); +} + +export interface ListAssistantsRequest { + /** + *

                  The token for the next set of results. Use the value returned in the previous + * response in the next request to retrieve the next set of results.

                  + */ + nextToken?: string; + + /** + *

                  The maximum number of results to return per page.

                  + */ + maxResults?: number; +} + +export namespace ListAssistantsRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ListAssistantsRequest): any => ({ + ...obj, + }); +} + +/** + *

                  Summary information about the assistant.

                  + */ +export interface AssistantSummary { + /** + *

                  The identifier of the Wisdom assistant.

                  + */ + assistantId: string | undefined; + + /** + *

                  The Amazon Resource Name (ARN) of the Wisdom assistant

                  + */ + assistantArn: string | undefined; + + /** + *

                  The name of the assistant.

                  + */ + name: string | undefined; + + /** + *

                  The type of the assistant.

                  + */ + type: AssistantType | string | undefined; + + /** + *

                  The status of the assistant.

                  + */ + status: AssistantStatus | string | undefined; + + /** + *

                  The description of the assistant.

                  + */ + description?: string; + + /** + *

                  The tags used to organize, track, or control access for this resource.

                  + */ + tags?: { [key: string]: string }; + + /** + *

                  The KMS key used for encryption.

                  + */ + serverSideEncryptionConfiguration?: ServerSideEncryptionConfiguration; +} + +export namespace AssistantSummary { + /** + * @internal + */ + export const filterSensitiveLog = (obj: AssistantSummary): any => ({ + ...obj, + }); +} + +export interface ListAssistantsResponse { + /** + *

                  Information about the assistants.

                  + */ + assistantSummaries: AssistantSummary[] | undefined; + + /** + *

                  If there are additional results, this is the token for the next set of results.

                  + */ + nextToken?: string; +} + +export namespace ListAssistantsResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ListAssistantsResponse): any => ({ + ...obj, + }); +} + +export interface NotifyRecommendationsReceivedRequest { + /** + *

                  The identifier of the Wisdom assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

                  + */ + assistantId: string | undefined; + + /** + *

                  The identifier of the session. Can be either the ID or the ARN. URLs cannot contain the ARN.

                  + */ + sessionId: string | undefined; + + /** + *

                  The identifiers of the recommendations.

                  + */ + recommendationIds: string[] | undefined; +} + +export namespace NotifyRecommendationsReceivedRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: NotifyRecommendationsReceivedRequest): any => ({ + ...obj, + }); +} + +/** + *

                  An error occurred when creating a recommendation.

                  + */ +export interface NotifyRecommendationsReceivedError { + /** + *

                  The identifier of the recommendation that is in error.

                  + */ + recommendationId?: string; + + /** + *

                  A recommendation is causing an error.

                  + */ + message?: string; +} + +export namespace NotifyRecommendationsReceivedError { + /** + * @internal + */ + export const filterSensitiveLog = (obj: NotifyRecommendationsReceivedError): any => ({ + ...obj, + }); +} + +export interface NotifyRecommendationsReceivedResponse { + /** + *

                  The identifiers of the recommendations.

                  + */ + recommendationIds?: string[]; + + /** + *

                  The identifiers of recommendations that are causing errors.

                  + */ + errors?: NotifyRecommendationsReceivedError[]; +} + +export namespace NotifyRecommendationsReceivedResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: NotifyRecommendationsReceivedResponse): any => ({ + ...obj, + }); +} + +export interface QueryAssistantRequest { + /** + *

                  The identifier of the Wisdom assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

                  + */ + assistantId: string | undefined; + + /** + *

                  The text to search for.

                  + */ + queryText: string | undefined; + + /** + *

                  The token for the next set of results. Use the value returned in the previous + * response in the next request to retrieve the next set of results.

                  + */ + nextToken?: string; + + /** + *

                  The maximum number of results to return per page.

                  + */ + maxResults?: number; +} + +export namespace QueryAssistantRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: QueryAssistantRequest): any => ({ + ...obj, + ...(obj.queryText && { queryText: SENSITIVE_STRING }), + }); +} + +/** + *

                  Information about the result.

                  + */ +export interface ResultData { + /** + *

                  The identifier of the result data.

                  + */ + resultId: string | undefined; + + /** + *

                  The document.

                  + */ + document: Document | undefined; + + /** + *

                  The relevance score of the results.

                  + */ + relevanceScore?: number; +} + +export namespace ResultData { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ResultData): any => ({ + ...obj, + ...(obj.document && { document: Document.filterSensitiveLog(obj.document) }), + }); +} + +export interface QueryAssistantResponse { + /** + *

                  The results of the query.

                  + */ + results: ResultData[] | undefined; + + /** + *

                  If there are additional results, this is the token for the next set of results.

                  + */ + nextToken?: string; +} + +export namespace QueryAssistantResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: QueryAssistantResponse): any => ({ + ...obj, + ...(obj.results && { results: obj.results.map((item) => ResultData.filterSensitiveLog(item)) }), + }); +} + +export enum FilterField { + NAME = "NAME", +} + +export enum FilterOperator { + EQUALS = "EQUALS", +} + +/** + *

                  A search filter.

                  + */ +export interface Filter { + /** + *

                  The field on which to filter.

                  + */ + field: FilterField | string | undefined; + + /** + *

                  The operator to use for comparing the field’s value with the provided value.

                  + */ + operator: FilterOperator | string | undefined; + + /** + *

                  The desired field value on which to filter.

                  + */ + value: string | undefined; +} + +export namespace Filter { + /** + * @internal + */ + export const filterSensitiveLog = (obj: Filter): any => ({ + ...obj, + }); +} + +/** + *

                  The search expression.

                  + */ +export interface SearchExpression { + /** + *

                  The search expression filters.

                  + */ + filters: Filter[] | undefined; +} + +export namespace SearchExpression { + /** + * @internal + */ + export const filterSensitiveLog = (obj: SearchExpression): any => ({ + ...obj, + }); +} + +export interface SearchSessionsRequest { + /** + *

                  The token for the next set of results. Use the value returned in the previous + * response in the next request to retrieve the next set of results.

                  + */ + nextToken?: string; + + /** + *

                  The maximum number of results to return per page.

                  + */ + maxResults?: number; + + /** + *

                  The identifier of the Wisdom assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

                  + */ + assistantId: string | undefined; + + /** + *

                  The search expression to filter results.

                  + */ + searchExpression: SearchExpression | undefined; +} + +export namespace SearchSessionsRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: SearchSessionsRequest): any => ({ + ...obj, + }); +} + +/** + *

                  Summary information about the session.

                  + */ +export interface SessionSummary { + /** + *

                  The identifier of the session.

                  + */ + sessionId: string | undefined; + + /** + *

                  The Amazon Resource Name (ARN) of the session.

                  + */ + sessionArn: string | undefined; + + /** + *

                  The identifier of the Wisdom assistant.

                  + */ + assistantId: string | undefined; + + /** + *

                  The Amazon Resource Name (ARN) of the Wisdom assistant

                  + */ + assistantArn: string | undefined; +} + +export namespace SessionSummary { + /** + * @internal + */ + export const filterSensitiveLog = (obj: SessionSummary): any => ({ + ...obj, + }); +} + +export interface SearchSessionsResponse { + /** + *

                  Summary information about the sessions.

                  + */ + sessionSummaries: SessionSummary[] | undefined; + + /** + *

                  If there are additional results, this is the token for the next set of results.

                  + */ + nextToken?: string; +} + +export namespace SearchSessionsResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: SearchSessionsResponse): any => ({ + ...obj, + }); +} + +export interface CreateSessionRequest { + /** + *

                  A unique, case-sensitive identifier that you provide to ensure the idempotency of the + * request.

                  + */ + clientToken?: string; + + /** + *

                  The identifier of the Wisdom assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

                  + */ + assistantId: string | undefined; + + /** + *

                  The name of the session.

                  + */ + name: string | undefined; + + /** + *

                  The description.

                  + */ + description?: string; + + /** + *

                  The tags used to organize, track, or control access for this resource.

                  + */ + tags?: { [key: string]: string }; +} + +export namespace CreateSessionRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: CreateSessionRequest): any => ({ + ...obj, + }); +} + +/** + *

                  Information about the session.

                  + */ +export interface SessionData { + /** + *

                  The Amazon Resource Name (ARN) of the session.

                  + */ + sessionArn: string | undefined; + + /** + *

                  The identifier of the session.

                  + */ + sessionId: string | undefined; + + /** + *

                  The name of the session.

                  + */ + name: string | undefined; + + /** + *

                  The description of the session.

                  + */ + description?: string; + + /** + *

                  The tags used to organize, track, or control access for this resource.

                  + */ + tags?: { [key: string]: string }; +} + +export namespace SessionData { + /** + * @internal + */ + export const filterSensitiveLog = (obj: SessionData): any => ({ + ...obj, + }); +} + +export interface CreateSessionResponse { + /** + *

                  The session.

                  + */ + session?: SessionData; +} + +export namespace CreateSessionResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: CreateSessionResponse): any => ({ + ...obj, + }); +} + +export interface GetSessionRequest { + /** + *

                  The identifier of the Wisdom assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

                  + */ + assistantId: string | undefined; + + /** + *

                  The identifier of the session. Can be either the ID or the ARN. URLs cannot contain the ARN.

                  + */ + sessionId: string | undefined; +} + +export namespace GetSessionRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetSessionRequest): any => ({ + ...obj, + }); +} + +export interface GetSessionResponse { + /** + *

                  The session.

                  + */ + session?: SessionData; +} + +export namespace GetSessionResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetSessionResponse): any => ({ + ...obj, + }); +} + +export interface CreateContentRequest { + /** + *

                  The the identifier of the knowledge base. Can be either the ID or the ARN. URLs cannot contain the ARN.

                  + */ + knowledgeBaseId: string | undefined; + + /** + *

                  The name of the content. Each piece of content in a knowledge base must have a unique + * name. You can retrieve a piece of content using only its knowledge base and its name with the + * SearchContent API.

                  + */ + name: string | undefined; + + /** + *

                  The title of the content. If not set, the title is equal to the name.

                  + */ + title?: string; + + /** + *

                  The URI you want to use for the article. If the knowledge base has a templateUri, setting + * this argument overrides it for this piece of content.

                  + */ + overrideLinkOutUri?: string; + + /** + *

                  A key/value map to store attributes without affecting tagging or recommendations. + * For example, when synchronizing data between an external system and Wisdom, you can store an external version identifier as metadata to utilize for determining drift.

                  + */ + metadata?: { [key: string]: string }; + + /** + *

                  A pointer to the uploaded asset. This value is returned by StartContentUpload.

                  + */ + uploadId: string | undefined; + + /** + *

                  A unique, case-sensitive identifier that you provide to ensure the idempotency of the + * request.

                  + */ + clientToken?: string; + + /** + *

                  The tags used to organize, track, or control access for this resource.

                  + */ + tags?: { [key: string]: string }; +} + +export namespace CreateContentRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: CreateContentRequest): any => ({ + ...obj, + }); +} + +export enum ContentStatus { + ACTIVE = "ACTIVE", + CREATE_FAILED = "CREATE_FAILED", + CREATE_IN_PROGRESS = "CREATE_IN_PROGRESS", + DELETED = "DELETED", + DELETE_FAILED = "DELETE_FAILED", + DELETE_IN_PROGRESS = "DELETE_IN_PROGRESS", + UPDATE_FAILED = "UPDATE_FAILED", +} + +/** + *

                  Information about the content.

                  + */ +export interface ContentData { + /** + *

                  The Amazon Resource Name (ARN) of the content.

                  + */ + contentArn: string | undefined; + + /** + *

                  The identifier of the content.

                  + */ + contentId: string | undefined; + + /** + *

                  The Amazon Resource Name (ARN) of the knowledge base.

                  + */ + knowledgeBaseArn: string | undefined; + + /** + *

                  The the identifier of the knowledge base.

                  + */ + knowledgeBaseId: string | undefined; + + /** + *

                  The name of the content.

                  + */ + name: string | undefined; + + /** + *

                  The identifier of the content revision.

                  + */ + revisionId: string | undefined; + + /** + *

                  The title of the content.

                  + */ + title: string | undefined; + + /** + *

                  The media type of the content.

                  + */ + contentType: string | undefined; + + /** + *

                  The status of the content.

                  + */ + status: ContentStatus | string | undefined; + + /** + *

                  A key/value map to store attributes without affecting tagging or recommendations. + * For example, when synchronizing data between an external system and Wisdom, you can store an external version identifier as metadata to utilize for determining drift.

                  + */ + metadata: { [key: string]: string } | undefined; + + /** + *

                  The tags used to organize, track, or control access for this resource.

                  + */ + tags?: { [key: string]: string }; + + /** + *

                  The URI of the content.

                  + */ + linkOutUri?: string; + + /** + *

                  The URL of the content.

                  + */ + url: string | undefined; + + /** + *

                  The expiration time of the URL as an epoch timestamp.

                  + */ + urlExpiry: Date | undefined; +} + +export namespace ContentData { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ContentData): any => ({ + ...obj, + ...(obj.url && { url: SENSITIVE_STRING }), + }); +} + +export interface CreateContentResponse { + /** + *

                  The content.

                  + */ + content?: ContentData; +} + +export namespace CreateContentResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: CreateContentResponse): any => ({ + ...obj, + ...(obj.content && { content: ContentData.filterSensitiveLog(obj.content) }), + }); +} + +export interface DeleteContentRequest { + /** + *

                  The the identifier of the knowledge base. Can be either the ID or the ARN. URLs cannot contain the ARN.

                  + */ + knowledgeBaseId: string | undefined; + + /** + *

                  The identifier of the content. Can be either the ID or the ARN. URLs cannot contain the ARN.

                  + */ + contentId: string | undefined; +} + +export namespace DeleteContentRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DeleteContentRequest): any => ({ + ...obj, + }); +} + +export interface DeleteContentResponse {} + +export namespace DeleteContentResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DeleteContentResponse): any => ({ + ...obj, + }); +} + +export interface GetContentRequest { + /** + *

                  The identifier of the content. Can be either the ID or the ARN. URLs cannot contain the ARN.

                  + */ + contentId: string | undefined; + + /** + *

                  The the identifier of the knowledge base. Can be either the ID or the ARN. URLs cannot contain the ARN.

                  + */ + knowledgeBaseId: string | undefined; +} + +export namespace GetContentRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetContentRequest): any => ({ + ...obj, + }); +} + +export interface GetContentResponse { + /** + *

                  The content.

                  + */ + content?: ContentData; +} + +export namespace GetContentResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetContentResponse): any => ({ + ...obj, + ...(obj.content && { content: ContentData.filterSensitiveLog(obj.content) }), + }); +} + +export interface GetContentSummaryRequest { + /** + *

                  The identifier of the content. Can be either the ID or the ARN. URLs cannot contain the ARN.

                  + */ + contentId: string | undefined; + + /** + *

                  The the identifier of the knowledge base. Can be either the ID or the ARN. URLs cannot contain the ARN.

                  + */ + knowledgeBaseId: string | undefined; +} + +export namespace GetContentSummaryRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetContentSummaryRequest): any => ({ + ...obj, + }); +} + +/** + *

                  Summary information about the content.

                  + */ +export interface ContentSummary { + /** + *

                  The Amazon Resource Name (ARN) of the content.

                  + */ + contentArn: string | undefined; + + /** + *

                  The identifier of the content.

                  + */ + contentId: string | undefined; + + /** + *

                  The Amazon Resource Name (ARN) of the knowledge base.

                  + */ + knowledgeBaseArn: string | undefined; + + /** + *

                  The the identifier of the knowledge base.

                  + */ + knowledgeBaseId: string | undefined; + + /** + *

                  The name of the content.

                  + */ + name: string | undefined; + + /** + *

                  The identifier of the revision of the content.

                  + */ + revisionId: string | undefined; + + /** + *

                  The title of the content.

                  + */ + title: string | undefined; + + /** + *

                  The media type of the content.

                  + */ + contentType: string | undefined; + + /** + *

                  The status of the content.

                  + */ + status: ContentStatus | string | undefined; + + /** + *

                  A key/value map to store attributes without affecting tagging or recommendations. + * For example, when synchronizing data between an external system and Wisdom, you can store an external version identifier as metadata to utilize for determining drift.

                  + */ + metadata: { [key: string]: string } | undefined; + + /** + *

                  The tags used to organize, track, or control access for this resource.

                  + */ + tags?: { [key: string]: string }; +} + +export namespace ContentSummary { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ContentSummary): any => ({ + ...obj, + }); +} + +export interface GetContentSummaryResponse { + /** + *

                  The content summary.

                  + */ + contentSummary?: ContentSummary; +} + +export namespace GetContentSummaryResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetContentSummaryResponse): any => ({ + ...obj, + }); +} + +export interface ListContentsRequest { + /** + *

                  The token for the next set of results. Use the value returned in the previous + * response in the next request to retrieve the next set of results.

                  + */ + nextToken?: string; + + /** + *

                  The maximum number of results to return per page.

                  + */ + maxResults?: number; + + /** + *

                  The the identifier of the knowledge base. Can be either the ID or the ARN. URLs cannot contain the ARN.

                  + */ + knowledgeBaseId: string | undefined; +} + +export namespace ListContentsRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ListContentsRequest): any => ({ + ...obj, + }); +} + +export interface ListContentsResponse { + /** + *

                  Information about the content.

                  + */ + contentSummaries: ContentSummary[] | undefined; + + /** + *

                  If there are additional results, this is the token for the next set of results.

                  + */ + nextToken?: string; +} + +export namespace ListContentsResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ListContentsResponse): any => ({ + ...obj, + }); +} + +/** + *

                  The provided revisionId does not match, indicating the content has been + * modified since it was last read.

                  + */ +export interface PreconditionFailedException extends __SmithyException, $MetadataBearer { + name: "PreconditionFailedException"; + $fault: "client"; + message?: string; +} + +export namespace PreconditionFailedException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: PreconditionFailedException): any => ({ + ...obj, + }); +} + +export interface UpdateContentRequest { + /** + *

                  The the identifier of the knowledge base. Can be either the ID or the ARN

                  + */ + knowledgeBaseId: string | undefined; + + /** + *

                  The identifier of the content. Can be either the ID or the ARN. URLs cannot contain the ARN.

                  + */ + contentId: string | undefined; + + /** + *

                  The revisionId of the content resource to update, taken from an earlier call + * to GetContent, GetContentSummary, SearchContent, or + * ListContents. If included, this argument acts as an optimistic lock to ensure + * content was not modified since it was last read. If it has been modified, this API throws a + * PreconditionFailedException.

                  + */ + revisionId?: string; + + /** + *

                  The title of the content.

                  + */ + title?: string; + + /** + *

                  The URI for the article. If the knowledge base has a templateUri, setting this argument + * overrides it for this piece of content. To remove an existing overrideLinkOurUri, + * exclude this argument and set removeOverrideLinkOutUri to true.

                  + */ + overrideLinkOutUri?: string; + + /** + *

                  Unset the existing overrideLinkOutUri if it exists.

                  + */ + removeOverrideLinkOutUri?: boolean; + + /** + *

                  A key/value map to store attributes without affecting tagging or recommendations. For + * example, when synchronizing data between an external system and Wisdom, you can store an + * external version identifier as metadata to utilize for determining drift.

                  + */ + metadata?: { [key: string]: string }; + + /** + *

                  A pointer to the uploaded asset. This value is returned by StartContentUpload. + *

                  + */ + uploadId?: string; +} + +export namespace UpdateContentRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UpdateContentRequest): any => ({ + ...obj, + }); +} + +export interface UpdateContentResponse { + /** + *

                  The content.

                  + */ + content?: ContentData; +} + +export namespace UpdateContentResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UpdateContentResponse): any => ({ + ...obj, + ...(obj.content && { content: ContentData.filterSensitiveLog(obj.content) }), + }); +} + +export enum KnowledgeBaseType { + CUSTOM = "CUSTOM", + EXTERNAL = "EXTERNAL", +} + +/** + *

                  Information about how to render the content.

                  + */ +export interface RenderingConfiguration { + /** + *

                  A URI template containing exactly one variable in ${variableName} format. + * This can only be set for EXTERNAL knowledge bases. For Salesforce and ServiceNow, + * the variable must be one of the following:

                  + *
                    + *
                  • + *

                    Salesforce: Id, ArticleNumber, VersionNumber, + * Title, PublishStatus, or IsDeleted + *

                    + *
                  • + *
                  • + *

                    ServiceNow: number, short_description, + * sys_mod_count, workflow_state, or active + *

                    + *
                  • + *
                  + * + *

                  The variable is replaced with the actual value for a piece of content when calling GetContent.

                  + */ + templateUri?: string; +} + +export namespace RenderingConfiguration { + /** + * @internal + */ + export const filterSensitiveLog = (obj: RenderingConfiguration): any => ({ + ...obj, + }); +} + +/** + *

                  Configuration information about the external data source.

                  + */ +export type SourceConfiguration = SourceConfiguration.AppIntegrationsMember | SourceConfiguration.$UnknownMember; + +export namespace SourceConfiguration { + /** + *

                  Configuration information for Amazon AppIntegrations to automatically ingest content.

                  + */ + export interface AppIntegrationsMember { + appIntegrations: AppIntegrationsConfiguration; + $unknown?: never; + } + + export interface $UnknownMember { + appIntegrations?: never; + $unknown: [string, any]; + } + + export interface Visitor { + appIntegrations: (value: AppIntegrationsConfiguration) => T; + _: (name: string, value: any) => T; + } + + export const visit = (value: SourceConfiguration, visitor: Visitor): T => { + if (value.appIntegrations !== undefined) return visitor.appIntegrations(value.appIntegrations); + return visitor._(value.$unknown[0], value.$unknown[1]); + }; + + /** + * @internal + */ + export const filterSensitiveLog = (obj: SourceConfiguration): any => { + if (obj.appIntegrations !== undefined) + return { appIntegrations: AppIntegrationsConfiguration.filterSensitiveLog(obj.appIntegrations) }; + if (obj.$unknown !== undefined) return { [obj.$unknown[0]]: "UNKNOWN" }; + }; +} + +export interface CreateKnowledgeBaseRequest { + /** + *

                  A unique, case-sensitive identifier that you provide to ensure the idempotency of the + * request.

                  + */ + clientToken?: string; + + /** + *

                  The name of the knowledge base.

                  + */ + name: string | undefined; + + /** + *

                  The type of knowledge base. Only CUSTOM knowledge bases allow you to upload your own content. + * EXTERNAL knowledge bases support integrations with third-party systems whose content is + * synchronized automatically.

                  + */ + knowledgeBaseType: KnowledgeBaseType | string | undefined; + + /** + *

                  The source of the knowledge base content. Only set this argument for EXTERNAL knowledge + * bases.

                  + */ + sourceConfiguration?: SourceConfiguration; + + /** + *

                  Information about how to render the content.

                  + */ + renderingConfiguration?: RenderingConfiguration; + + /** + *

                  The KMS key used for encryption.

                  + */ + serverSideEncryptionConfiguration?: ServerSideEncryptionConfiguration; + + /** + *

                  The description.

                  + */ + description?: string; + + /** + *

                  The tags used to organize, track, or control access for this resource.

                  + */ + tags?: { [key: string]: string }; +} + +export namespace CreateKnowledgeBaseRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: CreateKnowledgeBaseRequest): any => ({ + ...obj, + ...(obj.sourceConfiguration && { + sourceConfiguration: SourceConfiguration.filterSensitiveLog(obj.sourceConfiguration), + }), + }); +} + +export enum KnowledgeBaseStatus { + ACTIVE = "ACTIVE", + CREATE_FAILED = "CREATE_FAILED", + CREATE_IN_PROGRESS = "CREATE_IN_PROGRESS", + DELETED = "DELETED", + DELETE_FAILED = "DELETE_FAILED", + DELETE_IN_PROGRESS = "DELETE_IN_PROGRESS", +} + +/** + *

                  Information about the knowledge base.

                  + */ +export interface KnowledgeBaseData { + /** + *

                  The the identifier of the knowledge base.

                  + */ + knowledgeBaseId: string | undefined; + + /** + *

                  The Amazon Resource Name (ARN) of the knowledge base.

                  + */ + knowledgeBaseArn: string | undefined; + + /** + *

                  The name of the knowledge base.

                  + */ + name: string | undefined; + + /** + *

                  The type of knowledge base.

                  + */ + knowledgeBaseType: KnowledgeBaseType | string | undefined; + + /** + *

                  The status of the knowledge base.

                  + */ + status: KnowledgeBaseStatus | string | undefined; + + /** + *

                  An epoch timestamp indicating the most recent content modification inside the knowledge + * base. If no content exists in a knowledge base, this value is unset.

                  + */ + lastContentModificationTime?: Date; + + /** + *

                  Source configuration information about the knowledge base.

                  + */ + sourceConfiguration?: SourceConfiguration; + + /** + *

                  Information about how to render the content.

                  + */ + renderingConfiguration?: RenderingConfiguration; + + /** + *

                  The KMS key used for encryption.

                  + */ + serverSideEncryptionConfiguration?: ServerSideEncryptionConfiguration; + + /** + *

                  The description.

                  + */ + description?: string; + + /** + *

                  The tags used to organize, track, or control access for this resource.

                  + */ + tags?: { [key: string]: string }; +} + +export namespace KnowledgeBaseData { + /** + * @internal + */ + export const filterSensitiveLog = (obj: KnowledgeBaseData): any => ({ + ...obj, + ...(obj.sourceConfiguration && { + sourceConfiguration: SourceConfiguration.filterSensitiveLog(obj.sourceConfiguration), + }), + }); +} + +export interface CreateKnowledgeBaseResponse { + /** + *

                  The knowledge base.

                  + */ + knowledgeBase?: KnowledgeBaseData; +} + +export namespace CreateKnowledgeBaseResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: CreateKnowledgeBaseResponse): any => ({ + ...obj, + ...(obj.knowledgeBase && { knowledgeBase: KnowledgeBaseData.filterSensitiveLog(obj.knowledgeBase) }), + }); +} + +export interface DeleteKnowledgeBaseRequest { + /** + *

                  The knowledge base to delete content from. Can be either the ID or the ARN. URLs cannot contain the ARN.

                  + */ + knowledgeBaseId: string | undefined; +} + +export namespace DeleteKnowledgeBaseRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DeleteKnowledgeBaseRequest): any => ({ + ...obj, + }); +} + +export interface DeleteKnowledgeBaseResponse {} + +export namespace DeleteKnowledgeBaseResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DeleteKnowledgeBaseResponse): any => ({ + ...obj, + }); +} + +export interface GetKnowledgeBaseRequest { + /** + *

                  The the identifier of the knowledge base. Can be either the ID or the ARN. URLs cannot contain the ARN.

                  + */ + knowledgeBaseId: string | undefined; +} + +export namespace GetKnowledgeBaseRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetKnowledgeBaseRequest): any => ({ + ...obj, + }); +} + +export interface GetKnowledgeBaseResponse { + /** + *

                  The knowledge base.

                  + */ + knowledgeBase?: KnowledgeBaseData; +} + +export namespace GetKnowledgeBaseResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetKnowledgeBaseResponse): any => ({ + ...obj, + ...(obj.knowledgeBase && { knowledgeBase: KnowledgeBaseData.filterSensitiveLog(obj.knowledgeBase) }), + }); +} + +export interface ListKnowledgeBasesRequest { + /** + *

                  The token for the next set of results. Use the value returned in the previous + * response in the next request to retrieve the next set of results.

                  + */ + nextToken?: string; + + /** + *

                  The maximum number of results to return per page.

                  + */ + maxResults?: number; +} + +export namespace ListKnowledgeBasesRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ListKnowledgeBasesRequest): any => ({ + ...obj, + }); +} + +/** + *

                  Summary information about the knowledge base.

                  + */ +export interface KnowledgeBaseSummary { + /** + *

                  The the identifier of the knowledge base.

                  + */ + knowledgeBaseId: string | undefined; + + /** + *

                  The Amazon Resource Name (ARN) of the knowledge base.

                  + */ + knowledgeBaseArn: string | undefined; + + /** + *

                  The name of the knowledge base.

                  + */ + name: string | undefined; + + /** + *

                  The type of knowledge base.

                  + */ + knowledgeBaseType: KnowledgeBaseType | string | undefined; + + /** + *

                  The status of the knowledge base summary.

                  + */ + status: KnowledgeBaseStatus | string | undefined; + + /** + *

                  [KEVIN]

                  + */ + sourceConfiguration?: SourceConfiguration; + + /** + *

                  Information about how to render the content.

                  + */ + renderingConfiguration?: RenderingConfiguration; + + /** + *

                  The KMS key used for encryption.

                  + */ + serverSideEncryptionConfiguration?: ServerSideEncryptionConfiguration; + + /** + *

                  The description of the knowledge base.

                  + */ + description?: string; + + /** + *

                  The tags used to organize, track, or control access for this resource.

                  + */ + tags?: { [key: string]: string }; +} + +export namespace KnowledgeBaseSummary { + /** + * @internal + */ + export const filterSensitiveLog = (obj: KnowledgeBaseSummary): any => ({ + ...obj, + ...(obj.sourceConfiguration && { + sourceConfiguration: SourceConfiguration.filterSensitiveLog(obj.sourceConfiguration), + }), + }); +} + +export interface ListKnowledgeBasesResponse { + /** + *

                  Information about the knowledge bases.

                  + */ + knowledgeBaseSummaries: KnowledgeBaseSummary[] | undefined; + + /** + *

                  If there are additional results, this is the token for the next set of results.

                  + */ + nextToken?: string; +} + +export namespace ListKnowledgeBasesResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ListKnowledgeBasesResponse): any => ({ + ...obj, + ...(obj.knowledgeBaseSummaries && { + knowledgeBaseSummaries: obj.knowledgeBaseSummaries.map((item) => KnowledgeBaseSummary.filterSensitiveLog(item)), + }), + }); +} + +export interface RemoveKnowledgeBaseTemplateUriRequest { + /** + *

                  The the identifier of the knowledge base. Can be either the ID or the ARN. URLs cannot contain the ARN.

                  + */ + knowledgeBaseId: string | undefined; +} + +export namespace RemoveKnowledgeBaseTemplateUriRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: RemoveKnowledgeBaseTemplateUriRequest): any => ({ + ...obj, + }); +} + +export interface RemoveKnowledgeBaseTemplateUriResponse {} + +export namespace RemoveKnowledgeBaseTemplateUriResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: RemoveKnowledgeBaseTemplateUriResponse): any => ({ + ...obj, + }); +} + +export interface SearchContentRequest { + /** + *

                  The token for the next set of results. Use the value returned in the previous + * response in the next request to retrieve the next set of results.

                  + */ + nextToken?: string; + + /** + *

                  The maximum number of results to return per page.

                  + */ + maxResults?: number; + + /** + *

                  The the identifier of the knowledge base. Can be either the ID or the ARN. URLs cannot contain the ARN.

                  + */ + knowledgeBaseId: string | undefined; + + /** + *

                  The search expression to filter results.

                  + */ + searchExpression: SearchExpression | undefined; +} + +export namespace SearchContentRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: SearchContentRequest): any => ({ + ...obj, + }); +} + +export interface SearchContentResponse { + /** + *

                  Summary information about the content.

                  + */ + contentSummaries: ContentSummary[] | undefined; + + /** + *

                  If there are additional results, this is the token for the next set of results.

                  + */ + nextToken?: string; +} + +export namespace SearchContentResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: SearchContentResponse): any => ({ + ...obj, + }); +} + +export interface StartContentUploadRequest { + /** + *

                  The the identifier of the knowledge base. Can be either the ID or the ARN. URLs cannot contain the ARN.

                  + */ + knowledgeBaseId: string | undefined; + + /** + *

                  The type of content to upload.

                  + */ + contentType: string | undefined; +} + +export namespace StartContentUploadRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: StartContentUploadRequest): any => ({ + ...obj, + }); +} + +export interface StartContentUploadResponse { + /** + *

                  The identifier of the upload.

                  + */ + uploadId: string | undefined; + + /** + *

                  The URL of the upload.

                  + */ + url: string | undefined; + + /** + *

                  The expiration time of the URL as an epoch timestamp.

                  + */ + urlExpiry: Date | undefined; + + /** + *

                  The headers to include in the upload.

                  + */ + headersToInclude: { [key: string]: string } | undefined; +} + +export namespace StartContentUploadResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: StartContentUploadResponse): any => ({ + ...obj, + ...(obj.url && { url: SENSITIVE_STRING }), + }); +} + +export interface UpdateKnowledgeBaseTemplateUriRequest { + /** + *

                  The the identifier of the knowledge base. Can be either the ID or the ARN. URLs cannot contain the ARN.

                  + */ + knowledgeBaseId: string | undefined; + + /** + *

                  The template URI to update.

                  + */ + templateUri: string | undefined; +} + +export namespace UpdateKnowledgeBaseTemplateUriRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UpdateKnowledgeBaseTemplateUriRequest): any => ({ + ...obj, + }); +} + +export interface UpdateKnowledgeBaseTemplateUriResponse { + /** + *

                  The knowledge base to update.

                  + */ + knowledgeBase?: KnowledgeBaseData; +} + +export namespace UpdateKnowledgeBaseTemplateUriResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UpdateKnowledgeBaseTemplateUriResponse): any => ({ + ...obj, + ...(obj.knowledgeBase && { knowledgeBase: KnowledgeBaseData.filterSensitiveLog(obj.knowledgeBase) }), + }); +} + +export interface ListTagsForResourceRequest { + /** + *

                  The Amazon Resource Name (ARN) of the resource.

                  + */ + resourceArn: string | undefined; +} + +export namespace ListTagsForResourceRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ListTagsForResourceRequest): any => ({ + ...obj, + }); +} + +export interface ListTagsForResourceResponse { + /** + *

                  The tags used to organize, track, or control access for this resource.

                  + */ + tags?: { [key: string]: string }; +} + +export namespace ListTagsForResourceResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ListTagsForResourceResponse): any => ({ + ...obj, + }); +} + +export interface TagResourceRequest { + /** + *

                  The Amazon Resource Name (ARN) of the resource.

                  + */ + resourceArn: string | undefined; + + /** + *

                  The tags used to organize, track, or control access for this resource.

                  + */ + tags: { [key: string]: string } | undefined; +} + +export namespace TagResourceRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: TagResourceRequest): any => ({ + ...obj, + }); +} + +export interface TagResourceResponse {} + +export namespace TagResourceResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: TagResourceResponse): any => ({ + ...obj, + }); +} + +/** + *

                  Amazon Connect Wisdom throws this exception if you have too many tags in your tag set.

                  + */ +export interface TooManyTagsException extends __SmithyException, $MetadataBearer { + name: "TooManyTagsException"; + $fault: "client"; + message?: string; + /** + *

                  The specified resource name.

                  + */ + resourceName?: string; +} + +export namespace TooManyTagsException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: TooManyTagsException): any => ({ + ...obj, + }); +} + +export interface UntagResourceRequest { + /** + *

                  The Amazon Resource Name (ARN) of the resource.

                  + */ + resourceArn: string | undefined; + + /** + *

                  The tag keys.

                  + */ + tagKeys: string[] | undefined; +} + +export namespace UntagResourceRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UntagResourceRequest): any => ({ + ...obj, + }); +} + +export interface UntagResourceResponse {} + +export namespace UntagResourceResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UntagResourceResponse): any => ({ + ...obj, + }); +} diff --git a/clients/client-wisdom/src/pagination/Interfaces.ts b/clients/client-wisdom/src/pagination/Interfaces.ts new file mode 100644 index 0000000000000..41390ea2badf0 --- /dev/null +++ b/clients/client-wisdom/src/pagination/Interfaces.ts @@ -0,0 +1,8 @@ +import { PaginationConfiguration } from "@aws-sdk/types"; + +import { Wisdom } from "../Wisdom"; +import { WisdomClient } from "../WisdomClient"; + +export interface WisdomPaginationConfiguration extends PaginationConfiguration { + client: Wisdom | WisdomClient; +} diff --git a/clients/client-wisdom/src/pagination/ListAssistantAssociationsPaginator.ts b/clients/client-wisdom/src/pagination/ListAssistantAssociationsPaginator.ts new file mode 100644 index 0000000000000..c87023ccce90f --- /dev/null +++ b/clients/client-wisdom/src/pagination/ListAssistantAssociationsPaginator.ts @@ -0,0 +1,59 @@ +import { Paginator } from "@aws-sdk/types"; + +import { + ListAssistantAssociationsCommand, + ListAssistantAssociationsCommandInput, + ListAssistantAssociationsCommandOutput, +} from "../commands/ListAssistantAssociationsCommand"; +import { Wisdom } from "../Wisdom"; +import { WisdomClient } from "../WisdomClient"; +import { WisdomPaginationConfiguration } from "./Interfaces"; + +/** + * @private + */ +const makePagedClientRequest = async ( + client: WisdomClient, + input: ListAssistantAssociationsCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new ListAssistantAssociationsCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async ( + client: Wisdom, + input: ListAssistantAssociationsCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.listAssistantAssociations(input, ...args); +}; +export async function* paginateListAssistantAssociations( + config: WisdomPaginationConfiguration, + input: ListAssistantAssociationsCommandInput, + ...additionalArguments: any +): Paginator { + // ToDo: replace with actual type instead of typeof input.nextToken + let token: typeof input.nextToken | undefined = config.startingToken || undefined; + let hasNext = true; + let page: ListAssistantAssociationsCommandOutput; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof Wisdom) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } else if (config.client instanceof WisdomClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected Wisdom | WisdomClient"); + } + yield page; + token = page.nextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-wisdom/src/pagination/ListAssistantsPaginator.ts b/clients/client-wisdom/src/pagination/ListAssistantsPaginator.ts new file mode 100644 index 0000000000000..efb053f3100df --- /dev/null +++ b/clients/client-wisdom/src/pagination/ListAssistantsPaginator.ts @@ -0,0 +1,59 @@ +import { Paginator } from "@aws-sdk/types"; + +import { + ListAssistantsCommand, + ListAssistantsCommandInput, + ListAssistantsCommandOutput, +} from "../commands/ListAssistantsCommand"; +import { Wisdom } from "../Wisdom"; +import { WisdomClient } from "../WisdomClient"; +import { WisdomPaginationConfiguration } from "./Interfaces"; + +/** + * @private + */ +const makePagedClientRequest = async ( + client: WisdomClient, + input: ListAssistantsCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new ListAssistantsCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async ( + client: Wisdom, + input: ListAssistantsCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.listAssistants(input, ...args); +}; +export async function* paginateListAssistants( + config: WisdomPaginationConfiguration, + input: ListAssistantsCommandInput, + ...additionalArguments: any +): Paginator { + // ToDo: replace with actual type instead of typeof input.nextToken + let token: typeof input.nextToken | undefined = config.startingToken || undefined; + let hasNext = true; + let page: ListAssistantsCommandOutput; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof Wisdom) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } else if (config.client instanceof WisdomClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected Wisdom | WisdomClient"); + } + yield page; + token = page.nextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-wisdom/src/pagination/ListContentsPaginator.ts b/clients/client-wisdom/src/pagination/ListContentsPaginator.ts new file mode 100644 index 0000000000000..8abf38b8994f1 --- /dev/null +++ b/clients/client-wisdom/src/pagination/ListContentsPaginator.ts @@ -0,0 +1,59 @@ +import { Paginator } from "@aws-sdk/types"; + +import { + ListContentsCommand, + ListContentsCommandInput, + ListContentsCommandOutput, +} from "../commands/ListContentsCommand"; +import { Wisdom } from "../Wisdom"; +import { WisdomClient } from "../WisdomClient"; +import { WisdomPaginationConfiguration } from "./Interfaces"; + +/** + * @private + */ +const makePagedClientRequest = async ( + client: WisdomClient, + input: ListContentsCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new ListContentsCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async ( + client: Wisdom, + input: ListContentsCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.listContents(input, ...args); +}; +export async function* paginateListContents( + config: WisdomPaginationConfiguration, + input: ListContentsCommandInput, + ...additionalArguments: any +): Paginator { + // ToDo: replace with actual type instead of typeof input.nextToken + let token: typeof input.nextToken | undefined = config.startingToken || undefined; + let hasNext = true; + let page: ListContentsCommandOutput; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof Wisdom) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } else if (config.client instanceof WisdomClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected Wisdom | WisdomClient"); + } + yield page; + token = page.nextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-wisdom/src/pagination/ListKnowledgeBasesPaginator.ts b/clients/client-wisdom/src/pagination/ListKnowledgeBasesPaginator.ts new file mode 100644 index 0000000000000..af71865312158 --- /dev/null +++ b/clients/client-wisdom/src/pagination/ListKnowledgeBasesPaginator.ts @@ -0,0 +1,59 @@ +import { Paginator } from "@aws-sdk/types"; + +import { + ListKnowledgeBasesCommand, + ListKnowledgeBasesCommandInput, + ListKnowledgeBasesCommandOutput, +} from "../commands/ListKnowledgeBasesCommand"; +import { Wisdom } from "../Wisdom"; +import { WisdomClient } from "../WisdomClient"; +import { WisdomPaginationConfiguration } from "./Interfaces"; + +/** + * @private + */ +const makePagedClientRequest = async ( + client: WisdomClient, + input: ListKnowledgeBasesCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new ListKnowledgeBasesCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async ( + client: Wisdom, + input: ListKnowledgeBasesCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.listKnowledgeBases(input, ...args); +}; +export async function* paginateListKnowledgeBases( + config: WisdomPaginationConfiguration, + input: ListKnowledgeBasesCommandInput, + ...additionalArguments: any +): Paginator { + // ToDo: replace with actual type instead of typeof input.nextToken + let token: typeof input.nextToken | undefined = config.startingToken || undefined; + let hasNext = true; + let page: ListKnowledgeBasesCommandOutput; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof Wisdom) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } else if (config.client instanceof WisdomClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected Wisdom | WisdomClient"); + } + yield page; + token = page.nextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-wisdom/src/pagination/QueryAssistantPaginator.ts b/clients/client-wisdom/src/pagination/QueryAssistantPaginator.ts new file mode 100644 index 0000000000000..da3e9a9235160 --- /dev/null +++ b/clients/client-wisdom/src/pagination/QueryAssistantPaginator.ts @@ -0,0 +1,59 @@ +import { Paginator } from "@aws-sdk/types"; + +import { + QueryAssistantCommand, + QueryAssistantCommandInput, + QueryAssistantCommandOutput, +} from "../commands/QueryAssistantCommand"; +import { Wisdom } from "../Wisdom"; +import { WisdomClient } from "../WisdomClient"; +import { WisdomPaginationConfiguration } from "./Interfaces"; + +/** + * @private + */ +const makePagedClientRequest = async ( + client: WisdomClient, + input: QueryAssistantCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new QueryAssistantCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async ( + client: Wisdom, + input: QueryAssistantCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.queryAssistant(input, ...args); +}; +export async function* paginateQueryAssistant( + config: WisdomPaginationConfiguration, + input: QueryAssistantCommandInput, + ...additionalArguments: any +): Paginator { + // ToDo: replace with actual type instead of typeof input.nextToken + let token: typeof input.nextToken | undefined = config.startingToken || undefined; + let hasNext = true; + let page: QueryAssistantCommandOutput; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof Wisdom) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } else if (config.client instanceof WisdomClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected Wisdom | WisdomClient"); + } + yield page; + token = page.nextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-wisdom/src/pagination/SearchContentPaginator.ts b/clients/client-wisdom/src/pagination/SearchContentPaginator.ts new file mode 100644 index 0000000000000..9be6d500fef8b --- /dev/null +++ b/clients/client-wisdom/src/pagination/SearchContentPaginator.ts @@ -0,0 +1,59 @@ +import { Paginator } from "@aws-sdk/types"; + +import { + SearchContentCommand, + SearchContentCommandInput, + SearchContentCommandOutput, +} from "../commands/SearchContentCommand"; +import { Wisdom } from "../Wisdom"; +import { WisdomClient } from "../WisdomClient"; +import { WisdomPaginationConfiguration } from "./Interfaces"; + +/** + * @private + */ +const makePagedClientRequest = async ( + client: WisdomClient, + input: SearchContentCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new SearchContentCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async ( + client: Wisdom, + input: SearchContentCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.searchContent(input, ...args); +}; +export async function* paginateSearchContent( + config: WisdomPaginationConfiguration, + input: SearchContentCommandInput, + ...additionalArguments: any +): Paginator { + // ToDo: replace with actual type instead of typeof input.nextToken + let token: typeof input.nextToken | undefined = config.startingToken || undefined; + let hasNext = true; + let page: SearchContentCommandOutput; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof Wisdom) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } else if (config.client instanceof WisdomClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected Wisdom | WisdomClient"); + } + yield page; + token = page.nextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-wisdom/src/pagination/SearchSessionsPaginator.ts b/clients/client-wisdom/src/pagination/SearchSessionsPaginator.ts new file mode 100644 index 0000000000000..d1605c3658c9d --- /dev/null +++ b/clients/client-wisdom/src/pagination/SearchSessionsPaginator.ts @@ -0,0 +1,59 @@ +import { Paginator } from "@aws-sdk/types"; + +import { + SearchSessionsCommand, + SearchSessionsCommandInput, + SearchSessionsCommandOutput, +} from "../commands/SearchSessionsCommand"; +import { Wisdom } from "../Wisdom"; +import { WisdomClient } from "../WisdomClient"; +import { WisdomPaginationConfiguration } from "./Interfaces"; + +/** + * @private + */ +const makePagedClientRequest = async ( + client: WisdomClient, + input: SearchSessionsCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new SearchSessionsCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async ( + client: Wisdom, + input: SearchSessionsCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.searchSessions(input, ...args); +}; +export async function* paginateSearchSessions( + config: WisdomPaginationConfiguration, + input: SearchSessionsCommandInput, + ...additionalArguments: any +): Paginator { + // ToDo: replace with actual type instead of typeof input.nextToken + let token: typeof input.nextToken | undefined = config.startingToken || undefined; + let hasNext = true; + let page: SearchSessionsCommandOutput; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof Wisdom) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } else if (config.client instanceof WisdomClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected Wisdom | WisdomClient"); + } + yield page; + token = page.nextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-wisdom/src/protocols/Aws_restJson1.ts b/clients/client-wisdom/src/protocols/Aws_restJson1.ts new file mode 100644 index 0000000000000..7c647ecd47535 --- /dev/null +++ b/clients/client-wisdom/src/protocols/Aws_restJson1.ts @@ -0,0 +1,4293 @@ +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { + expectInt32 as __expectInt32, + expectNonNull as __expectNonNull, + expectNumber as __expectNumber, + expectObject as __expectObject, + expectString as __expectString, + expectUnion as __expectUnion, + extendedEncodeURIComponent as __extendedEncodeURIComponent, + limitedParseDouble as __limitedParseDouble, + parseEpochTimestamp as __parseEpochTimestamp, +} from "@aws-sdk/smithy-client"; +import { + Endpoint as __Endpoint, + MetadataBearer as __MetadataBearer, + ResponseMetadata as __ResponseMetadata, + SerdeContext as __SerdeContext, + SmithyException as __SmithyException, +} from "@aws-sdk/types"; +import { v4 as generateIdempotencyToken } from "uuid"; + +import { + CreateAssistantAssociationCommandInput, + CreateAssistantAssociationCommandOutput, +} from "../commands/CreateAssistantAssociationCommand"; +import { CreateAssistantCommandInput, CreateAssistantCommandOutput } from "../commands/CreateAssistantCommand"; +import { CreateContentCommandInput, CreateContentCommandOutput } from "../commands/CreateContentCommand"; +import { + CreateKnowledgeBaseCommandInput, + CreateKnowledgeBaseCommandOutput, +} from "../commands/CreateKnowledgeBaseCommand"; +import { CreateSessionCommandInput, CreateSessionCommandOutput } from "../commands/CreateSessionCommand"; +import { + DeleteAssistantAssociationCommandInput, + DeleteAssistantAssociationCommandOutput, +} from "../commands/DeleteAssistantAssociationCommand"; +import { DeleteAssistantCommandInput, DeleteAssistantCommandOutput } from "../commands/DeleteAssistantCommand"; +import { DeleteContentCommandInput, DeleteContentCommandOutput } from "../commands/DeleteContentCommand"; +import { + DeleteKnowledgeBaseCommandInput, + DeleteKnowledgeBaseCommandOutput, +} from "../commands/DeleteKnowledgeBaseCommand"; +import { + GetAssistantAssociationCommandInput, + GetAssistantAssociationCommandOutput, +} from "../commands/GetAssistantAssociationCommand"; +import { GetAssistantCommandInput, GetAssistantCommandOutput } from "../commands/GetAssistantCommand"; +import { GetContentCommandInput, GetContentCommandOutput } from "../commands/GetContentCommand"; +import { GetContentSummaryCommandInput, GetContentSummaryCommandOutput } from "../commands/GetContentSummaryCommand"; +import { GetKnowledgeBaseCommandInput, GetKnowledgeBaseCommandOutput } from "../commands/GetKnowledgeBaseCommand"; +import { GetRecommendationsCommandInput, GetRecommendationsCommandOutput } from "../commands/GetRecommendationsCommand"; +import { GetSessionCommandInput, GetSessionCommandOutput } from "../commands/GetSessionCommand"; +import { + ListAssistantAssociationsCommandInput, + ListAssistantAssociationsCommandOutput, +} from "../commands/ListAssistantAssociationsCommand"; +import { ListAssistantsCommandInput, ListAssistantsCommandOutput } from "../commands/ListAssistantsCommand"; +import { ListContentsCommandInput, ListContentsCommandOutput } from "../commands/ListContentsCommand"; +import { ListKnowledgeBasesCommandInput, ListKnowledgeBasesCommandOutput } from "../commands/ListKnowledgeBasesCommand"; +import { + ListTagsForResourceCommandInput, + ListTagsForResourceCommandOutput, +} from "../commands/ListTagsForResourceCommand"; +import { + NotifyRecommendationsReceivedCommandInput, + NotifyRecommendationsReceivedCommandOutput, +} from "../commands/NotifyRecommendationsReceivedCommand"; +import { QueryAssistantCommandInput, QueryAssistantCommandOutput } from "../commands/QueryAssistantCommand"; +import { + RemoveKnowledgeBaseTemplateUriCommandInput, + RemoveKnowledgeBaseTemplateUriCommandOutput, +} from "../commands/RemoveKnowledgeBaseTemplateUriCommand"; +import { SearchContentCommandInput, SearchContentCommandOutput } from "../commands/SearchContentCommand"; +import { SearchSessionsCommandInput, SearchSessionsCommandOutput } from "../commands/SearchSessionsCommand"; +import { StartContentUploadCommandInput, StartContentUploadCommandOutput } from "../commands/StartContentUploadCommand"; +import { TagResourceCommandInput, TagResourceCommandOutput } from "../commands/TagResourceCommand"; +import { UntagResourceCommandInput, UntagResourceCommandOutput } from "../commands/UntagResourceCommand"; +import { UpdateContentCommandInput, UpdateContentCommandOutput } from "../commands/UpdateContentCommand"; +import { + UpdateKnowledgeBaseTemplateUriCommandInput, + UpdateKnowledgeBaseTemplateUriCommandOutput, +} from "../commands/UpdateKnowledgeBaseTemplateUriCommand"; +import { + AccessDeniedException, + AppIntegrationsConfiguration, + AssistantAssociationData, + AssistantAssociationInputData, + AssistantAssociationOutputData, + AssistantAssociationSummary, + AssistantData, + AssistantSummary, + ConflictException, + ContentData, + ContentReference, + ContentSummary, + Document, + DocumentText, + Filter, + Highlight, + KnowledgeBaseAssociationData, + KnowledgeBaseData, + KnowledgeBaseSummary, + NotifyRecommendationsReceivedError, + PreconditionFailedException, + RecommendationData, + RenderingConfiguration, + ResourceNotFoundException, + ResultData, + SearchExpression, + ServerSideEncryptionConfiguration, + ServiceQuotaExceededException, + SessionData, + SessionSummary, + SourceConfiguration, + TooManyTagsException, + ValidationException, +} from "../models/models_0"; + +export const serializeAws_restJson1CreateAssistantCommand = async ( + input: CreateAssistantCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/assistants"; + let body: any; + body = JSON.stringify({ + clientToken: input.clientToken ?? generateIdempotencyToken(), + ...(input.description !== undefined && input.description !== null && { description: input.description }), + ...(input.name !== undefined && input.name !== null && { name: input.name }), + ...(input.serverSideEncryptionConfiguration !== undefined && + input.serverSideEncryptionConfiguration !== null && { + serverSideEncryptionConfiguration: serializeAws_restJson1ServerSideEncryptionConfiguration( + input.serverSideEncryptionConfiguration, + context + ), + }), + ...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_restJson1Tags(input.tags, context) }), + ...(input.type !== undefined && input.type !== null && { type: input.type }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1CreateAssistantAssociationCommand = async ( + input: CreateAssistantAssociationCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/assistants/{assistantId}/associations"; + if (input.assistantId !== undefined) { + const labelValue: string = input.assistantId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: assistantId."); + } + resolvedPath = resolvedPath.replace("{assistantId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: assistantId."); + } + let body: any; + body = JSON.stringify({ + ...(input.association !== undefined && + input.association !== null && { + association: serializeAws_restJson1AssistantAssociationInputData(input.association, context), + }), + ...(input.associationType !== undefined && + input.associationType !== null && { associationType: input.associationType }), + clientToken: input.clientToken ?? generateIdempotencyToken(), + ...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_restJson1Tags(input.tags, context) }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1CreateContentCommand = async ( + input: CreateContentCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/knowledgeBases/{knowledgeBaseId}/contents"; + if (input.knowledgeBaseId !== undefined) { + const labelValue: string = input.knowledgeBaseId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: knowledgeBaseId."); + } + resolvedPath = resolvedPath.replace("{knowledgeBaseId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: knowledgeBaseId."); + } + let body: any; + body = JSON.stringify({ + clientToken: input.clientToken ?? generateIdempotencyToken(), + ...(input.metadata !== undefined && + input.metadata !== null && { metadata: serializeAws_restJson1ContentMetadata(input.metadata, context) }), + ...(input.name !== undefined && input.name !== null && { name: input.name }), + ...(input.overrideLinkOutUri !== undefined && + input.overrideLinkOutUri !== null && { overrideLinkOutUri: input.overrideLinkOutUri }), + ...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_restJson1Tags(input.tags, context) }), + ...(input.title !== undefined && input.title !== null && { title: input.title }), + ...(input.uploadId !== undefined && input.uploadId !== null && { uploadId: input.uploadId }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1CreateKnowledgeBaseCommand = async ( + input: CreateKnowledgeBaseCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/knowledgeBases"; + let body: any; + body = JSON.stringify({ + clientToken: input.clientToken ?? generateIdempotencyToken(), + ...(input.description !== undefined && input.description !== null && { description: input.description }), + ...(input.knowledgeBaseType !== undefined && + input.knowledgeBaseType !== null && { knowledgeBaseType: input.knowledgeBaseType }), + ...(input.name !== undefined && input.name !== null && { name: input.name }), + ...(input.renderingConfiguration !== undefined && + input.renderingConfiguration !== null && { + renderingConfiguration: serializeAws_restJson1RenderingConfiguration(input.renderingConfiguration, context), + }), + ...(input.serverSideEncryptionConfiguration !== undefined && + input.serverSideEncryptionConfiguration !== null && { + serverSideEncryptionConfiguration: serializeAws_restJson1ServerSideEncryptionConfiguration( + input.serverSideEncryptionConfiguration, + context + ), + }), + ...(input.sourceConfiguration !== undefined && + input.sourceConfiguration !== null && { + sourceConfiguration: serializeAws_restJson1SourceConfiguration(input.sourceConfiguration, context), + }), + ...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_restJson1Tags(input.tags, context) }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1CreateSessionCommand = async ( + input: CreateSessionCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/assistants/{assistantId}/sessions"; + if (input.assistantId !== undefined) { + const labelValue: string = input.assistantId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: assistantId."); + } + resolvedPath = resolvedPath.replace("{assistantId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: assistantId."); + } + let body: any; + body = JSON.stringify({ + clientToken: input.clientToken ?? generateIdempotencyToken(), + ...(input.description !== undefined && input.description !== null && { description: input.description }), + ...(input.name !== undefined && input.name !== null && { name: input.name }), + ...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_restJson1Tags(input.tags, context) }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1DeleteAssistantCommand = async ( + input: DeleteAssistantCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/assistants/{assistantId}"; + if (input.assistantId !== undefined) { + const labelValue: string = input.assistantId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: assistantId."); + } + resolvedPath = resolvedPath.replace("{assistantId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: assistantId."); + } + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "DELETE", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1DeleteAssistantAssociationCommand = async ( + input: DeleteAssistantAssociationCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/assistants/{assistantId}/associations/{assistantAssociationId}"; + if (input.assistantAssociationId !== undefined) { + const labelValue: string = input.assistantAssociationId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: assistantAssociationId."); + } + resolvedPath = resolvedPath.replace("{assistantAssociationId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: assistantAssociationId."); + } + if (input.assistantId !== undefined) { + const labelValue: string = input.assistantId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: assistantId."); + } + resolvedPath = resolvedPath.replace("{assistantId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: assistantId."); + } + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "DELETE", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1DeleteContentCommand = async ( + input: DeleteContentCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/knowledgeBases/{knowledgeBaseId}/contents/{contentId}"; + if (input.knowledgeBaseId !== undefined) { + const labelValue: string = input.knowledgeBaseId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: knowledgeBaseId."); + } + resolvedPath = resolvedPath.replace("{knowledgeBaseId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: knowledgeBaseId."); + } + if (input.contentId !== undefined) { + const labelValue: string = input.contentId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: contentId."); + } + resolvedPath = resolvedPath.replace("{contentId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: contentId."); + } + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "DELETE", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1DeleteKnowledgeBaseCommand = async ( + input: DeleteKnowledgeBaseCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/knowledgeBases/{knowledgeBaseId}"; + if (input.knowledgeBaseId !== undefined) { + const labelValue: string = input.knowledgeBaseId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: knowledgeBaseId."); + } + resolvedPath = resolvedPath.replace("{knowledgeBaseId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: knowledgeBaseId."); + } + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "DELETE", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1GetAssistantCommand = async ( + input: GetAssistantCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/assistants/{assistantId}"; + if (input.assistantId !== undefined) { + const labelValue: string = input.assistantId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: assistantId."); + } + resolvedPath = resolvedPath.replace("{assistantId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: assistantId."); + } + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1GetAssistantAssociationCommand = async ( + input: GetAssistantAssociationCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/assistants/{assistantId}/associations/{assistantAssociationId}"; + if (input.assistantAssociationId !== undefined) { + const labelValue: string = input.assistantAssociationId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: assistantAssociationId."); + } + resolvedPath = resolvedPath.replace("{assistantAssociationId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: assistantAssociationId."); + } + if (input.assistantId !== undefined) { + const labelValue: string = input.assistantId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: assistantId."); + } + resolvedPath = resolvedPath.replace("{assistantId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: assistantId."); + } + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1GetContentCommand = async ( + input: GetContentCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/knowledgeBases/{knowledgeBaseId}/contents/{contentId}"; + if (input.contentId !== undefined) { + const labelValue: string = input.contentId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: contentId."); + } + resolvedPath = resolvedPath.replace("{contentId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: contentId."); + } + if (input.knowledgeBaseId !== undefined) { + const labelValue: string = input.knowledgeBaseId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: knowledgeBaseId."); + } + resolvedPath = resolvedPath.replace("{knowledgeBaseId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: knowledgeBaseId."); + } + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1GetContentSummaryCommand = async ( + input: GetContentSummaryCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/knowledgeBases/{knowledgeBaseId}/contents/{contentId}/summary"; + if (input.contentId !== undefined) { + const labelValue: string = input.contentId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: contentId."); + } + resolvedPath = resolvedPath.replace("{contentId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: contentId."); + } + if (input.knowledgeBaseId !== undefined) { + const labelValue: string = input.knowledgeBaseId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: knowledgeBaseId."); + } + resolvedPath = resolvedPath.replace("{knowledgeBaseId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: knowledgeBaseId."); + } + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1GetKnowledgeBaseCommand = async ( + input: GetKnowledgeBaseCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/knowledgeBases/{knowledgeBaseId}"; + if (input.knowledgeBaseId !== undefined) { + const labelValue: string = input.knowledgeBaseId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: knowledgeBaseId."); + } + resolvedPath = resolvedPath.replace("{knowledgeBaseId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: knowledgeBaseId."); + } + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1GetRecommendationsCommand = async ( + input: GetRecommendationsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/assistants/{assistantId}/sessions/{sessionId}/recommendations"; + if (input.assistantId !== undefined) { + const labelValue: string = input.assistantId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: assistantId."); + } + resolvedPath = resolvedPath.replace("{assistantId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: assistantId."); + } + if (input.sessionId !== undefined) { + const labelValue: string = input.sessionId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: sessionId."); + } + resolvedPath = resolvedPath.replace("{sessionId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: sessionId."); + } + const query: any = { + ...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }), + ...(input.waitTimeSeconds !== undefined && { waitTimeSeconds: input.waitTimeSeconds.toString() }), + }; + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; + +export const serializeAws_restJson1GetSessionCommand = async ( + input: GetSessionCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/assistants/{assistantId}/sessions/{sessionId}"; + if (input.assistantId !== undefined) { + const labelValue: string = input.assistantId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: assistantId."); + } + resolvedPath = resolvedPath.replace("{assistantId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: assistantId."); + } + if (input.sessionId !== undefined) { + const labelValue: string = input.sessionId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: sessionId."); + } + resolvedPath = resolvedPath.replace("{sessionId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: sessionId."); + } + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1ListAssistantAssociationsCommand = async ( + input: ListAssistantAssociationsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/assistants/{assistantId}/associations"; + if (input.assistantId !== undefined) { + const labelValue: string = input.assistantId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: assistantId."); + } + resolvedPath = resolvedPath.replace("{assistantId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: assistantId."); + } + const query: any = { + ...(input.nextToken !== undefined && { nextToken: input.nextToken }), + ...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }), + }; + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; + +export const serializeAws_restJson1ListAssistantsCommand = async ( + input: ListAssistantsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/assistants"; + const query: any = { + ...(input.nextToken !== undefined && { nextToken: input.nextToken }), + ...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }), + }; + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; + +export const serializeAws_restJson1ListContentsCommand = async ( + input: ListContentsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/knowledgeBases/{knowledgeBaseId}/contents"; + if (input.knowledgeBaseId !== undefined) { + const labelValue: string = input.knowledgeBaseId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: knowledgeBaseId."); + } + resolvedPath = resolvedPath.replace("{knowledgeBaseId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: knowledgeBaseId."); + } + const query: any = { + ...(input.nextToken !== undefined && { nextToken: input.nextToken }), + ...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }), + }; + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; + +export const serializeAws_restJson1ListKnowledgeBasesCommand = async ( + input: ListKnowledgeBasesCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/knowledgeBases"; + const query: any = { + ...(input.nextToken !== undefined && { nextToken: input.nextToken }), + ...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }), + }; + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; + +export const serializeAws_restJson1ListTagsForResourceCommand = async ( + input: ListTagsForResourceCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}"; + if (input.resourceArn !== undefined) { + const labelValue: string = input.resourceArn; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: resourceArn."); + } + resolvedPath = resolvedPath.replace("{resourceArn}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: resourceArn."); + } + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1NotifyRecommendationsReceivedCommand = async ( + input: NotifyRecommendationsReceivedCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/assistants/{assistantId}/sessions/{sessionId}/recommendations/notify"; + if (input.assistantId !== undefined) { + const labelValue: string = input.assistantId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: assistantId."); + } + resolvedPath = resolvedPath.replace("{assistantId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: assistantId."); + } + if (input.sessionId !== undefined) { + const labelValue: string = input.sessionId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: sessionId."); + } + resolvedPath = resolvedPath.replace("{sessionId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: sessionId."); + } + let body: any; + body = JSON.stringify({ + ...(input.recommendationIds !== undefined && + input.recommendationIds !== null && { + recommendationIds: serializeAws_restJson1RecommendationIdList(input.recommendationIds, context), + }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1QueryAssistantCommand = async ( + input: QueryAssistantCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/assistants/{assistantId}/query"; + if (input.assistantId !== undefined) { + const labelValue: string = input.assistantId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: assistantId."); + } + resolvedPath = resolvedPath.replace("{assistantId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: assistantId."); + } + let body: any; + body = JSON.stringify({ + ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }), + ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }), + ...(input.queryText !== undefined && input.queryText !== null && { queryText: input.queryText }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1RemoveKnowledgeBaseTemplateUriCommand = async ( + input: RemoveKnowledgeBaseTemplateUriCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/knowledgeBases/{knowledgeBaseId}/templateUri"; + if (input.knowledgeBaseId !== undefined) { + const labelValue: string = input.knowledgeBaseId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: knowledgeBaseId."); + } + resolvedPath = resolvedPath.replace("{knowledgeBaseId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: knowledgeBaseId."); + } + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "DELETE", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1SearchContentCommand = async ( + input: SearchContentCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/knowledgeBases/{knowledgeBaseId}/search"; + if (input.knowledgeBaseId !== undefined) { + const labelValue: string = input.knowledgeBaseId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: knowledgeBaseId."); + } + resolvedPath = resolvedPath.replace("{knowledgeBaseId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: knowledgeBaseId."); + } + const query: any = { + ...(input.nextToken !== undefined && { nextToken: input.nextToken }), + ...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }), + }; + let body: any; + body = JSON.stringify({ + ...(input.searchExpression !== undefined && + input.searchExpression !== null && { + searchExpression: serializeAws_restJson1SearchExpression(input.searchExpression, context), + }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + query, + body, + }); +}; + +export const serializeAws_restJson1SearchSessionsCommand = async ( + input: SearchSessionsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/assistants/{assistantId}/searchSessions"; + if (input.assistantId !== undefined) { + const labelValue: string = input.assistantId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: assistantId."); + } + resolvedPath = resolvedPath.replace("{assistantId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: assistantId."); + } + const query: any = { + ...(input.nextToken !== undefined && { nextToken: input.nextToken }), + ...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }), + }; + let body: any; + body = JSON.stringify({ + ...(input.searchExpression !== undefined && + input.searchExpression !== null && { + searchExpression: serializeAws_restJson1SearchExpression(input.searchExpression, context), + }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + query, + body, + }); +}; + +export const serializeAws_restJson1StartContentUploadCommand = async ( + input: StartContentUploadCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/knowledgeBases/{knowledgeBaseId}/upload"; + if (input.knowledgeBaseId !== undefined) { + const labelValue: string = input.knowledgeBaseId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: knowledgeBaseId."); + } + resolvedPath = resolvedPath.replace("{knowledgeBaseId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: knowledgeBaseId."); + } + let body: any; + body = JSON.stringify({ + ...(input.contentType !== undefined && input.contentType !== null && { contentType: input.contentType }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1TagResourceCommand = async ( + input: TagResourceCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}"; + if (input.resourceArn !== undefined) { + const labelValue: string = input.resourceArn; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: resourceArn."); + } + resolvedPath = resolvedPath.replace("{resourceArn}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: resourceArn."); + } + let body: any; + body = JSON.stringify({ + ...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_restJson1Tags(input.tags, context) }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1UntagResourceCommand = async ( + input: UntagResourceCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}"; + if (input.resourceArn !== undefined) { + const labelValue: string = input.resourceArn; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: resourceArn."); + } + resolvedPath = resolvedPath.replace("{resourceArn}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: resourceArn."); + } + const query: any = { + ...(input.tagKeys !== undefined && { tagKeys: (input.tagKeys || []).map((_entry) => _entry as any) }), + }; + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "DELETE", + headers, + path: resolvedPath, + query, + body, + }); +}; + +export const serializeAws_restJson1UpdateContentCommand = async ( + input: UpdateContentCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/knowledgeBases/{knowledgeBaseId}/contents/{contentId}"; + if (input.knowledgeBaseId !== undefined) { + const labelValue: string = input.knowledgeBaseId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: knowledgeBaseId."); + } + resolvedPath = resolvedPath.replace("{knowledgeBaseId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: knowledgeBaseId."); + } + if (input.contentId !== undefined) { + const labelValue: string = input.contentId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: contentId."); + } + resolvedPath = resolvedPath.replace("{contentId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: contentId."); + } + let body: any; + body = JSON.stringify({ + ...(input.metadata !== undefined && + input.metadata !== null && { metadata: serializeAws_restJson1ContentMetadata(input.metadata, context) }), + ...(input.overrideLinkOutUri !== undefined && + input.overrideLinkOutUri !== null && { overrideLinkOutUri: input.overrideLinkOutUri }), + ...(input.removeOverrideLinkOutUri !== undefined && + input.removeOverrideLinkOutUri !== null && { removeOverrideLinkOutUri: input.removeOverrideLinkOutUri }), + ...(input.revisionId !== undefined && input.revisionId !== null && { revisionId: input.revisionId }), + ...(input.title !== undefined && input.title !== null && { title: input.title }), + ...(input.uploadId !== undefined && input.uploadId !== null && { uploadId: input.uploadId }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1UpdateKnowledgeBaseTemplateUriCommand = async ( + input: UpdateKnowledgeBaseTemplateUriCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/knowledgeBases/{knowledgeBaseId}/templateUri"; + if (input.knowledgeBaseId !== undefined) { + const labelValue: string = input.knowledgeBaseId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: knowledgeBaseId."); + } + resolvedPath = resolvedPath.replace("{knowledgeBaseId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: knowledgeBaseId."); + } + let body: any; + body = JSON.stringify({ + ...(input.templateUri !== undefined && input.templateUri !== null && { templateUri: input.templateUri }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +export const deserializeAws_restJson1CreateAssistantCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1CreateAssistantCommandError(output, context); + } + const contents: CreateAssistantCommandOutput = { + $metadata: deserializeMetadata(output), + assistant: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.assistant !== undefined && data.assistant !== null) { + contents.assistant = deserializeAws_restJson1AssistantData(data.assistant, context); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1CreateAssistantCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.wisdom#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ConflictException": + case "com.amazonaws.wisdom#ConflictException": + response = { + ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceQuotaExceededException": + case "com.amazonaws.wisdom#ServiceQuotaExceededException": + response = { + ...(await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.wisdom#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1CreateAssistantAssociationCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1CreateAssistantAssociationCommandError(output, context); + } + const contents: CreateAssistantAssociationCommandOutput = { + $metadata: deserializeMetadata(output), + assistantAssociation: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.assistantAssociation !== undefined && data.assistantAssociation !== null) { + contents.assistantAssociation = deserializeAws_restJson1AssistantAssociationData( + data.assistantAssociation, + context + ); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1CreateAssistantAssociationCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.wisdom#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ConflictException": + case "com.amazonaws.wisdom#ConflictException": + response = { + ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.wisdom#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceQuotaExceededException": + case "com.amazonaws.wisdom#ServiceQuotaExceededException": + response = { + ...(await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.wisdom#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1CreateContentCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1CreateContentCommandError(output, context); + } + const contents: CreateContentCommandOutput = { + $metadata: deserializeMetadata(output), + content: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.content !== undefined && data.content !== null) { + contents.content = deserializeAws_restJson1ContentData(data.content, context); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1CreateContentCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.wisdom#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ConflictException": + case "com.amazonaws.wisdom#ConflictException": + response = { + ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.wisdom#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceQuotaExceededException": + case "com.amazonaws.wisdom#ServiceQuotaExceededException": + response = { + ...(await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.wisdom#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1CreateKnowledgeBaseCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1CreateKnowledgeBaseCommandError(output, context); + } + const contents: CreateKnowledgeBaseCommandOutput = { + $metadata: deserializeMetadata(output), + knowledgeBase: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.knowledgeBase !== undefined && data.knowledgeBase !== null) { + contents.knowledgeBase = deserializeAws_restJson1KnowledgeBaseData(data.knowledgeBase, context); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1CreateKnowledgeBaseCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.wisdom#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ConflictException": + case "com.amazonaws.wisdom#ConflictException": + response = { + ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceQuotaExceededException": + case "com.amazonaws.wisdom#ServiceQuotaExceededException": + response = { + ...(await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.wisdom#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1CreateSessionCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1CreateSessionCommandError(output, context); + } + const contents: CreateSessionCommandOutput = { + $metadata: deserializeMetadata(output), + session: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.session !== undefined && data.session !== null) { + contents.session = deserializeAws_restJson1SessionData(data.session, context); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1CreateSessionCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "ConflictException": + case "com.amazonaws.wisdom#ConflictException": + response = { + ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.wisdom#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.wisdom#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1DeleteAssistantCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 204 && output.statusCode >= 300) { + return deserializeAws_restJson1DeleteAssistantCommandError(output, context); + } + const contents: DeleteAssistantCommandOutput = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1DeleteAssistantCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.wisdom#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.wisdom#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.wisdom#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1DeleteAssistantAssociationCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 204 && output.statusCode >= 300) { + return deserializeAws_restJson1DeleteAssistantAssociationCommandError(output, context); + } + const contents: DeleteAssistantAssociationCommandOutput = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1DeleteAssistantAssociationCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.wisdom#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.wisdom#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.wisdom#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1DeleteContentCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 204 && output.statusCode >= 300) { + return deserializeAws_restJson1DeleteContentCommandError(output, context); + } + const contents: DeleteContentCommandOutput = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1DeleteContentCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.wisdom#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.wisdom#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.wisdom#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1DeleteKnowledgeBaseCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 204 && output.statusCode >= 300) { + return deserializeAws_restJson1DeleteKnowledgeBaseCommandError(output, context); + } + const contents: DeleteKnowledgeBaseCommandOutput = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1DeleteKnowledgeBaseCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.wisdom#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ConflictException": + case "com.amazonaws.wisdom#ConflictException": + response = { + ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.wisdom#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1GetAssistantCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1GetAssistantCommandError(output, context); + } + const contents: GetAssistantCommandOutput = { + $metadata: deserializeMetadata(output), + assistant: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.assistant !== undefined && data.assistant !== null) { + contents.assistant = deserializeAws_restJson1AssistantData(data.assistant, context); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1GetAssistantCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.wisdom#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.wisdom#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.wisdom#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1GetAssistantAssociationCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1GetAssistantAssociationCommandError(output, context); + } + const contents: GetAssistantAssociationCommandOutput = { + $metadata: deserializeMetadata(output), + assistantAssociation: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.assistantAssociation !== undefined && data.assistantAssociation !== null) { + contents.assistantAssociation = deserializeAws_restJson1AssistantAssociationData( + data.assistantAssociation, + context + ); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1GetAssistantAssociationCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.wisdom#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.wisdom#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.wisdom#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1GetContentCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1GetContentCommandError(output, context); + } + const contents: GetContentCommandOutput = { + $metadata: deserializeMetadata(output), + content: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.content !== undefined && data.content !== null) { + contents.content = deserializeAws_restJson1ContentData(data.content, context); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1GetContentCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.wisdom#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.wisdom#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.wisdom#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1GetContentSummaryCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1GetContentSummaryCommandError(output, context); + } + const contents: GetContentSummaryCommandOutput = { + $metadata: deserializeMetadata(output), + contentSummary: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.contentSummary !== undefined && data.contentSummary !== null) { + contents.contentSummary = deserializeAws_restJson1ContentSummary(data.contentSummary, context); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1GetContentSummaryCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.wisdom#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.wisdom#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.wisdom#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1GetKnowledgeBaseCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1GetKnowledgeBaseCommandError(output, context); + } + const contents: GetKnowledgeBaseCommandOutput = { + $metadata: deserializeMetadata(output), + knowledgeBase: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.knowledgeBase !== undefined && data.knowledgeBase !== null) { + contents.knowledgeBase = deserializeAws_restJson1KnowledgeBaseData(data.knowledgeBase, context); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1GetKnowledgeBaseCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.wisdom#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.wisdom#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.wisdom#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1GetRecommendationsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1GetRecommendationsCommandError(output, context); + } + const contents: GetRecommendationsCommandOutput = { + $metadata: deserializeMetadata(output), + recommendations: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.recommendations !== undefined && data.recommendations !== null) { + contents.recommendations = deserializeAws_restJson1RecommendationList(data.recommendations, context); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1GetRecommendationsCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.wisdom#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.wisdom#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.wisdom#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1GetSessionCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1GetSessionCommandError(output, context); + } + const contents: GetSessionCommandOutput = { + $metadata: deserializeMetadata(output), + session: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.session !== undefined && data.session !== null) { + contents.session = deserializeAws_restJson1SessionData(data.session, context); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1GetSessionCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.wisdom#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.wisdom#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.wisdom#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1ListAssistantAssociationsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1ListAssistantAssociationsCommandError(output, context); + } + const contents: ListAssistantAssociationsCommandOutput = { + $metadata: deserializeMetadata(output), + assistantAssociationSummaries: undefined, + nextToken: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.assistantAssociationSummaries !== undefined && data.assistantAssociationSummaries !== null) { + contents.assistantAssociationSummaries = deserializeAws_restJson1AssistantAssociationSummaryList( + data.assistantAssociationSummaries, + context + ); + } + if (data.nextToken !== undefined && data.nextToken !== null) { + contents.nextToken = __expectString(data.nextToken); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1ListAssistantAssociationsCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.wisdom#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.wisdom#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.wisdom#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1ListAssistantsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1ListAssistantsCommandError(output, context); + } + const contents: ListAssistantsCommandOutput = { + $metadata: deserializeMetadata(output), + assistantSummaries: undefined, + nextToken: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.assistantSummaries !== undefined && data.assistantSummaries !== null) { + contents.assistantSummaries = deserializeAws_restJson1AssistantList(data.assistantSummaries, context); + } + if (data.nextToken !== undefined && data.nextToken !== null) { + contents.nextToken = __expectString(data.nextToken); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1ListAssistantsCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.wisdom#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.wisdom#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1ListContentsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1ListContentsCommandError(output, context); + } + const contents: ListContentsCommandOutput = { + $metadata: deserializeMetadata(output), + contentSummaries: undefined, + nextToken: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.contentSummaries !== undefined && data.contentSummaries !== null) { + contents.contentSummaries = deserializeAws_restJson1ContentSummaryList(data.contentSummaries, context); + } + if (data.nextToken !== undefined && data.nextToken !== null) { + contents.nextToken = __expectString(data.nextToken); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1ListContentsCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.wisdom#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.wisdom#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.wisdom#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1ListKnowledgeBasesCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1ListKnowledgeBasesCommandError(output, context); + } + const contents: ListKnowledgeBasesCommandOutput = { + $metadata: deserializeMetadata(output), + knowledgeBaseSummaries: undefined, + nextToken: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.knowledgeBaseSummaries !== undefined && data.knowledgeBaseSummaries !== null) { + contents.knowledgeBaseSummaries = deserializeAws_restJson1KnowledgeBaseList(data.knowledgeBaseSummaries, context); + } + if (data.nextToken !== undefined && data.nextToken !== null) { + contents.nextToken = __expectString(data.nextToken); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1ListKnowledgeBasesCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.wisdom#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.wisdom#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1ListTagsForResourceCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1ListTagsForResourceCommandError(output, context); + } + const contents: ListTagsForResourceCommandOutput = { + $metadata: deserializeMetadata(output), + tags: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.tags !== undefined && data.tags !== null) { + contents.tags = deserializeAws_restJson1Tags(data.tags, context); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1ListTagsForResourceCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "ResourceNotFoundException": + case "com.amazonaws.wisdom#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1NotifyRecommendationsReceivedCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1NotifyRecommendationsReceivedCommandError(output, context); + } + const contents: NotifyRecommendationsReceivedCommandOutput = { + $metadata: deserializeMetadata(output), + errors: undefined, + recommendationIds: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.errors !== undefined && data.errors !== null) { + contents.errors = deserializeAws_restJson1NotifyRecommendationsReceivedErrorList(data.errors, context); + } + if (data.recommendationIds !== undefined && data.recommendationIds !== null) { + contents.recommendationIds = deserializeAws_restJson1RecommendationIdList(data.recommendationIds, context); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1NotifyRecommendationsReceivedCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.wisdom#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.wisdom#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.wisdom#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1QueryAssistantCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1QueryAssistantCommandError(output, context); + } + const contents: QueryAssistantCommandOutput = { + $metadata: deserializeMetadata(output), + nextToken: undefined, + results: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.nextToken !== undefined && data.nextToken !== null) { + contents.nextToken = __expectString(data.nextToken); + } + if (data.results !== undefined && data.results !== null) { + contents.results = deserializeAws_restJson1QueryResultsList(data.results, context); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1QueryAssistantCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.wisdom#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.wisdom#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.wisdom#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1RemoveKnowledgeBaseTemplateUriCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 204 && output.statusCode >= 300) { + return deserializeAws_restJson1RemoveKnowledgeBaseTemplateUriCommandError(output, context); + } + const contents: RemoveKnowledgeBaseTemplateUriCommandOutput = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1RemoveKnowledgeBaseTemplateUriCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.wisdom#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.wisdom#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.wisdom#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1SearchContentCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1SearchContentCommandError(output, context); + } + const contents: SearchContentCommandOutput = { + $metadata: deserializeMetadata(output), + contentSummaries: undefined, + nextToken: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.contentSummaries !== undefined && data.contentSummaries !== null) { + contents.contentSummaries = deserializeAws_restJson1ContentSummaryList(data.contentSummaries, context); + } + if (data.nextToken !== undefined && data.nextToken !== null) { + contents.nextToken = __expectString(data.nextToken); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1SearchContentCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.wisdom#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.wisdom#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.wisdom#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1SearchSessionsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1SearchSessionsCommandError(output, context); + } + const contents: SearchSessionsCommandOutput = { + $metadata: deserializeMetadata(output), + nextToken: undefined, + sessionSummaries: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.nextToken !== undefined && data.nextToken !== null) { + contents.nextToken = __expectString(data.nextToken); + } + if (data.sessionSummaries !== undefined && data.sessionSummaries !== null) { + contents.sessionSummaries = deserializeAws_restJson1SessionSummaries(data.sessionSummaries, context); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1SearchSessionsCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.wisdom#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.wisdom#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.wisdom#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1StartContentUploadCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1StartContentUploadCommandError(output, context); + } + const contents: StartContentUploadCommandOutput = { + $metadata: deserializeMetadata(output), + headersToInclude: undefined, + uploadId: undefined, + url: undefined, + urlExpiry: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.headersToInclude !== undefined && data.headersToInclude !== null) { + contents.headersToInclude = deserializeAws_restJson1Headers(data.headersToInclude, context); + } + if (data.uploadId !== undefined && data.uploadId !== null) { + contents.uploadId = __expectString(data.uploadId); + } + if (data.url !== undefined && data.url !== null) { + contents.url = __expectString(data.url); + } + if (data.urlExpiry !== undefined && data.urlExpiry !== null) { + contents.urlExpiry = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.urlExpiry))); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1StartContentUploadCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.wisdom#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.wisdom#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.wisdom#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1TagResourceCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1TagResourceCommandError(output, context); + } + const contents: TagResourceCommandOutput = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1TagResourceCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "ResourceNotFoundException": + case "com.amazonaws.wisdom#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyTagsException": + case "com.amazonaws.wisdom#TooManyTagsException": + response = { + ...(await deserializeAws_restJson1TooManyTagsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1UntagResourceCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1UntagResourceCommandError(output, context); + } + const contents: UntagResourceCommandOutput = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1UntagResourceCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "ResourceNotFoundException": + case "com.amazonaws.wisdom#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1UpdateContentCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1UpdateContentCommandError(output, context); + } + const contents: UpdateContentCommandOutput = { + $metadata: deserializeMetadata(output), + content: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.content !== undefined && data.content !== null) { + contents.content = deserializeAws_restJson1ContentData(data.content, context); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1UpdateContentCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.wisdom#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "PreconditionFailedException": + case "com.amazonaws.wisdom#PreconditionFailedException": + response = { + ...(await deserializeAws_restJson1PreconditionFailedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.wisdom#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.wisdom#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1UpdateKnowledgeBaseTemplateUriCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1UpdateKnowledgeBaseTemplateUriCommandError(output, context); + } + const contents: UpdateKnowledgeBaseTemplateUriCommandOutput = { + $metadata: deserializeMetadata(output), + knowledgeBase: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.knowledgeBase !== undefined && data.knowledgeBase !== null) { + contents.knowledgeBase = deserializeAws_restJson1KnowledgeBaseData(data.knowledgeBase, context); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1UpdateKnowledgeBaseTemplateUriCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.wisdom#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.wisdom#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.wisdom#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +const deserializeAws_restJson1AccessDeniedExceptionResponse = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const contents: AccessDeniedException = { + name: "AccessDeniedException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + message: undefined, + }; + const data: any = parsedOutput.body; + if (data.message !== undefined && data.message !== null) { + contents.message = __expectString(data.message); + } + return contents; +}; + +const deserializeAws_restJson1ConflictExceptionResponse = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const contents: ConflictException = { + name: "ConflictException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + message: undefined, + }; + const data: any = parsedOutput.body; + if (data.message !== undefined && data.message !== null) { + contents.message = __expectString(data.message); + } + return contents; +}; + +const deserializeAws_restJson1PreconditionFailedExceptionResponse = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const contents: PreconditionFailedException = { + name: "PreconditionFailedException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + message: undefined, + }; + const data: any = parsedOutput.body; + if (data.message !== undefined && data.message !== null) { + contents.message = __expectString(data.message); + } + return contents; +}; + +const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const contents: ResourceNotFoundException = { + name: "ResourceNotFoundException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + message: undefined, + resourceName: undefined, + }; + const data: any = parsedOutput.body; + if (data.message !== undefined && data.message !== null) { + contents.message = __expectString(data.message); + } + if (data.resourceName !== undefined && data.resourceName !== null) { + contents.resourceName = __expectString(data.resourceName); + } + return contents; +}; + +const deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const contents: ServiceQuotaExceededException = { + name: "ServiceQuotaExceededException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + message: undefined, + }; + const data: any = parsedOutput.body; + if (data.message !== undefined && data.message !== null) { + contents.message = __expectString(data.message); + } + return contents; +}; + +const deserializeAws_restJson1TooManyTagsExceptionResponse = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const contents: TooManyTagsException = { + name: "TooManyTagsException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + message: undefined, + resourceName: undefined, + }; + const data: any = parsedOutput.body; + if (data.message !== undefined && data.message !== null) { + contents.message = __expectString(data.message); + } + if (data.resourceName !== undefined && data.resourceName !== null) { + contents.resourceName = __expectString(data.resourceName); + } + return contents; +}; + +const deserializeAws_restJson1ValidationExceptionResponse = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const contents: ValidationException = { + name: "ValidationException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + message: undefined, + }; + const data: any = parsedOutput.body; + if (data.message !== undefined && data.message !== null) { + contents.message = __expectString(data.message); + } + return contents; +}; + +const serializeAws_restJson1AppIntegrationsConfiguration = ( + input: AppIntegrationsConfiguration, + context: __SerdeContext +): any => { + return { + ...(input.appIntegrationArn !== undefined && + input.appIntegrationArn !== null && { appIntegrationArn: input.appIntegrationArn }), + ...(input.objectFields !== undefined && + input.objectFields !== null && { + objectFields: serializeAws_restJson1ObjectFieldsList(input.objectFields, context), + }), + }; +}; + +const serializeAws_restJson1AssistantAssociationInputData = ( + input: AssistantAssociationInputData, + context: __SerdeContext +): any => { + return AssistantAssociationInputData.visit(input, { + knowledgeBaseId: (value) => ({ knowledgeBaseId: value }), + _: (name, value) => ({ name: value } as any), + }); +}; + +const serializeAws_restJson1ContentMetadata = (input: { [key: string]: string }, context: __SerdeContext): any => { + return Object.entries(input).reduce((acc: { [key: string]: any }, [key, value]: [string, any]) => { + if (value === null) { + return acc; + } + return { + ...acc, + [key]: value, + }; + }, {}); +}; + +const serializeAws_restJson1Filter = (input: Filter, context: __SerdeContext): any => { + return { + ...(input.field !== undefined && input.field !== null && { field: input.field }), + ...(input.operator !== undefined && input.operator !== null && { operator: input.operator }), + ...(input.value !== undefined && input.value !== null && { value: input.value }), + }; +}; + +const serializeAws_restJson1FilterList = (input: Filter[], context: __SerdeContext): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + if (entry === null) { + return null as any; + } + return serializeAws_restJson1Filter(entry, context); + }); +}; + +const serializeAws_restJson1ObjectFieldsList = (input: string[], context: __SerdeContext): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + if (entry === null) { + return null as any; + } + return entry; + }); +}; + +const serializeAws_restJson1RecommendationIdList = (input: string[], context: __SerdeContext): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + if (entry === null) { + return null as any; + } + return entry; + }); +}; + +const serializeAws_restJson1RenderingConfiguration = (input: RenderingConfiguration, context: __SerdeContext): any => { + return { + ...(input.templateUri !== undefined && input.templateUri !== null && { templateUri: input.templateUri }), + }; +}; + +const serializeAws_restJson1SearchExpression = (input: SearchExpression, context: __SerdeContext): any => { + return { + ...(input.filters !== undefined && + input.filters !== null && { filters: serializeAws_restJson1FilterList(input.filters, context) }), + }; +}; + +const serializeAws_restJson1ServerSideEncryptionConfiguration = ( + input: ServerSideEncryptionConfiguration, + context: __SerdeContext +): any => { + return { + ...(input.kmsKeyId !== undefined && input.kmsKeyId !== null && { kmsKeyId: input.kmsKeyId }), + }; +}; + +const serializeAws_restJson1SourceConfiguration = (input: SourceConfiguration, context: __SerdeContext): any => { + return SourceConfiguration.visit(input, { + appIntegrations: (value) => ({ + appIntegrations: serializeAws_restJson1AppIntegrationsConfiguration(value, context), + }), + _: (name, value) => ({ name: value } as any), + }); +}; + +const serializeAws_restJson1Tags = (input: { [key: string]: string }, context: __SerdeContext): any => { + return Object.entries(input).reduce((acc: { [key: string]: any }, [key, value]: [string, any]) => { + if (value === null) { + return acc; + } + return { + ...acc, + [key]: value, + }; + }, {}); +}; + +const deserializeAws_restJson1AppIntegrationsConfiguration = ( + output: any, + context: __SerdeContext +): AppIntegrationsConfiguration => { + return { + appIntegrationArn: __expectString(output.appIntegrationArn), + objectFields: + output.objectFields !== undefined && output.objectFields !== null + ? deserializeAws_restJson1ObjectFieldsList(output.objectFields, context) + : undefined, + } as any; +}; + +const deserializeAws_restJson1AssistantAssociationData = ( + output: any, + context: __SerdeContext +): AssistantAssociationData => { + return { + assistantArn: __expectString(output.assistantArn), + assistantAssociationArn: __expectString(output.assistantAssociationArn), + assistantAssociationId: __expectString(output.assistantAssociationId), + assistantId: __expectString(output.assistantId), + associationData: + output.associationData !== undefined && output.associationData !== null + ? deserializeAws_restJson1AssistantAssociationOutputData(__expectUnion(output.associationData), context) + : undefined, + associationType: __expectString(output.associationType), + tags: + output.tags !== undefined && output.tags !== null + ? deserializeAws_restJson1Tags(output.tags, context) + : undefined, + } as any; +}; + +const deserializeAws_restJson1AssistantAssociationOutputData = ( + output: any, + context: __SerdeContext +): AssistantAssociationOutputData => { + if (output.knowledgeBaseAssociation !== undefined && output.knowledgeBaseAssociation !== null) { + return { + knowledgeBaseAssociation: deserializeAws_restJson1KnowledgeBaseAssociationData( + output.knowledgeBaseAssociation, + context + ), + }; + } + return { $unknown: Object.entries(output)[0] }; +}; + +const deserializeAws_restJson1AssistantAssociationSummary = ( + output: any, + context: __SerdeContext +): AssistantAssociationSummary => { + return { + assistantArn: __expectString(output.assistantArn), + assistantAssociationArn: __expectString(output.assistantAssociationArn), + assistantAssociationId: __expectString(output.assistantAssociationId), + assistantId: __expectString(output.assistantId), + associationData: + output.associationData !== undefined && output.associationData !== null + ? deserializeAws_restJson1AssistantAssociationOutputData(__expectUnion(output.associationData), context) + : undefined, + associationType: __expectString(output.associationType), + tags: + output.tags !== undefined && output.tags !== null + ? deserializeAws_restJson1Tags(output.tags, context) + : undefined, + } as any; +}; + +const deserializeAws_restJson1AssistantAssociationSummaryList = ( + output: any, + context: __SerdeContext +): AssistantAssociationSummary[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return deserializeAws_restJson1AssistantAssociationSummary(entry, context); + }); +}; + +const deserializeAws_restJson1AssistantData = (output: any, context: __SerdeContext): AssistantData => { + return { + assistantArn: __expectString(output.assistantArn), + assistantId: __expectString(output.assistantId), + description: __expectString(output.description), + name: __expectString(output.name), + serverSideEncryptionConfiguration: + output.serverSideEncryptionConfiguration !== undefined && output.serverSideEncryptionConfiguration !== null + ? deserializeAws_restJson1ServerSideEncryptionConfiguration(output.serverSideEncryptionConfiguration, context) + : undefined, + status: __expectString(output.status), + tags: + output.tags !== undefined && output.tags !== null + ? deserializeAws_restJson1Tags(output.tags, context) + : undefined, + type: __expectString(output.type), + } as any; +}; + +const deserializeAws_restJson1AssistantList = (output: any, context: __SerdeContext): AssistantSummary[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return deserializeAws_restJson1AssistantSummary(entry, context); + }); +}; + +const deserializeAws_restJson1AssistantSummary = (output: any, context: __SerdeContext): AssistantSummary => { + return { + assistantArn: __expectString(output.assistantArn), + assistantId: __expectString(output.assistantId), + description: __expectString(output.description), + name: __expectString(output.name), + serverSideEncryptionConfiguration: + output.serverSideEncryptionConfiguration !== undefined && output.serverSideEncryptionConfiguration !== null + ? deserializeAws_restJson1ServerSideEncryptionConfiguration(output.serverSideEncryptionConfiguration, context) + : undefined, + status: __expectString(output.status), + tags: + output.tags !== undefined && output.tags !== null + ? deserializeAws_restJson1Tags(output.tags, context) + : undefined, + type: __expectString(output.type), + } as any; +}; + +const deserializeAws_restJson1ContentData = (output: any, context: __SerdeContext): ContentData => { + return { + contentArn: __expectString(output.contentArn), + contentId: __expectString(output.contentId), + contentType: __expectString(output.contentType), + knowledgeBaseArn: __expectString(output.knowledgeBaseArn), + knowledgeBaseId: __expectString(output.knowledgeBaseId), + linkOutUri: __expectString(output.linkOutUri), + metadata: + output.metadata !== undefined && output.metadata !== null + ? deserializeAws_restJson1ContentMetadata(output.metadata, context) + : undefined, + name: __expectString(output.name), + revisionId: __expectString(output.revisionId), + status: __expectString(output.status), + tags: + output.tags !== undefined && output.tags !== null + ? deserializeAws_restJson1Tags(output.tags, context) + : undefined, + title: __expectString(output.title), + url: __expectString(output.url), + urlExpiry: + output.urlExpiry !== undefined && output.urlExpiry !== null + ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.urlExpiry))) + : undefined, + } as any; +}; + +const deserializeAws_restJson1ContentMetadata = (output: any, context: __SerdeContext): { [key: string]: string } => { + return Object.entries(output).reduce((acc: { [key: string]: string }, [key, value]: [string, any]) => { + if (value === null) { + return acc; + } + return { + ...acc, + [key]: __expectString(value) as any, + }; + }, {}); +}; + +const deserializeAws_restJson1ContentReference = (output: any, context: __SerdeContext): ContentReference => { + return { + contentArn: __expectString(output.contentArn), + contentId: __expectString(output.contentId), + knowledgeBaseArn: __expectString(output.knowledgeBaseArn), + knowledgeBaseId: __expectString(output.knowledgeBaseId), + } as any; +}; + +const deserializeAws_restJson1ContentSummary = (output: any, context: __SerdeContext): ContentSummary => { + return { + contentArn: __expectString(output.contentArn), + contentId: __expectString(output.contentId), + contentType: __expectString(output.contentType), + knowledgeBaseArn: __expectString(output.knowledgeBaseArn), + knowledgeBaseId: __expectString(output.knowledgeBaseId), + metadata: + output.metadata !== undefined && output.metadata !== null + ? deserializeAws_restJson1ContentMetadata(output.metadata, context) + : undefined, + name: __expectString(output.name), + revisionId: __expectString(output.revisionId), + status: __expectString(output.status), + tags: + output.tags !== undefined && output.tags !== null + ? deserializeAws_restJson1Tags(output.tags, context) + : undefined, + title: __expectString(output.title), + } as any; +}; + +const deserializeAws_restJson1ContentSummaryList = (output: any, context: __SerdeContext): ContentSummary[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return deserializeAws_restJson1ContentSummary(entry, context); + }); +}; + +const deserializeAws_restJson1Document = (output: any, context: __SerdeContext): Document => { + return { + contentReference: + output.contentReference !== undefined && output.contentReference !== null + ? deserializeAws_restJson1ContentReference(output.contentReference, context) + : undefined, + excerpt: + output.excerpt !== undefined && output.excerpt !== null + ? deserializeAws_restJson1DocumentText(output.excerpt, context) + : undefined, + title: + output.title !== undefined && output.title !== null + ? deserializeAws_restJson1DocumentText(output.title, context) + : undefined, + } as any; +}; + +const deserializeAws_restJson1DocumentText = (output: any, context: __SerdeContext): DocumentText => { + return { + highlights: + output.highlights !== undefined && output.highlights !== null + ? deserializeAws_restJson1Highlights(output.highlights, context) + : undefined, + text: __expectString(output.text), + } as any; +}; + +const deserializeAws_restJson1Headers = (output: any, context: __SerdeContext): { [key: string]: string } => { + return Object.entries(output).reduce((acc: { [key: string]: string }, [key, value]: [string, any]) => { + if (value === null) { + return acc; + } + return { + ...acc, + [key]: __expectString(value) as any, + }; + }, {}); +}; + +const deserializeAws_restJson1Highlight = (output: any, context: __SerdeContext): Highlight => { + return { + beginOffsetInclusive: __expectInt32(output.beginOffsetInclusive), + endOffsetExclusive: __expectInt32(output.endOffsetExclusive), + } as any; +}; + +const deserializeAws_restJson1Highlights = (output: any, context: __SerdeContext): Highlight[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return deserializeAws_restJson1Highlight(entry, context); + }); +}; + +const deserializeAws_restJson1KnowledgeBaseAssociationData = ( + output: any, + context: __SerdeContext +): KnowledgeBaseAssociationData => { + return { + knowledgeBaseArn: __expectString(output.knowledgeBaseArn), + knowledgeBaseId: __expectString(output.knowledgeBaseId), + } as any; +}; + +const deserializeAws_restJson1KnowledgeBaseData = (output: any, context: __SerdeContext): KnowledgeBaseData => { + return { + description: __expectString(output.description), + knowledgeBaseArn: __expectString(output.knowledgeBaseArn), + knowledgeBaseId: __expectString(output.knowledgeBaseId), + knowledgeBaseType: __expectString(output.knowledgeBaseType), + lastContentModificationTime: + output.lastContentModificationTime !== undefined && output.lastContentModificationTime !== null + ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastContentModificationTime))) + : undefined, + name: __expectString(output.name), + renderingConfiguration: + output.renderingConfiguration !== undefined && output.renderingConfiguration !== null + ? deserializeAws_restJson1RenderingConfiguration(output.renderingConfiguration, context) + : undefined, + serverSideEncryptionConfiguration: + output.serverSideEncryptionConfiguration !== undefined && output.serverSideEncryptionConfiguration !== null + ? deserializeAws_restJson1ServerSideEncryptionConfiguration(output.serverSideEncryptionConfiguration, context) + : undefined, + sourceConfiguration: + output.sourceConfiguration !== undefined && output.sourceConfiguration !== null + ? deserializeAws_restJson1SourceConfiguration(__expectUnion(output.sourceConfiguration), context) + : undefined, + status: __expectString(output.status), + tags: + output.tags !== undefined && output.tags !== null + ? deserializeAws_restJson1Tags(output.tags, context) + : undefined, + } as any; +}; + +const deserializeAws_restJson1KnowledgeBaseList = (output: any, context: __SerdeContext): KnowledgeBaseSummary[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return deserializeAws_restJson1KnowledgeBaseSummary(entry, context); + }); +}; + +const deserializeAws_restJson1KnowledgeBaseSummary = (output: any, context: __SerdeContext): KnowledgeBaseSummary => { + return { + description: __expectString(output.description), + knowledgeBaseArn: __expectString(output.knowledgeBaseArn), + knowledgeBaseId: __expectString(output.knowledgeBaseId), + knowledgeBaseType: __expectString(output.knowledgeBaseType), + name: __expectString(output.name), + renderingConfiguration: + output.renderingConfiguration !== undefined && output.renderingConfiguration !== null + ? deserializeAws_restJson1RenderingConfiguration(output.renderingConfiguration, context) + : undefined, + serverSideEncryptionConfiguration: + output.serverSideEncryptionConfiguration !== undefined && output.serverSideEncryptionConfiguration !== null + ? deserializeAws_restJson1ServerSideEncryptionConfiguration(output.serverSideEncryptionConfiguration, context) + : undefined, + sourceConfiguration: + output.sourceConfiguration !== undefined && output.sourceConfiguration !== null + ? deserializeAws_restJson1SourceConfiguration(__expectUnion(output.sourceConfiguration), context) + : undefined, + status: __expectString(output.status), + tags: + output.tags !== undefined && output.tags !== null + ? deserializeAws_restJson1Tags(output.tags, context) + : undefined, + } as any; +}; + +const deserializeAws_restJson1NotifyRecommendationsReceivedError = ( + output: any, + context: __SerdeContext +): NotifyRecommendationsReceivedError => { + return { + message: __expectString(output.message), + recommendationId: __expectString(output.recommendationId), + } as any; +}; + +const deserializeAws_restJson1NotifyRecommendationsReceivedErrorList = ( + output: any, + context: __SerdeContext +): NotifyRecommendationsReceivedError[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return deserializeAws_restJson1NotifyRecommendationsReceivedError(entry, context); + }); +}; + +const deserializeAws_restJson1ObjectFieldsList = (output: any, context: __SerdeContext): string[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return __expectString(entry) as any; + }); +}; + +const deserializeAws_restJson1QueryResultsList = (output: any, context: __SerdeContext): ResultData[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return deserializeAws_restJson1ResultData(entry, context); + }); +}; + +const deserializeAws_restJson1RecommendationData = (output: any, context: __SerdeContext): RecommendationData => { + return { + document: + output.document !== undefined && output.document !== null + ? deserializeAws_restJson1Document(output.document, context) + : undefined, + recommendationId: __expectString(output.recommendationId), + relevanceLevel: __expectString(output.relevanceLevel), + relevanceScore: __limitedParseDouble(output.relevanceScore), + } as any; +}; + +const deserializeAws_restJson1RecommendationIdList = (output: any, context: __SerdeContext): string[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return __expectString(entry) as any; + }); +}; + +const deserializeAws_restJson1RecommendationList = (output: any, context: __SerdeContext): RecommendationData[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return deserializeAws_restJson1RecommendationData(entry, context); + }); +}; + +const deserializeAws_restJson1RenderingConfiguration = ( + output: any, + context: __SerdeContext +): RenderingConfiguration => { + return { + templateUri: __expectString(output.templateUri), + } as any; +}; + +const deserializeAws_restJson1ResultData = (output: any, context: __SerdeContext): ResultData => { + return { + document: + output.document !== undefined && output.document !== null + ? deserializeAws_restJson1Document(output.document, context) + : undefined, + relevanceScore: __limitedParseDouble(output.relevanceScore), + resultId: __expectString(output.resultId), + } as any; +}; + +const deserializeAws_restJson1ServerSideEncryptionConfiguration = ( + output: any, + context: __SerdeContext +): ServerSideEncryptionConfiguration => { + return { + kmsKeyId: __expectString(output.kmsKeyId), + } as any; +}; + +const deserializeAws_restJson1SessionData = (output: any, context: __SerdeContext): SessionData => { + return { + description: __expectString(output.description), + name: __expectString(output.name), + sessionArn: __expectString(output.sessionArn), + sessionId: __expectString(output.sessionId), + tags: + output.tags !== undefined && output.tags !== null + ? deserializeAws_restJson1Tags(output.tags, context) + : undefined, + } as any; +}; + +const deserializeAws_restJson1SessionSummaries = (output: any, context: __SerdeContext): SessionSummary[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return deserializeAws_restJson1SessionSummary(entry, context); + }); +}; + +const deserializeAws_restJson1SessionSummary = (output: any, context: __SerdeContext): SessionSummary => { + return { + assistantArn: __expectString(output.assistantArn), + assistantId: __expectString(output.assistantId), + sessionArn: __expectString(output.sessionArn), + sessionId: __expectString(output.sessionId), + } as any; +}; + +const deserializeAws_restJson1SourceConfiguration = (output: any, context: __SerdeContext): SourceConfiguration => { + if (output.appIntegrations !== undefined && output.appIntegrations !== null) { + return { + appIntegrations: deserializeAws_restJson1AppIntegrationsConfiguration(output.appIntegrations, context), + }; + } + return { $unknown: Object.entries(output)[0] }; +}; + +const deserializeAws_restJson1Tags = (output: any, context: __SerdeContext): { [key: string]: string } => { + return Object.entries(output).reduce((acc: { [key: string]: string }, [key, value]: [string, any]) => { + if (value === null) { + return acc; + } + return { + ...acc, + [key]: __expectString(value) as any, + }; + }, {}); +}; + +const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ + httpStatusCode: output.statusCode, + requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"], + extendedRequestId: output.headers["x-amz-id-2"], + cfId: output.headers["x-amz-cf-id"], +}); + +// Collect low-level response body stream to Uint8Array. +const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext): Promise => { + if (streamBody instanceof Uint8Array) { + return Promise.resolve(streamBody); + } + return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array()); +}; + +// Encode Uint8Array data into string with utf-8. +const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => + collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); + +const isSerializableHeaderValue = (value: any): boolean => + value !== undefined && + value !== null && + value !== "" && + (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) && + (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0); + +const parseBody = (streamBody: any, context: __SerdeContext): any => + collectBodyString(streamBody, context).then((encoded) => { + if (encoded.length) { + return JSON.parse(encoded); + } + return {}; + }); + +/** + * Load an error code for the aws.rest-json-1.1 protocol. + */ +const loadRestJsonErrorCode = (output: __HttpResponse, data: any): string => { + const findKey = (object: any, key: string) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()); + + const sanitizeErrorCode = (rawValue: string): string => { + let cleanValue = rawValue; + if (cleanValue.indexOf(":") >= 0) { + cleanValue = cleanValue.split(":")[0]; + } + if (cleanValue.indexOf("#") >= 0) { + cleanValue = cleanValue.split("#")[1]; + } + return cleanValue; + }; + + const headerKey = findKey(output.headers, "x-amzn-errortype"); + if (headerKey !== undefined) { + return sanitizeErrorCode(output.headers[headerKey]); + } + + if (data.code !== undefined) { + return sanitizeErrorCode(data.code); + } + + if (data["__type"] !== undefined) { + return sanitizeErrorCode(data["__type"]); + } + + return ""; +}; diff --git a/clients/client-wisdom/src/runtimeConfig.browser.ts b/clients/client-wisdom/src/runtimeConfig.browser.ts new file mode 100644 index 0000000000000..943b082392077 --- /dev/null +++ b/clients/client-wisdom/src/runtimeConfig.browser.ts @@ -0,0 +1,41 @@ +import { Sha256 } from "@aws-crypto/sha256-browser"; +import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; +import { invalidProvider } from "@aws-sdk/invalid-dependency"; +import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; +import { fromBase64, toBase64 } from "@aws-sdk/util-base64-browser"; +import { calculateBodyLength } from "@aws-sdk/util-body-length-browser"; +import { defaultUserAgent } from "@aws-sdk/util-user-agent-browser"; +import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-browser"; + +// @ts-ignore: package.json will be imported from dist folders +import packageInfo from "../package.json"; +import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared"; +import { WisdomClientConfig } from "./WisdomClient"; + +/** + * @internal + */ +export const getRuntimeConfig = (config: WisdomClientConfig) => { + const clientSharedValues = getSharedRuntimeConfig(config); + return { + ...clientSharedValues, + ...config, + runtime: "browser", + base64Decoder: config?.base64Decoder ?? fromBase64, + base64Encoder: config?.base64Encoder ?? toBase64, + bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength, + credentialDefaultProvider: + config?.credentialDefaultProvider ?? ((_: unknown) => () => Promise.reject(new Error("Credential is missing"))), + defaultUserAgentProvider: + config?.defaultUserAgentProvider ?? + defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), + maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, + region: config?.region ?? invalidProvider("Region is missing"), + requestHandler: config?.requestHandler ?? new FetchHttpHandler(), + retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), + sha256: config?.sha256 ?? Sha256, + streamCollector: config?.streamCollector ?? streamCollector, + utf8Decoder: config?.utf8Decoder ?? fromUtf8, + utf8Encoder: config?.utf8Encoder ?? toUtf8, + }; +}; diff --git a/clients/client-wisdom/src/runtimeConfig.native.ts b/clients/client-wisdom/src/runtimeConfig.native.ts new file mode 100644 index 0000000000000..7d54735c1b3d6 --- /dev/null +++ b/clients/client-wisdom/src/runtimeConfig.native.ts @@ -0,0 +1,17 @@ +import { Sha256 } from "@aws-crypto/sha256-js"; + +import { getRuntimeConfig as getBrowserRuntimeConfig } from "./runtimeConfig.browser"; +import { WisdomClientConfig } from "./WisdomClient"; + +/** + * @internal + */ +export const getRuntimeConfig = (config: WisdomClientConfig) => { + const browserDefaults = getBrowserRuntimeConfig(config); + return { + ...browserDefaults, + ...config, + runtime: "react-native", + sha256: config?.sha256 ?? Sha256, + }; +}; diff --git a/clients/client-wisdom/src/runtimeConfig.shared.ts b/clients/client-wisdom/src/runtimeConfig.shared.ts new file mode 100644 index 0000000000000..36e12ea35c9d9 --- /dev/null +++ b/clients/client-wisdom/src/runtimeConfig.shared.ts @@ -0,0 +1,17 @@ +import { Logger as __Logger } from "@aws-sdk/types"; +import { parseUrl } from "@aws-sdk/url-parser"; + +import { defaultRegionInfoProvider } from "./endpoints"; +import { WisdomClientConfig } from "./WisdomClient"; + +/** + * @internal + */ +export const getRuntimeConfig = (config: WisdomClientConfig) => ({ + apiVersion: "2020-10-19", + disableHostPrefix: config?.disableHostPrefix ?? false, + logger: config?.logger ?? ({} as __Logger), + regionInfoProvider: config?.regionInfoProvider ?? defaultRegionInfoProvider, + serviceId: config?.serviceId ?? "Wisdom", + urlParser: config?.urlParser ?? parseUrl, +}); diff --git a/clients/client-wisdom/src/runtimeConfig.ts b/clients/client-wisdom/src/runtimeConfig.ts new file mode 100644 index 0000000000000..8ea5317a82770 --- /dev/null +++ b/clients/client-wisdom/src/runtimeConfig.ts @@ -0,0 +1,46 @@ +import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; +import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; +import { Hash } from "@aws-sdk/hash-node"; +import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; +import { loadConfig as loadNodeConfig } from "@aws-sdk/node-config-provider"; +import { NodeHttpHandler, streamCollector } from "@aws-sdk/node-http-handler"; +import { emitWarningIfUnsupportedVersion } from "@aws-sdk/smithy-client"; +import { fromBase64, toBase64 } from "@aws-sdk/util-base64-node"; +import { calculateBodyLength } from "@aws-sdk/util-body-length-node"; +import { defaultUserAgent } from "@aws-sdk/util-user-agent-node"; +import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-node"; + +// @ts-ignore: package.json will be imported from dist folders +import packageInfo from "../package.json"; +import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared"; +import { WisdomClientConfig } from "./WisdomClient"; + +/** + * @internal + */ +export const getRuntimeConfig = (config: WisdomClientConfig) => { + emitWarningIfUnsupportedVersion(process.version); + const clientSharedValues = getSharedRuntimeConfig(config); + return { + ...clientSharedValues, + ...config, + runtime: "node", + base64Decoder: config?.base64Decoder ?? fromBase64, + base64Encoder: config?.base64Encoder ?? toBase64, + bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength, + credentialDefaultProvider: + config?.credentialDefaultProvider ?? decorateDefaultCredentialProvider(credentialDefaultProvider), + defaultUserAgentProvider: + config?.defaultUserAgentProvider ?? + defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), + maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), + region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), + requestHandler: config?.requestHandler ?? new NodeHttpHandler(), + retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), + sha256: config?.sha256 ?? Hash.bind(null, "sha256"), + streamCollector: config?.streamCollector ?? streamCollector, + utf8Decoder: config?.utf8Decoder ?? fromUtf8, + utf8Encoder: config?.utf8Encoder ?? toUtf8, + }; +}; diff --git a/clients/client-wisdom/tsconfig.es.json b/clients/client-wisdom/tsconfig.es.json new file mode 100644 index 0000000000000..4c72364cd1a07 --- /dev/null +++ b/clients/client-wisdom/tsconfig.es.json @@ -0,0 +1,10 @@ +{ + "extends": "./tsconfig", + "compilerOptions": { + "target": "es5", + "module": "esnext", + "moduleResolution": "node", + "lib": ["dom", "es5", "es2015.promise", "es2015.collection", "es2015.iterable", "es2015.symbol.wellknown"], + "outDir": "dist-es" + } +} diff --git a/clients/client-wisdom/tsconfig.json b/clients/client-wisdom/tsconfig.json new file mode 100644 index 0000000000000..3d15a85b2981b --- /dev/null +++ b/clients/client-wisdom/tsconfig.json @@ -0,0 +1,33 @@ +{ + "compilerOptions": { + "rootDir": "./src", + "alwaysStrict": true, + "target": "ES2018", + "module": "commonjs", + "strict": true, + "sourceMap": true, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "incremental": true, + "resolveJsonModule": true, + "esModuleInterop": true, + "outDir": "dist-cjs", + "removeComments": true + }, + "typedocOptions": { + "exclude": ["**/node_modules/**", "**/*.spec.ts", "**/protocols/*.ts", "**/e2e/*.ts", "**/endpoints.ts"], + "excludeNotExported": true, + "excludePrivate": true, + "hideGenerator": true, + "ignoreCompilerErrors": true, + "includeDeclarations": true, + "stripInternal": true, + "readme": "README.md", + "mode": "file", + "out": "docs", + "theme": "minimal", + "plugin": ["@aws-sdk/client-documentation-generator"] + }, + "exclude": ["test/**/*"] +} diff --git a/clients/client-wisdom/tsconfig.types.json b/clients/client-wisdom/tsconfig.types.json new file mode 100644 index 0000000000000..b7018298d8ae6 --- /dev/null +++ b/clients/client-wisdom/tsconfig.types.json @@ -0,0 +1,9 @@ +{ + "extends": "./tsconfig", + "compilerOptions": { + "removeComments": false, + "declaration": true, + "declarationDir": "dist-types" + }, + "exclude": ["test/**/*", "dist-types/**/*"] +} diff --git a/clients/client-workmail/src/WorkMail.ts b/clients/client-workmail/src/WorkMail.ts index 6aaca3814f4fb..4171256bb2e90 100644 --- a/clients/client-workmail/src/WorkMail.ts +++ b/clients/client-workmail/src/WorkMail.ts @@ -45,6 +45,11 @@ import { DeleteMailboxPermissionsCommandInput, DeleteMailboxPermissionsCommandOutput, } from "./commands/DeleteMailboxPermissionsCommand"; +import { + DeleteMobileDeviceAccessOverrideCommand, + DeleteMobileDeviceAccessOverrideCommandInput, + DeleteMobileDeviceAccessOverrideCommandOutput, +} from "./commands/DeleteMobileDeviceAccessOverrideCommand"; import { DeleteMobileDeviceAccessRuleCommand, DeleteMobileDeviceAccessRuleCommandInput, @@ -126,6 +131,11 @@ import { GetMobileDeviceAccessEffectCommandInput, GetMobileDeviceAccessEffectCommandOutput, } from "./commands/GetMobileDeviceAccessEffectCommand"; +import { + GetMobileDeviceAccessOverrideCommand, + GetMobileDeviceAccessOverrideCommandInput, + GetMobileDeviceAccessOverrideCommandOutput, +} from "./commands/GetMobileDeviceAccessOverrideCommand"; import { ListAccessControlRulesCommand, ListAccessControlRulesCommandInput, @@ -148,6 +158,11 @@ import { ListMailboxPermissionsCommandInput, ListMailboxPermissionsCommandOutput, } from "./commands/ListMailboxPermissionsCommand"; +import { + ListMobileDeviceAccessOverridesCommand, + ListMobileDeviceAccessOverridesCommandInput, + ListMobileDeviceAccessOverridesCommandOutput, +} from "./commands/ListMobileDeviceAccessOverridesCommand"; import { ListMobileDeviceAccessRulesCommand, ListMobileDeviceAccessRulesCommandInput, @@ -184,6 +199,11 @@ import { PutMailboxPermissionsCommandInput, PutMailboxPermissionsCommandOutput, } from "./commands/PutMailboxPermissionsCommand"; +import { + PutMobileDeviceAccessOverrideCommand, + PutMobileDeviceAccessOverrideCommandInput, + PutMobileDeviceAccessOverrideCommandOutput, +} from "./commands/PutMobileDeviceAccessOverrideCommand"; import { PutRetentionPolicyCommand, PutRetentionPolicyCommandInput, @@ -666,6 +686,38 @@ export class WorkMail extends WorkMailClient { } } + /** + *

                  Deletes the mobile device access override for the given WorkMail organization, user, and device.

                  + */ + public deleteMobileDeviceAccessOverride( + args: DeleteMobileDeviceAccessOverrideCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public deleteMobileDeviceAccessOverride( + args: DeleteMobileDeviceAccessOverrideCommandInput, + cb: (err: any, data?: DeleteMobileDeviceAccessOverrideCommandOutput) => void + ): void; + public deleteMobileDeviceAccessOverride( + args: DeleteMobileDeviceAccessOverrideCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteMobileDeviceAccessOverrideCommandOutput) => void + ): void; + public deleteMobileDeviceAccessOverride( + args: DeleteMobileDeviceAccessOverrideCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DeleteMobileDeviceAccessOverrideCommandOutput) => void), + cb?: (err: any, data?: DeleteMobileDeviceAccessOverrideCommandOutput) => void + ): Promise | void { + const command = new DeleteMobileDeviceAccessOverrideCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + /** *

                  Deletes a mobile device access rule for the specified Amazon WorkMail organization.

                  */ @@ -1211,6 +1263,38 @@ export class WorkMail extends WorkMailClient { } } + /** + *

                  Gets the mobile device access override for the given WorkMail organization, user, and device.

                  + */ + public getMobileDeviceAccessOverride( + args: GetMobileDeviceAccessOverrideCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public getMobileDeviceAccessOverride( + args: GetMobileDeviceAccessOverrideCommandInput, + cb: (err: any, data?: GetMobileDeviceAccessOverrideCommandOutput) => void + ): void; + public getMobileDeviceAccessOverride( + args: GetMobileDeviceAccessOverrideCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetMobileDeviceAccessOverrideCommandOutput) => void + ): void; + public getMobileDeviceAccessOverride( + args: GetMobileDeviceAccessOverrideCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetMobileDeviceAccessOverrideCommandOutput) => void), + cb?: (err: any, data?: GetMobileDeviceAccessOverrideCommandOutput) => void + ): Promise | void { + const command = new GetMobileDeviceAccessOverrideCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + /** *

                  Lists the access control rules for the specified organization.

                  */ @@ -1395,6 +1479,38 @@ export class WorkMail extends WorkMailClient { } } + /** + *

                  Lists all the mobile device access overrides for any given combination of WorkMail organization, user, or device.

                  + */ + public listMobileDeviceAccessOverrides( + args: ListMobileDeviceAccessOverridesCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public listMobileDeviceAccessOverrides( + args: ListMobileDeviceAccessOverridesCommandInput, + cb: (err: any, data?: ListMobileDeviceAccessOverridesCommandOutput) => void + ): void; + public listMobileDeviceAccessOverrides( + args: ListMobileDeviceAccessOverridesCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListMobileDeviceAccessOverridesCommandOutput) => void + ): void; + public listMobileDeviceAccessOverrides( + args: ListMobileDeviceAccessOverridesCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ListMobileDeviceAccessOverridesCommandOutput) => void), + cb?: (err: any, data?: ListMobileDeviceAccessOverridesCommandOutput) => void + ): Promise | void { + const command = new ListMobileDeviceAccessOverridesCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + /** *

                  Lists the mobile device access rules for the specified Amazon WorkMail organization.

                  */ @@ -1650,6 +1766,38 @@ export class WorkMail extends WorkMailClient { } } + /** + *

                  Creates or updates a mobile device access override for the given WorkMail organization, user, and device.

                  + */ + public putMobileDeviceAccessOverride( + args: PutMobileDeviceAccessOverrideCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public putMobileDeviceAccessOverride( + args: PutMobileDeviceAccessOverrideCommandInput, + cb: (err: any, data?: PutMobileDeviceAccessOverrideCommandOutput) => void + ): void; + public putMobileDeviceAccessOverride( + args: PutMobileDeviceAccessOverrideCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: PutMobileDeviceAccessOverrideCommandOutput) => void + ): void; + public putMobileDeviceAccessOverride( + args: PutMobileDeviceAccessOverrideCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: PutMobileDeviceAccessOverrideCommandOutput) => void), + cb?: (err: any, data?: PutMobileDeviceAccessOverrideCommandOutput) => void + ): Promise | void { + const command = new PutMobileDeviceAccessOverrideCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + /** *

                  Puts a retention policy to the specified organization.

                  */ diff --git a/clients/client-workmail/src/WorkMailClient.ts b/clients/client-workmail/src/WorkMailClient.ts index 0162f53bb8d3d..b25f105f17644 100644 --- a/clients/client-workmail/src/WorkMailClient.ts +++ b/clients/client-workmail/src/WorkMailClient.ts @@ -80,6 +80,10 @@ import { DeleteMailboxPermissionsCommandInput, DeleteMailboxPermissionsCommandOutput, } from "./commands/DeleteMailboxPermissionsCommand"; +import { + DeleteMobileDeviceAccessOverrideCommandInput, + DeleteMobileDeviceAccessOverrideCommandOutput, +} from "./commands/DeleteMobileDeviceAccessOverrideCommand"; import { DeleteMobileDeviceAccessRuleCommandInput, DeleteMobileDeviceAccessRuleCommandOutput, @@ -127,6 +131,10 @@ import { GetMobileDeviceAccessEffectCommandInput, GetMobileDeviceAccessEffectCommandOutput, } from "./commands/GetMobileDeviceAccessEffectCommand"; +import { + GetMobileDeviceAccessOverrideCommandInput, + GetMobileDeviceAccessOverrideCommandOutput, +} from "./commands/GetMobileDeviceAccessOverrideCommand"; import { ListAccessControlRulesCommandInput, ListAccessControlRulesCommandOutput, @@ -142,6 +150,10 @@ import { ListMailboxPermissionsCommandInput, ListMailboxPermissionsCommandOutput, } from "./commands/ListMailboxPermissionsCommand"; +import { + ListMobileDeviceAccessOverridesCommandInput, + ListMobileDeviceAccessOverridesCommandOutput, +} from "./commands/ListMobileDeviceAccessOverridesCommand"; import { ListMobileDeviceAccessRulesCommandInput, ListMobileDeviceAccessRulesCommandOutput, @@ -165,6 +177,10 @@ import { PutMailboxPermissionsCommandInput, PutMailboxPermissionsCommandOutput, } from "./commands/PutMailboxPermissionsCommand"; +import { + PutMobileDeviceAccessOverrideCommandInput, + PutMobileDeviceAccessOverrideCommandOutput, +} from "./commands/PutMobileDeviceAccessOverrideCommand"; import { PutRetentionPolicyCommandInput, PutRetentionPolicyCommandOutput } from "./commands/PutRetentionPolicyCommand"; import { RegisterToWorkMailCommandInput, RegisterToWorkMailCommandOutput } from "./commands/RegisterToWorkMailCommand"; import { ResetPasswordCommandInput, ResetPasswordCommandOutput } from "./commands/ResetPasswordCommand"; @@ -200,6 +216,7 @@ export type ServiceInputTypes = | DeleteAliasCommandInput | DeleteGroupCommandInput | DeleteMailboxPermissionsCommandInput + | DeleteMobileDeviceAccessOverrideCommandInput | DeleteMobileDeviceAccessRuleCommandInput | DeleteOrganizationCommandInput | DeleteResourceCommandInput @@ -217,12 +234,14 @@ export type ServiceInputTypes = | GetDefaultRetentionPolicyCommandInput | GetMailboxDetailsCommandInput | GetMobileDeviceAccessEffectCommandInput + | GetMobileDeviceAccessOverrideCommandInput | ListAccessControlRulesCommandInput | ListAliasesCommandInput | ListGroupMembersCommandInput | ListGroupsCommandInput | ListMailboxExportJobsCommandInput | ListMailboxPermissionsCommandInput + | ListMobileDeviceAccessOverridesCommandInput | ListMobileDeviceAccessRulesCommandInput | ListOrganizationsCommandInput | ListResourceDelegatesCommandInput @@ -231,6 +250,7 @@ export type ServiceInputTypes = | ListUsersCommandInput | PutAccessControlRuleCommandInput | PutMailboxPermissionsCommandInput + | PutMobileDeviceAccessOverrideCommandInput | PutRetentionPolicyCommandInput | RegisterToWorkMailCommandInput | ResetPasswordCommandInput @@ -256,6 +276,7 @@ export type ServiceOutputTypes = | DeleteAliasCommandOutput | DeleteGroupCommandOutput | DeleteMailboxPermissionsCommandOutput + | DeleteMobileDeviceAccessOverrideCommandOutput | DeleteMobileDeviceAccessRuleCommandOutput | DeleteOrganizationCommandOutput | DeleteResourceCommandOutput @@ -273,12 +294,14 @@ export type ServiceOutputTypes = | GetDefaultRetentionPolicyCommandOutput | GetMailboxDetailsCommandOutput | GetMobileDeviceAccessEffectCommandOutput + | GetMobileDeviceAccessOverrideCommandOutput | ListAccessControlRulesCommandOutput | ListAliasesCommandOutput | ListGroupMembersCommandOutput | ListGroupsCommandOutput | ListMailboxExportJobsCommandOutput | ListMailboxPermissionsCommandOutput + | ListMobileDeviceAccessOverridesCommandOutput | ListMobileDeviceAccessRulesCommandOutput | ListOrganizationsCommandOutput | ListResourceDelegatesCommandOutput @@ -287,6 +310,7 @@ export type ServiceOutputTypes = | ListUsersCommandOutput | PutAccessControlRuleCommandOutput | PutMailboxPermissionsCommandOutput + | PutMobileDeviceAccessOverrideCommandOutput | PutRetentionPolicyCommandOutput | RegisterToWorkMailCommandOutput | ResetPasswordCommandOutput diff --git a/clients/client-workmail/src/commands/DeleteMobileDeviceAccessOverrideCommand.ts b/clients/client-workmail/src/commands/DeleteMobileDeviceAccessOverrideCommand.ts new file mode 100644 index 0000000000000..6b3692a12e59f --- /dev/null +++ b/clients/client-workmail/src/commands/DeleteMobileDeviceAccessOverrideCommand.ts @@ -0,0 +1,103 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { DeleteMobileDeviceAccessOverrideRequest, DeleteMobileDeviceAccessOverrideResponse } from "../models/models_0"; +import { + deserializeAws_json1_1DeleteMobileDeviceAccessOverrideCommand, + serializeAws_json1_1DeleteMobileDeviceAccessOverrideCommand, +} from "../protocols/Aws_json1_1"; +import { ServiceInputTypes, ServiceOutputTypes, WorkMailClientResolvedConfig } from "../WorkMailClient"; + +export interface DeleteMobileDeviceAccessOverrideCommandInput extends DeleteMobileDeviceAccessOverrideRequest {} +export interface DeleteMobileDeviceAccessOverrideCommandOutput + extends DeleteMobileDeviceAccessOverrideResponse, + __MetadataBearer {} + +/** + *

                  Deletes the mobile device access override for the given WorkMail organization, user, and device.

                  + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { WorkMailClient, DeleteMobileDeviceAccessOverrideCommand } from "@aws-sdk/client-workmail"; // ES Modules import + * // const { WorkMailClient, DeleteMobileDeviceAccessOverrideCommand } = require("@aws-sdk/client-workmail"); // CommonJS import + * const client = new WorkMailClient(config); + * const command = new DeleteMobileDeviceAccessOverrideCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link DeleteMobileDeviceAccessOverrideCommandInput} for command's `input` shape. + * @see {@link DeleteMobileDeviceAccessOverrideCommandOutput} for command's `response` shape. + * @see {@link WorkMailClientResolvedConfig | config} for command's `input` shape. + * + */ +export class DeleteMobileDeviceAccessOverrideCommand extends $Command< + DeleteMobileDeviceAccessOverrideCommandInput, + DeleteMobileDeviceAccessOverrideCommandOutput, + WorkMailClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DeleteMobileDeviceAccessOverrideCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WorkMailClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "WorkMailClient"; + const commandName = "DeleteMobileDeviceAccessOverrideCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: DeleteMobileDeviceAccessOverrideRequest.filterSensitiveLog, + outputFilterSensitiveLog: DeleteMobileDeviceAccessOverrideResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: DeleteMobileDeviceAccessOverrideCommandInput, + context: __SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1DeleteMobileDeviceAccessOverrideCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return deserializeAws_json1_1DeleteMobileDeviceAccessOverrideCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-workmail/src/commands/GetMobileDeviceAccessOverrideCommand.ts b/clients/client-workmail/src/commands/GetMobileDeviceAccessOverrideCommand.ts new file mode 100644 index 0000000000000..9d4f33629ed2d --- /dev/null +++ b/clients/client-workmail/src/commands/GetMobileDeviceAccessOverrideCommand.ts @@ -0,0 +1,100 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { GetMobileDeviceAccessOverrideRequest, GetMobileDeviceAccessOverrideResponse } from "../models/models_0"; +import { + deserializeAws_json1_1GetMobileDeviceAccessOverrideCommand, + serializeAws_json1_1GetMobileDeviceAccessOverrideCommand, +} from "../protocols/Aws_json1_1"; +import { ServiceInputTypes, ServiceOutputTypes, WorkMailClientResolvedConfig } from "../WorkMailClient"; + +export interface GetMobileDeviceAccessOverrideCommandInput extends GetMobileDeviceAccessOverrideRequest {} +export interface GetMobileDeviceAccessOverrideCommandOutput + extends GetMobileDeviceAccessOverrideResponse, + __MetadataBearer {} + +/** + *

                  Gets the mobile device access override for the given WorkMail organization, user, and device.

                  + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { WorkMailClient, GetMobileDeviceAccessOverrideCommand } from "@aws-sdk/client-workmail"; // ES Modules import + * // const { WorkMailClient, GetMobileDeviceAccessOverrideCommand } = require("@aws-sdk/client-workmail"); // CommonJS import + * const client = new WorkMailClient(config); + * const command = new GetMobileDeviceAccessOverrideCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link GetMobileDeviceAccessOverrideCommandInput} for command's `input` shape. + * @see {@link GetMobileDeviceAccessOverrideCommandOutput} for command's `response` shape. + * @see {@link WorkMailClientResolvedConfig | config} for command's `input` shape. + * + */ +export class GetMobileDeviceAccessOverrideCommand extends $Command< + GetMobileDeviceAccessOverrideCommandInput, + GetMobileDeviceAccessOverrideCommandOutput, + WorkMailClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetMobileDeviceAccessOverrideCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WorkMailClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "WorkMailClient"; + const commandName = "GetMobileDeviceAccessOverrideCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: GetMobileDeviceAccessOverrideRequest.filterSensitiveLog, + outputFilterSensitiveLog: GetMobileDeviceAccessOverrideResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: GetMobileDeviceAccessOverrideCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_json1_1GetMobileDeviceAccessOverrideCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return deserializeAws_json1_1GetMobileDeviceAccessOverrideCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-workmail/src/commands/ListMobileDeviceAccessOverridesCommand.ts b/clients/client-workmail/src/commands/ListMobileDeviceAccessOverridesCommand.ts new file mode 100644 index 0000000000000..1d106c6e2840b --- /dev/null +++ b/clients/client-workmail/src/commands/ListMobileDeviceAccessOverridesCommand.ts @@ -0,0 +1,103 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { ListMobileDeviceAccessOverridesRequest, ListMobileDeviceAccessOverridesResponse } from "../models/models_0"; +import { + deserializeAws_json1_1ListMobileDeviceAccessOverridesCommand, + serializeAws_json1_1ListMobileDeviceAccessOverridesCommand, +} from "../protocols/Aws_json1_1"; +import { ServiceInputTypes, ServiceOutputTypes, WorkMailClientResolvedConfig } from "../WorkMailClient"; + +export interface ListMobileDeviceAccessOverridesCommandInput extends ListMobileDeviceAccessOverridesRequest {} +export interface ListMobileDeviceAccessOverridesCommandOutput + extends ListMobileDeviceAccessOverridesResponse, + __MetadataBearer {} + +/** + *

                  Lists all the mobile device access overrides for any given combination of WorkMail organization, user, or device.

                  + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { WorkMailClient, ListMobileDeviceAccessOverridesCommand } from "@aws-sdk/client-workmail"; // ES Modules import + * // const { WorkMailClient, ListMobileDeviceAccessOverridesCommand } = require("@aws-sdk/client-workmail"); // CommonJS import + * const client = new WorkMailClient(config); + * const command = new ListMobileDeviceAccessOverridesCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link ListMobileDeviceAccessOverridesCommandInput} for command's `input` shape. + * @see {@link ListMobileDeviceAccessOverridesCommandOutput} for command's `response` shape. + * @see {@link WorkMailClientResolvedConfig | config} for command's `input` shape. + * + */ +export class ListMobileDeviceAccessOverridesCommand extends $Command< + ListMobileDeviceAccessOverridesCommandInput, + ListMobileDeviceAccessOverridesCommandOutput, + WorkMailClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: ListMobileDeviceAccessOverridesCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WorkMailClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "WorkMailClient"; + const commandName = "ListMobileDeviceAccessOverridesCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: ListMobileDeviceAccessOverridesRequest.filterSensitiveLog, + outputFilterSensitiveLog: ListMobileDeviceAccessOverridesResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: ListMobileDeviceAccessOverridesCommandInput, + context: __SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1ListMobileDeviceAccessOverridesCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return deserializeAws_json1_1ListMobileDeviceAccessOverridesCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-workmail/src/commands/PutMobileDeviceAccessOverrideCommand.ts b/clients/client-workmail/src/commands/PutMobileDeviceAccessOverrideCommand.ts new file mode 100644 index 0000000000000..49d08d33b75df --- /dev/null +++ b/clients/client-workmail/src/commands/PutMobileDeviceAccessOverrideCommand.ts @@ -0,0 +1,100 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { PutMobileDeviceAccessOverrideRequest, PutMobileDeviceAccessOverrideResponse } from "../models/models_0"; +import { + deserializeAws_json1_1PutMobileDeviceAccessOverrideCommand, + serializeAws_json1_1PutMobileDeviceAccessOverrideCommand, +} from "../protocols/Aws_json1_1"; +import { ServiceInputTypes, ServiceOutputTypes, WorkMailClientResolvedConfig } from "../WorkMailClient"; + +export interface PutMobileDeviceAccessOverrideCommandInput extends PutMobileDeviceAccessOverrideRequest {} +export interface PutMobileDeviceAccessOverrideCommandOutput + extends PutMobileDeviceAccessOverrideResponse, + __MetadataBearer {} + +/** + *

                  Creates or updates a mobile device access override for the given WorkMail organization, user, and device.

                  + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { WorkMailClient, PutMobileDeviceAccessOverrideCommand } from "@aws-sdk/client-workmail"; // ES Modules import + * // const { WorkMailClient, PutMobileDeviceAccessOverrideCommand } = require("@aws-sdk/client-workmail"); // CommonJS import + * const client = new WorkMailClient(config); + * const command = new PutMobileDeviceAccessOverrideCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link PutMobileDeviceAccessOverrideCommandInput} for command's `input` shape. + * @see {@link PutMobileDeviceAccessOverrideCommandOutput} for command's `response` shape. + * @see {@link WorkMailClientResolvedConfig | config} for command's `input` shape. + * + */ +export class PutMobileDeviceAccessOverrideCommand extends $Command< + PutMobileDeviceAccessOverrideCommandInput, + PutMobileDeviceAccessOverrideCommandOutput, + WorkMailClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: PutMobileDeviceAccessOverrideCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WorkMailClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "WorkMailClient"; + const commandName = "PutMobileDeviceAccessOverrideCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: PutMobileDeviceAccessOverrideRequest.filterSensitiveLog, + outputFilterSensitiveLog: PutMobileDeviceAccessOverrideResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: PutMobileDeviceAccessOverrideCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_json1_1PutMobileDeviceAccessOverrideCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return deserializeAws_json1_1PutMobileDeviceAccessOverrideCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-workmail/src/index.ts b/clients/client-workmail/src/index.ts index 307ee7fa84fc1..71c25867fde77 100644 --- a/clients/client-workmail/src/index.ts +++ b/clients/client-workmail/src/index.ts @@ -13,6 +13,7 @@ export * from "./commands/DeleteAccessControlRuleCommand"; export * from "./commands/DeleteAliasCommand"; export * from "./commands/DeleteGroupCommand"; export * from "./commands/DeleteMailboxPermissionsCommand"; +export * from "./commands/DeleteMobileDeviceAccessOverrideCommand"; export * from "./commands/DeleteMobileDeviceAccessRuleCommand"; export * from "./commands/DeleteOrganizationCommand"; export * from "./commands/DeleteResourceCommand"; @@ -30,6 +31,7 @@ export * from "./commands/GetAccessControlEffectCommand"; export * from "./commands/GetDefaultRetentionPolicyCommand"; export * from "./commands/GetMailboxDetailsCommand"; export * from "./commands/GetMobileDeviceAccessEffectCommand"; +export * from "./commands/GetMobileDeviceAccessOverrideCommand"; export * from "./commands/ListAccessControlRulesCommand"; export * from "./commands/ListAliasesCommand"; export * from "./pagination/ListAliasesPaginator"; @@ -41,6 +43,8 @@ export * from "./commands/ListMailboxExportJobsCommand"; export * from "./pagination/ListMailboxExportJobsPaginator"; export * from "./commands/ListMailboxPermissionsCommand"; export * from "./pagination/ListMailboxPermissionsPaginator"; +export * from "./commands/ListMobileDeviceAccessOverridesCommand"; +export * from "./pagination/ListMobileDeviceAccessOverridesPaginator"; export * from "./commands/ListMobileDeviceAccessRulesCommand"; export * from "./commands/ListOrganizationsCommand"; export * from "./pagination/ListOrganizationsPaginator"; @@ -53,6 +57,7 @@ export * from "./commands/ListUsersCommand"; export * from "./pagination/ListUsersPaginator"; export * from "./commands/PutAccessControlRuleCommand"; export * from "./commands/PutMailboxPermissionsCommand"; +export * from "./commands/PutMobileDeviceAccessOverrideCommand"; export * from "./commands/PutRetentionPolicyCommand"; export * from "./commands/RegisterToWorkMailCommand"; export * from "./commands/ResetPasswordCommand"; diff --git a/clients/client-workmail/src/models/models_0.ts b/clients/client-workmail/src/models/models_0.ts index fe3fe7a1d713d..d63751b6b64af 100644 --- a/clients/client-workmail/src/models/models_0.ts +++ b/clients/client-workmail/src/models/models_0.ts @@ -1040,6 +1040,57 @@ export namespace DeleteMailboxPermissionsResponse { }); } +export interface DeleteMobileDeviceAccessOverrideRequest { + /** + *

                  The Amazon WorkMail organization for which the access override will be deleted.

                  + */ + OrganizationId: string | undefined; + + /** + *

                  The WorkMail user for which you want to delete the override. Accepts the following types of user identities:

                  + *
                    + *
                  • + *

                    User ID: 12345678-1234-1234-1234-123456789012 or S-1-1-12-1234567890-123456789-123456789-1234 + *

                    + *
                  • + *
                  • + *

                    Email address: user@domain.tld + *

                    + *
                  • + *
                  • + *

                    User name: user + *

                    + *
                  • + *
                  + */ + UserId: string | undefined; + + /** + *

                  The mobile device for which you delete the override. DeviceId is case insensitive.

                  + */ + DeviceId: string | undefined; +} + +export namespace DeleteMobileDeviceAccessOverrideRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DeleteMobileDeviceAccessOverrideRequest): any => ({ + ...obj, + }); +} + +export interface DeleteMobileDeviceAccessOverrideResponse {} + +export namespace DeleteMobileDeviceAccessOverrideResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DeleteMobileDeviceAccessOverrideResponse): any => ({ + ...obj, + }); +} + export interface DeleteMobileDeviceAccessRuleRequest { /** *

                  The Amazon WorkMail organization under which the rule will be deleted.

                  @@ -2022,6 +2073,105 @@ export namespace GetMobileDeviceAccessEffectResponse { }); } +export interface GetMobileDeviceAccessOverrideRequest { + /** + *

                  The Amazon WorkMail organization to which you want to apply the override.

                  + */ + OrganizationId: string | undefined; + + /** + *

                  Identifies the WorkMail user for the override. Accepts the following types of user identities:

                  + *
                    + *
                  • + *

                    User ID: 12345678-1234-1234-1234-123456789012 or S-1-1-12-1234567890-123456789-123456789-1234 + *

                    + *
                  • + *
                  • + *

                    Email address: user@domain.tld + *

                    + *
                  • + *
                  • + *

                    User name: user + *

                    + *
                  • + *
                  + */ + UserId: string | undefined; + + /** + *

                  The mobile device to which the override applies. DeviceId is case insensitive.

                  + */ + DeviceId: string | undefined; +} + +export namespace GetMobileDeviceAccessOverrideRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetMobileDeviceAccessOverrideRequest): any => ({ + ...obj, + }); +} + +export interface GetMobileDeviceAccessOverrideResponse { + /** + *

                  The WorkMail user to which the access override applies.

                  + */ + UserId?: string; + + /** + *

                  The device to which the access override applies.

                  + */ + DeviceId?: string; + + /** + *

                  The effect of the override, ALLOW or DENY.

                  + */ + Effect?: MobileDeviceAccessRuleEffect | string; + + /** + *

                  A description of the override.

                  + */ + Description?: string; + + /** + *

                  The date the override was first created.

                  + */ + DateCreated?: Date; + + /** + *

                  The date the description was last modified.

                  + */ + DateModified?: Date; +} + +export namespace GetMobileDeviceAccessOverrideResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetMobileDeviceAccessOverrideResponse): any => ({ + ...obj, + }); +} + +/** + *

                  The resource cannot be found.

                  + */ +export interface ResourceNotFoundException extends __SmithyException, $MetadataBearer { + name: "ResourceNotFoundException"; + $fault: "client"; + Message?: string; +} + +export namespace ResourceNotFoundException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ResourceNotFoundException): any => ({ + ...obj, + }); +} + /** *

                  The representation of an Amazon WorkMail group.

                  */ @@ -2525,6 +2675,121 @@ export namespace ListMailboxPermissionsResponse { }); } +export interface ListMobileDeviceAccessOverridesRequest { + /** + *

                  The Amazon WorkMail organization under which to list mobile device access overrides.

                  + */ + OrganizationId: string | undefined; + + /** + *

                  The WorkMail user under which you list the mobile device access overrides. Accepts the following types of user identities:

                  + *
                    + *
                  • + *

                    User ID: 12345678-1234-1234-1234-123456789012 or S-1-1-12-1234567890-123456789-123456789-1234 + *

                    + *
                  • + *
                  • + *

                    Email address: user@domain.tld + *

                    + *
                  • + *
                  • + *

                    User name: user + *

                    + *
                  • + *
                  + */ + UserId?: string; + + /** + *

                  The mobile device to which the access override applies.

                  + */ + DeviceId?: string; + + /** + *

                  The token to use to retrieve the next page of results. The first call does not require a token.

                  + */ + NextToken?: string; + + /** + *

                  The maximum number of results to return in a single call.

                  + */ + MaxResults?: number; +} + +export namespace ListMobileDeviceAccessOverridesRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ListMobileDeviceAccessOverridesRequest): any => ({ + ...obj, + }); +} + +/** + *

                  The override object.

                  + */ +export interface MobileDeviceAccessOverride { + /** + *

                  The WorkMail user to which the access override applies.

                  + */ + UserId?: string; + + /** + *

                  The device to which the override applies.

                  + */ + DeviceId?: string; + + /** + *

                  The effect of the override, ALLOW or DENY.

                  + */ + Effect?: MobileDeviceAccessRuleEffect | string; + + /** + *

                  A description of the override.

                  + */ + Description?: string; + + /** + *

                  The date the override was first created.

                  + */ + DateCreated?: Date; + + /** + *

                  The date the override was last modified.

                  + */ + DateModified?: Date; +} + +export namespace MobileDeviceAccessOverride { + /** + * @internal + */ + export const filterSensitiveLog = (obj: MobileDeviceAccessOverride): any => ({ + ...obj, + }); +} + +export interface ListMobileDeviceAccessOverridesResponse { + /** + *

                  The list of mobile device access overrides that exist for the specified Amazon WorkMail organization and user.

                  + */ + Overrides?: MobileDeviceAccessOverride[]; + + /** + *

                  The token to use to retrieve the next page of results. The value is “null” when there are no more results to return.

                  + */ + NextToken?: string; +} + +export namespace ListMobileDeviceAccessOverridesResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ListMobileDeviceAccessOverridesResponse): any => ({ + ...obj, + }); +} + export interface ListMobileDeviceAccessRulesRequest { /** *

                  The Amazon WorkMail organization for which to list the rules.

                  @@ -2938,24 +3203,6 @@ export namespace ListTagsForResourceResponse { }); } -/** - *

                  The resource cannot be found.

                  - */ -export interface ResourceNotFoundException extends __SmithyException, $MetadataBearer { - name: "ResourceNotFoundException"; - $fault: "client"; - Message?: string; -} - -export namespace ResourceNotFoundException { - /** - * @internal - */ - export const filterSensitiveLog = (obj: ResourceNotFoundException): any => ({ - ...obj, - }); -} - export interface ListUsersRequest { /** *

                  The identifier for the organization under which the users exist.

                  @@ -3185,6 +3432,67 @@ export namespace PutMailboxPermissionsResponse { }); } +export interface PutMobileDeviceAccessOverrideRequest { + /** + *

                  Identifies the Amazon WorkMail organization for which you create the override.

                  + */ + OrganizationId: string | undefined; + + /** + *

                  The WorkMail user for which you create the override. Accepts the following types of user identities:

                  + *
                    + *
                  • + *

                    User ID: 12345678-1234-1234-1234-123456789012 or S-1-1-12-1234567890-123456789-123456789-1234 + *

                    + *
                  • + *
                  • + *

                    Email address: user@domain.tld + *

                    + *
                  • + *
                  • + *

                    User name: user + *

                    + *
                  • + *
                  + */ + UserId: string | undefined; + + /** + *

                  The mobile device for which you create the override. DeviceId is case insensitive.

                  + */ + DeviceId: string | undefined; + + /** + *

                  The effect of the override, ALLOW or DENY.

                  + */ + Effect: MobileDeviceAccessRuleEffect | string | undefined; + + /** + *

                  A description of the override.

                  + */ + Description?: string; +} + +export namespace PutMobileDeviceAccessOverrideRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: PutMobileDeviceAccessOverrideRequest): any => ({ + ...obj, + }); +} + +export interface PutMobileDeviceAccessOverrideResponse {} + +export namespace PutMobileDeviceAccessOverrideResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: PutMobileDeviceAccessOverrideResponse): any => ({ + ...obj, + }); +} + export interface PutRetentionPolicyRequest { /** *

                  The organization ID.

                  diff --git a/clients/client-workmail/src/pagination/ListMobileDeviceAccessOverridesPaginator.ts b/clients/client-workmail/src/pagination/ListMobileDeviceAccessOverridesPaginator.ts new file mode 100644 index 0000000000000..de8b595c64cac --- /dev/null +++ b/clients/client-workmail/src/pagination/ListMobileDeviceAccessOverridesPaginator.ts @@ -0,0 +1,59 @@ +import { Paginator } from "@aws-sdk/types"; + +import { + ListMobileDeviceAccessOverridesCommand, + ListMobileDeviceAccessOverridesCommandInput, + ListMobileDeviceAccessOverridesCommandOutput, +} from "../commands/ListMobileDeviceAccessOverridesCommand"; +import { WorkMail } from "../WorkMail"; +import { WorkMailClient } from "../WorkMailClient"; +import { WorkMailPaginationConfiguration } from "./Interfaces"; + +/** + * @private + */ +const makePagedClientRequest = async ( + client: WorkMailClient, + input: ListMobileDeviceAccessOverridesCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new ListMobileDeviceAccessOverridesCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async ( + client: WorkMail, + input: ListMobileDeviceAccessOverridesCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.listMobileDeviceAccessOverrides(input, ...args); +}; +export async function* paginateListMobileDeviceAccessOverrides( + config: WorkMailPaginationConfiguration, + input: ListMobileDeviceAccessOverridesCommandInput, + ...additionalArguments: any +): Paginator { + // ToDo: replace with actual type instead of typeof input.NextToken + let token: typeof input.NextToken | undefined = config.startingToken || undefined; + let hasNext = true; + let page: ListMobileDeviceAccessOverridesCommandOutput; + while (hasNext) { + input.NextToken = token; + input["MaxResults"] = config.pageSize; + if (config.client instanceof WorkMail) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } else if (config.client instanceof WorkMailClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected WorkMail | WorkMailClient"); + } + yield page; + token = page.NextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-workmail/src/protocols/Aws_json1_1.ts b/clients/client-workmail/src/protocols/Aws_json1_1.ts index ff4f4ca962f97..a5757bc387fa2 100644 --- a/clients/client-workmail/src/protocols/Aws_json1_1.ts +++ b/clients/client-workmail/src/protocols/Aws_json1_1.ts @@ -49,6 +49,10 @@ import { DeleteMailboxPermissionsCommandInput, DeleteMailboxPermissionsCommandOutput, } from "../commands/DeleteMailboxPermissionsCommand"; +import { + DeleteMobileDeviceAccessOverrideCommandInput, + DeleteMobileDeviceAccessOverrideCommandOutput, +} from "../commands/DeleteMobileDeviceAccessOverrideCommand"; import { DeleteMobileDeviceAccessRuleCommandInput, DeleteMobileDeviceAccessRuleCommandOutput, @@ -96,6 +100,10 @@ import { GetMobileDeviceAccessEffectCommandInput, GetMobileDeviceAccessEffectCommandOutput, } from "../commands/GetMobileDeviceAccessEffectCommand"; +import { + GetMobileDeviceAccessOverrideCommandInput, + GetMobileDeviceAccessOverrideCommandOutput, +} from "../commands/GetMobileDeviceAccessOverrideCommand"; import { ListAccessControlRulesCommandInput, ListAccessControlRulesCommandOutput, @@ -111,6 +119,10 @@ import { ListMailboxPermissionsCommandInput, ListMailboxPermissionsCommandOutput, } from "../commands/ListMailboxPermissionsCommand"; +import { + ListMobileDeviceAccessOverridesCommandInput, + ListMobileDeviceAccessOverridesCommandOutput, +} from "../commands/ListMobileDeviceAccessOverridesCommand"; import { ListMobileDeviceAccessRulesCommandInput, ListMobileDeviceAccessRulesCommandOutput, @@ -134,6 +146,10 @@ import { PutMailboxPermissionsCommandInput, PutMailboxPermissionsCommandOutput, } from "../commands/PutMailboxPermissionsCommand"; +import { + PutMobileDeviceAccessOverrideCommandInput, + PutMobileDeviceAccessOverrideCommandOutput, +} from "../commands/PutMobileDeviceAccessOverrideCommand"; import { PutRetentionPolicyCommandInput, PutRetentionPolicyCommandOutput } from "../commands/PutRetentionPolicyCommand"; import { RegisterToWorkMailCommandInput, RegisterToWorkMailCommandOutput } from "../commands/RegisterToWorkMailCommand"; import { ResetPasswordCommandInput, ResetPasswordCommandOutput } from "../commands/ResetPasswordCommand"; @@ -183,6 +199,8 @@ import { DeleteGroupResponse, DeleteMailboxPermissionsRequest, DeleteMailboxPermissionsResponse, + DeleteMobileDeviceAccessOverrideRequest, + DeleteMobileDeviceAccessOverrideResponse, DeleteMobileDeviceAccessRuleRequest, DeleteMobileDeviceAccessRuleResponse, DeleteOrganizationRequest, @@ -226,6 +244,8 @@ import { GetMailboxDetailsResponse, GetMobileDeviceAccessEffectRequest, GetMobileDeviceAccessEffectResponse, + GetMobileDeviceAccessOverrideRequest, + GetMobileDeviceAccessOverrideResponse, Group, InvalidConfigurationException, InvalidParameterException, @@ -243,6 +263,8 @@ import { ListMailboxExportJobsResponse, ListMailboxPermissionsRequest, ListMailboxPermissionsResponse, + ListMobileDeviceAccessOverridesRequest, + ListMobileDeviceAccessOverridesResponse, ListMobileDeviceAccessRulesRequest, ListMobileDeviceAccessRulesResponse, ListOrganizationsRequest, @@ -260,6 +282,7 @@ import { MailDomainStateException, Member, MobileDeviceAccessMatchedRule, + MobileDeviceAccessOverride, MobileDeviceAccessRule, NameAvailabilityException, OrganizationNotFoundException, @@ -271,6 +294,8 @@ import { PutAccessControlRuleResponse, PutMailboxPermissionsRequest, PutMailboxPermissionsResponse, + PutMobileDeviceAccessOverrideRequest, + PutMobileDeviceAccessOverrideResponse, PutRetentionPolicyRequest, PutRetentionPolicyResponse, RegisterToWorkMailRequest, @@ -469,6 +494,19 @@ export const serializeAws_json1_1DeleteMailboxPermissionsCommand = async ( return buildHttpRpcRequest(context, headers, "/", undefined, body); }; +export const serializeAws_json1_1DeleteMobileDeviceAccessOverrideCommand = async ( + input: DeleteMobileDeviceAccessOverrideCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "WorkMailService.DeleteMobileDeviceAccessOverride", + }; + let body: any; + body = JSON.stringify(serializeAws_json1_1DeleteMobileDeviceAccessOverrideRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + export const serializeAws_json1_1DeleteMobileDeviceAccessRuleCommand = async ( input: DeleteMobileDeviceAccessRuleCommandInput, context: __SerdeContext @@ -690,6 +728,19 @@ export const serializeAws_json1_1GetMobileDeviceAccessEffectCommand = async ( return buildHttpRpcRequest(context, headers, "/", undefined, body); }; +export const serializeAws_json1_1GetMobileDeviceAccessOverrideCommand = async ( + input: GetMobileDeviceAccessOverrideCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "WorkMailService.GetMobileDeviceAccessOverride", + }; + let body: any; + body = JSON.stringify(serializeAws_json1_1GetMobileDeviceAccessOverrideRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + export const serializeAws_json1_1ListAccessControlRulesCommand = async ( input: ListAccessControlRulesCommandInput, context: __SerdeContext @@ -768,6 +819,19 @@ export const serializeAws_json1_1ListMailboxPermissionsCommand = async ( return buildHttpRpcRequest(context, headers, "/", undefined, body); }; +export const serializeAws_json1_1ListMobileDeviceAccessOverridesCommand = async ( + input: ListMobileDeviceAccessOverridesCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "WorkMailService.ListMobileDeviceAccessOverrides", + }; + let body: any; + body = JSON.stringify(serializeAws_json1_1ListMobileDeviceAccessOverridesRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + export const serializeAws_json1_1ListMobileDeviceAccessRulesCommand = async ( input: ListMobileDeviceAccessRulesCommandInput, context: __SerdeContext @@ -872,6 +936,19 @@ export const serializeAws_json1_1PutMailboxPermissionsCommand = async ( return buildHttpRpcRequest(context, headers, "/", undefined, body); }; +export const serializeAws_json1_1PutMobileDeviceAccessOverrideCommand = async ( + input: PutMobileDeviceAccessOverrideCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "WorkMailService.PutMobileDeviceAccessOverride", + }; + let body: any; + body = JSON.stringify(serializeAws_json1_1PutMobileDeviceAccessOverrideRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + export const serializeAws_json1_1PutRetentionPolicyCommand = async ( input: PutRetentionPolicyCommandInput, context: __SerdeContext @@ -2224,6 +2301,84 @@ const deserializeAws_json1_1DeleteMailboxPermissionsCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; +export const deserializeAws_json1_1DeleteMobileDeviceAccessOverrideCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1DeleteMobileDeviceAccessOverrideCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1DeleteMobileDeviceAccessOverrideResponse(data, context); + const response: DeleteMobileDeviceAccessOverrideCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; + +const deserializeAws_json1_1DeleteMobileDeviceAccessOverrideCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "EntityNotFoundException": + case "com.amazonaws.workmail#EntityNotFoundException": + response = { + ...(await deserializeAws_json1_1EntityNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.workmail#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "OrganizationNotFoundException": + case "com.amazonaws.workmail#OrganizationNotFoundException": + response = { + ...(await deserializeAws_json1_1OrganizationNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "OrganizationStateException": + case "com.amazonaws.workmail#OrganizationStateException": + response = { + ...(await deserializeAws_json1_1OrganizationStateExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + export const deserializeAws_json1_1DeleteMobileDeviceAccessRuleCommand = async ( output: __HttpResponse, context: __SerdeContext @@ -3566,6 +3721,92 @@ const deserializeAws_json1_1GetMobileDeviceAccessEffectCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; +export const deserializeAws_json1_1GetMobileDeviceAccessOverrideCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1GetMobileDeviceAccessOverrideCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1GetMobileDeviceAccessOverrideResponse(data, context); + const response: GetMobileDeviceAccessOverrideCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; + +const deserializeAws_json1_1GetMobileDeviceAccessOverrideCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "EntityNotFoundException": + case "com.amazonaws.workmail#EntityNotFoundException": + response = { + ...(await deserializeAws_json1_1EntityNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.workmail#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "OrganizationNotFoundException": + case "com.amazonaws.workmail#OrganizationNotFoundException": + response = { + ...(await deserializeAws_json1_1OrganizationNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "OrganizationStateException": + case "com.amazonaws.workmail#OrganizationStateException": + response = { + ...(await deserializeAws_json1_1OrganizationStateExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.workmail#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + export const deserializeAws_json1_1ListAccessControlRulesCommand = async ( output: __HttpResponse, context: __SerdeContext @@ -4026,6 +4267,84 @@ const deserializeAws_json1_1ListMailboxPermissionsCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; +export const deserializeAws_json1_1ListMobileDeviceAccessOverridesCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1ListMobileDeviceAccessOverridesCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1ListMobileDeviceAccessOverridesResponse(data, context); + const response: ListMobileDeviceAccessOverridesCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; + +const deserializeAws_json1_1ListMobileDeviceAccessOverridesCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "EntityNotFoundException": + case "com.amazonaws.workmail#EntityNotFoundException": + response = { + ...(await deserializeAws_json1_1EntityNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.workmail#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "OrganizationNotFoundException": + case "com.amazonaws.workmail#OrganizationNotFoundException": + response = { + ...(await deserializeAws_json1_1OrganizationNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "OrganizationStateException": + case "com.amazonaws.workmail#OrganizationStateException": + response = { + ...(await deserializeAws_json1_1OrganizationStateExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + export const deserializeAws_json1_1ListMobileDeviceAccessRulesCommand = async ( output: __HttpResponse, context: __SerdeContext @@ -4602,6 +4921,92 @@ const deserializeAws_json1_1PutMailboxPermissionsCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; +export const deserializeAws_json1_1PutMobileDeviceAccessOverrideCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1PutMobileDeviceAccessOverrideCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1PutMobileDeviceAccessOverrideResponse(data, context); + const response: PutMobileDeviceAccessOverrideCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; + +const deserializeAws_json1_1PutMobileDeviceAccessOverrideCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "EntityNotFoundException": + case "com.amazonaws.workmail#EntityNotFoundException": + response = { + ...(await deserializeAws_json1_1EntityNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "EntityStateException": + case "com.amazonaws.workmail#EntityStateException": + response = { + ...(await deserializeAws_json1_1EntityStateExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.workmail#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "OrganizationNotFoundException": + case "com.amazonaws.workmail#OrganizationNotFoundException": + response = { + ...(await deserializeAws_json1_1OrganizationNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "OrganizationStateException": + case "com.amazonaws.workmail#OrganizationStateException": + response = { + ...(await deserializeAws_json1_1OrganizationStateExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + export const deserializeAws_json1_1PutRetentionPolicyCommand = async ( output: __HttpResponse, context: __SerdeContext @@ -6067,6 +6472,18 @@ const serializeAws_json1_1DeleteMailboxPermissionsRequest = ( }; }; +const serializeAws_json1_1DeleteMobileDeviceAccessOverrideRequest = ( + input: DeleteMobileDeviceAccessOverrideRequest, + context: __SerdeContext +): any => { + return { + ...(input.DeviceId !== undefined && input.DeviceId !== null && { DeviceId: input.DeviceId }), + ...(input.OrganizationId !== undefined && + input.OrganizationId !== null && { OrganizationId: input.OrganizationId }), + ...(input.UserId !== undefined && input.UserId !== null && { UserId: input.UserId }), + }; +}; + const serializeAws_json1_1DeleteMobileDeviceAccessRuleRequest = ( input: DeleteMobileDeviceAccessRuleRequest, context: __SerdeContext @@ -6330,6 +6747,18 @@ const serializeAws_json1_1GetMobileDeviceAccessEffectRequest = ( }; }; +const serializeAws_json1_1GetMobileDeviceAccessOverrideRequest = ( + input: GetMobileDeviceAccessOverrideRequest, + context: __SerdeContext +): any => { + return { + ...(input.DeviceId !== undefined && input.DeviceId !== null && { DeviceId: input.DeviceId }), + ...(input.OrganizationId !== undefined && + input.OrganizationId !== null && { OrganizationId: input.OrganizationId }), + ...(input.UserId !== undefined && input.UserId !== null && { UserId: input.UserId }), + }; +}; + const serializeAws_json1_1IpRangeList = (input: string[], context: __SerdeContext): any => { return input .filter((e: any) => e != null) @@ -6405,6 +6834,20 @@ const serializeAws_json1_1ListMailboxPermissionsRequest = ( }; }; +const serializeAws_json1_1ListMobileDeviceAccessOverridesRequest = ( + input: ListMobileDeviceAccessOverridesRequest, + context: __SerdeContext +): any => { + return { + ...(input.DeviceId !== undefined && input.DeviceId !== null && { DeviceId: input.DeviceId }), + ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }), + ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }), + ...(input.OrganizationId !== undefined && + input.OrganizationId !== null && { OrganizationId: input.OrganizationId }), + ...(input.UserId !== undefined && input.UserId !== null && { UserId: input.UserId }), + }; +}; + const serializeAws_json1_1ListMobileDeviceAccessRulesRequest = ( input: ListMobileDeviceAccessRulesRequest, context: __SerdeContext @@ -6517,6 +6960,20 @@ const serializeAws_json1_1PutMailboxPermissionsRequest = ( }; }; +const serializeAws_json1_1PutMobileDeviceAccessOverrideRequest = ( + input: PutMobileDeviceAccessOverrideRequest, + context: __SerdeContext +): any => { + return { + ...(input.Description !== undefined && input.Description !== null && { Description: input.Description }), + ...(input.DeviceId !== undefined && input.DeviceId !== null && { DeviceId: input.DeviceId }), + ...(input.Effect !== undefined && input.Effect !== null && { Effect: input.Effect }), + ...(input.OrganizationId !== undefined && + input.OrganizationId !== null && { OrganizationId: input.OrganizationId }), + ...(input.UserId !== undefined && input.UserId !== null && { UserId: input.UserId }), + }; +}; + const serializeAws_json1_1PutRetentionPolicyRequest = ( input: PutRetentionPolicyRequest, context: __SerdeContext @@ -6894,6 +7351,13 @@ const deserializeAws_json1_1DeleteMailboxPermissionsResponse = ( return {} as any; }; +const deserializeAws_json1_1DeleteMobileDeviceAccessOverrideResponse = ( + output: any, + context: __SerdeContext +): DeleteMobileDeviceAccessOverrideResponse => { + return {} as any; +}; + const deserializeAws_json1_1DeleteMobileDeviceAccessRuleResponse = ( output: any, context: __SerdeContext @@ -7228,6 +7692,26 @@ const deserializeAws_json1_1GetMobileDeviceAccessEffectResponse = ( } as any; }; +const deserializeAws_json1_1GetMobileDeviceAccessOverrideResponse = ( + output: any, + context: __SerdeContext +): GetMobileDeviceAccessOverrideResponse => { + return { + DateCreated: + output.DateCreated !== undefined && output.DateCreated !== null + ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DateCreated))) + : undefined, + DateModified: + output.DateModified !== undefined && output.DateModified !== null + ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DateModified))) + : undefined, + Description: __expectString(output.Description), + DeviceId: __expectString(output.DeviceId), + Effect: __expectString(output.Effect), + UserId: __expectString(output.UserId), + } as any; +}; + const deserializeAws_json1_1Group = (output: any, context: __SerdeContext): Group => { return { DisabledDate: @@ -7380,6 +7864,19 @@ const deserializeAws_json1_1ListMailboxPermissionsResponse = ( } as any; }; +const deserializeAws_json1_1ListMobileDeviceAccessOverridesResponse = ( + output: any, + context: __SerdeContext +): ListMobileDeviceAccessOverridesResponse => { + return { + NextToken: __expectString(output.NextToken), + Overrides: + output.Overrides !== undefined && output.Overrides !== null + ? deserializeAws_json1_1MobileDeviceAccessOverridesList(output.Overrides, context) + : undefined, + } as any; +}; + const deserializeAws_json1_1ListMobileDeviceAccessRulesResponse = ( output: any, context: __SerdeContext @@ -7540,6 +8037,40 @@ const deserializeAws_json1_1MobileDeviceAccessMatchedRuleList = ( }); }; +const deserializeAws_json1_1MobileDeviceAccessOverride = ( + output: any, + context: __SerdeContext +): MobileDeviceAccessOverride => { + return { + DateCreated: + output.DateCreated !== undefined && output.DateCreated !== null + ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DateCreated))) + : undefined, + DateModified: + output.DateModified !== undefined && output.DateModified !== null + ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DateModified))) + : undefined, + Description: __expectString(output.Description), + DeviceId: __expectString(output.DeviceId), + Effect: __expectString(output.Effect), + UserId: __expectString(output.UserId), + } as any; +}; + +const deserializeAws_json1_1MobileDeviceAccessOverridesList = ( + output: any, + context: __SerdeContext +): MobileDeviceAccessOverride[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return deserializeAws_json1_1MobileDeviceAccessOverride(entry, context); + }); +}; + const deserializeAws_json1_1MobileDeviceAccessRule = (output: any, context: __SerdeContext): MobileDeviceAccessRule => { return { DateCreated: @@ -7698,6 +8229,13 @@ const deserializeAws_json1_1PutMailboxPermissionsResponse = ( return {} as any; }; +const deserializeAws_json1_1PutMobileDeviceAccessOverrideResponse = ( + output: any, + context: __SerdeContext +): PutMobileDeviceAccessOverrideResponse => { + return {} as any; +}; + const deserializeAws_json1_1PutRetentionPolicyResponse = ( output: any, context: __SerdeContext diff --git a/clients/client-workspaces/src/WorkSpaces.ts b/clients/client-workspaces/src/WorkSpaces.ts index 50288ee804566..ea1c47355df2c 100644 --- a/clients/client-workspaces/src/WorkSpaces.ts +++ b/clients/client-workspaces/src/WorkSpaces.ts @@ -31,6 +31,11 @@ import { CreateIpGroupCommandOutput, } from "./commands/CreateIpGroupCommand"; import { CreateTagsCommand, CreateTagsCommandInput, CreateTagsCommandOutput } from "./commands/CreateTagsCommand"; +import { + CreateUpdatedWorkspaceImageCommand, + CreateUpdatedWorkspaceImageCommandInput, + CreateUpdatedWorkspaceImageCommandOutput, +} from "./commands/CreateUpdatedWorkspaceImageCommand"; import { CreateWorkspaceBundleCommand, CreateWorkspaceBundleCommandInput, @@ -376,17 +381,14 @@ export class WorkSpaces extends WorkSpacesClient { * * Copy a Custom WorkSpaces Image.

                  * - * - *

                  In the China (Ningxia) Region, you can copy images only within the same Region.

                  + *

                  In the China (Ningxia) Region, you can copy images only within the same Region.

                  * - *

                  In the AWS GovCloud (US-West) Region, to copy images to and from other AWS Regions, - * contact AWS Support.

                  - *
                  + *

                  In Amazon Web Services GovCloud (US), to copy images to and from other Regions, contact Amazon Web Services Support.

                  * * *

                  Before copying a shared image, be sure to verify that it has been shared from the - * correct AWS account. To determine if an image has been shared and to see the AWS - * account ID that owns an image, use the DescribeWorkSpaceImages and DescribeWorkspaceImagePermissions API operations.

                  + * correct Amazon Web Services account. To determine if an image has been shared and to see the + * ID of the Amazon Web Services account that owns an image, use the DescribeWorkSpaceImages and DescribeWorkspaceImagePermissions API operations.

                  *
                  */ public copyWorkspaceImage( @@ -519,6 +521,61 @@ export class WorkSpaces extends WorkSpacesClient { } } + /** + *

                  Creates a new updated WorkSpace image based on the specified source image. The + * new updated WorkSpace image has the latest drivers and other updates required by + * the Amazon WorkSpaces components.

                  + * + *

                  To determine which WorkSpace images need to be updated with the latest Amazon + * WorkSpaces requirements, use + * + * DescribeWorkspaceImages.

                  + * + * + *
                    + *
                  • + *

                    Only Windows 10 WorkSpace images can be programmatically updated at this time.

                    + *
                  • + *
                  • + *

                    Microsoft Windows updates and other application updates are not included + * in the update process.

                    + *
                  • + *
                  • + *

                    The source WorkSpace image is not deleted. You can delete the source image after you've + * verified your new updated image and created a new bundle.

                    + *
                  • + *
                  + *
                  + */ + public createUpdatedWorkspaceImage( + args: CreateUpdatedWorkspaceImageCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public createUpdatedWorkspaceImage( + args: CreateUpdatedWorkspaceImageCommandInput, + cb: (err: any, data?: CreateUpdatedWorkspaceImageCommandOutput) => void + ): void; + public createUpdatedWorkspaceImage( + args: CreateUpdatedWorkspaceImageCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateUpdatedWorkspaceImageCommandOutput) => void + ): void; + public createUpdatedWorkspaceImage( + args: CreateUpdatedWorkspaceImageCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: CreateUpdatedWorkspaceImageCommandOutput) => void), + cb?: (err: any, data?: CreateUpdatedWorkspaceImageCommandOutput) => void + ): Promise | void { + const command = new CreateUpdatedWorkspaceImageCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + /** *

                  Creates the specified WorkSpace bundle. For more information about creating WorkSpace bundles, see * @@ -772,7 +829,7 @@ export class WorkSpaces extends WorkSpacesClient { * If there are no WorkSpaces being used with your Simple AD or AD Connector directory for 30 * consecutive days, this directory will be automatically deregistered for use with Amazon WorkSpaces, * and you will be charged for this directory as per the - * AWS Directory Services pricing terms.

                  + * Directory Service pricing terms.

                  * *

                  To delete empty directories, see * @@ -943,7 +1000,7 @@ export class WorkSpaces extends WorkSpacesClient { } /** - *

                  Describes the permissions that the owner of a connection alias has granted to another AWS account for + *

                  Describes the permissions that the owner of a connection alias has granted to another Amazon Web Services account for * the specified connection alias. For more information, see * Cross-Region Redirection for Amazon WorkSpaces.

                  */ @@ -1105,7 +1162,7 @@ export class WorkSpaces extends WorkSpacesClient { /** *

                  Describes the permissions that the owner of an image has granted to other - * AWS accounts for an image.

                  + * Amazon Web Services accounts for an image.

                  */ public describeWorkspaceImagePermissions( args: DescribeWorkspaceImagePermissionsCommandInput, @@ -1269,7 +1326,7 @@ export class WorkSpaces extends WorkSpacesClient { /** *

                  Disassociates a connection alias from a directory. Disassociating a connection alias disables cross-Region - * redirection between two directories in different AWS Regions. For more information, see + * redirection between two directories in different Regions. For more information, see * * Cross-Region Redirection for Amazon WorkSpaces.

                  * @@ -1341,8 +1398,8 @@ export class WorkSpaces extends WorkSpacesClient { /** *

                  Imports the specified Windows 10 Bring Your Own License (BYOL) image into Amazon - * WorkSpaces. The image must be an already licensed Amazon EC2 image that is in your AWS - * account, and you must own the image. For more information about creating BYOL images, see + * WorkSpaces. The image must be an already licensed Amazon EC2 image that is in your + * Amazon Web Services account, and you must own the image. For more information about creating BYOL images, see * * Bring Your Own Windows Desktop Licenses.

                  */ @@ -1379,7 +1436,7 @@ export class WorkSpaces extends WorkSpacesClient { *

                  Retrieves a list of IP address ranges, specified as IPv4 CIDR blocks, that you can use * for the network management interface when you enable Bring Your Own License (BYOL).

                  * - *

                  This operation can be run only by AWS accounts that are enabled for BYOL. If your account + *

                  This operation can be run only by Amazon Web Services accounts that are enabled for BYOL. If your account * isn't enabled for BYOL, you'll receive an AccessDeniedException error.

                  * *

                  The management network interface is connected to a secure Amazon WorkSpaces management @@ -1947,7 +2004,7 @@ export class WorkSpaces extends WorkSpacesClient { * * *

                  Terminating a WorkSpace is a permanent action and cannot be undone. The user's data is - * destroyed. If you need to archive any user data, contact AWS Support before + * destroyed. If you need to archive any user data, contact Amazon Web Services Support before * terminating the WorkSpace.

                  * * @@ -1965,7 +2022,7 @@ export class WorkSpaces extends WorkSpacesClient { * If there are no WorkSpaces being used with your Simple AD or AD Connector directory for 30 * consecutive days, this directory will be automatically deregistered for use with Amazon WorkSpaces, * and you will be charged for this directory as per the - * AWS Directory Services pricing terms.

                  + * Directory Service pricing terms.

                  * *

                  To delete empty directories, see * @@ -2128,18 +2185,15 @@ export class WorkSpaces extends WorkSpacesClient { } /** - *

                  Shares or unshares an image with one account in the same AWS Region by specifying whether that account has + *

                  Shares or unshares an image with one account in the same Amazon Web Services Region by specifying whether that account has * permission to copy the image. If the copy image permission is granted, the image is shared with that account. * If the copy image permission is revoked, the image is unshared with the account.

                  * - *

                  After an image has been shared, the recipient account can copy the image to other AWS Regions as needed.

                  + *

                  After an image has been shared, the recipient account can copy the image to other Regions as needed.

                  * - * - *

                  In the China (Ningxia) Region, you can copy images only within the same Region.

                  + *

                  In the China (Ningxia) Region, you can copy images only within the same Region.

                  * - *

                  In the AWS GovCloud (US-West) Region, to copy images to and from other AWS Regions, - * contact AWS Support.

                  - *
                  + *

                  In Amazon Web Services GovCloud (US), to copy images to and from other Regions, contact Amazon Web Services Support.

                  * *

                  For more information about sharing images, see * @@ -2151,9 +2205,9 @@ export class WorkSpaces extends WorkSpacesClient { *

                  To delete an image that has been shared, you must unshare the image before you delete it.

                  *
                • *
                • - *

                  Sharing Bring Your Own License (BYOL) images across AWS accounts isn't supported at - * this time in the AWS GovCloud (US-West) Region. To share BYOL images across accounts in - * the AWS GovCloud (US-West) Region, contact AWS Support.

                  + *

                  Sharing Bring Your Own License (BYOL) images across Amazon Web Services accounts isn't supported at + * this time in Amazon Web Services GovCloud (US). To share BYOL images across accounts in + * Amazon Web Services GovCloud (US), contact Amazon Web Services Support.

                  *
                • *
                * diff --git a/clients/client-workspaces/src/WorkSpacesClient.ts b/clients/client-workspaces/src/WorkSpacesClient.ts index 0c7d49e235fbb..35eb01265d269 100644 --- a/clients/client-workspaces/src/WorkSpacesClient.ts +++ b/clients/client-workspaces/src/WorkSpacesClient.ts @@ -62,6 +62,10 @@ import { } from "./commands/CreateConnectionAliasCommand"; import { CreateIpGroupCommandInput, CreateIpGroupCommandOutput } from "./commands/CreateIpGroupCommand"; import { CreateTagsCommandInput, CreateTagsCommandOutput } from "./commands/CreateTagsCommand"; +import { + CreateUpdatedWorkspaceImageCommandInput, + CreateUpdatedWorkspaceImageCommandOutput, +} from "./commands/CreateUpdatedWorkspaceImageCommand"; import { CreateWorkspaceBundleCommandInput, CreateWorkspaceBundleCommandOutput, @@ -211,6 +215,7 @@ export type ServiceInputTypes = | CreateConnectionAliasCommandInput | CreateIpGroupCommandInput | CreateTagsCommandInput + | CreateUpdatedWorkspaceImageCommandInput | CreateWorkspaceBundleCommandInput | CreateWorkspacesCommandInput | DeleteConnectionAliasCommandInput @@ -266,6 +271,7 @@ export type ServiceOutputTypes = | CreateConnectionAliasCommandOutput | CreateIpGroupCommandOutput | CreateTagsCommandOutput + | CreateUpdatedWorkspaceImageCommandOutput | CreateWorkspaceBundleCommandOutput | CreateWorkspacesCommandOutput | DeleteConnectionAliasCommandOutput diff --git a/clients/client-workspaces/src/commands/CopyWorkspaceImageCommand.ts b/clients/client-workspaces/src/commands/CopyWorkspaceImageCommand.ts index 262844f319cf6..3af2f307cc0bc 100644 --- a/clients/client-workspaces/src/commands/CopyWorkspaceImageCommand.ts +++ b/clients/client-workspaces/src/commands/CopyWorkspaceImageCommand.ts @@ -27,17 +27,14 @@ export interface CopyWorkspaceImageCommandOutput extends CopyWorkspaceImageResul * * Copy a Custom WorkSpaces Image.

                * - * - *

                In the China (Ningxia) Region, you can copy images only within the same Region.

                + *

                In the China (Ningxia) Region, you can copy images only within the same Region.

                * - *

                In the AWS GovCloud (US-West) Region, to copy images to and from other AWS Regions, - * contact AWS Support.

                - *
                + *

                In Amazon Web Services GovCloud (US), to copy images to and from other Regions, contact Amazon Web Services Support.

                * * *

                Before copying a shared image, be sure to verify that it has been shared from the - * correct AWS account. To determine if an image has been shared and to see the AWS - * account ID that owns an image, use the DescribeWorkSpaceImages and DescribeWorkspaceImagePermissions API operations.

                + * correct Amazon Web Services account. To determine if an image has been shared and to see the + * ID of the Amazon Web Services account that owns an image, use the DescribeWorkSpaceImages and DescribeWorkspaceImagePermissions API operations.

                *
                * @example * Use a bare-bones client and the command you need to make an API call. diff --git a/clients/client-workspaces/src/commands/CreateUpdatedWorkspaceImageCommand.ts b/clients/client-workspaces/src/commands/CreateUpdatedWorkspaceImageCommand.ts new file mode 100644 index 0000000000000..fbd659bf362d9 --- /dev/null +++ b/clients/client-workspaces/src/commands/CreateUpdatedWorkspaceImageCommand.ts @@ -0,0 +1,121 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { CreateUpdatedWorkspaceImageRequest, CreateUpdatedWorkspaceImageResult } from "../models/models_0"; +import { + deserializeAws_json1_1CreateUpdatedWorkspaceImageCommand, + serializeAws_json1_1CreateUpdatedWorkspaceImageCommand, +} from "../protocols/Aws_json1_1"; +import { ServiceInputTypes, ServiceOutputTypes, WorkSpacesClientResolvedConfig } from "../WorkSpacesClient"; + +export interface CreateUpdatedWorkspaceImageCommandInput extends CreateUpdatedWorkspaceImageRequest {} +export interface CreateUpdatedWorkspaceImageCommandOutput extends CreateUpdatedWorkspaceImageResult, __MetadataBearer {} + +/** + *

                Creates a new updated WorkSpace image based on the specified source image. The + * new updated WorkSpace image has the latest drivers and other updates required by + * the Amazon WorkSpaces components.

                + * + *

                To determine which WorkSpace images need to be updated with the latest Amazon + * WorkSpaces requirements, use + * + * DescribeWorkspaceImages.

                + * + * + *
                  + *
                • + *

                  Only Windows 10 WorkSpace images can be programmatically updated at this time.

                  + *
                • + *
                • + *

                  Microsoft Windows updates and other application updates are not included + * in the update process.

                  + *
                • + *
                • + *

                  The source WorkSpace image is not deleted. You can delete the source image after you've + * verified your new updated image and created a new bundle.

                  + *
                • + *
                + *
                + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { WorkSpacesClient, CreateUpdatedWorkspaceImageCommand } from "@aws-sdk/client-workspaces"; // ES Modules import + * // const { WorkSpacesClient, CreateUpdatedWorkspaceImageCommand } = require("@aws-sdk/client-workspaces"); // CommonJS import + * const client = new WorkSpacesClient(config); + * const command = new CreateUpdatedWorkspaceImageCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link CreateUpdatedWorkspaceImageCommandInput} for command's `input` shape. + * @see {@link CreateUpdatedWorkspaceImageCommandOutput} for command's `response` shape. + * @see {@link WorkSpacesClientResolvedConfig | config} for command's `input` shape. + * + */ +export class CreateUpdatedWorkspaceImageCommand extends $Command< + CreateUpdatedWorkspaceImageCommandInput, + CreateUpdatedWorkspaceImageCommandOutput, + WorkSpacesClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: CreateUpdatedWorkspaceImageCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WorkSpacesClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "WorkSpacesClient"; + const commandName = "CreateUpdatedWorkspaceImageCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: CreateUpdatedWorkspaceImageRequest.filterSensitiveLog, + outputFilterSensitiveLog: CreateUpdatedWorkspaceImageResult.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: CreateUpdatedWorkspaceImageCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_json1_1CreateUpdatedWorkspaceImageCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return deserializeAws_json1_1CreateUpdatedWorkspaceImageCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-workspaces/src/commands/DeregisterWorkspaceDirectoryCommand.ts b/clients/client-workspaces/src/commands/DeregisterWorkspaceDirectoryCommand.ts index c92ab63fdbc71..aef5d214915be 100644 --- a/clients/client-workspaces/src/commands/DeregisterWorkspaceDirectoryCommand.ts +++ b/clients/client-workspaces/src/commands/DeregisterWorkspaceDirectoryCommand.ts @@ -33,7 +33,7 @@ export interface DeregisterWorkspaceDirectoryCommandOutput * If there are no WorkSpaces being used with your Simple AD or AD Connector directory for 30 * consecutive days, this directory will be automatically deregistered for use with Amazon WorkSpaces, * and you will be charged for this directory as per the - * AWS Directory Services pricing terms.

                + * Directory Service pricing terms.

                * *

                To delete empty directories, see * diff --git a/clients/client-workspaces/src/commands/DescribeConnectionAliasPermissionsCommand.ts b/clients/client-workspaces/src/commands/DescribeConnectionAliasPermissionsCommand.ts index f0eeeb7da689b..2ba4ef09b5955 100644 --- a/clients/client-workspaces/src/commands/DescribeConnectionAliasPermissionsCommand.ts +++ b/clients/client-workspaces/src/commands/DescribeConnectionAliasPermissionsCommand.ts @@ -27,7 +27,7 @@ export interface DescribeConnectionAliasPermissionsCommandOutput __MetadataBearer {} /** - *

                Describes the permissions that the owner of a connection alias has granted to another AWS account for + *

                Describes the permissions that the owner of a connection alias has granted to another Amazon Web Services account for * the specified connection alias. For more information, see * Cross-Region Redirection for Amazon WorkSpaces.

                * @example diff --git a/clients/client-workspaces/src/commands/DescribeWorkspaceImagePermissionsCommand.ts b/clients/client-workspaces/src/commands/DescribeWorkspaceImagePermissionsCommand.ts index 5212ec9f40fb4..db9aecf271295 100644 --- a/clients/client-workspaces/src/commands/DescribeWorkspaceImagePermissionsCommand.ts +++ b/clients/client-workspaces/src/commands/DescribeWorkspaceImagePermissionsCommand.ts @@ -25,7 +25,7 @@ export interface DescribeWorkspaceImagePermissionsCommandOutput /** *

                Describes the permissions that the owner of an image has granted to other - * AWS accounts for an image.

                + * Amazon Web Services accounts for an image.

                * @example * Use a bare-bones client and the command you need to make an API call. * ```javascript diff --git a/clients/client-workspaces/src/commands/DisassociateConnectionAliasCommand.ts b/clients/client-workspaces/src/commands/DisassociateConnectionAliasCommand.ts index 85e18e998d700..27584a64ab283 100644 --- a/clients/client-workspaces/src/commands/DisassociateConnectionAliasCommand.ts +++ b/clients/client-workspaces/src/commands/DisassociateConnectionAliasCommand.ts @@ -23,7 +23,7 @@ export interface DisassociateConnectionAliasCommandOutput extends DisassociateCo /** *

                Disassociates a connection alias from a directory. Disassociating a connection alias disables cross-Region - * redirection between two directories in different AWS Regions. For more information, see + * redirection between two directories in different Regions. For more information, see * * Cross-Region Redirection for Amazon WorkSpaces.

                * diff --git a/clients/client-workspaces/src/commands/ImportWorkspaceImageCommand.ts b/clients/client-workspaces/src/commands/ImportWorkspaceImageCommand.ts index 78cb8dc49bdde..80d3ce1b92246 100644 --- a/clients/client-workspaces/src/commands/ImportWorkspaceImageCommand.ts +++ b/clients/client-workspaces/src/commands/ImportWorkspaceImageCommand.ts @@ -23,8 +23,8 @@ export interface ImportWorkspaceImageCommandOutput extends ImportWorkspaceImageR /** *

                Imports the specified Windows 10 Bring Your Own License (BYOL) image into Amazon - * WorkSpaces. The image must be an already licensed Amazon EC2 image that is in your AWS - * account, and you must own the image. For more information about creating BYOL images, see + * WorkSpaces. The image must be an already licensed Amazon EC2 image that is in your + * Amazon Web Services account, and you must own the image. For more information about creating BYOL images, see * * Bring Your Own Windows Desktop Licenses.

                * @example diff --git a/clients/client-workspaces/src/commands/ListAvailableManagementCidrRangesCommand.ts b/clients/client-workspaces/src/commands/ListAvailableManagementCidrRangesCommand.ts index 49f9504e5b2d2..1b9b21d477384 100644 --- a/clients/client-workspaces/src/commands/ListAvailableManagementCidrRangesCommand.ts +++ b/clients/client-workspaces/src/commands/ListAvailableManagementCidrRangesCommand.ts @@ -27,7 +27,7 @@ export interface ListAvailableManagementCidrRangesCommandOutput *

                Retrieves a list of IP address ranges, specified as IPv4 CIDR blocks, that you can use * for the network management interface when you enable Bring Your Own License (BYOL).

                * - *

                This operation can be run only by AWS accounts that are enabled for BYOL. If your account + *

                This operation can be run only by Amazon Web Services accounts that are enabled for BYOL. If your account * isn't enabled for BYOL, you'll receive an AccessDeniedException error.

                * *

                The management network interface is connected to a secure Amazon WorkSpaces management diff --git a/clients/client-workspaces/src/commands/TerminateWorkspacesCommand.ts b/clients/client-workspaces/src/commands/TerminateWorkspacesCommand.ts index 994a1023019bd..562135e9f48f4 100644 --- a/clients/client-workspaces/src/commands/TerminateWorkspacesCommand.ts +++ b/clients/client-workspaces/src/commands/TerminateWorkspacesCommand.ts @@ -26,7 +26,7 @@ export interface TerminateWorkspacesCommandOutput extends TerminateWorkspacesRes * * *

                Terminating a WorkSpace is a permanent action and cannot be undone. The user's data is - * destroyed. If you need to archive any user data, contact AWS Support before + * destroyed. If you need to archive any user data, contact Amazon Web Services Support before * terminating the WorkSpace.

                * * @@ -44,7 +44,7 @@ export interface TerminateWorkspacesCommandOutput extends TerminateWorkspacesRes * If there are no WorkSpaces being used with your Simple AD or AD Connector directory for 30 * consecutive days, this directory will be automatically deregistered for use with Amazon WorkSpaces, * and you will be charged for this directory as per the - * AWS Directory Services pricing terms.

                + * Directory Service pricing terms.

                * *

                To delete empty directories, see * diff --git a/clients/client-workspaces/src/commands/UpdateWorkspaceImagePermissionCommand.ts b/clients/client-workspaces/src/commands/UpdateWorkspaceImagePermissionCommand.ts index 80a0e003e3e69..18c9469b98d42 100644 --- a/clients/client-workspaces/src/commands/UpdateWorkspaceImagePermissionCommand.ts +++ b/clients/client-workspaces/src/commands/UpdateWorkspaceImagePermissionCommand.ts @@ -24,18 +24,15 @@ export interface UpdateWorkspaceImagePermissionCommandOutput __MetadataBearer {} /** - *

                Shares or unshares an image with one account in the same AWS Region by specifying whether that account has + *

                Shares or unshares an image with one account in the same Amazon Web Services Region by specifying whether that account has * permission to copy the image. If the copy image permission is granted, the image is shared with that account. * If the copy image permission is revoked, the image is unshared with the account.

                * - *

                After an image has been shared, the recipient account can copy the image to other AWS Regions as needed.

                + *

                After an image has been shared, the recipient account can copy the image to other Regions as needed.

                * - * - *

                In the China (Ningxia) Region, you can copy images only within the same Region.

                + *

                In the China (Ningxia) Region, you can copy images only within the same Region.

                * - *

                In the AWS GovCloud (US-West) Region, to copy images to and from other AWS Regions, - * contact AWS Support.

                - *
                + *

                In Amazon Web Services GovCloud (US), to copy images to and from other Regions, contact Amazon Web Services Support.

                * *

                For more information about sharing images, see * @@ -47,9 +44,9 @@ export interface UpdateWorkspaceImagePermissionCommandOutput *

                To delete an image that has been shared, you must unshare the image before you delete it.

                *
              • *
              • - *

                Sharing Bring Your Own License (BYOL) images across AWS accounts isn't supported at - * this time in the AWS GovCloud (US-West) Region. To share BYOL images across accounts in - * the AWS GovCloud (US-West) Region, contact AWS Support.

                + *

                Sharing Bring Your Own License (BYOL) images across Amazon Web Services accounts isn't supported at + * this time in Amazon Web Services GovCloud (US). To share BYOL images across accounts in + * Amazon Web Services GovCloud (US), contact Amazon Web Services Support.

                *
              • *
              * diff --git a/clients/client-workspaces/src/index.ts b/clients/client-workspaces/src/index.ts index 0be2a9b561342..edf3dec4db65a 100644 --- a/clients/client-workspaces/src/index.ts +++ b/clients/client-workspaces/src/index.ts @@ -7,6 +7,7 @@ export * from "./commands/CopyWorkspaceImageCommand"; export * from "./commands/CreateConnectionAliasCommand"; export * from "./commands/CreateIpGroupCommand"; export * from "./commands/CreateTagsCommand"; +export * from "./commands/CreateUpdatedWorkspaceImageCommand"; export * from "./commands/CreateWorkspaceBundleCommand"; export * from "./commands/CreateWorkspacesCommand"; export * from "./commands/DeleteConnectionAliasCommand"; diff --git a/clients/client-workspaces/src/models/models_0.ts b/clients/client-workspaces/src/models/models_0.ts index 012884481c3c6..23c16df90bca6 100644 --- a/clients/client-workspaces/src/models/models_0.ts +++ b/clients/client-workspaces/src/models/models_0.ts @@ -425,7 +425,7 @@ export interface WorkspaceBundle { /** *

              The owner of the bundle. This is the account identifier of the owner, or - * AMAZON if the bundle is provided by AWS.

              + * AMAZON if the bundle is provided by Amazon Web Services.

              */ Owner?: string; @@ -537,7 +537,7 @@ export interface ConnectionAliasAssociation { AssociationStatus?: AssociationStatus | string; /** - *

              The identifier of the AWS account that associated the connection alias with a directory.

              + *

              The identifier of the Amazon Web Services account that associated the connection alias with a directory.

              */ AssociatedAccountId?: string; @@ -591,7 +591,7 @@ export interface ConnectionAlias { State?: ConnectionAliasState | string; /** - *

              The identifier of the AWS account that owns the connection alias.

              + *

              The identifier of the Amazon Web Services account that owns the connection alias.

              */ OwnerAccountId?: string; @@ -617,12 +617,12 @@ export namespace ConnectionAlias { */ export interface ConnectionAliasPermission { /** - *

              The identifier of the AWS account that the connection alias is shared with.

              + *

              The identifier of the Amazon Web Services account that the connection alias is shared with.

              */ SharedAccountId: string | undefined; /** - *

              Indicates whether the specified AWS account is allowed to associate the connection alias with a directory.

              + *

              Indicates whether the specified Amazon Web Services account is allowed to associate the connection alias with a directory.

              */ AllowAssociation: boolean | undefined; } @@ -767,7 +767,7 @@ export interface CreateConnectionAliasRequest { *

              A connection string in the form of a fully qualified domain name (FQDN), such as www.example.com.

              * * - *

              After you create a connection string, it is always associated to your AWS account. You cannot recreate the same + *

              After you create a connection string, it is always associated to your Amazon Web Services account. You cannot recreate the same * connection string with a different account, even if you delete all instances of it from the original account. The * connection string is globally reserved for your account.

              *
              @@ -903,6 +903,58 @@ export namespace CreateTagsResult { }); } +export interface CreateUpdatedWorkspaceImageRequest { + /** + *

              The name of the new updated WorkSpace image.

              + */ + Name: string | undefined; + + /** + *

              A description of whether updates for the WorkSpace image are available.

              + */ + Description: string | undefined; + + /** + *

              The identifier of the source WorkSpace image.

              + */ + SourceImageId: string | undefined; + + /** + *

              The tags that you want to add to the new updated WorkSpace image.

              + * + * + *

              To add tags at the same time when you're creating the updated image, you must create + * an IAM policy that grants your IAM user permissions to use workspaces:CreateTags.

              + *
              + */ + Tags?: Tag[]; +} + +export namespace CreateUpdatedWorkspaceImageRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: CreateUpdatedWorkspaceImageRequest): any => ({ + ...obj, + }); +} + +export interface CreateUpdatedWorkspaceImageResult { + /** + *

              The identifier of the new updated WorkSpace image.

              + */ + ImageId?: string; +} + +export namespace CreateUpdatedWorkspaceImageResult { + /** + * @internal + */ + export const filterSensitiveLog = (obj: CreateUpdatedWorkspaceImageResult): any => ({ + ...obj, + }); +} + export interface CreateWorkspaceBundleRequest { /** *

              The name of the bundle.

              @@ -1023,14 +1075,14 @@ export namespace WorkspaceProperties { */ export interface WorkspaceRequest { /** - *

              The identifier of the AWS Directory Service directory for the WorkSpace. You can use + *

              The identifier of the Directory Service directory for the WorkSpace. You can use * DescribeWorkspaceDirectories to list the available directories.

              */ DirectoryId: string | undefined; /** - *

              The user name of the user for the WorkSpace. This user name must exist in the AWS - * Directory Service directory for the WorkSpace.

              + *

              The user name of the user for the WorkSpace. This user name must exist in the Directory Service + * directory for the WorkSpace.

              */ UserName: string | undefined; @@ -1040,8 +1092,8 @@ export interface WorkspaceRequest { BundleId: string | undefined; /** - *

              The symmetric AWS KMS customer master key (CMK) used to encrypt data stored on your WorkSpace. - * Amazon WorkSpaces does not support asymmetric CMKs.

              + *

              The symmetric KMS key used to encrypt data stored on your WorkSpace. + * Amazon WorkSpaces does not support asymmetric KMS keys.

              */ VolumeEncryptionKey?: string; @@ -1186,7 +1238,7 @@ export interface Workspace { WorkspaceId?: string; /** - *

              The identifier of the AWS Directory Service directory for the WorkSpace.

              + *

              The identifier of the Directory Service directory for the WorkSpace.

              */ DirectoryId?: string; @@ -1243,8 +1295,8 @@ export interface Workspace { ComputerName?: string; /** - *

              The symmetric AWS KMS customer master key (CMK) used to encrypt data stored on your WorkSpace. - * Amazon WorkSpaces does not support asymmetric CMKs.

              + *

              The symmetric KMS key used to encrypt data stored on your WorkSpace. + * Amazon WorkSpaces does not support asymmetric KMS keys.

              */ VolumeEncryptionKey?: string; @@ -1868,8 +1920,8 @@ export interface DescribeWorkspaceBundlesRequest { /** *

              The owner of the bundles. You cannot combine this parameter with any other filter.

              - *

              To describe the bundles provided by AWS, specify AMAZON. To describe the - * bundles that belong to your account, don't specify a value.

              + *

              To describe the bundles provided by Amazon Web Services, specify AMAZON. + * To describe the bundles that belong to your account, don't specify a value.

              */ Owner?: string; @@ -2005,18 +2057,12 @@ export enum Tenancy { */ export interface WorkspaceAccessProperties { /** - *

              Indicates whether users can use Windows clients to access their WorkSpaces. To restrict - * WorkSpaces access to trusted devices (also known as managed devices) with valid - * certificates, specify a value of TRUST. For more information, see Restrict - * WorkSpaces Access to Trusted Devices.

              + *

              Indicates whether users can use Windows clients to access their WorkSpaces.

              */ DeviceTypeWindows?: AccessPropertyValue | string; /** - *

              Indicates whether users can use macOS clients to access their WorkSpaces. To restrict - * WorkSpaces access to trusted devices (also known as managed devices) with valid - * certificates, specify a value of TRUST. For more information, see Restrict - * WorkSpaces Access to Trusted Devices.

              + *

              Indicates whether users can use macOS clients to access their WorkSpaces.

              */ DeviceTypeOsx?: AccessPropertyValue | string; @@ -2031,7 +2077,8 @@ export interface WorkspaceAccessProperties { DeviceTypeIos?: AccessPropertyValue | string; /** - *

              Indicates whether users can use Android devices to access their WorkSpaces.

              + *

              Indicates whether users can use Android and Android-compatible Chrome OS devices + * to access their WorkSpaces.

              */ DeviceTypeAndroid?: AccessPropertyValue | string; @@ -2213,14 +2260,14 @@ export namespace DescribeWorkspaceImagePermissionsRequest { } /** - *

              Describes the AWS accounts that have been granted permission to use a shared image. For more - * information about sharing images, see + *

              Describes the Amazon Web Services accounts that have been granted permission to use a shared image. + * For more information about sharing images, see * * Share or Unshare a Custom WorkSpaces Image.

              */ export interface ImagePermission { /** - *

              The identifier of the AWS account that an image has been shared with.

              + *

              The identifier of the Amazon Web Services account that an image has been shared with.

              */ SharedAccountId?: string; } @@ -2241,7 +2288,7 @@ export interface DescribeWorkspaceImagePermissionsResult { ImageId?: string; /** - *

              The identifiers of the AWS accounts that the image has been shared with.

              + *

              The identifiers of the Amazon Web Services accounts that the image has been shared with.

              */ ImagePermissions?: ImagePermission[]; @@ -2332,6 +2379,35 @@ export enum WorkspaceImageState { PENDING = "PENDING", } +/** + *

              Describes whether a WorkSpace image needs to be updated with the latest + * drivers and other components required by Amazon WorkSpaces.

              + * + * + *

              Only Windows 10 WorkSpace images can be programmatically updated at this time.

              + *
              + */ +export interface UpdateResult { + /** + *

              Indicates whether updated drivers or other components are available for the specified WorkSpace image.

              + */ + UpdateAvailable?: boolean; + + /** + *

              A description of whether updates for the WorkSpace image are pending or available.

              + */ + Description?: string; +} + +export namespace UpdateResult { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UpdateResult): any => ({ + ...obj, + }); +} + /** *

              Describes a WorkSpace image.

              */ @@ -2380,15 +2456,20 @@ export interface WorkspaceImage { ErrorMessage?: string; /** - *

              The date when the image was created. If the image has been shared, the AWS account + *

              The date when the image was created. If the image has been shared, the Amazon Web Services account * that the image has been shared with sees the original creation date of the image.

              */ Created?: Date; /** - *

              The identifier of the AWS account that owns the image.

              + *

              The identifier of the Amazon Web Services account that owns the image.

              */ OwnerAccountId?: string; + + /** + *

              The updates (if any) that are available for the specified image.

              + */ + Updates?: UpdateResult; } export namespace WorkspaceImage { @@ -3371,7 +3452,7 @@ export interface RegisterWorkspaceDirectoryRequest { /** *

              Indicates whether your WorkSpace directory is dedicated or shared. To use Bring Your Own - * License (BYOL) images, this value must be set to DEDICATED and your AWS account must be + * License (BYOL) images, this value must be set to DEDICATED and your Amazon Web Services account must be * enabled for BYOL. If your account has not been enabled for BYOL, you will receive an * InvalidParameterValuesException error. For more information about BYOL images, see * Bring Your Own Windows Desktop Images.

              @@ -3663,7 +3744,7 @@ export interface UpdateConnectionAliasPermissionRequest { AliasId: string | undefined; /** - *

              Indicates whether to share or unshare the connection alias with the specified AWS account.

              + *

              Indicates whether to share or unshare the connection alias with the specified Amazon Web Services account.

              */ ConnectionAliasPermission: ConnectionAliasPermission | undefined; } @@ -3765,10 +3846,10 @@ export interface UpdateWorkspaceImagePermissionRequest { AllowCopyImage: boolean | undefined; /** - *

              The identifier of the AWS account to share or unshare the image with.

              + *

              The identifier of the Amazon Web Services account to share or unshare the image with.

              * * - *

              Before sharing the image, confirm that you are sharing to the correct AWS account ID.

              + *

              Before sharing the image, confirm that you are sharing to the correct Amazon Web Services account ID.

              *
              */ SharedAccountId: string | undefined; diff --git a/clients/client-workspaces/src/protocols/Aws_json1_1.ts b/clients/client-workspaces/src/protocols/Aws_json1_1.ts index 02277b89ff525..70930beb0f6cf 100644 --- a/clients/client-workspaces/src/protocols/Aws_json1_1.ts +++ b/clients/client-workspaces/src/protocols/Aws_json1_1.ts @@ -29,6 +29,10 @@ import { } from "../commands/CreateConnectionAliasCommand"; import { CreateIpGroupCommandInput, CreateIpGroupCommandOutput } from "../commands/CreateIpGroupCommand"; import { CreateTagsCommandInput, CreateTagsCommandOutput } from "../commands/CreateTagsCommand"; +import { + CreateUpdatedWorkspaceImageCommandInput, + CreateUpdatedWorkspaceImageCommandOutput, +} from "../commands/CreateUpdatedWorkspaceImageCommand"; import { CreateWorkspaceBundleCommandInput, CreateWorkspaceBundleCommandOutput, @@ -192,6 +196,8 @@ import { CreateIpGroupResult, CreateTagsRequest, CreateTagsResult, + CreateUpdatedWorkspaceImageRequest, + CreateUpdatedWorkspaceImageResult, CreateWorkspaceBundleRequest, CreateWorkspaceBundleResult, CreateWorkspacesRequest, @@ -306,6 +312,7 @@ import { UnsupportedWorkspaceConfigurationException, UpdateConnectionAliasPermissionRequest, UpdateConnectionAliasPermissionResult, + UpdateResult, UpdateRulesOfIpGroupRequest, UpdateRulesOfIpGroupResult, UpdateWorkspaceBundleRequest, @@ -417,6 +424,19 @@ export const serializeAws_json1_1CreateTagsCommand = async ( return buildHttpRpcRequest(context, headers, "/", undefined, body); }; +export const serializeAws_json1_1CreateUpdatedWorkspaceImageCommand = async ( + input: CreateUpdatedWorkspaceImageCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "WorkspacesService.CreateUpdatedWorkspaceImage", + }; + let body: any; + body = JSON.stringify(serializeAws_json1_1CreateUpdatedWorkspaceImageRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + export const serializeAws_json1_1CreateWorkspaceBundleCommand = async ( input: CreateWorkspaceBundleCommandInput, context: __SerdeContext @@ -1641,6 +1661,108 @@ const deserializeAws_json1_1CreateTagsCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; +export const deserializeAws_json1_1CreateUpdatedWorkspaceImageCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1CreateUpdatedWorkspaceImageCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1CreateUpdatedWorkspaceImageResult(data, context); + const response: CreateUpdatedWorkspaceImageCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; + +const deserializeAws_json1_1CreateUpdatedWorkspaceImageCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.workspaces#AccessDeniedException": + response = { + ...(await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterValuesException": + case "com.amazonaws.workspaces#InvalidParameterValuesException": + response = { + ...(await deserializeAws_json1_1InvalidParameterValuesExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidResourceStateException": + case "com.amazonaws.workspaces#InvalidResourceStateException": + response = { + ...(await deserializeAws_json1_1InvalidResourceStateExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "OperationNotSupportedException": + case "com.amazonaws.workspaces#OperationNotSupportedException": + response = { + ...(await deserializeAws_json1_1OperationNotSupportedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceAlreadyExistsException": + case "com.amazonaws.workspaces#ResourceAlreadyExistsException": + response = { + ...(await deserializeAws_json1_1ResourceAlreadyExistsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceLimitExceededException": + case "com.amazonaws.workspaces#ResourceLimitExceededException": + response = { + ...(await deserializeAws_json1_1ResourceLimitExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.workspaces#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + export const deserializeAws_json1_1CreateWorkspaceBundleCommand = async ( output: __HttpResponse, context: __SerdeContext @@ -5255,6 +5377,18 @@ const serializeAws_json1_1CreateTagsRequest = (input: CreateTagsRequest, context }; }; +const serializeAws_json1_1CreateUpdatedWorkspaceImageRequest = ( + input: CreateUpdatedWorkspaceImageRequest, + context: __SerdeContext +): any => { + return { + ...(input.Description !== undefined && input.Description !== null && { Description: input.Description }), + ...(input.Name !== undefined && input.Name !== null && { Name: input.Name }), + ...(input.SourceImageId !== undefined && input.SourceImageId !== null && { SourceImageId: input.SourceImageId }), + ...(input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_json1_1TagList(input.Tags, context) }), + }; +}; + const serializeAws_json1_1CreateWorkspaceBundleRequest = ( input: CreateWorkspaceBundleRequest, context: __SerdeContext @@ -6292,6 +6426,15 @@ const deserializeAws_json1_1CreateTagsResult = (output: any, context: __SerdeCon return {} as any; }; +const deserializeAws_json1_1CreateUpdatedWorkspaceImageResult = ( + output: any, + context: __SerdeContext +): CreateUpdatedWorkspaceImageResult => { + return { + ImageId: __expectString(output.ImageId), + } as any; +}; + const deserializeAws_json1_1CreateWorkspaceBundleResult = ( output: any, context: __SerdeContext @@ -7089,6 +7232,13 @@ const deserializeAws_json1_1UpdateConnectionAliasPermissionResult = ( return {} as any; }; +const deserializeAws_json1_1UpdateResult = (output: any, context: __SerdeContext): UpdateResult => { + return { + Description: __expectString(output.Description), + UpdateAvailable: __expectBoolean(output.UpdateAvailable), + } as any; +}; + const deserializeAws_json1_1UpdateRulesOfIpGroupResult = ( output: any, context: __SerdeContext @@ -7277,6 +7427,10 @@ const deserializeAws_json1_1WorkspaceImage = (output: any, context: __SerdeConte OwnerAccountId: __expectString(output.OwnerAccountId), RequiredTenancy: __expectString(output.RequiredTenancy), State: __expectString(output.State), + Updates: + output.Updates !== undefined && output.Updates !== null + ? deserializeAws_json1_1UpdateResult(output.Updates, context) + : undefined, } as any; }; diff --git a/codegen/sdk-codegen/aws-models/account.2021-02-01.json b/codegen/sdk-codegen/aws-models/account.2021-02-01.json new file mode 100644 index 0000000000000..f98b5016dace6 --- /dev/null +++ b/codegen/sdk-codegen/aws-models/account.2021-02-01.json @@ -0,0 +1,438 @@ +{ + "smithy": "1.0", + "shapes": { + "com.amazonaws.account#AccessDeniedException": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

              The operation failed because the calling identity doesn't have the minimum required\n permissions.

              ", + "smithy.api#error": "client", + "smithy.api#httpError": 403 + } + }, + "com.amazonaws.account#Account": { + "type": "service", + "version": "2021-02-01", + "resources": [ + { + "target": "com.amazonaws.account#AlternateContactResource" + } + ], + "traits": { + "aws.api#service": { + "sdkId": "Account", + "arnNamespace": "account", + "cloudFormationName": "Account", + "cloudTrailEventSource": "CLOUDTRAIL_EVENT_SOURCE", + "endpointPrefix": "account" + }, + "aws.auth#sigv4": { + "name": "account" + }, + "aws.protocols#restJson1": {}, + "smithy.api#cors": {}, + "smithy.api#documentation": "

              Operations for Amazon Web Services Account Management

              ", + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "pageSize": "MaxResults" + }, + "smithy.api#title": "AWS Account" + } + }, + "com.amazonaws.account#AccountId": { + "type": "string", + "traits": { + "smithy.api#pattern": "^\\d{12}$" + } + }, + "com.amazonaws.account#AlternateContact": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.account#Name", + "traits": { + "smithy.api#documentation": "

              The name associated with this alternate contact.

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

              The title associated with this alternate contact.

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

              The email address associated with this alternate contact.

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

              The phone number associated with this alternate contact.

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

              The type of alternate contact.

              " + } + } + }, + "traits": { + "smithy.api#documentation": "

              A structure that contains the details of an alternate contact associated with an Amazon Web Services\n account

              " + } + }, + "com.amazonaws.account#AlternateContactResource": { + "type": "resource", + "identifiers": { + "AlternateContactType": { + "target": "com.amazonaws.account#AlternateContactType" + } + }, + "put": { + "target": "com.amazonaws.account#PutAlternateContact" + }, + "read": { + "target": "com.amazonaws.account#GetAlternateContact" + }, + "delete": { + "target": "com.amazonaws.account#DeleteAlternateContact" + }, + "traits": { + "aws.api#arn": { + "template": "AlternateContact/{AlternateContactType}", + "absolute": false, + "noAccount": false, + "noRegion": false + } + } + }, + "com.amazonaws.account#AlternateContactType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "BILLING", + "name": "BILLING" + }, + { + "value": "OPERATIONS", + "name": "OPERATIONS" + }, + { + "value": "SECURITY", + "name": "SECURITY" + } + ] + } + }, + "com.amazonaws.account#DeleteAlternateContact": { + "type": "operation", + "input": { + "target": "com.amazonaws.account#DeleteAlternateContactRequest" + }, + "errors": [ + { + "target": "com.amazonaws.account#AccessDeniedException" + }, + { + "target": "com.amazonaws.account#InternalServerException" + }, + { + "target": "com.amazonaws.account#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.account#TooManyRequestsException" + }, + { + "target": "com.amazonaws.account#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

              Deletes the specified alternate contact from an Amazon Web Services account.

              \n

              For complete details about how to use the alternate contact operations, see Access or\n updating the alternate contacts.

              ", + "smithy.api#http": { + "method": "POST", + "uri": "/deleteAlternateContact", + "code": 200 + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.account#DeleteAlternateContactRequest": { + "type": "structure", + "members": { + "AlternateContactType": { + "target": "com.amazonaws.account#AlternateContactType", + "traits": { + "smithy.api#documentation": "

              Specifies which of the alternate contacts to delete.

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

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

              \n

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

              \n

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

              \n \n

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

              \n
              \n

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

              " + } + } + } + }, + "com.amazonaws.account#EmailAddress": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 64 + }, + "smithy.api#pattern": "[\\w+=,.-]+@[\\w.-]+\\.[\\w]+", + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.account#GetAlternateContact": { + "type": "operation", + "input": { + "target": "com.amazonaws.account#GetAlternateContactRequest" + }, + "output": { + "target": "com.amazonaws.account#GetAlternateContactResponse" + }, + "errors": [ + { + "target": "com.amazonaws.account#AccessDeniedException" + }, + { + "target": "com.amazonaws.account#InternalServerException" + }, + { + "target": "com.amazonaws.account#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.account#TooManyRequestsException" + }, + { + "target": "com.amazonaws.account#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

              Retrieves the specified alternate contact attached to an Amazon Web Services account.

              \n

              For complete details about how to use the alternate contact operations, see Access or\n updating the alternate contacts.

              ", + "smithy.api#http": { + "method": "POST", + "uri": "/getAlternateContact", + "code": 200 + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.account#GetAlternateContactRequest": { + "type": "structure", + "members": { + "AlternateContactType": { + "target": "com.amazonaws.account#AlternateContactType", + "traits": { + "smithy.api#documentation": "

              Specifies which alternate contact you want to retrieve.

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

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

              \n

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

              \n

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

              \n \n

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

              \n
              \n

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

              " + } + } + } + }, + "com.amazonaws.account#GetAlternateContactResponse": { + "type": "structure", + "members": { + "AlternateContact": { + "target": "com.amazonaws.account#AlternateContact", + "traits": { + "smithy.api#documentation": "

              A structure that contains the details for the specified alternate contact.

              " + } + } + } + }, + "com.amazonaws.account#InternalServerException": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

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

              ", + "smithy.api#error": "server", + "smithy.api#httpError": 500, + "smithy.api#retryable": {} + } + }, + "com.amazonaws.account#Name": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 64 + }, + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.account#PhoneNumber": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 25 + }, + "smithy.api#pattern": "^[\\s0-9()+-]+$", + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.account#PutAlternateContact": { + "type": "operation", + "input": { + "target": "com.amazonaws.account#PutAlternateContactRequest" + }, + "errors": [ + { + "target": "com.amazonaws.account#AccessDeniedException" + }, + { + "target": "com.amazonaws.account#InternalServerException" + }, + { + "target": "com.amazonaws.account#TooManyRequestsException" + }, + { + "target": "com.amazonaws.account#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

              Modifies the specified alternate contact attached to an Amazon Web Services account.

              \n

              For complete details about how to use the alternate contact operations, see Access or\n updating the alternate contacts.

              ", + "smithy.api#http": { + "method": "POST", + "uri": "/putAlternateContact", + "code": 200 + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.account#PutAlternateContactRequest": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.account#Name", + "traits": { + "smithy.api#documentation": "

              Specifies a name for the alternate contact.

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

              Specifies a title for the alternate contact.

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

              Specifies an email address for the alternate contact.

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

              Specifies a phone number for the alternate contact.

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

              Specifies which alternate contact you want to create or update.

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

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

              \n

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

              \n

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

              \n \n

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

              \n
              \n

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

              " + } + } + } + }, + "com.amazonaws.account#ResourceNotFoundException": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

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

              ", + "smithy.api#error": "client", + "smithy.api#httpError": 404 + } + }, + "com.amazonaws.account#Title": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 50 + }, + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.account#TooManyRequestsException": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

              The operation failed because it was called too frequently and exceeded a throttle\n limit.

              ", + "smithy.api#error": "client", + "smithy.api#httpError": 429, + "smithy.api#retryable": { + "throttling": true + } + } + }, + "com.amazonaws.account#ValidationException": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

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

              ", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + } + } +} diff --git a/codegen/sdk-codegen/aws-models/amp.2020-08-01.json b/codegen/sdk-codegen/aws-models/amp.2020-08-01.json index 4763423ddaa48..3375b223ac9bc 100644 --- a/codegen/sdk-codegen/aws-models/amp.2020-08-01.json +++ b/codegen/sdk-codegen/aws-models/amp.2020-08-01.json @@ -18,6 +18,136 @@ "smithy.api#httpError": 403 } }, + "com.amazonaws.amp#AlertManagerDefinition": { + "type": "resource", + "identifiers": { + "workspaceId": { + "target": "com.amazonaws.amp#WorkspaceId" + } + }, + "put": { + "target": "com.amazonaws.amp#CreateAlertManagerDefinition" + }, + "read": { + "target": "com.amazonaws.amp#DescribeAlertManagerDefinition" + }, + "update": { + "target": "com.amazonaws.amp#PutAlertManagerDefinition" + }, + "delete": { + "target": "com.amazonaws.amp#DeleteAlertManagerDefinition" + }, + "traits": { + "aws.api#arn": { + "template": "workspace/{workspaceId}", + "absolute": false, + "noAccount": false, + "noRegion": false + }, + "smithy.api#documentation": "The definition of the alert manager in the AMP workspace" + } + }, + "com.amazonaws.amp#AlertManagerDefinitionData": { + "type": "blob", + "traits": { + "smithy.api#documentation": "The alert manager definition data." + } + }, + "com.amazonaws.amp#AlertManagerDefinitionDescription": { + "type": "structure", + "members": { + "status": { + "target": "com.amazonaws.amp#AlertManagerDefinitionStatus", + "traits": { + "smithy.api#documentation": "The status of alert manager definition.", + "smithy.api#required": {} + } + }, + "data": { + "target": "com.amazonaws.amp#AlertManagerDefinitionData", + "traits": { + "smithy.api#documentation": "The alert manager definition.", + "smithy.api#required": {} + } + }, + "createdAt": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "The time when the alert manager definition was created.", + "smithy.api#required": {} + } + }, + "modifiedAt": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "The time when the alert manager definition was modified.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Represents the properties of an alert manager definition." + } + }, + "com.amazonaws.amp#AlertManagerDefinitionStatus": { + "type": "structure", + "members": { + "statusCode": { + "target": "com.amazonaws.amp#AlertManagerDefinitionStatusCode", + "traits": { + "smithy.api#documentation": "Status code of this definition.", + "smithy.api#required": {} + } + }, + "statusReason": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The reason for failure if any." + } + } + }, + "traits": { + "smithy.api#documentation": "Represents the status of a definition." + } + }, + "com.amazonaws.amp#AlertManagerDefinitionStatusCode": { + "type": "string", + "traits": { + "smithy.api#documentation": "State of an alert manager definition.", + "smithy.api#enum": [ + { + "value": "CREATING", + "name": "CREATING", + "documentation": "Definition is being created. Update/Deletion is disallowed until definition is ACTIVE and workspace status is ACTIVE." + }, + { + "value": "ACTIVE", + "name": "ACTIVE", + "documentation": "Definition has been created/updated. Update/Deletion is disallowed until definition is ACTIVE and workspace status is ACTIVE." + }, + { + "value": "UPDATING", + "name": "UPDATING", + "documentation": "Definition is being updated. Update/Deletion is disallowed until definition is ACTIVE and workspace status is ACTIVE." + }, + { + "value": "DELETING", + "name": "DELETING", + "documentation": "Definition is being deleting. Update/Deletion is disallowed until definition is ACTIVE and workspace status is ACTIVE." + }, + { + "value": "CREATION_FAILED", + "name": "CREATION_FAILED", + "documentation": "Definition creation failed." + }, + { + "value": "UPDATE_FAILED", + "name": "UPDATE_FAILED", + "documentation": "Definition update failed." + } + ] + } + }, "com.amazonaws.amp#AmazonPrometheusService": { "type": "service", "version": "2020-08-01", @@ -107,13 +237,13 @@ "smithy.api#httpError": 409 } }, - "com.amazonaws.amp#CreateWorkspace": { + "com.amazonaws.amp#CreateAlertManagerDefinition": { "type": "operation", "input": { - "target": "com.amazonaws.amp#CreateWorkspaceRequest" + "target": "com.amazonaws.amp#CreateAlertManagerDefinitionRequest" }, "output": { - "target": "com.amazonaws.amp#CreateWorkspaceResponse" + "target": "com.amazonaws.amp#CreateAlertManagerDefinitionResponse" }, "errors": [ { @@ -125,6 +255,9 @@ { "target": "com.amazonaws.amp#InternalServerException" }, + { + "target": "com.amazonaws.amp#ResourceNotFoundException" + }, { "target": "com.amazonaws.amp#ServiceQuotaExceededException" }, @@ -136,22 +269,31 @@ } ], "traits": { - "smithy.api#documentation": "Creates a new AMP workspace.", + "smithy.api#documentation": "Create an alert manager definition.", "smithy.api#http": { "method": "POST", - "uri": "/workspaces", + "uri": "/workspaces/{workspaceId}/alertmanager/definition", "code": 202 }, "smithy.api#idempotent": {} } }, - "com.amazonaws.amp#CreateWorkspaceRequest": { + "com.amazonaws.amp#CreateAlertManagerDefinitionRequest": { "type": "structure", "members": { - "alias": { - "target": "com.amazonaws.amp#WorkspaceAlias", + "workspaceId": { + "target": "com.amazonaws.amp#WorkspaceId", "traits": { - "smithy.api#documentation": "An optional user-assigned alias for this workspace. This alias is for user reference and does not need to be unique." + "smithy.api#documentation": "The ID of the workspace in which to create the alert manager definition.", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "data": { + "target": "com.amazonaws.amp#AlertManagerDefinitionData", + "traits": { + "smithy.api#documentation": "The alert manager definition data.", + "smithy.api#required": {} } }, "clientToken": { @@ -160,68 +302,51 @@ "smithy.api#documentation": "Optional, unique, case-sensitive, user-provided identifier to ensure the idempotency of the request.", "smithy.api#idempotencyToken": {} } - }, - "tags": { - "target": "com.amazonaws.amp#TagMap", - "traits": { - "smithy.api#documentation": "Optional, user-provided tags for this workspace." - } } }, "traits": { - "smithy.api#documentation": "Represents the input of a CreateWorkspace operation." + "smithy.api#documentation": "Represents the input of a CreateAlertManagerDefinition operation." } }, - "com.amazonaws.amp#CreateWorkspaceResponse": { + "com.amazonaws.amp#CreateAlertManagerDefinitionResponse": { "type": "structure", "members": { - "workspaceId": { - "target": "com.amazonaws.amp#WorkspaceId", - "traits": { - "smithy.api#documentation": "The generated ID of the workspace that was just created.", - "smithy.api#required": {} - } - }, - "arn": { - "target": "com.amazonaws.amp#WorkspaceArn", - "traits": { - "smithy.api#documentation": "The ARN of the workspace that was just created.", - "smithy.api#required": {} - } - }, "status": { - "target": "com.amazonaws.amp#WorkspaceStatus", + "target": "com.amazonaws.amp#AlertManagerDefinitionStatus", "traits": { - "smithy.api#documentation": "The status of the workspace that was just created (usually CREATING).", + "smithy.api#documentation": "The status of alert manager definition.", "smithy.api#required": {} } - }, - "tags": { - "target": "com.amazonaws.amp#TagMap", - "traits": { - "smithy.api#documentation": "The tags of this workspace." - } } }, "traits": { - "smithy.api#documentation": "Represents the output of a CreateWorkspace operation." + "smithy.api#documentation": "Represents the output of a CreateAlertManagerDefinition operation." } }, - "com.amazonaws.amp#DeleteWorkspace": { + "com.amazonaws.amp#CreateRuleGroupsNamespace": { "type": "operation", "input": { - "target": "com.amazonaws.amp#DeleteWorkspaceRequest" + "target": "com.amazonaws.amp#CreateRuleGroupsNamespaceRequest" + }, + "output": { + "target": "com.amazonaws.amp#CreateRuleGroupsNamespaceResponse" }, "errors": [ { "target": "com.amazonaws.amp#AccessDeniedException" }, + { + "target": "com.amazonaws.amp#ConflictException" + }, { "target": "com.amazonaws.amp#InternalServerException" }, { "target": "com.amazonaws.amp#ResourceNotFoundException" }, + { + "target": "com.amazonaws.amp#ServiceQuotaExceededException" + }, { "target": "com.amazonaws.amp#ThrottlingException" }, @@ -230,56 +355,113 @@ } ], "traits": { - "smithy.api#documentation": "Deletes an AMP workspace.", + "smithy.api#documentation": "Create a rule group namespace.", "smithy.api#http": { - "method": "DELETE", - "uri": "/workspaces/{workspaceId}", + "method": "POST", + "uri": "/workspaces/{workspaceId}/rulegroupsnamespaces", "code": 202 }, "smithy.api#idempotent": {} } }, - "com.amazonaws.amp#DeleteWorkspaceRequest": { + "com.amazonaws.amp#CreateRuleGroupsNamespaceRequest": { "type": "structure", "members": { "workspaceId": { "target": "com.amazonaws.amp#WorkspaceId", "traits": { - "smithy.api#documentation": "The ID of the workspace to delete.", + "smithy.api#documentation": "The ID of the workspace in which to create the rule group namespace.", "smithy.api#httpLabel": {}, "smithy.api#required": {} } }, + "name": { + "target": "com.amazonaws.amp#RuleGroupsNamespaceName", + "traits": { + "smithy.api#documentation": "The rule groups namespace name.", + "smithy.api#required": {} + } + }, + "data": { + "target": "com.amazonaws.amp#RuleGroupsNamespaceData", + "traits": { + "smithy.api#documentation": "The namespace data that define the rule groups.", + "smithy.api#required": {} + } + }, "clientToken": { "target": "com.amazonaws.amp#IdempotencyToken", "traits": { "smithy.api#documentation": "Optional, unique, case-sensitive, user-provided identifier to ensure the idempotency of the request.", - "smithy.api#httpQuery": "clientToken", "smithy.api#idempotencyToken": {} } + }, + "tags": { + "target": "com.amazonaws.amp#TagMap", + "traits": { + "smithy.api#documentation": "Optional, user-provided tags for this rule groups namespace." + } } }, "traits": { - "smithy.api#documentation": "Represents the input of a DeleteWorkspace operation." + "smithy.api#documentation": "Represents the input of a CreateRuleGroupsNamespace operation." } }, - "com.amazonaws.amp#DescribeWorkspace": { + "com.amazonaws.amp#CreateRuleGroupsNamespaceResponse": { + "type": "structure", + "members": { + "name": { + "target": "com.amazonaws.amp#RuleGroupsNamespaceName", + "traits": { + "smithy.api#documentation": "The rule groups namespace name.", + "smithy.api#required": {} + } + }, + "arn": { + "target": "com.amazonaws.amp#RuleGroupsNamespaceArn", + "traits": { + "smithy.api#documentation": "The Amazon Resource Name (ARN) of this rule groups namespace.", + "smithy.api#required": {} + } + }, + "status": { + "target": "com.amazonaws.amp#RuleGroupsNamespaceStatus", + "traits": { + "smithy.api#documentation": "The status of rule groups namespace.", + "smithy.api#required": {} + } + }, + "tags": { + "target": "com.amazonaws.amp#TagMap", + "traits": { + "smithy.api#documentation": "The tags of this rule groups namespace." + } + } + }, + "traits": { + "smithy.api#documentation": "Represents the output of a CreateRuleGroupsNamespace operation." + } + }, + "com.amazonaws.amp#CreateWorkspace": { "type": "operation", "input": { - "target": "com.amazonaws.amp#DescribeWorkspaceRequest" + "target": "com.amazonaws.amp#CreateWorkspaceRequest" }, "output": { - "target": "com.amazonaws.amp#DescribeWorkspaceResponse" + "target": "com.amazonaws.amp#CreateWorkspaceResponse" }, "errors": [ { "target": "com.amazonaws.amp#AccessDeniedException" }, + { + "target": "com.amazonaws.amp#ConflictException" + }, { "target": "com.amazonaws.amp#InternalServerException" }, { - "target": "com.amazonaws.amp#ResourceNotFoundException" + "target": "com.amazonaws.amp#ServiceQuotaExceededException" }, { "target": "com.amazonaws.amp#ThrottlingException" @@ -289,58 +471,1020 @@ } ], "traits": { - "smithy.api#documentation": "Describes an existing AMP workspace.", + "smithy.api#documentation": "Creates a new AMP workspace.", "smithy.api#http": { - "method": "GET", - "uri": "/workspaces/{workspaceId}", - "code": 200 + "method": "POST", + "uri": "/workspaces", + "code": 202 }, - "smithy.api#readonly": {} + "smithy.api#idempotent": {} } }, - "com.amazonaws.amp#DescribeWorkspaceRequest": { + "com.amazonaws.amp#CreateWorkspaceRequest": { "type": "structure", "members": { - "workspaceId": { - "target": "com.amazonaws.amp#WorkspaceId", + "alias": { + "target": "com.amazonaws.amp#WorkspaceAlias", "traits": { - "smithy.api#documentation": "The ID of the workspace to describe.", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} + "smithy.api#documentation": "An optional user-assigned alias for this workspace. This alias is for user reference and does not need to be unique." + } + }, + "clientToken": { + "target": "com.amazonaws.amp#IdempotencyToken", + "traits": { + "smithy.api#documentation": "Optional, unique, case-sensitive, user-provided identifier to ensure the idempotency of the request.", + "smithy.api#idempotencyToken": {} + } + }, + "tags": { + "target": "com.amazonaws.amp#TagMap", + "traits": { + "smithy.api#documentation": "Optional, user-provided tags for this workspace." } } }, "traits": { - "smithy.api#documentation": "Represents the input of a DescribeWorkspace operation." + "smithy.api#documentation": "Represents the input of a CreateWorkspace operation." } }, - "com.amazonaws.amp#DescribeWorkspaceResponse": { + "com.amazonaws.amp#CreateWorkspaceResponse": { "type": "structure", "members": { - "workspace": { - "target": "com.amazonaws.amp#WorkspaceDescription", + "workspaceId": { + "target": "com.amazonaws.amp#WorkspaceId", "traits": { - "smithy.api#documentation": "The properties of the selected workspace.", + "smithy.api#documentation": "The generated ID of the workspace that was just created.", + "smithy.api#required": {} + } + }, + "arn": { + "target": "com.amazonaws.amp#WorkspaceArn", + "traits": { + "smithy.api#documentation": "The ARN of the workspace that was just created.", + "smithy.api#required": {} + } + }, + "status": { + "target": "com.amazonaws.amp#WorkspaceStatus", + "traits": { + "smithy.api#documentation": "The status of the workspace that was just created (usually CREATING).", + "smithy.api#required": {} + } + }, + "tags": { + "target": "com.amazonaws.amp#TagMap", + "traits": { + "smithy.api#documentation": "The tags of this workspace." + } + } + }, + "traits": { + "smithy.api#documentation": "Represents the output of a CreateWorkspace operation." + } + }, + "com.amazonaws.amp#DeleteAlertManagerDefinition": { + "type": "operation", + "input": { + "target": "com.amazonaws.amp#DeleteAlertManagerDefinitionRequest" + }, + "errors": [ + { + "target": "com.amazonaws.amp#AccessDeniedException" + }, + { + "target": "com.amazonaws.amp#ConflictException" + }, + { + "target": "com.amazonaws.amp#InternalServerException" + }, + { + "target": "com.amazonaws.amp#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.amp#ThrottlingException" + }, + { + "target": "com.amazonaws.amp#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Deletes an alert manager definition.", + "smithy.api#http": { + "method": "DELETE", + "uri": "/workspaces/{workspaceId}/alertmanager/definition", + "code": 202 + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.amp#DeleteAlertManagerDefinitionRequest": { + "type": "structure", + "members": { + "workspaceId": { + "target": "com.amazonaws.amp#WorkspaceId", + "traits": { + "smithy.api#documentation": "The ID of the workspace in which to delete the alert manager definition.", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "clientToken": { + "target": "com.amazonaws.amp#IdempotencyToken", + "traits": { + "smithy.api#documentation": "Optional, unique, case-sensitive, user-provided identifier to ensure the idempotency of the request.", + "smithy.api#httpQuery": "clientToken", + "smithy.api#idempotencyToken": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Represents the input of a DeleteAlertManagerDefinition operation." + } + }, + "com.amazonaws.amp#DeleteRuleGroupsNamespace": { + "type": "operation", + "input": { + "target": "com.amazonaws.amp#DeleteRuleGroupsNamespaceRequest" + }, + "errors": [ + { + "target": "com.amazonaws.amp#AccessDeniedException" + }, + { + "target": "com.amazonaws.amp#ConflictException" + }, + { + "target": "com.amazonaws.amp#InternalServerException" + }, + { + "target": "com.amazonaws.amp#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.amp#ThrottlingException" + }, + { + "target": "com.amazonaws.amp#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Delete a rule groups namespace.", + "smithy.api#http": { + "method": "DELETE", + "uri": "/workspaces/{workspaceId}/rulegroupsnamespaces/{name}", + "code": 202 + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.amp#DeleteRuleGroupsNamespaceRequest": { + "type": "structure", + "members": { + "workspaceId": { + "target": "com.amazonaws.amp#WorkspaceId", + "traits": { + "smithy.api#documentation": "The ID of the workspace to delete rule group definition.", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "name": { + "target": "com.amazonaws.amp#RuleGroupsNamespaceName", + "traits": { + "smithy.api#documentation": "The rule groups namespace name.", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "clientToken": { + "target": "com.amazonaws.amp#IdempotencyToken", + "traits": { + "smithy.api#documentation": "Optional, unique, case-sensitive, user-provided identifier to ensure the idempotency of the request.", + "smithy.api#httpQuery": "clientToken", + "smithy.api#idempotencyToken": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Represents the input of a DeleteRuleGroupsNamespace operation." + } + }, + "com.amazonaws.amp#DeleteWorkspace": { + "type": "operation", + "input": { + "target": "com.amazonaws.amp#DeleteWorkspaceRequest" + }, + "errors": [ + { + "target": "com.amazonaws.amp#AccessDeniedException" + }, + { + "target": "com.amazonaws.amp#ConflictException" + }, + { + "target": "com.amazonaws.amp#InternalServerException" + }, + { + "target": "com.amazonaws.amp#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.amp#ThrottlingException" + }, + { + "target": "com.amazonaws.amp#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Deletes an AMP workspace.", + "smithy.api#http": { + "method": "DELETE", + "uri": "/workspaces/{workspaceId}", + "code": 202 + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.amp#DeleteWorkspaceRequest": { + "type": "structure", + "members": { + "workspaceId": { + "target": "com.amazonaws.amp#WorkspaceId", + "traits": { + "smithy.api#documentation": "The ID of the workspace to delete.", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "clientToken": { + "target": "com.amazonaws.amp#IdempotencyToken", + "traits": { + "smithy.api#documentation": "Optional, unique, case-sensitive, user-provided identifier to ensure the idempotency of the request.", + "smithy.api#httpQuery": "clientToken", + "smithy.api#idempotencyToken": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Represents the input of a DeleteWorkspace operation." + } + }, + "com.amazonaws.amp#DescribeAlertManagerDefinition": { + "type": "operation", + "input": { + "target": "com.amazonaws.amp#DescribeAlertManagerDefinitionRequest" + }, + "output": { + "target": "com.amazonaws.amp#DescribeAlertManagerDefinitionResponse" + }, + "errors": [ + { + "target": "com.amazonaws.amp#AccessDeniedException" + }, + { + "target": "com.amazonaws.amp#InternalServerException" + }, + { + "target": "com.amazonaws.amp#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.amp#ThrottlingException" + }, + { + "target": "com.amazonaws.amp#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Describes an alert manager definition.", + "smithy.api#http": { + "method": "GET", + "uri": "/workspaces/{workspaceId}/alertmanager/definition", + "code": 200 + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.amp#DescribeAlertManagerDefinitionRequest": { + "type": "structure", + "members": { + "workspaceId": { + "target": "com.amazonaws.amp#WorkspaceId", + "traits": { + "smithy.api#documentation": "The ID of the workspace to describe.", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Represents the input of a DescribeAlertManagerDefinition operation." + } + }, + "com.amazonaws.amp#DescribeAlertManagerDefinitionResponse": { + "type": "structure", + "members": { + "alertManagerDefinition": { + "target": "com.amazonaws.amp#AlertManagerDefinitionDescription", + "traits": { + "smithy.api#documentation": "The properties of the selected workspace's alert manager definition.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Represents the output of a DescribeAlertManagerDefinition operation." + } + }, + "com.amazonaws.amp#DescribeRuleGroupsNamespace": { + "type": "operation", + "input": { + "target": "com.amazonaws.amp#DescribeRuleGroupsNamespaceRequest" + }, + "output": { + "target": "com.amazonaws.amp#DescribeRuleGroupsNamespaceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.amp#AccessDeniedException" + }, + { + "target": "com.amazonaws.amp#InternalServerException" + }, + { + "target": "com.amazonaws.amp#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.amp#ThrottlingException" + }, + { + "target": "com.amazonaws.amp#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Describe a rule groups namespace.", + "smithy.api#http": { + "method": "GET", + "uri": "/workspaces/{workspaceId}/rulegroupsnamespaces/{name}", + "code": 200 + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.amp#DescribeRuleGroupsNamespaceRequest": { + "type": "structure", + "members": { + "workspaceId": { + "target": "com.amazonaws.amp#WorkspaceId", + "traits": { + "smithy.api#documentation": "The ID of the workspace to describe.", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "name": { + "target": "com.amazonaws.amp#RuleGroupsNamespaceName", + "traits": { + "smithy.api#documentation": "The rule groups namespace.", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Represents the input of a DescribeRuleGroupsNamespace operation." + } + }, + "com.amazonaws.amp#DescribeRuleGroupsNamespaceResponse": { + "type": "structure", + "members": { + "ruleGroupsNamespace": { + "target": "com.amazonaws.amp#RuleGroupsNamespaceDescription", + "traits": { + "smithy.api#documentation": "The selected rule groups namespace.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Represents the output of a DescribeRuleGroupsNamespace operation." + } + }, + "com.amazonaws.amp#DescribeWorkspace": { + "type": "operation", + "input": { + "target": "com.amazonaws.amp#DescribeWorkspaceRequest" + }, + "output": { + "target": "com.amazonaws.amp#DescribeWorkspaceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.amp#AccessDeniedException" + }, + { + "target": "com.amazonaws.amp#InternalServerException" + }, + { + "target": "com.amazonaws.amp#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.amp#ThrottlingException" + }, + { + "target": "com.amazonaws.amp#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Describes an existing AMP workspace.", + "smithy.api#http": { + "method": "GET", + "uri": "/workspaces/{workspaceId}", + "code": 200 + }, + "smithy.api#readonly": {}, + "smithy.waiters#waitable": { + "WorkspaceActive": { + "documentation": "Wait until a workspace reaches ACTIVE status", + "acceptors": [ + { + "state": "success", + "matcher": { + "output": { + "path": "workspace.status.statusCode", + "expected": "ACTIVE", + "comparator": "stringEquals" + } + } + }, + { + "state": "retry", + "matcher": { + "output": { + "path": "workspace.status.statusCode", + "expected": "UPDATING", + "comparator": "stringEquals" + } + } + }, + { + "state": "retry", + "matcher": { + "output": { + "path": "workspace.status.statusCode", + "expected": "CREATING", + "comparator": "stringEquals" + } + } + } + ] + }, + "WorkspaceDeleted": { + "documentation": "Wait until a workspace reaches DELETED status", + "acceptors": [ + { + "state": "success", + "matcher": { + "errorType": "ResourceNotFoundException" + } + }, + { + "state": "retry", + "matcher": { + "output": { + "path": "workspace.status.statusCode", + "expected": "DELETING", + "comparator": "stringEquals" + } + } + } + ] + } + } + } + }, + "com.amazonaws.amp#DescribeWorkspaceRequest": { + "type": "structure", + "members": { + "workspaceId": { + "target": "com.amazonaws.amp#WorkspaceId", + "traits": { + "smithy.api#documentation": "The ID of the workspace to describe.", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Represents the input of a DescribeWorkspace operation." + } + }, + "com.amazonaws.amp#DescribeWorkspaceResponse": { + "type": "structure", + "members": { + "workspace": { + "target": "com.amazonaws.amp#WorkspaceDescription", + "traits": { + "smithy.api#documentation": "The properties of the selected workspace.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Represents the output of a DescribeWorkspace operation." + } + }, + "com.amazonaws.amp#IdempotencyToken": { + "type": "string", + "traits": { + "smithy.api#documentation": "An identifier used to ensure the idempotency of a write request.", + "smithy.api#length": { + "min": 1, + "max": 64 + }, + "smithy.api#pattern": "[!-~]+" + } + }, + "com.amazonaws.amp#InternalServerException": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Description of the error.", + "smithy.api#required": {} + } + }, + "retryAfterSeconds": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Advice to clients on when the call can be safely retried.", + "smithy.api#httpHeader": "Retry-After" + } + } + }, + "traits": { + "smithy.api#documentation": "Unexpected error during processing of request.", + "smithy.api#error": "server", + "smithy.api#httpError": 500, + "smithy.api#retryable": {} + } + }, + "com.amazonaws.amp#ListRuleGroupsNamespaces": { + "type": "operation", + "input": { + "target": "com.amazonaws.amp#ListRuleGroupsNamespacesRequest" + }, + "output": { + "target": "com.amazonaws.amp#ListRuleGroupsNamespacesResponse" + }, + "errors": [ + { + "target": "com.amazonaws.amp#AccessDeniedException" + }, + { + "target": "com.amazonaws.amp#InternalServerException" + }, + { + "target": "com.amazonaws.amp#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.amp#ThrottlingException" + }, + { + "target": "com.amazonaws.amp#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Lists rule groups namespaces.", + "smithy.api#http": { + "method": "GET", + "uri": "/workspaces/{workspaceId}/rulegroupsnamespaces", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "items": "ruleGroupsNamespaces", + "pageSize": "maxResults" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.amp#ListRuleGroupsNamespacesRequest": { + "type": "structure", + "members": { + "workspaceId": { + "target": "com.amazonaws.amp#WorkspaceId", + "traits": { + "smithy.api#documentation": "The ID of the workspace.", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "name": { + "target": "com.amazonaws.amp#RuleGroupsNamespaceName", + "traits": { + "smithy.api#documentation": "Optional filter for rule groups namespace name. Only the rule groups namespace that begin with this value will be returned.", + "smithy.api#httpQuery": "name" + } + }, + "nextToken": { + "target": "com.amazonaws.amp#PaginationToken", + "traits": { + "smithy.api#documentation": "Pagination token to request the next page in a paginated list. This token is obtained from the output of the previous ListRuleGroupsNamespaces request.", + "smithy.api#httpQuery": "nextToken" + } + }, + "maxResults": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Maximum results to return in response (default=100, maximum=1000).", + "smithy.api#httpQuery": "maxResults", + "smithy.api#range": { + "min": 1, + "max": 1000 + } + } + } + }, + "traits": { + "smithy.api#documentation": "Represents the input of a ListRuleGroupsNamespaces operation." + } + }, + "com.amazonaws.amp#ListRuleGroupsNamespacesResponse": { + "type": "structure", + "members": { + "ruleGroupsNamespaces": { + "target": "com.amazonaws.amp#RuleGroupsNamespaceSummaryList", + "traits": { + "smithy.api#documentation": "The list of the selected rule groups namespaces.", + "smithy.api#required": {} + } + }, + "nextToken": { + "target": "com.amazonaws.amp#PaginationToken", + "traits": { + "smithy.api#documentation": "Pagination token to use when requesting the next page in this list." + } + } + }, + "traits": { + "smithy.api#documentation": "Represents the output of a ListRuleGroupsNamespaces operation." + } + }, + "com.amazonaws.amp#ListTagsForResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.amp#ListTagsForResourceRequest" + }, + "output": { + "target": "com.amazonaws.amp#ListTagsForResourceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.amp#AccessDeniedException" + }, + { + "target": "com.amazonaws.amp#InternalServerException" + }, + { + "target": "com.amazonaws.amp#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.amp#ThrottlingException" + }, + { + "target": "com.amazonaws.amp#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Lists the tags you have assigned to the resource.", + "smithy.api#http": { + "method": "GET", + "uri": "/tags/{resourceArn}", + "code": 200 + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.amp#ListTagsForResourceRequest": { + "type": "structure", + "members": { + "resourceArn": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The ARN of the resource.", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.amp#ListTagsForResourceResponse": { + "type": "structure", + "members": { + "tags": { + "target": "com.amazonaws.amp#TagMap" + } + } + }, + "com.amazonaws.amp#ListWorkspaces": { + "type": "operation", + "input": { + "target": "com.amazonaws.amp#ListWorkspacesRequest" + }, + "output": { + "target": "com.amazonaws.amp#ListWorkspacesResponse" + }, + "errors": [ + { + "target": "com.amazonaws.amp#AccessDeniedException" + }, + { + "target": "com.amazonaws.amp#InternalServerException" + }, + { + "target": "com.amazonaws.amp#ThrottlingException" + }, + { + "target": "com.amazonaws.amp#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Lists all AMP workspaces, including workspaces being created or deleted.", + "smithy.api#http": { + "method": "GET", + "uri": "/workspaces", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "items": "workspaces", + "pageSize": "maxResults" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.amp#ListWorkspacesRequest": { + "type": "structure", + "members": { + "nextToken": { + "target": "com.amazonaws.amp#PaginationToken", + "traits": { + "smithy.api#documentation": "Pagination token to request the next page in a paginated list. This token is obtained from the output of the previous ListWorkspaces request.", + "smithy.api#httpQuery": "nextToken" + } + }, + "alias": { + "target": "com.amazonaws.amp#WorkspaceAlias", + "traits": { + "smithy.api#documentation": "Optional filter for workspace alias. Only the workspaces with aliases that begin with this value will be returned.", + "smithy.api#httpQuery": "alias" + } + }, + "maxResults": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Maximum results to return in response (default=100, maximum=1000).", + "smithy.api#httpQuery": "maxResults", + "smithy.api#range": { + "min": 1, + "max": 1000 + } + } + } + }, + "traits": { + "smithy.api#documentation": "Represents the input of a ListWorkspaces operation." + } + }, + "com.amazonaws.amp#ListWorkspacesResponse": { + "type": "structure", + "members": { + "workspaces": { + "target": "com.amazonaws.amp#WorkspaceSummaryList", + "traits": { + "smithy.api#documentation": "The list of existing workspaces, including those undergoing creation or deletion.", "smithy.api#required": {} } + }, + "nextToken": { + "target": "com.amazonaws.amp#PaginationToken", + "traits": { + "smithy.api#documentation": "Pagination token to use when requesting the next page in this list." + } } }, "traits": { - "smithy.api#documentation": "Represents the output of a DescribeWorkspace operation." + "smithy.api#documentation": "Represents the output of a ListWorkspaces operation." } }, - "com.amazonaws.amp#IdempotencyToken": { + "com.amazonaws.amp#PaginationToken": { "type": "string", "traits": { - "smithy.api#documentation": "An identifier used to ensure the idempotency of a write request.", - "smithy.api#length": { - "min": 1, - "max": 64 + "smithy.api#documentation": "A token used to access the next page in a paginated result set." + } + }, + "com.amazonaws.amp#PutAlertManagerDefinition": { + "type": "operation", + "input": { + "target": "com.amazonaws.amp#PutAlertManagerDefinitionRequest" + }, + "output": { + "target": "com.amazonaws.amp#PutAlertManagerDefinitionResponse" + }, + "errors": [ + { + "target": "com.amazonaws.amp#AccessDeniedException" }, - "smithy.api#pattern": "[!-~]+" + { + "target": "com.amazonaws.amp#ConflictException" + }, + { + "target": "com.amazonaws.amp#InternalServerException" + }, + { + "target": "com.amazonaws.amp#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.amp#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.amp#ThrottlingException" + }, + { + "target": "com.amazonaws.amp#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Update an alert manager definition.", + "smithy.api#http": { + "method": "PUT", + "uri": "/workspaces/{workspaceId}/alertmanager/definition", + "code": 202 + }, + "smithy.api#idempotent": {} } }, - "com.amazonaws.amp#InternalServerException": { + "com.amazonaws.amp#PutAlertManagerDefinitionRequest": { + "type": "structure", + "members": { + "workspaceId": { + "target": "com.amazonaws.amp#WorkspaceId", + "traits": { + "smithy.api#documentation": "The ID of the workspace in which to update the alert manager definition.", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "data": { + "target": "com.amazonaws.amp#AlertManagerDefinitionData", + "traits": { + "smithy.api#documentation": "The alert manager definition data.", + "smithy.api#required": {} + } + }, + "clientToken": { + "target": "com.amazonaws.amp#IdempotencyToken", + "traits": { + "smithy.api#documentation": "Optional, unique, case-sensitive, user-provided identifier to ensure the idempotency of the request.", + "smithy.api#idempotencyToken": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Represents the input of a PutAlertManagerDefinition operation." + } + }, + "com.amazonaws.amp#PutAlertManagerDefinitionResponse": { + "type": "structure", + "members": { + "status": { + "target": "com.amazonaws.amp#AlertManagerDefinitionStatus", + "traits": { + "smithy.api#documentation": "The status of alert manager definition.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Represents the output of a PutAlertManagerDefinition operation." + } + }, + "com.amazonaws.amp#PutRuleGroupsNamespace": { + "type": "operation", + "input": { + "target": "com.amazonaws.amp#PutRuleGroupsNamespaceRequest" + }, + "output": { + "target": "com.amazonaws.amp#PutRuleGroupsNamespaceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.amp#AccessDeniedException" + }, + { + "target": "com.amazonaws.amp#ConflictException" + }, + { + "target": "com.amazonaws.amp#InternalServerException" + }, + { + "target": "com.amazonaws.amp#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.amp#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.amp#ThrottlingException" + }, + { + "target": "com.amazonaws.amp#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Update a rule groups namespace.", + "smithy.api#http": { + "method": "PUT", + "uri": "/workspaces/{workspaceId}/rulegroupsnamespaces/{name}", + "code": 202 + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.amp#PutRuleGroupsNamespaceRequest": { + "type": "structure", + "members": { + "workspaceId": { + "target": "com.amazonaws.amp#WorkspaceId", + "traits": { + "smithy.api#documentation": "The ID of the workspace in which to update the rule group namespace.", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "name": { + "target": "com.amazonaws.amp#RuleGroupsNamespaceName", + "traits": { + "smithy.api#documentation": "The rule groups namespace name.", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "data": { + "target": "com.amazonaws.amp#RuleGroupsNamespaceData", + "traits": { + "smithy.api#documentation": "The namespace data that define the rule groups.", + "smithy.api#required": {} + } + }, + "clientToken": { + "target": "com.amazonaws.amp#IdempotencyToken", + "traits": { + "smithy.api#documentation": "Optional, unique, case-sensitive, user-provided identifier to ensure the idempotency of the request.", + "smithy.api#idempotencyToken": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Represents the input of a PutRuleGroupsNamespace operation." + } + }, + "com.amazonaws.amp#PutRuleGroupsNamespaceResponse": { + "type": "structure", + "members": { + "name": { + "target": "com.amazonaws.amp#RuleGroupsNamespaceName", + "traits": { + "smithy.api#documentation": "The rule groups namespace name.", + "smithy.api#required": {} + } + }, + "arn": { + "target": "com.amazonaws.amp#RuleGroupsNamespaceArn", + "traits": { + "smithy.api#documentation": "The Amazon Resource Name (ARN) of this rule groups namespace.", + "smithy.api#required": {} + } + }, + "status": { + "target": "com.amazonaws.amp#RuleGroupsNamespaceStatus", + "traits": { + "smithy.api#documentation": "The status of rule groups namespace.", + "smithy.api#required": {} + } + }, + "tags": { + "target": "com.amazonaws.amp#TagMap", + "traits": { + "smithy.api#documentation": "The tags of this rule groups namespace." + } + } + }, + "traits": { + "smithy.api#documentation": "Represents the output of a PutRuleGroupsNamespace operation." + } + }, + "com.amazonaws.amp#ResourceNotFoundException": { "type": "structure", "members": { "message": { @@ -350,204 +1494,261 @@ "smithy.api#required": {} } }, - "retryAfterSeconds": { - "target": "smithy.api#Integer", + "resourceId": { + "target": "smithy.api#String", "traits": { - "smithy.api#documentation": "Advice to clients on when the call can be safely retried.", - "smithy.api#httpHeader": "Retry-After" + "smithy.api#documentation": "Identifier of the resource affected.", + "smithy.api#required": {} + } + }, + "resourceType": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Type of the resource affected.", + "smithy.api#required": {} } } }, "traits": { - "smithy.api#documentation": "Unexpected error during processing of request.", - "smithy.api#error": "server", - "smithy.api#httpError": 500, - "smithy.api#retryable": {} + "smithy.api#documentation": "Request references a resource which does not exist.", + "smithy.api#error": "client", + "smithy.api#httpError": 404 } }, - "com.amazonaws.amp#ListTagsForResource": { - "type": "operation", - "input": { - "target": "com.amazonaws.amp#ListTagsForResourceRequest" + "com.amazonaws.amp#RuleGroupsNamespace": { + "type": "resource", + "identifiers": { + "workspaceId": { + "target": "com.amazonaws.amp#WorkspaceId" + }, + "name": { + "target": "com.amazonaws.amp#RuleGroupsNamespaceName" + } }, - "output": { - "target": "com.amazonaws.amp#ListTagsForResourceResponse" + "put": { + "target": "com.amazonaws.amp#CreateRuleGroupsNamespace" }, - "errors": [ - { - "target": "com.amazonaws.amp#AccessDeniedException" - }, - { - "target": "com.amazonaws.amp#InternalServerException" - }, - { - "target": "com.amazonaws.amp#ResourceNotFoundException" - }, - { - "target": "com.amazonaws.amp#ThrottlingException" + "read": { + "target": "com.amazonaws.amp#DescribeRuleGroupsNamespace" + }, + "update": { + "target": "com.amazonaws.amp#PutRuleGroupsNamespace" + }, + "delete": { + "target": "com.amazonaws.amp#DeleteRuleGroupsNamespace" + }, + "list": { + "target": "com.amazonaws.amp#ListRuleGroupsNamespaces" + }, + "traits": { + "aws.api#arn": { + "template": "rulegroupsnamespace/{workspaceId}/{name}", + "absolute": false, + "noAccount": false, + "noRegion": false }, - { - "target": "com.amazonaws.amp#ValidationException" - } - ], + "smithy.api#documentation": "The definition of a rule group namespace in an AMP workspace" + } + }, + "com.amazonaws.amp#RuleGroupsNamespaceArn": { + "type": "string", "traits": { - "smithy.api#documentation": "Lists the tags you have assigned to the resource.", - "smithy.api#http": { - "method": "GET", - "uri": "/tags/{resourceArn}", - "code": 200 + "aws.api#arnReference": { + "type": "AWS::APS::RuleGroupsNamespace", + "service": "com.amazonaws.services.awsprometheus.serviceapi#ManagedPrometheusCP", + "resource": "com.amazonaws.amp#RuleGroupsNamespace" }, - "smithy.api#readonly": {} + "smithy.api#documentation": "An ARN identifying a rule groups namespace." } }, - "com.amazonaws.amp#ListTagsForResourceRequest": { + "com.amazonaws.amp#RuleGroupsNamespaceData": { + "type": "blob", + "traits": { + "smithy.api#documentation": "The rule groups namespace data." + } + }, + "com.amazonaws.amp#RuleGroupsNamespaceDescription": { "type": "structure", "members": { - "resourceArn": { - "target": "smithy.api#String", + "arn": { + "target": "com.amazonaws.amp#RuleGroupsNamespaceArn", "traits": { - "smithy.api#documentation": "The ARN of the resource.", - "smithy.api#httpLabel": {}, + "smithy.api#documentation": "The Amazon Resource Name (ARN) of this rule groups namespace.", "smithy.api#required": {} } - } - } - }, - "com.amazonaws.amp#ListTagsForResourceResponse": { - "type": "structure", - "members": { - "tags": { - "target": "com.amazonaws.amp#TagMap" - } - } - }, - "com.amazonaws.amp#ListWorkspaces": { - "type": "operation", - "input": { - "target": "com.amazonaws.amp#ListWorkspacesRequest" - }, - "output": { - "target": "com.amazonaws.amp#ListWorkspacesResponse" - }, - "errors": [ - { - "target": "com.amazonaws.amp#AccessDeniedException" - }, - { - "target": "com.amazonaws.amp#InternalServerException" }, - { - "target": "com.amazonaws.amp#ThrottlingException" + "name": { + "target": "com.amazonaws.amp#RuleGroupsNamespaceName", + "traits": { + "smithy.api#documentation": "The rule groups namespace name.", + "smithy.api#required": {} + } }, - { - "target": "com.amazonaws.amp#ValidationException" - } - ], - "traits": { - "smithy.api#documentation": "Lists all AMP workspaces, including workspaces being created or deleted.", - "smithy.api#http": { - "method": "GET", - "uri": "/workspaces", - "code": 200 + "status": { + "target": "com.amazonaws.amp#RuleGroupsNamespaceStatus", + "traits": { + "smithy.api#documentation": "The status of rule groups namespace.", + "smithy.api#required": {} + } }, - "smithy.api#paginated": { - "inputToken": "nextToken", - "outputToken": "nextToken", - "items": "workspaces", - "pageSize": "maxResults" + "data": { + "target": "com.amazonaws.amp#RuleGroupsNamespaceData", + "traits": { + "smithy.api#documentation": "The rule groups namespace data.", + "smithy.api#required": {} + } }, - "smithy.api#readonly": {} - } - }, - "com.amazonaws.amp#ListWorkspacesRequest": { - "type": "structure", - "members": { - "nextToken": { - "target": "com.amazonaws.amp#PaginationToken", + "createdAt": { + "target": "smithy.api#Timestamp", "traits": { - "smithy.api#documentation": "Pagination token to request the next page in a paginated list. This token is obtained from the output of the previous ListWorkspaces request.", - "smithy.api#httpQuery": "nextToken" + "smithy.api#documentation": "The time when the rule groups namespace was created.", + "smithy.api#required": {} } }, - "alias": { - "target": "com.amazonaws.amp#WorkspaceAlias", + "modifiedAt": { + "target": "smithy.api#Timestamp", "traits": { - "smithy.api#documentation": "Optional filter for workspace alias. Only the workspaces with aliases that begin with this value will be returned.", - "smithy.api#httpQuery": "alias" + "smithy.api#documentation": "The time when the rule groups namespace was modified.", + "smithy.api#required": {} } }, - "maxResults": { - "target": "smithy.api#Integer", + "tags": { + "target": "com.amazonaws.amp#TagMap", "traits": { - "smithy.api#documentation": "Maximum results to return in response (default=100, maximum=1000).", - "smithy.api#httpQuery": "maxResults", - "smithy.api#range": { - "min": 1, - "max": 1000 - } + "smithy.api#documentation": "The tags of this rule groups namespace." } } }, "traits": { - "smithy.api#documentation": "Represents the input of a ListWorkspaces operation." + "smithy.api#documentation": "Represents a description of the rule groups namespace." } }, - "com.amazonaws.amp#ListWorkspacesResponse": { + "com.amazonaws.amp#RuleGroupsNamespaceName": { + "type": "string", + "traits": { + "smithy.api#documentation": "The namespace name that the rule group belong to.", + "smithy.api#length": { + "min": 1, + "max": 64 + }, + "smithy.api#pattern": "[0-9A-Za-z][-.0-9A-Z_a-z]*" + } + }, + "com.amazonaws.amp#RuleGroupsNamespaceStatus": { "type": "structure", "members": { - "workspaces": { - "target": "com.amazonaws.amp#WorkspaceSummaryList", + "statusCode": { + "target": "com.amazonaws.amp#RuleGroupsNamespaceStatusCode", "traits": { - "smithy.api#documentation": "The list of existing workspaces, including those undergoing creation or deletion.", + "smithy.api#documentation": "Status code of this namespace.", "smithy.api#required": {} } }, - "nextToken": { - "target": "com.amazonaws.amp#PaginationToken", + "statusReason": { + "target": "smithy.api#String", "traits": { - "smithy.api#documentation": "Pagination token to use when requesting the next page in this list." + "smithy.api#documentation": "The reason for failure if any." } } }, "traits": { - "smithy.api#documentation": "Represents the output of a ListWorkspaces operation." + "smithy.api#documentation": "Represents the status of a namespace." } }, - "com.amazonaws.amp#PaginationToken": { + "com.amazonaws.amp#RuleGroupsNamespaceStatusCode": { "type": "string", "traits": { - "smithy.api#documentation": "A token used to access the next page in a paginated result set." + "smithy.api#documentation": "State of a namespace.", + "smithy.api#enum": [ + { + "value": "CREATING", + "name": "CREATING", + "documentation": "Namespace is being created. Update/Deletion is disallowed until namespace is ACTIVE and workspace status is ACTIVE." + }, + { + "value": "ACTIVE", + "name": "ACTIVE", + "documentation": "Namespace has been created/updated. Update/Deletion is disallowed until namespace is ACTIVE and workspace status is ACTIVE." + }, + { + "value": "UPDATING", + "name": "UPDATING", + "documentation": "Namespace is being updated. Update/Deletion is disallowed until namespace is ACTIVE and workspace status is ACTIVE." + }, + { + "value": "DELETING", + "name": "DELETING", + "documentation": "Namespace is being deleting. Update/Deletion is disallowed until namespace is ACTIVE and workspace status is ACTIVE." + }, + { + "value": "CREATION_FAILED", + "name": "CREATION_FAILED", + "documentation": "Namespace creation failed." + }, + { + "value": "UPDATE_FAILED", + "name": "UPDATE_FAILED", + "documentation": "Namespace update failed." + } + ] } }, - "com.amazonaws.amp#ResourceNotFoundException": { + "com.amazonaws.amp#RuleGroupsNamespaceSummary": { "type": "structure", "members": { - "message": { - "target": "smithy.api#String", + "arn": { + "target": "com.amazonaws.amp#RuleGroupsNamespaceArn", "traits": { - "smithy.api#documentation": "Description of the error.", + "smithy.api#documentation": "The Amazon Resource Name (ARN) of this rule groups namespace.", "smithy.api#required": {} } }, - "resourceId": { - "target": "smithy.api#String", + "name": { + "target": "com.amazonaws.amp#RuleGroupsNamespaceName", "traits": { - "smithy.api#documentation": "Identifier of the resource affected.", + "smithy.api#documentation": "The rule groups namespace name.", "smithy.api#required": {} } }, - "resourceType": { - "target": "smithy.api#String", + "status": { + "target": "com.amazonaws.amp#RuleGroupsNamespaceStatus", "traits": { - "smithy.api#documentation": "Type of the resource affected.", + "smithy.api#documentation": "The status of rule groups namespace.", + "smithy.api#required": {} + } + }, + "createdAt": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "The time when the rule groups namespace was created.", + "smithy.api#required": {} + } + }, + "modifiedAt": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "The time when the rule groups namespace was modified.", "smithy.api#required": {} } + }, + "tags": { + "target": "com.amazonaws.amp#TagMap", + "traits": { + "smithy.api#documentation": "The tags of this rule groups namespace." + } } }, "traits": { - "smithy.api#documentation": "Request references a resource which does not exist.", - "smithy.api#error": "client", - "smithy.api#httpError": 404 + "smithy.api#documentation": "Represents a summary of the rule groups namespace." + } + }, + "com.amazonaws.amp#RuleGroupsNamespaceSummaryList": { + "type": "list", + "member": { + "target": "com.amazonaws.amp#RuleGroupsNamespaceSummary" + }, + "traits": { + "smithy.api#documentation": "A list of rule groups namespace summary." } }, "com.amazonaws.amp#ServiceQuotaExceededException": { @@ -979,6 +2180,14 @@ "list": { "target": "com.amazonaws.amp#ListWorkspaces" }, + "resources": [ + { + "target": "com.amazonaws.amp#AlertManagerDefinition" + }, + { + "target": "com.amazonaws.amp#RuleGroupsNamespace" + } + ], "traits": { "aws.api#arn": { "template": "workspace/{workspaceId}", diff --git a/codegen/sdk-codegen/aws-models/appintegrations.2020-07-29.json b/codegen/sdk-codegen/aws-models/appintegrations.2020-07-29.json index ba183a5c4f62a..2f15475711491 100644 --- a/codegen/sdk-codegen/aws-models/appintegrations.2020-07-29.json +++ b/codegen/sdk-codegen/aws-models/appintegrations.2020-07-29.json @@ -46,15 +46,30 @@ "type": "service", "version": "2020-07-29", "operations": [ + { + "target": "com.amazonaws.appintegrations#CreateDataIntegration" + }, { "target": "com.amazonaws.appintegrations#CreateEventIntegration" }, + { + "target": "com.amazonaws.appintegrations#DeleteDataIntegration" + }, { "target": "com.amazonaws.appintegrations#DeleteEventIntegration" }, + { + "target": "com.amazonaws.appintegrations#GetDataIntegration" + }, { "target": "com.amazonaws.appintegrations#GetEventIntegration" }, + { + "target": "com.amazonaws.appintegrations#ListDataIntegrationAssociations" + }, + { + "target": "com.amazonaws.appintegrations#ListDataIntegrations" + }, { "target": "com.amazonaws.appintegrations#ListEventIntegrationAssociations" }, @@ -70,6 +85,9 @@ { "target": "com.amazonaws.appintegrations#UntagResource" }, + { + "target": "com.amazonaws.appintegrations#UpdateDataIntegration" + }, { "target": "com.amazonaws.appintegrations#UpdateEventIntegration" } @@ -86,7 +104,7 @@ "name": "app-integrations" }, "aws.protocols#restJson1": {}, - "smithy.api#documentation": "

              The Amazon AppIntegrations service enables you to configure and reuse connections to external applications.

              \n

              For information about how you can use external applications with Amazon Connect, see Set up pre-built integrations in the Amazon Connect Administrator Guide.

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

              The Amazon AppIntegrations service enables you to configure and reuse connections to external\n applications.

              \n

              For information about how you can use external applications with Amazon Connect, see Set up pre-built\n integrations and Deliver information to agents using Amazon Connect Wisdom\n in the Amazon Connect Administrator Guide.

              ", "smithy.api#title": "Amazon AppIntegrations Service" } }, @@ -119,6 +137,151 @@ "smithy.api#pattern": ".*" } }, + "com.amazonaws.appintegrations#CreateDataIntegration": { + "type": "operation", + "input": { + "target": "com.amazonaws.appintegrations#CreateDataIntegrationRequest" + }, + "output": { + "target": "com.amazonaws.appintegrations#CreateDataIntegrationResponse" + }, + "errors": [ + { + "target": "com.amazonaws.appintegrations#AccessDeniedException" + }, + { + "target": "com.amazonaws.appintegrations#DuplicateResourceException" + }, + { + "target": "com.amazonaws.appintegrations#InternalServiceError" + }, + { + "target": "com.amazonaws.appintegrations#InvalidRequestException" + }, + { + "target": "com.amazonaws.appintegrations#ResourceQuotaExceededException" + }, + { + "target": "com.amazonaws.appintegrations#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "

              Creates and persists a DataIntegration resource.

              \n \n

              You cannot create a DataIntegration association for a DataIntegration that has been previously associated. \n Use a different DataIntegration, or recreate the DataIntegration using the \n CreateDataIntegration API.

              \n
              ", + "smithy.api#http": { + "method": "POST", + "uri": "/dataIntegrations", + "code": 200 + } + } + }, + "com.amazonaws.appintegrations#CreateDataIntegrationRequest": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.appintegrations#Name", + "traits": { + "smithy.api#documentation": "

              The name of the DataIntegration.

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

              A description of the DataIntegration.

              " + } + }, + "KmsKey": { + "target": "com.amazonaws.appintegrations#NonBlankString", + "traits": { + "smithy.api#documentation": "

              The KMS key for the DataIntegration.

              " + } + }, + "SourceURI": { + "target": "com.amazonaws.appintegrations#NonBlankString", + "traits": { + "smithy.api#documentation": "

              The URI of the data source.

              " + } + }, + "ScheduleConfig": { + "target": "com.amazonaws.appintegrations#ScheduleConfiguration", + "traits": { + "smithy.api#documentation": "

              The name of the data and how often it should be pulled from the source.

              " + } + }, + "Tags": { + "target": "com.amazonaws.appintegrations#TagMap", + "traits": { + "smithy.api#documentation": "

              One or more tags.

              " + } + }, + "ClientToken": { + "target": "com.amazonaws.appintegrations#IdempotencyToken", + "traits": { + "smithy.api#documentation": "

              A unique, case-sensitive identifier that you provide to ensure the idempotency of the\n request.

              ", + "smithy.api#idempotencyToken": {} + } + } + } + }, + "com.amazonaws.appintegrations#CreateDataIntegrationResponse": { + "type": "structure", + "members": { + "Arn": { + "target": "com.amazonaws.appintegrations#Arn", + "traits": { + "smithy.api#documentation": "

              The Amazon Resource Name (ARN)

              " + } + }, + "Id": { + "target": "com.amazonaws.appintegrations#UUID", + "traits": { + "smithy.api#documentation": "

              A unique identifier.

              " + } + }, + "Name": { + "target": "com.amazonaws.appintegrations#Name", + "traits": { + "smithy.api#documentation": "

              The name of the DataIntegration.

              " + } + }, + "Description": { + "target": "com.amazonaws.appintegrations#Description", + "traits": { + "smithy.api#documentation": "

              A description of the DataIntegration.

              " + } + }, + "KmsKey": { + "target": "com.amazonaws.appintegrations#NonBlankString", + "traits": { + "smithy.api#documentation": "

              The KMS key for the DataIntegration.

              " + } + }, + "SourceURI": { + "target": "com.amazonaws.appintegrations#NonBlankString", + "traits": { + "smithy.api#documentation": "

              The URI of the data source.

              " + } + }, + "ScheduleConfiguration": { + "target": "com.amazonaws.appintegrations#ScheduleConfiguration", + "traits": { + "smithy.api#documentation": "

              The name of the data and how often it should be pulled from the source.

              " + } + }, + "Tags": { + "target": "com.amazonaws.appintegrations#TagMap", + "traits": { + "smithy.api#documentation": "

              One or more tags.

              " + } + }, + "ClientToken": { + "target": "com.amazonaws.appintegrations#IdempotencyToken", + "traits": { + "smithy.api#documentation": "

              A unique, case-sensitive identifier that you provide to ensure the idempotency of the\n request.

              " + } + } + } + }, "com.amazonaws.appintegrations#CreateEventIntegration": { "type": "operation", "input": { @@ -148,7 +311,7 @@ } ], "traits": { - "smithy.api#documentation": "

              Creates an EventIntegration, given a specified name, description, and a reference to an\n Amazon EventBridge bus in your account and a partner event source that pushes events to that bus. No\n objects are created in the your account, only metadata that is persisted on the EventIntegration\n control plane.

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

              Creates an EventIntegration, given a specified name, description, and a reference to an\n Amazon EventBridge bus in your account and a partner event source that pushes events to that bus. No\n objects are created in the your account, only metadata that is persisted on the\n EventIntegration control plane.

              ", "smithy.api#http": { "method": "POST", "uri": "/eventIntegrations", @@ -212,6 +375,133 @@ } } }, + "com.amazonaws.appintegrations#DataIntegrationAssociationSummary": { + "type": "structure", + "members": { + "DataIntegrationAssociationArn": { + "target": "com.amazonaws.appintegrations#Arn", + "traits": { + "smithy.api#documentation": "

              The Amazon Resource Name (ARN) of the DataIntegration association.

              " + } + }, + "DataIntegrationArn": { + "target": "com.amazonaws.appintegrations#Arn", + "traits": { + "smithy.api#documentation": "

              The Amazon Resource Name (ARN)of the DataIntegration.

              " + } + }, + "ClientId": { + "target": "com.amazonaws.appintegrations#ClientId", + "traits": { + "smithy.api#documentation": "

              The identifier for teh client that is associated with the DataIntegration\n association.

              " + } + } + }, + "traits": { + "smithy.api#documentation": "

              Summary information about the DataIntegration association.

              " + } + }, + "com.amazonaws.appintegrations#DataIntegrationAssociationsList": { + "type": "list", + "member": { + "target": "com.amazonaws.appintegrations#DataIntegrationAssociationSummary" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 50 + } + } + }, + "com.amazonaws.appintegrations#DataIntegrationSummary": { + "type": "structure", + "members": { + "Arn": { + "target": "com.amazonaws.appintegrations#Arn", + "traits": { + "smithy.api#documentation": "

              The Amazon Resource Name (ARN) of the DataIntegration.

              " + } + }, + "Name": { + "target": "com.amazonaws.appintegrations#Name", + "traits": { + "smithy.api#documentation": "

              The name of the DataIntegration.

              " + } + }, + "SourceURI": { + "target": "com.amazonaws.appintegrations#NonBlankString", + "traits": { + "smithy.api#documentation": "

              The URI of the data source.

              " + } + } + }, + "traits": { + "smithy.api#documentation": "

              Summary information about the DataIntegration.

              " + } + }, + "com.amazonaws.appintegrations#DataIntegrationsList": { + "type": "list", + "member": { + "target": "com.amazonaws.appintegrations#DataIntegrationSummary" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 50 + } + } + }, + "com.amazonaws.appintegrations#DeleteDataIntegration": { + "type": "operation", + "input": { + "target": "com.amazonaws.appintegrations#DeleteDataIntegrationRequest" + }, + "output": { + "target": "com.amazonaws.appintegrations#DeleteDataIntegrationResponse" + }, + "errors": [ + { + "target": "com.amazonaws.appintegrations#AccessDeniedException" + }, + { + "target": "com.amazonaws.appintegrations#InternalServiceError" + }, + { + "target": "com.amazonaws.appintegrations#InvalidRequestException" + }, + { + "target": "com.amazonaws.appintegrations#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.appintegrations#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "

              Deletes the DataIntegration. Only DataIntegrations that don't have any\n DataIntegrationAssociations can be deleted. Deleting a DataIntegration also deletes the\n underlying Amazon AppFlow flow and service linked role.

              \n \n

              You cannot create a DataIntegration association for a DataIntegration that has been previously associated. \nUse a different DataIntegration, or recreate the DataIntegration using the \nCreateDataIntegration API.

              \n
              ", + "smithy.api#http": { + "method": "DELETE", + "uri": "/dataIntegrations/{DataIntegrationIdentifier}", + "code": 200 + } + } + }, + "com.amazonaws.appintegrations#DeleteDataIntegrationRequest": { + "type": "structure", + "members": { + "DataIntegrationIdentifier": { + "target": "com.amazonaws.appintegrations#Identifier", + "traits": { + "smithy.api#documentation": "

              A unique identifier for the DataIntegration.

              ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.appintegrations#DeleteDataIntegrationResponse": { + "type": "structure", + "members": {} + }, "com.amazonaws.appintegrations#DeleteEventIntegration": { "type": "operation", "input": { @@ -433,6 +723,106 @@ } } }, + "com.amazonaws.appintegrations#GetDataIntegration": { + "type": "operation", + "input": { + "target": "com.amazonaws.appintegrations#GetDataIntegrationRequest" + }, + "output": { + "target": "com.amazonaws.appintegrations#GetDataIntegrationResponse" + }, + "errors": [ + { + "target": "com.amazonaws.appintegrations#AccessDeniedException" + }, + { + "target": "com.amazonaws.appintegrations#InternalServiceError" + }, + { + "target": "com.amazonaws.appintegrations#InvalidRequestException" + }, + { + "target": "com.amazonaws.appintegrations#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.appintegrations#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "

              Returns information about the DataIntegration.

              \n \n

              You cannot create a DataIntegration association for a DataIntegration that has been previously associated. \nUse a different DataIntegration, or recreate the DataIntegration using the \nCreateDataIntegration API.

              \n
              ", + "smithy.api#http": { + "method": "GET", + "uri": "/dataIntegrations/{Identifier}", + "code": 200 + } + } + }, + "com.amazonaws.appintegrations#GetDataIntegrationRequest": { + "type": "structure", + "members": { + "Identifier": { + "target": "com.amazonaws.appintegrations#Identifier", + "traits": { + "smithy.api#documentation": "

              A unique identifier.

              ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.appintegrations#GetDataIntegrationResponse": { + "type": "structure", + "members": { + "Arn": { + "target": "com.amazonaws.appintegrations#Arn", + "traits": { + "smithy.api#documentation": "

              The Amazon Resource Name (ARN) for the DataIntegration.

              " + } + }, + "Id": { + "target": "com.amazonaws.appintegrations#UUID", + "traits": { + "smithy.api#documentation": "

              A unique identifier.

              " + } + }, + "Name": { + "target": "com.amazonaws.appintegrations#Name", + "traits": { + "smithy.api#documentation": "

              The name of the DataIntegration.

              " + } + }, + "Description": { + "target": "com.amazonaws.appintegrations#Description", + "traits": { + "smithy.api#documentation": "

              The KMS key for the DataIntegration.

              " + } + }, + "KmsKey": { + "target": "com.amazonaws.appintegrations#NonBlankString", + "traits": { + "smithy.api#documentation": "

              The KMS key for the DataIntegration.

              " + } + }, + "SourceURI": { + "target": "com.amazonaws.appintegrations#NonBlankString", + "traits": { + "smithy.api#documentation": "

              The URI of the data source.

              " + } + }, + "ScheduleConfiguration": { + "target": "com.amazonaws.appintegrations#ScheduleConfiguration", + "traits": { + "smithy.api#documentation": "

              The name of the data and how often it should be pulled from the source.

              " + } + }, + "Tags": { + "target": "com.amazonaws.appintegrations#TagMap", + "traits": { + "smithy.api#documentation": "

              One or more tags.

              " + } + } + } + }, "com.amazonaws.appintegrations#GetEventIntegration": { "type": "operation", "input": { @@ -459,7 +849,7 @@ } ], "traits": { - "smithy.api#documentation": "

              Return information about the event integration.

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

              Returns information about the event integration.

              ", "smithy.api#http": { "method": "GET", "uri": "/eventIntegrations/{Name}", @@ -531,6 +921,16 @@ "smithy.api#pattern": ".*" } }, + "com.amazonaws.appintegrations#Identifier": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 255 + }, + "smithy.api#pattern": "\\S" + } + }, "com.amazonaws.appintegrations#InternalServiceError": { "type": "structure", "members": { @@ -552,11 +952,156 @@ } }, "traits": { - "smithy.api#documentation": "

              The request is not valid.

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

              The request is not valid.

              ", "smithy.api#error": "client", "smithy.api#httpError": 400 } }, + "com.amazonaws.appintegrations#ListDataIntegrationAssociations": { + "type": "operation", + "input": { + "target": "com.amazonaws.appintegrations#ListDataIntegrationAssociationsRequest" + }, + "output": { + "target": "com.amazonaws.appintegrations#ListDataIntegrationAssociationsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.appintegrations#AccessDeniedException" + }, + { + "target": "com.amazonaws.appintegrations#InternalServiceError" + }, + { + "target": "com.amazonaws.appintegrations#InvalidRequestException" + }, + { + "target": "com.amazonaws.appintegrations#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.appintegrations#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "

              Returns a paginated list of DataIntegration associations in the account.

              \n \n

              You cannot create a DataIntegration association for a DataIntegration that has been previously associated. \nUse a different DataIntegration, or recreate the DataIntegration using the \nCreateDataIntegration API.

              \n
              ", + "smithy.api#http": { + "method": "GET", + "uri": "/dataIntegrations/{DataIntegrationIdentifier}/associations", + "code": 200 + } + } + }, + "com.amazonaws.appintegrations#ListDataIntegrationAssociationsRequest": { + "type": "structure", + "members": { + "DataIntegrationIdentifier": { + "target": "com.amazonaws.appintegrations#Identifier", + "traits": { + "smithy.api#documentation": "

              A unique identifier for the DataIntegration.

              ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "NextToken": { + "target": "com.amazonaws.appintegrations#NextToken", + "traits": { + "smithy.api#documentation": "

              The token for the next set of results. Use the value returned in the previous \nresponse in the next request to retrieve the next set of results.

              ", + "smithy.api#httpQuery": "nextToken" + } + }, + "MaxResults": { + "target": "com.amazonaws.appintegrations#MaxResults", + "traits": { + "smithy.api#documentation": "

              The maximum number of results to return per page.

              ", + "smithy.api#httpQuery": "maxResults" + } + } + } + }, + "com.amazonaws.appintegrations#ListDataIntegrationAssociationsResponse": { + "type": "structure", + "members": { + "DataIntegrationAssociations": { + "target": "com.amazonaws.appintegrations#DataIntegrationAssociationsList", + "traits": { + "smithy.api#documentation": "

              The Amazon Resource Name (ARN) and unique ID of the DataIntegration association.

              " + } + }, + "NextToken": { + "target": "com.amazonaws.appintegrations#NextToken", + "traits": { + "smithy.api#documentation": "

              If there are additional results, this is the token for the next set of results.

              " + } + } + } + }, + "com.amazonaws.appintegrations#ListDataIntegrations": { + "type": "operation", + "input": { + "target": "com.amazonaws.appintegrations#ListDataIntegrationsRequest" + }, + "output": { + "target": "com.amazonaws.appintegrations#ListDataIntegrationsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.appintegrations#AccessDeniedException" + }, + { + "target": "com.amazonaws.appintegrations#InternalServiceError" + }, + { + "target": "com.amazonaws.appintegrations#InvalidRequestException" + }, + { + "target": "com.amazonaws.appintegrations#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "

              Returns a paginated list of DataIntegrations in the account.

              \n \n

              You cannot create a DataIntegration association for a DataIntegration that has been previously associated. \nUse a different DataIntegration, or recreate the DataIntegration using the \nCreateDataIntegration API.

              \n
              ", + "smithy.api#http": { + "method": "GET", + "uri": "/dataIntegrations", + "code": 200 + } + } + }, + "com.amazonaws.appintegrations#ListDataIntegrationsRequest": { + "type": "structure", + "members": { + "NextToken": { + "target": "com.amazonaws.appintegrations#NextToken", + "traits": { + "smithy.api#documentation": "

              The token for the next set of results. Use the value returned in the previous \nresponse in the next request to retrieve the next set of results.

              ", + "smithy.api#httpQuery": "nextToken" + } + }, + "MaxResults": { + "target": "com.amazonaws.appintegrations#MaxResults", + "traits": { + "smithy.api#documentation": "

              The maximum number of results to return per page.

              ", + "smithy.api#httpQuery": "maxResults" + } + } + } + }, + "com.amazonaws.appintegrations#ListDataIntegrationsResponse": { + "type": "structure", + "members": { + "DataIntegrations": { + "target": "com.amazonaws.appintegrations#DataIntegrationsList", + "traits": { + "smithy.api#documentation": "

              The DataIntegrations associated with this account.

              " + } + }, + "NextToken": { + "target": "com.amazonaws.appintegrations#NextToken", + "traits": { + "smithy.api#documentation": "

              If there are additional results, this is the token for the next set of results.

              " + } + } + } + }, "com.amazonaws.appintegrations#ListEventIntegrationAssociations": { "type": "operation", "input": { @@ -800,6 +1345,16 @@ "smithy.api#pattern": "\\S" } }, + "com.amazonaws.appintegrations#Object": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 255 + }, + "smithy.api#pattern": "^[a-zA-Z0-9\\/\\._\\-]+$" + } + }, "com.amazonaws.appintegrations#ResourceNotFoundException": { "type": "structure", "members": { @@ -826,6 +1381,42 @@ "smithy.api#httpError": 429 } }, + "com.amazonaws.appintegrations#Schedule": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 255 + }, + "smithy.api#pattern": "^[a-zA-Z0-9\\/\\._\\-]+$" + } + }, + "com.amazonaws.appintegrations#ScheduleConfiguration": { + "type": "structure", + "members": { + "FirstExecutionFrom": { + "target": "com.amazonaws.appintegrations#NonBlankString", + "traits": { + "smithy.api#documentation": "

              The start date for objects to import in the first flow run.

              " + } + }, + "Object": { + "target": "com.amazonaws.appintegrations#Object", + "traits": { + "smithy.api#documentation": "

              The name of the object to pull from the data source.

              " + } + }, + "ScheduleExpression": { + "target": "com.amazonaws.appintegrations#Schedule", + "traits": { + "smithy.api#documentation": "

              How often the data should be pulled from data source.

              " + } + } + }, + "traits": { + "smithy.api#documentation": "

              The name of the data and how often it should be pulled from the source.

              " + } + }, "com.amazonaws.appintegrations#Source": { "type": "string", "traits": { @@ -1012,6 +1603,69 @@ "type": "structure", "members": {} }, + "com.amazonaws.appintegrations#UpdateDataIntegration": { + "type": "operation", + "input": { + "target": "com.amazonaws.appintegrations#UpdateDataIntegrationRequest" + }, + "output": { + "target": "com.amazonaws.appintegrations#UpdateDataIntegrationResponse" + }, + "errors": [ + { + "target": "com.amazonaws.appintegrations#AccessDeniedException" + }, + { + "target": "com.amazonaws.appintegrations#InternalServiceError" + }, + { + "target": "com.amazonaws.appintegrations#InvalidRequestException" + }, + { + "target": "com.amazonaws.appintegrations#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.appintegrations#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "

              Updates the description of a DataIntegration.

              \n \n

              You cannot create a DataIntegration association for a DataIntegration that has been previously associated. \nUse a different DataIntegration, or recreate the DataIntegration using the \nCreateDataIntegration API.

              \n
              ", + "smithy.api#http": { + "method": "PATCH", + "uri": "/dataIntegrations/{Identifier}", + "code": 200 + } + } + }, + "com.amazonaws.appintegrations#UpdateDataIntegrationRequest": { + "type": "structure", + "members": { + "Identifier": { + "target": "com.amazonaws.appintegrations#Identifier", + "traits": { + "smithy.api#documentation": "

              A unique identifier for the DataIntegration.

              ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "Name": { + "target": "com.amazonaws.appintegrations#Name", + "traits": { + "smithy.api#documentation": "

              The name of the DataIntegration.

              " + } + }, + "Description": { + "target": "com.amazonaws.appintegrations#Description", + "traits": { + "smithy.api#documentation": "

              A description of the DataIntegration.

              " + } + } + } + }, + "com.amazonaws.appintegrations#UpdateDataIntegrationResponse": { + "type": "structure", + "members": {} + }, "com.amazonaws.appintegrations#UpdateEventIntegration": { "type": "operation", "input": { diff --git a/codegen/sdk-codegen/aws-models/apprunner.2020-05-15.json b/codegen/sdk-codegen/aws-models/apprunner.2020-05-15.json index 5aa34344b9231..d775cef26d9b9 100644 --- a/codegen/sdk-codegen/aws-models/apprunner.2020-05-15.json +++ b/codegen/sdk-codegen/aws-models/apprunner.2020-05-15.json @@ -142,7 +142,7 @@ "name": "apprunner" }, "aws.protocols#awsJson1_0": {}, - "smithy.api#documentation": "AWS App Runner\n\n \n\n

              AWS App Runner is an application service that provides a fast, simple, and cost-effective way to go directly from an existing container image or source code\n to a running service in the AWS cloud in seconds. You don't need to learn new technologies, decide which compute service to use, or understand how to\n provision and configure AWS resources.

              \n

              App Runner connects directly to your container registry or source code repository. It provides an automatic delivery pipeline with fully managed operations,\n high performance, scalability, and security.

              \n

              For more information about App Runner, see the AWS App Runner Developer Guide.\n For release information, see the AWS App Runner Release Notes.

              \n

              \n To install the Software Development Kits (SDKs), Integrated\n Development Environment (IDE) Toolkits, and command line tools that you can use to access the API, see Tools for\n Amazon Web Services.

              \n

              \n Endpoints\n

              \n

              For a list of Region-specific endpoints that App Runner supports, see AWS App Runner\n endpoints and quotas in the AWS General Reference.

              ", + "smithy.api#documentation": "App Runner\n\n \n\n

              App Runner is an application service that provides a fast, simple, and cost-effective way to go directly from an existing container image or source code\n to a running service in the Amazon Web Services Cloud in seconds. You don't need to learn new technologies, decide which compute service to use, or understand how to\n provision and configure Amazon Web Services resources.

              \n

              App Runner connects directly to your container registry or source code repository. It provides an automatic delivery pipeline with fully managed operations,\n high performance, scalability, and security.

              \n

              For more information about App Runner, see the App Runner Developer Guide.\n For release information, see the App Runner Release Notes.

              \n

              \n To install the Software Development Kits (SDKs), Integrated\n Development Environment (IDE) Toolkits, and command line tools that you can use to access the API, see Tools for\n Amazon Web Services.

              \n

              \n Endpoints\n

              \n

              For a list of Region-specific endpoints that App Runner supports, see App Runner\n endpoints and quotas in the Amazon Web Services General Reference.

              ", "smithy.api#title": "AWS App Runner", "smithy.api#xmlNamespace": { "uri": "http://apprunner.amazonaws.com/doc/2020-05-15/" @@ -156,7 +156,7 @@ "min": 1, "max": 1011 }, - "smithy.api#pattern": "arn:aws(-[\\w]+)*:[a-z0-9-\\\\.]{0,63}:[a-z0-9-\\\\.]{0,63}:[0-9]{12}:(\\w|\\/|-){1,1011}" + "smithy.api#pattern": "^arn:aws(-[\\w]+)*:[a-z0-9-\\\\.]{0,63}:[a-z0-9-\\\\.]{0,63}:[0-9]{12}:(\\w|\\/|-){1,1011}$" } }, "com.amazonaws.apprunner#AssociateCustomDomain": { @@ -179,7 +179,7 @@ } ], "traits": { - "smithy.api#documentation": "

              Associate your own domain name with the AWS App Runner subdomain URL of your App Runner service.

              \n

              After you call AssociateCustomDomain and receive a successful response, use the information in the CustomDomain record\n that's returned to add CNAME records to your Domain Name System (DNS). For each mapped domain name, add a mapping to the target App Runner subdomain and one or\n more certificate validation records. App Runner then performs DNS validation to verify that you own or control the domain name that you associated. App Runner tracks\n domain validity in a certificate stored in AWS Certificate Manager (ACM).

              " + "smithy.api#documentation": "

              Associate your own domain name with the App Runner subdomain URL of your App Runner service.

              \n

              After you call AssociateCustomDomain and receive a successful response, use the information in the CustomDomain record\n that's returned to add CNAME records to your Domain Name System (DNS). For each mapped domain name, add a mapping to the target App Runner subdomain and one or\n more certificate validation records. App Runner then performs DNS validation to verify that you own or control the domain name that you associated. App Runner tracks\n domain validity in a certificate stored in AWS Certificate Manager (ACM).

              " } }, "com.amazonaws.apprunner#AssociateCustomDomainRequest": { @@ -318,7 +318,7 @@ } }, "traits": { - "smithy.api#documentation": "

              Describes an AWS App Runner automatic scaling configuration resource. Multiple revisions of a configuration have the same\n AutoScalingConfigurationName and different AutoScalingConfigurationRevision values.

              \n

              A higher MinSize increases the spread of your App Runner service over more Availability Zones in the AWS Region. The tradeoff is a higher\n minimal cost.

              \n

              A lower MaxSize controls your cost. The tradeoff is lower responsiveness during peak demand.

              " + "smithy.api#documentation": "

              Describes an App Runner automatic scaling configuration resource. Multiple revisions of a configuration have the same\n AutoScalingConfigurationName and different AutoScalingConfigurationRevision values.

              \n

              A higher MinSize increases the spread of your App Runner service over more Availability Zones in the Amazon Web Services Region. The tradeoff is a higher\n minimal cost.

              \n

              A lower MaxSize controls your cost. The tradeoff is lower responsiveness during peak demand.

              " } }, "com.amazonaws.apprunner#AutoScalingConfigurationName": { @@ -328,7 +328,7 @@ "min": 4, "max": 32 }, - "smithy.api#pattern": "[A-Za-z0-9][A-Za-z0-9\\-_]{3,31}" + "smithy.api#pattern": "^[A-Za-z0-9][A-Za-z0-9\\-_]{3,31}$" } }, "com.amazonaws.apprunner#AutoScalingConfigurationStatus": { @@ -369,7 +369,7 @@ } }, "traits": { - "smithy.api#documentation": "

              Provides summary information about an AWS App Runner automatic scaling configuration resource.

              \n

              This type contains limited information about an auto scaling configuration. It includes only identification information, without configuration\n details. It's returned by the ListAutoScalingConfigurations action. Complete configuration information is returned by the CreateAutoScalingConfiguration, DescribeAutoScalingConfiguration, and DeleteAutoScalingConfiguration\n actions using the AutoScalingConfiguration type.

              " + "smithy.api#documentation": "

              Provides summary information about an App Runner automatic scaling configuration resource.

              \n

              This type contains limited information about an auto scaling configuration. It includes only identification information, without configuration\n details. It's returned by the ListAutoScalingConfigurations action. Complete configuration information is returned by the CreateAutoScalingConfiguration, DescribeAutoScalingConfiguration, and DeleteAutoScalingConfiguration\n actions using the AutoScalingConfiguration type.

              " } }, "com.amazonaws.apprunner#AutoScalingConfigurationSummaryList": { @@ -462,7 +462,7 @@ } }, "traits": { - "smithy.api#documentation": "

              Describes the configuration that AWS App Runner uses to build and run an App Runner service from a source code repository.

              " + "smithy.api#documentation": "

              Describes the configuration that App Runner uses to build and run an App Runner service from a source code repository.

              " } }, "com.amazonaws.apprunner#CodeConfigurationValues": { @@ -501,7 +501,7 @@ } }, "traits": { - "smithy.api#documentation": "

              Describes the basic configuration needed for building and running an AWS App Runner service. This type doesn't support the full set of possible\n configuration options. Fur full configuration capabilities, use a apprunner.yaml file in the source code repository.

              " + "smithy.api#documentation": "

              Describes the basic configuration needed for building and running an App Runner service. This type doesn't support the full set of possible\n configuration options. Fur full configuration capabilities, use a apprunner.yaml file in the source code repository.

              " } }, "com.amazonaws.apprunner#CodeRepository": { @@ -582,7 +582,7 @@ } }, "traits": { - "smithy.api#documentation": "

              Describes an AWS App Runner connection resource.

              " + "smithy.api#documentation": "

              Describes an App Runner connection resource.

              " } }, "com.amazonaws.apprunner#ConnectionName": { @@ -592,7 +592,7 @@ "min": 4, "max": 32 }, - "smithy.api#pattern": "[A-Za-z0-9][A-Za-z0-9\\-_]{3,31}" + "smithy.api#pattern": "^[A-Za-z0-9][A-Za-z0-9\\-_]{3,31}$" } }, "com.amazonaws.apprunner#ConnectionStatus": { @@ -653,7 +653,7 @@ } }, "traits": { - "smithy.api#documentation": "

              Provides summary information about an AWS App Runner connection resource.

              " + "smithy.api#documentation": "

              Provides summary information about an App Runner connection resource.

              " } }, "com.amazonaws.apprunner#ConnectionSummaryList": { @@ -669,7 +669,7 @@ "min": 4, "max": 6 }, - "smithy.api#pattern": "1024|2048|(1|2) vCPU" + "smithy.api#pattern": "^1024|2048|(1|2) vCPU$" } }, "com.amazonaws.apprunner#CreateAutoScalingConfiguration": { @@ -692,7 +692,7 @@ } ], "traits": { - "smithy.api#documentation": "

              Create an AWS App Runner automatic scaling configuration resource. App Runner requires this resource\n when you create App Runner services that require non-default auto scaling settings. You can share an\n auto scaling configuration across multiple services.

              \n

              Create multiple revisions of a configuration by using the same AutoScalingConfigurationName and different\n AutoScalingConfigurationRevision values. When you create a service, you can set it to use the latest active revision of an auto scaling\n configuration or a specific revision.

              \n

              Configure a higher MinSize to increase the spread of your App Runner service over more Availability Zones in the AWS Region. The tradeoff is\n a higher minimal cost.

              \n

              Configure a lower MaxSize to control your cost. The tradeoff is lower responsiveness during peak demand.

              " + "smithy.api#documentation": "

              Create an App Runner automatic scaling configuration resource. App Runner requires this resource\n when you create App Runner services that require non-default auto scaling settings. You can share an\n auto scaling configuration across multiple services.

              \n

              Create multiple revisions of a configuration by using the same AutoScalingConfigurationName and different\n AutoScalingConfigurationRevision values. When you create a service, you can set it to use the latest active revision of an auto scaling\n configuration or a specific revision.

              \n

              Configure a higher MinSize to increase the spread of your App Runner service over more Availability Zones in the Amazon Web Services Region. The tradeoff is\n a higher minimal cost.

              \n

              Configure a lower MaxSize to control your cost. The tradeoff is lower responsiveness during peak demand.

              " } }, "com.amazonaws.apprunner#CreateAutoScalingConfigurationRequest": { @@ -701,7 +701,7 @@ "AutoScalingConfigurationName": { "target": "com.amazonaws.apprunner#AutoScalingConfigurationName", "traits": { - "smithy.api#documentation": "

              A name for the auto scaling configuration. When you use it for the first time in an AWS Region, App Runner creates revision number 1 of this\n name. When you use the same name in subsequent calls, App Runner creates incremental revisions of the configuration.

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

              A name for the auto scaling configuration. When you use it for the first time in an Amazon Web Services Region, App Runner creates revision number 1 of this\n name. When you use the same name in subsequent calls, App Runner creates incremental revisions of the configuration.

              ", "smithy.api#required": {} } }, @@ -763,7 +763,7 @@ } ], "traits": { - "smithy.api#documentation": "

              Create an AWS App Runner connection resource. App Runner requires a connection resource when you create App Runner services that access private repositories from\n certain third-party providers. You can share a connection across multiple services.

              \n

              A connection resource is needed to access GitHub repositories. GitHub requires a user interface approval process through the App Runner console before you\n can use the connection.

              " + "smithy.api#documentation": "

              Create an App Runner connection resource. App Runner requires a connection resource when you create App Runner services that access private repositories from\n certain third-party providers. You can share a connection across multiple services.

              \n

              A connection resource is needed to access GitHub repositories. GitHub requires a user interface approval process through the App Runner console before you\n can use the connection.

              " } }, "com.amazonaws.apprunner#CreateConnectionRequest": { @@ -772,7 +772,7 @@ "ConnectionName": { "target": "com.amazonaws.apprunner#ConnectionName", "traits": { - "smithy.api#documentation": "

              A name for the new connection. It must be unique across all App Runner connections for the AWS account in the AWS Region.

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

              A name for the new connection. It must be unique across all App Runner connections for the Amazon Web Services account in the Amazon Web Services Region.

              ", "smithy.api#required": {} } }, @@ -823,7 +823,7 @@ } ], "traits": { - "smithy.api#documentation": "

              Create an AWS App Runner service. After the service is created, the action also automatically starts a deployment.

              \n

              This is an asynchronous operation. On a successful call, you can use the returned OperationId and the ListOperations call to track the operation's progress.

              " + "smithy.api#documentation": "

              Create an App Runner service. After the service is created, the action also automatically starts a deployment.

              \n

              This is an asynchronous operation. On a successful call, you can use the returned OperationId and the ListOperations call to track the operation's progress.

              " } }, "com.amazonaws.apprunner#CreateServiceRequest": { @@ -832,7 +832,7 @@ "ServiceName": { "target": "com.amazonaws.apprunner#ServiceName", "traits": { - "smithy.api#documentation": "

              A name for the new service. It must be unique across all the running App Runner services in your AWS account in the AWS Region.

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

              A name for the new service. It must be unique across all the running App Runner services in your Amazon Web Services account in the Amazon Web Services Region.

              ", "smithy.api#required": {} } }, @@ -858,13 +858,13 @@ "EncryptionConfiguration": { "target": "com.amazonaws.apprunner#EncryptionConfiguration", "traits": { - "smithy.api#documentation": "

              An optional custom encryption key that App Runner uses to encrypt the copy of your source repository that it maintains and your service logs. By default,\n App Runner uses an AWS managed CMK.

              " + "smithy.api#documentation": "

              An optional custom encryption key that App Runner uses to encrypt the copy of your source repository that it maintains and your service logs. By default,\n App Runner uses an Amazon Web Services managed CMK.

              " } }, "HealthCheckConfiguration": { "target": "com.amazonaws.apprunner#HealthCheckConfiguration", "traits": { - "smithy.api#documentation": "

              The settings for the health check that AWS App Runner performs to monitor the health of your service.

              " + "smithy.api#documentation": "

              The settings for the health check that App Runner performs to monitor the health of your service.

              " } }, "AutoScalingConfigurationArn": { @@ -926,7 +926,7 @@ } }, "traits": { - "smithy.api#documentation": "

              Describes a custom domain that's associated with an AWS App Runner service.

              " + "smithy.api#documentation": "

              Describes a custom domain that's associated with an App Runner service.

              " } }, "com.amazonaws.apprunner#CustomDomainAssociationStatus": { @@ -990,7 +990,7 @@ } ], "traits": { - "smithy.api#documentation": "

              Delete an AWS App Runner automatic scaling configuration resource. You can delete a specific revision or the latest active revision. You can't delete a\n configuration that's used by one or more App Runner services.

              " + "smithy.api#documentation": "

              Delete an App Runner automatic scaling configuration resource. You can delete a specific revision or the latest active revision. You can't delete a\n configuration that's used by one or more App Runner services.

              " } }, "com.amazonaws.apprunner#DeleteAutoScalingConfigurationRequest": { @@ -1037,7 +1037,7 @@ } ], "traits": { - "smithy.api#documentation": "

              Delete an AWS App Runner connection. You must first ensure that there are no running App Runner services that use this connection. If there are any, the\n DeleteConnection action fails.

              " + "smithy.api#documentation": "

              Delete an App Runner connection. You must first ensure that there are no running App Runner services that use this connection. If there are any, the\n DeleteConnection action fails.

              " } }, "com.amazonaws.apprunner#DeleteConnectionRequest": { @@ -1086,7 +1086,7 @@ } ], "traits": { - "smithy.api#documentation": "

              Delete an AWS App Runner service.

              \n

              This is an asynchronous operation. On a successful call, you can use the returned OperationId and the ListOperations\n call to track the operation's progress.

              " + "smithy.api#documentation": "

              Delete an App Runner service.

              \n

              This is an asynchronous operation. On a successful call, you can use the returned OperationId and the ListOperations\n call to track the operation's progress.

              " } }, "com.amazonaws.apprunner#DeleteServiceRequest": { @@ -1140,7 +1140,7 @@ } ], "traits": { - "smithy.api#documentation": "

              Return a full description of an AWS App Runner automatic scaling configuration resource.

              " + "smithy.api#documentation": "

              Return a full description of an App Runner automatic scaling configuration resource.

              " } }, "com.amazonaws.apprunner#DescribeAutoScalingConfigurationRequest": { @@ -1187,7 +1187,7 @@ } ], "traits": { - "smithy.api#documentation": "

              Return a description of custom domain names that are associated with an AWS App Runner service.

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

              Return a description of custom domain names that are associated with an App Runner service.

              ", "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", @@ -1281,7 +1281,7 @@ } ], "traits": { - "smithy.api#documentation": "

              Return a full description of an AWS App Runner service.

              " + "smithy.api#documentation": "

              Return a full description of an App Runner service.

              " } }, "com.amazonaws.apprunner#DescribeServiceRequest": { @@ -1331,7 +1331,7 @@ } ], "traits": { - "smithy.api#documentation": "

              Disassociate a custom domain name from an AWS App Runner service.

              \n

              Certificates tracking domain validity are associated with a custom domain and are stored in AWS\n Certificate Manager (ACM). These certificates aren't deleted as part of this action. App Runner delays certificate deletion for\n 30 days after a domain is disassociated from your service.

              " + "smithy.api#documentation": "

              Disassociate a custom domain name from an App Runner service.

              \n

              Certificates tracking domain validity are associated with a custom domain and are stored in AWS\n Certificate Manager (ACM). These certificates aren't deleted as part of this action. App Runner delays certificate deletion for\n 30 days after a domain is disassociated from your service.

              " } }, "com.amazonaws.apprunner#DisassociateCustomDomainRequest": { @@ -1400,7 +1400,7 @@ } }, "traits": { - "smithy.api#documentation": "

              Describes a custom encryption key that AWS App Runner uses to encrypt copies of the source repository and service logs.

              " + "smithy.api#documentation": "

              Describes a custom encryption key that App Runner uses to encrypt copies of the source repository and service logs.

              " } }, "com.amazonaws.apprunner#ErrorMessage": { @@ -1422,7 +1422,7 @@ } }, "Path": { - "target": "com.amazonaws.apprunner#String", + "target": "com.amazonaws.apprunner#HealthCheckPath", "traits": { "smithy.api#documentation": "

              The URL that health check requests are sent to.

              \n

              \n Path is only applicable when you set Protocol to HTTP.

              \n

              Default: \"/\"\n

              " } @@ -1442,18 +1442,18 @@ "HealthyThreshold": { "target": "com.amazonaws.apprunner#HealthCheckHealthyThreshold", "traits": { - "smithy.api#documentation": "

              The number of consecutive checks that must succeed before App Runner decides that the service is healthy.

              \n

              Default: 3\n

              " + "smithy.api#documentation": "

              The number of consecutive checks that must succeed before App Runner decides that the service is healthy.

              \n

              Default: 1\n

              " } }, "UnhealthyThreshold": { "target": "com.amazonaws.apprunner#HealthCheckUnhealthyThreshold", "traits": { - "smithy.api#documentation": "

              The number of consecutive checks that must fail before App Runner decides that the service is unhealthy.

              \n

              Default: 3\n

              " + "smithy.api#documentation": "

              The number of consecutive checks that must fail before App Runner decides that the service is unhealthy.

              \n

              Default: 5\n

              " } } }, "traits": { - "smithy.api#documentation": "

              Describes the settings for the health check that AWS App Runner performs to monitor the health of a service.

              " + "smithy.api#documentation": "

              Describes the settings for the health check that App Runner performs to monitor the health of a service.

              " } }, "com.amazonaws.apprunner#HealthCheckHealthyThreshold": { @@ -1476,6 +1476,14 @@ } } }, + "com.amazonaws.apprunner#HealthCheckPath": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1 + } + } + }, "com.amazonaws.apprunner#HealthCheckProtocol": { "type": "string", "traits": { @@ -1534,7 +1542,7 @@ } }, "traits": { - "smithy.api#documentation": "

              Describes the configuration that AWS App Runner uses to run an App Runner service using an image pulled from a source image repository.

              " + "smithy.api#documentation": "

              Describes the configuration that App Runner uses to run an App Runner service using an image pulled from a source image repository.

              " } }, "com.amazonaws.apprunner#ImageIdentifier": { @@ -1544,7 +1552,7 @@ "min": 1, "max": 1024 }, - "smithy.api#pattern": "([0-9]{12}.dkr.ecr.[a-z\\-]+-[0-9]{1}.amazonaws.com\\/.*)|(^public\\.ecr\\.aws\\/.+\\/.+)" + "smithy.api#pattern": "^([0-9]{12}.dkr.ecr.[a-z\\-]+-[0-9]{1}.amazonaws.com\\/((?:[a-z0-9]+(?:[._-][a-z0-9]+)*\\/)*[a-z0-9]+(?:[._-][a-z0-9]+)*)(:([\\w\\d+\\-=._:\\/@])+|@([\\w\\d\\:]+))?)|(^public\\.ecr\\.aws\\/.+\\/((?:[a-z0-9]+(?:[._-][a-z0-9]+)*\\/)*[a-z0-9]+(?:[._-][a-z0-9]+)*)(:([\\w\\d+\\-=._:\\/@])+|@([\\w\\d\\:]+))?)$" } }, "com.amazonaws.apprunner#ImageRepository": { @@ -1608,12 +1616,12 @@ "InstanceRoleArn": { "target": "com.amazonaws.apprunner#RoleArn", "traits": { - "smithy.api#documentation": "

              The Amazon Resource Name (ARN) of an IAM role that provides permissions to your App Runner service. These are permissions that your code needs when it calls\n any AWS APIs.

              " + "smithy.api#documentation": "

              The Amazon Resource Name (ARN) of an IAM role that provides permissions to your App Runner service. These are permissions that your code needs when it calls\n any Amazon Web Services APIs.

              " } } }, "traits": { - "smithy.api#documentation": "

              Describes the runtime configuration of an AWS App Runner service instance (scaling unit).

              " + "smithy.api#documentation": "

              Describes the runtime configuration of an App Runner service instance (scaling unit).

              " } }, "com.amazonaws.apprunner#Integer": { @@ -1627,6 +1635,10 @@ } }, "traits": { + "aws.protocols#awsQueryError": { + "code": "InternalServiceError", + "httpResponseCode": 500 + }, "smithy.api#documentation": "

              An unexpected service exception occurred.

              ", "smithy.api#error": "server", "smithy.api#httpError": 500 @@ -1640,6 +1652,10 @@ } }, "traits": { + "aws.protocols#awsQueryError": { + "code": "InvalidRequest", + "httpResponseCode": 400 + }, "smithy.api#documentation": "

              One or more input parameters aren't valid. Refer to the API action's document page, correct the input parameters, and try the action again.

              ", "smithy.api#error": "client", "smithy.api#httpError": 400 @@ -1653,6 +1669,10 @@ } }, "traits": { + "aws.protocols#awsQueryError": { + "code": "InvalidState", + "httpResponseCode": 400 + }, "smithy.api#documentation": "

              You can't perform this action when the resource is in its current state.

              ", "smithy.api#error": "client", "smithy.api#httpError": 400 @@ -1665,7 +1685,7 @@ "min": 0, "max": 256 }, - "smithy.api#pattern": "arn:aws(-[\\w]+)*:kms:[a-z\\-]+-[0-9]{1}:[0-9]{12}:key\\/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}" + "smithy.api#pattern": "^arn:aws(-[\\w]+)*:kms:[a-z\\-]+-[0-9]{1}:[0-9]{12}:key\\/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$" } }, "com.amazonaws.apprunner#ListAutoScalingConfigurations": { @@ -1685,7 +1705,7 @@ } ], "traits": { - "smithy.api#documentation": "

              Returns a list of AWS App Runner automatic scaling configurations in your AWS account. You can query the revisions for a specific configuration name or\n the revisions for all configurations in your account. You can optionally query only the latest revision of each requested name.

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

              Returns a list of App Runner automatic scaling configurations in your Amazon Web Services account. You can query the revisions for a specific configuration name or\n the revisions for all configurations in your account. You can optionally query only the latest revision of each requested name.

              ", "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", @@ -1757,7 +1777,7 @@ } ], "traits": { - "smithy.api#documentation": "

              Returns a list of AWS App Runner connections that are associated with your AWS account.

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

              Returns a list of App Runner connections that are associated with your Amazon Web Services account.

              ", "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", @@ -1826,7 +1846,7 @@ } ], "traits": { - "smithy.api#documentation": "

              Return a list of operations that occurred on an AWS App Runner service.

              \n

              The resulting list of OperationSummary objects is sorted in reverse chronological order. The first object on the list represents the\n last started operation.

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

              Return a list of operations that occurred on an App Runner service.

              \n

              The resulting list of OperationSummary objects is sorted in reverse chronological order. The first object on the list represents the\n last started operation.

              ", "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", @@ -1902,7 +1922,7 @@ } ], "traits": { - "smithy.api#documentation": "

              Returns a list of running AWS App Runner services in your AWS account.

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

              Returns a list of running App Runner services in your Amazon Web Services account.

              ", "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", @@ -1968,7 +1988,7 @@ } ], "traits": { - "smithy.api#documentation": "

              List tags that are associated with for an AWS App Runner resource. The response contains a list of tag key-value pairs.

              " + "smithy.api#documentation": "

              List tags that are associated with for an App Runner resource. The response contains a list of tag key-value pairs.

              " } }, "com.amazonaws.apprunner#ListTagsForResourceRequest": { @@ -2011,7 +2031,7 @@ "min": 4, "max": 4 }, - "smithy.api#pattern": "2048|3072|4096|(2|3|4) GB" + "smithy.api#pattern": "^2048|3072|4096|(2|3|4) GB$" } }, "com.amazonaws.apprunner#NextToken": { @@ -2112,7 +2132,7 @@ } }, "traits": { - "smithy.api#documentation": "

              Provides summary information for an operation that occurred on an AWS App Runner service.

              " + "smithy.api#documentation": "

              Provides summary information for an operation that occurred on an App Runner service.

              " } }, "com.amazonaws.apprunner#OperationSummaryList": { @@ -2171,7 +2191,7 @@ } ], "traits": { - "smithy.api#documentation": "

              Pause an active AWS App Runner service. App Runner reduces compute capacity for the service to zero and loses state (for example, ephemeral storage is\n removed).

              \n

              This is an asynchronous operation. On a successful call, you can use the returned OperationId and the ListOperations\n call to track the operation's progress.

              " + "smithy.api#documentation": "

              Pause an active App Runner service. App Runner reduces compute capacity for the service to zero and loses state (for example, ephemeral storage is\n removed).

              \n

              This is an asynchronous operation. On a successful call, you can use the returned OperationId and the ListOperations\n call to track the operation's progress.

              " } }, "com.amazonaws.apprunner#PauseServiceRequest": { @@ -2223,7 +2243,11 @@ } }, "traits": { - "smithy.api#documentation": "

              A resource doesn't exist for the specified Amazon Resource Name (ARN) in your AWS account.

              ", + "aws.protocols#awsQueryError": { + "code": "ResourceNotfound", + "httpResponseCode": 400 + }, + "smithy.api#documentation": "

              A resource doesn't exist for the specified Amazon Resource Name (ARN) in your Amazon Web Services account.

              ", "smithy.api#error": "client", "smithy.api#httpError": 400 } @@ -2251,7 +2275,7 @@ } ], "traits": { - "smithy.api#documentation": "

              Resume an active AWS App Runner service. App Runner provisions compute capacity for the service.

              \n

              This is an asynchronous operation. On a successful call, you can use the returned OperationId and the ListOperations\n call to track the operation's progress.

              " + "smithy.api#documentation": "

              Resume an active App Runner service. App Runner provisions compute capacity for the service.

              \n

              This is an asynchronous operation. On a successful call, you can use the returned OperationId and the ListOperations\n call to track the operation's progress.

              " } }, "com.amazonaws.apprunner#ResumeServiceRequest": { @@ -2289,9 +2313,9 @@ "traits": { "smithy.api#length": { "min": 29, - "max": 102 + "max": 1024 }, - "smithy.api#pattern": "arn:(aws|aws-us-gov|aws-cn|aws-iso|aws-iso-b):iam::[0-9]{12}:role/[\\w+=,.@-]{1,64}" + "smithy.api#pattern": "^arn:(aws|aws-us-gov|aws-cn|aws-iso|aws-iso-b):iam::[0-9]{12}:(role|role\\/service-role)\\/[\\w+=,.@\\-/]{1,1000}$" } }, "com.amazonaws.apprunner#Runtime": { @@ -2343,7 +2367,7 @@ "ServiceId": { "target": "com.amazonaws.apprunner#ServiceId", "traits": { - "smithy.api#documentation": "

              An ID that App Runner generated for this service. It's unique within the AWS Region.

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

              An ID that App Runner generated for this service. It's unique within the Amazon Web Services Region.

              ", "smithy.api#required": {} } }, @@ -2405,7 +2429,7 @@ "EncryptionConfiguration": { "target": "com.amazonaws.apprunner#EncryptionConfiguration", "traits": { - "smithy.api#documentation": "

              The encryption key that App Runner uses to encrypt the service logs and the copy of the source repository that App Runner maintains for the service. It can be\n either a customer-provided encryption key or an AWS managed CMK.

              " + "smithy.api#documentation": "

              The encryption key that App Runner uses to encrypt the service logs and the copy of the source repository that App Runner maintains for the service. It can be\n either a customer-provided encryption key or an Amazon Web Services managed CMK.

              " } }, "HealthCheckConfiguration": { @@ -2423,7 +2447,7 @@ } }, "traits": { - "smithy.api#documentation": "

              Describes an AWS App Runner service. It can describe a service in any state, including deleted services.

              \n

              This type contains the full information about a service, including configuration details. It's returned by the CreateService, DescribeService, and DeleteService actions. A subset of this\n information is returned by the ListServices action using the ServiceSummary type.

              " + "smithy.api#documentation": "

              Describes an App Runner service. It can describe a service in any state, including deleted services.

              \n

              This type contains the full information about a service, including configuration details. It's returned by the CreateService, DescribeService, and DeleteService actions. A subset of this\n information is returned by the ListServices action using the ServiceSummary type.

              " } }, "com.amazonaws.apprunner#ServiceId": { @@ -2433,7 +2457,7 @@ "min": 32, "max": 32 }, - "smithy.api#pattern": "[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}" + "smithy.api#pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$" } }, "com.amazonaws.apprunner#ServiceMaxResults": { @@ -2453,7 +2477,7 @@ "min": 4, "max": 40 }, - "smithy.api#pattern": "[A-Za-z0-9][A-Za-z0-9-_]{3,39}" + "smithy.api#pattern": "^[A-Za-z0-9][A-Za-z0-9-_]{3,39}$" } }, "com.amazonaws.apprunner#ServiceQuotaExceededException": { @@ -2464,7 +2488,11 @@ } }, "traits": { - "smithy.api#documentation": "

              App Runner can't create this resource. You've reached your account quota for this resource type.

              \n

              For App Runner per-resource quotas, see AWS App Runner endpoints and quotas in the\n AWS General Reference.

              ", + "aws.protocols#awsQueryError": { + "code": "ServiceQuotaExceeded", + "httpResponseCode": 402 + }, + "smithy.api#documentation": "

              App Runner can't create this resource. You've reached your account quota for this resource type.

              \n

              For App Runner per-resource quotas, see App Runner endpoints and quotas in the\n Amazon Web Services General Reference.

              ", "smithy.api#error": "client", "smithy.api#httpError": 402 } @@ -2512,7 +2540,7 @@ "ServiceId": { "target": "com.amazonaws.apprunner#ServiceId", "traits": { - "smithy.api#documentation": "

              An ID that App Runner generated for this service. It's unique within the AWS Region.

              " + "smithy.api#documentation": "

              An ID that App Runner generated for this service. It's unique within the Amazon Web Services Region.

              " } }, "ServiceArn": { @@ -2547,7 +2575,7 @@ } }, "traits": { - "smithy.api#documentation": "

              Provides summary information for an AWS App Runner service.

              \n

              This type contains limited information about a service. It doesn't include configuration details. It's returned by the ListServices action. Complete service information is returned by the CreateService, DescribeService, and DeleteService actions using the Service type.

              " + "smithy.api#documentation": "

              Provides summary information for an App Runner service.

              \n

              This type contains limited information about a service. It doesn't include configuration details. It's returned by the ListServices action. Complete service information is returned by the CreateService, DescribeService, and DeleteService actions using the Service type.

              " } }, "com.amazonaws.apprunner#ServiceSummaryList": { @@ -2575,7 +2603,7 @@ } }, "traits": { - "smithy.api#documentation": "

              Identifies a version of code that AWS App Runner refers to within a source code repository.

              " + "smithy.api#documentation": "

              Identifies a version of code that App Runner refers to within a source code repository.

              " } }, "com.amazonaws.apprunner#SourceCodeVersionType": { @@ -2607,7 +2635,7 @@ "AutoDeploymentsEnabled": { "target": "com.amazonaws.apprunner#NullableBoolean", "traits": { - "smithy.api#documentation": "

              If true, continuous integration from the source repository is enabled for the App Runner service. Each repository change (source code commit or\n new image version) starts a deployment.

              \n

              Default: true\n

              " + "smithy.api#documentation": "

              If true, continuous integration from the source repository is enabled for the App Runner service. Each repository change (including any source\n code commit or new image version) starts a deployment.

              \n

              Default: App Runner sets to false for a source image that uses an ECR Public repository or an ECR repository that's in an Amazon Web Services account other than the one that the service is in. App Runner sets to true in all other cases (which currently include a source code\n repository or a source image using a same-account ECR repository).

              " } }, "AuthenticationConfiguration": { @@ -2618,7 +2646,7 @@ } }, "traits": { - "smithy.api#documentation": "

              Describes the source deployed to an AWS App Runner service. It can be a code or an image repository.

              " + "smithy.api#documentation": "

              Describes the source deployed to an App Runner service. It can be a code or an image repository.

              " } }, "com.amazonaws.apprunner#StartCommand": { @@ -2647,7 +2675,7 @@ } ], "traits": { - "smithy.api#documentation": "

              Initiate a manual deployment of the latest commit in a source code repository or the latest image in a source image repository to an AWS App Runner\n service.

              \n

              For a source code repository, App Runner retrieves the commit and builds a Docker image. For a source image repository, App Runner retrieves the latest Docker\n image. In both cases, App Runner then deploys the new image to your service and starts a new container instance.

              \n

              This is an asynchronous operation. On a successful call, you can use the returned OperationId and the ListOperations\n call to track the operation's progress.

              " + "smithy.api#documentation": "

              Initiate a manual deployment of the latest commit in a source code repository or the latest image in a source image repository to an App Runner\n service.

              \n

              For a source code repository, App Runner retrieves the commit and builds a Docker image. For a source image repository, App Runner retrieves the latest Docker\n image. In both cases, App Runner then deploys the new image to your service and starts a new container instance.

              \n

              This is an asynchronous operation. On a successful call, you can use the returned OperationId and the ListOperations\n call to track the operation's progress.

              " } }, "com.amazonaws.apprunner#StartDeploymentRequest": { @@ -2701,7 +2729,7 @@ } }, "traits": { - "smithy.api#documentation": "

              Describes a tag that is applied to an AWS App Runner resource. A tag is a metadata item consisting of a key-value pair.

              " + "smithy.api#documentation": "

              Describes a tag that is applied to an App Runner resource. A tag is a metadata item consisting of a key-value pair.

              " } }, "com.amazonaws.apprunner#TagKey": { @@ -2711,7 +2739,7 @@ "min": 1, "max": 128 }, - "smithy.api#pattern": "^(?!aws:).+" + "smithy.api#pattern": "^(?!aws:).+$" } }, "com.amazonaws.apprunner#TagKeyList": { @@ -2795,7 +2823,7 @@ "min": 36, "max": 36 }, - "smithy.api#pattern": "[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}" + "smithy.api#pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$" } }, "com.amazonaws.apprunner#UntagResource": { @@ -2870,7 +2898,7 @@ } ], "traits": { - "smithy.api#documentation": "

              Update an AWS App Runner service. You can update the source configuration and instance configuration of the service. You can also update the ARN of the auto\n scaling configuration resource that's associated with the service. However, you can't change the name or the encryption configuration of the service.\n These can be set only when you create the service.

              \n

              To update the tags applied to your service, use the separate actions TagResource and UntagResource.

              \n

              This is an asynchronous operation. On a successful call, you can use the returned OperationId and the ListOperations\n call to track the operation's progress.

              " + "smithy.api#documentation": "

              Update an App Runner service. You can update the source configuration and instance configuration of the service. You can also update the ARN of the auto\n scaling configuration resource that's associated with the service. However, you can't change the name or the encryption configuration of the service.\n These can be set only when you create the service.

              \n

              To update the tags applied to your service, use the separate actions TagResource and UntagResource.

              \n

              This is an asynchronous operation. On a successful call, you can use the returned OperationId and the ListOperations\n call to track the operation's progress.

              " } }, "com.amazonaws.apprunner#UpdateServiceRequest": { @@ -2904,7 +2932,7 @@ "HealthCheckConfiguration": { "target": "com.amazonaws.apprunner#HealthCheckConfiguration", "traits": { - "smithy.api#documentation": "

              The settings for the health check that AWS App Runner performs to monitor the health of your service.

              " + "smithy.api#documentation": "

              The settings for the health check that App Runner performs to monitor the health of your service.

              " } } } diff --git a/codegen/sdk-codegen/aws-models/cloudcontrol.2021-09-30.json b/codegen/sdk-codegen/aws-models/cloudcontrol.2021-09-30.json new file mode 100644 index 0000000000000..50cf2119cfa0c --- /dev/null +++ b/codegen/sdk-codegen/aws-models/cloudcontrol.2021-09-30.json @@ -0,0 +1,1606 @@ +{ + "smithy": "1.0", + "metadata": { + "suppressions": [ + { + "id": "HttpMethodSemantics", + "namespace": "*" + }, + { + "id": "HttpResponseCodeSemantics", + "namespace": "*" + }, + { + "id": "PaginatedTrait", + "namespace": "*" + }, + { + "id": "HttpHeaderTrait", + "namespace": "*" + }, + { + "id": "HttpUriConflict", + "namespace": "*" + }, + { + "id": "Service", + "namespace": "*" + } + ] + }, + "shapes": { + "com.amazonaws.cloudcontrol#AlreadyExistsException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.cloudcontrol#ErrorMessage" + } + }, + "traits": { + "aws.protocols#awsQueryError": { + "code": "AlreadyExistsException", + "httpResponseCode": 400 + }, + "smithy.api#documentation": "

              The resource with the name requested already exists.

              ", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.cloudcontrol#CancelResourceRequest": { + "type": "operation", + "input": { + "target": "com.amazonaws.cloudcontrol#CancelResourceRequestInput" + }, + "output": { + "target": "com.amazonaws.cloudcontrol#CancelResourceRequestOutput" + }, + "errors": [ + { + "target": "com.amazonaws.cloudcontrol#ConcurrentModificationException" + }, + { + "target": "com.amazonaws.cloudcontrol#RequestTokenNotFoundException" + } + ], + "traits": { + "smithy.api#documentation": "

              Cancels the specified resource operation request. For more information, see Canceling resource operation requests in the\n Amazon Web Services Cloud Control API User Guide.

              \n

              Only resource operations requests with a status of PENDING or\n IN_PROGRESS can be cancelled.

              ", + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.cloudcontrol#CancelResourceRequestInput": { + "type": "structure", + "members": { + "RequestToken": { + "target": "com.amazonaws.cloudcontrol#RequestToken", + "traits": { + "smithy.api#documentation": "

              The RequestToken of the ProgressEvent object returned by the\n resource operation request.

              ", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.cloudcontrol#CancelResourceRequestOutput": { + "type": "structure", + "members": { + "ProgressEvent": { + "target": "com.amazonaws.cloudcontrol#ProgressEvent" + } + } + }, + "com.amazonaws.cloudcontrol#ClientToken": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 128 + }, + "smithy.api#pattern": "^[-A-Za-z0-9+/=]+$" + } + }, + "com.amazonaws.cloudcontrol#ClientTokenConflictException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.cloudcontrol#ErrorMessage" + } + }, + "traits": { + "aws.protocols#awsQueryError": { + "code": "ClientTokenConflictException", + "httpResponseCode": 409 + }, + "smithy.api#documentation": "

              The specified client token has already been used in another resource request.

              \n

              It is best practice for client tokens to be unique for each resource operation request.\n However, client token expire after 36 hours.

              ", + "smithy.api#error": "client", + "smithy.api#httpError": 409 + } + }, + "com.amazonaws.cloudcontrol#CloudApiService": { + "type": "service", + "version": "2021-09-30", + "operations": [ + { + "target": "com.amazonaws.cloudcontrol#CancelResourceRequest" + }, + { + "target": "com.amazonaws.cloudcontrol#CreateResource" + }, + { + "target": "com.amazonaws.cloudcontrol#DeleteResource" + }, + { + "target": "com.amazonaws.cloudcontrol#GetResource" + }, + { + "target": "com.amazonaws.cloudcontrol#GetResourceRequestStatus" + }, + { + "target": "com.amazonaws.cloudcontrol#ListResourceRequests" + }, + { + "target": "com.amazonaws.cloudcontrol#ListResources" + }, + { + "target": "com.amazonaws.cloudcontrol#UpdateResource" + } + ], + "traits": { + "aws.api#service": { + "sdkId": "CloudControl", + "arnNamespace": "cloudcontrolapi", + "cloudFormationName": "CloudControl", + "cloudTrailEventSource": "cloudcontrol.amazonaws.com", + "endpointPrefix": "cloudcontrolapi" + }, + "aws.auth#sigv4": { + "name": "cloudcontrolapi" + }, + "aws.protocols#awsJson1_0": {}, + "smithy.api#documentation": "

              Use Amazon Web Services Cloud Control API to create, read, update, delete, and list (CRUD-L) your cloud resources that\n belong to a wide range of services--both Amazon Web Services and third-party. With the Cloud Control API\n standardized set of application programming interfaces (APIs), you can perform CRUD-L operations\n on any supported resources in your Amazon Web Services account. Using Cloud Control API, you won't have to generate code\n or scripts specific to each individual service responsible for those resources.

              \n

              For more information about Amazon Web Services Cloud Control API, see the Amazon Web Services Cloud Control API User\n Guide.

              ", + "smithy.api#title": "AWS Cloud Control API" + } + }, + "com.amazonaws.cloudcontrol#ConcurrentModificationException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.cloudcontrol#ErrorMessage" + } + }, + "traits": { + "aws.protocols#awsQueryError": { + "code": "ConcurrentModificationException", + "httpResponseCode": 500 + }, + "smithy.api#documentation": "

              The resource is currently being modified by another operation.

              ", + "smithy.api#error": "server", + "smithy.api#httpError": 500 + } + }, + "com.amazonaws.cloudcontrol#ConcurrentOperationException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.cloudcontrol#ErrorMessage" + } + }, + "traits": { + "aws.protocols#awsQueryError": { + "code": "ConcurrentOperationException", + "httpResponseCode": 409 + }, + "smithy.api#documentation": "

              Another resource operation is currently being performed on this resource.

              ", + "smithy.api#error": "client", + "smithy.api#httpError": 409 + } + }, + "com.amazonaws.cloudcontrol#CreateResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.cloudcontrol#CreateResourceInput" + }, + "output": { + "target": "com.amazonaws.cloudcontrol#CreateResourceOutput" + }, + "errors": [ + { + "target": "com.amazonaws.cloudcontrol#AlreadyExistsException" + }, + { + "target": "com.amazonaws.cloudcontrol#ClientTokenConflictException" + }, + { + "target": "com.amazonaws.cloudcontrol#ConcurrentOperationException" + }, + { + "target": "com.amazonaws.cloudcontrol#GeneralServiceException" + }, + { + "target": "com.amazonaws.cloudcontrol#HandlerFailureException" + }, + { + "target": "com.amazonaws.cloudcontrol#HandlerInternalFailureException" + }, + { + "target": "com.amazonaws.cloudcontrol#InvalidCredentialsException" + }, + { + "target": "com.amazonaws.cloudcontrol#InvalidRequestException" + }, + { + "target": "com.amazonaws.cloudcontrol#NetworkFailureException" + }, + { + "target": "com.amazonaws.cloudcontrol#NotStabilizedException" + }, + { + "target": "com.amazonaws.cloudcontrol#NotUpdatableException" + }, + { + "target": "com.amazonaws.cloudcontrol#PrivateTypeException" + }, + { + "target": "com.amazonaws.cloudcontrol#ResourceConflictException" + }, + { + "target": "com.amazonaws.cloudcontrol#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.cloudcontrol#ServiceInternalErrorException" + }, + { + "target": "com.amazonaws.cloudcontrol#ServiceLimitExceededException" + }, + { + "target": "com.amazonaws.cloudcontrol#ThrottlingException" + }, + { + "target": "com.amazonaws.cloudcontrol#TypeNotFoundException" + }, + { + "target": "com.amazonaws.cloudcontrol#UnsupportedActionException" + } + ], + "traits": { + "smithy.api#documentation": "

              Creates the specified resource. For more information, see Creating a\n resource in the Amazon Web Services Cloud Control API User Guide.

              \n

              After you have initiated a resource creation request, you can monitor the progress of your\n request by calling GetResourceRequestStatus using the RequestToken of the\n ProgressEvent type returned by CreateResource.

              " + } + }, + "com.amazonaws.cloudcontrol#CreateResourceInput": { + "type": "structure", + "members": { + "TypeName": { + "target": "com.amazonaws.cloudcontrol#TypeName", + "traits": { + "smithy.api#documentation": "

              The name of the resource type.

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

              For private resource types, the type version to use in this resource operation. If you do not specify a resource version, CloudFormation uses the default version.

              " + } + }, + "RoleArn": { + "target": "com.amazonaws.cloudcontrol#RoleArn", + "traits": { + "smithy.api#documentation": "

              The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) for Cloud Control API to use when performing this resource operation. The role specified must have the permissions required for this operation. The necessary permissions for each event handler are defined in the \n handlers\n section of the resource type definition schema.

              \n

              If you do not specify a role, Cloud Control API uses a temporary session created using your Amazon Web Services user credentials.

              \n

              For more information, see Specifying credentials in the Amazon Web Services Cloud Control API User Guide.

              " + } + }, + "ClientToken": { + "target": "com.amazonaws.cloudcontrol#ClientToken", + "traits": { + "smithy.api#documentation": "

              A unique identifier to ensure the idempotency of the resource request. As a best practice, specify this token to ensure idempotency, so that Amazon Web Services Cloud Control API can accurately distinguish between request retries and new resource requests. You might retry a resource request to ensure that it was successfully received.

              \n

              A client token is valid for 36 hours once used. After that, a resource request with the same client token is treated as a new request.

              \n

              If you do not specify a client token, one is generated for inclusion in the request.

              \n

              For more information, see Ensuring resource operation requests are unique in the Amazon Web Services Cloud Control API User Guide.

              ", + "smithy.api#idempotencyToken": {} + } + }, + "DesiredState": { + "target": "com.amazonaws.cloudcontrol#Properties", + "traits": { + "smithy.api#documentation": "

              Structured data format representing the desired state of the resource, consisting of that\n resource's properties and their desired values.

              \n \n

              Cloud Control API currently supports JSON as a structured data format.

              \n
              \n \n

              Specify the desired state as one of the following:

              \n
                \n
              • \n

                A JSON blob

                \n
              • \n
              • \n

                A local path containing the desired state in JSON data format

                \n
              • \n
              \n

              For more information, see Composing the desired state of the resource in the Amazon Web Services Cloud Control API User\n Guide.

              \n

              For more information about the properties of a specific resource, refer to the related\n topic for the resource in the Resource and property types reference in the Amazon Web Services\n CloudFormation Users Guide.

              ", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.cloudcontrol#CreateResourceOutput": { + "type": "structure", + "members": { + "ProgressEvent": { + "target": "com.amazonaws.cloudcontrol#ProgressEvent", + "traits": { + "smithy.api#documentation": "

              Represents the current status of the resource creation request.

              \n

              After you have initiated a resource creation request, you can monitor the progress of your\n request by calling GetResourceRequestStatus using the RequestToken of the\n ProgressEvent returned by CreateResource.

              " + } + } + } + }, + "com.amazonaws.cloudcontrol#DeleteResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.cloudcontrol#DeleteResourceInput" + }, + "output": { + "target": "com.amazonaws.cloudcontrol#DeleteResourceOutput" + }, + "errors": [ + { + "target": "com.amazonaws.cloudcontrol#AlreadyExistsException" + }, + { + "target": "com.amazonaws.cloudcontrol#ClientTokenConflictException" + }, + { + "target": "com.amazonaws.cloudcontrol#ConcurrentOperationException" + }, + { + "target": "com.amazonaws.cloudcontrol#GeneralServiceException" + }, + { + "target": "com.amazonaws.cloudcontrol#HandlerFailureException" + }, + { + "target": "com.amazonaws.cloudcontrol#HandlerInternalFailureException" + }, + { + "target": "com.amazonaws.cloudcontrol#InvalidCredentialsException" + }, + { + "target": "com.amazonaws.cloudcontrol#InvalidRequestException" + }, + { + "target": "com.amazonaws.cloudcontrol#NetworkFailureException" + }, + { + "target": "com.amazonaws.cloudcontrol#NotStabilizedException" + }, + { + "target": "com.amazonaws.cloudcontrol#NotUpdatableException" + }, + { + "target": "com.amazonaws.cloudcontrol#PrivateTypeException" + }, + { + "target": "com.amazonaws.cloudcontrol#ResourceConflictException" + }, + { + "target": "com.amazonaws.cloudcontrol#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.cloudcontrol#ServiceInternalErrorException" + }, + { + "target": "com.amazonaws.cloudcontrol#ServiceLimitExceededException" + }, + { + "target": "com.amazonaws.cloudcontrol#ThrottlingException" + }, + { + "target": "com.amazonaws.cloudcontrol#TypeNotFoundException" + }, + { + "target": "com.amazonaws.cloudcontrol#UnsupportedActionException" + } + ], + "traits": { + "smithy.api#documentation": "

              Deletes the specified resource. For details, see Deleting a\n resource in the Amazon Web Services Cloud Control API User Guide.

              \n

              After you have initiated a resource deletion request, you can monitor the progress of your\n request by calling GetResourceRequestStatus using the RequestToken of the\n ProgressEvent returned by DeleteResource.

              " + } + }, + "com.amazonaws.cloudcontrol#DeleteResourceInput": { + "type": "structure", + "members": { + "TypeName": { + "target": "com.amazonaws.cloudcontrol#TypeName", + "traits": { + "smithy.api#documentation": "

              The name of the resource type.

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

              For private resource types, the type version to use in this resource operation. If you do not specify a resource version, CloudFormation uses the default version.

              " + } + }, + "RoleArn": { + "target": "com.amazonaws.cloudcontrol#RoleArn", + "traits": { + "smithy.api#documentation": "

              The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) for Cloud Control API to use when performing this resource operation. The role specified must have the permissions required for this operation. The necessary permissions for each event handler are defined in the \n handlers\n section of the resource type definition schema.

              \n

              If you do not specify a role, Cloud Control API uses a temporary session created using your Amazon Web Services user credentials.

              \n

              For more information, see Specifying credentials in the Amazon Web Services Cloud Control API User Guide.

              " + } + }, + "ClientToken": { + "target": "com.amazonaws.cloudcontrol#ClientToken", + "traits": { + "smithy.api#documentation": "

              A unique identifier to ensure the idempotency of the resource request. As a best practice, specify this token to ensure idempotency, so that Amazon Web Services Cloud Control API can accurately distinguish between request retries and new resource requests. You might retry a resource request to ensure that it was successfully received.

              \n

              A client token is valid for 36 hours once used. After that, a resource request with the same client token is treated as a new request.

              \n

              If you do not specify a client token, one is generated for inclusion in the request.

              \n

              For more information, see Ensuring resource operation requests are unique in the Amazon Web Services Cloud Control API User Guide.

              ", + "smithy.api#idempotencyToken": {} + } + }, + "Identifier": { + "target": "com.amazonaws.cloudcontrol#Identifier", + "traits": { + "smithy.api#documentation": "

              The identifier for the resource.

              \n

              You can specify the primary identifier, or any secondary identifier defined for the resource type in its resource schema. You can only specify one identifier. Primary identifiers can be specified as a string or JSON; secondary identifiers must be specified as JSON.

              \n

              For compound primary identifiers (that is, one that consists of multiple resource properties strung together), to specify the primary identifier as a string, list the property values in the order they are specified in the primary identifier definition, separated by |.

              \n

              For more information, see Identifying resources in the Amazon Web Services Cloud Control API User Guide.

              ", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.cloudcontrol#DeleteResourceOutput": { + "type": "structure", + "members": { + "ProgressEvent": { + "target": "com.amazonaws.cloudcontrol#ProgressEvent", + "traits": { + "smithy.api#documentation": "

              Represents the current status of the resource deletion request.

              \n

              After you have initiated a resource deletion request, you can monitor the progress of your\n request by calling GetResourceRequestStatus using the RequestToken of the\n ProgressEvent returned by DeleteResource.

              " + } + } + } + }, + "com.amazonaws.cloudcontrol#ErrorMessage": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1024 + } + } + }, + "com.amazonaws.cloudcontrol#GeneralServiceException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.cloudcontrol#ErrorMessage" + } + }, + "traits": { + "aws.protocols#awsQueryError": { + "code": "GeneralServiceException", + "httpResponseCode": 400 + }, + "smithy.api#documentation": "

              The resource handler has returned that the downstream service generated an error that does\n not map to any other handler error code.

              ", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.cloudcontrol#GetResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.cloudcontrol#GetResourceInput" + }, + "output": { + "target": "com.amazonaws.cloudcontrol#GetResourceOutput" + }, + "errors": [ + { + "target": "com.amazonaws.cloudcontrol#AlreadyExistsException" + }, + { + "target": "com.amazonaws.cloudcontrol#GeneralServiceException" + }, + { + "target": "com.amazonaws.cloudcontrol#HandlerFailureException" + }, + { + "target": "com.amazonaws.cloudcontrol#HandlerInternalFailureException" + }, + { + "target": "com.amazonaws.cloudcontrol#InvalidCredentialsException" + }, + { + "target": "com.amazonaws.cloudcontrol#InvalidRequestException" + }, + { + "target": "com.amazonaws.cloudcontrol#NetworkFailureException" + }, + { + "target": "com.amazonaws.cloudcontrol#NotStabilizedException" + }, + { + "target": "com.amazonaws.cloudcontrol#NotUpdatableException" + }, + { + "target": "com.amazonaws.cloudcontrol#PrivateTypeException" + }, + { + "target": "com.amazonaws.cloudcontrol#ResourceConflictException" + }, + { + "target": "com.amazonaws.cloudcontrol#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.cloudcontrol#ServiceInternalErrorException" + }, + { + "target": "com.amazonaws.cloudcontrol#ServiceLimitExceededException" + }, + { + "target": "com.amazonaws.cloudcontrol#ThrottlingException" + }, + { + "target": "com.amazonaws.cloudcontrol#TypeNotFoundException" + }, + { + "target": "com.amazonaws.cloudcontrol#UnsupportedActionException" + } + ], + "traits": { + "smithy.api#documentation": "

              Returns information about the current state of the specified resource. For details, see\n Reading a resource's current state.

              \n

              You can use this action to return information about an existing resource in your account\n and Amazon Web Services Region, whether or not those resources were provisioned using Cloud Control API.

              " + } + }, + "com.amazonaws.cloudcontrol#GetResourceInput": { + "type": "structure", + "members": { + "TypeName": { + "target": "com.amazonaws.cloudcontrol#TypeName", + "traits": { + "smithy.api#documentation": "

              The name of the resource type.

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

              For private resource types, the type version to use in this resource operation. If you do not specify a resource version, CloudFormation uses the default version.

              " + } + }, + "RoleArn": { + "target": "com.amazonaws.cloudcontrol#RoleArn", + "traits": { + "smithy.api#documentation": "

              The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) for Cloud Control API to use when performing this resource operation. The role specified must have the permissions required for this operation. The necessary permissions for each event handler are defined in the \n handlers\n section of the resource type definition schema.

              \n

              If you do not specify a role, Cloud Control API uses a temporary session created using your Amazon Web Services user credentials.

              \n

              For more information, see Specifying credentials in the Amazon Web Services Cloud Control API User Guide.

              " + } + }, + "Identifier": { + "target": "com.amazonaws.cloudcontrol#Identifier", + "traits": { + "smithy.api#documentation": "

              The identifier for the resource.

              \n

              You can specify the primary identifier, or any secondary identifier defined for the resource type in its resource schema. You can only specify one identifier. Primary identifiers can be specified as a string or JSON; secondary identifiers must be specified as JSON.

              \n

              For compound primary identifiers (that is, one that consists of multiple resource properties strung together), to specify the primary identifier as a string, list the property values in the order they are specified in the primary identifier definition, separated by |.

              \n

              For more information, see Identifying resources in the Amazon Web Services Cloud Control API User Guide.

              ", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.cloudcontrol#GetResourceOutput": { + "type": "structure", + "members": { + "TypeName": { + "target": "com.amazonaws.cloudcontrol#TypeName", + "traits": { + "smithy.api#documentation": "

              The name of the resource type.

              " + } + }, + "ResourceDescription": { + "target": "com.amazonaws.cloudcontrol#ResourceDescription" + } + } + }, + "com.amazonaws.cloudcontrol#GetResourceRequestStatus": { + "type": "operation", + "input": { + "target": "com.amazonaws.cloudcontrol#GetResourceRequestStatusInput" + }, + "output": { + "target": "com.amazonaws.cloudcontrol#GetResourceRequestStatusOutput" + }, + "errors": [ + { + "target": "com.amazonaws.cloudcontrol#RequestTokenNotFoundException" + } + ], + "traits": { + "smithy.api#documentation": "

              Returns the current status of a resource operation request. For more information, see\n Tracking the progress of resource operation requests in the\n Amazon Web Services Cloud Control API User Guide.

              ", + "smithy.waiters#waitable": { + "ResourceRequestSuccess": { + "documentation": "Wait until resource operation request is successful", + "acceptors": [ + { + "state": "success", + "matcher": { + "output": { + "path": "ProgressEvent.OperationStatus", + "expected": "SUCCESS", + "comparator": "stringEquals" + } + } + }, + { + "state": "failure", + "matcher": { + "output": { + "path": "ProgressEvent.OperationStatus", + "expected": "FAILED", + "comparator": "stringEquals" + } + } + }, + { + "state": "failure", + "matcher": { + "output": { + "path": "ProgressEvent.OperationStatus", + "expected": "CANCEL_COMPLETE", + "comparator": "stringEquals" + } + } + } + ], + "minDelay": 5 + } + } + } + }, + "com.amazonaws.cloudcontrol#GetResourceRequestStatusInput": { + "type": "structure", + "members": { + "RequestToken": { + "target": "com.amazonaws.cloudcontrol#RequestToken", + "traits": { + "smithy.api#documentation": "

              A unique token used to track the progress of the resource operation request.

              \n

              Request tokens are included in the ProgressEvent type returned by a resource\n operation request.

              ", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.cloudcontrol#GetResourceRequestStatusOutput": { + "type": "structure", + "members": { + "ProgressEvent": { + "target": "com.amazonaws.cloudcontrol#ProgressEvent", + "traits": { + "smithy.api#documentation": "

              Represents the current status of the resource operation request.

              " + } + } + } + }, + "com.amazonaws.cloudcontrol#HandlerErrorCode": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "NotUpdatable", + "name": "NOT_UPDATABLE" + }, + { + "value": "InvalidRequest", + "name": "INVALID_REQUEST" + }, + { + "value": "AccessDenied", + "name": "ACCESS_DENIED" + }, + { + "value": "InvalidCredentials", + "name": "INVALID_CREDENTIALS" + }, + { + "value": "AlreadyExists", + "name": "ALREADY_EXISTS" + }, + { + "value": "NotFound", + "name": "NOT_FOUND" + }, + { + "value": "ResourceConflict", + "name": "RESOURCE_CONFLICT" + }, + { + "value": "Throttling", + "name": "THROTTLING" + }, + { + "value": "ServiceLimitExceeded", + "name": "SERVICE_LIMIT_EXCEEDED" + }, + { + "value": "NotStabilized", + "name": "NOT_STABILIZED" + }, + { + "value": "GeneralServiceException", + "name": "GENERAL_SERVICE_EXCEPTION" + }, + { + "value": "ServiceInternalError", + "name": "SERVICE_INTERNAL_ERROR" + }, + { + "value": "ServiceTimeout", + "name": "SERVICE_TIMEOUT" + }, + { + "value": "NetworkFailure", + "name": "NETWORK_FAILURE" + }, + { + "value": "InternalFailure", + "name": "INTERNAL_FAILURE" + } + ] + } + }, + "com.amazonaws.cloudcontrol#HandlerFailureException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.cloudcontrol#ErrorMessage" + } + }, + "traits": { + "aws.protocols#awsQueryError": { + "code": "HandlerFailureException", + "httpResponseCode": 502 + }, + "smithy.api#documentation": "

              The resource handler has failed without a returning a more specific error code. This can\n include timeouts.

              ", + "smithy.api#error": "server", + "smithy.api#httpError": 502 + } + }, + "com.amazonaws.cloudcontrol#HandlerInternalFailureException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.cloudcontrol#ErrorMessage" + } + }, + "traits": { + "aws.protocols#awsQueryError": { + "code": "HandlerInternalFailureException", + "httpResponseCode": 502 + }, + "smithy.api#documentation": "

              The resource handler has returned that an unexpected error occurred within the resource\n handler.

              ", + "smithy.api#error": "server", + "smithy.api#httpError": 502 + } + }, + "com.amazonaws.cloudcontrol#HandlerNextToken": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 2048 + }, + "smithy.api#pattern": "^.+$" + } + }, + "com.amazonaws.cloudcontrol#Identifier": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1024 + }, + "smithy.api#pattern": "^.+$" + } + }, + "com.amazonaws.cloudcontrol#InvalidCredentialsException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.cloudcontrol#ErrorMessage" + } + }, + "traits": { + "aws.protocols#awsQueryError": { + "code": "InvalidCredentialsException", + "httpResponseCode": 401 + }, + "smithy.api#documentation": "

              The resource handler has returned that the credentials provided by the user are\n invalid.

              ", + "smithy.api#error": "client", + "smithy.api#httpError": 401 + } + }, + "com.amazonaws.cloudcontrol#InvalidRequestException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.cloudcontrol#ErrorMessage" + } + }, + "traits": { + "aws.protocols#awsQueryError": { + "code": "InvalidRequestException", + "httpResponseCode": 400 + }, + "smithy.api#documentation": "

              The resource handler has returned that invalid input from the user has generated a generic\n exception.

              ", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.cloudcontrol#ListResourceRequests": { + "type": "operation", + "input": { + "target": "com.amazonaws.cloudcontrol#ListResourceRequestsInput" + }, + "output": { + "target": "com.amazonaws.cloudcontrol#ListResourceRequestsOutput" + }, + "traits": { + "smithy.api#documentation": "

              Returns existing resource operation requests. This includes requests of all status types.\n For more information, see Listing active resource operation requests in the\n Amazon Web Services Cloud Control API User Guide.

              \n \n

              Resource operation requests expire after seven days.

              \n
              ", + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.cloudcontrol#ListResourceRequestsInput": { + "type": "structure", + "members": { + "MaxResults": { + "target": "com.amazonaws.cloudcontrol#MaxResults", + "traits": { + "smithy.api#documentation": "

              The maximum number of results to be returned with a single call. If the number of\n available results exceeds this maximum, the response includes a NextToken value\n that you can assign to the NextToken request parameter to get the next set of\n results.

              \n

              The default is 20.

              " + } + }, + "NextToken": { + "target": "com.amazonaws.cloudcontrol#NextToken", + "traits": { + "smithy.api#documentation": "

              If the previous paginated request didn't return all of the remaining results, the response object's NextToken parameter value is set to a token. To retrieve the next set of results, call this action again and assign that token to the request object's NextToken parameter. If there are no remaining results, the previous response object's NextToken parameter is set to null.

              " + } + }, + "ResourceRequestStatusFilter": { + "target": "com.amazonaws.cloudcontrol#ResourceRequestStatusFilter", + "traits": { + "smithy.api#documentation": "

              The filter criteria to apply to the requests returned.

              " + } + } + } + }, + "com.amazonaws.cloudcontrol#ListResourceRequestsOutput": { + "type": "structure", + "members": { + "ResourceRequestStatusSummaries": { + "target": "com.amazonaws.cloudcontrol#ResourceRequestStatusSummaries", + "traits": { + "smithy.api#documentation": "

              The requests that match the specified filter criteria.

              " + } + }, + "NextToken": { + "target": "com.amazonaws.cloudcontrol#NextToken", + "traits": { + "smithy.api#documentation": "

              If the request doesn't return all of the remaining results, NextToken is set to a token. To retrieve the next set of results, call ListResources again and assign that token to the request object's NextToken parameter. If the request returns all results, NextToken is set to null.

              " + } + } + } + }, + "com.amazonaws.cloudcontrol#ListResources": { + "type": "operation", + "input": { + "target": "com.amazonaws.cloudcontrol#ListResourcesInput" + }, + "output": { + "target": "com.amazonaws.cloudcontrol#ListResourcesOutput" + }, + "errors": [ + { + "target": "com.amazonaws.cloudcontrol#AlreadyExistsException" + }, + { + "target": "com.amazonaws.cloudcontrol#GeneralServiceException" + }, + { + "target": "com.amazonaws.cloudcontrol#HandlerFailureException" + }, + { + "target": "com.amazonaws.cloudcontrol#HandlerInternalFailureException" + }, + { + "target": "com.amazonaws.cloudcontrol#InvalidCredentialsException" + }, + { + "target": "com.amazonaws.cloudcontrol#InvalidRequestException" + }, + { + "target": "com.amazonaws.cloudcontrol#NetworkFailureException" + }, + { + "target": "com.amazonaws.cloudcontrol#NotStabilizedException" + }, + { + "target": "com.amazonaws.cloudcontrol#NotUpdatableException" + }, + { + "target": "com.amazonaws.cloudcontrol#PrivateTypeException" + }, + { + "target": "com.amazonaws.cloudcontrol#ResourceConflictException" + }, + { + "target": "com.amazonaws.cloudcontrol#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.cloudcontrol#ServiceInternalErrorException" + }, + { + "target": "com.amazonaws.cloudcontrol#ServiceLimitExceededException" + }, + { + "target": "com.amazonaws.cloudcontrol#ThrottlingException" + }, + { + "target": "com.amazonaws.cloudcontrol#TypeNotFoundException" + }, + { + "target": "com.amazonaws.cloudcontrol#UnsupportedActionException" + } + ], + "traits": { + "smithy.api#documentation": "

              Returns information about the specified resources. For more information, see Discovering\n resources in the Amazon Web Services Cloud Control API User Guide.

              \n

              You can use this action to return information about existing resources in your account and\n Amazon Web Services Region, whether or not those resources were provisioned using Cloud Control API.

              ", + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.cloudcontrol#ListResourcesInput": { + "type": "structure", + "members": { + "TypeName": { + "target": "com.amazonaws.cloudcontrol#TypeName", + "traits": { + "smithy.api#documentation": "

              The name of the resource type.

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

              For private resource types, the type version to use in this resource operation. If you do not specify a resource version, CloudFormation uses the default version.

              " + } + }, + "RoleArn": { + "target": "com.amazonaws.cloudcontrol#RoleArn", + "traits": { + "smithy.api#documentation": "

              The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) for Cloud Control API to use when performing this resource operation. The role specified must have the permissions required for this operation. The necessary permissions for each event handler are defined in the \n handlers\n section of the resource type definition schema.

              \n

              If you do not specify a role, Cloud Control API uses a temporary session created using your Amazon Web Services user credentials.

              \n

              For more information, see Specifying credentials in the Amazon Web Services Cloud Control API User Guide.

              " + } + }, + "NextToken": { + "target": "com.amazonaws.cloudcontrol#HandlerNextToken", + "traits": { + "smithy.api#documentation": "

              If the previous paginated request didn't return all of the remaining results, the response object's NextToken parameter value is set to a token. To retrieve the next set of results, call this action again and assign that token to the request object's NextToken parameter. If there are no remaining results, the previous response object's NextToken parameter is set to null.

              " + } + }, + "MaxResults": { + "target": "com.amazonaws.cloudcontrol#MaxResults", + "traits": { + "smithy.api#documentation": "

              The maximum number of results to be returned with a single call. If the number of\n available results exceeds this maximum, the response includes a NextToken value\n that you can assign to the NextToken request parameter to get the next set of\n results.

              \n

              The default is 20.

              " + } + }, + "ResourceModel": { + "target": "com.amazonaws.cloudcontrol#Properties", + "traits": { + "smithy.api#documentation": "

              The resource model to use to select the resources to return.

              " + } + } + } + }, + "com.amazonaws.cloudcontrol#ListResourcesOutput": { + "type": "structure", + "members": { + "TypeName": { + "target": "com.amazonaws.cloudcontrol#TypeName", + "traits": { + "smithy.api#documentation": "

              The name of the resource type.

              " + } + }, + "ResourceDescriptions": { + "target": "com.amazonaws.cloudcontrol#ResourceDescriptions", + "traits": { + "smithy.api#documentation": "

              Information about the specified resources, including primary identifier and resource\n model.

              " + } + }, + "NextToken": { + "target": "com.amazonaws.cloudcontrol#HandlerNextToken", + "traits": { + "smithy.api#documentation": "

              If the request doesn't return all of the remaining results, NextToken is set to a token. To retrieve the next set of results, call ListResources again and assign that token to the request object's NextToken parameter. If the request returns all results, NextToken is set to null.

              " + } + } + } + }, + "com.amazonaws.cloudcontrol#MaxResults": { + "type": "integer", + "traits": { + "smithy.api#box": {}, + "smithy.api#range": { + "min": 1, + "max": 100 + } + } + }, + "com.amazonaws.cloudcontrol#NetworkFailureException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.cloudcontrol#ErrorMessage" + } + }, + "traits": { + "aws.protocols#awsQueryError": { + "code": "NetworkFailureException", + "httpResponseCode": 502 + }, + "smithy.api#documentation": "

              The resource handler has returned that the request could not be completed due to\n networking issues, such as a failure to receive a response from the server.

              ", + "smithy.api#error": "server", + "smithy.api#httpError": 502 + } + }, + "com.amazonaws.cloudcontrol#NextToken": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 2048 + }, + "smithy.api#pattern": "^[-A-Za-z0-9+/=]+$" + } + }, + "com.amazonaws.cloudcontrol#NotStabilizedException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.cloudcontrol#ErrorMessage" + } + }, + "traits": { + "aws.protocols#awsQueryError": { + "code": "NotStabilizedException", + "httpResponseCode": 400 + }, + "smithy.api#documentation": "

              The resource handler has returned that the downstream resource failed to complete all of\n its ready-state checks.

              ", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.cloudcontrol#NotUpdatableException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.cloudcontrol#ErrorMessage" + } + }, + "traits": { + "aws.protocols#awsQueryError": { + "code": "NotUpdatableException", + "httpResponseCode": 400 + }, + "smithy.api#documentation": "

              One or more properties included in this resource operation are defined as create-only, and\n therefore cannot be updated.

              ", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.cloudcontrol#Operation": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "CREATE", + "name": "CREATE" + }, + { + "value": "DELETE", + "name": "DELETE" + }, + { + "value": "UPDATE", + "name": "UPDATE" + } + ] + } + }, + "com.amazonaws.cloudcontrol#OperationStatus": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "PENDING", + "name": "PENDING" + }, + { + "value": "IN_PROGRESS", + "name": "IN_PROGRESS" + }, + { + "value": "SUCCESS", + "name": "SUCCESS" + }, + { + "value": "FAILED", + "name": "FAILED" + }, + { + "value": "CANCEL_IN_PROGRESS", + "name": "CANCEL_IN_PROGRESS" + }, + { + "value": "CANCEL_COMPLETE", + "name": "CANCEL_COMPLETE" + } + ] + } + }, + "com.amazonaws.cloudcontrol#OperationStatuses": { + "type": "list", + "member": { + "target": "com.amazonaws.cloudcontrol#OperationStatus" + } + }, + "com.amazonaws.cloudcontrol#Operations": { + "type": "list", + "member": { + "target": "com.amazonaws.cloudcontrol#Operation" + } + }, + "com.amazonaws.cloudcontrol#PatchDocument": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 65536 + }, + "smithy.api#pattern": "^(.|\\s)*$", + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.cloudcontrol#PrivateTypeException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.cloudcontrol#ErrorMessage" + } + }, + "traits": { + "aws.protocols#awsQueryError": { + "code": "PrivateTypeException", + "httpResponseCode": 400 + }, + "smithy.api#documentation": "

              Cloud Control API has not received a valid response from the resource handler, due to a\n configuration error. This includes issues such as the resource handler returning an invalid\n response, or timing out.

              ", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.cloudcontrol#ProgressEvent": { + "type": "structure", + "members": { + "TypeName": { + "target": "com.amazonaws.cloudcontrol#TypeName", + "traits": { + "smithy.api#documentation": "

              The name of the resource type used in the operation.

              " + } + }, + "Identifier": { + "target": "com.amazonaws.cloudcontrol#Identifier", + "traits": { + "smithy.api#documentation": "

              The primary identifier for the resource.

              \n \n

              In some cases, the resource identifier may be available before the resource operation\n has reached a status of SUCCESS.

              \n
              " + } + }, + "RequestToken": { + "target": "com.amazonaws.cloudcontrol#RequestToken", + "traits": { + "smithy.api#documentation": "

              The unique token representing this resource operation request.

              \n

              Use the RequestToken with GetResourceRequestStatus to return the current status of a resource operation\n request.

              " + } + }, + "Operation": { + "target": "com.amazonaws.cloudcontrol#Operation", + "traits": { + "smithy.api#documentation": "

              The resource operation type.

              " + } + }, + "OperationStatus": { + "target": "com.amazonaws.cloudcontrol#OperationStatus", + "traits": { + "smithy.api#documentation": "

              The current status of the resource operation request.

              \n
                \n
              • \n

                \n PENDING: The resource operation has not yet started.

                \n
              • \n
              • \n

                \n IN_PROGRESS: The resource operation is currently in progress.

                \n
              • \n
              • \n

                \n SUCCESS: The resource operation has successfully completed.

                \n
              • \n
              • \n

                \n FAILED: The resource operation has failed. Refer to the error code and\n status message for more information.

                \n
              • \n
              • \n

                \n CANCEL_IN_PROGRESS: The resource operation is in the process of being\n canceled.

                \n
              • \n
              • \n

                \n CANCEL_COMPLETE: The resource operation has been canceled.

                \n
              • \n
              " + } + }, + "EventTime": { + "target": "com.amazonaws.cloudcontrol#Timestamp", + "traits": { + "smithy.api#documentation": "

              When the resource operation request was initiated.

              " + } + }, + "ResourceModel": { + "target": "com.amazonaws.cloudcontrol#Properties", + "traits": { + "smithy.api#documentation": "

              A JSON string containing the resource model, consisting of each resource property and its\n current value.

              " + } + }, + "StatusMessage": { + "target": "com.amazonaws.cloudcontrol#StatusMessage", + "traits": { + "smithy.api#documentation": "

              Any message explaining the current status.

              " + } + }, + "ErrorCode": { + "target": "com.amazonaws.cloudcontrol#HandlerErrorCode", + "traits": { + "smithy.api#documentation": "

              For requests with a status of FAILED, the associated error code.

              \n

              For error code definitions, see Handler error codes in the CloudFormation Command\n Line Interface User Guide for Extension Development.

              " + } + }, + "RetryAfter": { + "target": "com.amazonaws.cloudcontrol#Timestamp", + "traits": { + "smithy.api#documentation": "

              When to next request the status of this resource operation request.

              " + } + } + }, + "traits": { + "smithy.api#documentation": "

              Represents the current status of a resource operation request. For more information, see\n Managing resource operation requests in the\n Amazon Web Services Cloud Control API User Guide.

              " + } + }, + "com.amazonaws.cloudcontrol#Properties": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 16384 + }, + "smithy.api#pattern": "^(.|\\s)*$", + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.cloudcontrol#RequestToken": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 128 + }, + "smithy.api#pattern": "^[-A-Za-z0-9+/=]+$" + } + }, + "com.amazonaws.cloudcontrol#RequestTokenNotFoundException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.cloudcontrol#ErrorMessage" + } + }, + "traits": { + "aws.protocols#awsQueryError": { + "code": "RequestTokenNotFoundException", + "httpResponseCode": 404 + }, + "smithy.api#documentation": "

              A resource operation with the specified request token cannot be found.

              ", + "smithy.api#error": "client", + "smithy.api#httpError": 404 + } + }, + "com.amazonaws.cloudcontrol#ResourceConflictException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.cloudcontrol#ErrorMessage" + } + }, + "traits": { + "aws.protocols#awsQueryError": { + "code": "ResourceConflictException", + "httpResponseCode": 409 + }, + "smithy.api#documentation": "

              The resource is temporarily unavailable to be acted upon. For example, if the resource is\n currently undergoing an operation and cannot be acted upon until that operation is\n finished.

              ", + "smithy.api#error": "client", + "smithy.api#httpError": 409 + } + }, + "com.amazonaws.cloudcontrol#ResourceDescription": { + "type": "structure", + "members": { + "Identifier": { + "target": "com.amazonaws.cloudcontrol#Identifier", + "traits": { + "smithy.api#documentation": "

              The primary identifier for the resource.

              \n

              For more information, see Identifying\n resources in the Amazon Web Services Cloud Control API User Guide.

              " + } + }, + "Properties": { + "target": "com.amazonaws.cloudcontrol#Properties", + "traits": { + "smithy.api#documentation": "

              A list of the resource properties and their current values.

              " + } + } + }, + "traits": { + "smithy.api#documentation": "

              Represents information about a provisioned resource.

              " + } + }, + "com.amazonaws.cloudcontrol#ResourceDescriptions": { + "type": "list", + "member": { + "target": "com.amazonaws.cloudcontrol#ResourceDescription" + } + }, + "com.amazonaws.cloudcontrol#ResourceNotFoundException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.cloudcontrol#ErrorMessage" + } + }, + "traits": { + "aws.protocols#awsQueryError": { + "code": "ResourceNotFoundException", + "httpResponseCode": 404 + }, + "smithy.api#documentation": "

              A resource with the specified identifier cannot be found.

              ", + "smithy.api#error": "client", + "smithy.api#httpError": 404 + } + }, + "com.amazonaws.cloudcontrol#ResourceRequestStatusFilter": { + "type": "structure", + "members": { + "Operations": { + "target": "com.amazonaws.cloudcontrol#Operations", + "traits": { + "smithy.api#documentation": "

              The operation types to include in the filter.

              " + } + }, + "OperationStatuses": { + "target": "com.amazonaws.cloudcontrol#OperationStatuses", + "traits": { + "smithy.api#documentation": "

              The operation statuses to include in the filter.

              \n
                \n
              • \n

                \n PENDING: The operation has been requested, but not yet initiated.

                \n
              • \n
              • \n

                \n IN_PROGRESS: The operation is currently in progress.

                \n
              • \n
              • \n

                \n SUCCESS: The operation has successfully completed.

                \n
              • \n
              • \n

                \n FAILED: The operation has failed.

                \n
              • \n
              • \n

                \n CANCEL_IN_PROGRESS: The operation is currently in the process of being\n canceled.

                \n
              • \n
              • \n

                \n CANCEL_COMPLETE: The operation has been canceled.

                \n
              • \n
              " + } + } + }, + "traits": { + "smithy.api#documentation": "

              The filter criteria to use in determining the requests returned.

              " + } + }, + "com.amazonaws.cloudcontrol#ResourceRequestStatusSummaries": { + "type": "list", + "member": { + "target": "com.amazonaws.cloudcontrol#ProgressEvent" + } + }, + "com.amazonaws.cloudcontrol#RoleArn": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 20, + "max": 2048 + }, + "smithy.api#pattern": "^arn:.+:iam::[0-9]{12}:role/.+$" + } + }, + "com.amazonaws.cloudcontrol#ServiceInternalErrorException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.cloudcontrol#ErrorMessage" + } + }, + "traits": { + "aws.protocols#awsQueryError": { + "code": "ServiceInternalErrorException", + "httpResponseCode": 502 + }, + "smithy.api#documentation": "

              The resource handler has returned that the downstream service returned an internal error,\n typically with a 5XX HTTP status code.

              ", + "smithy.api#error": "server", + "smithy.api#httpError": 502 + } + }, + "com.amazonaws.cloudcontrol#ServiceLimitExceededException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.cloudcontrol#ErrorMessage" + } + }, + "traits": { + "aws.protocols#awsQueryError": { + "code": "ServiceLimitExceededException", + "httpResponseCode": 400 + }, + "smithy.api#documentation": "

              The resource handler has returned that a non-transient resource limit was reached on the\n service side.

              ", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.cloudcontrol#StatusMessage": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 1024 + }, + "smithy.api#pattern": "^(.|\\s)*$" + } + }, + "com.amazonaws.cloudcontrol#ThrottlingException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.cloudcontrol#ErrorMessage" + } + }, + "traits": { + "aws.protocols#awsQueryError": { + "code": "ThrottlingException", + "httpResponseCode": 429 + }, + "smithy.api#documentation": "

              The request was denied due to request throttling.

              ", + "smithy.api#error": "client", + "smithy.api#httpError": 429 + } + }, + "com.amazonaws.cloudcontrol#Timestamp": { + "type": "timestamp" + }, + "com.amazonaws.cloudcontrol#TypeName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 10, + "max": 196 + }, + "smithy.api#pattern": "^[A-Za-z0-9]{2,64}::[A-Za-z0-9]{2,64}::[A-Za-z0-9]{2,64}$" + } + }, + "com.amazonaws.cloudcontrol#TypeNotFoundException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.cloudcontrol#ErrorMessage" + } + }, + "traits": { + "aws.protocols#awsQueryError": { + "code": "TypeNotFoundException", + "httpResponseCode": 404 + }, + "smithy.api#documentation": "

              The specified extension does not exist in the CloudFormation registry.

              ", + "smithy.api#error": "client", + "smithy.api#httpError": 404 + } + }, + "com.amazonaws.cloudcontrol#TypeVersionId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 128 + }, + "smithy.api#pattern": "^[A-Za-z0-9-]+$" + } + }, + "com.amazonaws.cloudcontrol#UnsupportedActionException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.cloudcontrol#ErrorMessage" + } + }, + "traits": { + "aws.protocols#awsQueryError": { + "code": "UnsupportedActionException", + "httpResponseCode": 405 + }, + "smithy.api#documentation": "

              The specified resource does not support this resource operation.

              ", + "smithy.api#error": "client", + "smithy.api#httpError": 405 + } + }, + "com.amazonaws.cloudcontrol#UpdateResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.cloudcontrol#UpdateResourceInput" + }, + "output": { + "target": "com.amazonaws.cloudcontrol#UpdateResourceOutput" + }, + "errors": [ + { + "target": "com.amazonaws.cloudcontrol#AlreadyExistsException" + }, + { + "target": "com.amazonaws.cloudcontrol#ClientTokenConflictException" + }, + { + "target": "com.amazonaws.cloudcontrol#ConcurrentOperationException" + }, + { + "target": "com.amazonaws.cloudcontrol#GeneralServiceException" + }, + { + "target": "com.amazonaws.cloudcontrol#HandlerFailureException" + }, + { + "target": "com.amazonaws.cloudcontrol#HandlerInternalFailureException" + }, + { + "target": "com.amazonaws.cloudcontrol#InvalidCredentialsException" + }, + { + "target": "com.amazonaws.cloudcontrol#InvalidRequestException" + }, + { + "target": "com.amazonaws.cloudcontrol#NetworkFailureException" + }, + { + "target": "com.amazonaws.cloudcontrol#NotStabilizedException" + }, + { + "target": "com.amazonaws.cloudcontrol#NotUpdatableException" + }, + { + "target": "com.amazonaws.cloudcontrol#PrivateTypeException" + }, + { + "target": "com.amazonaws.cloudcontrol#ResourceConflictException" + }, + { + "target": "com.amazonaws.cloudcontrol#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.cloudcontrol#ServiceInternalErrorException" + }, + { + "target": "com.amazonaws.cloudcontrol#ServiceLimitExceededException" + }, + { + "target": "com.amazonaws.cloudcontrol#ThrottlingException" + }, + { + "target": "com.amazonaws.cloudcontrol#TypeNotFoundException" + }, + { + "target": "com.amazonaws.cloudcontrol#UnsupportedActionException" + } + ], + "traits": { + "smithy.api#documentation": "

              Updates the specified property values in the resource.

              \n

              You specify your resource property updates as a list of patch operations contained in a\n JSON patch document that adheres to the \n RFC 6902 - JavaScript Object\n Notation (JSON) Patch\n standard.

              \n

              For details on how Cloud Control API performs resource update operations, see Updating a resource in the Amazon Web Services Cloud Control API User Guide.

              \n

              After you have initiated a resource update request, you can monitor the progress of your\n request by calling GetResourceRequestStatus using the RequestToken of the\n ProgressEvent returned by UpdateResource.

              \n

              For more information about the properties of a specific resource, refer to the related\n topic for the resource in the Resource and property types reference in the Amazon Web Services\n CloudFormation Users Guide.

              " + } + }, + "com.amazonaws.cloudcontrol#UpdateResourceInput": { + "type": "structure", + "members": { + "TypeName": { + "target": "com.amazonaws.cloudcontrol#TypeName", + "traits": { + "smithy.api#documentation": "

              The name of the resource type.

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

              For private resource types, the type version to use in this resource operation. If you do not specify a resource version, CloudFormation uses the default version.

              " + } + }, + "RoleArn": { + "target": "com.amazonaws.cloudcontrol#RoleArn", + "traits": { + "smithy.api#documentation": "

              The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) for Cloud Control API to use when performing this resource operation. The role specified must have the permissions required for this operation. The necessary permissions for each event handler are defined in the \n handlers\n section of the resource type definition schema.

              \n

              If you do not specify a role, Cloud Control API uses a temporary session created using your Amazon Web Services user credentials.

              \n

              For more information, see Specifying credentials in the Amazon Web Services Cloud Control API User Guide.

              " + } + }, + "ClientToken": { + "target": "com.amazonaws.cloudcontrol#ClientToken", + "traits": { + "smithy.api#documentation": "

              A unique identifier to ensure the idempotency of the resource request. As a best practice, specify this token to ensure idempotency, so that Amazon Web Services Cloud Control API can accurately distinguish between request retries and new resource requests. You might retry a resource request to ensure that it was successfully received.

              \n

              A client token is valid for 36 hours once used. After that, a resource request with the same client token is treated as a new request.

              \n

              If you do not specify a client token, one is generated for inclusion in the request.

              \n

              For more information, see Ensuring resource operation requests are unique in the Amazon Web Services Cloud Control API User Guide.

              ", + "smithy.api#idempotencyToken": {} + } + }, + "Identifier": { + "target": "com.amazonaws.cloudcontrol#Identifier", + "traits": { + "smithy.api#documentation": "

              The identifier for the resource.

              \n

              You can specify the primary identifier, or any secondary identifier defined for the resource type in its resource schema. You can only specify one identifier. Primary identifiers can be specified as a string or JSON; secondary identifiers must be specified as JSON.

              \n

              For compound primary identifiers (that is, one that consists of multiple resource properties strung together), to specify the primary identifier as a string, list the property values in the order they are specified in the primary identifier definition, separated by |.

              \n

              For more information, see Identifying resources in the Amazon Web Services Cloud Control API User Guide.

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

              A JavaScript Object Notation (JSON) document listing the patch operations that represent\n the updates to apply to the current resource properties. For details, see Composing the patch document in the Amazon Web Services Cloud Control API User\n Guide.

              ", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.cloudcontrol#UpdateResourceOutput": { + "type": "structure", + "members": { + "ProgressEvent": { + "target": "com.amazonaws.cloudcontrol#ProgressEvent", + "traits": { + "smithy.api#documentation": "

              Represents the current status of the resource update request.

              \n

              Use the RequestToken of the ProgressEvent with GetResourceRequestStatus to return the current status of a resource operation\n request.

              " + } + } + } + } + } +} diff --git a/codegen/sdk-codegen/aws-models/connect.2017-08-08.json b/codegen/sdk-codegen/aws-models/connect.2017-08-08.json index 850ec29394e91..b32473429114e 100644 --- a/codegen/sdk-codegen/aws-models/connect.2017-08-08.json +++ b/codegen/sdk-codegen/aws-models/connect.2017-08-08.json @@ -595,6 +595,26 @@ "smithy.api#title": "Amazon Connect Service" } }, + "com.amazonaws.connect#AnswerMachineDetectionConfig": { + "type": "structure", + "members": { + "EnableAnswerMachineDetection": { + "target": "com.amazonaws.connect#Boolean", + "traits": { + "smithy.api#documentation": "

              The flag to indicate if answer machine detection analysis needs to be performed for a voice\n call. If set to true, TrafficType must be set as CAMPAIGN.\n

              " + } + }, + "AwaitAnswerMachinePrompt": { + "target": "com.amazonaws.connect#Boolean", + "traits": { + "smithy.api#documentation": "

              Wait for the answering machine prompt.

              " + } + } + }, + "traits": { + "smithy.api#documentation": "

              Configuration of the answering machine detection.

              " + } + }, "com.amazonaws.connect#AssociateApprovedOrigin": { "type": "operation", "input": { @@ -1178,6 +1198,15 @@ } } }, + "com.amazonaws.connect#CampaignId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 100 + } + } + }, "com.amazonaws.connect#Channel": { "type": "string", "traits": { @@ -1937,7 +1966,7 @@ } ], "traits": { - "smithy.api#documentation": "

              Create an AppIntegration association with an Amazon Connect instance.

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

              Creates an AWS resource association with an Amazon Connect instance.

              ", "smithy.api#http": { "method": "PUT", "uri": "/instance/{InstanceId}/integration-associations", @@ -1973,22 +2002,19 @@ "SourceApplicationUrl": { "target": "com.amazonaws.connect#URI", "traits": { - "smithy.api#documentation": "

              The URL for the external application.

              ", - "smithy.api#required": {} + "smithy.api#documentation": "

              The URL for the external application. This field is only required for the EVENT integration type.

              " } }, "SourceApplicationName": { "target": "com.amazonaws.connect#SourceApplicationName", "traits": { - "smithy.api#documentation": "

              The name of the external application.

              ", - "smithy.api#required": {} + "smithy.api#documentation": "

              The name of the external application. This field is only required for the EVENT integration type.

              " } }, "SourceType": { "target": "com.amazonaws.connect#SourceType", "traits": { - "smithy.api#documentation": "

              The type of the data source.

              ", - "smithy.api#required": {} + "smithy.api#documentation": "

              The type of the data source. This field is only required for the EVENT integration type.

              " } }, "Tags": { @@ -2005,7 +2031,7 @@ "IntegrationAssociationId": { "target": "com.amazonaws.connect#IntegrationAssociationId", "traits": { - "smithy.api#documentation": "

              The identifier for the association.

              " + "smithy.api#documentation": "

              The identifier for the integration association.

              " } }, "IntegrationAssociationArn": { @@ -2363,7 +2389,7 @@ } ], "traits": { - "smithy.api#documentation": "

              Creates a use case for an AppIntegration association.

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

              Creates a use case for an integration association.

              ", "smithy.api#http": { "method": "PUT", "uri": "/instance/{InstanceId}/integration-associations/{IntegrationAssociationId}/use-cases", @@ -2385,7 +2411,7 @@ "IntegrationAssociationId": { "target": "com.amazonaws.connect#IntegrationAssociationId", "traits": { - "smithy.api#documentation": "

              The identifier for the AppIntegration association.

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

              The identifier for the integration association.

              ", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -2393,7 +2419,7 @@ "UseCaseType": { "target": "com.amazonaws.connect#UseCaseType", "traits": { - "smithy.api#documentation": "

              The type of use case to associate to the AppIntegration association. Each AppIntegration\n association can have only one of each use case type.

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

              The type of use case to associate to the integration association. Each integration\n association can have only one of each use case type.

              ", "smithy.api#required": {} } }, @@ -2923,7 +2949,7 @@ } ], "traits": { - "smithy.api#documentation": "

              Deletes an AppIntegration association from an Amazon Connect instance. The association must not have\n any use cases associated with it.

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

              Deletes an AWS resource association from an Amazon Connect instance. The association must not have\n any use cases associated with it.

              ", "smithy.api#http": { "method": "DELETE", "uri": "/instance/{InstanceId}/integration-associations/{IntegrationAssociationId}", @@ -2945,7 +2971,7 @@ "IntegrationAssociationId": { "target": "com.amazonaws.connect#IntegrationAssociationId", "traits": { - "smithy.api#documentation": "

              The identifier for the AppIntegration association.

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

              The identifier for the integration association.

              ", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -3024,7 +3050,7 @@ } ], "traits": { - "smithy.api#documentation": "

              Deletes a use case from an AppIntegration association.

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

              Deletes a use case from an integration association.

              ", "smithy.api#http": { "method": "DELETE", "uri": "/instance/{InstanceId}/integration-associations/{IntegrationAssociationId}/use-cases/{UseCaseId}", @@ -3046,7 +3072,7 @@ "IntegrationAssociationId": { "target": "com.amazonaws.connect#IntegrationAssociationId", "traits": { - "smithy.api#documentation": "

              The identifier for the AppIntegration association.

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

              The identifier for the integration association.

              ", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -4523,7 +4549,7 @@ "KeyId": { "target": "com.amazonaws.connect#KeyId", "traits": { - "smithy.api#documentation": "

              The identifier of the encryption key.

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

              The full ARN of the encryption key.

              \n \n

              Be sure to provide the full ARN of the encryption key, not just the ID.

              \n
              ", "smithy.api#required": {} } } @@ -4704,7 +4730,7 @@ "CurrentMetrics": { "target": "com.amazonaws.connect#CurrentMetrics", "traits": { - "smithy.api#documentation": "

              The metrics to retrieve. Specify the name and unit for each metric. The following metrics\n are available. For a description of all the metrics, see Real-time Metrics\n Definitions in the Amazon Connect Administrator Guide.

              \n
              \n
              AGENTS_AFTER_CONTACT_WORK
              \n
              \n

              Unit: COUNT

              \n

              Name in real-time metrics report: ACW\n

              \n\n
              \n
              AGENTS_AVAILABLE
              \n
              \n

              Unit: COUNT

              \n

              Name in real-time metrics report: Available\n

              \n
              \n
              AGENTS_ERROR
              \n
              \n

              Unit: COUNT

              \n

              Name in real-time metrics report: Error\n

              \n
              \n
              AGENTS_NON_PRODUCTIVE
              \n
              \n

              Unit: COUNT

              \n

              Name in real-time metrics report: NPT (Non-Productive Time)\n

              \n
              \n
              AGENTS_ON_CALL
              \n
              \n

              Unit: COUNT

              \n

              Name in real-time metrics report: On\n contact\n

              \n
              \n
              AGENTS_ON_CONTACT
              \n
              \n

              Unit: COUNT

              \n

              Name in real-time metrics report: On\n contact\n

              \n
              \n
              AGENTS_ONLINE
              \n
              \n

              Unit: COUNT

              \n

              Name in real-time metrics report: Online\n

              \n
              \n
              AGENTS_STAFFED
              \n
              \n

              Unit: COUNT

              \n

              Name in real-time metrics report: Staffed\n

              \n
              \n
              CONTACTS_IN_QUEUE
              \n
              \n

              Unit: COUNT

              \n

              Name in real-time metrics report: In\n queue\n

              \n
              \n
              CONTACTS_SCHEDULED
              \n
              \n

              Unit: COUNT

              \n

              Name in real-time metrics report: Scheduled\n

              \n
              \n
              OLDEST_CONTACT_AGE
              \n
              \n

              Unit: SECONDS

              \n

              When you use groupings, Unit says SECONDS but the Value is returned in MILLISECONDS. For\n example, if you get a response like this:

              \n

              \n { \"Metric\": { \"Name\": \"OLDEST_CONTACT_AGE\", \"Unit\": \"SECONDS\" }, \"Value\": 24113.0\n }

              \n

              The actual OLDEST_CONTACT_AGE is 24 seconds.

              \n\n

              Name in real-time metrics report: Oldest\n

              \n
              \n
              SLOTS_ACTIVE
              \n
              \n

              Unit: COUNT

              \n

              Name in real-time metrics report: Active\n

              \n
              \n
              SLOTS_AVAILABLE
              \n
              \n

              Unit: COUNT

              \n

              Name in real-time metrics report: Availability\n

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

              The metrics to retrieve. Specify the name and unit for each metric. The following metrics\n are available. For a description of all the metrics, see Real-time Metrics\n Definitions in the Amazon Connect Administrator Guide.

              \n
              \n
              AGENTS_AFTER_CONTACT_WORK
              \n
              \n

              Unit: COUNT

              \n

              Name in real-time metrics report: ACW\n

              \n\n
              \n
              AGENTS_AVAILABLE
              \n
              \n

              Unit: COUNT

              \n

              Name in real-time metrics report: Available\n

              \n
              \n
              AGENTS_ERROR
              \n
              \n

              Unit: COUNT

              \n

              Name in real-time metrics report: Error\n

              \n
              \n
              AGENTS_NON_PRODUCTIVE
              \n
              \n

              Unit: COUNT

              \n

              Name in real-time metrics report: NPT (Non-Productive Time)\n

              \n
              \n
              AGENTS_ON_CALL
              \n
              \n

              Unit: COUNT

              \n

              Name in real-time metrics report: On\n contact\n

              \n
              \n
              AGENTS_ON_CONTACT
              \n
              \n

              Unit: COUNT

              \n

              Name in real-time metrics report: On\n contact\n

              \n
              \n
              AGENTS_ONLINE
              \n
              \n

              Unit: COUNT

              \n

              Name in real-time metrics report: Online\n

              \n
              \n
              AGENTS_STAFFED
              \n
              \n

              Unit: COUNT

              \n

              Name in real-time metrics report: Staffed\n

              \n
              \n
              CONTACTS_IN_QUEUE
              \n
              \n

              Unit: COUNT

              \n

              Name in real-time metrics report: In\n queue\n

              \n
              \n
              CONTACTS_SCHEDULED
              \n
              \n

              Unit: COUNT

              \n

              Name in real-time metrics report: Scheduled\n

              \n
              \n
              OLDEST_CONTACT_AGE
              \n
              \n

              Unit: SECONDS

              \n

              When you use groupings, Unit says SECONDS and the Value is returned in SECONDS.

              \n

              When you do not use groupings, Unit says SECONDS but the Value is returned in MILLISECONDS. For\n example, if you get a response like this:

              \n

              \n { \"Metric\": { \"Name\": \"OLDEST_CONTACT_AGE\", \"Unit\": \"SECONDS\" }, \"Value\": 24113.0\n }

              \n

              The actual OLDEST_CONTACT_AGE is 24 seconds.

              \n\n

              Name in real-time metrics report: Oldest\n

              \n
              \n
              SLOTS_ACTIVE
              \n
              \n

              Unit: COUNT

              \n

              Name in real-time metrics report: Active\n

              \n
              \n
              SLOTS_AVAILABLE
              \n
              \n

              Unit: COUNT

              \n

              Name in real-time metrics report: Availability\n

              \n
              \n
              ", "smithy.api#required": {} } }, @@ -5989,6 +6015,22 @@ { "value": "EVENT", "name": "EVENT" + }, + { + "value": "VOICE_ID", + "name": "VOICE_ID" + }, + { + "value": "PINPOINT_APP", + "name": "PINPOINT_APP" + }, + { + "value": "WISDOM_ASSISTANT", + "name": "WISDOM_ASSISTANT" + }, + { + "value": "WISDOM_KNOWLEDGE_BASE", + "name": "WISDOM_KNOWLEDGE_BASE" } ] } @@ -6943,7 +6985,7 @@ } ], "traits": { - "smithy.api#documentation": "

              Provides summary information about the AppIntegration associations for the specified Amazon Connect\n instance.

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

              Provides summary information about the AWS resource associations for the specified Amazon Connect\n instance.

              ", "smithy.api#http": { "method": "GET", "uri": "/instance/{InstanceId}/integration-associations", @@ -6968,6 +7010,13 @@ "smithy.api#required": {} } }, + "IntegrationType": { + "target": "com.amazonaws.connect#IntegrationType", + "traits": { + "smithy.api#documentation": "

              ", + "smithy.api#httpQuery": "integrationType" + } + }, "NextToken": { "target": "com.amazonaws.connect#NextToken", "traits": { @@ -6991,7 +7040,7 @@ "IntegrationAssociationSummaryList": { "target": "com.amazonaws.connect#IntegrationAssociationSummaryList", "traits": { - "smithy.api#documentation": "

              The AppIntegration associations.

              " + "smithy.api#documentation": "

              The associations.

              " } }, "NextToken": { @@ -8060,7 +8109,7 @@ } ], "traits": { - "smithy.api#documentation": "

              Lists the use cases.

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

              Lists the use cases for the integration association.

              ", "smithy.api#http": { "method": "GET", "uri": "/instance/{InstanceId}/integration-associations/{IntegrationAssociationId}/use-cases", @@ -8110,7 +8159,7 @@ } }, "traits": { - "smithy.api#documentation": "

              Provides summary information about the use cases for the specified Amazon Connect AppIntegration\n association.

              " + "smithy.api#documentation": "

              Provides summary information about the use cases for the specified integration\n association.

              " } }, "com.amazonaws.connect#ListUseCasesResponse": { @@ -10902,7 +10951,7 @@ } ], "traits": { - "smithy.api#documentation": "

              Places an outbound call to a contact, and then initiates the contact flow. It performs the\n actions in the contact flow that's specified (in ContactFlowId).

              \n\n

              Agents do not initiate the outbound API, which means that they do not dial the contact. If\n the contact flow places an outbound call to a contact, and then puts the contact in queue, the\n call is then routed to the agent, like any other inbound case.

              \n\n

              There is a 60-second dialing timeout for this operation. If the call is not connected after\n 60 seconds, it fails.

              \n \n

              UK numbers with a 447 prefix are not allowed by default. Before you can dial these UK\n mobile numbers, you must submit a service quota increase request. For more information, see\n Amazon Connect Service Quotas in the Amazon Connect Administrator Guide.

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

              Places an outbound call to a contact, and then initiates the contact flow. It performs the\n actions in the contact flow that's specified (in ContactFlowId).

              \n \n

              Agents do not initiate the outbound API, which means that they do not dial the contact. If\n the contact flow places an outbound call to a contact, and then puts the contact in queue, the\n call is then routed to the agent, like any other inbound case.

              \n\n

              There is a 60-second dialing timeout for this operation. If the call is not connected after\n 60 seconds, it fails.

              \n \n

              UK numbers with a 447 prefix are not allowed by default. Before you can dial these UK\n mobile numbers, you must submit a service quota increase request. For more information, see\n Amazon Connect Service Quotas in the Amazon Connect Administrator Guide.

              \n
              \n \n

              Campaign calls are not allowed by default. Before you can make a call with \n TrafficType = CAMPAIGN, you must submit a service quota increase request. For more information, see \n Amazon Connect Service Quotas in the Amazon Connect Administrator Guide.

              \n
              ", "smithy.api#http": { "method": "PUT", "uri": "/contact/outbound-voice", @@ -10958,6 +11007,24 @@ "traits": { "smithy.api#documentation": "

              A custom key-value pair using an attribute map. The attributes are standard Amazon Connect\n attributes, and can be accessed in contact flows just like any other contact attributes.

              \n

              There can be up to 32,768 UTF-8 bytes across all key-value pairs per contact. Attribute keys\n can include only alphanumeric, dash, and underscore characters.

              " } + }, + "AnswerMachineDetectionConfig": { + "target": "com.amazonaws.connect#AnswerMachineDetectionConfig", + "traits": { + "smithy.api#documentation": "

              Configuration of the answering machine detection for this outbound call.

              " + } + }, + "CampaignId": { + "target": "com.amazonaws.connect#CampaignId", + "traits": { + "smithy.api#documentation": "

              The campaign identifier of the outbound communication.

              " + } + }, + "TrafficType": { + "target": "com.amazonaws.connect#TrafficType", + "traits": { + "smithy.api#documentation": "

              Denotes the class of traffic. Calls with different traffic types are handled differently by\n Amazon Connect. The default value is GENERAL. Use CAMPAIGN if\n EnableAnswerMachineDetection is set to true. For all other cases, use\n GENERAL.

              " + } } } }, @@ -11442,6 +11509,21 @@ "com.amazonaws.connect#Timestamp": { "type": "timestamp" }, + "com.amazonaws.connect#TrafficType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "GENERAL", + "name": "GENERAL" + }, + { + "value": "CAMPAIGN", + "name": "CAMPAIGN" + } + ] + } + }, "com.amazonaws.connect#URI": { "type": "string", "traits": { @@ -11943,7 +12025,7 @@ "AttributeType": { "target": "com.amazonaws.connect#InstanceAttributeType", "traits": { - "smithy.api#documentation": "

              The type of attribute.

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

              The type of attribute.

              \n \n

              Only allowlisted customers can consume USE_CUSTOM_TTS_VOICES. To access this feature, contact AWS Support for allowlisting.

              \n
              ", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -13130,7 +13212,7 @@ "UseCaseType": { "target": "com.amazonaws.connect#UseCaseType", "traits": { - "smithy.api#documentation": "

              The type of use case to associate to the AppIntegration association. Each AppIntegration\n association can have only one of each use case type.

              " + "smithy.api#documentation": "

              The type of use case to associate to the integration association. Each integration\n association can have only one of each use case type.

              " } } }, @@ -13160,6 +13242,10 @@ { "value": "RULES_EVALUATION", "name": "RULES_EVALUATION" + }, + { + "value": "CONNECT_CAMPAIGNS", + "name": "CONNECT_CAMPAIGNS" } ] } diff --git a/codegen/sdk-codegen/aws-models/dataexchange.2017-07-25.json b/codegen/sdk-codegen/aws-models/dataexchange.2017-07-25.json index 279880b4b200b..46b94a882c586 100644 --- a/codegen/sdk-codegen/aws-models/dataexchange.2017-07-25.json +++ b/codegen/sdk-codegen/aws-models/dataexchange.2017-07-25.json @@ -46,6 +46,14 @@ "smithy.api#httpError": 403 } }, + "com.amazonaws.dataexchange#Action": { + "type": "structure", + "members": { + "ExportRevisionToS3": { + "target": "com.amazonaws.dataexchange#AutoExportRevisionToS3RequestDetails" + } + } + }, "com.amazonaws.dataexchange#Arn": { "type": "string", "traits": { @@ -205,6 +213,44 @@ ] } }, + "com.amazonaws.dataexchange#AutoExportRevisionDestinationEntry": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.dataexchange#__string", + "traits": { + "smithy.api#documentation": "

              The S3 bucket that is the destination for the event action.

              ", + "smithy.api#required": {} + } + }, + "KeyPattern": { + "target": "com.amazonaws.dataexchange#__string", + "traits": { + "smithy.api#documentation": "

              A string representing the pattern for generated names of the individual assets in the revision. For more information about key patterns, see Key patterns when exporting revisions.

              " + } + } + }, + "traits": { + "smithy.api#documentation": "

              A revision destination is the Amazon S3 bucket folder destination to where the export will be sent.

              " + } + }, + "com.amazonaws.dataexchange#AutoExportRevisionToS3RequestDetails": { + "type": "structure", + "members": { + "Encryption": { + "target": "com.amazonaws.dataexchange#ExportServerSideEncryption" + }, + "RevisionDestination": { + "target": "com.amazonaws.dataexchange#AutoExportRevisionDestinationEntry", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

              Details of the operation to be performed by the job.

              " + } + }, "com.amazonaws.dataexchange#CancelJob": { "type": "operation", "input": { @@ -453,6 +499,103 @@ } } }, + "com.amazonaws.dataexchange#CreateEventAction": { + "type": "operation", + "input": { + "target": "com.amazonaws.dataexchange#CreateEventActionRequest" + }, + "output": { + "target": "com.amazonaws.dataexchange#CreateEventActionResponse" + }, + "errors": [ + { + "target": "com.amazonaws.dataexchange#AccessDeniedException" + }, + { + "target": "com.amazonaws.dataexchange#InternalServerException" + }, + { + "target": "com.amazonaws.dataexchange#ServiceLimitExceededException" + }, + { + "target": "com.amazonaws.dataexchange#ThrottlingException" + }, + { + "target": "com.amazonaws.dataexchange#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

              This operation creates an event action.

              ", + "smithy.api#http": { + "method": "POST", + "uri": "/v1/event-actions", + "code": 201 + } + } + }, + "com.amazonaws.dataexchange#CreateEventActionRequest": { + "type": "structure", + "members": { + "Action": { + "target": "com.amazonaws.dataexchange#Action", + "traits": { + "smithy.api#documentation": "

              What occurs after a certain event.

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

              What occurs to start an action.

              ", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

              The request body for CreateEventAction.

              " + } + }, + "com.amazonaws.dataexchange#CreateEventActionResponse": { + "type": "structure", + "members": { + "Action": { + "target": "com.amazonaws.dataexchange#Action", + "traits": { + "smithy.api#documentation": "

              What occurs after a certain event.

              " + } + }, + "Arn": { + "target": "com.amazonaws.dataexchange#Arn", + "traits": { + "smithy.api#documentation": "

              The ARN for the event action.

              " + } + }, + "CreatedAt": { + "target": "com.amazonaws.dataexchange#Timestamp", + "traits": { + "smithy.api#documentation": "

              The date and time that the event action was created, in ISO 8601 format.

              " + } + }, + "Event": { + "target": "com.amazonaws.dataexchange#Event", + "traits": { + "smithy.api#documentation": "

              What occurs to start an action.

              " + } + }, + "Id": { + "target": "com.amazonaws.dataexchange#Id", + "traits": { + "smithy.api#documentation": "

              The unique identifier for the event action.

              " + } + }, + "UpdatedAt": { + "target": "com.amazonaws.dataexchange#Timestamp", + "traits": { + "smithy.api#documentation": "

              The date and time that the event action was last updated, in ISO 8601 format.

              " + } + } + } + }, "com.amazonaws.dataexchange#CreateJob": { "type": "operation", "input": { @@ -693,6 +836,9 @@ { "target": "com.amazonaws.dataexchange#CreateDataSet" }, + { + "target": "com.amazonaws.dataexchange#CreateEventAction" + }, { "target": "com.amazonaws.dataexchange#CreateJob" }, @@ -705,6 +851,9 @@ { "target": "com.amazonaws.dataexchange#DeleteDataSet" }, + { + "target": "com.amazonaws.dataexchange#DeleteEventAction" + }, { "target": "com.amazonaws.dataexchange#DeleteRevision" }, @@ -714,6 +863,9 @@ { "target": "com.amazonaws.dataexchange#GetDataSet" }, + { + "target": "com.amazonaws.dataexchange#GetEventAction" + }, { "target": "com.amazonaws.dataexchange#GetJob" }, @@ -726,6 +878,9 @@ { "target": "com.amazonaws.dataexchange#ListDataSets" }, + { + "target": "com.amazonaws.dataexchange#ListEventActions" + }, { "target": "com.amazonaws.dataexchange#ListJobs" }, @@ -750,6 +905,9 @@ { "target": "com.amazonaws.dataexchange#UpdateDataSet" }, + { + "target": "com.amazonaws.dataexchange#UpdateEventAction" + }, { "target": "com.amazonaws.dataexchange#UpdateRevision" } @@ -956,6 +1114,47 @@ } } }, + "com.amazonaws.dataexchange#DeleteEventAction": { + "type": "operation", + "input": { + "target": "com.amazonaws.dataexchange#DeleteEventActionRequest" + }, + "errors": [ + { + "target": "com.amazonaws.dataexchange#InternalServerException" + }, + { + "target": "com.amazonaws.dataexchange#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.dataexchange#ThrottlingException" + }, + { + "target": "com.amazonaws.dataexchange#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

              This operation deletes the event action.

              ", + "smithy.api#http": { + "method": "DELETE", + "uri": "/v1/event-actions/{EventActionId}", + "code": 204 + } + } + }, + "com.amazonaws.dataexchange#DeleteEventActionRequest": { + "type": "structure", + "members": { + "EventActionId": { + "target": "com.amazonaws.dataexchange#__string", + "traits": { + "smithy.api#documentation": "

              The unique identifier for the event action.

              ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, "com.amazonaws.dataexchange#DeleteRevision": { "type": "operation", "input": { @@ -1028,6 +1227,79 @@ } } }, + "com.amazonaws.dataexchange#Event": { + "type": "structure", + "members": { + "RevisionPublished": { + "target": "com.amazonaws.dataexchange#RevisionPublished" + } + } + }, + "com.amazonaws.dataexchange#EventActionEntry": { + "type": "structure", + "members": { + "Action": { + "target": "com.amazonaws.dataexchange#Action", + "traits": { + "smithy.api#documentation": "

              What occurs after a certain event.

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

              The ARN for the event action.

              ", + "smithy.api#required": {} + } + }, + "CreatedAt": { + "target": "com.amazonaws.dataexchange#Timestamp", + "traits": { + "smithy.api#documentation": "

              The date and time that the event action was created, in ISO 8601 format.

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

              What occurs to start an action.

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

              The unique identifier for the event action.

              ", + "smithy.api#required": {} + } + }, + "UpdatedAt": { + "target": "com.amazonaws.dataexchange#Timestamp", + "traits": { + "smithy.api#documentation": "

              The date and time that the event action was last updated, in ISO 8601 format.

              ", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

              An event action is an object that defines the relationship between a specific event and an automated action that will be taken on behalf of the customer.

              " + } + }, + "com.amazonaws.dataexchange#ExceptionCause": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "InsufficientS3BucketPolicy", + "name": "InsufficientS3BucketPolicy" + }, + { + "value": "S3AccessDenied", + "name": "S3AccessDenied" + } + ] + } + }, "com.amazonaws.dataexchange#ExportAssetToSignedUrlRequestDetails": { "type": "structure", "members": { @@ -1230,7 +1502,7 @@ "KmsKeyArn": { "target": "com.amazonaws.dataexchange#__string", "traits": { - "smithy.api#documentation": "

              The Amazon Resource Name (ARN) of the the AWS KMS key you want to use to encrypt the Amazon S3 objects. This parameter is required if you choose aws:kms as an encryption type.

              " + "smithy.api#documentation": "

              The Amazon Resource Name (ARN) of the AWS KMS key you want to use to encrypt the Amazon S3 objects. This parameter is required if you choose aws:kms as an encryption type.

              " } }, "Type": { @@ -1242,7 +1514,7 @@ } }, "traits": { - "smithy.api#documentation": "

              Encryption configuration of the export job. Includes the encryption type as well as the AWS KMS key. The KMS key is only necessary if you chose the KMS encryption type.

              " + "smithy.api#documentation": "

              Encryption configuration of the export job. Includes the encryption type in addition to the AWS KMS key. The KMS key is only necessary if you chose the KMS encryption. type.

              " } }, "com.amazonaws.dataexchange#GetAsset": { @@ -1485,6 +1757,91 @@ } } }, + "com.amazonaws.dataexchange#GetEventAction": { + "type": "operation", + "input": { + "target": "com.amazonaws.dataexchange#GetEventActionRequest" + }, + "output": { + "target": "com.amazonaws.dataexchange#GetEventActionResponse" + }, + "errors": [ + { + "target": "com.amazonaws.dataexchange#InternalServerException" + }, + { + "target": "com.amazonaws.dataexchange#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.dataexchange#ThrottlingException" + }, + { + "target": "com.amazonaws.dataexchange#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

              This operation retrieves information about an event action.

              ", + "smithy.api#http": { + "method": "GET", + "uri": "/v1/event-actions/{EventActionId}", + "code": 200 + } + } + }, + "com.amazonaws.dataexchange#GetEventActionRequest": { + "type": "structure", + "members": { + "EventActionId": { + "target": "com.amazonaws.dataexchange#__string", + "traits": { + "smithy.api#documentation": "

              The unique identifier for the event action.

              ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.dataexchange#GetEventActionResponse": { + "type": "structure", + "members": { + "Action": { + "target": "com.amazonaws.dataexchange#Action", + "traits": { + "smithy.api#documentation": "

              What occurs after a certain event.

              " + } + }, + "Arn": { + "target": "com.amazonaws.dataexchange#Arn", + "traits": { + "smithy.api#documentation": "

              The ARN for the event action.

              " + } + }, + "CreatedAt": { + "target": "com.amazonaws.dataexchange#Timestamp", + "traits": { + "smithy.api#documentation": "

              The date and time that the event action was created, in ISO 8601 format.

              " + } + }, + "Event": { + "target": "com.amazonaws.dataexchange#Event", + "traits": { + "smithy.api#documentation": "

              What occurs to start an action.

              " + } + }, + "Id": { + "target": "com.amazonaws.dataexchange#Id", + "traits": { + "smithy.api#documentation": "

              The unique identifier for the event action.

              " + } + }, + "UpdatedAt": { + "target": "com.amazonaws.dataexchange#Timestamp", + "traits": { + "smithy.api#documentation": "

              The date and time that the event action was last updated, in ISO 8601 format.

              " + } + } + } + }, "com.amazonaws.dataexchange#GetJob": { "type": "operation", "input": { @@ -2008,6 +2365,10 @@ { "value": "ASSET", "name": "ASSET" + }, + { + "value": "DATA_SET", + "name": "DATA_SET" } ] } @@ -2063,6 +2424,18 @@ { "value": "Concurrent in progress jobs to export assets to a signed URL", "name": "Concurrent_in_progress_jobs_to_export_assets_to_a_signed_URL" + }, + { + "value": "Concurrent in progress jobs to export revisions to Amazon S3", + "name": "Concurrent_in_progress_jobs_to_export_revisions_to_Amazon_S3" + }, + { + "value": "Event actions per account", + "name": "Event_actions_per_account" + }, + { + "value": "Auto export event actions per data set", + "name": "Auto_export_event_actions_per_data_set" } ] } @@ -2228,6 +2601,86 @@ } } }, + "com.amazonaws.dataexchange#ListEventActions": { + "type": "operation", + "input": { + "target": "com.amazonaws.dataexchange#ListEventActionsRequest" + }, + "output": { + "target": "com.amazonaws.dataexchange#ListEventActionsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.dataexchange#InternalServerException" + }, + { + "target": "com.amazonaws.dataexchange#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.dataexchange#ThrottlingException" + }, + { + "target": "com.amazonaws.dataexchange#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

              This operation lists your event actions.

              ", + "smithy.api#http": { + "method": "GET", + "uri": "/v1/event-actions", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "items": "EventActions", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.dataexchange#ListEventActionsRequest": { + "type": "structure", + "members": { + "EventSourceId": { + "target": "com.amazonaws.dataexchange#__string", + "traits": { + "smithy.api#documentation": "

              The unique identifier for the event source.

              ", + "smithy.api#httpQuery": "eventSourceId" + } + }, + "MaxResults": { + "target": "com.amazonaws.dataexchange#MaxResults", + "traits": { + "smithy.api#documentation": "

              The maximum number of results returned by a single call.

              ", + "smithy.api#httpQuery": "maxResults" + } + }, + "NextToken": { + "target": "com.amazonaws.dataexchange#__string", + "traits": { + "smithy.api#documentation": "

              The token value retrieved from a previous call to access the next page of results.

              ", + "smithy.api#httpQuery": "nextToken" + } + } + } + }, + "com.amazonaws.dataexchange#ListEventActionsResponse": { + "type": "structure", + "members": { + "EventActions": { + "target": "com.amazonaws.dataexchange#ListOfEventActionEntry", + "traits": { + "smithy.api#documentation": "

              The event action objects listed by the request.

              " + } + }, + "NextToken": { + "target": "com.amazonaws.dataexchange#NextToken", + "traits": { + "smithy.api#documentation": "

              The token value retrieved from a previous call to access the next page of results.

              " + } + } + } + }, "com.amazonaws.dataexchange#ListJobs": { "type": "operation", "input": { @@ -2345,6 +2798,12 @@ "target": "com.amazonaws.dataexchange#DataSetEntry" } }, + "com.amazonaws.dataexchange#ListOfEventActionEntry": { + "type": "list", + "member": { + "target": "com.amazonaws.dataexchange#EventActionEntry" + } + }, "com.amazonaws.dataexchange#ListOfJobEntry": { "type": "list", "member": { @@ -2652,6 +3111,10 @@ { "value": "JOB", "name": "JOB" + }, + { + "value": "EVENT_ACTION", + "name": "EVENT_ACTION" } ] } @@ -2783,6 +3246,17 @@ "smithy.api#documentation": "

              A revision is a container for one or more assets.

              " } }, + "com.amazonaws.dataexchange#RevisionPublished": { + "type": "structure", + "members": { + "DataSetId": { + "target": "com.amazonaws.dataexchange#Id", + "traits": { + "smithy.api#required": {} + } + } + } + }, "com.amazonaws.dataexchange#S3SnapshotAsset": { "type": "structure", "members": { @@ -3320,6 +3794,103 @@ } } }, + "com.amazonaws.dataexchange#UpdateEventAction": { + "type": "operation", + "input": { + "target": "com.amazonaws.dataexchange#UpdateEventActionRequest" + }, + "output": { + "target": "com.amazonaws.dataexchange#UpdateEventActionResponse" + }, + "errors": [ + { + "target": "com.amazonaws.dataexchange#AccessDeniedException" + }, + { + "target": "com.amazonaws.dataexchange#InternalServerException" + }, + { + "target": "com.amazonaws.dataexchange#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.dataexchange#ThrottlingException" + }, + { + "target": "com.amazonaws.dataexchange#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

              This operation updates the event action.

              ", + "smithy.api#http": { + "method": "PATCH", + "uri": "/v1/event-actions/{EventActionId}", + "code": 200 + } + } + }, + "com.amazonaws.dataexchange#UpdateEventActionRequest": { + "type": "structure", + "members": { + "Action": { + "target": "com.amazonaws.dataexchange#Action", + "traits": { + "smithy.api#documentation": "

              What occurs after a certain event.

              " + } + }, + "EventActionId": { + "target": "com.amazonaws.dataexchange#__string", + "traits": { + "smithy.api#documentation": "

              The unique identifier for the event action.

              ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

              The request body for UpdateEventAction.

              " + } + }, + "com.amazonaws.dataexchange#UpdateEventActionResponse": { + "type": "structure", + "members": { + "Action": { + "target": "com.amazonaws.dataexchange#Action", + "traits": { + "smithy.api#documentation": "

              What occurs after a certain event.

              " + } + }, + "Arn": { + "target": "com.amazonaws.dataexchange#Arn", + "traits": { + "smithy.api#documentation": "

              The ARN for the event action.

              " + } + }, + "CreatedAt": { + "target": "com.amazonaws.dataexchange#Timestamp", + "traits": { + "smithy.api#documentation": "

              The date and time that the event action was created, in ISO 8601 format.

              " + } + }, + "Event": { + "target": "com.amazonaws.dataexchange#Event", + "traits": { + "smithy.api#documentation": "

              What occurs to start an action.

              " + } + }, + "Id": { + "target": "com.amazonaws.dataexchange#Id", + "traits": { + "smithy.api#documentation": "

              The unique identifier for the event action.

              " + } + }, + "UpdatedAt": { + "target": "com.amazonaws.dataexchange#Timestamp", + "traits": { + "smithy.api#documentation": "

              The date and time that the event action was last updated, in ISO 8601 format.

              " + } + } + } + }, "com.amazonaws.dataexchange#UpdateRevision": { "type": "operation", "input": { @@ -3455,6 +4026,12 @@ "smithy.api#documentation": "

              The message that informs you about what was invalid about the request.

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

              The message that informs you about what the exception was.

              " + } } }, "traits": { diff --git a/codegen/sdk-codegen/aws-models/elastic-load-balancing-v2.2015-12-01.json b/codegen/sdk-codegen/aws-models/elastic-load-balancing-v2.2015-12-01.json index cca9a964057e4..e9a3abb635f21 100644 --- a/codegen/sdk-codegen/aws-models/elastic-load-balancing-v2.2015-12-01.json +++ b/codegen/sdk-codegen/aws-models/elastic-load-balancing-v2.2015-12-01.json @@ -211,9 +211,15 @@ { "target": "com.amazonaws.elasticloadbalancingv2#DuplicateTagKeysException" }, + { + "target": "com.amazonaws.elasticloadbalancingv2#ListenerNotFoundException" + }, { "target": "com.amazonaws.elasticloadbalancingv2#LoadBalancerNotFoundException" }, + { + "target": "com.amazonaws.elasticloadbalancingv2#RuleNotFoundException" + }, { "target": "com.amazonaws.elasticloadbalancingv2#TargetGroupNotFoundException" }, @@ -1133,7 +1139,7 @@ "HealthCheckEnabled": { "target": "com.amazonaws.elasticloadbalancingv2#HealthCheckEnabled", "traits": { - "smithy.api#documentation": "

              Indicates whether health checks are enabled. If the target type is lambda,\n health checks are disabled by default but can be enabled. If the target type is\n instance or ip, health checks are always enabled and cannot be\n disabled.

              " + "smithy.api#documentation": "

              Indicates whether health checks are enabled. If the target type is lambda,\n health checks are disabled by default but can be enabled. If the target type is\n instance, ip, or alb, health checks are always\n enabled and cannot be disabled.

              " } }, "HealthCheckPath": { @@ -1175,7 +1181,7 @@ "TargetType": { "target": "com.amazonaws.elasticloadbalancingv2#TargetTypeEnum", "traits": { - "smithy.api#documentation": "

              The type of target that you must specify when registering targets with this target group.\n You can't specify targets for a target group using more than one target type.

              \n
                \n
              • \n

                \n instance - Register targets by instance ID. This is the default\n value.

                \n
              • \n
              • \n

                \n ip - Register targets by IP address. You can specify IP addresses from\n the subnets of the virtual private cloud (VPC) for the target group, the RFC 1918 range\n (10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16), and the RFC 6598 range (100.64.0.0/10).\n You can't specify publicly routable IP addresses.

                \n
              • \n
              • \n

                \n lambda - Register a single Lambda function as a target.

                \n
              • \n
              " + "smithy.api#documentation": "

              The type of target that you must specify when registering targets with this target group.\n You can't specify targets for a target group using more than one target type.

              \n
                \n
              • \n

                \n instance - Register targets by instance ID. This is the default\n value.

                \n
              • \n
              • \n

                \n ip - Register targets by IP address. You can specify IP addresses from\n the subnets of the virtual private cloud (VPC) for the target group, the RFC 1918 range\n (10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16), and the RFC 6598 range (100.64.0.0/10).\n You can't specify publicly routable IP addresses.

                \n
              • \n
              • \n

                \n lambda - Register a single Lambda function as a target.

                \n
              • \n
              • \n

                \n alb - Register a single Application Load Balancer as a target.

                \n
              • \n
              " } }, "Tags": { @@ -1230,6 +1236,9 @@ "errors": [ { "target": "com.amazonaws.elasticloadbalancingv2#ListenerNotFoundException" + }, + { + "target": "com.amazonaws.elasticloadbalancingv2#ResourceInUseException" } ], "traits": { @@ -2936,7 +2945,7 @@ "Key": { "target": "com.amazonaws.elasticloadbalancingv2#LoadBalancerAttributeKey", "traits": { - "smithy.api#documentation": "

              The name of the attribute.

              \n\n

              The following attribute is supported by all load balancers:

              \n
                \n
              • \n

                \n deletion_protection.enabled - Indicates whether deletion protection is\n enabled. The value is true or false. The default is\n false.

                \n
              • \n
              \n\n

              The following attributes are supported by both Application Load Balancers and Network Load\n Balancers:

              \n
                \n
              • \n

                \n access_logs.s3.enabled - Indicates whether access logs are enabled. The\n value is true or false. The default is\n false.

                \n
              • \n
              • \n

                \n access_logs.s3.bucket - The name of the S3 bucket for the access logs.\n This attribute is required if access logs are enabled. The bucket must exist in the same\n region as the load balancer and have a bucket policy that grants Elastic Load Balancing\n permissions to write to the bucket.

                \n
              • \n
              • \n

                \n access_logs.s3.prefix - The prefix for the location in the S3 bucket for the\n access logs.

                \n
              • \n
              \n\n

              The following attributes are supported by only Application Load Balancers:

              \n
                \n
              • \n

                \n idle_timeout.timeout_seconds - The idle timeout value, in seconds. The\n valid range is 1-4000 seconds. The default is 60 seconds.

                \n
              • \n
              • \n

                \n routing.http.desync_mitigation_mode - Determines how the load balancer\n handles requests that might pose a security risk to your application. The possible values\n are monitor, defensive, and strictest. The default\n is defensive.

                \n
              • \n
              • \n

                \n routing.http.drop_invalid_header_fields.enabled - Indicates whether HTTP\n headers with invalid header fields are removed by the load balancer (true) or\n routed to targets (false). The default is false.

                \n
              • \n
              • \n

                \n routing.http.x_amzn_tls_version_and_cipher_suite.enabled - Indicates\n whether the two headers (x-amzn-tls-version and\n x-amzn-tls-cipher-suite), which contain information about the negotiated\n TLS version and cipher suite, are added to the client request before sending it to the\n target. The x-amzn-tls-version header has information about the TLS protocol\n version negotiated with the client, and the x-amzn-tls-cipher-suite header\n has information about the cipher suite negotiated with the client. Both headers are in\n OpenSSL format. The possible values for the attribute are true and\n false. The default is false.

                \n
              • \n
              • \n

                \n routing.http.xff_client_port.enabled - Indicates whether the\n X-Forwarded-For header should preserve the source port that the client used\n to connect to the load balancer. The possible values are true and\n false. The default is false.

                \n
              • \n
              • \n

                \n routing.http2.enabled - Indicates whether HTTP/2 is enabled. The possible\n values are true and false. The default is true.\n Elastic Load Balancing requires that message header names contain only alphanumeric\n characters and hyphens.

                \n\n
              • \n
              • \n

                \n waf.fail_open.enabled - Indicates whether to allow a WAF-enabled load\n balancer to route requests to targets if it is unable to forward the request to Amazon Web Services WAF. The possible values are true and false. The\n default is false.

                \n
              • \n
              \n\n

              The following attribute is supported by Network Load Balancers and Gateway Load\n Balancers:

              \n
                \n
              • \n

                \n load_balancing.cross_zone.enabled - Indicates whether cross-zone load\n balancing is enabled. The possible values are true and false.\n The default is false.

                \n
              • \n
              " + "smithy.api#documentation": "

              The name of the attribute.

              \n\n

              The following attribute is supported by all load balancers:

              \n
                \n
              • \n

                \n deletion_protection.enabled - Indicates whether deletion protection is\n enabled. The value is true or false. The default is\n false.

                \n
              • \n
              \n\n

              The following attributes are supported by both Application Load Balancers and Network Load\n Balancers:

              \n
                \n
              • \n

                \n access_logs.s3.enabled - Indicates whether access logs are enabled. The\n value is true or false. The default is\n false.

                \n
              • \n
              • \n

                \n access_logs.s3.bucket - The name of the S3 bucket for the access logs.\n This attribute is required if access logs are enabled. The bucket must exist in the same\n region as the load balancer and have a bucket policy that grants Elastic Load Balancing\n permissions to write to the bucket.

                \n
              • \n
              • \n

                \n access_logs.s3.prefix - The prefix for the location in the S3 bucket for the\n access logs.

                \n
              • \n
              \n\n

              The following attributes are supported by only Application Load Balancers:

              \n
                \n
              • \n

                \n idle_timeout.timeout_seconds - The idle timeout value, in seconds. The\n valid range is 1-4000 seconds. The default is 60 seconds.

                \n
              • \n
              • \n

                \n routing.http.desync_mitigation_mode - Determines how the load balancer\n handles requests that might pose a security risk to your application. The possible values\n are monitor, defensive, and strictest. The default\n is defensive.

                \n
              • \n
              • \n

                \n routing.http.drop_invalid_header_fields.enabled - Indicates whether HTTP\n headers with invalid header fields are removed by the load balancer (true) or\n routed to targets (false). The default is false.

                \n
              • \n
              • \n

                \n routing.http.x_amzn_tls_version_and_cipher_suite.enabled - Indicates whether the two headers (x-amzn-tls-version and\n x-amzn-tls-cipher-suite), which contain information about\n the negotiated TLS version and cipher suite, are added to the client request\n before sending it to the target. The x-amzn-tls-version header\n has information about the TLS protocol version negotiated with the client,\n and the x-amzn-tls-cipher-suite header has information about\n the cipher suite negotiated with the client. Both headers are in OpenSSL\n format. The possible values for the attribute are true and\n false. The default is false.

                \n
              • \n
              • \n

                \n routing.http.xff_client_port.enabled - Indicates whether the\n X-Forwarded-For header should preserve the source port that the client used\n to connect to the load balancer. The possible values are true and\n false. The default is false.

                \n
              • \n
              • \n

                \n routing.http2.enabled - Indicates whether HTTP/2 is enabled. The possible\n values are true and false. The default is true.\n Elastic Load Balancing requires that message header names contain only alphanumeric\n characters and hyphens.

                \n
              • \n
              • \n

                \n waf.fail_open.enabled - Indicates whether to allow a WAF-enabled load\n balancer to route requests to targets if it is unable to forward the request to Amazon Web Services WAF. The possible values are true and false. The\n default is false.

                \n
              • \n
              \n\n

              The following attribute is supported by Network Load Balancers and Gateway Load\n Balancers:

              \n
                \n
              • \n

                \n load_balancing.cross_zone.enabled - Indicates whether cross-zone load\n balancing is enabled. The possible values are true and false.\n The default is false.

                \n
              • \n
              " } }, "Value": { @@ -4601,20 +4610,20 @@ "Id": { "target": "com.amazonaws.elasticloadbalancingv2#TargetId", "traits": { - "smithy.api#documentation": "

              The ID of the target. If the target type of the target group is instance,\n specify an instance ID. If the target type is ip, specify an IP address. If the\n target type is lambda, specify the ARN of the Lambda function.

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

              The ID of the target. If the target type of the target group is instance,\n specify an instance ID. If the target type is ip, specify an IP address. If the\n target type is lambda, specify the ARN of the Lambda function. If the target type\n is alb, specify the ARN of the Application Load Balancer target.

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

              The port on which the target is listening. If the target group protocol is GENEVE, the\n supported port is 6081. Not used if the target is a Lambda function.

              " + "smithy.api#documentation": "

              The port on which the target is listening. If the target group protocol is GENEVE, the\n supported port is 6081. If the target type is alb, the targeted Application Load\n Balancer must have at least one listener whose port matches the target group port. Not used if\n the target is a Lambda function.

              " } }, "AvailabilityZone": { "target": "com.amazonaws.elasticloadbalancingv2#ZoneName", "traits": { - "smithy.api#documentation": "

              An Availability Zone or all. This determines whether the target receives\n traffic from the load balancer nodes in the specified Availability Zone or from all enabled\n Availability Zones for the load balancer.

              \n

              This parameter is not supported if the target type of the target group is\n instance.

              \n

              If the target type is ip and the IP address is in a subnet of the VPC for the\n target group, the Availability Zone is automatically detected and this parameter is optional.\n If the IP address is outside the VPC, this parameter is required.

              \n

              With an Application Load Balancer, if the target type is ip and the IP\n address is outside the VPC for the target group, the only supported value is\n all.

              \n

              If the target type is lambda, this parameter is optional and the only\n supported value is all.

              " + "smithy.api#documentation": "

              An Availability Zone or all. This determines whether the target receives\n traffic from the load balancer nodes in the specified Availability Zone or from all enabled\n Availability Zones for the load balancer.

              \n

              This parameter is not supported if the target type of the target group is\n instance or alb.

              \n

              If the target type is ip and the IP address is in a subnet of the VPC for the\n target group, the Availability Zone is automatically detected and this parameter is optional.\n If the IP address is outside the VPC, this parameter is required.

              \n

              With an Application Load Balancer, if the target type is ip and the IP\n address is outside the VPC for the target group, the only supported value is\n all.

              \n

              If the target type is lambda, this parameter is optional and the only\n supported value is all.

              " } } }, @@ -4724,7 +4733,7 @@ "TargetType": { "target": "com.amazonaws.elasticloadbalancingv2#TargetTypeEnum", "traits": { - "smithy.api#documentation": "

              The type of target that you must specify when registering targets with this target group.\n The possible values are instance (register targets by instance ID),\n ip (register targets by IP address), or lambda (register a single\n Lambda function as a target).

              " + "smithy.api#documentation": "

              The type of target that you must specify when registering targets with this target group.\n The possible values are instance (register targets by instance ID),\n ip (register targets by IP address), lambda (register a single\n Lambda function as a target), or alb (register a single Application Load Balancer\n as a target).

              " } }, "ProtocolVersion": { @@ -5061,6 +5070,10 @@ { "value": "lambda", "name": "LAMBDA" + }, + { + "value": "alb", + "name": "ALB" } ] } diff --git a/codegen/sdk-codegen/aws-models/imagebuilder.2019-12-02.json b/codegen/sdk-codegen/aws-models/imagebuilder.2019-12-02.json index 67615abf507d4..5812a239a48cb 100644 --- a/codegen/sdk-codegen/aws-models/imagebuilder.2019-12-02.json +++ b/codegen/sdk-codegen/aws-models/imagebuilder.2019-12-02.json @@ -59,7 +59,7 @@ "userDataOverride": { "target": "com.amazonaws.imagebuilder#UserDataOverride", "traits": { - "smithy.api#documentation": "

              Use this property to provide commands or a command script to run when you launch \n\t\t\tyour build instance.

              \n\t\t \n\t\t\t

              The userDataOverride property replaces any commands that Image Builder might have added to ensure\n\t\t\t\tthat Systems Manager is installed on your Linux build instance. If you override the user data,\n\t\t\t\tmake sure that you add commands to install Systems Manager, if it is not pre-installed on your\n\t\t\t\tsource image.

              \n\t\t
              " + "smithy.api#documentation": "

              Use this property to provide commands or a command script to run when you launch \n\t\t\tyour build instance.

              \n\t\t \n\t\t\t

              The userDataOverride property replaces any commands that Image Builder might have added to ensure\n\t\t\t\tthat Systems Manager is installed on your Linux build instance. If you override the user data,\n\t\t\t\tmake sure that you add commands to install Systems Manager, if it is not pre-installed on your\n\t\t\t\tbase image.

              \n\t\t
              " } } }, @@ -114,7 +114,7 @@ "name": { "target": "com.amazonaws.imagebuilder#AmiNameString", "traits": { - "smithy.api#documentation": "

              The name of the distribution configuration.

              " + "smithy.api#documentation": "

              The name of the output AMI.

              " } }, "description": { @@ -343,7 +343,7 @@ "supportedOsVersions": { "target": "com.amazonaws.imagebuilder#OsVersionList", "traits": { - "smithy.api#documentation": "

              The operating system (OS) version supported by the component. If the OS information is\n\t\t\tavailable, a prefix match is performed against the parent image OS version during image recipe\n\t\t\tcreation.

              " + "smithy.api#documentation": "

              The operating system (OS) version supported by the component. If the OS information is\n\t\t\tavailable, a prefix match is performed against the base image OS version during image recipe\n\t\t\tcreation.

              " } }, "state": { @@ -630,7 +630,7 @@ "supportedOsVersions": { "target": "com.amazonaws.imagebuilder#OsVersionList", "traits": { - "smithy.api#documentation": "

              The operating system (OS) version supported by the component. If the OS information is\n\t\t\tavailable, a prefix match is performed against the parent image OS version during image recipe\n\t\t\tcreation.

              " + "smithy.api#documentation": "

              The operating system (OS) version supported by the component. If the OS information is\n\t\t\tavailable, a prefix match is performed against the base image OS version during image recipe\n\t\t\tcreation.

              " } }, "state": { @@ -719,7 +719,7 @@ "version": { "target": "com.amazonaws.imagebuilder#VersionNumber", "traits": { - "smithy.api#documentation": "

              The semantic version of the component.

              \n\t\t \n\t\t\t

              The semantic version has four nodes: ../. \n\tYou can assign values for the first three, and can filter on all of them.

              \n\t\t\t

              \n Assignment: For the first three nodes you can assign any positive integer value, including \n\tzero, with an upper limit of 2^30-1, or 1073741823 for each node. Image Builder automatically assigns the \n\tbuild number to the fourth node.

              \n\t\t\t

              \n Patterns: You can use any numeric pattern that adheres to the assignment requirements for \n\tthe nodes that you can assign. For example, you might choose a software version pattern, such as 1.0.0, or \n\ta date, such as 2021.01.01.

              \n\t\t\t

              \n Filtering: With semantic versioning, you have the flexibility to use wildcards (x) \n\tto specify the most recent versions or nodes when selecting the source image or components for your \n\trecipe. When you use a wildcard in any node, all nodes to the right of the first wildcard must also be \n\twildcards.

              \n\t\t
              " + "smithy.api#documentation": "

              The semantic version of the component.

              \n\t\t \n\t\t\t

              The semantic version has four nodes: ../. \n\tYou can assign values for the first three, and can filter on all of them.

              \n\t\t\t

              \n Assignment: For the first three nodes you can assign any positive integer value, including \n\tzero, with an upper limit of 2^30-1, or 1073741823 for each node. Image Builder automatically assigns the \n\tbuild number to the fourth node.

              \n\t\t\t

              \n Patterns: You can use any numeric pattern that adheres to the assignment requirements for \n\tthe nodes that you can assign. For example, you might choose a software version pattern, such as 1.0.0, or \n\ta date, such as 2021.01.01.

              \n\t\t\t

              \n Filtering: With semantic versioning, you have the flexibility to use wildcards (x) \n\tto specify the most recent versions or nodes when selecting the base image or components for your \n\trecipe. When you use a wildcard in any node, all nodes to the right of the first wildcard must also be \n\twildcards.

              \n\t\t
              " } }, "description": { @@ -737,7 +737,7 @@ "supportedOsVersions": { "target": "com.amazonaws.imagebuilder#OsVersionList", "traits": { - "smithy.api#documentation": "

              he operating system (OS) version supported by the component. If the OS information is\n\t\t\tavailable, a prefix match is performed against the parent image OS version during image recipe\n\t\t\tcreation.

              " + "smithy.api#documentation": "

              he operating system (OS) version supported by the component. If the OS information is\n\t\t\tavailable, a prefix match is performed against the base image OS version during image recipe\n\t\t\tcreation.

              " } }, "type": { @@ -876,7 +876,7 @@ "version": { "target": "com.amazonaws.imagebuilder#VersionNumber", "traits": { - "smithy.api#documentation": "

              The semantic version of the container recipe.

              \n\t\t \n\t\t\t

              The semantic version has four nodes: ../. \n\tYou can assign values for the first three, and can filter on all of them.

              \n\t\t\t

              \n Assignment: For the first three nodes you can assign any positive integer value, including \n\tzero, with an upper limit of 2^30-1, or 1073741823 for each node. Image Builder automatically assigns the \n\tbuild number to the fourth node.

              \n\t\t\t

              \n Patterns: You can use any numeric pattern that adheres to the assignment requirements for \n\tthe nodes that you can assign. For example, you might choose a software version pattern, such as 1.0.0, or \n\ta date, such as 2021.01.01.

              \n\t\t\t

              \n Filtering: With semantic versioning, you have the flexibility to use wildcards (x) \n\tto specify the most recent versions or nodes when selecting the source image or components for your \n\trecipe. When you use a wildcard in any node, all nodes to the right of the first wildcard must also be \n\twildcards.

              \n\t\t
              " + "smithy.api#documentation": "

              The semantic version of the container recipe.

              \n\t\t \n\t\t\t

              The semantic version has four nodes: ../. \n\tYou can assign values for the first three, and can filter on all of them.

              \n\t\t\t

              \n Assignment: For the first three nodes you can assign any positive integer value, including \n\tzero, with an upper limit of 2^30-1, or 1073741823 for each node. Image Builder automatically assigns the \n\tbuild number to the fourth node.

              \n\t\t\t

              \n Patterns: You can use any numeric pattern that adheres to the assignment requirements for \n\tthe nodes that you can assign. For example, you might choose a software version pattern, such as 1.0.0, or \n\ta date, such as 2021.01.01.

              \n\t\t\t

              \n Filtering: With semantic versioning, you have the flexibility to use wildcards (x) \n\tto specify the most recent versions or nodes when selecting the base image or components for your \n\trecipe. When you use a wildcard in any node, all nodes to the right of the first wildcard must also be \n\twildcards.

              \n\t\t
              " } }, "components": { @@ -912,7 +912,7 @@ "parentImage": { "target": "com.amazonaws.imagebuilder#NonEmptyString", "traits": { - "smithy.api#documentation": "

              The source image for the container recipe.

              " + "smithy.api#documentation": "

              The base image for the container recipe.

              " } }, "dateCreated": { @@ -986,7 +986,7 @@ "parentImage": { "target": "com.amazonaws.imagebuilder#NonEmptyString", "traits": { - "smithy.api#documentation": "

              The source image for the container recipe.

              " + "smithy.api#documentation": "

              The base image for the container recipe.

              " } }, "dateCreated": { @@ -1125,7 +1125,7 @@ "supportedOsVersions": { "target": "com.amazonaws.imagebuilder#OsVersionList", "traits": { - "smithy.api#documentation": "

              The operating system (OS) version supported by the component. If the OS information is\n\t\t\tavailable, a prefix match is performed against the parent image OS version during image recipe\n\t\t\tcreation.

              " + "smithy.api#documentation": "

              The operating system (OS) version supported by the component. If the OS information is\n\t\t\tavailable, a prefix match is performed against the base image OS version during image recipe\n\t\t\tcreation.

              " } }, "data": { @@ -1295,19 +1295,19 @@ "platformOverride": { "target": "com.amazonaws.imagebuilder#Platform", "traits": { - "smithy.api#documentation": "

              Specifies the operating system platform when you use a custom source image.

              " + "smithy.api#documentation": "

              Specifies the operating system platform when you use a custom base image.

              " } }, "imageOsVersionOverride": { "target": "com.amazonaws.imagebuilder#NonEmptyString", "traits": { - "smithy.api#documentation": "

              Specifies the operating system version for the source image.

              " + "smithy.api#documentation": "

              Specifies the operating system version for the base image.

              " } }, "parentImage": { "target": "com.amazonaws.imagebuilder#NonEmptyString", "traits": { - "smithy.api#documentation": "

              The source image for the container recipe.

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

              The base image for the container recipe.

              ", "smithy.api#required": {} } }, @@ -1767,7 +1767,7 @@ "parentImage": { "target": "com.amazonaws.imagebuilder#NonEmptyString", "traits": { - "smithy.api#documentation": "

              The parent image of the image recipe. The value of the string can be the ARN of the parent \n\t\t\timage or an AMI ID. The format for the ARN follows this example: \n\t\t\tarn:aws:imagebuilder:us-west-2:aws:image/windows-server-2016-english-full-base-x86/x.x.x. \n\t\t\tYou can provide the specific version that you want to use, or you can use a wildcard in \n\t\t\tall of the fields. If you enter an AMI ID for the string value, you must have access to the AMI, \n\t\t\tand the AMI must be in the same Region in which you are using Image Builder.

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

              The base image of the image recipe. The value of the string can be the ARN of the base \n\t\t\timage or an AMI ID. The format for the ARN follows this example: \n\t\t\tarn:aws:imagebuilder:us-west-2:aws:image/windows-server-2016-english-full-base-x86/x.x.x. \n\t\t\tYou can provide the specific version that you want to use, or you can use a wildcard in \n\t\t\tall of the fields. If you enter an AMI ID for the string value, you must have access to the AMI, \n\t\t\tand the AMI must be in the same Region in which you are using Image Builder.

              ", "smithy.api#required": {} } }, @@ -1975,7 +1975,7 @@ "instanceTypes": { "target": "com.amazonaws.imagebuilder#InstanceTypeList", "traits": { - "smithy.api#documentation": "

              The instance metadata options that you can set for the HTTP requests that pipeline builds\n\t\t\tuse to launch EC2 build and test instances. For more information about instance metadata\n\t\t\toptions, see one of the following links:

              \n\t\t " + "smithy.api#documentation": "

              The instance types of the infrastructure configuration. You can specify one or more\n\t\t\tinstance types to use for this build. The service will pick one of these instance types based\n\t\t\ton availability.

              " } }, "instanceProfileName": { @@ -3740,7 +3740,7 @@ "version": { "target": "com.amazonaws.imagebuilder#VersionNumber", "traits": { - "smithy.api#documentation": "

              The semantic version of the image.

              \n\t\t \n\t\t\t

              The semantic version has four nodes: ../. \n\tYou can assign values for the first three, and can filter on all of them.

              \n\t\t\t

              \n Assignment: For the first three nodes you can assign any positive integer value, including \n\tzero, with an upper limit of 2^30-1, or 1073741823 for each node. Image Builder automatically assigns the \n\tbuild number to the fourth node.

              \n\t\t\t

              \n Patterns: You can use any numeric pattern that adheres to the assignment requirements for \n\tthe nodes that you can assign. For example, you might choose a software version pattern, such as 1.0.0, or \n\ta date, such as 2021.01.01.

              \n\t\t\t

              \n Filtering: With semantic versioning, you have the flexibility to use wildcards (x) \n\tto specify the most recent versions or nodes when selecting the source image or components for your \n\trecipe. When you use a wildcard in any node, all nodes to the right of the first wildcard must also be \n\twildcards.

              \n\t\t
              " + "smithy.api#documentation": "

              The semantic version of the image.

              \n\t\t \n\t\t\t

              The semantic version has four nodes: ../. \n\tYou can assign values for the first three, and can filter on all of them.

              \n\t\t\t

              \n Assignment: For the first three nodes you can assign any positive integer value, including \n\tzero, with an upper limit of 2^30-1, or 1073741823 for each node. Image Builder automatically assigns the \n\tbuild number to the fourth node.

              \n\t\t\t

              \n Patterns: You can use any numeric pattern that adheres to the assignment requirements for \n\tthe nodes that you can assign. For example, you might choose a software version pattern, such as 1.0.0, or \n\ta date, such as 2021.01.01.

              \n\t\t\t

              \n Filtering: With semantic versioning, you have the flexibility to use wildcards (x) \n\tto specify the most recent versions or nodes when selecting the base image or components for your \n\trecipe. When you use a wildcard in any node, all nodes to the right of the first wildcard must also be \n\twildcards.

              \n\t\t
              " } }, "platform": { @@ -4046,7 +4046,7 @@ "parentImage": { "target": "com.amazonaws.imagebuilder#NonEmptyString", "traits": { - "smithy.api#documentation": "

              The parent image of the image recipe.

              " + "smithy.api#documentation": "

              The base image of the image recipe.

              " } }, "blockDeviceMappings": { @@ -4120,7 +4120,7 @@ "parentImage": { "target": "com.amazonaws.imagebuilder#NonEmptyString", "traits": { - "smithy.api#documentation": "

              The parent image of the image recipe.

              " + "smithy.api#documentation": "

              The base image of the image recipe.

              " } }, "dateCreated": { @@ -4366,7 +4366,7 @@ "version": { "target": "com.amazonaws.imagebuilder#VersionNumber", "traits": { - "smithy.api#documentation": "

              Details for a specific version of an Image Builder image. This version follows the semantic version syntax.

              \n\t\t \n\t\t\t

              The semantic version has four nodes: ../. \n\tYou can assign values for the first three, and can filter on all of them.

              \n\t\t\t

              \n Assignment: For the first three nodes you can assign any positive integer value, including \n\tzero, with an upper limit of 2^30-1, or 1073741823 for each node. Image Builder automatically assigns the \n\tbuild number to the fourth node.

              \n\t\t\t

              \n Patterns: You can use any numeric pattern that adheres to the assignment requirements for \n\tthe nodes that you can assign. For example, you might choose a software version pattern, such as 1.0.0, or \n\ta date, such as 2021.01.01.

              \n\t\t\t

              \n Filtering: With semantic versioning, you have the flexibility to use wildcards (x) \n\tto specify the most recent versions or nodes when selecting the source image or components for your \n\trecipe. When you use a wildcard in any node, all nodes to the right of the first wildcard must also be \n\twildcards.

              \n\t\t
              " + "smithy.api#documentation": "

              Details for a specific version of an Image Builder image. This version follows the semantic version syntax.

              \n\t\t \n\t\t\t

              The semantic version has four nodes: ../. \n\tYou can assign values for the first three, and can filter on all of them.

              \n\t\t\t

              \n Assignment: For the first three nodes you can assign any positive integer value, including \n\tzero, with an upper limit of 2^30-1, or 1073741823 for each node. Image Builder automatically assigns the \n\tbuild number to the fourth node.

              \n\t\t\t

              \n Patterns: You can use any numeric pattern that adheres to the assignment requirements for \n\tthe nodes that you can assign. For example, you might choose a software version pattern, such as 1.0.0, or \n\ta date, such as 2021.01.01.

              \n\t\t\t

              \n Filtering: With semantic versioning, you have the flexibility to use wildcards (x) \n\tto specify the most recent versions or nodes when selecting the base image or components for your \n\trecipe. When you use a wildcard in any node, all nodes to the right of the first wildcard must also be \n\twildcards.

              \n\t\t
              " } }, "platform": { @@ -4478,7 +4478,7 @@ "semanticVersion": { "target": "com.amazonaws.imagebuilder#VersionNumber", "traits": { - "smithy.api#documentation": "

              The semantic version of the component. This version follows the semantic version syntax.

              \n\t\t \n\t\t\t

              The semantic version has four nodes: ../. \n\tYou can assign values for the first three, and can filter on all of them.

              \n\t\t\t

              \n Filtering: With semantic versioning, you have the flexibility to use wildcards (x) \n\tto specify the most recent versions or nodes when selecting the source image or components for your \n\trecipe. When you use a wildcard in any node, all nodes to the right of the first wildcard must also be \n\twildcards.

              \n\t\t
              ", + "smithy.api#documentation": "

              The semantic version of the component. This version follows the semantic version syntax.

              \n\t\t \n\t\t\t

              The semantic version has four nodes: ../. \n\tYou can assign values for the first three, and can filter on all of them.

              \n\t\t\t

              \n Filtering: With semantic versioning, you have the flexibility to use wildcards (x) \n\tto specify the most recent versions or nodes when selecting the base image or components for your \n\trecipe. When you use a wildcard in any node, all nodes to the right of the first wildcard must also be \n\twildcards.

              \n\t\t
              ", "smithy.api#required": {} } }, @@ -4794,7 +4794,7 @@ "noDevice": { "target": "com.amazonaws.imagebuilder#EmptyString", "traits": { - "smithy.api#documentation": "

              Use to remove a mapping from the parent image.

              " + "smithy.api#documentation": "

              Use to remove a mapping from the base image.

              " } } }, @@ -4825,7 +4825,7 @@ } }, "traits": { - "smithy.api#documentation": "

              Defines a custom source AMI and block device mapping configurations of an instance \n\t\t\tused for building and testing container images.

              " + "smithy.api#documentation": "

              Defines a custom base AMI and block device mapping configurations of an instance \n\t\t\tused for building and testing container images.

              " } }, "com.amazonaws.imagebuilder#InstanceMetadataOptions": { @@ -5060,7 +5060,7 @@ } ], "traits": { - "smithy.api#documentation": "

              Returns the list of component build versions for the specified semantic version.

              \n\t\t \n\t\t\t

              The semantic version has four nodes: ../. \n\tYou can assign values for the first three, and can filter on all of them.

              \n\t\t\t

              \n Filtering: With semantic versioning, you have the flexibility to use wildcards (x) \n\tto specify the most recent versions or nodes when selecting the source image or components for your \n\trecipe. When you use a wildcard in any node, all nodes to the right of the first wildcard must also be \n\twildcards.

              \n\t\t
              ", + "smithy.api#documentation": "

              Returns the list of component build versions for the specified semantic version.

              \n\t\t \n\t\t\t

              The semantic version has four nodes: ../. \n\tYou can assign values for the first three, and can filter on all of them.

              \n\t\t\t

              \n Filtering: With semantic versioning, you have the flexibility to use wildcards (x) \n\tto specify the most recent versions or nodes when selecting the base image or components for your \n\trecipe. When you use a wildcard in any node, all nodes to the right of the first wildcard must also be \n\twildcards.

              \n\t\t
              ", "smithy.api#http": { "method": "POST", "uri": "/ListComponentBuildVersions", @@ -5153,7 +5153,7 @@ } ], "traits": { - "smithy.api#documentation": "

              Returns the list of component build versions for the specified semantic version.

              \n\t\t \n\t\t\t

              The semantic version has four nodes: ../. \n\tYou can assign values for the first three, and can filter on all of them.

              \n\t\t\t

              \n Filtering: With semantic versioning, you have the flexibility to use wildcards (x) \n\tto specify the most recent versions or nodes when selecting the source image or components for your \n\trecipe. When you use a wildcard in any node, all nodes to the right of the first wildcard must also be \n\twildcards.

              \n\t\t
              ", + "smithy.api#documentation": "

              Returns the list of component build versions for the specified semantic version.

              \n\t\t \n\t\t\t

              The semantic version has four nodes: ../. \n\tYou can assign values for the first three, and can filter on all of them.

              \n\t\t\t

              \n Filtering: With semantic versioning, you have the flexibility to use wildcards (x) \n\tto specify the most recent versions or nodes when selecting the base image or components for your \n\trecipe. When you use a wildcard in any node, all nodes to the right of the first wildcard must also be \n\twildcards.

              \n\t\t
              ", "smithy.api#http": { "method": "POST", "uri": "/ListComponents", @@ -6001,7 +6001,7 @@ "imageVersionList": { "target": "com.amazonaws.imagebuilder#ImageVersionList", "traits": { - "smithy.api#documentation": "

              The list of image semantic versions.

              \n\t\t \n\t\t\t

              The semantic version has four nodes: ../. \n\tYou can assign values for the first three, and can filter on all of them.

              \n\t\t\t

              \n Filtering: With semantic versioning, you have the flexibility to use wildcards (x) \n\tto specify the most recent versions or nodes when selecting the source image or components for your \n\trecipe. When you use a wildcard in any node, all nodes to the right of the first wildcard must also be \n\twildcards.

              \n\t\t
              " + "smithy.api#documentation": "

              The list of image semantic versions.

              \n\t\t \n\t\t\t

              The semantic version has four nodes: ../. \n\tYou can assign values for the first three, and can filter on all of them.

              \n\t\t\t

              \n Filtering: With semantic versioning, you have the flexibility to use wildcards (x) \n\tto specify the most recent versions or nodes when selecting the base image or components for your \n\trecipe. When you use a wildcard in any node, all nodes to the right of the first wildcard must also be \n\twildcards.

              \n\t\t
              " } }, "nextToken": { @@ -6749,7 +6749,7 @@ "pipelineExecutionStartCondition": { "target": "com.amazonaws.imagebuilder#PipelineExecutionStartCondition", "traits": { - "smithy.api#documentation": "

              The condition configures when the pipeline should trigger a new image build. When the\n\t\t\tpipelineExecutionStartCondition is set to\n\t\t\tEXPRESSION_MATCH_AND_DEPENDENCY_UPDATES_AVAILABLE, and you use semantic version\n\t\t\tfilters on the source image or components in your image recipe, EC2 Image Builder will build a\n\t\t\tnew image only when there are new versions of the image or components in your recipe that\n\t\t\tmatch the semantic version filter. When it is set to EXPRESSION_MATCH_ONLY, it\n\t\t\twill build a new image every time the CRON expression matches the current time. For semantic\n\t\t\tversion syntax, see CreateComponent in the EC2 Image Builder API\n\t\t\t\t\tReference.

              " + "smithy.api#documentation": "

              The condition configures when the pipeline should trigger a new image build. When the\n\t\t\tpipelineExecutionStartCondition is set to\n\t\t\tEXPRESSION_MATCH_AND_DEPENDENCY_UPDATES_AVAILABLE, and you use semantic version\n\t\t\tfilters on the base image or components in your image recipe, EC2 Image Builder will build a\n\t\t\tnew image only when there are new versions of the image or components in your recipe that\n\t\t\tmatch the semantic version filter. When it is set to EXPRESSION_MATCH_ONLY, it\n\t\t\twill build a new image every time the CRON expression matches the current time. For semantic\n\t\t\tversion syntax, see CreateComponent in the EC2 Image Builder API\n\t\t\t\t\tReference.

              " } } }, diff --git a/codegen/sdk-codegen/aws-models/lambda.2015-03-31.json b/codegen/sdk-codegen/aws-models/lambda.2015-03-31.json index eac859743b8c1..184b1ce0ee0e7 100644 --- a/codegen/sdk-codegen/aws-models/lambda.2015-03-31.json +++ b/codegen/sdk-codegen/aws-models/lambda.2015-03-31.json @@ -432,7 +432,7 @@ } ], "traits": { - "smithy.api#documentation": "

              Grants an Amazon Web Services service or another account permission to use a function. You can apply the policy at the\n function level, or specify a qualifier to restrict access to a single version or alias. If you use a qualifier,\n the invoker must use the full Amazon Resource Name (ARN) of that version or alias to invoke the function.

              \n \n

              To grant permission to another account, specify the account ID as the Principal. For Amazon Web Services\n services, the principal is a domain-style identifier defined by the service, like s3.amazonaws.com or\n sns.amazonaws.com. For Amazon Web Services services, you can also specify the ARN of the associated resource as the\n SourceArn. If you grant permission to a service principal without specifying the source, other\n accounts could potentially configure resources in their account to invoke your Lambda function.

              \n \n

              This action adds a statement to a resource-based permissions policy for the function. For more information\n about function policies, see Lambda Function Policies.

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

              Grants an Amazon Web Services service or another account permission to use a function. You can apply the policy at the\n function level, or specify a qualifier to restrict access to a single version or alias. If you use a qualifier,\n the invoker must use the full Amazon Resource Name (ARN) of that version or alias to invoke the function.\n Note: Lambda does not support adding policies to version $LATEST.

              \n \n

              To grant permission to another account, specify the account ID as the Principal. For Amazon Web Services\n services, the principal is a domain-style identifier defined by the service, like s3.amazonaws.com or\n sns.amazonaws.com. For Amazon Web Services services, you can also specify the ARN of the associated resource as the\n SourceArn. If you grant permission to a service principal without specifying the source, other\n accounts could potentially configure resources in their account to invoke your Lambda function.

              \n \n

              This action adds a statement to a resource-based permissions policy for the function. For more information\n about function policies, see Lambda Function Policies.

              ", "smithy.api#http": { "method": "POST", "uri": "/2015-03-31/functions/{FunctionName}/policy", @@ -475,7 +475,7 @@ "SourceArn": { "target": "com.amazonaws.lambda#Arn", "traits": { - "smithy.api#documentation": "

              For Amazon Web Services services, the ARN of the Amazon Web Services resource that invokes the function. For example, an Amazon S3 bucket or\n Amazon SNS topic.

              " + "smithy.api#documentation": "

              For Amazon Web Services services, the ARN of the Amazon Web Services resource that invokes the function. For example, an Amazon S3 bucket or\n Amazon SNS topic.

              \n

              Note that Lambda configures the comparison using the StringLike operator.

              " } }, "SourceAccount": { @@ -624,6 +624,33 @@ "smithy.api#documentation": "

              List of signing profiles that can sign a code package.

              " } }, + "com.amazonaws.lambda#Architecture": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "x86_64", + "name": "x86_64" + }, + { + "value": "arm64", + "name": "arm64" + } + ] + } + }, + "com.amazonaws.lambda#ArchitecturesList": { + "type": "list", + "member": { + "target": "com.amazonaws.lambda#Architecture" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1 + } + } + }, "com.amazonaws.lambda#Arn": { "type": "string", "traits": { @@ -807,11 +834,23 @@ } }, "traits": { - "smithy.api#documentation": "

              The code signature failed one or more of the validation checks for signature mismatch or expiry, and the code signing policy \n is set to ENFORCE. Lambda blocks the deployment.

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

              The code signature failed one or more of the validation checks for signature mismatch or expiry, and the code signing policy\n is set to ENFORCE. Lambda blocks the deployment.

              ", "smithy.api#error": "client", "smithy.api#httpError": 400 } }, + "com.amazonaws.lambda#CompatibleArchitectures": { + "type": "list", + "member": { + "target": "com.amazonaws.lambda#Architecture" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 2 + } + } + }, "com.amazonaws.lambda#CompatibleRuntimes": { "type": "list", "member": { @@ -830,7 +869,7 @@ "ReservedConcurrentExecutions": { "target": "com.amazonaws.lambda#ReservedConcurrentExecutions", "traits": { - "smithy.api#documentation": "

              The number of concurrent executions that are reserved for this function. For more information, see Managing Concurrency.

              " + "smithy.api#documentation": "

              The number of concurrent executions that are reserved for this function. For more information, see Managing Concurrency.

              " } } } @@ -995,7 +1034,7 @@ } ], "traits": { - "smithy.api#documentation": "

              Creates a mapping between an event source and an Lambda function. Lambda reads items from the event source\n and triggers the function.

              \n

              For details about each event source type, see the following topics. In particular, each of the topics\n describes the required and optional parameters for the specific event source.

              \n \n

              The following error handling options are only available for stream sources (DynamoDB and Kinesis):

              \n
                \n
              • \n

                \n BisectBatchOnFunctionError - If the function returns an error, split the batch in two and retry.

                \n
              • \n
              • \n

                \n DestinationConfig - Send discarded records to an Amazon SQS queue or Amazon SNS topic.

                \n
              • \n
              • \n

                \n MaximumRecordAgeInSeconds - Discard records older than the specified age. The default value is infinite (-1). When set to infinite (-1), failed records are retried until the record expires

                \n
              • \n
              • \n

                \n MaximumRetryAttempts - Discard records after the specified number of retries. The default value is infinite (-1). When set to infinite (-1), failed records are retried until the record expires.

                \n
              • \n
              • \n

                \n ParallelizationFactor - Process multiple batches from each shard concurrently.

                \n
              • \n
              ", + "smithy.api#documentation": "

              Creates a mapping between an event source and an Lambda function. Lambda reads items from the\n event source and triggers the function.

              \n

              For details about each event source type, see the following topics.

              \n \n \n

              The following error handling options are only available for stream sources (DynamoDB and Kinesis):

              \n
                \n
              • \n

                \n BisectBatchOnFunctionError - If the function returns an error, split the batch in two and retry.

                \n
              • \n
              • \n

                \n DestinationConfig - Send discarded records to an Amazon SQS queue or Amazon SNS topic.

                \n
              • \n
              • \n

                \n MaximumRecordAgeInSeconds - Discard records older than the specified age. The default value is infinite (-1). When set to infinite (-1), failed records are retried until the record expires

                \n
              • \n
              • \n

                \n MaximumRetryAttempts - Discard records after the specified number of retries. The default value is infinite (-1). When set to infinite (-1), failed records are retried until the record expires.

                \n
              • \n
              • \n

                \n ParallelizationFactor - Process multiple batches from each shard concurrently.

                \n
              • \n
              ", "smithy.api#http": { "method": "POST", "uri": "/2015-03-31/event-source-mappings", @@ -1022,19 +1061,19 @@ "Enabled": { "target": "com.amazonaws.lambda#Enabled", "traits": { - "smithy.api#documentation": "

              If true, the event source mapping is active. Set to false to pause polling and invocation.

              " + "smithy.api#documentation": "

              When true, the event source mapping is active. When false, Lambda pauses polling and invocation.

              \n

              Default: True

              " } }, "BatchSize": { "target": "com.amazonaws.lambda#BatchSize", "traits": { - "smithy.api#documentation": "

              The maximum number of items to retrieve in a single batch.

              \n
                \n
              • \n

                \n Amazon Kinesis - Default 100. Max 10,000.

                \n
              • \n
              • \n

                \n Amazon DynamoDB Streams - Default 100. Max 1,000.

                \n
              • \n
              • \n

                \n Amazon Simple Queue Service - Default 10. For standard queues the max is 10,000. For FIFO queues the max is 10.

                \n
              • \n
              • \n

                \n Amazon Managed Streaming for Apache Kafka - Default 100. Max 10,000.

                \n
              • \n
              • \n

                \n Self-Managed Apache Kafka - Default 100. Max 10,000.

                \n
              • \n
              " + "smithy.api#documentation": "

              The maximum number of records in each batch that Lambda pulls from your stream or queue and sends to your function. Lambda passes all of the records in the batch to the function in a single call, up to the payload limit for synchronous invocation\n (6 MB).

              \n
                \n
              • \n

                \n Amazon Kinesis - Default 100. Max 10,000.

                \n
              • \n
              • \n

                \n Amazon DynamoDB Streams - Default 100. Max 1,000.

                \n
              • \n
              • \n

                \n Amazon Simple Queue Service - Default 10. For standard queues the max is 10,000. For FIFO queues the max is 10.

                \n
              • \n
              • \n

                \n Amazon Managed Streaming for Apache Kafka - Default 100. Max 10,000.

                \n
              • \n
              • \n

                \n Self-Managed Apache Kafka - Default 100. Max 10,000.

                \n
              • \n
              " } }, "MaximumBatchingWindowInSeconds": { "target": "com.amazonaws.lambda#MaximumBatchingWindowInSeconds", "traits": { - "smithy.api#documentation": "

              (Streams and SQS standard queues) The maximum amount of time to gather records before invoking the function, in seconds.

              " + "smithy.api#documentation": "

              (Streams and Amazon SQS standard queues) The maximum amount of time, in seconds, that Lambda spends gathering records before invoking the function.

              \n

              Default: 0

              \n

              Related setting: When you set BatchSize to a value greater than 10, you must set MaximumBatchingWindowInSeconds to at least 1.

              " } }, "ParallelizationFactor": { @@ -1046,7 +1085,7 @@ "StartingPosition": { "target": "com.amazonaws.lambda#EventSourcePosition", "traits": { - "smithy.api#documentation": "

              The position in a stream from which to start reading. Required for Amazon Kinesis, Amazon DynamoDB, and Amazon MSK Streams\n sources. AT_TIMESTAMP is only supported for Amazon Kinesis streams.

              " + "smithy.api#documentation": "

              The position in a stream from which to start reading. Required for Amazon Kinesis, Amazon DynamoDB, and Amazon\n MSK Streams sources. AT_TIMESTAMP is only supported for Amazon Kinesis streams.

              " } }, "StartingPositionTimestamp": { @@ -1094,7 +1133,7 @@ "Queues": { "target": "com.amazonaws.lambda#Queues", "traits": { - "smithy.api#documentation": "

              \n (MQ) The name of the Amazon MQ broker destination queue to consume.\n

              " + "smithy.api#documentation": "

              (MQ) The name of the Amazon MQ broker destination queue to consume.

              " } }, "SourceAccessConfigurations": { @@ -1155,7 +1194,7 @@ } ], "traits": { - "smithy.api#documentation": "

              Creates a Lambda function. To create a function, you need a deployment package and an execution role. The\n deployment package is a .zip file archive or container image that contains your function code. The execution role grants the function permission to use Amazon Web Services\n services, such as Amazon CloudWatch Logs for log streaming and X-Ray for request tracing.

              \n \n

              You set the package type to Image if the deployment package is a\n container image. For a container image,\n the code property must include the URI of a container image in the Amazon ECR registry.\n You do not need to specify the handler and runtime properties.

              \n \n

              You set the package type to Zip if the deployment package is a\n .zip file archive.\n For a .zip file archive, the code property specifies the location of the .zip file. You must also specify the handler and\n runtime properties.

              \n \n

              When you create a function, Lambda provisions an instance of the function and its supporting resources. If\n your function connects to a VPC, this process can take a minute or so. During this time, you can't invoke or\n modify the function. The State, StateReason, and StateReasonCode fields in\n the response from GetFunctionConfiguration indicate when the function is ready to invoke. For\n more information, see Function\n States.

              \n \n

              A function has an unpublished version, and can have published versions and aliases. The unpublished version\n changes when you update your function's code and configuration. A published version is a snapshot of your function\n code and configuration that can't be changed. An alias is a named resource that maps to a version, and can be\n changed to map to a different version. Use the Publish parameter to create version 1 of\n your function from its initial configuration.

              \n \n

              The other parameters let you configure version-specific and function-level settings. You can modify\n version-specific settings later with UpdateFunctionConfiguration. Function-level settings apply\n to both the unpublished and published versions of the function, and include tags (TagResource)\n and per-function concurrency limits (PutFunctionConcurrency).

              \n \n

              You can use code signing if your deployment package is a .zip file archive. To enable code signing for this function,\n specify the ARN of a code-signing configuration. When a user\n attempts to deploy a code package with UpdateFunctionCode, Lambda checks that the code\n package has a valid signature from a trusted publisher. The code-signing configuration\n includes set set of signing profiles, which define the trusted publishers for this function.

              \n \n

              If another account or an Amazon Web Services service invokes your function, use AddPermission to grant\n permission by creating a resource-based IAM policy. You can grant permissions at the function level, on a version,\n or on an alias.

              \n \n

              To invoke your function directly, use Invoke. To invoke your function in response to events\n in other Amazon Web Services services, create an event source mapping (CreateEventSourceMapping), or configure a\n function trigger in the other service. For more information, see Invoking Functions.

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

              Creates a Lambda function. To create a function, you need a deployment package and an execution role. The\n deployment package is a .zip file archive or container image that contains your function code. The execution role grants the function permission to use Amazon Web Services\n services, such as Amazon CloudWatch Logs for log streaming and X-Ray for request tracing.

              \n \n

              You set the package type to Image if the deployment package is a\n container image. For a container image,\n the code property must include the URI of a container image in the Amazon ECR registry.\n You do not need to specify the handler and runtime properties.

              \n \n

              You set the package type to Zip if the deployment package is a .zip file\n archive. For a .zip file archive, the code property specifies the location of the\n .zip file. You must also specify the handler and runtime properties. The code in the\n deployment package must be compatible with the target instruction set architecture of the\n function (x86-64 or arm64). If you do not specify the architecture, the default value is\n x86-64.

              \n \n

              When you create a function, Lambda provisions an instance of the function and its supporting resources. If\n your function connects to a VPC, this process can take a minute or so. During this time, you can't invoke or\n modify the function. The State, StateReason, and StateReasonCode fields in\n the response from GetFunctionConfiguration indicate when the function is ready to invoke. For\n more information, see Function\n States.

              \n \n

              A function has an unpublished version, and can have published versions and aliases. The unpublished version\n changes when you update your function's code and configuration. A published version is a snapshot of your function\n code and configuration that can't be changed. An alias is a named resource that maps to a version, and can be\n changed to map to a different version. Use the Publish parameter to create version 1 of\n your function from its initial configuration.

              \n \n

              The other parameters let you configure version-specific and function-level settings. You can modify\n version-specific settings later with UpdateFunctionConfiguration. Function-level settings apply\n to both the unpublished and published versions of the function, and include tags (TagResource)\n and per-function concurrency limits (PutFunctionConcurrency).

              \n \n

              You can use code signing if your deployment package is a .zip file archive. To enable code signing for this function,\n specify the ARN of a code-signing configuration. When a user\n attempts to deploy a code package with UpdateFunctionCode, Lambda checks that the code\n package has a valid signature from a trusted publisher. The code-signing configuration\n includes set set of signing profiles, which define the trusted publishers for this function.

              \n \n

              If another account or an Amazon Web Services service invokes your function, use AddPermission to grant\n permission by creating a resource-based IAM policy. You can grant permissions at the function level, on a version,\n or on an alias.

              \n \n

              To invoke your function directly, use Invoke. To invoke your function in response to events\n in other Amazon Web Services services, create an event source mapping (CreateEventSourceMapping), or configure a\n function trigger in the other service. For more information, see Invoking Functions.

              ", "smithy.api#http": { "method": "POST", "uri": "/2015-03-31/functions", @@ -1288,6 +1327,12 @@ "traits": { "smithy.api#documentation": "

              To enable code signing for this function, specify the ARN of a code-signing configuration. A code-signing configuration\nincludes a set of signing profiles, which define the trusted publishers for this function.

              " } + }, + "Architectures": { + "target": "com.amazonaws.lambda#ArchitecturesList", + "traits": { + "smithy.api#documentation": "

              The instruction set architecture that the function supports. Enter a string array with one of the valid values. \n The default value is x86_64.

              " + } } } }, @@ -1431,7 +1476,7 @@ } ], "traits": { - "smithy.api#documentation": "

              Deletes an event source\n mapping. You can get the identifier of a mapping from the output of ListEventSourceMappings.

              \n

              When you delete an event source mapping, it enters a Deleting state and might not be completely deleted for several seconds.

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

              Deletes an event source\n mapping. You can get the identifier of a mapping from the output of ListEventSourceMappings.

              \n

              When you delete an event source mapping, it enters a Deleting state and might not be completely\n deleted for several seconds.

              ", "smithy.api#http": { "method": "DELETE", "uri": "/2015-03-31/event-source-mappings/{UUID}", @@ -1841,7 +1886,7 @@ } }, "traits": { - "smithy.api#documentation": "

              An error occured when reading from or writing to a connected file system.

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

              An error occurred when reading from or writing to a connected file system.

              ", "smithy.api#error": "client", "smithy.api#httpError": 410 } @@ -2067,13 +2112,13 @@ "BatchSize": { "target": "com.amazonaws.lambda#BatchSize", "traits": { - "smithy.api#documentation": "

              The maximum number of items to retrieve in a single batch.

              " + "smithy.api#documentation": "

              The maximum number of records in each batch that Lambda pulls from your stream or queue and sends to your function. Lambda passes all of the records in the batch to the function in a single call, up to the payload limit for synchronous invocation (6 MB).

              \n

              Default value: Varies by service. For Amazon SQS, the default is 10. For all other services, the default is 100.

              \n

              Related setting: When you set BatchSize to a value greater than 10, you must set MaximumBatchingWindowInSeconds to at least 1.

              " } }, "MaximumBatchingWindowInSeconds": { "target": "com.amazonaws.lambda#MaximumBatchingWindowInSeconds", "traits": { - "smithy.api#documentation": "

              (Streams and Amazon SQS standard queues) The maximum amount of time to gather records before invoking the function, in seconds. The default value is zero.

              " + "smithy.api#documentation": "

              (Streams and Amazon SQS standard queues) The maximum amount of time, in seconds, that Lambda spends gathering records before invoking the function.

              \n

              Default: 0

              \n

              Related setting: When you set BatchSize to a value greater than 10, you must set MaximumBatchingWindowInSeconds to at least 1.

              " } }, "ParallelizationFactor": { @@ -2532,6 +2577,12 @@ "traits": { "smithy.api#documentation": "

              The ARN of the signing job.

              " } + }, + "Architectures": { + "target": "com.amazonaws.lambda#ArchitecturesList", + "traits": { + "smithy.api#documentation": "

              The instruction set architecture that the function supports. Architecture is a string array with one of the \n valid values. The default architecture value is x86_64.

              " + } } }, "traits": { @@ -2803,7 +2854,7 @@ } ], "traits": { - "smithy.api#documentation": "

              Returns details about an event source mapping. You can get the identifier of a mapping from the output of ListEventSourceMappings.

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

              Returns details about an event source mapping. You can get the identifier of a mapping from the output of\n ListEventSourceMappings.

              ", "smithy.api#http": { "method": "GET", "uri": "/2015-03-31/event-source-mappings/{UUID}", @@ -3432,6 +3483,12 @@ "traits": { "smithy.api#documentation": "

              The layer's software license.

              " } + }, + "CompatibleArchitectures": { + "target": "com.amazonaws.lambda#CompatibleArchitectures", + "traits": { + "smithy.api#documentation": "

              A list of compatible \ninstruction set architectures.

              " + } } } }, @@ -3826,7 +3883,7 @@ "LogType": { "target": "com.amazonaws.lambda#LogType", "traits": { - "smithy.api#documentation": "

              Set to Tail to include the execution log in the response.

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

              Set to Tail to include the execution log in the response. Applies to synchronously invoked functions only.

              ", "smithy.api#httpHeader": "X-Amz-Log-Type" } }, @@ -4424,6 +4481,12 @@ "traits": { "smithy.api#documentation": "

              The layer's open-source license.

              " } + }, + "CompatibleArchitectures": { + "target": "com.amazonaws.lambda#CompatibleArchitectures", + "traits": { + "smithy.api#documentation": "

              A list of compatible \n instruction set architectures.

              " + } } }, "traits": { @@ -4696,7 +4759,7 @@ "MaxItems": { "target": "com.amazonaws.lambda#MaxListItems", "traits": { - "smithy.api#documentation": "

              The maximum number of event source mappings to return. Note that ListEventSourceMappings returns\n a maximum of 100 items in each response, even if you set the number higher.

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

              The maximum number of event source mappings to return. Note that ListEventSourceMappings returns a maximum of\n 100 items in each response, even if you set the number higher.

              ", "smithy.api#httpQuery": "MaxItems" } } @@ -4988,7 +5051,7 @@ } ], "traits": { - "smithy.api#documentation": "

              Lists the versions of an Lambda\n layer. Versions that have been deleted aren't listed. Specify a runtime identifier to list only\n versions that indicate that they're compatible with that runtime.

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

              Lists the versions of an Lambda\n layer. Versions that have been deleted aren't listed. Specify a runtime identifier to list only\n versions that indicate that they're compatible with that runtime. Specify a compatible architecture to include only \n layer versions that are compatible with that architecture.

              ", "smithy.api#http": { "method": "GET", "uri": "/2018-10-31/layers/{LayerName}/versions", @@ -5033,6 +5096,13 @@ "smithy.api#documentation": "

              The maximum number of versions to return.

              ", "smithy.api#httpQuery": "MaxItems" } + }, + "CompatibleArchitecture": { + "target": "com.amazonaws.lambda#Architecture", + "traits": { + "smithy.api#documentation": "

              The compatible \ninstruction set architecture.

              ", + "smithy.api#httpQuery": "CompatibleArchitecture" + } } } }, @@ -5073,7 +5143,7 @@ } ], "traits": { - "smithy.api#documentation": "

              Lists Lambda\n layers and shows information about the latest version of each. Specify a runtime identifier to list only layers\n that indicate that they're compatible with that runtime.

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

              Lists Lambda\n layers and shows information about the latest version of each. Specify a\n runtime\n identifier to list only layers that indicate that they're compatible with that\n runtime. Specify a compatible architecture to include only layers that are compatible with\n that instruction set architecture.

              ", "smithy.api#http": { "method": "GET", "uri": "/2018-10-31/layers", @@ -5110,6 +5180,13 @@ "smithy.api#documentation": "

              The maximum number of layers to return.

              ", "smithy.api#httpQuery": "MaxItems" } + }, + "CompatibleArchitecture": { + "target": "com.amazonaws.lambda#Architecture", + "traits": { + "smithy.api#documentation": "

              The compatible \ninstruction set architecture.

              ", + "smithy.api#httpQuery": "CompatibleArchitecture" + } } } }, @@ -5248,7 +5325,7 @@ "Resource": { "target": "com.amazonaws.lambda#FunctionArn", "traits": { - "smithy.api#documentation": "

              The function's Amazon Resource Name (ARN).

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

              The function's Amazon Resource Name (ARN). \n Note: Lambda does not support adding tags to aliases or versions.

              ", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -5792,6 +5869,12 @@ "traits": { "smithy.api#documentation": "

              The layer's software license. It can be any of the following:

              \n
                \n
              • \n

                An SPDX license identifier. For example,\n MIT.

                \n
              • \n
              • \n

                The URL of a license hosted on the internet. For example,\n https://opensource.org/licenses/MIT.

                \n
              • \n
              • \n

                The full text of the license.

                \n
              • \n
              " } + }, + "CompatibleArchitectures": { + "target": "com.amazonaws.lambda#CompatibleArchitectures", + "traits": { + "smithy.api#documentation": "

              A list of compatible \ninstruction set architectures.

              " + } } } }, @@ -5845,6 +5928,12 @@ "traits": { "smithy.api#documentation": "

              The layer's software license.

              " } + }, + "CompatibleArchitectures": { + "target": "com.amazonaws.lambda#CompatibleArchitectures", + "traits": { + "smithy.api#documentation": "

              A list of compatible \ninstruction set architectures.

              " + } } } }, @@ -7395,7 +7484,7 @@ } ], "traits": { - "smithy.api#documentation": "

              Updates an event source mapping. You can change the function that Lambda invokes, or pause invocation and resume later from the same location.

              \n

              The following error handling options are only available for stream sources (DynamoDB and Kinesis):

              \n
                \n
              • \n

                \n BisectBatchOnFunctionError - If the function returns an error, split the batch in two and retry.

                \n
              • \n
              • \n

                \n DestinationConfig - Send discarded records to an Amazon SQS queue or Amazon SNS topic.

                \n
              • \n
              • \n

                \n MaximumRecordAgeInSeconds - Discard records older than the specified age. The default value is infinite (-1). When set to infinite (-1), failed records are retried until the record expires

                \n
              • \n
              • \n

                \n MaximumRetryAttempts - Discard records after the specified number of retries. The default value is infinite (-1). When set to infinite (-1), failed records are retried until the record expires.

                \n
              • \n
              • \n

                \n ParallelizationFactor - Process multiple batches from each shard concurrently.

                \n
              • \n
              ", + "smithy.api#documentation": "

              Updates an event source mapping. You can change the function that Lambda invokes, or pause\n invocation and resume later from the same location.

              \n \n

              The following error handling options are only available for stream sources (DynamoDB and Kinesis):

              \n
                \n
              • \n

                \n BisectBatchOnFunctionError - If the function returns an error, split the batch in two and retry.

                \n
              • \n
              • \n

                \n DestinationConfig - Send discarded records to an Amazon SQS queue or Amazon SNS topic.

                \n
              • \n
              • \n

                \n MaximumRecordAgeInSeconds - Discard records older than the specified age. The default value is infinite (-1). When set to infinite (-1), failed records are retried until the record expires

                \n
              • \n
              • \n

                \n MaximumRetryAttempts - Discard records after the specified number of retries. The default value is infinite (-1). When set to infinite (-1), failed records are retried until the record expires.

                \n
              • \n
              • \n

                \n ParallelizationFactor - Process multiple batches from each shard concurrently.

                \n
              • \n
              ", "smithy.api#http": { "method": "PUT", "uri": "/2015-03-31/event-source-mappings/{UUID}", @@ -7423,19 +7512,19 @@ "Enabled": { "target": "com.amazonaws.lambda#Enabled", "traits": { - "smithy.api#documentation": "

              If true, the event source mapping is active. Set to false to pause polling and invocation.

              " + "smithy.api#documentation": "

              When true, the event source mapping is active. When false, Lambda pauses polling and invocation.

              \n

              Default: True

              " } }, "BatchSize": { "target": "com.amazonaws.lambda#BatchSize", "traits": { - "smithy.api#documentation": "

              The maximum number of items to retrieve in a single batch.

              \n
                \n
              • \n

                \n Amazon Kinesis - Default 100. Max 10,000.

                \n
              • \n
              • \n

                \n Amazon DynamoDB Streams - Default 100. Max 1,000.

                \n
              • \n
              • \n

                \n Amazon Simple Queue Service - Default 10. For standard queues the max is 10,000. For FIFO queues the max is 10.

                \n
              • \n
              • \n

                \n Amazon Managed Streaming for Apache Kafka - Default 100. Max 10,000.

                \n
              • \n
              • \n

                \n Self-Managed Apache Kafka - Default 100. Max 10,000.

                \n
              • \n
              " + "smithy.api#documentation": "

              The maximum number of records in each batch that Lambda pulls from your stream or queue and sends to your function. Lambda passes all of the records in the batch to the function in a single call, up to the payload limit for synchronous invocation\n (6 MB).

              \n
                \n
              • \n

                \n Amazon Kinesis - Default 100. Max 10,000.

                \n
              • \n
              • \n

                \n Amazon DynamoDB Streams - Default 100. Max 1,000.

                \n
              • \n
              • \n

                \n Amazon Simple Queue Service - Default 10. For standard queues the max is 10,000. For FIFO queues the max is 10.

                \n
              • \n
              • \n

                \n Amazon Managed Streaming for Apache Kafka - Default 100. Max 10,000.

                \n
              • \n
              • \n

                \n Self-Managed Apache Kafka - Default 100. Max 10,000.

                \n
              • \n
              " } }, "MaximumBatchingWindowInSeconds": { "target": "com.amazonaws.lambda#MaximumBatchingWindowInSeconds", "traits": { - "smithy.api#documentation": "

              (Streams and SQS standard queues) The maximum amount of time to gather records before invoking the function, in seconds.

              " + "smithy.api#documentation": "

              (Streams and Amazon SQS standard queues) The maximum amount of time, in seconds, that Lambda spends gathering records before invoking the function.

              \n

              Default: 0

              \n

              Related setting: When you set BatchSize to a value greater than 10, you must set MaximumBatchingWindowInSeconds to at least 1.

              " } }, "DestinationConfig": { @@ -7595,6 +7684,12 @@ "traits": { "smithy.api#documentation": "

              Only update the function if the revision ID matches the ID that's specified. Use this option to avoid modifying a\n function that has changed since you last read it.

              " } + }, + "Architectures": { + "target": "com.amazonaws.lambda#ArchitecturesList", + "traits": { + "smithy.api#documentation": "

              The instruction set architecture that the function supports. Enter a string array with one of the valid values. \n The default value is x86_64.

              " + } } } }, @@ -7742,7 +7837,7 @@ "ImageConfig": { "target": "com.amazonaws.lambda#ImageConfig", "traits": { - "smithy.api#documentation": "

              \n Container image configuration\n values that override the values in the container image Dockerfile.

              " + "smithy.api#documentation": "

              \n Container image configuration\n values that override the values in the container image Docker file.

              " } } } diff --git a/codegen/sdk-codegen/aws-models/macie2.2020-01-01.json b/codegen/sdk-codegen/aws-models/macie2.2020-01-01.json index bbf0ee5a2b7a8..b43002bcdb810 100644 --- a/codegen/sdk-codegen/aws-models/macie2.2020-01-01.json +++ b/codegen/sdk-codegen/aws-models/macie2.2020-01-01.json @@ -550,7 +550,7 @@ "kmsManaged": { "target": "com.amazonaws.macie2#__long", "traits": { - "smithy.api#documentation": "

              The total number of buckets that use an Key Management Service (KMS) customer master key (CMK) to encrypt new objects by default. These buckets use Amazon Web Services managed KMS encryption (AWS-KMS) or customer managed KMS encryption (SSE-KMS) by default.

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

              The total number of buckets that use an KMS key to encrypt new objects by default, either an Amazon Web Services managed key or a customer managed key. These buckets use KMS encryption (SSE-KMS) by default.

              ", "smithy.api#jsonName": "kmsManaged" } }, @@ -663,7 +663,7 @@ "eq": { "target": "com.amazonaws.macie2#__listOf__string", "traits": { - "smithy.api#documentation": "

              The value for the property matches (equals) the specified value. If you specify multiple values, Macie uses OR logic to join the values.

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

              The value for the property matches (equals) the specified value. If you specify multiple values, Amazon Macie uses OR logic to join the values.

              ", "smithy.api#jsonName": "eq" } }, @@ -795,6 +795,20 @@ "smithy.api#jsonName": "classifiableSizeInBytes" } }, + "errorCode": { + "target": "com.amazonaws.macie2#BucketMetadataErrorCode", + "traits": { + "smithy.api#documentation": "

              Specifies the error code for an error that prevented Amazon Macie from retrieving and processing information about the bucket and the bucket's objects. If this value is ACCESS_DENIED, Macie doesn't have permission to retrieve the information. For example, the bucket has a restrictive bucket policy and Amazon S3 denied the request. If this value is null, Macie was able to retrieve and process the information.

              ", + "smithy.api#jsonName": "errorCode" + } + }, + "errorMessage": { + "target": "com.amazonaws.macie2#__string", + "traits": { + "smithy.api#documentation": "

              A brief description of the error (errorCode) that prevented Amazon Macie from retrieving and processing information about the bucket and the bucket's objects. This value is null if Macie was able to retrieve and process the information.

              ", + "smithy.api#jsonName": "errorMessage" + } + }, "jobDetails": { "target": "com.amazonaws.macie2#JobDetails", "traits": { @@ -868,7 +882,7 @@ "sizeInBytesCompressed": { "target": "com.amazonaws.macie2#__long", "traits": { - "smithy.api#documentation": "

              The total storage size, in bytes, of the objects that are compressed (.gz, .gzip, .zip) files in the bucket.

              If versioning is enabled for the bucket, Macie calculates this value based on the size of the latest version of each applicable object in the bucket. This value doesn't reflect the storage size of all versions of each applicable object in the bucket.

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

              The total storage size, in bytes, of the objects that are compressed (.gz, .gzip, .zip) files in the bucket.

              If versioning is enabled for the bucket, Amazon Macie calculates this value based on the size of the latest version of each applicable object in the bucket. This value doesn't reflect the storage size of all versions of each applicable object in the bucket.

              ", "smithy.api#jsonName": "sizeInBytesCompressed" } }, @@ -902,7 +916,19 @@ } }, "traits": { - "smithy.api#documentation": "

              Provides information about an S3 bucket that Amazon Macie monitors and analyzes.

              " + "smithy.api#documentation": "

              Provides statistical data and other information about an S3 bucket that Amazon Macie monitors and analyzes for your account. If an error occurs when Macie attempts to retrieve and process information about the bucket or the bucket's objects, the value for most of these properties is null. Exceptions are accountId, bucketArn, bucketCreatedAt, bucketName, lastUpdated, and region. To identify the cause of the error, refer to the errorCode and errorMessage values.

              " + } + }, + "com.amazonaws.macie2#BucketMetadataErrorCode": { + "type": "string", + "traits": { + "smithy.api#documentation": "

              The error code for an error that prevented Amazon Macie from retrieving and processing information about an S3 bucket and the bucket's objects.

              ", + "smithy.api#enum": [ + { + "value": "ACCESS_DENIED", + "name": "ACCESS_DENIED" + } + ] } }, "com.amazonaws.macie2#BucketPermissionConfiguration": { @@ -977,14 +1003,14 @@ "kmsMasterKeyId": { "target": "com.amazonaws.macie2#__string", "traits": { - "smithy.api#documentation": "

              The Amazon Resource Name (ARN) or unique identifier (key ID) for the Key Management Service (KMS) customer master key (CMK) that's used by default to encrypt objects that are added to the bucket. This value is null if the bucket uses an Amazon S3 managed key to encrypt new objects or the bucket doesn't encrypt new objects by default.

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

              The Amazon Resource Name (ARN) or unique identifier (key ID) for the KMS key that's used by default to encrypt objects that are added to the bucket. This value is null if the bucket uses an Amazon S3 managed key to encrypt new objects or the bucket doesn't encrypt new objects by default.

              ", "smithy.api#jsonName": "kmsMasterKeyId" } }, "type": { "target": "com.amazonaws.macie2#Type", "traits": { - "smithy.api#documentation": "

              The type of server-side encryption that's used by default when storing new objects in the bucket. Possible values are:

              • AES256 - New objects are encrypted with an Amazon S3 managed key and use Amazon S3 managed encryption (SSE-S3).

              • aws:kms - New objects are encrypted with an KMS CMK, specified by the kmsMasterKeyId property, and use Amazon Web Services managed KMS encryption (AWS-KMS) or customer managed KMS encryption (SSE-KMS).

              • NONE - New objects aren't encrypted by default. Default encryption is disabled for the bucket.

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

              The type of server-side encryption that's used by default when storing new objects in the bucket. Possible values are:

              • AES256 - New objects are encrypted with an Amazon S3 managed key. They use SSE-S3 encryption.

              • aws:kms - New objects are encrypted with an KMS key (kmsMasterKeyId), either an Amazon Web Services managed key or a customer managed key. They use SSE-KMS encryption.

              • NONE - New objects aren't encrypted by default. Default encryption is disabled for the bucket.

              ", "smithy.api#jsonName": "type" } } @@ -3841,14 +3867,14 @@ "sizeInBytes": { "target": "com.amazonaws.macie2#__long", "traits": { - "smithy.api#documentation": "

              The total storage size, in bytes, of the buckets.

              If versioning is enabled for any of the buckets, Macie calculates this value based on the size of the latest version of each object in those buckets. This value doesn't reflect the storage size of all versions of the objects in the buckets.

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

              The total storage size, in bytes, of the buckets.

              If versioning is enabled for any of the buckets, Amazon Macie calculates this value based on the size of the latest version of each object in those buckets. This value doesn't reflect the storage size of all versions of the objects in the buckets.

              ", "smithy.api#jsonName": "sizeInBytes" } }, "sizeInBytesCompressed": { "target": "com.amazonaws.macie2#__long", "traits": { - "smithy.api#documentation": "

              The total storage size, in bytes, of the objects that are compressed (.gz, .gzip, .zip) files in the buckets.

              If versioning is enabled for any of the buckets, Macie calculates this value based on the size of the latest version of each applicable object in those buckets. This value doesn't reflect the storage size of all versions of the applicable objects in the buckets.

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

              The total storage size, in bytes, of the objects that are compressed (.gz, .gzip, .zip) files in the buckets.

              If versioning is enabled for any of the buckets, Amazon Macie calculates this value based on the size of the latest version of each applicable object in those buckets. This value doesn't reflect the storage size of all versions of the applicable objects in the buckets.

              ", "smithy.api#jsonName": "sizeInBytesCompressed" } }, @@ -6639,6 +6665,20 @@ "smithy.api#jsonName": "classifiableSizeInBytes" } }, + "errorCode": { + "target": "com.amazonaws.macie2#BucketMetadataErrorCode", + "traits": { + "smithy.api#documentation": "

              Specifies the error code for an error that prevented Amazon Macie from retrieving and processing information about the bucket and the bucket's objects. If this value is ACCESS_DENIED, Macie doesn't have permission to retrieve the information. For example, the bucket has a restrictive bucket policy and Amazon S3 denied the request. If this value is null, Macie was able to retrieve and process the information.

              ", + "smithy.api#jsonName": "errorCode" + } + }, + "errorMessage": { + "target": "com.amazonaws.macie2#__string", + "traits": { + "smithy.api#documentation": "

              A brief description of the error (errorCode) that prevented Amazon Macie from retrieving and processing information about the bucket and the bucket's objects. This value is null if Macie was able to retrieve and process the information.

              ", + "smithy.api#jsonName": "errorMessage" + } + }, "jobDetails": { "target": "com.amazonaws.macie2#JobDetails", "traits": { @@ -6670,7 +6710,7 @@ "sizeInBytesCompressed": { "target": "com.amazonaws.macie2#__long", "traits": { - "smithy.api#documentation": "

              The total storage size, in bytes, of the objects that are compressed (.gz, .gzip, .zip) files in the bucket.

              If versioning is enabled for the bucket, Macie calculates this value based on the size of the latest version of each applicable object in the bucket. This value doesn't reflect the storage size of all versions of each applicable object in the bucket.

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

              The total storage size, in bytes, of the objects that are compressed (.gz, .gzip, .zip) files in the bucket.

              If versioning is enabled for the bucket, Amazon Macie calculates this value based on the size of the latest version of each applicable object in the bucket. This value doesn't reflect the storage size of all versions of each applicable object in the bucket.

              ", "smithy.api#jsonName": "sizeInBytesCompressed" } }, @@ -6690,7 +6730,7 @@ } }, "traits": { - "smithy.api#documentation": "

              Provides statistical data and other information about an S3 bucket that Amazon Macie monitors and analyzes.

              " + "smithy.api#documentation": "

              Provides statistical data and other information about an S3 bucket that Amazon Macie monitors and analyzes for your account. If an error occurs when Macie attempts to retrieve and process information about the bucket or the bucket's objects, the value for most of these properties is null. Exceptions are accountId and bucketName. To identify the cause of the error, refer to the errorCode and errorMessage values.

              " } }, "com.amazonaws.macie2#MatchingResource": { @@ -6705,7 +6745,7 @@ } }, "traits": { - "smithy.api#documentation": "

              Provides statistical data and other information about an Amazon Web Services resource that Amazon Macie monitors and analyzes.

              " + "smithy.api#documentation": "

              Provides statistical data and other information about an Amazon Web Services resource that Amazon Macie monitors and analyzes for your account.

              " } }, "com.amazonaws.macie2#MaxResults": { @@ -6809,14 +6849,14 @@ "customerManaged": { "target": "com.amazonaws.macie2#__long", "traits": { - "smithy.api#documentation": "

              The total number of objects that are encrypted with a customer-managed key. The objects use customer-provided server-side encryption (SSE-C).

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

              The total number of objects that are encrypted with a customer-provided key. The objects use customer-provided server-side encryption (SSE-C).

              ", "smithy.api#jsonName": "customerManaged" } }, "kmsManaged": { "target": "com.amazonaws.macie2#__long", "traits": { - "smithy.api#documentation": "

              The total number of objects that are encrypted with an Key Management Service (KMS) customer master key (CMK). The objects use Amazon Web Services managed KMS encryption (AWS-KMS) or customer managed KMS encryption (SSE-KMS).

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

              The total number of objects that are encrypted with an KMS key, either an Amazon Web Services managed key or a customer managed key. The objects use KMS encryption (SSE-KMS).

              ", "smithy.api#jsonName": "kmsManaged" } }, @@ -6872,7 +6912,7 @@ } }, "traits": { - "smithy.api#documentation": "

              Provides information about the total storage size (in bytes) or number of objects that Amazon Macie can't analyze in one or more S3 buckets. In a BucketMetadata or MatchingBucket object, this data is for a specific bucket. In a GetBucketStatisticsResponse object, this data is aggregated for all the buckets in the query results. If versioning is enabled for a bucket, total storage size values are based on the size of the latest version of each applicable object in the bucket.

              " + "smithy.api#documentation": "

              Provides information about the total storage size (in bytes) or number of objects that Amazon Macie can't analyze in one or more S3 buckets. In a BucketMetadata or MatchingBucket object, this data is for a specific bucket. In a GetBucketStatisticsResponse object, this data is aggregated for the buckets in the query results. If versioning is enabled for a bucket, total storage size values are based on the size of the latest version of each applicable object in the bucket.

              " } }, "com.amazonaws.macie2#Occurrences": { @@ -7454,7 +7494,7 @@ "kmsKeyArn": { "target": "com.amazonaws.macie2#__string", "traits": { - "smithy.api#documentation": "

              The Amazon Resource Name (ARN) of the Key Management Service (KMS) customer master key (CMK) to use for encryption of the results. This must be the ARN of an existing CMK that's in the same Amazon Web Services Region as the bucket.

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

              The Amazon Resource Name (ARN) of the KMS key to use for encryption of the results. This must be the ARN of an existing, symmetric, customer managed KMS key that's in the same Amazon Web Services Region as the bucket.

              ", "smithy.api#jsonName": "kmsKeyArn", "smithy.api#required": {} } @@ -8046,7 +8086,7 @@ "kmsMasterKeyId": { "target": "com.amazonaws.macie2#__string", "traits": { - "smithy.api#documentation": "

              The Amazon Resource Name (ARN) or unique identifier (key ID) for the Key Management Service (KMS) customer master key (CMK) that's used to encrypt data in the bucket or the object. If an KMS CMK isn't used, this value is null.

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

              The Amazon Resource Name (ARN) or unique identifier (key ID) for the KMS key that's used to encrypt data in the bucket or the object. This value is null if an KMS key isn't used to encrypt the data.

              ", "smithy.api#jsonName": "kmsMasterKeyId" } } diff --git a/codegen/sdk-codegen/aws-models/network-firewall.2020-11-12.json b/codegen/sdk-codegen/aws-models/network-firewall.2020-11-12.json index eeb6f0eec2ca6..45cb0d738aa3e 100644 --- a/codegen/sdk-codegen/aws-models/network-firewall.2020-11-12.json +++ b/codegen/sdk-codegen/aws-models/network-firewall.2020-11-12.json @@ -75,7 +75,7 @@ "min": 1, "max": 255 }, - "smithy.api#pattern": "^([a-fA-F\\d:\\.]+/\\d{1,3})$" + "smithy.api#pattern": "^([a-fA-F\\d:\\.]+($|/\\d{1,3}))$" } }, "com.amazonaws.networkfirewall#Addresses": { @@ -128,13 +128,13 @@ "FirewallArn": { "target": "com.amazonaws.networkfirewall#ResourceArn", "traits": { - "smithy.api#documentation": "

              The Amazon Resource Name (ARN) of the firewall.

              \n

              You must specify the ARN or the name, and you can specify both.

              " + "smithy.api#documentation": "

              The Amazon Resource Name (ARN) of the firewall.

              \n

              You must specify the ARN or the name, and you can specify both.

              " } }, "FirewallName": { "target": "com.amazonaws.networkfirewall#ResourceName", "traits": { - "smithy.api#documentation": "

              The descriptive name of the firewall. You can't change the name of a firewall after you create it.

              \n

              You must specify the ARN or the name, and you can specify both.

              " + "smithy.api#documentation": "

              The descriptive name of the firewall. You can't change the name of a firewall after you create it.

              \n

              You must specify the ARN or the name, and you can specify both.

              " } }, "FirewallPolicyArn": { @@ -222,13 +222,13 @@ "FirewallArn": { "target": "com.amazonaws.networkfirewall#ResourceArn", "traits": { - "smithy.api#documentation": "

              The Amazon Resource Name (ARN) of the firewall.

              \n

              You must specify the ARN or the name, and you can specify both.

              " + "smithy.api#documentation": "

              The Amazon Resource Name (ARN) of the firewall.

              \n

              You must specify the ARN or the name, and you can specify both.

              " } }, "FirewallName": { "target": "com.amazonaws.networkfirewall#ResourceName", "traits": { - "smithy.api#documentation": "

              The descriptive name of the firewall. You can't change the name of a firewall after you create it.

              \n

              You must specify the ARN or the name, and you can specify both.

              " + "smithy.api#documentation": "

              The descriptive name of the firewall. You can't change the name of a firewall after you create it.

              \n

              You must specify the ARN or the name, and you can specify both.

              " } }, "SubnetMappings": { @@ -716,7 +716,7 @@ } ], "traits": { - "smithy.api#documentation": "

              Deletes the specified Firewall and its FirewallStatus. This operation requires the firewall's DeleteProtection flag to be\n FALSE. You can't revert this operation.

              \n

              You can check whether a firewall is\n in use by reviewing the route tables for the Availability Zones where you have \n firewall subnet mappings. Retrieve the subnet mappings by calling DescribeFirewall.\n You define and update the route tables through Amazon VPC. As needed, update the route tables for the \n zones to remove the firewall endpoints. When the route tables no longer use the firewall endpoints, \n you can remove the firewall safely.

              \n

              To delete a firewall, remove the delete protection if you need to using UpdateFirewallDeleteProtection,\n then delete the firewall by calling DeleteFirewall.

              " + "smithy.api#documentation": "

              Deletes the specified Firewall and its FirewallStatus. \n This operation requires the firewall's DeleteProtection flag to be\n FALSE. You can't revert this operation.

              \n

              You can check whether a firewall is\n in use by reviewing the route tables for the Availability Zones where you have \n firewall subnet mappings. Retrieve the subnet mappings by calling DescribeFirewall.\n You define and update the route tables through Amazon VPC. As needed, update the route tables for the \n zones to remove the firewall endpoints. When the route tables no longer use the firewall endpoints, \n you can remove the firewall safely.

              \n

              To delete a firewall, remove the delete protection if you need to using UpdateFirewallDeleteProtection,\n then delete the firewall by calling DeleteFirewall.

              " } }, "com.amazonaws.networkfirewall#DeleteFirewallPolicy": { @@ -786,13 +786,13 @@ "FirewallName": { "target": "com.amazonaws.networkfirewall#ResourceName", "traits": { - "smithy.api#documentation": "

              The descriptive name of the firewall. You can't change the name of a firewall after you create it.

              \n

              You must specify the ARN or the name, and you can specify both.

              " + "smithy.api#documentation": "

              The descriptive name of the firewall. You can't change the name of a firewall after you create it.

              \n

              You must specify the ARN or the name, and you can specify both.

              " } }, "FirewallArn": { "target": "com.amazonaws.networkfirewall#ResourceArn", "traits": { - "smithy.api#documentation": "

              The Amazon Resource Name (ARN) of the firewall.

              \n

              You must specify the ARN or the name, and you can specify both.

              " + "smithy.api#documentation": "

              The Amazon Resource Name (ARN) of the firewall.

              \n

              You must specify the ARN or the name, and you can specify both.

              " } } } @@ -823,6 +823,9 @@ { "target": "com.amazonaws.networkfirewall#InvalidRequestException" }, + { + "target": "com.amazonaws.networkfirewall#InvalidResourcePolicyException" + }, { "target": "com.amazonaws.networkfirewall#ResourceNotFoundException" }, @@ -975,13 +978,13 @@ "FirewallPolicyName": { "target": "com.amazonaws.networkfirewall#ResourceName", "traits": { - "smithy.api#documentation": "

              The descriptive name of the firewall policy. You can't change the name of a firewall policy after you create it.

              \n

              You must specify the ARN or the name, and you can specify both.

              " + "smithy.api#documentation": "

              The descriptive name of the firewall policy. You can't change the name of a firewall policy after you create it.

              \n

              You must specify the ARN or the name, and you can specify both.

              " } }, "FirewallPolicyArn": { "target": "com.amazonaws.networkfirewall#ResourceArn", "traits": { - "smithy.api#documentation": "

              The Amazon Resource Name (ARN) of the firewall policy.

              \n

              You must specify the ARN or the name, and you can specify both.

              " + "smithy.api#documentation": "

              The Amazon Resource Name (ARN) of the firewall policy.

              \n

              You must specify the ARN or the name, and you can specify both.

              " } } } @@ -1017,13 +1020,13 @@ "FirewallName": { "target": "com.amazonaws.networkfirewall#ResourceName", "traits": { - "smithy.api#documentation": "

              The descriptive name of the firewall. You can't change the name of a firewall after you create it.

              \n

              You must specify the ARN or the name, and you can specify both.

              " + "smithy.api#documentation": "

              The descriptive name of the firewall. You can't change the name of a firewall after you create it.

              \n

              You must specify the ARN or the name, and you can specify both.

              " } }, "FirewallArn": { "target": "com.amazonaws.networkfirewall#ResourceArn", "traits": { - "smithy.api#documentation": "

              The Amazon Resource Name (ARN) of the firewall.

              \n

              You must specify the ARN or the name, and you can specify both.

              " + "smithy.api#documentation": "

              The Amazon Resource Name (ARN) of the firewall.

              \n

              You must specify the ARN or the name, and you can specify both.

              " } } } @@ -1083,13 +1086,13 @@ "FirewallArn": { "target": "com.amazonaws.networkfirewall#ResourceArn", "traits": { - "smithy.api#documentation": "

              The Amazon Resource Name (ARN) of the firewall.

              \n

              You must specify the ARN or the name, and you can specify both.

              " + "smithy.api#documentation": "

              The Amazon Resource Name (ARN) of the firewall.

              \n

              You must specify the ARN or the name, and you can specify both.

              " } }, "FirewallName": { "target": "com.amazonaws.networkfirewall#ResourceName", "traits": { - "smithy.api#documentation": "

              The descriptive name of the firewall. You can't change the name of a firewall after you create it.

              \n

              You must specify the ARN or the name, and you can specify both.

              " + "smithy.api#documentation": "

              The descriptive name of the firewall. You can't change the name of a firewall after you create it.

              \n

              You must specify the ARN or the name, and you can specify both.

              " } } } @@ -1189,19 +1192,19 @@ "RuleGroupName": { "target": "com.amazonaws.networkfirewall#ResourceName", "traits": { - "smithy.api#documentation": "

              The descriptive name of the rule group. You can't change the name of a rule group after you create it.

              \n

              You must specify the ARN or the name, and you can specify both.

              " + "smithy.api#documentation": "

              The descriptive name of the rule group. You can't change the name of a rule group after you create it.

              \n

              You must specify the ARN or the name, and you can specify both.

              " } }, "RuleGroupArn": { "target": "com.amazonaws.networkfirewall#ResourceArn", "traits": { - "smithy.api#documentation": "

              The Amazon Resource Name (ARN) of the rule group.

              \n

              You must specify the ARN or the name, and you can specify both.

              " + "smithy.api#documentation": "

              The Amazon Resource Name (ARN) of the rule group.

              \n

              You must specify the ARN or the name, and you can specify both.

              " } }, "Type": { "target": "com.amazonaws.networkfirewall#RuleGroupType", "traits": { - "smithy.api#documentation": "

              Indicates whether the rule group is stateless or stateful. If the rule group is stateless, it contains \nstateless rules. If it is stateful, it contains stateful rules.

              \n \n

              This setting is required for requests that do not include the RuleGroupARN.

              \n
              " + "smithy.api#documentation": "

              Indicates whether the rule group is stateless or stateful. If the rule group is stateless, it contains \nstateless rules. If it is stateful, it contains stateful rules.

              \n \n

              This setting is required for requests that do not include the RuleGroupARN.

              \n
              " } } } @@ -1332,13 +1335,13 @@ "FirewallArn": { "target": "com.amazonaws.networkfirewall#ResourceArn", "traits": { - "smithy.api#documentation": "

              The Amazon Resource Name (ARN) of the firewall.

              \n

              You must specify the ARN or the name, and you can specify both.

              " + "smithy.api#documentation": "

              The Amazon Resource Name (ARN) of the firewall.

              \n

              You must specify the ARN or the name, and you can specify both.

              " } }, "FirewallName": { "target": "com.amazonaws.networkfirewall#ResourceName", "traits": { - "smithy.api#documentation": "

              The descriptive name of the firewall. You can't change the name of a firewall after you create it.

              \n

              You must specify the ARN or the name, and you can specify both.

              " + "smithy.api#documentation": "

              The descriptive name of the firewall. You can't change the name of a firewall after you create it.

              \n

              You must specify the ARN or the name, and you can specify both.

              " } }, "SubnetIds": { @@ -1521,7 +1524,19 @@ "StatefulRuleGroupReferences": { "target": "com.amazonaws.networkfirewall#StatefulRuleGroupReferences", "traits": { - "smithy.api#documentation": "

              References to the stateless rule groups that are used in the policy. These define the\n inspection criteria in stateful rules.

              " + "smithy.api#documentation": "

              References to the stateful rule groups that are used in the policy. These define the\n inspection criteria in stateful rules.

              " + } + }, + "StatefulDefaultActions": { + "target": "com.amazonaws.networkfirewall#StatefulActions", + "traits": { + "smithy.api#documentation": "

              The default actions to take on a packet that doesn't match any stateful rules.

              " + } + }, + "StatefulEngineOptions": { + "target": "com.amazonaws.networkfirewall#StatefulEngineOptions", + "traits": { + "smithy.api#documentation": "

              Additional options governing how Network Firewall handles stateful rules. The stateful \n rule groups that you use in your policy must have stateful rule options settings that are compatible with these settings.

              " } } }, @@ -1590,6 +1605,24 @@ "traits": { "smithy.api#documentation": "

              The key:value pairs to associate with the resource.

              " } + }, + "ConsumedStatelessRuleCapacity": { + "target": "com.amazonaws.networkfirewall#RuleCapacity", + "traits": { + "smithy.api#documentation": "

              The number of capacity units currently consumed by the policy's stateless rules.

              " + } + }, + "ConsumedStatefulRuleCapacity": { + "target": "com.amazonaws.networkfirewall#RuleCapacity", + "traits": { + "smithy.api#documentation": "

              The number of capacity units currently consumed by the policy's stateful rules.

              " + } + }, + "NumberOfAssociations": { + "target": "com.amazonaws.networkfirewall#NumberOfAssociations", + "traits": { + "smithy.api#documentation": "

              The number of firewalls that are associated with this firewall policy.

              " + } } }, "traits": { @@ -1687,7 +1720,7 @@ "min": 1, "max": 1024 }, - "smithy.api#pattern": "[\\s\\S]*$" + "smithy.api#pattern": "^[\\s\\S]*$" } }, "com.amazonaws.networkfirewall#Header": { @@ -1710,7 +1743,7 @@ "SourcePort": { "target": "com.amazonaws.networkfirewall#Port", "traits": { - "smithy.api#documentation": "

              The source port to inspect for. You can specify an individual port, for \n example 1994 and you can specify a port\n range, for example 1990-1994.\n To match with any port, specify ANY.

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

              The source port to inspect for. You can specify an individual port, for \n example 1994 and you can specify a port\n range, for example 1990:1994.\n To match with any port, specify ANY.

              ", "smithy.api#required": {} } }, @@ -1731,13 +1764,13 @@ "DestinationPort": { "target": "com.amazonaws.networkfirewall#Port", "traits": { - "smithy.api#documentation": "

              The destination port to inspect for. You can specify an individual port, for \n example 1994 and you can specify\n a port range, for example 1990-1994.\n To match with any port, specify ANY.

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

              The destination port to inspect for. You can specify an individual port, for \n example 1994 and you can specify\n a port range, for example 1990:1994.\n To match with any port, specify ANY.

              ", "smithy.api#required": {} } } }, "traits": { - "smithy.api#documentation": "

              The 5-tuple criteria for AWS Network Firewall to use to inspect packet headers in stateful\n traffic flow inspection. Traffic flows that match the criteria are a match for the\n corresponding StatefulRule.

              " + "smithy.api#documentation": "

              The basic rule criteria for AWS Network Firewall to use to inspect packet headers in stateful\n traffic flow inspection. Traffic flows that match the criteria are a match for the\n corresponding StatefulRule.

              " } }, "com.amazonaws.networkfirewall#IPSet": { @@ -1820,7 +1853,7 @@ } }, "traits": { - "smithy.api#documentation": "

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

              The policy statement failed validation.

              ", "smithy.api#error": "client" } }, @@ -2193,7 +2226,7 @@ "min": 2, "max": 30 }, - "smithy.api#pattern": "[0-9A-Za-z]+" + "smithy.api#pattern": "^[0-9A-Za-z]+$" } }, "com.amazonaws.networkfirewall#LogType": { @@ -2244,13 +2277,13 @@ "SourcePorts": { "target": "com.amazonaws.networkfirewall#PortRanges", "traits": { - "smithy.api#documentation": "

              The source ports to inspect for. If not specified, this matches with any source port.\n This setting is only used for protocols 6 (TCP) and 17 (UDP).

              \n

              You can specify individual ports, for example 1994 and you can specify port\n ranges, for example 1990-1994.

              " + "smithy.api#documentation": "

              The source ports to inspect for. If not specified, this matches with any source port.\n This setting is only used for protocols 6 (TCP) and 17 (UDP).

              \n

              You can specify individual ports, for example 1994 and you can specify port\n ranges, for example 1990:1994.

              " } }, "DestinationPorts": { "target": "com.amazonaws.networkfirewall#PortRanges", "traits": { - "smithy.api#documentation": "

              The destination ports to inspect for. If not specified, this matches with any\n destination port. This setting is only used for protocols 6 (TCP) and 17 (UDP).

              \n

              You can specify individual ports, for example 1994 and you can specify port\n ranges, for example 1990-1994.

              " + "smithy.api#documentation": "

              The destination ports to inspect for. If not specified, this matches with any\n destination port. This setting is only used for protocols 6 (TCP) and 17 (UDP).

              \n

              You can specify individual ports, for example 1994 and you can specify port\n ranges, for example 1990:1994.

              " } }, "Protocols": { @@ -2374,10 +2407,16 @@ "name": "network-firewall" }, "aws.protocols#awsJson1_0": {}, - "smithy.api#documentation": "

              This is the API Reference for AWS Network Firewall. This guide is for developers who need\n detailed information about the Network Firewall API actions, data types, and errors.

              \n
                \n
              • \n

                The REST API requires you to handle connection details, such as calculating\n signatures, handling request retries, and error handling. For general information\n about using the AWS REST APIs, see AWS APIs.

                \n

                To access Network Firewall using the REST API endpoint:\n https://network-firewall..amazonaws.com \n

                \n
              • \n
              • \n

                Alternatively, you can use one of the AWS SDKs to access an API that's tailored to\n the programming language or platform that you're using. For more information, see\n AWS SDKs.

                \n
              • \n
              • \n

                For descriptions of Network Firewall features, including and step-by-step\n instructions on how to use them through the Network Firewall console, see the Network Firewall Developer\n Guide.

                \n
              • \n
              \n

              Network Firewall is a stateful, managed, network firewall and intrusion detection and\n prevention service for Amazon Virtual Private Cloud (Amazon VPC). With Network Firewall, you can filter traffic at the\n perimeter of your VPC. This includes filtering traffic going to and coming from an internet\n gateway, NAT gateway, or over VPN or AWS Direct Connect. Network Firewall uses rules that are compatible\n with Suricata, a free, open source intrusion detection system (IDS) engine. For information about Suricata, \n see the Suricata website.

              \n

              You can use Network Firewall to monitor and protect your VPC traffic in a number of ways.\n The following are just a few examples:

              \n
                \n
              • \n

                Allow domains or IP addresses for known AWS service endpoints, such as Amazon S3, and\n block all other forms of traffic.

                \n
              • \n
              • \n

                Use custom lists of known bad domains to limit the types of domain names that your\n applications can access.

                \n
              • \n
              • \n

                Perform deep packet inspection on traffic entering or leaving your VPC.

                \n
              • \n
              • \n

                Use stateful protocol detection to filter protocols like HTTPS, regardless of the\n port used.

                \n
              • \n
              \n

              To enable Network Firewall for your VPCs, you perform steps in both Amazon VPC and in\n Network Firewall. For information about using Amazon VPC, see Amazon VPC User Guide.

              \n

              To start using Network Firewall, do the following:

              \n
                \n
              1. \n

                (Optional) If you don't already have a VPC that you want to protect, create it in\n Amazon VPC.

                \n
              2. \n
              3. \n

                In Amazon VPC, in each Availability Zone where you want to have a firewall endpoint, create a\n subnet for the sole use of Network Firewall.

                \n
              4. \n
              5. \n

                In Network Firewall, create stateless and stateful rule groups, \n to define the components of the network traffic filtering behavior that you want your firewall to have.

                \n
              6. \n
              7. \n

                In Network Firewall, create a firewall policy that uses your rule groups and\n specifies additional default traffic filtering behavior.

                \n
              8. \n
              9. \n

                In Network Firewall, create a firewall and specify your new firewall policy and \n VPC subnets. Network Firewall creates a firewall endpoint in each subnet that you\n specify, with the behavior that's defined in the firewall policy.

                \n
              10. \n
              11. \n

                In Amazon VPC, use ingress routing enhancements to route traffic through the new firewall\n endpoints.

                \n
              12. \n
              ", + "smithy.api#documentation": "

              This is the API Reference for AWS Network Firewall. This guide is for developers who need\n detailed information about the Network Firewall API actions, data types, and errors.

              \n
                \n
              • \n

                The REST API requires you to handle connection details, such as calculating\n signatures, handling request retries, and error handling. For general information\n about using the AWS REST APIs, see AWS APIs.

                \n

                To access Network Firewall using the REST API endpoint:\n https://network-firewall..amazonaws.com \n

                \n
              • \n
              • \n

                Alternatively, you can use one of the AWS SDKs to access an API that's tailored to\n the programming language or platform that you're using. For more information, see\n AWS SDKs.

                \n
              • \n
              • \n

                For descriptions of Network Firewall features, including and step-by-step\n instructions on how to use them through the Network Firewall console, see the Network Firewall Developer\n Guide.

                \n
              • \n
              \n

              Network Firewall is a stateful, managed, network firewall and intrusion detection and\n prevention service for Amazon Virtual Private Cloud (Amazon VPC). With Network Firewall, you can filter traffic at the\n perimeter of your VPC. This includes filtering traffic going to and coming from an internet\n gateway, NAT gateway, or over VPN or AWS Direct Connect. Network Firewall uses rules that are compatible\n with Suricata, a free, open source intrusion detection system (IDS) engine. \n AWS Network Firewall supports Suricata version 5.0.2. For information about Suricata, \n see the Suricata website.

              \n

              You can use Network Firewall to monitor and protect your VPC traffic in a number of ways.\n The following are just a few examples:

              \n
                \n
              • \n

                Allow domains or IP addresses for known AWS service endpoints, such as Amazon S3, and\n block all other forms of traffic.

                \n
              • \n
              • \n

                Use custom lists of known bad domains to limit the types of domain names that your\n applications can access.

                \n
              • \n
              • \n

                Perform deep packet inspection on traffic entering or leaving your VPC.

                \n
              • \n
              • \n

                Use stateful protocol detection to filter protocols like HTTPS, regardless of the\n port used.

                \n
              • \n
              \n

              To enable Network Firewall for your VPCs, you perform steps in both Amazon VPC and in\n Network Firewall. For information about using Amazon VPC, see Amazon VPC User Guide.

              \n

              To start using Network Firewall, do the following:

              \n
                \n
              1. \n

                (Optional) If you don't already have a VPC that you want to protect, create it in\n Amazon VPC.

                \n
              2. \n
              3. \n

                In Amazon VPC, in each Availability Zone where you want to have a firewall endpoint, create a\n subnet for the sole use of Network Firewall.

                \n
              4. \n
              5. \n

                In Network Firewall, create stateless and stateful rule groups, \n to define the components of the network traffic filtering behavior that you want your firewall to have.

                \n
              6. \n
              7. \n

                In Network Firewall, create a firewall policy that uses your rule groups and\n specifies additional default traffic filtering behavior.

                \n
              8. \n
              9. \n

                In Network Firewall, create a firewall and specify your new firewall policy and \n VPC subnets. Network Firewall creates a firewall endpoint in each subnet that you\n specify, with the behavior that's defined in the firewall policy.

                \n
              10. \n
              11. \n

                In Amazon VPC, use ingress routing enhancements to route traffic through the new firewall\n endpoints.

                \n
              12. \n
              ", "smithy.api#title": "AWS Network Firewall" } }, + "com.amazonaws.networkfirewall#NumberOfAssociations": { + "type": "integer", + "traits": { + "smithy.api#box": {} + } + }, "com.amazonaws.networkfirewall#PaginationMaxResults": { "type": "integer", "traits": { @@ -2395,7 +2434,7 @@ "min": 1, "max": 2048 }, - "smithy.api#pattern": "[0-9A-Za-z:\\/+=]+$" + "smithy.api#pattern": "^[0-9A-Za-z:\\/+=]+$" } }, "com.amazonaws.networkfirewall#PerObjectStatus": { @@ -2440,7 +2479,7 @@ "min": 1, "max": 395000 }, - "smithy.api#pattern": ".*\\S.*" + "smithy.api#pattern": "\\S" } }, "com.amazonaws.networkfirewall#Port": { @@ -2611,7 +2650,7 @@ "min": 1, "max": 256 }, - "smithy.api#pattern": "^arn:aws.*" + "smithy.api#pattern": "^arn:aws" } }, "com.amazonaws.networkfirewall#ResourceId": { @@ -2654,7 +2693,7 @@ } }, "traits": { - "smithy.api#documentation": "

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

              Unable to change the resource because your account doesn't own it.

              ", "smithy.api#error": "client" } }, @@ -2716,6 +2755,12 @@ "smithy.api#documentation": "

              The stateful rules or stateless rules for the rule group.

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

              Additional options governing how Network Firewall handles stateful rules. The policies where you use your stateful \n rule group must have stateful rule options settings that are compatible with these settings.

              " + } } }, "traits": { @@ -2795,6 +2840,18 @@ "traits": { "smithy.api#documentation": "

              The key:value pairs to associate with the resource.

              " } + }, + "ConsumedCapacity": { + "target": "com.amazonaws.networkfirewall#RuleCapacity", + "traits": { + "smithy.api#documentation": "

              The number of capacity units currently consumed by the rule group rules.

              " + } + }, + "NumberOfAssociations": { + "target": "com.amazonaws.networkfirewall#NumberOfAssociations", + "traits": { + "smithy.api#documentation": "

              The number of firewall policies that use this rule group.

              " + } } }, "traits": { @@ -2849,6 +2906,21 @@ "target": "com.amazonaws.networkfirewall#RuleOption" } }, + "com.amazonaws.networkfirewall#RuleOrder": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "DEFAULT_ACTION_ORDER", + "name": "DEFAULT_ACTION_ORDER" + }, + { + "value": "STRICT_ORDER", + "name": "STRICT_ORDER" + } + ] + } + }, "com.amazonaws.networkfirewall#RuleTargets": { "type": "list", "member": { @@ -2903,7 +2975,7 @@ "StatefulRules": { "target": "com.amazonaws.networkfirewall#StatefulRules", "traits": { - "smithy.api#documentation": "

              The 5-tuple stateful inspection criteria. This contains an array of individual 5-tuple\n stateful rules to be used together in a stateful rule group.

              " + "smithy.api#documentation": "

              An array of individual stateful rules inspection criteria to be used together in a stateful rule group. \n Use this option to specify simple Suricata rules with protocol, source and destination, ports, direction, and rule options. \n For information about the Suricata Rules format, see\n Rules Format.

              " } }, "StatelessRulesAndCustomActions": { @@ -2930,7 +3002,7 @@ "TargetTypes": { "target": "com.amazonaws.networkfirewall#TargetTypes", "traits": { - "smithy.api#documentation": "

              The protocols you want to inspect. Specify TLS_SNI for HTTPS. Specity HTTP_HOST for HTTP. You can specify either or both.

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

              The protocols you want to inspect. Specify TLS_SNI for HTTPS. Specify HTTP_HOST for HTTP. You can specify either or both.

              ", "smithy.api#required": {} } }, @@ -2943,7 +3015,7 @@ } }, "traits": { - "smithy.api#documentation": "

              Stateful inspection criteria for a domain list rule group.

              \n

              For HTTPS traffic, domain filtering is SNI-based. It uses the server name indicator extension of the TLS handshake.

              \n

              By default, Network Firewall domain list inspection only includes traffic coming from the VPC where you deploy the firewall. To inspect traffic from IP addresses outside of the deployment VPC, you set the HOME_NET rule variable to include the CIDR range of the deployment VPC plus the other CIDR ranges. For more information, see RuleVariables in this guide and Stateful domain list rule groups in AWS Network Firewall in the Network Firewall Developer Guide\n

              " + "smithy.api#documentation": "

              Stateful inspection criteria for a domain list rule group.

              \n

              For HTTPS traffic, domain filtering is SNI-based. It uses the server name indicator extension of the TLS handshake.

              \n

              By default, Network Firewall domain list inspection only includes traffic coming from the VPC where you deploy the firewall. To inspect traffic from IP addresses outside of the deployment VPC, you set the HOME_NET rule variable to include the CIDR range of the deployment VPC plus the other CIDR ranges. For more information, see RuleVariables in this guide and Stateful domain list rule groups in AWS Network Firewall in the Network Firewall Developer Guide.

              " } }, "com.amazonaws.networkfirewall#RulesString": { @@ -2951,7 +3023,7 @@ "traits": { "smithy.api#length": { "min": 0, - "max": 1000000 + "max": 2000000 } } }, @@ -3000,6 +3072,26 @@ ] } }, + "com.amazonaws.networkfirewall#StatefulActions": { + "type": "list", + "member": { + "target": "com.amazonaws.networkfirewall#CollectionMember_String" + } + }, + "com.amazonaws.networkfirewall#StatefulEngineOptions": { + "type": "structure", + "members": { + "RuleOrder": { + "target": "com.amazonaws.networkfirewall#RuleOrder", + "traits": { + "smithy.api#documentation": "

              Indicates how to manage the order of stateful rule evaluation for the policy. By default, Network Firewall\n leaves the rule evaluation order up to the Suricata rule processing engine. If you set \n this to STRICT_ORDER, your rules are evaluated in the exact order that you provide them\n in the policy. With strict ordering, the rule groups are evaluated by order of priority, starting from the lowest number, and \n the rules in each rule group are processed in the order that they're defined.

              " + } + } + }, + "traits": { + "smithy.api#documentation": "

              Configuration settings for the handling of the stateful rule groups in a firewall policy.

              " + } + }, "com.amazonaws.networkfirewall#StatefulRule": { "type": "structure", "members": { @@ -3013,20 +3105,20 @@ "Header": { "target": "com.amazonaws.networkfirewall#Header", "traits": { - "smithy.api#documentation": "

              The stateful 5-tuple inspection criteria for this rule, used to inspect traffic flows.\n

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

              The stateful inspection criteria for this rule, used to inspect traffic flows.\n

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

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

              Additional options for the rule. These are the Suricata RuleOptions settings.

              ", "smithy.api#required": {} } } }, "traits": { - "smithy.api#documentation": "

              A single 5-tuple stateful rule, for use in a stateful rule group.

              " + "smithy.api#documentation": "

              A single Suricata rules specification, for use in a stateful rule group. \n Use this option to specify a simple Suricata rule with protocol, source and destination, ports, direction, and rule options. \n For information about the Suricata Rules format, see\n Rules Format.

              " } }, "com.amazonaws.networkfirewall#StatefulRuleDirection": { @@ -3053,6 +3145,13 @@ "smithy.api#documentation": "

              The Amazon Resource Name (ARN) of the stateful rule group.

              ", "smithy.api#required": {} } + }, + "Priority": { + "target": "com.amazonaws.networkfirewall#Priority", + "traits": { + "smithy.api#box": {}, + "smithy.api#documentation": "

              An integer setting that indicates the order in which to run the stateful rule groups in\n a single FirewallPolicy. This setting only applies to firewall policies\n that specify the STRICT_ORDER rule order in the stateful engine options settings.

              \n

              Network Firewall evalutes each stateful rule group\n against a packet starting with the group that has the lowest priority setting. You must ensure\n that the priority settings are unique within each policy.

              \n

              You can change the priority settings of your rule groups at any time. To make it easier to\n insert rule groups later, number them so there's a wide range in between, for example use 100,\n 200, and so on.

              " + } } }, "traits": { @@ -3065,6 +3164,20 @@ "target": "com.amazonaws.networkfirewall#StatefulRuleGroupReference" } }, + "com.amazonaws.networkfirewall#StatefulRuleOptions": { + "type": "structure", + "members": { + "RuleOrder": { + "target": "com.amazonaws.networkfirewall#RuleOrder", + "traits": { + "smithy.api#documentation": "

              Indicates how to manage the order of the rule evaluation for the rule group. By default, Network Firewall\n leaves the rule evaluation order up to the Suricata rule processing engine. If you set \n this to STRICT_ORDER, your rules are evaluated in the exact order that they're listed \n in your Suricata rules string.

              " + } + } + }, + "traits": { + "smithy.api#documentation": "

              Additional options governing how Network Firewall handles the rule group. You can only use these for stateful rule groups.

              " + } + }, "com.amazonaws.networkfirewall#StatefulRuleProtocol": { "type": "string", "traits": { @@ -3173,7 +3286,7 @@ "Priority": { "target": "com.amazonaws.networkfirewall#Priority", "traits": { - "smithy.api#documentation": "

              A setting that indicates the order in which to run this rule relative to all of the\n rules that are defined for a stateless rule group. Network Firewall evaluates the rules in a\n rule group starting with the lowest priority setting. You must ensure that the priority\n settings are unique for the rule group.

              \n

              Each stateless rule group uses exactly one StatelessRulesAndCustomActions\n object, and each StatelessRulesAndCustomActions contains exactly one\n StatelessRules object. To ensure unique priority settings for your rule\n groups, set unique priorities for the stateless rules that you define inside any single\n StatelessRules object.

              \n

              You can change the priority settings of your rules at any time. To make it easier to\n insert rules later, number them so there's a wide range in between, for example use 100,\n 200, and so on.

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

              Indicates the order in which to run this rule relative to all of the\n rules that are defined for a stateless rule group. Network Firewall evaluates the rules in a\n rule group starting with the lowest priority setting. You must ensure that the priority\n settings are unique for the rule group.

              \n

              Each stateless rule group uses exactly one StatelessRulesAndCustomActions\n object, and each StatelessRulesAndCustomActions contains exactly one\n StatelessRules object. To ensure unique priority settings for your rule\n groups, set unique priorities for the stateless rules that you define inside any single\n StatelessRules object.

              \n

              You can change the priority settings of your rules at any time. To make it easier to\n insert rules later, number them so there's a wide range in between, for example use 100,\n 200, and so on.

              ", "smithy.api#required": {} } } @@ -3613,13 +3726,13 @@ "FirewallArn": { "target": "com.amazonaws.networkfirewall#ResourceArn", "traits": { - "smithy.api#documentation": "

              The Amazon Resource Name (ARN) of the firewall.

              \n

              You must specify the ARN or the name, and you can specify both.

              " + "smithy.api#documentation": "

              The Amazon Resource Name (ARN) of the firewall.

              \n

              You must specify the ARN or the name, and you can specify both.

              " } }, "FirewallName": { "target": "com.amazonaws.networkfirewall#ResourceName", "traits": { - "smithy.api#documentation": "

              The descriptive name of the firewall. You can't change the name of a firewall after you create it.

              \n

              You must specify the ARN or the name, and you can specify both.

              " + "smithy.api#documentation": "

              The descriptive name of the firewall. You can't change the name of a firewall after you create it.

              \n

              You must specify the ARN or the name, and you can specify both.

              " } }, "DeleteProtection": { @@ -3701,13 +3814,13 @@ "FirewallArn": { "target": "com.amazonaws.networkfirewall#ResourceArn", "traits": { - "smithy.api#documentation": "

              The Amazon Resource Name (ARN) of the firewall.

              \n

              You must specify the ARN or the name, and you can specify both.

              " + "smithy.api#documentation": "

              The Amazon Resource Name (ARN) of the firewall.

              \n

              You must specify the ARN or the name, and you can specify both.

              " } }, "FirewallName": { "target": "com.amazonaws.networkfirewall#ResourceName", "traits": { - "smithy.api#documentation": "

              The descriptive name of the firewall. You can't change the name of a firewall after you create it.

              \n

              You must specify the ARN or the name, and you can specify both.

              " + "smithy.api#documentation": "

              The descriptive name of the firewall. You can't change the name of a firewall after you create it.

              \n

              You must specify the ARN or the name, and you can specify both.

              " } }, "Description": { @@ -3820,13 +3933,13 @@ "FirewallArn": { "target": "com.amazonaws.networkfirewall#ResourceArn", "traits": { - "smithy.api#documentation": "

              The Amazon Resource Name (ARN) of the firewall.

              \n

              You must specify the ARN or the name, and you can specify both.

              " + "smithy.api#documentation": "

              The Amazon Resource Name (ARN) of the firewall.

              \n

              You must specify the ARN or the name, and you can specify both.

              " } }, "FirewallName": { "target": "com.amazonaws.networkfirewall#ResourceName", "traits": { - "smithy.api#documentation": "

              The descriptive name of the firewall. You can't change the name of a firewall after you create it.

              \n

              You must specify the ARN or the name, and you can specify both.

              " + "smithy.api#documentation": "

              The descriptive name of the firewall. You can't change the name of a firewall after you create it.

              \n

              You must specify the ARN or the name, and you can specify both.

              " } }, "FirewallPolicyChangeProtection": { @@ -3880,13 +3993,13 @@ "FirewallPolicyArn": { "target": "com.amazonaws.networkfirewall#ResourceArn", "traits": { - "smithy.api#documentation": "

              The Amazon Resource Name (ARN) of the firewall policy.

              \n

              You must specify the ARN or the name, and you can specify both.

              " + "smithy.api#documentation": "

              The Amazon Resource Name (ARN) of the firewall policy.

              \n

              You must specify the ARN or the name, and you can specify both.

              " } }, "FirewallPolicyName": { "target": "com.amazonaws.networkfirewall#ResourceName", "traits": { - "smithy.api#documentation": "

              The descriptive name of the firewall policy. You can't change the name of a firewall policy after you create it.

              \n

              You must specify the ARN or the name, and you can specify both.

              " + "smithy.api#documentation": "

              The descriptive name of the firewall policy. You can't change the name of a firewall policy after you create it.

              \n

              You must specify the ARN or the name, and you can specify both.

              " } }, "FirewallPolicy": { @@ -3967,13 +4080,13 @@ "FirewallArn": { "target": "com.amazonaws.networkfirewall#ResourceArn", "traits": { - "smithy.api#documentation": "

              The Amazon Resource Name (ARN) of the firewall.

              \n

              You must specify the ARN or the name, and you can specify both.

              " + "smithy.api#documentation": "

              The Amazon Resource Name (ARN) of the firewall.

              \n

              You must specify the ARN or the name, and you can specify both.

              " } }, "FirewallName": { "target": "com.amazonaws.networkfirewall#ResourceName", "traits": { - "smithy.api#documentation": "

              The descriptive name of the firewall. You can't change the name of a firewall after you create it.

              \n

              You must specify the ARN or the name, and you can specify both.

              " + "smithy.api#documentation": "

              The descriptive name of the firewall. You can't change the name of a firewall after you create it.

              \n

              You must specify the ARN or the name, and you can specify both.

              " } }, "LoggingConfiguration": { @@ -4046,13 +4159,13 @@ "RuleGroupArn": { "target": "com.amazonaws.networkfirewall#ResourceArn", "traits": { - "smithy.api#documentation": "

              The Amazon Resource Name (ARN) of the rule group.

              \n

              You must specify the ARN or the name, and you can specify both.

              " + "smithy.api#documentation": "

              The Amazon Resource Name (ARN) of the rule group.

              \n

              You must specify the ARN or the name, and you can specify both.

              " } }, "RuleGroupName": { "target": "com.amazonaws.networkfirewall#ResourceName", "traits": { - "smithy.api#documentation": "

              The descriptive name of the rule group. You can't change the name of a rule group after you create it.

              \n

              You must specify the ARN or the name, and you can specify both.

              " + "smithy.api#documentation": "

              The descriptive name of the rule group. You can't change the name of a rule group after you create it.

              \n

              You must specify the ARN or the name, and you can specify both.

              " } }, "RuleGroup": { @@ -4070,7 +4183,7 @@ "Type": { "target": "com.amazonaws.networkfirewall#RuleGroupType", "traits": { - "smithy.api#documentation": "

              Indicates whether the rule group is stateless or stateful. If the rule group is stateless, it contains \nstateless rules. If it is stateful, it contains stateful rules.

              \n \n

              This setting is required for requests that do not include the RuleGroupARN.

              \n
              " + "smithy.api#documentation": "

              Indicates whether the rule group is stateless or stateful. If the rule group is stateless, it contains \nstateless rules. If it is stateful, it contains stateful rules.

              \n \n

              This setting is required for requests that do not include the RuleGroupARN.

              \n
              " } }, "Description": { @@ -4150,13 +4263,13 @@ "FirewallArn": { "target": "com.amazonaws.networkfirewall#ResourceArn", "traits": { - "smithy.api#documentation": "

              The Amazon Resource Name (ARN) of the firewall.

              \n

              You must specify the ARN or the name, and you can specify both.

              " + "smithy.api#documentation": "

              The Amazon Resource Name (ARN) of the firewall.

              \n

              You must specify the ARN or the name, and you can specify both.

              " } }, "FirewallName": { "target": "com.amazonaws.networkfirewall#ResourceName", "traits": { - "smithy.api#documentation": "

              The descriptive name of the firewall. You can't change the name of a firewall after you create it.

              \n

              You must specify the ARN or the name, and you can specify both.

              " + "smithy.api#documentation": "

              The descriptive name of the firewall. You can't change the name of a firewall after you create it.

              \n

              You must specify the ARN or the name, and you can specify both.

              " } }, "SubnetChangeProtection": { diff --git a/codegen/sdk-codegen/aws-models/pinpoint.2016-12-01.json b/codegen/sdk-codegen/aws-models/pinpoint.2016-12-01.json index de527361807c6..d97f5aafad716 100644 --- a/codegen/sdk-codegen/aws-models/pinpoint.2016-12-01.json +++ b/codegen/sdk-codegen/aws-models/pinpoint.2016-12-01.json @@ -1046,6 +1046,12 @@ "traits": { "smithy.api#documentation": "

              The settings for a wait activity. This type of activity waits for a certain amount of time or until a specific date and time before moving participants to the next activity in a journey.

              " } + }, + "ContactCenter": { + "target": "com.amazonaws.pinpoint#ContactCenterActivity", + "traits": { + "smithy.api#documentation": "

              The settings for a connect activity. This type of activity initiates a contact center call to participants.

              " + } } }, "traits": { @@ -2456,6 +2462,17 @@ "smithy.api#httpError": 409 } }, + "com.amazonaws.pinpoint#ContactCenterActivity": { + "type": "structure", + "members": { + "NextActivity": { + "target": "com.amazonaws.pinpoint#__string", + "traits": { + "smithy.api#documentation": "

              The unique identifier for the next activity to perform after the this activity.

              " + } + } + } + }, "com.amazonaws.pinpoint#CreateApp": { "type": "operation", "input": { @@ -11172,6 +11189,26 @@ ] } }, + "com.amazonaws.pinpoint#JourneyChannelSettings": { + "type": "structure", + "members": { + "ConnectCampaignArn": { + "target": "com.amazonaws.pinpoint#__string", + "traits": { + "smithy.api#documentation": "

              Amazon Resource Name (ARN) of the Connect Campaign.

              " + } + }, + "ConnectCampaignExecutionRoleArn": { + "target": "com.amazonaws.pinpoint#__string", + "traits": { + "smithy.api#documentation": "

              IAM role ARN to be assumed when invoking Connect campaign execution APIs for dialing.

              " + } + } + }, + "traits": { + "smithy.api#documentation": "

              The channel-specific configurations for the journey.

              " + } + }, "com.amazonaws.pinpoint#JourneyCustomMessage": { "type": "structure", "members": { @@ -11496,6 +11533,12 @@ "traits": { "smithy.api#documentation": "

              Specifies whether a journey should be refreshed on segment update.

              " } + }, + "JourneyChannelSettings": { + "target": "com.amazonaws.pinpoint#JourneyChannelSettings", + "traits": { + "smithy.api#documentation": "

              The channel-specific configurations for the journey.

              " + } } }, "traits": { diff --git a/codegen/sdk-codegen/aws-models/sesv2.2019-09-27.json b/codegen/sdk-codegen/aws-models/sesv2.2019-09-27.json index 26d51e1ba8373..fd710c30f8952 100644 --- a/codegen/sdk-codegen/aws-models/sesv2.2019-09-27.json +++ b/codegen/sdk-codegen/aws-models/sesv2.2019-09-27.json @@ -145,7 +145,7 @@ "com.amazonaws.sesv2#BehaviorOnMxFailure": { "type": "string", "traits": { - "smithy.api#documentation": "

              The action that you want to take if the required MX record can't be found when you\n send an email. When you set this value to UseDefaultValue, the mail is sent\n using amazonses.com as the MAIL FROM domain. When you set this\n value to RejectMessage, the Amazon SES API v2 returns a\n MailFromDomainNotVerified error, and doesn't attempt to deliver the\n email.

              \n

              These behaviors are taken when the custom MAIL FROM domain configuration is in the\n Pending, Failed, and TemporaryFailure\n states.

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

              The action to take if the required MX record can't be found when you send an email.\n When you set this value to UseDefaultValue, the mail is sent using\n amazonses.com as the MAIL FROM domain. When you set this value\n to RejectMessage, the Amazon SES API v2 returns a\n MailFromDomainNotVerified error, and doesn't attempt to deliver the\n email.

              \n

              These behaviors are taken when the custom MAIL FROM domain configuration is in the\n Pending, Failed, and TemporaryFailure\n states.

              ", "smithy.api#enum": [ { "value": "USE_DEFAULT_VALUE", @@ -419,7 +419,7 @@ "DimensionValueSource": { "target": "com.amazonaws.sesv2#DimensionValueSource", "traits": { - "smithy.api#documentation": "

              The location where the Amazon SES API v2 finds the value of a dimension to publish to Amazon CloudWatch. If\n you want to use the message tags that you specify using an\n X-SES-MESSAGE-TAGS header or a parameter to the SendEmail\n or SendRawEmail API, choose messageTag. If you want to use\n your own email headers, choose emailHeader. If you want to use link tags,\n choose linkTags.

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

              The location where the Amazon SES API v2 finds the value of a dimension to publish to Amazon CloudWatch. To\n use the message tags that you specify using an X-SES-MESSAGE-TAGS header or\n a parameter to the SendEmail or SendRawEmail API, choose\n messageTag. To use your own email headers, choose\n emailHeader. To use link tags, choose linkTags.

              ", "smithy.api#required": {} } }, @@ -565,7 +565,7 @@ "ContactListImportAction": { "target": "com.amazonaws.sesv2#ContactListImportAction", "traits": { - "smithy.api#documentation": "

              >The type of action that you want to perform on the addresses. Acceptable\n values:

              \n
                \n
              • \n

                PUT: add the addresses to the contact list. If the record already exists, it\n will override it with the new value.

                \n
              • \n
              • \n

                DELETE: remove the addresses from the contact list.

                \n
              • \n
              ", + "smithy.api#documentation": "

              >The type of action to perform on the addresses. The following are the \n possible values:

              \n
                \n
              • \n

                PUT: add the addresses to the contact list. If the record already exists, it\n will override it with the new value.

                \n
              • \n
              • \n

                DELETE: remove the addresses from the contact list.

                \n
              • \n
              ", "smithy.api#required": {} } } @@ -690,7 +690,7 @@ "ConfigurationSetName": { "target": "com.amazonaws.sesv2#ConfigurationSetName", "traits": { - "smithy.api#documentation": "

              The name of the configuration set that you want to add an event destination to.

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

              The name of the configuration set .

              ", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -727,7 +727,7 @@ "ConfigurationSetName": { "target": "com.amazonaws.sesv2#ConfigurationSetName", "traits": { - "smithy.api#documentation": "

              The name of the configuration set.

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

              The name of the configuration set. The name can contain up to 64 alphanumeric\n characters, including letters, numbers, hyphens (-) and underscores (_) only.

              ", "smithy.api#required": {} } }, @@ -758,7 +758,7 @@ "Tags": { "target": "com.amazonaws.sesv2#TagList", "traits": { - "smithy.api#documentation": "

              An array of objects that define the tags (keys and values) that you want to associate\n with the configuration set.

              " + "smithy.api#documentation": "

              An array of objects that define the tags (keys and values) to associate with the\n configuration set.

              " } }, "SuppressionOptions": { @@ -1031,7 +1031,7 @@ } ], "traits": { - "smithy.api#documentation": "

              Create a new pool of dedicated IP addresses. A pool can include one or more dedicated\n IP addresses that are associated with your AWS account. You can associate a pool with\n a configuration set. When you send an email that uses that configuration set, the\n message is sent from one of the addresses in the associated pool.

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

              Create a new pool of dedicated IP addresses. A pool can include one or more dedicated\n IP addresses that are associated with your Amazon Web Services account. You can associate a pool with\n a configuration set. When you send an email that uses that configuration set, the\n message is sent from one of the addresses in the associated pool.

              ", "smithy.api#http": { "method": "POST", "uri": "/v2/email/dedicated-ip-pools", @@ -1198,7 +1198,7 @@ } ], "traits": { - "smithy.api#documentation": "

              Starts the process of verifying an email identity. An identity is\n an email address or domain that you use when you send email. Before you can use an\n identity to send email, you first have to verify it. By verifying an identity, you\n demonstrate that you're the owner of the identity, and that you've given Amazon SES API v2\n permission to send email from the identity.

              \n

              When you verify an email address, Amazon SES sends an email to the address. Your email\n address is verified as soon as you follow the link in the verification email.\n \n

              \n

              When you verify a domain without specifying the DkimSigningAttributes\n object, this operation provides a set of DKIM tokens. You can convert these tokens into\n CNAME records, which you then add to the DNS configuration for your domain. Your domain\n is verified when Amazon SES detects these records in the DNS configuration for your domain.\n This verification method is known as Easy DKIM.

              \n

              Alternatively, you can perform the verification process by providing your own\n public-private key pair. This verification method is known as Bring Your Own DKIM\n (BYODKIM). To use BYODKIM, your call to the CreateEmailIdentity operation\n has to include the DkimSigningAttributes object. When you specify this\n object, you provide a selector (a component of the DNS record name that identifies the\n public key that you want to use for DKIM authentication) and a private key.

              \n

              When you verify a domain, this operation provides a set of DKIM tokens, which you can\n convert into CNAME tokens. You add these CNAME tokens to the DNS configuration for your\n domain. Your domain is verified when Amazon SES detects these records in the DNS\n configuration for your domain. For some DNS providers, it can take 72 hours or more to\n complete the domain verification process.

              \n

              Additionally, you can associate an existing configuration set with the email identity that you're verifying.

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

              Starts the process of verifying an email identity. An identity is\n an email address or domain that you use when you send email. Before you can use an\n identity to send email, you first have to verify it. By verifying an identity, you\n demonstrate that you're the owner of the identity, and that you've given Amazon SES API v2\n permission to send email from the identity.

              \n

              When you verify an email address, Amazon SES sends an email to the address. Your email\n address is verified as soon as you follow the link in the verification email.\n \n

              \n

              When you verify a domain without specifying the DkimSigningAttributes\n object, this operation provides a set of DKIM tokens. You can convert these tokens into\n CNAME records, which you then add to the DNS configuration for your domain. Your domain\n is verified when Amazon SES detects these records in the DNS configuration for your domain.\n This verification method is known as Easy DKIM.

              \n

              Alternatively, you can perform the verification process by providing your own\n public-private key pair. This verification method is known as Bring Your Own DKIM\n (BYODKIM). To use BYODKIM, your call to the CreateEmailIdentity operation\n has to include the DkimSigningAttributes object. When you specify this\n object, you provide a selector (a component of the DNS record name that identifies the\n public key to use for DKIM authentication) and a private key.

              \n

              When you verify a domain, this operation provides a set of DKIM tokens, which you can\n convert into CNAME tokens. You add these CNAME tokens to the DNS configuration for your\n domain. Your domain is verified when Amazon SES detects these records in the DNS\n configuration for your domain. For some DNS providers, it can take 72 hours or more to\n complete the domain verification process.

              \n

              Additionally, you can associate an existing configuration set with the email identity that you're verifying.

              ", "smithy.api#http": { "method": "POST", "uri": "/v2/email/identities", @@ -1246,7 +1246,7 @@ "EmailIdentity": { "target": "com.amazonaws.sesv2#Identity", "traits": { - "smithy.api#documentation": "

              The email identity for which you want to create a policy.

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

              The email identity.

              ", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -1284,26 +1284,26 @@ "EmailIdentity": { "target": "com.amazonaws.sesv2#Identity", "traits": { - "smithy.api#documentation": "

              The email address or domain that you want to verify.

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

              The email address or domain to verify.

              ", "smithy.api#required": {} } }, "Tags": { "target": "com.amazonaws.sesv2#TagList", "traits": { - "smithy.api#documentation": "

              An array of objects that define the tags (keys and values) that you want to associate\n with the email identity.

              " + "smithy.api#documentation": "

              An array of objects that define the tags (keys and values) to associate with the email\n identity.

              " } }, "DkimSigningAttributes": { "target": "com.amazonaws.sesv2#DkimSigningAttributes", "traits": { - "smithy.api#documentation": "

              If your request includes this object, Amazon SES configures the identity to use Bring Your\n Own DKIM (BYODKIM) for DKIM authentication purposes, as opposed to the default method,\n Easy\n DKIM.

              \n

              You can only specify this object if the email identity is a domain, as opposed to an\n address.

              " + "smithy.api#documentation": "

              If your request includes this object, Amazon SES configures the identity to use Bring Your\n Own DKIM (BYODKIM) for DKIM authentication purposes, or, configures the key length to be used for\n Easy DKIM.

              \n

              You can only specify this object if the email identity is a domain, as opposed to an\n address.

              " } }, "ConfigurationSetName": { "target": "com.amazonaws.sesv2#ConfigurationSetName", "traits": { - "smithy.api#documentation": "

              The configuration set to use by default when sending from this identity.\n Note that any configuration set defined in the email sending request takes precedence.\n

              " + "smithy.api#documentation": "

              The configuration set to use by default when sending from this identity. Note that any\n configuration set defined in the email sending request takes precedence.

              " } } }, @@ -1317,7 +1317,7 @@ "IdentityType": { "target": "com.amazonaws.sesv2#IdentityType", "traits": { - "smithy.api#documentation": "

              The email identity type.

              " + "smithy.api#documentation": "

              The email identity type. Note: the MANAGED_DOMAIN identity type is not\n supported.

              " } }, "VerifiedForSendingStatus": { @@ -1360,7 +1360,7 @@ } ], "traits": { - "smithy.api#documentation": "

              Creates an email template. Email templates enable you to send personalized email to\n one or more destinations in a single API operation. For more information, see the Amazon SES\n Developer Guide.

              \n

              You can execute this operation no more than once per second.

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

              Creates an email template. Email templates enable you to send personalized email to\n one or more destinations in a single API operation. For more information, see the Amazon SES Developer\n Guide.

              \n

              You can execute this operation no more than once per second.

              ", "smithy.api#http": { "method": "POST", "uri": "/v2/email/templates", @@ -1374,7 +1374,7 @@ "TemplateName": { "target": "com.amazonaws.sesv2#EmailTemplateName", "traits": { - "smithy.api#documentation": "

              The name of the template you want to create.

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

              The name of the template.

              ", "smithy.api#required": {} } }, @@ -1464,7 +1464,7 @@ "com.amazonaws.sesv2#CustomRedirectDomain": { "type": "string", "traits": { - "smithy.api#documentation": "

              The domain that you want to use for tracking open and click events.

              " + "smithy.api#documentation": "

              The domain to use for tracking open and click events.

              " } }, "com.amazonaws.sesv2#CustomVerificationEmailTemplateMetadata": { @@ -1603,7 +1603,7 @@ "target": "com.amazonaws.sesv2#DedicatedIp" }, "traits": { - "smithy.api#documentation": "

              A list of dedicated IP addresses that are associated with your AWS account.

              " + "smithy.api#documentation": "

              A list of dedicated IP addresses that are associated with your Amazon Web Services account.

              " } }, "com.amazonaws.sesv2#DefaultDimensionValue": { @@ -1677,7 +1677,7 @@ "ConfigurationSetName": { "target": "com.amazonaws.sesv2#ConfigurationSetName", "traits": { - "smithy.api#documentation": "

              The name of the configuration set that contains the event destination that you want to\n delete.

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

              The name of the configuration set that contains the event destination to\n delete.

              ", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -1685,7 +1685,7 @@ "EventDestinationName": { "target": "com.amazonaws.sesv2#EventDestinationName", "traits": { - "smithy.api#documentation": "

              The name of the event destination that you want to delete.

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

              The name of the event destination to delete.

              ", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -1708,7 +1708,7 @@ "ConfigurationSetName": { "target": "com.amazonaws.sesv2#ConfigurationSetName", "traits": { - "smithy.api#documentation": "

              The name of the configuration set that you want to delete.

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

              The name of the configuration set.

              ", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -1846,7 +1846,7 @@ } ], "traits": { - "smithy.api#documentation": "

              Deletes an existing custom verification email template.

              \n

              For more information about custom verification email templates, see Using Custom Verification Email Templates in the Amazon SES Developer\n Guide.

              \n

              You can execute this operation no more than once per second.

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

              Deletes an existing custom verification email template.

              \n

              For more information about custom verification email templates, see Using Custom Verification Email Templates in the Amazon SES Developer\n Guide.

              \n

              You can execute this operation no more than once per second.

              ", "smithy.api#http": { "method": "DELETE", "uri": "/v2/email/custom-verification-email-templates/{TemplateName}", @@ -1996,7 +1996,7 @@ "EmailIdentity": { "target": "com.amazonaws.sesv2#Identity", "traits": { - "smithy.api#documentation": "

              The email identity for which you want to delete a policy.

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

              The email identity.

              ", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -2027,7 +2027,7 @@ "EmailIdentity": { "target": "com.amazonaws.sesv2#Identity", "traits": { - "smithy.api#documentation": "

              The identity (that is, the email address or domain) that you want to delete.

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

              The identity (that is, the email address or domain) to delete.

              ", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -2250,7 +2250,7 @@ "SendingPoolName": { "target": "com.amazonaws.sesv2#PoolName", "traits": { - "smithy.api#documentation": "

              The name of the dedicated IP pool that you want to associate with the configuration\n set.

              " + "smithy.api#documentation": "

              The name of the dedicated IP pool to associate with the configuration set.

              " } } }, @@ -2284,7 +2284,7 @@ } }, "traits": { - "smithy.api#documentation": "

              An object that describes the recipients for an email.

              " + "smithy.api#documentation": "

              An object that describes the recipients for an email.

              \n \n

              Amazon SES does not support the SMTPUTF8 extension, as described in RFC6531. For this reason, the\n local part of a destination email address (the part of the\n email address that precedes the @ sign) may only contain 7-bit ASCII\n characters. If the domain part of an address (the\n part after the @ sign) contains non-ASCII characters, they must be encoded using\n Punycode, as described in RFC3492.

              \n
              " } }, "com.amazonaws.sesv2#DimensionName": { @@ -2296,7 +2296,7 @@ "com.amazonaws.sesv2#DimensionValueSource": { "type": "string", "traits": { - "smithy.api#documentation": "

              The location where the Amazon SES API v2 finds the value of a dimension to publish to Amazon CloudWatch. If\n you want to use the message tags that you specify using an\n X-SES-MESSAGE-TAGS header or a parameter to the SendEmail\n or SendRawEmail API, choose messageTag. If you want to use\n your own email headers, choose emailHeader. If you want to use link tags,\n choose linkTags.

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

              The location where the Amazon SES API v2 finds the value of a dimension to publish to Amazon CloudWatch. To\n use the message tags that you specify using an X-SES-MESSAGE-TAGS header or\n a parameter to the SendEmail or SendRawEmail API, choose\n messageTag. To use your own email headers, choose\n emailHeader. To use link tags, choose linkTags.

              ", "smithy.api#enum": [ { "value": "MESSAGE_TAG", @@ -2340,7 +2340,25 @@ "SigningAttributesOrigin": { "target": "com.amazonaws.sesv2#DkimSigningAttributesOrigin", "traits": { - "smithy.api#documentation": "

              A string that indicates how DKIM was configured for the identity. There are two\n possible values:

              \n
                \n
              • \n

                \n AWS_SES – Indicates that DKIM was configured for the\n identity by using Easy DKIM.

                \n
              • \n
              • \n

                \n EXTERNAL – Indicates that DKIM was configured for the\n identity by using Bring Your Own DKIM (BYODKIM).

                \n
              • \n
              " + "smithy.api#documentation": "

              A string that indicates how DKIM was configured for the identity. These are the\n possible values:

              \n
                \n
              • \n

                \n AWS_SES – Indicates that DKIM was configured for the\n identity by using Easy DKIM.

                \n
              • \n
              • \n

                \n EXTERNAL – Indicates that DKIM was configured for the\n identity by using Bring Your Own DKIM (BYODKIM).

                \n
              • \n
              " + } + }, + "NextSigningKeyLength": { + "target": "com.amazonaws.sesv2#DkimSigningKeyLength", + "traits": { + "smithy.api#documentation": "

              [Easy DKIM] The key length of the future DKIM key pair to be generated. This can be changed at most once per day.

              " + } + }, + "CurrentSigningKeyLength": { + "target": "com.amazonaws.sesv2#DkimSigningKeyLength", + "traits": { + "smithy.api#documentation": "

              [Easy DKIM] The key length of the DKIM key pair in use.

              " + } + }, + "LastKeyGenerationTimestamp": { + "target": "com.amazonaws.sesv2#Timestamp", + "traits": { + "smithy.api#documentation": "

              [Easy DKIM] The last time a key pair was generated for this identity.

              " } } }, @@ -2354,20 +2372,24 @@ "DomainSigningSelector": { "target": "com.amazonaws.sesv2#Selector", "traits": { - "smithy.api#documentation": "

              A string that's used to identify a public key in the DNS configuration for a\n domain.

              ", - "smithy.api#required": {} + "smithy.api#documentation": "

              [Bring Your Own DKIM] A string that's used to identify a public key in the DNS configuration for a\n domain.

              " } }, "DomainSigningPrivateKey": { "target": "com.amazonaws.sesv2#PrivateKey", "traits": { - "smithy.api#documentation": "

              A private key that's used to generate a DKIM signature.

              \n

              The private key must use 1024-bit RSA encryption, and must be encoded using base64\n encoding.

              ", - "smithy.api#required": {} + "smithy.api#documentation": "

              [Bring Your Own DKIM] A private key that's used to generate a DKIM signature.

              \n

              The private key must use 1024 or 2048-bit RSA encryption, and must be encoded using\n base64 encoding.

              " + } + }, + "NextSigningKeyLength": { + "target": "com.amazonaws.sesv2#DkimSigningKeyLength", + "traits": { + "smithy.api#documentation": "

              [Easy DKIM] The key length of the future DKIM key pair to be generated. This can be changed at most once per day.

              " } } }, "traits": { - "smithy.api#documentation": "

              An object that contains information about the tokens used for setting up Bring Your\n Own DKIM (BYODKIM).

              " + "smithy.api#documentation": "

              An object that contains configuration for Bring Your Own DKIM (BYODKIM), or, for Easy DKIM

              " } }, "com.amazonaws.sesv2#DkimSigningAttributesOrigin": { @@ -2385,6 +2407,21 @@ ] } }, + "com.amazonaws.sesv2#DkimSigningKeyLength": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "RSA_1024_BIT", + "name": "RSA_1024_BIT" + }, + { + "value": "RSA_2048_BIT", + "name": "RSA_2048_BIT" + } + ] + } + }, "com.amazonaws.sesv2#DkimStatus": { "type": "string", "traits": { @@ -2532,7 +2569,7 @@ "Domain": { "target": "com.amazonaws.sesv2#Domain", "traits": { - "smithy.api#documentation": "

              A verified domain that’s associated with your AWS account and currently has an\n active Deliverability dashboard subscription.

              " + "smithy.api#documentation": "

              A verified domain that’s associated with your Amazon Web Services account and currently has an\n active Deliverability dashboard subscription.

              " } }, "SubscriptionStartDate": { @@ -2802,7 +2839,7 @@ } }, "traits": { - "smithy.api#documentation": "

              In the Amazon SES API v2, events include message sends, deliveries, opens,\n clicks, bounces, complaints and delivery delays. Event destinations are places that\n you can send information about these events to. For example, you can send event data to\n Amazon SNS to receive notifications when you receive bounces or complaints, or you can use\n Amazon Kinesis Data Firehose to stream data to Amazon S3 for long-term storage.

              " + "smithy.api#documentation": "

              In the Amazon SES API v2, events include message sends, deliveries, opens,\n clicks, bounces, complaints and delivery delays. Event destinations\n are places that you can send information about these events to. For example, you can\n send event data to Amazon SNS to receive notifications when you receive bounces or\n complaints, or you can use Amazon Kinesis Data Firehose to stream data to Amazon S3 for long-term storage.

              " } }, "com.amazonaws.sesv2#EventDestinationDefinition": { @@ -2973,7 +3010,7 @@ } ], "traits": { - "smithy.api#documentation": "

              Obtain information about the email-sending status and capabilities of your Amazon SES\n account in the current AWS Region.

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

              Obtain information about the email-sending status and capabilities of your Amazon SES\n account in the current Amazon Web Services Region.

              ", "smithy.api#http": { "method": "GET", "uri": "/v2/email/account", @@ -3006,25 +3043,25 @@ "ProductionAccessEnabled": { "target": "com.amazonaws.sesv2#Enabled", "traits": { - "smithy.api#documentation": "

              Indicates whether or not your account has production access in the current AWS\n Region.

              \n

              If the value is false, then your account is in the\n sandbox. When your account is in the sandbox, you can only send\n email to verified identities. Additionally, the maximum number of emails you can send in\n a 24-hour period (your sending quota) is 200, and the maximum number of emails you can\n send per second (your maximum sending rate) is 1.

              \n

              If the value is true, then your account has production access. When your\n account has production access, you can send email to any address. The sending quota and\n maximum sending rate for your account vary based on your specific use case.

              " + "smithy.api#documentation": "

              Indicates whether or not your account has production access in the current Amazon Web Services\n Region.

              \n

              If the value is false, then your account is in the\n sandbox. When your account is in the sandbox, you can only send\n email to verified identities. Additionally, the maximum number of emails you can send in\n a 24-hour period (your sending quota) is 200, and the maximum number of emails you can\n send per second (your maximum sending rate) is 1.

              \n

              If the value is true, then your account has production access. When your\n account has production access, you can send email to any address. The sending quota and\n maximum sending rate for your account vary based on your specific use case.

              " } }, "SendQuota": { "target": "com.amazonaws.sesv2#SendQuota", "traits": { - "smithy.api#documentation": "

              An object that contains information about the per-day and per-second sending limits\n for your Amazon SES account in the current AWS Region.

              " + "smithy.api#documentation": "

              An object that contains information about the per-day and per-second sending limits\n for your Amazon SES account in the current Amazon Web Services Region.

              " } }, "SendingEnabled": { "target": "com.amazonaws.sesv2#Enabled", "traits": { - "smithy.api#documentation": "

              Indicates whether or not email sending is enabled for your Amazon SES account in the\n current AWS Region.

              " + "smithy.api#documentation": "

              Indicates whether or not email sending is enabled for your Amazon SES account in the\n current Amazon Web Services Region.

              " } }, "SuppressionAttributes": { "target": "com.amazonaws.sesv2#SuppressionAttributes", "traits": { - "smithy.api#documentation": "

              An object that contains information about the email address suppression preferences\n for your account in the current AWS Region.

              " + "smithy.api#documentation": "

              An object that contains information about the email address suppression preferences\n for your account in the current Amazon Web Services Region.

              " } }, "Details": { @@ -3035,7 +3072,7 @@ } }, "traits": { - "smithy.api#documentation": "

              A list of details about the email-sending capabilities of your Amazon SES account in the\n current AWS Region.

              " + "smithy.api#documentation": "

              A list of details about the email-sending capabilities of your Amazon SES account in the\n current Amazon Web Services Region.

              " } }, "com.amazonaws.sesv2#GetBlacklistReports": { @@ -3189,7 +3226,7 @@ "ConfigurationSetName": { "target": "com.amazonaws.sesv2#ConfigurationSetName", "traits": { - "smithy.api#documentation": "

              The name of the configuration set that you want to obtain more information\n about.

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

              The name of the configuration set.

              ", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -3555,7 +3592,7 @@ "Ip": { "target": "com.amazonaws.sesv2#Ip", "traits": { - "smithy.api#documentation": "

              The IP address that you want to obtain more information about. The value you specify\n has to be a dedicated IP address that's assocaited with your AWS account.

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

              The IP address that you want to obtain more information about. The value you specify\n has to be a dedicated IP address that's assocaited with your Amazon Web Services account.

              ", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -3599,7 +3636,7 @@ } ], "traits": { - "smithy.api#documentation": "

              List the dedicated IP addresses that are associated with your AWS\n account.

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

              List the dedicated IP addresses that are associated with your Amazon Web Services\n account.

              ", "smithy.api#http": { "method": "GET", "uri": "/v2/email/dedicated-ips", @@ -3647,7 +3684,7 @@ "DedicatedIps": { "target": "com.amazonaws.sesv2#DedicatedIpList", "traits": { - "smithy.api#documentation": "

              A list of dedicated IP addresses that are associated with your AWS account.

              " + "smithy.api#documentation": "

              A list of dedicated IP addresses that are associated with your Amazon Web Services account.

              " } }, "NextToken": { @@ -3658,7 +3695,7 @@ } }, "traits": { - "smithy.api#documentation": "

              Information about the dedicated IP addresses that are associated with your AWS\n account.

              " + "smithy.api#documentation": "

              Information about the dedicated IP addresses that are associated with your Amazon Web Services\n account.

              " } }, "com.amazonaws.sesv2#GetDeliverabilityDashboardOptions": { @@ -3681,7 +3718,7 @@ } ], "traits": { - "smithy.api#documentation": "

              Retrieve information about the status of the Deliverability dashboard for your account. When\n the Deliverability dashboard is enabled, you gain access to reputation, deliverability, and other\n metrics for the domains that you use to send email. You also gain the ability to perform\n predictive inbox placement tests.

              \n \n

              When you use the Deliverability dashboard, you pay a monthly subscription charge, in addition\n to any other fees that you accrue by using Amazon SES and other AWS services. For more\n information about the features and cost of a Deliverability dashboard subscription, see Amazon SES Pricing.

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

              Retrieve information about the status of the Deliverability dashboard for your account. When\n the Deliverability dashboard is enabled, you gain access to reputation, deliverability, and other\n metrics for the domains that you use to send email. You also gain the ability to perform\n predictive inbox placement tests.

              \n \n

              When you use the Deliverability dashboard, you pay a monthly subscription charge, in addition\n to any other fees that you accrue by using Amazon SES and other Amazon Web Services services. For more\n information about the features and cost of a Deliverability dashboard subscription, see Amazon SES Pricing.

              ", "smithy.api#http": { "method": "GET", "uri": "/v2/email/deliverability-dashboard", @@ -3693,7 +3730,7 @@ "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

              Retrieve information about the status of the Deliverability dashboard for your AWS account.\n When the Deliverability dashboard is enabled, you gain access to reputation, deliverability, and\n other metrics for your domains. You also gain the ability to perform predictive inbox placement tests.

              \n \n

              When you use the Deliverability dashboard, you pay a monthly subscription charge, in addition\n to any other fees that you accrue by using Amazon SES and other AWS services. For more\n information about the features and cost of a Deliverability dashboard subscription, see Amazon Pinpoint Pricing.

              " + "smithy.api#documentation": "

              Retrieve information about the status of the Deliverability dashboard for your Amazon Web Services account.\n When the Deliverability dashboard is enabled, you gain access to reputation, deliverability, and\n other metrics for your domains. You also gain the ability to perform predictive inbox placement tests.

              \n \n

              When you use the Deliverability dashboard, you pay a monthly subscription charge, in addition\n to any other fees that you accrue by using Amazon SES and other Amazon Web Services services. For more\n information about the features and cost of a Deliverability dashboard subscription, see Amazon Pinpoint Pricing.

              " } }, "com.amazonaws.sesv2#GetDeliverabilityDashboardOptionsResponse": { @@ -4023,7 +4060,7 @@ "EmailIdentity": { "target": "com.amazonaws.sesv2#Identity", "traits": { - "smithy.api#documentation": "

              The email identity that you want to retrieve policies for.

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

              The email identity.

              ", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -4053,7 +4090,7 @@ "EmailIdentity": { "target": "com.amazonaws.sesv2#Identity", "traits": { - "smithy.api#documentation": "

              The email identity that you want to retrieve details for.

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

              The email identity.

              ", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -4069,7 +4106,7 @@ "IdentityType": { "target": "com.amazonaws.sesv2#IdentityType", "traits": { - "smithy.api#documentation": "

              The email identity type.

              " + "smithy.api#documentation": "

              The email identity type. Note: the MANAGED_DOMAIN identity type is not\n supported.

              " } }, "FeedbackForwardingStatus": { @@ -4153,7 +4190,7 @@ "TemplateName": { "target": "com.amazonaws.sesv2#EmailTemplateName", "traits": { - "smithy.api#documentation": "

              The name of the template you want to retrieve.

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

              The name of the template.

              ", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -4169,7 +4206,7 @@ "TemplateName": { "target": "com.amazonaws.sesv2#EmailTemplateName", "traits": { - "smithy.api#documentation": "

              The name of the template you want to retrieve.

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

              The name of the template.

              ", "smithy.api#required": {} } }, @@ -4364,7 +4401,7 @@ "IdentityType": { "target": "com.amazonaws.sesv2#IdentityType", "traits": { - "smithy.api#documentation": "

              The email identity type. The identity type can be one of the following:

              \n
                \n
              • \n

                \n EMAIL_ADDRESS – The identity is an email address.

                \n
              • \n
              • \n

                \n DOMAIN – The identity is a domain.

                \n
              • \n
              • \n

                \n MANAGED_DOMAIN – The identity is a domain that is managed\n by AWS.

                \n
              • \n
              " + "smithy.api#documentation": "

              The email identity type. Note: the MANAGED_DOMAIN type is not supported\n for email identity types.

              " } }, "IdentityName": { @@ -4393,7 +4430,6 @@ "com.amazonaws.sesv2#IdentityType": { "type": "string", "traits": { - "smithy.api#documentation": "

              The email identity type. The identity type can be one of the following:

              \n
                \n
              • \n

                \n EMAIL_ADDRESS – The identity is an email address.

                \n
              • \n
              • \n

                \n DOMAIN – The identity is a domain.

                \n
              • \n
              ", "smithy.api#enum": [ { "value": "EMAIL_ADDRESS", @@ -4520,7 +4556,7 @@ } }, "traits": { - "smithy.api#documentation": "

              An object that contains information about the inbox placement data settings for a\n verified domain that’s associated with your AWS account. This data is available only\n if you enabled the Deliverability dashboard for the domain.

              " + "smithy.api#documentation": "

              An object that contains information about the inbox placement data settings for a\n verified domain that’s associated with your Amazon Web Services account. This data is available only\n if you enabled the Deliverability dashboard for the domain.

              " } }, "com.amazonaws.sesv2#InvalidNextTokenException": { @@ -4709,7 +4745,7 @@ } }, "traits": { - "smithy.api#documentation": "

              A request to obtain a list of configuration sets for your Amazon SES account in the current\n AWS Region.

              " + "smithy.api#documentation": "

              A request to obtain a list of configuration sets for your Amazon SES account in the current\n Amazon Web Services Region.

              " } }, "com.amazonaws.sesv2#ListConfigurationSetsResponse": { @@ -4718,7 +4754,7 @@ "ConfigurationSets": { "target": "com.amazonaws.sesv2#ConfigurationSetNameList", "traits": { - "smithy.api#documentation": "

              An array that contains all of the configuration sets in your Amazon SES account in the\n current AWS Region.

              " + "smithy.api#documentation": "

              An array that contains all of the configuration sets in your Amazon SES account in the\n current Amazon Web Services Region.

              " } }, "NextToken": { @@ -4729,7 +4765,7 @@ } }, "traits": { - "smithy.api#documentation": "

              A list of configuration sets in your Amazon SES account in the current AWS Region.

              " + "smithy.api#documentation": "

              A list of configuration sets in your Amazon SES account in the current Amazon Web Services Region.

              " } }, "com.amazonaws.sesv2#ListContactLists": { @@ -4918,7 +4954,7 @@ } ], "traits": { - "smithy.api#documentation": "

              Lists the existing custom verification email templates for your account in the current\n AWS Region.

              \n

              For more information about custom verification email templates, see Using Custom Verification Email Templates in the Amazon SES Developer\n Guide.

              \n

              You can execute this operation no more than once per second.

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

              Lists the existing custom verification email templates for your account in the current\n Amazon Web Services Region.

              \n

              For more information about custom verification email templates, see Using Custom Verification Email Templates in the Amazon SES Developer\n Guide.

              \n

              You can execute this operation no more than once per second.

              ", "smithy.api#http": { "method": "GET", "uri": "/v2/email/custom-verification-email-templates", @@ -4990,7 +5026,7 @@ } ], "traits": { - "smithy.api#documentation": "

              List all of the dedicated IP pools that exist in your AWS account in the current\n Region.

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

              List all of the dedicated IP pools that exist in your Amazon Web Services account in the current\n Region.

              ", "smithy.api#http": { "method": "GET", "uri": "/v2/email/dedicated-ip-pools", @@ -5031,7 +5067,7 @@ "DedicatedIpPools": { "target": "com.amazonaws.sesv2#ListOfDedicatedIpPools", "traits": { - "smithy.api#documentation": "

              A list of all of the dedicated IP pools that are associated with your AWS account in\n the current Region.

              " + "smithy.api#documentation": "

              A list of all of the dedicated IP pools that are associated with your Amazon Web Services account in\n the current Region.

              " } }, "NextToken": { @@ -5238,7 +5274,7 @@ } ], "traits": { - "smithy.api#documentation": "

              Returns a list of all of the email identities that are associated with your AWS\n account. An identity can be either an email address or a domain. This operation returns\n identities that are verified as well as those that aren't. This operation returns\n identities that are associated with Amazon SES and Amazon Pinpoint.

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

              Returns a list of all of the email identities that are associated with your Amazon Web Services\n account. An identity can be either an email address or a domain. This operation returns\n identities that are verified as well as those that aren't. This operation returns\n identities that are associated with Amazon SES and Amazon Pinpoint.

              ", "smithy.api#http": { "method": "GET", "uri": "/v2/email/identities", @@ -5270,7 +5306,7 @@ } }, "traits": { - "smithy.api#documentation": "

              A request to list all of the email identities associated with your AWS account. This\n list includes identities that you've already verified, identities that are unverified,\n and identities that were verified in the past, but are no longer verified.

              " + "smithy.api#documentation": "

              A request to list all of the email identities associated with your Amazon Web Services account. This\n list includes identities that you've already verified, identities that are unverified,\n and identities that were verified in the past, but are no longer verified.

              " } }, "com.amazonaws.sesv2#ListEmailIdentitiesResponse": { @@ -5279,7 +5315,7 @@ "EmailIdentities": { "target": "com.amazonaws.sesv2#IdentityInfoList", "traits": { - "smithy.api#documentation": "

              An array that includes all of the email identities associated with your AWS\n account.

              " + "smithy.api#documentation": "

              An array that includes all of the email identities associated with your Amazon Web Services\n account.

              " } }, "NextToken": { @@ -5310,7 +5346,7 @@ } ], "traits": { - "smithy.api#documentation": "

              Lists the email templates present in your Amazon SES account in the current AWS\n Region.

              \n\n

              You can execute this operation no more than once per second.

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

              Lists the email templates present in your Amazon SES account in the current Amazon Web Services\n Region.

              \n\n

              You can execute this operation no more than once per second.

              ", "smithy.api#http": { "method": "GET", "uri": "/v2/email/templates", @@ -5342,7 +5378,7 @@ } }, "traits": { - "smithy.api#documentation": "

              Represents a request to list the email templates present in your Amazon SES account in the\n current AWS Region. For more information, see the Amazon SES Developer\n Guide.

              " + "smithy.api#documentation": "

              Represents a request to list the email templates present in your Amazon SES account in the\n current Amazon Web Services Region. For more information, see the Amazon SES Developer\n Guide.

              " } }, "com.amazonaws.sesv2#ListEmailTemplatesResponse": { @@ -5482,7 +5518,7 @@ "target": "com.amazonaws.sesv2#PoolName" }, "traits": { - "smithy.api#documentation": "

              A list of dedicated IP pools that are associated with your AWS account.

              " + "smithy.api#documentation": "

              A list of dedicated IP pools that are associated with your Amazon Web Services account.

              " } }, "com.amazonaws.sesv2#ListSuppressedDestinations": { @@ -5654,7 +5690,7 @@ "BehaviorOnMxFailure": { "target": "com.amazonaws.sesv2#BehaviorOnMxFailure", "traits": { - "smithy.api#documentation": "

              The action that you want to take if the required MX record can't be found when you\n send an email. When you set this value to UseDefaultValue, the mail is sent\n using amazonses.com as the MAIL FROM domain. When you set this\n value to RejectMessage, the Amazon SES API v2 returns a\n MailFromDomainNotVerified error, and doesn't attempt to deliver the\n email.

              \n

              These behaviors are taken when the custom MAIL FROM domain configuration is in the\n Pending, Failed, and TemporaryFailure\n states.

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

              The action to take if the required MX record can't be found when you send an email.\n When you set this value to UseDefaultValue, the mail is sent using\n amazonses.com as the MAIL FROM domain. When you set this value\n to RejectMessage, the Amazon SES API v2 returns a\n MailFromDomainNotVerified error, and doesn't attempt to deliver the\n email.

              \n

              These behaviors are taken when the custom MAIL FROM domain configuration is in the\n Pending, Failed, and TemporaryFailure\n states.

              ", "smithy.api#required": {} } } @@ -5666,7 +5702,7 @@ "com.amazonaws.sesv2#MailFromDomainName": { "type": "string", "traits": { - "smithy.api#documentation": "

              The domain that you want to use as a MAIL FROM domain.

              " + "smithy.api#documentation": "

              The domain to use as a MAIL FROM domain.

              " } }, "com.amazonaws.sesv2#MailFromDomainNotVerifiedException": { @@ -5884,7 +5920,7 @@ "ApplicationArn": { "target": "com.amazonaws.sesv2#AmazonResourceName", "traits": { - "smithy.api#documentation": "

              The Amazon Resource Name (ARN) of the Amazon Pinpoint project that you want to send email\n events to.

              " + "smithy.api#documentation": "

              The Amazon Resource Name (ARN) of the Amazon Pinpoint project to send email events to.

              " } } }, @@ -6015,7 +6051,7 @@ "AutoWarmupEnabled": { "target": "com.amazonaws.sesv2#Enabled", "traits": { - "smithy.api#documentation": "

              Enables or disables the automatic warm-up feature for dedicated IP addresses that are\n associated with your Amazon SES account in the current AWS Region. Set to true\n to enable the automatic warm-up feature, or set to false to disable\n it.

              " + "smithy.api#documentation": "

              Enables or disables the automatic warm-up feature for dedicated IP addresses that are\n associated with your Amazon SES account in the current Amazon Web Services Region. Set to true\n to enable the automatic warm-up feature, or set to false to disable\n it.

              " } } }, @@ -6097,7 +6133,7 @@ "ProductionAccessEnabled": { "target": "com.amazonaws.sesv2#EnabledWrapper", "traits": { - "smithy.api#documentation": "

              Indicates whether or not your account should have production access in the current\n AWS Region.

              \n

              If the value is false, then your account is in the\n sandbox. When your account is in the sandbox, you can only send\n email to verified identities. Additionally, the maximum number of emails you can send in\n a 24-hour period (your sending quota) is 200, and the maximum number of emails you can\n send per second (your maximum sending rate) is 1.

              \n

              If the value is true, then your account has production access. When your\n account has production access, you can send email to any address. The sending quota and\n maximum sending rate for your account vary based on your specific use case.

              " + "smithy.api#documentation": "

              Indicates whether or not your account should have production access in the current\n Amazon Web Services Region.

              \n

              If the value is false, then your account is in the\n sandbox. When your account is in the sandbox, you can only send\n email to verified identities. Additionally, the maximum number of emails you can send in\n a 24-hour period (your sending quota) is 200, and the maximum number of emails you can\n send per second (your maximum sending rate) is 1.

              \n

              If the value is true, then your account has production access. When your\n account has production access, you can send email to any address. The sending quota and\n maximum sending rate for your account vary based on your specific use case.

              " } } }, @@ -6143,7 +6179,7 @@ "SendingEnabled": { "target": "com.amazonaws.sesv2#Enabled", "traits": { - "smithy.api#documentation": "

              Enables or disables your account's ability to send email. Set to true to\n enable email sending, or set to false to disable email sending.

              \n \n

              If AWS paused your account's ability to send email, you can't use this operation\n to resume your account's ability to send email.

              \n
              " + "smithy.api#documentation": "

              Enables or disables your account's ability to send email. Set to true to\n enable email sending, or set to false to disable email sending.

              \n \n

              If Amazon Web Services paused your account's ability to send email, you can't use this operation\n to resume your account's ability to send email.

              \n
              " } } }, @@ -6238,7 +6274,7 @@ "ConfigurationSetName": { "target": "com.amazonaws.sesv2#ConfigurationSetName", "traits": { - "smithy.api#documentation": "

              The name of the configuration set that you want to associate with a dedicated IP\n pool.

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

              The name of the configuration set to associate with a dedicated IP pool.

              ", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -6252,7 +6288,7 @@ "SendingPoolName": { "target": "com.amazonaws.sesv2#SendingPoolName", "traits": { - "smithy.api#documentation": "

              The name of the dedicated IP pool that you want to associate with the configuration\n set.

              " + "smithy.api#documentation": "

              The name of the dedicated IP pool to associate with the configuration set.

              " } } }, @@ -6287,7 +6323,7 @@ } ], "traits": { - "smithy.api#documentation": "

              Enable or disable collection of reputation metrics for emails that you send using a\n particular configuration set in a specific AWS Region.

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

              Enable or disable collection of reputation metrics for emails that you send using a\n particular configuration set in a specific Amazon Web Services Region.

              ", "smithy.api#http": { "method": "PUT", "uri": "/v2/email/configuration-sets/{ConfigurationSetName}/reputation-options", @@ -6301,7 +6337,7 @@ "ConfigurationSetName": { "target": "com.amazonaws.sesv2#ConfigurationSetName", "traits": { - "smithy.api#documentation": "

              The name of the configuration set that you want to enable or disable reputation metric\n tracking for.

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

              The name of the configuration set.

              ", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -6344,7 +6380,7 @@ } ], "traits": { - "smithy.api#documentation": "

              Enable or disable email sending for messages that use a particular configuration set\n in a specific AWS Region.

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

              Enable or disable email sending for messages that use a particular configuration set\n in a specific Amazon Web Services Region.

              ", "smithy.api#http": { "method": "PUT", "uri": "/v2/email/configuration-sets/{ConfigurationSetName}/sending", @@ -6358,7 +6394,7 @@ "ConfigurationSetName": { "target": "com.amazonaws.sesv2#ConfigurationSetName", "traits": { - "smithy.api#documentation": "

              The name of the configuration set that you want to enable or disable email sending\n for.

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

              The name of the configuration set to enable or disable email sending for.

              ", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -6415,7 +6451,7 @@ "ConfigurationSetName": { "target": "com.amazonaws.sesv2#ConfigurationSetName", "traits": { - "smithy.api#documentation": "

              The name of the configuration set that you want to change the suppression list\n preferences for.

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

              The name of the configuration set to change the suppression list preferences\n for.

              ", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -6423,7 +6459,7 @@ "SuppressedReasons": { "target": "com.amazonaws.sesv2#SuppressionListReasons", "traits": { - "smithy.api#documentation": "

              A list that contains the reasons that email addresses are automatically added to the\n suppression list for your account. This list can contain any or all of the\n following:

              \n
                \n
              • \n

                \n COMPLAINT – Amazon SES adds an email address to the suppression\n list for your account when a message sent to that address results in a\n complaint.

                \n
              • \n
              • \n

                \n BOUNCE – Amazon SES adds an email address to the suppression\n list for your account when a message sent to that address results in a\n hard bounce.

                \n
              • \n
              " + "smithy.api#documentation": "

              A list that contains the reasons that email addresses are automatically added to the\n suppression list for your account. This list can contain any or all of the\n following:

              \n
                \n
              • \n

                \n COMPLAINT – Amazon SES adds an email address to the suppression\n list for your account when a message sent to that address results in a\n complaint.

                \n
              • \n
              • \n

                \n BOUNCE – Amazon SES adds an email address to the suppression\n list for your account when a message sent to that address results in a hard\n bounce.

                \n
              • \n
              " } } }, @@ -6472,7 +6508,7 @@ "ConfigurationSetName": { "target": "com.amazonaws.sesv2#ConfigurationSetName", "traits": { - "smithy.api#documentation": "

              The name of the configuration set that you want to add a custom tracking domain\n to.

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

              The name of the configuration set.

              ", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -6480,7 +6516,7 @@ "CustomRedirectDomain": { "target": "com.amazonaws.sesv2#CustomRedirectDomain", "traits": { - "smithy.api#documentation": "

              The domain that you want to use to track open and click events.

              " + "smithy.api#documentation": "

              The domain to use to track open and click events.

              " } } }, @@ -6515,7 +6551,7 @@ } ], "traits": { - "smithy.api#documentation": "

              Move a dedicated IP address to an existing dedicated IP pool.

              \n \n

              The dedicated IP address that you specify must already exist, and must be\n associated with your AWS account.\n \n

              \n

              The dedicated IP pool you specify must already exist. You can create a new pool by\n using the CreateDedicatedIpPool operation.

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

              Move a dedicated IP address to an existing dedicated IP pool.

              \n \n

              The dedicated IP address that you specify must already exist, and must be\n associated with your Amazon Web Services account.\n \n

              \n

              The dedicated IP pool you specify must already exist. You can create a new pool by\n using the CreateDedicatedIpPool operation.

              \n\n
              ", "smithy.api#http": { "method": "PUT", "uri": "/v2/email/dedicated-ips/{Ip}/pool", @@ -6529,7 +6565,7 @@ "Ip": { "target": "com.amazonaws.sesv2#Ip", "traits": { - "smithy.api#documentation": "

              The IP address that you want to move to the dedicated IP pool. The value you specify\n has to be a dedicated IP address that's associated with your AWS account.

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

              The IP address that you want to move to the dedicated IP pool. The value you specify\n has to be a dedicated IP address that's associated with your Amazon Web Services account.

              ", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -6637,7 +6673,7 @@ } ], "traits": { - "smithy.api#documentation": "

              Enable or disable the Deliverability dashboard. When you enable the Deliverability dashboard, you gain\n access to reputation, deliverability, and other metrics for the domains that you use to\n send email. You also gain the ability to perform predictive inbox placement tests.

              \n \n

              When you use the Deliverability dashboard, you pay a monthly subscription charge, in addition\n to any other fees that you accrue by using Amazon SES and other AWS services. For more\n information about the features and cost of a Deliverability dashboard subscription, see Amazon SES Pricing.

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

              Enable or disable the Deliverability dashboard. When you enable the Deliverability dashboard, you gain\n access to reputation, deliverability, and other metrics for the domains that you use to\n send email. You also gain the ability to perform predictive inbox placement tests.

              \n \n

              When you use the Deliverability dashboard, you pay a monthly subscription charge, in addition\n to any other fees that you accrue by using Amazon SES and other Amazon Web Services services. For more\n information about the features and cost of a Deliverability dashboard subscription, see Amazon SES Pricing.

              ", "smithy.api#http": { "method": "PUT", "uri": "/v2/email/deliverability-dashboard", @@ -6663,7 +6699,7 @@ } }, "traits": { - "smithy.api#documentation": "

              Enable or disable the Deliverability dashboard. When you enable the Deliverability dashboard, you gain\n access to reputation, deliverability, and other metrics for the domains that you use to\n send email using Amazon SES API v2. You also gain the ability to perform predictive inbox placement tests.

              \n

              When you use the Deliverability dashboard, you pay a monthly subscription charge, in addition\n to any other fees that you accrue by using Amazon SES and other AWS services. For more\n information about the features and cost of a Deliverability dashboard subscription, see Amazon Pinpoint Pricing.

              " + "smithy.api#documentation": "

              Enable or disable the Deliverability dashboard. When you enable the Deliverability dashboard, you gain\n access to reputation, deliverability, and other metrics for the domains that you use to\n send email using Amazon SES API v2. You also gain the ability to perform predictive inbox placement tests.

              \n

              When you use the Deliverability dashboard, you pay a monthly subscription charge, in addition\n to any other fees that you accrue by using Amazon SES and other Amazon Web Services services. For more\n information about the features and cost of a Deliverability dashboard subscription, see Amazon Pinpoint Pricing.

              " } }, "com.amazonaws.sesv2#PutDeliverabilityDashboardOptionResponse": { @@ -6707,7 +6743,7 @@ "EmailIdentity": { "target": "com.amazonaws.sesv2#Identity", "traits": { - "smithy.api#documentation": "

              The email address or domain that you want to associate with a configuration set.

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

              The email address or domain to associate with a configuration set.

              ", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -6715,7 +6751,7 @@ "ConfigurationSetName": { "target": "com.amazonaws.sesv2#ConfigurationSetName", "traits": { - "smithy.api#documentation": "

              The configuration set that you want to associate with an email identity.

              " + "smithy.api#documentation": "

              The configuration set to associate with an email identity.

              " } } }, @@ -6727,7 +6763,7 @@ "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

              If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

              " + "smithy.api#documentation": "

              If the action is successful, the service sends back an HTTP 200 response with an empty\n HTTP body.

              " } }, "com.amazonaws.sesv2#PutEmailIdentityDkimAttributes": { @@ -6764,7 +6800,7 @@ "EmailIdentity": { "target": "com.amazonaws.sesv2#Identity", "traits": { - "smithy.api#documentation": "

              The email identity that you want to change the DKIM settings for.

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

              The email identity.

              ", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -6807,7 +6843,7 @@ } ], "traits": { - "smithy.api#documentation": "

              Used to configure or change the DKIM authentication settings for an email domain\n identity. You can use this operation to do any of the following:

              \n
                \n
              • \n

                Update the signing attributes for an identity that uses Bring Your Own DKIM\n (BYODKIM).

                \n
              • \n
              • \n

                Change from using no DKIM authentication to using Easy DKIM.

                \n
              • \n
              • \n

                Change from using no DKIM authentication to using BYODKIM.

                \n
              • \n
              • \n

                Change from using Easy DKIM to using BYODKIM.

                \n
              • \n
              • \n

                Change from using BYODKIM to using Easy DKIM.

                \n
              • \n
              ", + "smithy.api#documentation": "

              Used to configure or change the DKIM authentication settings for an email domain\n identity. You can use this operation to do any of the following:

              \n
                \n
              • \n

                Update the signing attributes for an identity that uses Bring Your Own DKIM\n (BYODKIM).

                \n
              • \n
              • \n

                Update the key length that should be used for Easy DKIM.

                \n
              • \n
              • \n

                Change from using no DKIM authentication to using Easy DKIM.

                \n
              • \n
              • \n

                Change from using no DKIM authentication to using BYODKIM.

                \n
              • \n
              • \n

                Change from using Easy DKIM to using BYODKIM.

                \n
              • \n
              • \n

                Change from using BYODKIM to using Easy DKIM.

                \n
              • \n
              ", "smithy.api#http": { "method": "PUT", "uri": "/v1/email/identities/{EmailIdentity}/dkim/signing", @@ -6821,7 +6857,7 @@ "EmailIdentity": { "target": "com.amazonaws.sesv2#Identity", "traits": { - "smithy.api#documentation": "

              The email identity that you want to configure DKIM for.

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

              The email identity.

              ", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -6829,14 +6865,14 @@ "SigningAttributesOrigin": { "target": "com.amazonaws.sesv2#DkimSigningAttributesOrigin", "traits": { - "smithy.api#documentation": "

              The method that you want to use to configure DKIM for the identity. There are two\n possible values:

              \n
                \n
              • \n

                \n AWS_SES – Configure DKIM for the identity by using Easy\n DKIM.

                \n
              • \n
              • \n

                \n EXTERNAL – Configure DKIM for the identity by using Bring\n Your Own DKIM (BYODKIM).

                \n
              • \n
              ", + "smithy.api#documentation": "

              The method to use to configure DKIM for the identity. There are the following possible\n values:

              \n
                \n
              • \n

                \n AWS_SES – Configure DKIM for the identity by using Easy\n DKIM.

                \n
              • \n
              • \n

                \n EXTERNAL – Configure DKIM for the identity by using Bring\n Your Own DKIM (BYODKIM).

                \n
              • \n
              ", "smithy.api#required": {} } }, "SigningAttributes": { "target": "com.amazonaws.sesv2#DkimSigningAttributes", "traits": { - "smithy.api#documentation": "

              An object that contains information about the private key and selector that you want\n to use to configure DKIM for the identity. This object is only required if you want to\n configure Bring Your Own DKIM (BYODKIM) for the identity.

              " + "smithy.api#documentation": "

              An object that contains information about the private key and selector that you want\n to use to configure DKIM for the identity for Bring Your Own DKIM (BYODKIM) for the identity, or,\n configures the key length to be used for\n Easy DKIM.

              " } } }, @@ -6898,7 +6934,7 @@ "EmailIdentity": { "target": "com.amazonaws.sesv2#Identity", "traits": { - "smithy.api#documentation": "

              The email identity that you want to configure bounce and complaint feedback forwarding\n for.

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

              The email identity.

              ", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -6955,7 +6991,7 @@ "EmailIdentity": { "target": "com.amazonaws.sesv2#Identity", "traits": { - "smithy.api#documentation": "

              The verified email identity that you want to set up the custom MAIL FROM domain\n for.

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

              The verified email identity.

              ", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -6969,7 +7005,7 @@ "BehaviorOnMxFailure": { "target": "com.amazonaws.sesv2#BehaviorOnMxFailure", "traits": { - "smithy.api#documentation": "

              The action that you want to take if the required MX record isn't found when you send\n an email. When you set this value to UseDefaultValue, the mail is sent\n using amazonses.com as the MAIL FROM domain. When you set this\n value to RejectMessage, the Amazon SES API v2 returns a\n MailFromDomainNotVerified error, and doesn't attempt to deliver the\n email.

              \n

              These behaviors are taken when the custom MAIL FROM domain configuration is in the\n Pending, Failed, and TemporaryFailure\n states.

              " + "smithy.api#documentation": "

              The action to take if the required MX record isn't found when you send an email. When\n you set this value to UseDefaultValue, the mail is sent using\n amazonses.com as the MAIL FROM domain. When you set this value\n to RejectMessage, the Amazon SES API v2 returns a\n MailFromDomainNotVerified error, and doesn't attempt to deliver the\n email.

              \n

              These behaviors are taken when the custom MAIL FROM domain configuration is in the\n Pending, Failed, and TemporaryFailure\n states.

              " } } }, @@ -7128,7 +7164,7 @@ } }, "traits": { - "smithy.api#documentation": "

              Enable or disable collection of reputation metrics for emails that you send using this\n configuration set in the current AWS Region.

              " + "smithy.api#documentation": "

              Enable or disable collection of reputation metrics for emails that you send using this\n configuration set in the current Amazon Web Services Region.

              " } }, "com.amazonaws.sesv2#ReviewDetails": { @@ -7240,7 +7276,7 @@ "FromEmailAddress": { "target": "com.amazonaws.sesv2#EmailAddress", "traits": { - "smithy.api#documentation": "

              The email address that you want to use as the \"From\" address for the email. The\n address that you specify has to be verified.

              " + "smithy.api#documentation": "

              The email address to use as the \"From\" address for the email. The\n address that you specify has to be verified.

              " } }, "FromEmailAddressIdentityArn": { @@ -7290,7 +7326,7 @@ "ConfigurationSetName": { "target": "com.amazonaws.sesv2#ConfigurationSetName", "traits": { - "smithy.api#documentation": "

              The name of the configuration set that you want to use when sending the email.

              " + "smithy.api#documentation": "

              The name of the configuration set to use when sending the email.

              " } } }, @@ -7304,6 +7340,7 @@ "BulkEmailEntryResults": { "target": "com.amazonaws.sesv2#BulkEmailEntryResultList", "traits": { + "smithy.api#documentation": "

              One object per intended recipient. Check each response object and retry any messages\n with a failure status.

              ", "smithy.api#required": {} } } @@ -7344,7 +7381,7 @@ } ], "traits": { - "smithy.api#documentation": "

              Adds an email address to the list of identities for your Amazon SES account in the current\n AWS Region and attempts to verify it. As a result of executing this operation, a\n customized verification email is sent to the specified address.

              \n

              To use this operation, you must first create a custom verification email template. For\n more information about creating and using custom verification email templates, see\n Using Custom Verification Email Templates in the Amazon SES Developer\n Guide.

              \n

              You can execute this operation no more than once per second.

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

              Adds an email address to the list of identities for your Amazon SES account in the current\n Amazon Web Services Region and attempts to verify it. As a result of executing this operation, a\n customized verification email is sent to the specified address.

              \n

              To use this operation, you must first create a custom verification email template. For\n more information about creating and using custom verification email templates, see\n Using Custom Verification Email Templates in the Amazon SES Developer\n Guide.

              \n

              You can execute this operation no more than once per second.

              ", "smithy.api#http": { "method": "POST", "uri": "/v2/email/outbound-custom-verification-emails", @@ -7429,7 +7466,7 @@ } ], "traits": { - "smithy.api#documentation": "

              Sends an email message. You can use the Amazon SES API v2 to send two types of\n messages:

              \n
                \n
              • \n

                \n Simple – A standard email message. When\n you create this type of message, you specify the sender, the recipient, and the\n message body, and Amazon SES assembles the message for you.

                \n
              • \n
              • \n

                \n Raw – A raw, MIME-formatted email\n message. When you send this type of email, you have to specify all of the\n message headers, as well as the message body. You can use this message type to\n send messages that contain attachments. The message that you specify has to be a\n valid MIME message.

                \n
              • \n
              • \n

                \n Templated – A message that contains\n personalization tags. When you send this type of email, Amazon SES API v2 automatically\n replaces the tags with values that you specify.

                \n
              • \n
              ", + "smithy.api#documentation": "

              Sends an email message. You can use the Amazon SES API v2 to send the following types of\n messages:

              \n
                \n
              • \n

                \n Simple – A standard email message. When\n you create this type of message, you specify the sender, the recipient, and the\n message body, and Amazon SES assembles the message for you.

                \n
              • \n
              • \n

                \n Raw – A raw, MIME-formatted email\n message. When you send this type of email, you have to specify all of the\n message headers, as well as the message body. You can use this message type to\n send messages that contain attachments. The message that you specify has to be a\n valid MIME message.

                \n
              • \n
              • \n

                \n Templated – A message that contains\n personalization tags. When you send this type of email, Amazon SES API v2 automatically\n replaces the tags with values that you specify.

                \n
              • \n
              ", "smithy.api#http": { "method": "POST", "uri": "/v2/email/outbound-emails", @@ -7443,7 +7480,7 @@ "FromEmailAddress": { "target": "com.amazonaws.sesv2#EmailAddress", "traits": { - "smithy.api#documentation": "

              The email address that you want to use as the \"From\" address for the email. The\n address that you specify has to be verified.\n

              " + "smithy.api#documentation": "

              The email address to use as the \"From\" address for the email. The\n address that you specify has to be verified.\n

              " } }, "FromEmailAddressIdentityArn": { @@ -7492,7 +7529,7 @@ "ConfigurationSetName": { "target": "com.amazonaws.sesv2#ConfigurationSetName", "traits": { - "smithy.api#documentation": "

              The name of the configuration set that you want to use when sending the email.

              " + "smithy.api#documentation": "

              The name of the configuration set to use when sending the email.

              " } }, "ListManagementOptions": { @@ -7526,24 +7563,24 @@ "Max24HourSend": { "target": "com.amazonaws.sesv2#Max24HourSend", "traits": { - "smithy.api#documentation": "

              The maximum number of emails that you can send in the current AWS Region over a\n 24-hour period. This value is also called your sending\n quota.

              " + "smithy.api#documentation": "

              The maximum number of emails that you can send in the current Amazon Web Services Region over a\n 24-hour period. This value is also called your sending\n quota.

              " } }, "MaxSendRate": { "target": "com.amazonaws.sesv2#MaxSendRate", "traits": { - "smithy.api#documentation": "

              The maximum number of emails that you can send per second in the current AWS Region.\n This value is also called your maximum sending rate or your\n maximum TPS (transactions per second) rate.

              " + "smithy.api#documentation": "

              The maximum number of emails that you can send per second in the current Amazon Web Services Region.\n This value is also called your maximum sending rate or your\n maximum TPS (transactions per second) rate.

              " } }, "SentLast24Hours": { "target": "com.amazonaws.sesv2#SentLast24Hours", "traits": { - "smithy.api#documentation": "

              The number of emails sent from your Amazon SES account in the current AWS Region over the\n past 24 hours.

              " + "smithy.api#documentation": "

              The number of emails sent from your Amazon SES account in the current Amazon Web Services Region over the\n past 24 hours.

              " } } }, "traits": { - "smithy.api#documentation": "

              An object that contains information about the per-day and per-second sending limits\n for your Amazon SES account in the current AWS Region.

              " + "smithy.api#documentation": "

              An object that contains information about the per-day and per-second sending limits\n for your Amazon SES account in the current Amazon Web Services Region.

              " } }, "com.amazonaws.sesv2#SendingOptions": { @@ -7557,7 +7594,7 @@ } }, "traits": { - "smithy.api#documentation": "

              Used to enable or disable email sending for messages that use this configuration set\n in the current AWS Region.

              " + "smithy.api#documentation": "

              Used to enable or disable email sending for messages that use this configuration set\n in the current Amazon Web Services Region.

              " } }, "com.amazonaws.sesv2#SendingPausedException": { @@ -7576,7 +7613,7 @@ "com.amazonaws.sesv2#SendingPoolName": { "type": "string", "traits": { - "smithy.api#documentation": "

              The name of the dedicated IP pool that you want to associate with the configuration\n set.

              " + "smithy.api#documentation": "

              The name of the dedicated IP pool to associate with the configuration set.

              " } }, "com.amazonaws.sesv2#SentLast24Hours": { @@ -7842,7 +7879,7 @@ "name": "ses" }, "aws.protocols#restJson1": {}, - "smithy.api#documentation": "Amazon SES API v2\n

              Welcome to the Amazon SES API v2 Reference. This guide provides information about the Amazon SES API v2,\n including supported operations, data types, parameters, and schemas.

              \n

              \n Amazon SES is an AWS service that\n you can use to send email messages to your customers.

              \n

              If you're new to Amazon SES API v2, you might find it helpful to also review the Amazon Simple Email Service Developer\n Guide. The Amazon SES Developer Guide provides information\n and code samples that demonstrate how to use Amazon SES API v2 features programmatically.

              \n

              The Amazon SES API v2 is available in several AWS Regions and it provides an endpoint for each\n of these Regions. For a list of all the Regions and endpoints where the API is currently\n available, see AWS Service Endpoints in the Amazon Web Services General Reference. To\n learn more about AWS Regions, see Managing AWS Regions in the\n Amazon Web Services General Reference.

              \n

              In each Region, AWS maintains multiple Availability Zones. These Availability Zones\n are physically isolated from each other, but are united by private, low-latency,\n high-throughput, and highly redundant network connections. These Availability Zones\n enable us to provide very high levels of availability and redundancy, while also\n minimizing latency. To learn more about the number of Availability Zones that are\n available in each Region, see AWS Global Infrastructure.

              ", + "smithy.api#documentation": "Amazon SES API v2\n \n

              \n Amazon SES is an Amazon Web Services service that\n you can use to send email messages to your customers.

              \n

              If you're new to Amazon SES API v2, you might find it helpful to review the Amazon Simple Email Service Developer\n Guide. The Amazon SES Developer Guide provides information\n and code samples that demonstrate how to use Amazon SES API v2 features programmatically.

              ", "smithy.api#title": "Amazon Simple Email Service" } }, @@ -7852,7 +7889,7 @@ "TopicArn": { "target": "com.amazonaws.sesv2#AmazonResourceName", "traits": { - "smithy.api#documentation": "

              The Amazon Resource Name (ARN) of the Amazon SNS topic that you want to publish email\n events to. For more information about Amazon SNS topics, see the Amazon SNS Developer\n Guide.

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

              The Amazon Resource Name (ARN) of the Amazon SNS topic to publish email events to. For\n more information about Amazon SNS topics, see the Amazon SNS Developer Guide.

              ", "smithy.api#required": {} } } @@ -7986,7 +8023,7 @@ } }, "traits": { - "smithy.api#documentation": "

              An object that contains information about the email address suppression preferences\n for your account in the current AWS Region.

              " + "smithy.api#documentation": "

              An object that contains information about the email address suppression preferences\n for your account in the current Amazon Web Services Region.

              " } }, "com.amazonaws.sesv2#SuppressionListDestination": { @@ -7995,7 +8032,7 @@ "SuppressionListImportAction": { "target": "com.amazonaws.sesv2#SuppressionListImportAction", "traits": { - "smithy.api#documentation": "

              The type of action that you want to perform on the address. Acceptable values:

              \n
                \n
              • \n

                PUT: add the addresses to the suppression list. If the record already exists,\n it will override it with the new value.

                \n
              • \n
              • \n

                DELETE: remove the addresses from the suppression list.

                \n
              • \n
              ", + "smithy.api#documentation": "

              The type of action to perform on the address. The following are possible values:

              \n
                \n
              • \n

                PUT: add the addresses to the suppression list. If the record already exists,\n it will override it with the new value.

                \n
              • \n
              • \n

                DELETE: remove the addresses from the suppression list.

                \n
              • \n
              ", "smithy.api#required": {} } } @@ -8007,7 +8044,7 @@ "com.amazonaws.sesv2#SuppressionListImportAction": { "type": "string", "traits": { - "smithy.api#documentation": "

              The type of action that you want to perform on the address. Acceptable values:

              \n
                \n
              • \n

                PUT: add the addresses to the suppression list.

                \n
              • \n
              • \n

                DELETE: remove the address from the suppression list.

                \n
              • \n
              ", + "smithy.api#documentation": "

              The type of action to perform on the address. The following are possible values:

              \n
                \n
              • \n

                PUT: add the addresses to the suppression list.

                \n
              • \n
              • \n

                DELETE: remove the address from the suppression list.

                \n
              • \n
              ", "smithy.api#enum": [ { "value": "DELETE", @@ -8075,7 +8112,7 @@ } }, "traits": { - "smithy.api#documentation": "

              An object that defines the tags that are associated with a resource.\n A tag is a label that you optionally define and associate with\n a resource. Tags can help you categorize and manage resources in different ways, such as\n by purpose, owner, environment, or other criteria. A resource can have as many as 50\n tags.

              \n

              Each tag consists of a required tag key and an\n associated tag value, both of which you define. A tag key is a\n general label that acts as a category for a more specific tag value. A tag value acts as\n a descriptor within a tag key. A tag key can contain as many as 128 characters. A tag\n value can contain as many as 256 characters. The characters can be Unicode letters,\n digits, white space, or one of the following symbols: _ . : / = + -. The following\n additional restrictions apply to tags:

              \n
                \n
              • \n

                Tag keys and values are case sensitive.

                \n
              • \n
              • \n

                For each associated resource, each tag key must be unique and it can have only\n one value.

                \n
              • \n
              • \n

                The aws: prefix is reserved for use by AWS; you can’t use it in\n any tag keys or values that you define. In addition, you can't edit or remove\n tag keys or values that use this prefix. Tags that use this prefix don’t count\n against the limit of 50 tags per resource.

                \n
              • \n
              • \n

                You can associate tags with public or shared resources, but the tags are\n available only for your AWS account, not any other accounts that share the\n resource. In addition, the tags are available only for resources that are\n located in the specified AWS Region for your AWS account.

                \n
              • \n
              " + "smithy.api#documentation": "

              An object that defines the tags that are associated with a resource.\n A tag is a label that you optionally define and associate with\n a resource. Tags can help you categorize and manage resources in different ways, such as\n by purpose, owner, environment, or other criteria. A resource can have as many as 50\n tags.

              \n

              Each tag consists of a required tag key and an\n associated tag value, both of which you define. A tag key is a\n general label that acts as a category for a more specific tag value. A tag value acts as\n a descriptor within a tag key. A tag key can contain as many as 128 characters. A tag\n value can contain as many as 256 characters. The characters can be Unicode letters,\n digits, white space, or one of the following symbols: _ . : / = + -. The following\n additional restrictions apply to tags:

              \n
                \n
              • \n

                Tag keys and values are case sensitive.

                \n
              • \n
              • \n

                For each associated resource, each tag key must be unique and it can have only\n one value.

                \n
              • \n
              • \n

                The aws: prefix is reserved for use by Amazon Web Services; you can’t use it in\n any tag keys or values that you define. In addition, you can't edit or remove\n tag keys or values that use this prefix. Tags that use this prefix don’t count\n against the limit of 50 tags per resource.

                \n
              • \n
              • \n

                You can associate tags with public or shared resources, but the tags are\n available only for your Amazon Web Services account, not any other accounts that share the\n resource. In addition, the tags are available only for resources that are\n located in the specified Amazon Web Services Region for your Amazon Web Services account.

                \n
              • \n
              " } }, "com.amazonaws.sesv2#TagKey": { @@ -8216,7 +8253,7 @@ "TemplateName": { "target": "com.amazonaws.sesv2#EmailTemplateName", "traits": { - "smithy.api#documentation": "

              The name of the template that you want to render.

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

              The name of the template.

              ", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -8378,13 +8415,13 @@ "CustomRedirectDomain": { "target": "com.amazonaws.sesv2#CustomRedirectDomain", "traits": { - "smithy.api#documentation": "

              The domain that you want to use for tracking open and click events.

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

              The domain to use for tracking open and click events.

              ", "smithy.api#required": {} } } }, "traits": { - "smithy.api#documentation": "

              An object that defines the tracking options for a configuration set. When you use the\n Amazon SES API v2 to send an email, it contains an invisible image that's used to track when\n recipients open your email. If your email contains links, those links are changed\n slightly in order to track when recipients click them.

              \n

              These images and links include references to a domain operated by AWS. You can\n optionally configure the Amazon SES to use a domain that you operate for these images and\n links.

              " + "smithy.api#documentation": "

              An object that defines the tracking options for a configuration set. When you use the\n Amazon SES API v2 to send an email, it contains an invisible image that's used to track when\n recipients open your email. If your email contains links, those links are changed\n slightly in order to track when recipients click them.

              \n

              These images and links include references to a domain operated by Amazon Web Services. You can\n optionally configure the Amazon SES to use a domain that you operate for these images and\n links.

              " } }, "com.amazonaws.sesv2#UnsubscribeAll": { @@ -8480,7 +8517,7 @@ "ConfigurationSetName": { "target": "com.amazonaws.sesv2#ConfigurationSetName", "traits": { - "smithy.api#documentation": "

              The name of the configuration set that contains the event destination that you want to\n modify.

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

              The name of the configuration set that contains the event destination to\n modify.

              ", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -8488,7 +8525,7 @@ "EventDestinationName": { "target": "com.amazonaws.sesv2#EventDestinationName", "traits": { - "smithy.api#documentation": "

              The name of the event destination that you want to modify.

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

              The name of the event destination.

              ", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -8766,7 +8803,7 @@ "EmailIdentity": { "target": "com.amazonaws.sesv2#Identity", "traits": { - "smithy.api#documentation": "

              The email identity for which you want to update policy.

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

              The email identity.

              ", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -8818,7 +8855,7 @@ } ], "traits": { - "smithy.api#documentation": "

              Updates an email template. Email templates enable you to send personalized email to\n one or more destinations in a single API operation. For more information, see the Amazon SES\n Developer Guide.

              \n

              You can execute this operation no more than once per second.

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

              Updates an email template. Email templates enable you to send personalized email to\n one or more destinations in a single API operation. For more information, see the Amazon SES Developer\n Guide.

              \n

              You can execute this operation no more than once per second.

              ", "smithy.api#http": { "method": "PUT", "uri": "/v2/email/templates/{TemplateName}", @@ -8832,7 +8869,7 @@ "TemplateName": { "target": "com.amazonaws.sesv2#EmailTemplateName", "traits": { - "smithy.api#documentation": "

              The name of the template you want to update.

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

              The name of the template.

              ", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -8931,7 +8968,7 @@ "min": 1, "max": 1000 }, - "smithy.api#pattern": "^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?", + "smithy.api#pattern": "^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$", "smithy.api#sensitive": {} } } diff --git a/codegen/sdk-codegen/aws-models/ssm.2014-11-06.json b/codegen/sdk-codegen/aws-models/ssm.2014-11-06.json index 6244750d73734..eaf9da18e3d1e 100644 --- a/codegen/sdk-codegen/aws-models/ssm.2014-11-06.json +++ b/codegen/sdk-codegen/aws-models/ssm.2014-11-06.json @@ -853,7 +853,7 @@ "Targets": { "target": "com.amazonaws.ssm#Targets", "traits": { - "smithy.api#documentation": "

              The instances targeted by the request to create an association.

              " + "smithy.api#documentation": "

              The instances targeted by the request to create an association. You can target all instances\n in an Amazon Web Services account by specifying the InstanceIds key with a value of\n *.

              " } }, "LastExecutionDate": { @@ -4457,7 +4457,7 @@ "Targets": { "target": "com.amazonaws.ssm#Targets", "traits": { - "smithy.api#documentation": "

              The targets for the association. You can target instances by using tags, Amazon Web Services resource\n groups, all instances in an Amazon Web Services account, or individual instance IDs. For more information about\n choosing targets for an association, see Using targets and rate controls with State Manager associations in the\n Amazon Web Services Systems Manager User Guide.

              " + "smithy.api#documentation": "

              The targets for the association. You can target instances by using tags, Amazon Web Services resource\n groups, all instances in an Amazon Web Services account, or individual instance IDs. You can target all\n instances in an Amazon Web Services account by specifying the InstanceIds key with a value of\n *. For more information about choosing targets for an association, see Using targets and rate controls with State Manager associations in the\n Amazon Web Services Systems Manager User Guide.

              " } }, "ScheduleExpression": { @@ -22357,7 +22357,7 @@ "OutputS3Region": { "target": "com.amazonaws.ssm#S3Region", "traits": { - "smithy.api#documentation": "

              (Deprecated) You can no longer specify this parameter. The system ignores it. Instead,\n Amazon Web Services Systems Manager automatically determines the Region of the S3 bucket.

              " + "smithy.api#documentation": "

              The Amazon Web Services Region of the S3 bucket.

              " } }, "OutputS3BucketName": { @@ -23396,6 +23396,12 @@ "smithy.api#documentation": "

              The user-provided idempotency token. The token must be unique, is case insensitive, enforces\n the UUID format, and can't be reused.

              " } }, + "AutoApprove": { + "target": "com.amazonaws.ssm#Boolean", + "traits": { + "smithy.api#documentation": "

              Indicates whether the change request can be approved automatically without the need for\n manual approvals.

              \n

              If AutoApprovable is enabled in a change template, then setting\n AutoApprove to true in StartChangeRequestExecution\n creates a change request that bypasses approver review.

              \n \n

              Change Calendar restrictions are not bypassed in this scenario. If the state of an\n associated calendar is CLOSED, change freeze approvers must still grant permission\n for this change request to run. If they don't, the change won't be processed until the calendar\n state is again OPEN.

              \n
              " + } + }, "Runbooks": { "target": "com.amazonaws.ssm#Runbooks", "traits": { diff --git a/codegen/sdk-codegen/aws-models/synthetics.2017-10-11.json b/codegen/sdk-codegen/aws-models/synthetics.2017-10-11.json index 73ebff3f9a3a8..d2fcd03564ffa 100644 --- a/codegen/sdk-codegen/aws-models/synthetics.2017-10-11.json +++ b/codegen/sdk-codegen/aws-models/synthetics.2017-10-11.json @@ -29,6 +29,34 @@ ] }, "shapes": { + "com.amazonaws.synthetics#ArtifactConfigInput": { + "type": "structure", + "members": { + "S3Encryption": { + "target": "com.amazonaws.synthetics#S3EncryptionConfig", + "traits": { + "smithy.api#documentation": "

              A structure that contains the configuration of the encryption-at-rest settings for artifacts that the canary uploads\n to Amazon S3. \n Artifact encryption functionality is available only for canaries that use Synthetics runtime version \n syn-nodejs-puppeteer-3.3 or later. For more information, see\n Encrypting canary artifacts\n

              " + } + } + }, + "traits": { + "smithy.api#documentation": "

              A structure that contains the configuration for canary artifacts, including the \n encryption-at-rest settings for artifacts that the canary uploads to Amazon S3.

              " + } + }, + "com.amazonaws.synthetics#ArtifactConfigOutput": { + "type": "structure", + "members": { + "S3Encryption": { + "target": "com.amazonaws.synthetics#S3EncryptionConfig", + "traits": { + "smithy.api#documentation": "

              A structure that contains the configuration of encryption settings for canary artifacts that are stored in Amazon S3.

              " + } + } + }, + "traits": { + "smithy.api#documentation": "

              A structure that contains the configuration for canary artifacts, including \n the encryption-at-rest settings for artifacts that the canary uploads to Amazon S3.

              " + } + }, "com.amazonaws.synthetics#BaseScreenshot": { "type": "structure", "members": { @@ -184,6 +212,12 @@ "traits": { "smithy.api#documentation": "

              The list of key-value pairs that are associated with the canary.

              " } + }, + "ArtifactConfig": { + "target": "com.amazonaws.synthetics#ArtifactConfigOutput", + "traits": { + "smithy.api#documentation": "

              A structure that contains the configuration for canary artifacts, including \n the encryption-at-rest settings for artifacts that the canary uploads to Amazon S3.

              " + } } }, "traits": { @@ -736,6 +770,12 @@ "traits": { "smithy.api#documentation": "

              A list of key-value pairs to associate with the canary. \n You can associate as many as 50 tags with a canary.

              \n

              Tags can help you organize and categorize your\n resources. You can also use them to scope user permissions, by \n granting a user permission to access or change only the resources that have\n certain tag values.

              " } + }, + "ArtifactConfig": { + "target": "com.amazonaws.synthetics#ArtifactConfigInput", + "traits": { + "smithy.api#documentation": "

              A structure that contains the configuration for canary artifacts, including \n the encryption-at-rest settings for artifacts that the canary uploads to Amazon S3.

              " + } } } }, @@ -990,6 +1030,21 @@ } } }, + "com.amazonaws.synthetics#EncryptionMode": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "SSE_S3", + "name": "SSE_S3" + }, + { + "value": "SSE_KMS", + "name": "SSE_KMS" + } + ] + } + }, "com.amazonaws.synthetics#EnvironmentVariableName": { "type": "string", "traits": { @@ -1158,6 +1213,16 @@ "smithy.api#httpError": 500 } }, + "com.amazonaws.synthetics#KmsKeyArn": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 2048 + }, + "smithy.api#pattern": "^arn:(aws[a-zA-Z-]*)?:kms:[a-z]{2}((-gov)|(-iso(b?)))?-[a-z]+-\\d{1}:\\d{12}:key/[\\w\\-\\/]+$" + } + }, "com.amazonaws.synthetics#ListTagsForResource": { "type": "operation", "input": { @@ -1337,6 +1402,26 @@ "target": "com.amazonaws.synthetics#RuntimeVersion" } }, + "com.amazonaws.synthetics#S3EncryptionConfig": { + "type": "structure", + "members": { + "EncryptionMode": { + "target": "com.amazonaws.synthetics#EncryptionMode", + "traits": { + "smithy.api#documentation": "

              The encryption method to use for artifacts created by this canary. Specify SSE_S3 to use\n server-side encryption (SSE) with an Amazon S3-managed\n key. Specify SSE-KMS to use server-side encryption with a customer-managed KMS key.

              \n

              If you omit this parameter, an \n Amazon Web Services-managed KMS key is used.\n

              " + } + }, + "KmsKeyArn": { + "target": "com.amazonaws.synthetics#KmsKeyArn", + "traits": { + "smithy.api#documentation": "

              The ARN of the customer-managed KMS key to use, if you specify SSE-KMS\n for EncryptionMode\n

              " + } + } + }, + "traits": { + "smithy.api#documentation": "

              A structure that contains the configuration of encryption-at-rest settings for canary artifacts that the canary\n uploads to Amazon S3.

              \n

              For more information, see\n Encrypting canary artifacts\n

              " + } + }, "com.amazonaws.synthetics#SecurityGroupId": { "type": "string" }, @@ -1796,6 +1881,18 @@ "traits": { "smithy.api#documentation": "

              Defines the screenshots to use as the baseline for comparisons during visual monitoring comparisons during future runs of this canary. If you omit this \n parameter, no changes are made to any baseline screenshots that the canary might be using already.

              \n

              Visual monitoring is supported only on canaries running the syn-puppeteer-node-3.2\n runtime or later. For more information, see \n Visual monitoring and \n Visual monitoring blueprint\n

              " } + }, + "ArtifactS3Location": { + "target": "com.amazonaws.synthetics#String", + "traits": { + "smithy.api#documentation": "

              The location in Amazon S3 where Synthetics stores artifacts from the test runs of this canary. \n Artifacts include the log file, screenshots, and HAR files. The name of the\n S3 bucket can't include a period (.).

              " + } + }, + "ArtifactConfig": { + "target": "com.amazonaws.synthetics#ArtifactConfigInput", + "traits": { + "smithy.api#documentation": "

              A structure that contains the configuration for canary artifacts, \n including the encryption-at-rest settings for artifacts that \n the canary uploads to Amazon S3.

              " + } } } }, diff --git a/codegen/sdk-codegen/aws-models/transfer.2018-11-05.json b/codegen/sdk-codegen/aws-models/transfer.2018-11-05.json index 4f7e9c9964dff..37a104462e2d5 100644 --- a/codegen/sdk-codegen/aws-models/transfer.2018-11-05.json +++ b/codegen/sdk-codegen/aws-models/transfer.2018-11-05.json @@ -170,7 +170,7 @@ "HomeDirectoryMappings": { "target": "com.amazonaws.transfer#HomeDirectoryMappings", "traits": { - "smithy.api#documentation": "

              Logical directory mappings that specify what Amazon S3 or Amazon EFS paths and keys should\n be visible to your user and how you want to make them visible. You must specify the\n Entry and Target pair, where Entry shows how the path\n is made visible and Target is the actual Amazon S3 or Amazon EFS path. If you\n only specify a target, it is displayed as is. You also must ensure that your Amazon Web Services Identity\n and Access Management (IAM) role provides access to paths in Target. This value\n can only be set when HomeDirectoryType is set to\n LOGICAL.

              \n

              The following is an Entry and Target pair example.

              \n

              \n [ { \"Entry\": \"your-personal-report.pdf\", \"Target\": \"/bucket3/customized-reports/${transfer:UserName}.pdf\" } ]\n

              \n

              In most cases, you can use this value instead of the session policy to lock down your\n user to the designated home directory (\"chroot\"). To do this, you can set\n Entry to / and set Target to the\n HomeDirectory parameter value.

              \n

              The following is an Entry and Target pair example for chroot.

              \n

              \n [ { \"Entry:\": \"/\", \"Target\": \"/bucket_name/home/mydirectory\" } ]\n

              \n \n \n

              If the target of a logical directory entry does not exist in Amazon S3 or EFS, the entry is\n ignored. As a workaround, you can use the Amazon S3 API or EFS API to create 0 byte objects as place\n holders for your directory. If using the CLI, use the s3api or efsapi call instead of\n s3 or efs so you can use the put-object operation. For example, you use the\n following: aws s3api put-object --bucket bucketname --key path/to/folder/. Make\n sure that the end of the key name ends in a / for it to be considered a folder.

              \n
              " + "smithy.api#documentation": "

              Logical directory mappings that specify what Amazon S3 or Amazon EFS paths and keys should\n be visible to your user and how you want to make them visible. You must specify the\n Entry and Target pair, where Entry shows how the path\n is made visible and Target is the actual Amazon S3 or Amazon EFS path. If you\n only specify a target, it is displayed as is. You also must ensure that your Amazon Web Services Identity\n and Access Management (IAM) role provides access to paths in Target. This value\n can only be set when HomeDirectoryType is set to\n LOGICAL.

              \n

              The following is an Entry and Target pair example.

              \n

              \n [ { \"Entry\": \"/directory1\", \"Target\": \"/bucket_name/home/mydirectory\" } ]\n

              \n

              In most cases, you can use this value instead of the session policy to lock down your\n user to the designated home directory (\"chroot\"). To do this, you can set\n Entry to / and set Target to the\n HomeDirectory parameter value.

              \n

              The following is an Entry and Target pair example for chroot.

              \n

              \n [ { \"Entry:\": \"/\", \"Target\": \"/bucket_name/home/mydirectory\" } ]\n

              \n \n \n

              If the target of a logical directory entry does not exist in Amazon S3 or EFS, the entry is\n ignored. As a workaround, you can use the Amazon S3 API or EFS API to create 0 byte objects as place\n holders for your directory. If using the CLI, use the s3api or efsapi call instead of\n s3 or efs so you can use the put-object operation. For example, you use the\n following: aws s3api put-object --bucket bucketname --key path/to/folder/. Make\n sure that the end of the key name ends in a / for it to be considered a folder.

              \n
              " } }, "Policy": { @@ -395,7 +395,7 @@ "HomeDirectoryMappings": { "target": "com.amazonaws.transfer#HomeDirectoryMappings", "traits": { - "smithy.api#documentation": "

              Logical directory mappings that specify what Amazon S3 or Amazon EFS paths and keys should\n be visible to your user and how you want to make them visible. You must specify the\n Entry and Target pair, where Entry shows how the path\n is made visible and Target is the actual Amazon S3 or Amazon EFS path. If you\n only specify a target, it is displayed as is. You also must ensure that your Amazon Web Services Identity\n and Access Management (IAM) role provides access to paths in Target. This value\n can only be set when HomeDirectoryType is set to\n LOGICAL.

              \n\n

              The following is an Entry and Target pair example.

              \n\n

              \n [ { \"Entry\": \"your-personal-report.pdf\", \"Target\":\n \"/bucket3/customized-reports/${transfer:UserName}.pdf\" } ]\n

              \n\n

              In most cases, you can use this value instead of the session policy to lock your user\n down to the designated home directory (\"chroot\"). To do this, you can set\n Entry to / and set Target to the HomeDirectory\n parameter value.

              \n

              The following is an Entry and Target pair example for chroot.

              \n

              \n [ { \"Entry:\": \"/\", \"Target\": \"/bucket_name/home/mydirectory\" } ]\n

              \n \n \n

              If the target of a logical directory entry does not exist in Amazon S3 or EFS, the entry is\n ignored. As a workaround, you can use the Amazon S3 API or EFS API to create 0 byte objects as place\n holders for your directory. If using the CLI, use the s3api or efsapi call instead of\n s3 or efs so you can use the put-object operation. For example, you use the\n following: aws s3api put-object --bucket bucketname --key path/to/folder/. Make\n sure that the end of the key name ends in a / for it to be considered a folder.

              \n
              " + "smithy.api#documentation": "

              Logical directory mappings that specify what Amazon S3 or Amazon EFS paths and keys should\n be visible to your user and how you want to make them visible. You must specify the\n Entry and Target pair, where Entry shows how the path\n is made visible and Target is the actual Amazon S3 or Amazon EFS path. If you\n only specify a target, it is displayed as is. You also must ensure that your Amazon Web Services Identity\n and Access Management (IAM) role provides access to paths in Target. This value\n can only be set when HomeDirectoryType is set to\n LOGICAL.

              \n\n

              The following is an Entry and Target pair example.

              \n\n

              \n [ { \"Entry\": \"/directory1\", \"Target\":\n \"/bucket_name/home/mydirectory\" } ]\n

              \n\n

              In most cases, you can use this value instead of the session policy to lock your user\n down to the designated home directory (\"chroot\"). To do this, you can set\n Entry to / and set Target to the HomeDirectory\n parameter value.

              \n

              The following is an Entry and Target pair example for chroot.

              \n

              \n [ { \"Entry:\": \"/\", \"Target\": \"/bucket_name/home/mydirectory\" } ]\n

              \n \n \n

              If the target of a logical directory entry does not exist in Amazon S3 or EFS, the entry is\n ignored. As a workaround, you can use the Amazon S3 API or EFS API to create 0 byte objects as place\n holders for your directory. If using the CLI, use the s3api or efsapi call instead of\n s3 or efs so you can use the put-object operation. For example, you use the\n following: aws s3api put-object --bucket bucketname --key path/to/folder/. Make\n sure that the end of the key name ends in a / for it to be considered a folder.

              \n
              " } }, "Policy": { @@ -508,14 +508,14 @@ "Steps": { "target": "com.amazonaws.transfer#WorkflowSteps", "traits": { - "smithy.api#documentation": "

              Specifies the details for the steps that are in the specified workflow.

              \n

              \n The TYPE specifies which of the following actions is being taken for this step.\n

              \n
                \n
              • \n

                \n Copy: copy the file to another location

                \n
              • \n
              • \n

                \n Custom: custom step with a lambda target

                \n
              • \n
              • \n

                \n Delete: delete the file

                \n
              • \n
              • \n

                \n Tag: add a tag to the file

                \n
              • \n
              \n

              \n For file location, you specify either the S3 bucket and key, or the EFS filesystem ID and path.\n

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

              Specifies the details for the steps that are in the specified workflow.

              \n

              \n The TYPE specifies which of the following actions is being taken for this step.\n

              \n
                \n
              • \n

                \n Copy: copy the file to another location

                \n
              • \n
              • \n

                \n Custom: custom step with a lambda target

                \n
              • \n
              • \n

                \n Delete: delete the file

                \n
              • \n
              • \n

                \n Tag: add a tag to the file

                \n
              • \n
              \n \n

              \n Currently, copying and tagging are supported only on S3.\n

              \n
              \n

              \n For file location, you specify either the S3 bucket and key, or the EFS filesystem ID and path.\n

              ", "smithy.api#required": {} } }, "OnExceptionSteps": { "target": "com.amazonaws.transfer#WorkflowSteps", "traits": { - "smithy.api#documentation": "

              Specifies the steps (actions) to take if any errors are encountered during execution of the workflow.

              " + "smithy.api#documentation": "

              Specifies the steps (actions) to take if errors are encountered during execution of the workflow.

              \n \n

              For custom steps, the lambda function needs to send FAILURE to the call\n back API to kick off the exception steps. Additionally, if the lambda does not send\n SUCCESS before it times out, the exception steps are executed.

              \n
              " } }, "Tags": { @@ -745,7 +745,7 @@ } }, "traits": { - "smithy.api#documentation": "

              The name of the step, used to identify the step that is being deleted.

              " + "smithy.api#documentation": "

              The name of the step, used to identify the delete step.

              " } }, "com.amazonaws.transfer#DeleteUser": { @@ -1520,7 +1520,7 @@ "OnExceptionSteps": { "target": "com.amazonaws.transfer#WorkflowSteps", "traits": { - "smithy.api#documentation": "

              Specifies the steps (actions) to take if any errors are encountered during execution of the workflow.

              " + "smithy.api#documentation": "

              Specifies the steps (actions) to take if errors are encountered during execution of the workflow.

              " } }, "WorkflowId": { @@ -1582,7 +1582,7 @@ } }, "traits": { - "smithy.api#documentation": "

              Specifies the details for the file location for the file being used in the workflow. Only applicable if you are using Amazon EFS for storage.

              \n

              \n You need to provide the file system ID and the pathname.\n The pathname can represent either a path or a file.\n This is determined by whether or not you end the path value with the forward slash (/) character.\n If the final character is \"/\", then your file is copied to the folder, and its name does not change.\n If, rather, the final character is alphanumeric, your uploaded file is renamed to the path value. In this case, if a file with that name already exists, it is overwritten.\n

              \n

              For example, if your path is shared-files/bob/, your uploaded files are copied to the shared-files/bob/, folder.\n If your path is shared-files/today, each uploaded file is copied to the shared-files folder and named today:\n each upload overwrites the previous version of the bob file.

              " + "smithy.api#documentation": "

              Reserved for future use.

              \n

              \n \n

              " } }, "com.amazonaws.transfer#EfsFileSystemId": { @@ -1720,7 +1720,7 @@ "OnExceptionSteps": { "target": "com.amazonaws.transfer#ExecutionStepResults", "traits": { - "smithy.api#documentation": "

              Specifies the steps (actions) to take if any errors are encountered during execution of the workflow.

              " + "smithy.api#documentation": "

              Specifies the steps (actions) to take if errors are encountered during execution of the workflow.

              " } } }, @@ -2042,7 +2042,7 @@ "EfsFileLocation": { "target": "com.amazonaws.transfer#EfsFileLocation", "traits": { - "smithy.api#documentation": "

              Specifies the details for the Amazon EFS file being copied.

              " + "smithy.api#documentation": "

              Reserved for future use.

              " } } }, @@ -3182,7 +3182,7 @@ } }, "traits": { - "smithy.api#documentation": "

              Specifies the details for the file location for the file being used in the workflow. Only applicable if you are using S3 storage.

              \n

              \n You need to provide the bucket and key.\n The key can represent either a path or a file.\n This is determined by whether or not you end the key value with the forward slash (/) character.\n If the final character is \"/\", then your file is copied to the folder, and its name does not change.\n If, rather, the final character is alphanumeric, your uploaded file is renamed to the path value. In this case, if a file with that name already exists, it is overwritten.\n

              \n

              For example, if your path is shared-files/bob/, your uploaded files are copied to the shared-files/bob/, folder.\n If your path is shared-files/today, each uploaded file is copied to the shared-files folder and named today:\n each upload overwrites the previous version of the bob file.

              " + "smithy.api#documentation": "

              Specifies the details for the file location for the file being used in the workflow. Only applicable if you are using S3 storage.

              " } }, "com.amazonaws.transfer#S3InputFileLocation": { @@ -3191,7 +3191,7 @@ "Bucket": { "target": "com.amazonaws.transfer#S3Bucket", "traits": { - "smithy.api#documentation": "

              Specifies the S3 bucket that contains the file being copied.

              " + "smithy.api#documentation": "

              Specifies the S3 bucket for the customer input file.

              " } }, "Key": { @@ -3202,7 +3202,7 @@ } }, "traits": { - "smithy.api#documentation": "

              Specifies the details for the S3 file being copied.

              " + "smithy.api#documentation": "

              Specifies the customer input S3 file location. If it is used inside copyStepDetails.DestinationFileLocation, it should be the S3 copy destination.

              \n

              \n You need to provide the bucket and key.\n The key can represent either a path or a file.\n This is determined by whether or not you end the key value with the forward slash (/) character.\n If the final character is \"/\", then your file is copied to the folder, and its name does not change.\n If, rather, the final character is alphanumeric, your uploaded file is renamed to the path value. In this case, if a file with that name already exists, it is overwritten.\n

              \n

              For example, if your path is shared-files/bob/, your uploaded files are copied to the shared-files/bob/, folder.\n If your path is shared-files/today, each uploaded file is copied to the shared-files folder and named today:\n each upload overwrites the previous version of the bob file.

              " } }, "com.amazonaws.transfer#S3Key": { @@ -4110,7 +4110,7 @@ "HomeDirectoryMappings": { "target": "com.amazonaws.transfer#HomeDirectoryMappings", "traits": { - "smithy.api#documentation": "

              Logical directory mappings that specify what Amazon S3 or Amazon EFS paths and keys should\n be visible to your user and how you want to make them visible. You must specify the\n Entry and Target pair, where Entry shows how the path\n is made visible and Target is the actual Amazon S3 or Amazon EFS path. If you\n only specify a target, it is displayed as is. You also must ensure that your Amazon Web Services Identity\n and Access Management (IAM) role provides access to paths in Target. This value\n can only be set when HomeDirectoryType is set to\n LOGICAL.

              \n

              The following is an Entry and Target pair example.

              \n

              \n [ { \"Entry\": \"your-personal-report.pdf\", \"Target\": \"/bucket3/customized-reports/${transfer:UserName}.pdf\" } ]\n

              \n

              In most cases, you can use this value instead of the session policy to lock down your\n user to the designated home directory (\"chroot\"). To do this, you can set\n Entry to / and set Target to the\n HomeDirectory parameter value.

              \n

              The following is an Entry and Target pair example for chroot.

              \n

              \n [ { \"Entry:\": \"/\", \"Target\": \"/bucket_name/home/mydirectory\" } ]\n

              \n \n \n

              If the target of a logical directory entry does not exist in Amazon S3 or EFS, the entry is\n ignored. As a workaround, you can use the Amazon S3 API or EFS API to create 0 byte objects as place\n holders for your directory. If using the CLI, use the s3api or efsapi call instead of\n s3 or efs so you can use the put-object operation. For example, you use the\n following: aws s3api put-object --bucket bucketname --key path/to/folder/. Make\n sure that the end of the key name ends in a / for it to be considered a folder.

              \n
              " + "smithy.api#documentation": "

              Logical directory mappings that specify what Amazon S3 or Amazon EFS paths and keys should\n be visible to your user and how you want to make them visible. You must specify the\n Entry and Target pair, where Entry shows how the path\n is made visible and Target is the actual Amazon S3 or Amazon EFS path. If you\n only specify a target, it is displayed as is. You also must ensure that your Amazon Web Services Identity\n and Access Management (IAM) role provides access to paths in Target. This value\n can only be set when HomeDirectoryType is set to\n LOGICAL.

              \n

              The following is an Entry and Target pair example.

              \n

              \n [ { \"Entry\": \"/directory1\", \"Target\": \"/bucket_name/home/mydirectory\" } ]\n

              \n

              In most cases, you can use this value instead of the session policy to lock down your\n user to the designated home directory (\"chroot\"). To do this, you can set\n Entry to / and set Target to the\n HomeDirectory parameter value.

              \n

              The following is an Entry and Target pair example for chroot.

              \n

              \n [ { \"Entry:\": \"/\", \"Target\": \"/bucket_name/home/mydirectory\" } ]\n

              \n \n \n

              If the target of a logical directory entry does not exist in Amazon S3 or EFS, the entry is\n ignored. As a workaround, you can use the Amazon S3 API or EFS API to create 0 byte objects as place\n holders for your directory. If using the CLI, use the s3api or efsapi call instead of\n s3 or efs so you can use the put-object operation. For example, you use the\n following: aws s3api put-object --bucket bucketname --key path/to/folder/. Make\n sure that the end of the key name ends in a / for it to be considered a folder.

              \n
              " } }, "Policy": { @@ -4332,7 +4332,7 @@ "HomeDirectoryMappings": { "target": "com.amazonaws.transfer#HomeDirectoryMappings", "traits": { - "smithy.api#documentation": "

              Logical directory mappings that specify what Amazon S3 or Amazon EFS paths and keys should\n be visible to your user and how you want to make them visible. You must specify the\n Entry and Target pair, where Entry shows how the path\n is made visible and Target is the actual Amazon S3 or Amazon EFS path. If you\n only specify a target, it is displayed as is. You also must ensure that your Amazon Web Services Identity\n and Access Management (IAM) role provides access to paths in Target. This value\n can only be set when HomeDirectoryType is set to\n LOGICAL.

              \n\n

              The following is an Entry and Target pair example.

              \n

              \n [ { \"Entry\": \"your-personal-report.pdf\", \"Target\":\n \"/bucket3/customized-reports/${transfer:UserName}.pdf\" } ]\n

              \n\n

              In most cases, you can use this value instead of the session policy to lock down your\n user to the designated home directory (\"chroot\"). To do this, you can set\n Entry to '/' and set Target to the HomeDirectory\n parameter value.

              \n\n

              The following is an Entry and Target pair example for chroot.

              \n

              \n [ { \"Entry:\": \"/\", \"Target\": \"/bucket_name/home/mydirectory\" } ]\n

              \n \n \n

              If the target of a logical directory entry does not exist in Amazon S3 or EFS, the entry is\n ignored. As a workaround, you can use the Amazon S3 API or EFS API to create 0 byte objects as place\n holders for your directory. If using the CLI, use the s3api or efsapi call instead of\n s3 or efs so you can use the put-object operation. For example, you use the\n following: aws s3api put-object --bucket bucketname --key path/to/folder/. Make\n sure that the end of the key name ends in a / for it to be considered a folder.

              \n
              " + "smithy.api#documentation": "

              Logical directory mappings that specify what Amazon S3 or Amazon EFS paths and keys should\n be visible to your user and how you want to make them visible. You must specify the\n Entry and Target pair, where Entry shows how the path\n is made visible and Target is the actual Amazon S3 or Amazon EFS path. If you\n only specify a target, it is displayed as is. You also must ensure that your Amazon Web Services Identity\n and Access Management (IAM) role provides access to paths in Target. This value\n can only be set when HomeDirectoryType is set to\n LOGICAL.

              \n\n

              The following is an Entry and Target pair example.

              \n

              \n [ { \"Entry\": \"/directory1\", \"Target\":\n \"/bucket_name/home/mydirectory\" } ]\n

              \n\n

              In most cases, you can use this value instead of the session policy to lock down your\n user to the designated home directory (\"chroot\"). To do this, you can set\n Entry to '/' and set Target to the HomeDirectory\n parameter value.

              \n\n

              The following is an Entry and Target pair example for chroot.

              \n

              \n [ { \"Entry:\": \"/\", \"Target\": \"/bucket_name/home/mydirectory\" } ]\n

              \n \n \n

              If the target of a logical directory entry does not exist in Amazon S3 or EFS, the entry is\n ignored. As a workaround, you can use the Amazon S3 API or EFS API to create 0 byte objects as place\n holders for your directory. If using the CLI, use the s3api or efsapi call instead of\n s3 or efs so you can use the put-object operation. For example, you use the\n following: aws s3api put-object --bucket bucketname --key path/to/folder/. Make\n sure that the end of the key name ends in a / for it to be considered a folder.

              \n
              " } }, "Policy": { @@ -4536,7 +4536,7 @@ "CopyStepDetails": { "target": "com.amazonaws.transfer#CopyStepDetails", "traits": { - "smithy.api#documentation": "

              Details for a step that performs a file copy.

              \n

              \n Consists of the following values:\n

              \n
                \n
              • \n

                A description

                \n
              • \n
              • \n

                An S3 or EFS location for the destination of the file copy.

                \n
              • \n
              • \n

                A flag that indicates whether or not to overwrite an existing file of the same name.\n The default is FALSE.

                \n
              • \n
              " + "smithy.api#documentation": "

              Details for a step that performs a file copy.

              \n

              \n Consists of the following values:\n

              \n
                \n
              • \n

                A description

                \n
              • \n
              • \n

                An S3 location for the destination of the file copy.

                \n
              • \n
              • \n

                A flag that indicates whether or not to overwrite an existing file of the same name.\n The default is FALSE.

                \n
              • \n
              " } }, "CustomStepDetails": { @@ -4548,7 +4548,7 @@ "DeleteStepDetails": { "target": "com.amazonaws.transfer#DeleteStepDetails", "traits": { - "smithy.api#documentation": "

              You need to specify the name of the file to be deleted.

              " + "smithy.api#documentation": "

              Details for a step that deletes the file.

              " } }, "TagStepDetails": { diff --git a/codegen/sdk-codegen/aws-models/voice-id.2021-09-27.json b/codegen/sdk-codegen/aws-models/voice-id.2021-09-27.json new file mode 100644 index 0000000000000..d01d102116ded --- /dev/null +++ b/codegen/sdk-codegen/aws-models/voice-id.2021-09-27.json @@ -0,0 +1,3194 @@ +{ + "smithy": "1.0", + "shapes": { + "com.amazonaws.voiceid#AccessDeniedException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.voiceid#String" + } + }, + "traits": { + "smithy.api#documentation": "

              You do not have sufficient permissions to perform this action. Check the error message and try \n again.

              ", + "smithy.api#error": "client", + "smithy.api#httpError": 403 + } + }, + "com.amazonaws.voiceid#AmazonResourceName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1011 + }, + "smithy.api#pattern": "^arn:aws(-[^:]+)?:voiceid.+:[0-9]{12}:domain/[a-zA-Z0-9]{22}$" + } + }, + "com.amazonaws.voiceid#Arn": { + "type": "string", + "traits": { + "smithy.api#pattern": "^arn:aws(-[^:]+)?:voiceid.+:[0-9]{12}:domain/[a-zA-Z0-9]{22}$" + } + }, + "com.amazonaws.voiceid#AuthenticationConfiguration": { + "type": "structure", + "members": { + "AcceptanceThreshold": { + "target": "com.amazonaws.voiceid#Score", + "traits": { + "smithy.api#documentation": "

              The minimum threshold needed to successfully authenticate a speaker.

              ", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

              The configuration used to authenticate a speaker during a session.

              " + } + }, + "com.amazonaws.voiceid#AuthenticationDecision": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "ACCEPT", + "name": "ACCEPT" + }, + { + "value": "REJECT", + "name": "REJECT" + }, + { + "value": "NOT_ENOUGH_SPEECH", + "name": "NOT_ENOUGH_SPEECH" + }, + { + "value": "SPEAKER_NOT_ENROLLED", + "name": "SPEAKER_NOT_ENROLLED" + }, + { + "value": "SPEAKER_OPTED_OUT", + "name": "SPEAKER_OPTED_OUT" + }, + { + "value": "SPEAKER_ID_NOT_PROVIDED", + "name": "SPEAKER_ID_NOT_PROVIDED" + } + ] + } + }, + "com.amazonaws.voiceid#AuthenticationResult": { + "type": "structure", + "members": { + "AuthenticationResultId": { + "target": "com.amazonaws.voiceid#UniqueIdLarge", + "traits": { + "smithy.api#documentation": "

              The unique identifier for this authentication result. Because there can be multiple authentications\n for a given session, this field helps to identify if the returned result is from a previous streaming \n activity or a new result. Note that in absence of any new streaming activity, \n AcceptanceThreshold changes, or SpeakerId changes, Voice ID \n always returns cached Authentication Result for this API.

              " + } + }, + "AudioAggregationStartedAt": { + "target": "com.amazonaws.voiceid#Timestamp", + "traits": { + "smithy.api#documentation": "

              A timestamp indicating when audio aggregation started for this authentication result.

              " + } + }, + "AudioAggregationEndedAt": { + "target": "com.amazonaws.voiceid#Timestamp", + "traits": { + "smithy.api#documentation": "

              A timestamp indicating when audio aggregation ended for this authentication result.

              " + } + }, + "CustomerSpeakerId": { + "target": "com.amazonaws.voiceid#CustomerSpeakerId", + "traits": { + "smithy.api#documentation": "

              The client-provided identifier for the speaker whose authentication result is produced. Only present if a\n SpeakerId is provided for the session.

              " + } + }, + "GeneratedSpeakerId": { + "target": "com.amazonaws.voiceid#GeneratedSpeakerId", + "traits": { + "smithy.api#documentation": "

              The service-generated identifier for the speaker whose authentication result is produced.

              " + } + }, + "Decision": { + "target": "com.amazonaws.voiceid#AuthenticationDecision", + "traits": { + "smithy.api#documentation": "

              The authentication decision produced by Voice ID, processed against the current session state and streamed\n audio of the speaker.

              " + } + }, + "Score": { + "target": "com.amazonaws.voiceid#Score", + "traits": { + "smithy.api#documentation": "

              The authentication score for the speaker whose authentication result is produced. This value is \n only present if the authentication decision is either ACCEPT or REJECT.

              " + } + }, + "Configuration": { + "target": "com.amazonaws.voiceid#AuthenticationConfiguration", + "traits": { + "smithy.api#documentation": "

              The AuthenticationConfiguration used to generate this authentication result.

              " + } + } + }, + "traits": { + "smithy.api#documentation": "

              The authentication result produced by Voice ID, processed against the current session state and streamed\n audio of the speaker.

              " + } + }, + "com.amazonaws.voiceid#ClientTokenString": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 64 + }, + "smithy.api#pattern": "^[a-zA-Z0-9-_]+$" + } + }, + "com.amazonaws.voiceid#ConflictException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.voiceid#String" + }, + "ConflictType": { + "target": "com.amazonaws.voiceid#ConflictType", + "traits": { + "smithy.api#documentation": "

              The type of conflict which caused a ConflictException. Possible types and the corresponding error messages\n are as follows:

              \n
                \n
              • \n

                \n DOMAIN_NOT_ACTIVE: The domain is not active.

                \n
              • \n
              • \n

                \n CANNOT_CHANGE_SPEAKER_AFTER_ENROLLMENT: You cannot change the speaker ID after an enrollment has been requested.

                \n
              • \n
              • \n

                \n ENROLLMENT_ALREADY_EXISTS: There is already an enrollment for this session.

                \n
              • \n
              • \n

                \n SPEAKER_NOT_SET: You must set the speaker ID before requesting an enrollment.

                \n
              • \n
              • \n

                \n SPEAKER_OPTED_OUT: You cannot request an enrollment for an opted out speaker.

                \n
              • \n
              • \n

                \n CONCURRENT_CHANGES: The request could not be processed as the resource was modified by another request during execution.

                \n
              • \n
              " + } + } + }, + "traits": { + "smithy.api#documentation": "

              The request failed due to a conflict. Check the ConflictType and error message for\n more details.

              ", + "smithy.api#error": "client", + "smithy.api#httpError": 409 + } + }, + "com.amazonaws.voiceid#ConflictType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "ANOTHER_ACTIVE_STREAM", + "name": "ANOTHER_ACTIVE_STREAM" + }, + { + "value": "DOMAIN_NOT_ACTIVE", + "name": "DOMAIN_NOT_ACTIVE" + }, + { + "value": "CANNOT_CHANGE_SPEAKER_AFTER_ENROLLMENT", + "name": "CANNOT_CHANGE_SPEAKER_AFTER_ENROLLMENT" + }, + { + "value": "ENROLLMENT_ALREADY_EXISTS", + "name": "ENROLLMENT_ALREADY_EXISTS" + }, + { + "value": "SPEAKER_NOT_SET", + "name": "SPEAKER_NOT_SET" + }, + { + "value": "SPEAKER_OPTED_OUT", + "name": "SPEAKER_OPTED_OUT" + }, + { + "value": "CONCURRENT_CHANGES", + "name": "CONCURRENT_CHANGES" + } + ] + } + }, + "com.amazonaws.voiceid#CreateDomain": { + "type": "operation", + "input": { + "target": "com.amazonaws.voiceid#CreateDomainRequest" + }, + "output": { + "target": "com.amazonaws.voiceid#CreateDomainResponse" + }, + "errors": [ + { + "target": "com.amazonaws.voiceid#AccessDeniedException" + }, + { + "target": "com.amazonaws.voiceid#ConflictException" + }, + { + "target": "com.amazonaws.voiceid#InternalServerException" + }, + { + "target": "com.amazonaws.voiceid#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.voiceid#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.voiceid#ThrottlingException" + }, + { + "target": "com.amazonaws.voiceid#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

              Creates a domain that contains all Amazon Connect Voice ID data, such as speakers, fraudsters, customer \n audio, and voiceprints.\n

              ", + "smithy.api#http": { + "method": "POST", + "uri": "/domains", + "code": 200 + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.voiceid#CreateDomainRequest": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.voiceid#DomainName", + "traits": { + "smithy.api#documentation": "

              The name of the domain.

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

              A brief description of this domain.

              " + } + }, + "ServerSideEncryptionConfiguration": { + "target": "com.amazonaws.voiceid#ServerSideEncryptionConfiguration", + "traits": { + "smithy.api#documentation": "

              The configuration, containing the KMS Key Identifier, to be used by Voice ID for \n the server-side encryption of your data. Refer to \n Amazon Connect VoiceID encryption at rest for more details on how the KMS Key is used.\n

              ", + "smithy.api#required": {} + } + }, + "ClientToken": { + "target": "com.amazonaws.voiceid#ClientTokenString", + "traits": { + "smithy.api#documentation": "

              The idempotency token for creating a new domain. If not provided, Amazon Web Services SDK populates \n this field.

              ", + "smithy.api#idempotencyToken": {} + } + }, + "Tags": { + "target": "com.amazonaws.voiceid#TagList", + "traits": { + "smithy.api#documentation": "

              A list of tags you want added to the domain.

              " + } + } + } + }, + "com.amazonaws.voiceid#CreateDomainResponse": { + "type": "structure", + "members": { + "Domain": { + "target": "com.amazonaws.voiceid#Domain", + "traits": { + "smithy.api#documentation": "

              Information about the newly created domain.

              " + } + } + } + }, + "com.amazonaws.voiceid#CustomerSpeakerId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 256 + }, + "smithy.api#pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]*$", + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.voiceid#DeleteDomain": { + "type": "operation", + "input": { + "target": "com.amazonaws.voiceid#DeleteDomainRequest" + }, + "errors": [ + { + "target": "com.amazonaws.voiceid#AccessDeniedException" + }, + { + "target": "com.amazonaws.voiceid#ConflictException" + }, + { + "target": "com.amazonaws.voiceid#InternalServerException" + }, + { + "target": "com.amazonaws.voiceid#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.voiceid#ThrottlingException" + }, + { + "target": "com.amazonaws.voiceid#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

              Deletes the specified domain from the Amazon Connect Voice ID system.

              ", + "smithy.api#http": { + "method": "DELETE", + "uri": "/domains/{DomainId}", + "code": 204 + } + } + }, + "com.amazonaws.voiceid#DeleteDomainRequest": { + "type": "structure", + "members": { + "DomainId": { + "target": "com.amazonaws.voiceid#DomainId", + "traits": { + "smithy.api#documentation": "

              The identifier of the domain you want to delete.

              ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.voiceid#DeleteFraudster": { + "type": "operation", + "input": { + "target": "com.amazonaws.voiceid#DeleteFraudsterRequest" + }, + "errors": [ + { + "target": "com.amazonaws.voiceid#AccessDeniedException" + }, + { + "target": "com.amazonaws.voiceid#InternalServerException" + }, + { + "target": "com.amazonaws.voiceid#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.voiceid#ThrottlingException" + }, + { + "target": "com.amazonaws.voiceid#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

              Deletes the specified fraudster from the Amazon Connect Voice ID system.

              ", + "smithy.api#http": { + "method": "DELETE", + "uri": "/domains/{DomainId}/fraudsters/{FraudsterId}", + "code": 204 + } + } + }, + "com.amazonaws.voiceid#DeleteFraudsterRequest": { + "type": "structure", + "members": { + "DomainId": { + "target": "com.amazonaws.voiceid#DomainId", + "traits": { + "smithy.api#documentation": "

              The identifier of the domain containing the fraudster.

              ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "FraudsterId": { + "target": "com.amazonaws.voiceid#FraudsterId", + "traits": { + "smithy.api#documentation": "

              The identifier of the fraudster you want to delete.

              ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.voiceid#DeleteSpeaker": { + "type": "operation", + "input": { + "target": "com.amazonaws.voiceid#DeleteSpeakerRequest" + }, + "errors": [ + { + "target": "com.amazonaws.voiceid#AccessDeniedException" + }, + { + "target": "com.amazonaws.voiceid#ConflictException" + }, + { + "target": "com.amazonaws.voiceid#InternalServerException" + }, + { + "target": "com.amazonaws.voiceid#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.voiceid#ThrottlingException" + }, + { + "target": "com.amazonaws.voiceid#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

              Deletes the specified speaker from the Amazon Connect Voice ID system.

              ", + "smithy.api#http": { + "method": "DELETE", + "uri": "/domains/{DomainId}/speakers/{SpeakerId}", + "code": 204 + } + } + }, + "com.amazonaws.voiceid#DeleteSpeakerRequest": { + "type": "structure", + "members": { + "DomainId": { + "target": "com.amazonaws.voiceid#DomainId", + "traits": { + "smithy.api#documentation": "

              The identifier of the domain containing the speaker.

              ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "SpeakerId": { + "target": "com.amazonaws.voiceid#SpeakerId", + "traits": { + "smithy.api#documentation": "

              The identifier of the speaker you want to delete.

              ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.voiceid#DescribeDomain": { + "type": "operation", + "input": { + "target": "com.amazonaws.voiceid#DescribeDomainRequest" + }, + "output": { + "target": "com.amazonaws.voiceid#DescribeDomainResponse" + }, + "errors": [ + { + "target": "com.amazonaws.voiceid#AccessDeniedException" + }, + { + "target": "com.amazonaws.voiceid#InternalServerException" + }, + { + "target": "com.amazonaws.voiceid#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.voiceid#ThrottlingException" + }, + { + "target": "com.amazonaws.voiceid#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

              Describes the specified domain.

              ", + "smithy.api#http": { + "method": "GET", + "uri": "/domains/{DomainId}", + "code": 200 + } + } + }, + "com.amazonaws.voiceid#DescribeDomainRequest": { + "type": "structure", + "members": { + "DomainId": { + "target": "com.amazonaws.voiceid#DomainId", + "traits": { + "smithy.api#documentation": "

              The identifier of the domain you are describing.

              ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.voiceid#DescribeDomainResponse": { + "type": "structure", + "members": { + "Domain": { + "target": "com.amazonaws.voiceid#Domain", + "traits": { + "smithy.api#documentation": "

              Information about the specified domain.

              " + } + } + } + }, + "com.amazonaws.voiceid#DescribeFraudster": { + "type": "operation", + "input": { + "target": "com.amazonaws.voiceid#DescribeFraudsterRequest" + }, + "output": { + "target": "com.amazonaws.voiceid#DescribeFraudsterResponse" + }, + "errors": [ + { + "target": "com.amazonaws.voiceid#AccessDeniedException" + }, + { + "target": "com.amazonaws.voiceid#InternalServerException" + }, + { + "target": "com.amazonaws.voiceid#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.voiceid#ThrottlingException" + }, + { + "target": "com.amazonaws.voiceid#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

              Describes the specified fraudster.

              ", + "smithy.api#http": { + "method": "GET", + "uri": "/domains/{DomainId}/fraudsters/{FraudsterId}", + "code": 200 + } + } + }, + "com.amazonaws.voiceid#DescribeFraudsterRegistrationJob": { + "type": "operation", + "input": { + "target": "com.amazonaws.voiceid#DescribeFraudsterRegistrationJobRequest" + }, + "output": { + "target": "com.amazonaws.voiceid#DescribeFraudsterRegistrationJobResponse" + }, + "errors": [ + { + "target": "com.amazonaws.voiceid#AccessDeniedException" + }, + { + "target": "com.amazonaws.voiceid#InternalServerException" + }, + { + "target": "com.amazonaws.voiceid#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.voiceid#ThrottlingException" + }, + { + "target": "com.amazonaws.voiceid#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

              Describes the specified fraudster registration job.

              ", + "smithy.api#http": { + "method": "GET", + "uri": "/domains/{DomainId}/fraudster-registration-jobs/{JobId}", + "code": 200 + } + } + }, + "com.amazonaws.voiceid#DescribeFraudsterRegistrationJobRequest": { + "type": "structure", + "members": { + "DomainId": { + "target": "com.amazonaws.voiceid#DomainId", + "traits": { + "smithy.api#documentation": "

              The identifier for the domain containing the fraudster registration job.

              ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "JobId": { + "target": "com.amazonaws.voiceid#JobId", + "traits": { + "smithy.api#documentation": "

              The identifier for the fraudster registration job you are describing.

              ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.voiceid#DescribeFraudsterRegistrationJobResponse": { + "type": "structure", + "members": { + "Job": { + "target": "com.amazonaws.voiceid#FraudsterRegistrationJob", + "traits": { + "smithy.api#documentation": "

              Contains details about the specified fraudster registration job.

              " + } + } + } + }, + "com.amazonaws.voiceid#DescribeFraudsterRequest": { + "type": "structure", + "members": { + "DomainId": { + "target": "com.amazonaws.voiceid#DomainId", + "traits": { + "smithy.api#documentation": "

              The identifier of the domain containing the fraudster.

              ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "FraudsterId": { + "target": "com.amazonaws.voiceid#FraudsterId", + "traits": { + "smithy.api#documentation": "

              The identifier of the fraudster you are describing.

              ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.voiceid#DescribeFraudsterResponse": { + "type": "structure", + "members": { + "Fraudster": { + "target": "com.amazonaws.voiceid#Fraudster", + "traits": { + "smithy.api#documentation": "

              Information about the specified fraudster.

              " + } + } + } + }, + "com.amazonaws.voiceid#DescribeSpeaker": { + "type": "operation", + "input": { + "target": "com.amazonaws.voiceid#DescribeSpeakerRequest" + }, + "output": { + "target": "com.amazonaws.voiceid#DescribeSpeakerResponse" + }, + "errors": [ + { + "target": "com.amazonaws.voiceid#AccessDeniedException" + }, + { + "target": "com.amazonaws.voiceid#InternalServerException" + }, + { + "target": "com.amazonaws.voiceid#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.voiceid#ThrottlingException" + }, + { + "target": "com.amazonaws.voiceid#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

              Describes the specified speaker.

              ", + "smithy.api#http": { + "method": "GET", + "uri": "/domains/{DomainId}/speakers/{SpeakerId}", + "code": 200 + } + } + }, + "com.amazonaws.voiceid#DescribeSpeakerEnrollmentJob": { + "type": "operation", + "input": { + "target": "com.amazonaws.voiceid#DescribeSpeakerEnrollmentJobRequest" + }, + "output": { + "target": "com.amazonaws.voiceid#DescribeSpeakerEnrollmentJobResponse" + }, + "errors": [ + { + "target": "com.amazonaws.voiceid#AccessDeniedException" + }, + { + "target": "com.amazonaws.voiceid#InternalServerException" + }, + { + "target": "com.amazonaws.voiceid#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.voiceid#ThrottlingException" + }, + { + "target": "com.amazonaws.voiceid#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

              Describes the specified speaker enrollment job.

              ", + "smithy.api#http": { + "method": "GET", + "uri": "/domains/{DomainId}/speaker-enrollment-jobs/{JobId}", + "code": 200 + } + } + }, + "com.amazonaws.voiceid#DescribeSpeakerEnrollmentJobRequest": { + "type": "structure", + "members": { + "DomainId": { + "target": "com.amazonaws.voiceid#DomainId", + "traits": { + "smithy.api#documentation": "

              The identifier of the domain containing the speaker enrollment job.

              ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "JobId": { + "target": "com.amazonaws.voiceid#JobId", + "traits": { + "smithy.api#documentation": "

              The identifier of the speaker enrollment job you are describing.

              ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.voiceid#DescribeSpeakerEnrollmentJobResponse": { + "type": "structure", + "members": { + "Job": { + "target": "com.amazonaws.voiceid#SpeakerEnrollmentJob", + "traits": { + "smithy.api#documentation": "

              Contains details about the specified speaker enrollment job.

              " + } + } + } + }, + "com.amazonaws.voiceid#DescribeSpeakerRequest": { + "type": "structure", + "members": { + "DomainId": { + "target": "com.amazonaws.voiceid#DomainId", + "traits": { + "smithy.api#documentation": "

              The identifier of the domain that contains the speaker.

              ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "SpeakerId": { + "target": "com.amazonaws.voiceid#SpeakerId", + "traits": { + "smithy.api#documentation": "

              The identifier of the speaker you are describing.

              ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.voiceid#DescribeSpeakerResponse": { + "type": "structure", + "members": { + "Speaker": { + "target": "com.amazonaws.voiceid#Speaker", + "traits": { + "smithy.api#documentation": "

              Information about the specified speaker.

              " + } + } + } + }, + "com.amazonaws.voiceid#Description": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1024 + }, + "smithy.api#pattern": "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-%@]*)$", + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.voiceid#Domain": { + "type": "structure", + "members": { + "DomainId": { + "target": "com.amazonaws.voiceid#DomainId", + "traits": { + "smithy.api#documentation": "

              The service-generated identifier for the domain.

              " + } + }, + "Arn": { + "target": "com.amazonaws.voiceid#Arn", + "traits": { + "smithy.api#documentation": "

              The Amazon Resource Name (ARN) for the domain.

              " + } + }, + "Name": { + "target": "com.amazonaws.voiceid#DomainName", + "traits": { + "smithy.api#documentation": "

              The client-provided name for the domain.

              " + } + }, + "Description": { + "target": "com.amazonaws.voiceid#Description", + "traits": { + "smithy.api#documentation": "

              The client-provided description of the domain.

              " + } + }, + "DomainStatus": { + "target": "com.amazonaws.voiceid#DomainStatus", + "traits": { + "smithy.api#documentation": "

              The current status of the domain.

              " + } + }, + "ServerSideEncryptionConfiguration": { + "target": "com.amazonaws.voiceid#ServerSideEncryptionConfiguration", + "traits": { + "smithy.api#documentation": "

              The server-side encryption configuration containing the KMS Key Identifier you want Voice ID to use\n to encrypt your data.

              " + } + }, + "CreatedAt": { + "target": "com.amazonaws.voiceid#Timestamp", + "traits": { + "smithy.api#documentation": "

              The timestamp at which the domain is created.

              " + } + }, + "UpdatedAt": { + "target": "com.amazonaws.voiceid#Timestamp", + "traits": { + "smithy.api#documentation": "

              The timestamp showing the domain's last update.

              " + } + } + }, + "traits": { + "smithy.api#documentation": "

              Contains all the information about a domain.

              " + } + }, + "com.amazonaws.voiceid#DomainId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 22, + "max": 22 + }, + "smithy.api#pattern": "^[a-zA-Z0-9]{22}$" + } + }, + "com.amazonaws.voiceid#DomainName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 256 + }, + "smithy.api#pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]*$", + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.voiceid#DomainStatus": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "ACTIVE", + "name": "ACTIVE" + }, + { + "value": "PENDING", + "name": "PENDING" + }, + { + "value": "SUSPENDED", + "name": "SUSPENDED" + } + ] + } + }, + "com.amazonaws.voiceid#DomainSummaries": { + "type": "list", + "member": { + "target": "com.amazonaws.voiceid#DomainSummary" + } + }, + "com.amazonaws.voiceid#DomainSummary": { + "type": "structure", + "members": { + "DomainId": { + "target": "com.amazonaws.voiceid#DomainId", + "traits": { + "smithy.api#documentation": "

              The service-generated identifier for the domain.

              " + } + }, + "Arn": { + "target": "com.amazonaws.voiceid#Arn", + "traits": { + "smithy.api#documentation": "

              The Amazon Resource Name (ARN) for the domain.

              " + } + }, + "Name": { + "target": "com.amazonaws.voiceid#DomainName", + "traits": { + "smithy.api#documentation": "

              The client-provided name for the domain.

              " + } + }, + "Description": { + "target": "com.amazonaws.voiceid#Description", + "traits": { + "smithy.api#documentation": "

              The client-provided description of the domain.

              " + } + }, + "DomainStatus": { + "target": "com.amazonaws.voiceid#DomainStatus", + "traits": { + "smithy.api#documentation": "

              The current status of the domain.

              " + } + }, + "ServerSideEncryptionConfiguration": { + "target": "com.amazonaws.voiceid#ServerSideEncryptionConfiguration", + "traits": { + "smithy.api#documentation": "

              The server-side encryption configuration containing the KMS Key Identifier you want Voice ID to use\n to encrypt your data..

              " + } + }, + "CreatedAt": { + "target": "com.amazonaws.voiceid#Timestamp", + "traits": { + "smithy.api#documentation": "

              The timestamp showing when the domain is created.

              " + } + }, + "UpdatedAt": { + "target": "com.amazonaws.voiceid#Timestamp", + "traits": { + "smithy.api#documentation": "

              The timestamp showing the domain's last update.

              " + } + } + }, + "traits": { + "smithy.api#documentation": "

              Contains a summary of information about a domain.

              " + } + }, + "com.amazonaws.voiceid#DuplicateRegistrationAction": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "SKIP", + "name": "SKIP" + }, + { + "value": "REGISTER_AS_NEW", + "name": "REGISTER_AS_NEW" + } + ] + } + }, + "com.amazonaws.voiceid#EnrollmentConfig": { + "type": "structure", + "members": { + "ExistingEnrollmentAction": { + "target": "com.amazonaws.voiceid#ExistingEnrollmentAction", + "traits": { + "smithy.api#documentation": "

              The action to take when the specified speaker is already enrolled in the specified domain. The default \n value is SKIP, which skips the enrollment for the existing speaker. Setting the value to\n OVERWRITE replaces the existing voice prints and enrollment audio stored for that speaker\n with new data generated from the latest audio.

              " + } + }, + "FraudDetectionConfig": { + "target": "com.amazonaws.voiceid#EnrollmentJobFraudDetectionConfig", + "traits": { + "smithy.api#documentation": "

              The fraud detection configuration to use for the speaker enrollment job.

              " + } + } + }, + "traits": { + "smithy.api#documentation": "

              Contains configurations defining enrollment behavior for the batch job.

              " + } + }, + "com.amazonaws.voiceid#EnrollmentJobFraudDetectionConfig": { + "type": "structure", + "members": { + "FraudDetectionAction": { + "target": "com.amazonaws.voiceid#FraudDetectionAction", + "traits": { + "smithy.api#documentation": "

              The action to take when the given speaker is flagged by the fraud detection system. The default value is\n FAIL, which fails the speaker enrollment. Changing this value to IGNORE \n results in the speaker being enrolled even if they are flagged by the fraud detection system.

              " + } + }, + "RiskThreshold": { + "target": "com.amazonaws.voiceid#Score", + "traits": { + "smithy.api#documentation": "

              Threshold value for determining whether the speaker is a high risk to be fraudulent. If the detected risk\n score calculated by Voice ID is greater than or equal to the threshold, the speaker is considered a fraudster.

              " + } + } + }, + "traits": { + "smithy.api#documentation": "

              The configuration defining the action to take when a speaker is flagged by the fraud detection system\n during a batch speaker enrollment job, and the risk threshold to use for identification.

              " + } + }, + "com.amazonaws.voiceid#EvaluateSession": { + "type": "operation", + "input": { + "target": "com.amazonaws.voiceid#EvaluateSessionRequest" + }, + "output": { + "target": "com.amazonaws.voiceid#EvaluateSessionResponse" + }, + "errors": [ + { + "target": "com.amazonaws.voiceid#AccessDeniedException" + }, + { + "target": "com.amazonaws.voiceid#InternalServerException" + }, + { + "target": "com.amazonaws.voiceid#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.voiceid#ThrottlingException" + }, + { + "target": "com.amazonaws.voiceid#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

              Evaluates a specified session based on audio data accumulated during a streaming Amazon Connect Voice \n ID call.

              ", + "smithy.api#http": { + "method": "PUT", + "uri": "/sessions/{SessionNameOrId}/evaluate", + "code": 200 + } + } + }, + "com.amazonaws.voiceid#EvaluateSessionRequest": { + "type": "structure", + "members": { + "DomainId": { + "target": "com.amazonaws.voiceid#DomainId", + "traits": { + "smithy.api#documentation": "

              The identifier of the domain where the session started.

              ", + "smithy.api#httpQuery": "domainId", + "smithy.api#required": {} + } + }, + "SessionNameOrId": { + "target": "com.amazonaws.voiceid#SessionNameOrId", + "traits": { + "smithy.api#documentation": "

              The session identifier, or name of the session, that you want to evaluate. In Voice ID\n integration, this is the Contact-Id.

              ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.voiceid#EvaluateSessionResponse": { + "type": "structure", + "members": { + "DomainId": { + "target": "com.amazonaws.voiceid#DomainId", + "traits": { + "smithy.api#documentation": "

              The identifier of the domain containing the session.

              " + } + }, + "SessionId": { + "target": "com.amazonaws.voiceid#SessionId", + "traits": { + "smithy.api#documentation": "

              The service-generated identifier of the session.

              " + } + }, + "SessionName": { + "target": "com.amazonaws.voiceid#SessionName", + "traits": { + "smithy.api#documentation": "

              The client-provided name of the session.

              " + } + }, + "StreamingStatus": { + "target": "com.amazonaws.voiceid#StreamingStatus", + "traits": { + "smithy.api#documentation": "

              The current status of audio streaming for this session. This field is useful to infer next steps when\n the Authentication or Fraud Detection results are empty or the decision is NOT_ENOUGH_SPEECH.\n In this situation, if the StreamingStatus is ONGOING/PENDING_CONFIGURATION, it can\n mean that the client should call the API again later, once Voice ID has enough audio to produce a result.\n If the decision remains NOT_ENOUGH_SPEECH even after StreamingStatus is ENDED,\n it means that the previously streamed session did not have enough speech to perform evaluation, and a new\n streaming session is needed to try again.

              " + } + }, + "AuthenticationResult": { + "target": "com.amazonaws.voiceid#AuthenticationResult", + "traits": { + "smithy.api#documentation": "

              Details resulting from the authentication process, such as authentication decision and\n authentication score.

              " + } + }, + "FraudDetectionResult": { + "target": "com.amazonaws.voiceid#FraudDetectionResult", + "traits": { + "smithy.api#documentation": "

              Details resulting from the fraud detection process, such as fraud detection decision and risk score.

              " + } + } + } + }, + "com.amazonaws.voiceid#ExistingEnrollmentAction": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "SKIP", + "name": "SKIP" + }, + { + "value": "OVERWRITE", + "name": "OVERWRITE" + } + ] + } + }, + "com.amazonaws.voiceid#FailureDetails": { + "type": "structure", + "members": { + "StatusCode": { + "target": "com.amazonaws.voiceid#Integer", + "traits": { + "smithy.api#documentation": "

              An HTTP status code representing the nature of the error.

              " + } + }, + "Message": { + "target": "com.amazonaws.voiceid#String", + "traits": { + "smithy.api#documentation": "

              A description of the error that caused the batch job failure.

              " + } + } + }, + "traits": { + "smithy.api#documentation": "

              Contains error details for a failed batch job.

              " + } + }, + "com.amazonaws.voiceid#FraudDetectionAction": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "IGNORE", + "name": "IGNORE" + }, + { + "value": "FAIL", + "name": "FAIL" + } + ] + } + }, + "com.amazonaws.voiceid#FraudDetectionConfiguration": { + "type": "structure", + "members": { + "RiskThreshold": { + "target": "com.amazonaws.voiceid#Score", + "traits": { + "smithy.api#documentation": "

              Threshold value for determining whether the speaker is a fraudster. If the detected risk score \n calculated by Voice ID is higher than the threshold, the speaker is considered a fraudster.

              ", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

              The configuration used for performing fraud detection over a speaker during a session.

              " + } + }, + "com.amazonaws.voiceid#FraudDetectionDecision": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "HIGH_RISK", + "name": "HIGH_RISK" + }, + { + "value": "LOW_RISK", + "name": "LOW_RISK" + }, + { + "value": "NOT_ENOUGH_SPEECH", + "name": "NOT_ENOUGH_SPEECH" + } + ] + } + }, + "com.amazonaws.voiceid#FraudDetectionReason": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "KNOWN_FRAUDSTER", + "name": "KNOWN_FRAUDSTER" + } + ] + } + }, + "com.amazonaws.voiceid#FraudDetectionReasons": { + "type": "list", + "member": { + "target": "com.amazonaws.voiceid#FraudDetectionReason" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 3 + } + } + }, + "com.amazonaws.voiceid#FraudDetectionResult": { + "type": "structure", + "members": { + "FraudDetectionResultId": { + "target": "com.amazonaws.voiceid#UniqueIdLarge", + "traits": { + "smithy.api#documentation": "

              The unique identifier for this fraud detection result. Given there can be multiple fraud detections \n for a given session, this field helps in identifying if the returned result is from previous streaming \n activity or a new result. Note that in the absence of any new streaming activity or risk threshold \n changes, Voice ID always returns cached Fraud Detection result for this API.

              " + } + }, + "AudioAggregationStartedAt": { + "target": "com.amazonaws.voiceid#Timestamp", + "traits": { + "smithy.api#documentation": "

              A timestamp indicating when audio aggregation started for this fraud detection result.

              " + } + }, + "AudioAggregationEndedAt": { + "target": "com.amazonaws.voiceid#Timestamp", + "traits": { + "smithy.api#documentation": "

              A timestamp indicating when audio aggregation ended for this fraud detection result.

              " + } + }, + "Configuration": { + "target": "com.amazonaws.voiceid#FraudDetectionConfiguration", + "traits": { + "smithy.api#documentation": "

              The FraudDetectionConfiguration used to generate this fraud detection result.

              " + } + }, + "Decision": { + "target": "com.amazonaws.voiceid#FraudDetectionDecision", + "traits": { + "smithy.api#documentation": "

              The fraud detection decision produced by Voice ID, processed against the current session state and\n streamed audio of the speaker.

              " + } + }, + "Reasons": { + "target": "com.amazonaws.voiceid#FraudDetectionReasons", + "traits": { + "smithy.api#documentation": "

              The reason speaker was flagged by the fraud detection system. This is only be populated if fraud\n detection Decision is HIGH_RISK, and only has one possible value:\n KNOWN_FRAUDSTER.

              " + } + }, + "RiskDetails": { + "target": "com.amazonaws.voiceid#FraudRiskDetails", + "traits": { + "smithy.api#documentation": "

              Details about each risk analyzed for this speaker.

              " + } + } + }, + "traits": { + "smithy.api#documentation": "

              The fraud detection result produced by Voice ID, processed against the current session state and streamed\n audio of the speaker.

              " + } + }, + "com.amazonaws.voiceid#FraudRiskDetails": { + "type": "structure", + "members": { + "KnownFraudsterRisk": { + "target": "com.amazonaws.voiceid#KnownFraudsterRisk", + "traits": { + "smithy.api#documentation": "

              The details resulting from 'Known Fraudster Risk' analysis of the speaker.

              ", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

              Details regarding various fraud risk analyses performed against the current session state and streamed\n audio of the speaker.

              " + } + }, + "com.amazonaws.voiceid#Fraudster": { + "type": "structure", + "members": { + "DomainId": { + "target": "com.amazonaws.voiceid#DomainId", + "traits": { + "smithy.api#documentation": "

              The identifier for the domain containing the fraudster.

              " + } + }, + "GeneratedFraudsterId": { + "target": "com.amazonaws.voiceid#GeneratedFraudsterId", + "traits": { + "smithy.api#documentation": "

              The service-generated identifier for the fraudster.

              " + } + }, + "CreatedAt": { + "target": "com.amazonaws.voiceid#Timestamp", + "traits": { + "smithy.api#documentation": "

              The timestamp when Voice ID identified the fraudster.

              " + } + } + }, + "traits": { + "smithy.api#documentation": "

              Contains all the information about a fraudster.

              " + } + }, + "com.amazonaws.voiceid#FraudsterId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 25, + "max": 25 + }, + "smithy.api#pattern": "^id#[a-zA-Z0-9]{22}$", + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.voiceid#FraudsterRegistrationJob": { + "type": "structure", + "members": { + "JobName": { + "target": "com.amazonaws.voiceid#JobName", + "traits": { + "smithy.api#documentation": "

              The client-provied name for the fraudster registration job.

              " + } + }, + "JobId": { + "target": "com.amazonaws.voiceid#JobId", + "traits": { + "smithy.api#documentation": "

              The service-generated identifier for the fraudster registration job.

              " + } + }, + "JobStatus": { + "target": "com.amazonaws.voiceid#FraudsterRegistrationJobStatus", + "traits": { + "smithy.api#documentation": "

              The current status of the fraudster registration job.

              " + } + }, + "DomainId": { + "target": "com.amazonaws.voiceid#DomainId", + "traits": { + "smithy.api#documentation": "

              The identifier of the domain containing the fraudster registration job.

              " + } + }, + "DataAccessRoleArn": { + "target": "com.amazonaws.voiceid#IamRoleArn", + "traits": { + "smithy.api#documentation": "

              The IAM role Amazon Resource Name (ARN) that grants Voice ID permissions to access customer's buckets\n to read the input manifest file and write the job output file.

              " + } + }, + "RegistrationConfig": { + "target": "com.amazonaws.voiceid#RegistrationConfig", + "traits": { + "smithy.api#documentation": "

              The registration config containing details such as the action to take when a duplicate fraudster is \n detected, and the similarity threshold to use for detecting a duplicate fraudster.

              " + } + }, + "InputDataConfig": { + "target": "com.amazonaws.voiceid#InputDataConfig", + "traits": { + "smithy.api#documentation": "

              The input data config containing an S3 URI for the input manifest file that contains the list\n of fraudster registration job requests.

              " + } + }, + "OutputDataConfig": { + "target": "com.amazonaws.voiceid#OutputDataConfig", + "traits": { + "smithy.api#documentation": "

              The output data config containing the S3 location where you want Voice ID to write your job output \n file; you must also include a KMS Key ID in order to encrypt the file.

              " + } + }, + "CreatedAt": { + "target": "com.amazonaws.voiceid#Timestamp", + "traits": { + "smithy.api#documentation": "

              A timestamp showing the creation time of the fraudster registration job.

              " + } + }, + "EndedAt": { + "target": "com.amazonaws.voiceid#Timestamp", + "traits": { + "smithy.api#documentation": "

              A timestamp showing when the fraudster registration job ended.

              " + } + }, + "FailureDetails": { + "target": "com.amazonaws.voiceid#FailureDetails", + "traits": { + "smithy.api#documentation": "

              Contains details that are populated when an entire batch job fails. In cases of individual registration\n job failures, the batch job as a whole doesn't fail; it is completed with a JobStatus of\n COMPLETED_WITH_ERRORS. You can use the job output file to identify the individual \n registration requests that failed.

              " + } + }, + "JobProgress": { + "target": "com.amazonaws.voiceid#JobProgress", + "traits": { + "smithy.api#documentation": "

              Shows the completed percentage of registration requests listed in the input file.

              " + } + } + }, + "traits": { + "smithy.api#documentation": "

              Contains all the information about a fraudster registration job.

              " + } + }, + "com.amazonaws.voiceid#FraudsterRegistrationJobStatus": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "SUBMITTED", + "name": "SUBMITTED" + }, + { + "value": "IN_PROGRESS", + "name": "IN_PROGRESS" + }, + { + "value": "COMPLETED", + "name": "COMPLETED" + }, + { + "value": "COMPLETED_WITH_ERRORS", + "name": "COMPLETED_WITH_ERRORS" + }, + { + "value": "FAILED", + "name": "FAILED" + } + ] + } + }, + "com.amazonaws.voiceid#FraudsterRegistrationJobSummaries": { + "type": "list", + "member": { + "target": "com.amazonaws.voiceid#FraudsterRegistrationJobSummary" + } + }, + "com.amazonaws.voiceid#FraudsterRegistrationJobSummary": { + "type": "structure", + "members": { + "JobName": { + "target": "com.amazonaws.voiceid#JobName", + "traits": { + "smithy.api#documentation": "

              The client-provied name for the fraudster registration job.

              " + } + }, + "JobId": { + "target": "com.amazonaws.voiceid#JobId", + "traits": { + "smithy.api#documentation": "

              The service-generated identifier for the fraudster registration job.

              " + } + }, + "JobStatus": { + "target": "com.amazonaws.voiceid#FraudsterRegistrationJobStatus", + "traits": { + "smithy.api#documentation": "

              The current status of the fraudster registration job.

              " + } + }, + "DomainId": { + "target": "com.amazonaws.voiceid#DomainId", + "traits": { + "smithy.api#documentation": "

              The identifier of the domain containing the fraudster registration job.

              " + } + }, + "CreatedAt": { + "target": "com.amazonaws.voiceid#Timestamp", + "traits": { + "smithy.api#documentation": "

              A timestamp showing when the fraudster registration job is created.

              " + } + }, + "EndedAt": { + "target": "com.amazonaws.voiceid#Timestamp", + "traits": { + "smithy.api#documentation": "

              A timestamp showing when the fraudster registration job ended.

              " + } + }, + "FailureDetails": { + "target": "com.amazonaws.voiceid#FailureDetails", + "traits": { + "smithy.api#documentation": "

              Contains details that are populated when an entire batch job fails. In cases of individual registration\n job failures, the batch job as a whole doesn't fail; it is completed with a JobStatus of\n COMPLETED_WITH_ERRORS. You can use the job output file to identify the individual \n registration requests that failed.

              " + } + }, + "JobProgress": { + "target": "com.amazonaws.voiceid#JobProgress", + "traits": { + "smithy.api#documentation": "

              Shows the completed percentage of registration requests listed in the input file.

              " + } + } + }, + "traits": { + "smithy.api#documentation": "

              Contains a summary of information about a fraudster registration job.

              " + } + }, + "com.amazonaws.voiceid#GeneratedFraudsterId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 25, + "max": 25 + }, + "smithy.api#pattern": "^id#[a-zA-Z0-9]{22}$" + } + }, + "com.amazonaws.voiceid#GeneratedSpeakerId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 25, + "max": 25 + }, + "smithy.api#pattern": "^id#[a-zA-Z0-9]{22}$" + } + }, + "com.amazonaws.voiceid#IamRoleArn": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 20, + "max": 2048 + }, + "smithy.api#pattern": "^arn:aws(-[^:]+)?:iam::[0-9]{12}:role/.+$" + } + }, + "com.amazonaws.voiceid#InputDataConfig": { + "type": "structure", + "members": { + "S3Uri": { + "target": "com.amazonaws.voiceid#S3Uri", + "traits": { + "smithy.api#documentation": "

              The S3 location for the input manifest file that contains the list of individual enrollment or registration\n job requests.

              ", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

              The configuration containing input file information for a batch job.

              " + } + }, + "com.amazonaws.voiceid#Integer": { + "type": "integer", + "traits": { + "smithy.api#box": {} + } + }, + "com.amazonaws.voiceid#InternalServerException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.voiceid#String" + } + }, + "traits": { + "smithy.api#documentation": "

              The request failed due to an unknown error on the server side.

              ", + "smithy.api#error": "server", + "smithy.api#httpError": 500 + } + }, + "com.amazonaws.voiceid#JobId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 22, + "max": 22 + }, + "smithy.api#pattern": "^[a-zA-Z0-9]{22}$" + } + }, + "com.amazonaws.voiceid#JobName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 256 + }, + "smithy.api#pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]*$", + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.voiceid#JobProgress": { + "type": "structure", + "members": { + "PercentComplete": { + "target": "com.amazonaws.voiceid#Score", + "traits": { + "smithy.api#documentation": "

              Shows the completed percentage of enrollment or registration requests listed in the input file.

              " + } + } + }, + "traits": { + "smithy.api#documentation": "

              Indicates the completion progress for a batch job.

              " + } + }, + "com.amazonaws.voiceid#KmsKeyId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 2048 + } + } + }, + "com.amazonaws.voiceid#KnownFraudsterRisk": { + "type": "structure", + "members": { + "RiskScore": { + "target": "com.amazonaws.voiceid#Score", + "traits": { + "smithy.api#documentation": "

              The score indicating the likelihood the speaker is a known fraudster.

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

              The identifier of the fraudster that is the closest match to the speaker. If there are no fraudsters\n registered in a given domain, or if there are no fraudsters with a non-zero RiskScore, this value is\n null.

              " + } + } + }, + "traits": { + "smithy.api#documentation": "

              Contains details produced as a result of performing known fraudster risk analysis on a speaker.

              " + } + }, + "com.amazonaws.voiceid#ListDomains": { + "type": "operation", + "input": { + "target": "com.amazonaws.voiceid#ListDomainsRequest" + }, + "output": { + "target": "com.amazonaws.voiceid#ListDomainsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.voiceid#AccessDeniedException" + }, + { + "target": "com.amazonaws.voiceid#InternalServerException" + }, + { + "target": "com.amazonaws.voiceid#ThrottlingException" + }, + { + "target": "com.amazonaws.voiceid#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

              Lists all the domains in the Amazon Web Services account.\n

              ", + "smithy.api#http": { + "method": "GET", + "uri": "/domains", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.voiceid#ListDomainsRequest": { + "type": "structure", + "members": { + "MaxResults": { + "target": "com.amazonaws.voiceid#MaxResultsForListDomainFe", + "traits": { + "smithy.api#documentation": "

              The maximum number of results that are returned per call. You can use NextToken to obtain\n further pages of results. The default is 100; the maximum allowed page size is also 100.\n

              ", + "smithy.api#httpQuery": "maxResults" + } + }, + "NextToken": { + "target": "com.amazonaws.voiceid#NextToken", + "traits": { + "smithy.api#documentation": "

              If NextToken is returned, there are more results available. The value of NextToken\n is a unique pagination token for each page. Make the call again using the returned token to retrieve the\n next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours.\n

              ", + "smithy.api#httpQuery": "nextToken" + } + } + } + }, + "com.amazonaws.voiceid#ListDomainsResponse": { + "type": "structure", + "members": { + "DomainSummaries": { + "target": "com.amazonaws.voiceid#DomainSummaries", + "traits": { + "smithy.api#documentation": "

              A list containing details about each domain in the Amazon Web Services account.

              " + } + }, + "NextToken": { + "target": "com.amazonaws.voiceid#String", + "traits": { + "smithy.api#documentation": "

              If NextToken is returned, there are more results available. The value of NextToken\n is a unique pagination token for each page. Make the call again using the returned token to retrieve the\n next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours.\n

              " + } + } + } + }, + "com.amazonaws.voiceid#ListFraudsterRegistrationJobs": { + "type": "operation", + "input": { + "target": "com.amazonaws.voiceid#ListFraudsterRegistrationJobsRequest" + }, + "output": { + "target": "com.amazonaws.voiceid#ListFraudsterRegistrationJobsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.voiceid#AccessDeniedException" + }, + { + "target": "com.amazonaws.voiceid#InternalServerException" + }, + { + "target": "com.amazonaws.voiceid#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.voiceid#ThrottlingException" + }, + { + "target": "com.amazonaws.voiceid#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

              Lists all the fraudster registration jobs in the domain with the given JobStatus.\n If JobStatus is not provided, this lists all fraudster registration jobs in the given\n domain.\n

              ", + "smithy.api#http": { + "method": "GET", + "uri": "/domains/{DomainId}/fraudster-registration-jobs", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.voiceid#ListFraudsterRegistrationJobsRequest": { + "type": "structure", + "members": { + "DomainId": { + "target": "com.amazonaws.voiceid#DomainId", + "traits": { + "smithy.api#documentation": "

              The identifier of the domain containing the fraudster registration Jobs.

              ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "JobStatus": { + "target": "com.amazonaws.voiceid#FraudsterRegistrationJobStatus", + "traits": { + "smithy.api#documentation": "

              Provides the status of your fraudster registration job.

              ", + "smithy.api#httpQuery": "jobStatus" + } + }, + "MaxResults": { + "target": "com.amazonaws.voiceid#MaxResultsForList", + "traits": { + "smithy.api#documentation": "

              The maximum number of results that are returned per call. You can use NextToken to obtain\n further pages of results. The default is 100; the maximum allowed page size is also 100.\n

              ", + "smithy.api#httpQuery": "maxResults" + } + }, + "NextToken": { + "target": "com.amazonaws.voiceid#NextToken", + "traits": { + "smithy.api#documentation": "

              If NextToken is returned, there are more results available. The value of NextToken\n is a unique pagination token for each page. Make the call again using the returned token to retrieve the\n next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours.\n

              ", + "smithy.api#httpQuery": "nextToken" + } + } + } + }, + "com.amazonaws.voiceid#ListFraudsterRegistrationJobsResponse": { + "type": "structure", + "members": { + "JobSummaries": { + "target": "com.amazonaws.voiceid#FraudsterRegistrationJobSummaries", + "traits": { + "smithy.api#documentation": "

              A list containing details about each specified fraudster registration job.

              " + } + }, + "NextToken": { + "target": "com.amazonaws.voiceid#String", + "traits": { + "smithy.api#documentation": "

              If NextToken is returned, there are more results available. The value of NextToken\n is a unique pagination token for each page. Make the call again using the returned token to retrieve the\n next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours.\n

              " + } + } + } + }, + "com.amazonaws.voiceid#ListSpeakerEnrollmentJobs": { + "type": "operation", + "input": { + "target": "com.amazonaws.voiceid#ListSpeakerEnrollmentJobsRequest" + }, + "output": { + "target": "com.amazonaws.voiceid#ListSpeakerEnrollmentJobsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.voiceid#AccessDeniedException" + }, + { + "target": "com.amazonaws.voiceid#InternalServerException" + }, + { + "target": "com.amazonaws.voiceid#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.voiceid#ThrottlingException" + }, + { + "target": "com.amazonaws.voiceid#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

              Lists all the speaker enrollment jobs in the domain with the specified JobStatus. If\n JobStatus is not provided, this lists all jobs with all possible speaker enrollment job\n statuses.

              ", + "smithy.api#http": { + "method": "GET", + "uri": "/domains/{DomainId}/speaker-enrollment-jobs", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.voiceid#ListSpeakerEnrollmentJobsRequest": { + "type": "structure", + "members": { + "DomainId": { + "target": "com.amazonaws.voiceid#DomainId", + "traits": { + "smithy.api#documentation": "

              The identifier of the domain containing the speaker enrollment jobs.

              ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "JobStatus": { + "target": "com.amazonaws.voiceid#SpeakerEnrollmentJobStatus", + "traits": { + "smithy.api#documentation": "

              Provides the status of your speaker enrollment Job.

              ", + "smithy.api#httpQuery": "jobStatus" + } + }, + "MaxResults": { + "target": "com.amazonaws.voiceid#MaxResultsForList", + "traits": { + "smithy.api#documentation": "

              The maximum number of results that are returned per call. You can use NextToken to obtain\n further pages of results. The default is 100; the maximum allowed page size is also 100.\n

              ", + "smithy.api#httpQuery": "maxResults" + } + }, + "NextToken": { + "target": "com.amazonaws.voiceid#NextToken", + "traits": { + "smithy.api#documentation": "

              If NextToken is returned, there are more results available. The value of NextToken\n is a unique pagination token for each page. Make the call again using the returned token to retrieve the\n next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours.\n

              ", + "smithy.api#httpQuery": "nextToken" + } + } + } + }, + "com.amazonaws.voiceid#ListSpeakerEnrollmentJobsResponse": { + "type": "structure", + "members": { + "JobSummaries": { + "target": "com.amazonaws.voiceid#SpeakerEnrollmentJobSummaries", + "traits": { + "smithy.api#documentation": "

              A list containing details about each specified speaker enrollment job.

              " + } + }, + "NextToken": { + "target": "com.amazonaws.voiceid#String", + "traits": { + "smithy.api#documentation": "

              If NextToken is returned, there are more results available. The value of NextToken\n is a unique pagination token for each page. Make the call again using the returned token to retrieve the\n next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours.\n

              " + } + } + } + }, + "com.amazonaws.voiceid#ListSpeakers": { + "type": "operation", + "input": { + "target": "com.amazonaws.voiceid#ListSpeakersRequest" + }, + "output": { + "target": "com.amazonaws.voiceid#ListSpeakersResponse" + }, + "errors": [ + { + "target": "com.amazonaws.voiceid#AccessDeniedException" + }, + { + "target": "com.amazonaws.voiceid#InternalServerException" + }, + { + "target": "com.amazonaws.voiceid#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.voiceid#ThrottlingException" + }, + { + "target": "com.amazonaws.voiceid#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

              Lists all speakers in a specified domain.

              ", + "smithy.api#http": { + "method": "GET", + "uri": "/domains/{DomainId}/speakers", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.voiceid#ListSpeakersRequest": { + "type": "structure", + "members": { + "DomainId": { + "target": "com.amazonaws.voiceid#DomainId", + "traits": { + "smithy.api#documentation": "

              The identifier of the domain.

              ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "MaxResults": { + "target": "com.amazonaws.voiceid#MaxResultsForList", + "traits": { + "smithy.api#documentation": "

              The maximum number of results that are returned per call. You can use NextToken to obtain\n further pages of results. The default is 100; the maximum allowed page size is also 100.\n

              ", + "smithy.api#httpQuery": "maxResults" + } + }, + "NextToken": { + "target": "com.amazonaws.voiceid#NextToken", + "traits": { + "smithy.api#documentation": "

              If NextToken is returned, there are more results available. The value of NextToken\n is a unique pagination token for each page. Make the call again using the returned token to retrieve the\n next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours.\n

              ", + "smithy.api#httpQuery": "nextToken" + } + } + } + }, + "com.amazonaws.voiceid#ListSpeakersResponse": { + "type": "structure", + "members": { + "SpeakerSummaries": { + "target": "com.amazonaws.voiceid#SpeakerSummaries", + "traits": { + "smithy.api#documentation": "

              A list containing details about each speaker in the Amazon Web Services account.\n

              " + } + }, + "NextToken": { + "target": "com.amazonaws.voiceid#String", + "traits": { + "smithy.api#documentation": "

              If NextToken is returned, there are more results available. The value of NextToken\n is a unique pagination token for each page. Make the call again using the returned token to retrieve the\n next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours.\n

              " + } + } + } + }, + "com.amazonaws.voiceid#ListTagsForResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.voiceid#ListTagsForResourceRequest" + }, + "output": { + "target": "com.amazonaws.voiceid#ListTagsForResourceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.voiceid#AccessDeniedException" + }, + { + "target": "com.amazonaws.voiceid#InternalServerException" + }, + { + "target": "com.amazonaws.voiceid#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.voiceid#ThrottlingException" + }, + { + "target": "com.amazonaws.voiceid#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

              Lists all tags associated with a specified Voice ID resource.

              ", + "smithy.api#http": { + "method": "GET", + "uri": "/tags/{ResourceArn}", + "code": 200 + } + } + }, + "com.amazonaws.voiceid#ListTagsForResourceRequest": { + "type": "structure", + "members": { + "ResourceArn": { + "target": "com.amazonaws.voiceid#AmazonResourceName", + "traits": { + "smithy.api#documentation": "

              The Amazon Resource Name (ARN) of the Voice ID resource for which you want to list the tags.

              ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.voiceid#ListTagsForResourceResponse": { + "type": "structure", + "members": { + "Tags": { + "target": "com.amazonaws.voiceid#TagList", + "traits": { + "smithy.api#documentation": "

              The list of tags associated with the specified resource.

              " + } + } + } + }, + "com.amazonaws.voiceid#MaxResultsForList": { + "type": "integer", + "traits": { + "smithy.api#box": {}, + "smithy.api#range": { + "min": 1, + "max": 100 + } + } + }, + "com.amazonaws.voiceid#MaxResultsForListDomainFe": { + "type": "integer", + "traits": { + "smithy.api#box": {}, + "smithy.api#range": { + "min": 1, + "max": 10 + } + } + }, + "com.amazonaws.voiceid#NextToken": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 8192 + }, + "smithy.api#pattern": "^\\p{ASCII}{0,8192}$" + } + }, + "com.amazonaws.voiceid#OptOutSpeaker": { + "type": "operation", + "input": { + "target": "com.amazonaws.voiceid#OptOutSpeakerRequest" + }, + "output": { + "target": "com.amazonaws.voiceid#OptOutSpeakerResponse" + }, + "errors": [ + { + "target": "com.amazonaws.voiceid#AccessDeniedException" + }, + { + "target": "com.amazonaws.voiceid#ConflictException" + }, + { + "target": "com.amazonaws.voiceid#InternalServerException" + }, + { + "target": "com.amazonaws.voiceid#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.voiceid#ThrottlingException" + }, + { + "target": "com.amazonaws.voiceid#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

              Opts out a speaker from Voice ID system. A speaker can be opted out regardless of whether or not they\n already exist in the system. If they don't yet exist, a new speaker is created in an opted out state.\n If they already exist, their existing status is overridden and they are opted out. Enrollment and\n evaluation authentication requests are rejected for opted out speakers, and opted out speakers have\n no voice embeddings stored in the system.

              ", + "smithy.api#http": { + "method": "PUT", + "uri": "/domains/{DomainId}/speakers/{SpeakerId}/optout", + "code": 200 + } + } + }, + "com.amazonaws.voiceid#OptOutSpeakerRequest": { + "type": "structure", + "members": { + "DomainId": { + "target": "com.amazonaws.voiceid#DomainId", + "traits": { + "smithy.api#documentation": "

              The identifier of the domain containing the speaker.

              ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "SpeakerId": { + "target": "com.amazonaws.voiceid#SpeakerId", + "traits": { + "smithy.api#documentation": "

              The identifier of the speaker you want opted-out.

              ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.voiceid#OptOutSpeakerResponse": { + "type": "structure", + "members": { + "Speaker": { + "target": "com.amazonaws.voiceid#Speaker", + "traits": { + "smithy.api#documentation": "

              Details about the opted-out speaker.

              " + } + } + } + }, + "com.amazonaws.voiceid#OutputDataConfig": { + "type": "structure", + "members": { + "S3Uri": { + "target": "com.amazonaws.voiceid#S3Uri", + "traits": { + "smithy.api#documentation": "

              The S3 path of the folder to which Voice ID writes the job output file, which has a \n *.out extension. For example, if the input file name is input-file.json and \n the output folder path is s3://output-bucket/output-folder, the full output file path is \n s3://output-bucket/output-folder/job-Id/input-file.json.out.

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

              the identifier of the KMS key you want Voice ID to use to encrypt the output file of the fraudster\n registration job.

              " + } + } + }, + "traits": { + "smithy.api#documentation": "

              The configuration containing output file information for a batch job.

              " + } + }, + "com.amazonaws.voiceid#RegistrationConfig": { + "type": "structure", + "members": { + "DuplicateRegistrationAction": { + "target": "com.amazonaws.voiceid#DuplicateRegistrationAction", + "traits": { + "smithy.api#documentation": "

              The action to take when a fraudster is identified as a duplicate. The default action is \n SKIP, which skips registering the duplicate fraudster. Setting the value to\n REGISTER_AS_NEW always registers a new fraudster into the specified domain.

              " + } + }, + "FraudsterSimilarityThreshold": { + "target": "com.amazonaws.voiceid#Score", + "traits": { + "smithy.api#documentation": "

              The minimum similarity score between the new and old fraudsters in order to consider the new \n fraudster a duplicate.

              " + } + } + }, + "traits": { + "smithy.api#documentation": "

              The configuration definining the action to take when a duplicate fraudster is detected, and the \n similarity threshold to use for detecting a duplicate fraudster during a batch fraudster registration job.

              " + } + }, + "com.amazonaws.voiceid#ResourceNotFoundException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.voiceid#String" + }, + "ResourceType": { + "target": "com.amazonaws.voiceid#ResourceType", + "traits": { + "smithy.api#documentation": "

              The type of resource which cannot not be found. Possible types are BATCH_JOB, COMPLIANCE_CONSENT,\n DOMAIN, FRAUDSTER, SESSION and SPEAKER.

              " + } + } + }, + "traits": { + "smithy.api#documentation": "

              The specified resource cannot be found. Check the ResourceType and error message for\n more details.

              ", + "smithy.api#error": "client", + "smithy.api#httpError": 404 + } + }, + "com.amazonaws.voiceid#ResourceType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "BATCH_JOB", + "name": "BATCH_JOB" + }, + { + "value": "COMPLIANCE_CONSENT", + "name": "COMPLIANCE_CONSENT" + }, + { + "value": "DOMAIN", + "name": "DOMAIN" + }, + { + "value": "FRAUDSTER", + "name": "FRAUDSTER" + }, + { + "value": "SESSION", + "name": "SESSION" + }, + { + "value": "SPEAKER", + "name": "SPEAKER" + } + ] + } + }, + "com.amazonaws.voiceid#S3Uri": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 1024 + }, + "smithy.api#pattern": "^s3://[a-z0-9][\\.\\-a-z0-9]{1,61}[a-z0-9](/.*)?$" + } + }, + "com.amazonaws.voiceid#Score": { + "type": "integer", + "traits": { + "smithy.api#box": {}, + "smithy.api#range": { + "min": 0, + "max": 100 + } + } + }, + "com.amazonaws.voiceid#ServerSideEncryptionConfiguration": { + "type": "structure", + "members": { + "KmsKeyId": { + "target": "com.amazonaws.voiceid#KmsKeyId", + "traits": { + "smithy.api#documentation": "

              The identifier of the KMS Key you want Voice ID to use to encrypt your data.

              ", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

              The configuration containing information about the customer-managed KMS Key used for encrypting\n customer data.

              " + } + }, + "com.amazonaws.voiceid#ServiceQuotaExceededException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.voiceid#String" + } + }, + "traits": { + "smithy.api#documentation": "

              The request exceeded the service quota. Refer to Voice ID Service \n Quotas and try your request again.

              ", + "smithy.api#error": "client", + "smithy.api#httpError": 402 + } + }, + "com.amazonaws.voiceid#SessionId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 25, + "max": 25 + }, + "smithy.api#pattern": "^id#[a-zA-Z0-9]{22}$" + } + }, + "com.amazonaws.voiceid#SessionName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 36 + }, + "smithy.api#pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]*$" + } + }, + "com.amazonaws.voiceid#SessionNameOrId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 36 + }, + "smithy.api#pattern": "^(id#[a-zA-Z0-9]{22}|[a-zA-Z0-9][a-zA-Z0-9_-]*)$" + } + }, + "com.amazonaws.voiceid#Speaker": { + "type": "structure", + "members": { + "DomainId": { + "target": "com.amazonaws.voiceid#DomainId", + "traits": { + "smithy.api#documentation": "

              The identifier of the domain that contains the speaker.

              " + } + }, + "CustomerSpeakerId": { + "target": "com.amazonaws.voiceid#CustomerSpeakerId", + "traits": { + "smithy.api#documentation": "

              The client-provided identifier for the speaker.

              " + } + }, + "GeneratedSpeakerId": { + "target": "com.amazonaws.voiceid#GeneratedSpeakerId", + "traits": { + "smithy.api#documentation": "

              The service-generated identifier for the speaker.

              " + } + }, + "Status": { + "target": "com.amazonaws.voiceid#SpeakerStatus", + "traits": { + "smithy.api#documentation": "

              The current status of the speaker.

              " + } + }, + "CreatedAt": { + "target": "com.amazonaws.voiceid#Timestamp", + "traits": { + "smithy.api#documentation": "

              A timestamp showing when the speaker is created.

              " + } + }, + "UpdatedAt": { + "target": "com.amazonaws.voiceid#Timestamp", + "traits": { + "smithy.api#documentation": "

              A timestamp showing the speaker's last update.

              " + } + } + }, + "traits": { + "smithy.api#documentation": "

              Contains all the information about a speaker.

              " + } + }, + "com.amazonaws.voiceid#SpeakerEnrollmentJob": { + "type": "structure", + "members": { + "JobName": { + "target": "com.amazonaws.voiceid#JobName", + "traits": { + "smithy.api#documentation": "

              The client-provided name for the speaker enrollment job.

              " + } + }, + "JobId": { + "target": "com.amazonaws.voiceid#JobId", + "traits": { + "smithy.api#documentation": "

              The service-generated identifier for the speaker enrollment job.

              " + } + }, + "JobStatus": { + "target": "com.amazonaws.voiceid#SpeakerEnrollmentJobStatus", + "traits": { + "smithy.api#documentation": "

              The current status of the speaker enrollment job.

              " + } + }, + "DomainId": { + "target": "com.amazonaws.voiceid#DomainId", + "traits": { + "smithy.api#documentation": "

              The identifier of the domain that contains the speaker enrollment job.

              " + } + }, + "DataAccessRoleArn": { + "target": "com.amazonaws.voiceid#IamRoleArn", + "traits": { + "smithy.api#documentation": "

              The IAM role Amazon Resource Name (ARN) that grants Voice ID permissions to access customer's buckets\n to read the input manifest file and write the job output file.

              " + } + }, + "EnrollmentConfig": { + "target": "com.amazonaws.voiceid#EnrollmentConfig", + "traits": { + "smithy.api#documentation": "

              The configuration that defines the action to take when the speaker is already enrolled in Voice ID, and the\n FraudDetectionConfig to use.

              " + } + }, + "InputDataConfig": { + "target": "com.amazonaws.voiceid#InputDataConfig", + "traits": { + "smithy.api#documentation": "

              The input data config containing an S3 URI for the input manifest file that contains the list\n of speaker enrollment job requests.

              " + } + }, + "OutputDataConfig": { + "target": "com.amazonaws.voiceid#OutputDataConfig", + "traits": { + "smithy.api#documentation": "

              The output data config containing the S3 location where Voice ID writes the job output file; you must \n also include a KMS Key ID to encrypt the file.

              " + } + }, + "CreatedAt": { + "target": "com.amazonaws.voiceid#Timestamp", + "traits": { + "smithy.api#documentation": "

              A timestamp showing the creation of the speaker enrollment job.

              " + } + }, + "EndedAt": { + "target": "com.amazonaws.voiceid#Timestamp", + "traits": { + "smithy.api#documentation": "

              A timestamp showing when the speaker enrollment job ended.

              " + } + }, + "FailureDetails": { + "target": "com.amazonaws.voiceid#FailureDetails", + "traits": { + "smithy.api#documentation": "

              Contains details that are populated when an entire batch job fails. In cases of individual registration\n job failures, the batch job as a whole doesn't fail; it is completed with a JobStatus of\n COMPLETED_WITH_ERRORS. You can use the job output file to identify the individual \n registration requests that failed.

              " + } + }, + "JobProgress": { + "target": "com.amazonaws.voiceid#JobProgress", + "traits": { + "smithy.api#documentation": "

              Provides details on job progress. This field shows the completed percentage of registration \n requests listed in the input file.

              " + } + } + }, + "traits": { + "smithy.api#documentation": "

              Contains all the information about a speaker enrollment job.

              " + } + }, + "com.amazonaws.voiceid#SpeakerEnrollmentJobStatus": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "SUBMITTED", + "name": "SUBMITTED" + }, + { + "value": "IN_PROGRESS", + "name": "IN_PROGRESS" + }, + { + "value": "COMPLETED", + "name": "COMPLETED" + }, + { + "value": "COMPLETED_WITH_ERRORS", + "name": "COMPLETED_WITH_ERRORS" + }, + { + "value": "FAILED", + "name": "FAILED" + } + ] + } + }, + "com.amazonaws.voiceid#SpeakerEnrollmentJobSummaries": { + "type": "list", + "member": { + "target": "com.amazonaws.voiceid#SpeakerEnrollmentJobSummary" + } + }, + "com.amazonaws.voiceid#SpeakerEnrollmentJobSummary": { + "type": "structure", + "members": { + "JobName": { + "target": "com.amazonaws.voiceid#JobName", + "traits": { + "smithy.api#documentation": "

              The client-provided name for the speaker enrollment job.

              " + } + }, + "JobId": { + "target": "com.amazonaws.voiceid#JobId", + "traits": { + "smithy.api#documentation": "

              The service-generated identifier for the speaker enrollment job.

              " + } + }, + "JobStatus": { + "target": "com.amazonaws.voiceid#SpeakerEnrollmentJobStatus", + "traits": { + "smithy.api#documentation": "

              The current status of the speaker enrollment job.

              " + } + }, + "DomainId": { + "target": "com.amazonaws.voiceid#DomainId", + "traits": { + "smithy.api#documentation": "

              The identifier of the domain that contains the speaker enrollment job.

              " + } + }, + "CreatedAt": { + "target": "com.amazonaws.voiceid#Timestamp", + "traits": { + "smithy.api#documentation": "

              A timestamp showing the creation time of the speaker enrollment job.

              " + } + }, + "EndedAt": { + "target": "com.amazonaws.voiceid#Timestamp", + "traits": { + "smithy.api#documentation": "

              A timestamp showing when the speaker enrollment job ended.

              " + } + }, + "FailureDetails": { + "target": "com.amazonaws.voiceid#FailureDetails", + "traits": { + "smithy.api#documentation": "

              Contains details that are populated when an entire batch job fails. In cases of individual registration\n job failures, the batch job as a whole doesn't fail; it is completed with a JobStatus of\n COMPLETED_WITH_ERRORS. You can use the job output file to identify the individual \n registration requests that failed.

              " + } + }, + "JobProgress": { + "target": "com.amazonaws.voiceid#JobProgress", + "traits": { + "smithy.api#documentation": "

              Provides details regarding job progress. This field shows the completed percentage of enrollment \n requests listed in the input file.

              " + } + } + }, + "traits": { + "smithy.api#documentation": "

              Contains a summary of information about a speaker enrollment job.

              " + } + }, + "com.amazonaws.voiceid#SpeakerId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 256 + }, + "smithy.api#pattern": "^(id#[a-zA-Z0-9]{22}|[a-zA-Z0-9][a-zA-Z0-9_-]*)$", + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.voiceid#SpeakerStatus": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "ENROLLED", + "name": "ENROLLED" + }, + { + "value": "EXPIRED", + "name": "EXPIRED" + }, + { + "value": "OPTED_OUT", + "name": "OPTED_OUT" + }, + { + "value": "PENDING", + "name": "PENDING" + } + ] + } + }, + "com.amazonaws.voiceid#SpeakerSummaries": { + "type": "list", + "member": { + "target": "com.amazonaws.voiceid#SpeakerSummary" + } + }, + "com.amazonaws.voiceid#SpeakerSummary": { + "type": "structure", + "members": { + "DomainId": { + "target": "com.amazonaws.voiceid#DomainId", + "traits": { + "smithy.api#documentation": "

              The identifier of the domain that contains the speaker.

              " + } + }, + "CustomerSpeakerId": { + "target": "com.amazonaws.voiceid#CustomerSpeakerId", + "traits": { + "smithy.api#documentation": "

              The client-provided identifier for the speaker.

              " + } + }, + "GeneratedSpeakerId": { + "target": "com.amazonaws.voiceid#GeneratedSpeakerId", + "traits": { + "smithy.api#documentation": "

              The service-generated identifier for the speaker.

              " + } + }, + "Status": { + "target": "com.amazonaws.voiceid#SpeakerStatus", + "traits": { + "smithy.api#documentation": "

              The current status of the speaker.

              " + } + }, + "CreatedAt": { + "target": "com.amazonaws.voiceid#Timestamp", + "traits": { + "smithy.api#documentation": "

              A timestamp showing the speaker's creation time.

              " + } + }, + "UpdatedAt": { + "target": "com.amazonaws.voiceid#Timestamp", + "traits": { + "smithy.api#documentation": "

              A timestamp showing the speaker's last update.

              " + } + } + }, + "traits": { + "smithy.api#documentation": "

              Contains a summary of information about a speaker.

              " + } + }, + "com.amazonaws.voiceid#StartFraudsterRegistrationJob": { + "type": "operation", + "input": { + "target": "com.amazonaws.voiceid#StartFraudsterRegistrationJobRequest" + }, + "output": { + "target": "com.amazonaws.voiceid#StartFraudsterRegistrationJobResponse" + }, + "errors": [ + { + "target": "com.amazonaws.voiceid#AccessDeniedException" + }, + { + "target": "com.amazonaws.voiceid#ConflictException" + }, + { + "target": "com.amazonaws.voiceid#InternalServerException" + }, + { + "target": "com.amazonaws.voiceid#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.voiceid#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.voiceid#ThrottlingException" + }, + { + "target": "com.amazonaws.voiceid#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

              Starts a new batch fraudster registration job using provided details.

              ", + "smithy.api#http": { + "method": "POST", + "uri": "/domains/{DomainId}/fraudster-registration-jobs", + "code": 200 + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.voiceid#StartFraudsterRegistrationJobRequest": { + "type": "structure", + "members": { + "ClientToken": { + "target": "com.amazonaws.voiceid#ClientTokenString", + "traits": { + "smithy.api#documentation": "

              The idempotency token for starting a new fraudster registration job. If not provided, Amazon Web Services \n SDK populates this field.

              ", + "smithy.api#idempotencyToken": {} + } + }, + "JobName": { + "target": "com.amazonaws.voiceid#JobName", + "traits": { + "smithy.api#documentation": "

              The name of the new fraudster registration job.

              " + } + }, + "DomainId": { + "target": "com.amazonaws.voiceid#DomainId", + "traits": { + "smithy.api#documentation": "

              The identifier of the domain containing the fraudster registration job and in which the fraudsters are\n registered.

              ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "DataAccessRoleArn": { + "target": "com.amazonaws.voiceid#IamRoleArn", + "traits": { + "smithy.api#documentation": "

              The IAM role Amazon Resource Name (ARN) that grants Voice ID permissions to access customer's buckets\n to read the input manifest file and write the Job output file. Refer to the\n Create and\n edit a fraudster watchlist documentation for the permissions needed in this role.

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

              The registration config containing details such as the action to take when a duplicate fraudster is\n detected, and the similarity threshold to use for detecting a duplicate fraudster.

              " + } + }, + "InputDataConfig": { + "target": "com.amazonaws.voiceid#InputDataConfig", + "traits": { + "smithy.api#documentation": "

              The input data config containing an S3 URI for the input manifest file that contains the list\n of fraudster registration requests.

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

              The output data config containing the S3 location where Voice ID writes the job output file; you must\n also include a KMS Key ID to encrypt the file.

              ", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.voiceid#StartFraudsterRegistrationJobResponse": { + "type": "structure", + "members": { + "Job": { + "target": "com.amazonaws.voiceid#FraudsterRegistrationJob", + "traits": { + "smithy.api#documentation": "

              Details about the started fraudster registration job.

              " + } + } + } + }, + "com.amazonaws.voiceid#StartSpeakerEnrollmentJob": { + "type": "operation", + "input": { + "target": "com.amazonaws.voiceid#StartSpeakerEnrollmentJobRequest" + }, + "output": { + "target": "com.amazonaws.voiceid#StartSpeakerEnrollmentJobResponse" + }, + "errors": [ + { + "target": "com.amazonaws.voiceid#AccessDeniedException" + }, + { + "target": "com.amazonaws.voiceid#ConflictException" + }, + { + "target": "com.amazonaws.voiceid#InternalServerException" + }, + { + "target": "com.amazonaws.voiceid#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.voiceid#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.voiceid#ThrottlingException" + }, + { + "target": "com.amazonaws.voiceid#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

              Starts a new batch speaker enrollment job using specified details.

              ", + "smithy.api#http": { + "method": "POST", + "uri": "/domains/{DomainId}/speaker-enrollment-jobs", + "code": 200 + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.voiceid#StartSpeakerEnrollmentJobRequest": { + "type": "structure", + "members": { + "ClientToken": { + "target": "com.amazonaws.voiceid#ClientTokenString", + "traits": { + "smithy.api#documentation": "

              The idempotency token for starting a new speaker enrollment Job. If not provided, Amazon Web Services \n SDK populates this field.

              ", + "smithy.api#idempotencyToken": {} + } + }, + "JobName": { + "target": "com.amazonaws.voiceid#JobName", + "traits": { + "smithy.api#documentation": "

              A name for your speaker enrollment job.

              " + } + }, + "DomainId": { + "target": "com.amazonaws.voiceid#DomainId", + "traits": { + "smithy.api#documentation": "

              The identifier of the domain that contains the speaker enrollment job and in which the speakers are\n enrolled.\n

              ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "DataAccessRoleArn": { + "target": "com.amazonaws.voiceid#IamRoleArn", + "traits": { + "smithy.api#documentation": "

              The IAM role Amazon Resource Name (ARN) that grants Voice ID permissions to access customer's buckets\n to read the input manifest file and write the job output file. Refer to Batch enrollment using audio data from prior\n calls documentation for the permissions needed in this role.

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

              The enrollment config that contains details such as the action to take when a speaker is already\n enrolled in the Voice ID system or when a speaker is identified as a fraudster.

              " + } + }, + "InputDataConfig": { + "target": "com.amazonaws.voiceid#InputDataConfig", + "traits": { + "smithy.api#documentation": "

              The input data config containing the S3 location for the input manifest file that contains the list of\n speaker enrollment requests.

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

              The output data config containing the S3 location where Voice ID writes the job output file; you must\n also include a KMS Key ID to encrypt the file.

              ", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.voiceid#StartSpeakerEnrollmentJobResponse": { + "type": "structure", + "members": { + "Job": { + "target": "com.amazonaws.voiceid#SpeakerEnrollmentJob", + "traits": { + "smithy.api#documentation": "

              Details about the started speaker enrollment job.

              " + } + } + } + }, + "com.amazonaws.voiceid#StreamingStatus": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "PENDING_CONFIGURATION", + "name": "PENDING_CONFIGURATION" + }, + { + "value": "ONGOING", + "name": "ONGOING" + }, + { + "value": "ENDED", + "name": "ENDED" + } + ] + } + }, + "com.amazonaws.voiceid#String": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1 + } + } + }, + "com.amazonaws.voiceid#Tag": { + "type": "structure", + "members": { + "Key": { + "target": "com.amazonaws.voiceid#TagKey", + "traits": { + "smithy.api#documentation": "

              The first part of a key:value pair that forms a tag associated with a given resource. For example,\n in the tag ‘Department’:’Sales’, the key is 'Department'.\n

              ", + "smithy.api#required": {} + } + }, + "Value": { + "target": "com.amazonaws.voiceid#TagValue", + "traits": { + "smithy.api#documentation": "

              The second part of a key:value pair that forms a tag associated with a given resource. For example,\n in the tag ‘Department’:’Sales’, the value is 'Sales'.\n

              ", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

              A tag that can be assigned to a Voice ID resource.

              " + } + }, + "com.amazonaws.voiceid#TagKey": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 128 + }, + "smithy.api#pattern": "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$", + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.voiceid#TagKeyList": { + "type": "list", + "member": { + "target": "com.amazonaws.voiceid#TagKey" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 200 + } + } + }, + "com.amazonaws.voiceid#TagList": { + "type": "list", + "member": { + "target": "com.amazonaws.voiceid#Tag" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 200 + } + } + }, + "com.amazonaws.voiceid#TagResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.voiceid#TagResourceRequest" + }, + "output": { + "target": "com.amazonaws.voiceid#TagResourceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.voiceid#AccessDeniedException" + }, + { + "target": "com.amazonaws.voiceid#ConflictException" + }, + { + "target": "com.amazonaws.voiceid#InternalServerException" + }, + { + "target": "com.amazonaws.voiceid#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.voiceid#ThrottlingException" + }, + { + "target": "com.amazonaws.voiceid#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

              Tags an Amazon Connect Voice ID resource with the provided list of tags.

              ", + "smithy.api#http": { + "method": "POST", + "uri": "/tags/{ResourceArn}", + "code": 200 + } + } + }, + "com.amazonaws.voiceid#TagResourceRequest": { + "type": "structure", + "members": { + "ResourceArn": { + "target": "com.amazonaws.voiceid#AmazonResourceName", + "traits": { + "smithy.api#documentation": "

              The Amazon Resource Name (ARN) of the Voice ID resource you want to tag.

              ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "Tags": { + "target": "com.amazonaws.voiceid#TagList", + "traits": { + "smithy.api#documentation": "

              The list of tags to assign to the specified resource.

              ", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.voiceid#TagResourceResponse": { + "type": "structure", + "members": {} + }, + "com.amazonaws.voiceid#TagValue": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 256 + }, + "smithy.api#pattern": "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$", + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.voiceid#ThrottlingException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.voiceid#String" + } + }, + "traits": { + "smithy.api#documentation": "

              The request was denied due to request throttling. Please slow down your request rate. Refer to\n \n Amazon Connect Voice ID Service API throttling quotas\n and try your request again.

              ", + "smithy.api#error": "client", + "smithy.api#httpError": 429 + } + }, + "com.amazonaws.voiceid#Timestamp": { + "type": "timestamp" + }, + "com.amazonaws.voiceid#UniqueIdLarge": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 22, + "max": 22 + }, + "smithy.api#pattern": "^[a-zA-Z0-9]{22}$" + } + }, + "com.amazonaws.voiceid#UntagResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.voiceid#UntagResourceRequest" + }, + "output": { + "target": "com.amazonaws.voiceid#UntagResourceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.voiceid#AccessDeniedException" + }, + { + "target": "com.amazonaws.voiceid#ConflictException" + }, + { + "target": "com.amazonaws.voiceid#InternalServerException" + }, + { + "target": "com.amazonaws.voiceid#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.voiceid#ThrottlingException" + }, + { + "target": "com.amazonaws.voiceid#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

              Removes specified tags from a specified Amazon Connect Voice ID resource.

              ", + "smithy.api#http": { + "method": "DELETE", + "uri": "/tags/{ResourceArn}", + "code": 204 + } + } + }, + "com.amazonaws.voiceid#UntagResourceRequest": { + "type": "structure", + "members": { + "ResourceArn": { + "target": "com.amazonaws.voiceid#AmazonResourceName", + "traits": { + "smithy.api#documentation": "

              The Amazon Resource Name (ARN) of the Voice ID resource you want to remove tags from.

              ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "TagKeys": { + "target": "com.amazonaws.voiceid#TagKeyList", + "traits": { + "smithy.api#documentation": "

              The list of tag keys you want to remove from the specified resource.

              ", + "smithy.api#httpQuery": "tagKeys", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.voiceid#UntagResourceResponse": { + "type": "structure", + "members": {} + }, + "com.amazonaws.voiceid#UpdateDomain": { + "type": "operation", + "input": { + "target": "com.amazonaws.voiceid#UpdateDomainRequest" + }, + "output": { + "target": "com.amazonaws.voiceid#UpdateDomainResponse" + }, + "errors": [ + { + "target": "com.amazonaws.voiceid#AccessDeniedException" + }, + { + "target": "com.amazonaws.voiceid#ConflictException" + }, + { + "target": "com.amazonaws.voiceid#InternalServerException" + }, + { + "target": "com.amazonaws.voiceid#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.voiceid#ThrottlingException" + }, + { + "target": "com.amazonaws.voiceid#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

              Updates the specified domain. This API has clobber behavior, and clears and replaces all attributes.\n If an optional field, such as 'Description' is not provided, it is removed from the domain.

              ", + "smithy.api#http": { + "method": "PUT", + "uri": "/domains/{DomainId}", + "code": 200 + } + } + }, + "com.amazonaws.voiceid#UpdateDomainRequest": { + "type": "structure", + "members": { + "DomainId": { + "target": "com.amazonaws.voiceid#DomainId", + "traits": { + "smithy.api#documentation": "

              The identifier of the domain to be updated.

              ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "Name": { + "target": "com.amazonaws.voiceid#DomainName", + "traits": { + "smithy.api#documentation": "

              The name of the domain.

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

              A brief description about this domain.

              " + } + }, + "ServerSideEncryptionConfiguration": { + "target": "com.amazonaws.voiceid#ServerSideEncryptionConfiguration", + "traits": { + "smithy.api#documentation": "

              The configuration, containing the KMS Key Identifier, to be used by Voice ID for the server-side\n encryption of your data. Note that all the existing data in the domain are still encrypted using the\n existing key, only the data added to domain after updating the key is encrypted using the new key.

              ", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.voiceid#UpdateDomainResponse": { + "type": "structure", + "members": { + "Domain": { + "target": "com.amazonaws.voiceid#Domain", + "traits": { + "smithy.api#documentation": "

              Details about the updated domain

              " + } + } + } + }, + "com.amazonaws.voiceid#ValidationException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.voiceid#String" + } + }, + "traits": { + "smithy.api#documentation": "

              The request failed one or more validations; check the error message for more details.

              ", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.voiceid#VoiceID": { + "type": "service", + "version": "2021-09-27", + "operations": [ + { + "target": "com.amazonaws.voiceid#CreateDomain" + }, + { + "target": "com.amazonaws.voiceid#DeleteDomain" + }, + { + "target": "com.amazonaws.voiceid#DeleteFraudster" + }, + { + "target": "com.amazonaws.voiceid#DeleteSpeaker" + }, + { + "target": "com.amazonaws.voiceid#DescribeDomain" + }, + { + "target": "com.amazonaws.voiceid#DescribeFraudster" + }, + { + "target": "com.amazonaws.voiceid#DescribeFraudsterRegistrationJob" + }, + { + "target": "com.amazonaws.voiceid#DescribeSpeaker" + }, + { + "target": "com.amazonaws.voiceid#DescribeSpeakerEnrollmentJob" + }, + { + "target": "com.amazonaws.voiceid#EvaluateSession" + }, + { + "target": "com.amazonaws.voiceid#ListDomains" + }, + { + "target": "com.amazonaws.voiceid#ListFraudsterRegistrationJobs" + }, + { + "target": "com.amazonaws.voiceid#ListSpeakerEnrollmentJobs" + }, + { + "target": "com.amazonaws.voiceid#ListSpeakers" + }, + { + "target": "com.amazonaws.voiceid#ListTagsForResource" + }, + { + "target": "com.amazonaws.voiceid#OptOutSpeaker" + }, + { + "target": "com.amazonaws.voiceid#StartFraudsterRegistrationJob" + }, + { + "target": "com.amazonaws.voiceid#StartSpeakerEnrollmentJob" + }, + { + "target": "com.amazonaws.voiceid#TagResource" + }, + { + "target": "com.amazonaws.voiceid#UntagResource" + }, + { + "target": "com.amazonaws.voiceid#UpdateDomain" + } + ], + "traits": { + "aws.api#service": { + "sdkId": "Voice ID", + "arnNamespace": "voiceid", + "cloudFormationName": "VoiceID", + "cloudTrailEventSource": "voiceid.amazonaws.com", + "endpointPrefix": "voiceid" + }, + "aws.auth#sigv4": { + "name": "voiceid" + }, + "aws.protocols#awsJson1_0": {}, + "smithy.api#documentation": "

              Amazon Connect Voice ID provides real-time caller authentication and fraud screening. This guide\n describes the APIs used for this service.\n

              ", + "smithy.api#title": "Amazon Voice ID" + } + } + } +} diff --git a/codegen/sdk-codegen/aws-models/wisdom.2020-10-19.json b/codegen/sdk-codegen/aws-models/wisdom.2020-10-19.json new file mode 100644 index 0000000000000..a25062332aa95 --- /dev/null +++ b/codegen/sdk-codegen/aws-models/wisdom.2020-10-19.json @@ -0,0 +1,3976 @@ +{ + "smithy": "1.0", + "shapes": { + "com.amazonaws.wisdom#AccessDeniedException": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#documentation": "

              You do not have sufficient access to perform this action.

              ", + "smithy.api#error": "client", + "smithy.api#httpError": 403 + } + }, + "com.amazonaws.wisdom#AppIntegrationsConfiguration": { + "type": "structure", + "members": { + "appIntegrationArn": { + "target": "com.amazonaws.wisdom#GenericArn", + "traits": { + "smithy.api#documentation": "

              The Amazon Resource Name (ARN) of the AppIntegrations DataIntegration to use for ingesting content.

              ", + "smithy.api#required": {} + } + }, + "objectFields": { + "target": "com.amazonaws.wisdom#ObjectFieldsList", + "traits": { + "smithy.api#documentation": "

              The fields from the source that are made available to your agents in Wisdom.

              \n
                \n
              • \n

                For Salesforce, you must include at least Id,\n ArticleNumber, VersionNumber, Title,\n PublishStatus, and IsDeleted.

                \n
              • \n
              • \n

                For ServiceNow, you must include at least number,\n short_description, sys_mod_count, workflow_state,\n and active.

                \n
              • \n
              \n

              Make sure to include additional field(s); these are indexed and used to source\n recommendations.

              ", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

              Configuration information for Amazon AppIntegrations to automatically ingest content.

              " + } + }, + "com.amazonaws.wisdom#Arn": { + "type": "string", + "traits": { + "smithy.api#pattern": "^arn:[a-z-]*?:wisdom:[a-z0-9-]*?:[0-9]{12}:[a-z-]*?/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}(?:/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12})?$" + } + }, + "com.amazonaws.wisdom#Assistant": { + "type": "resource", + "identifiers": { + "assistantId": { + "target": "com.amazonaws.wisdom#UuidOrArn" + } + }, + "create": { + "target": "com.amazonaws.wisdom#CreateAssistant" + }, + "read": { + "target": "com.amazonaws.wisdom#GetAssistant" + }, + "delete": { + "target": "com.amazonaws.wisdom#DeleteAssistant" + }, + "list": { + "target": "com.amazonaws.wisdom#ListAssistants" + }, + "operations": [ + { + "target": "com.amazonaws.wisdom#GetRecommendations" + }, + { + "target": "com.amazonaws.wisdom#NotifyRecommendationsReceived" + }, + { + "target": "com.amazonaws.wisdom#QueryAssistant" + }, + { + "target": "com.amazonaws.wisdom#SearchSessions" + } + ], + "resources": [ + { + "target": "com.amazonaws.wisdom#AssistantAssociation" + }, + { + "target": "com.amazonaws.wisdom#Session" + } + ], + "traits": { + "aws.api#arn": { + "template": "assistant/{assistantId}", + "absolute": false, + "noAccount": false, + "noRegion": false + }, + "aws.cloudformation#cfnResource": {}, + "aws.iam#disableConditionKeyInference": {} + } + }, + "com.amazonaws.wisdom#AssistantAssociation": { + "type": "resource", + "identifiers": { + "assistantId": { + "target": "com.amazonaws.wisdom#UuidOrArn" + }, + "assistantAssociationId": { + "target": "com.amazonaws.wisdom#UuidOrArn" + } + }, + "create": { + "target": "com.amazonaws.wisdom#CreateAssistantAssociation" + }, + "read": { + "target": "com.amazonaws.wisdom#GetAssistantAssociation" + }, + "delete": { + "target": "com.amazonaws.wisdom#DeleteAssistantAssociation" + }, + "list": { + "target": "com.amazonaws.wisdom#ListAssistantAssociations" + }, + "traits": { + "aws.api#arn": { + "template": "association/{assistantId}/{assistantAssociationId}", + "absolute": false, + "noAccount": false, + "noRegion": false + }, + "aws.cloudformation#cfnResource": {}, + "aws.iam#disableConditionKeyInference": {} + } + }, + "com.amazonaws.wisdom#AssistantAssociationData": { + "type": "structure", + "members": { + "assistantAssociationId": { + "target": "com.amazonaws.wisdom#Uuid", + "traits": { + "smithy.api#documentation": "

              The identifier of the assistant association.

              ", + "smithy.api#required": {} + } + }, + "assistantAssociationArn": { + "target": "com.amazonaws.wisdom#Arn", + "traits": { + "smithy.api#documentation": "

              The Amazon Resource Name (ARN) of the assistant association.

              ", + "smithy.api#required": {} + } + }, + "assistantId": { + "target": "com.amazonaws.wisdom#Uuid", + "traits": { + "smithy.api#documentation": "

              The identifier of the Wisdom assistant.

              ", + "smithy.api#required": {} + } + }, + "assistantArn": { + "target": "com.amazonaws.wisdom#Arn", + "traits": { + "smithy.api#documentation": "

              The Amazon Resource Name (ARN) of the Wisdom assistant

              ", + "smithy.api#required": {} + } + }, + "associationType": { + "target": "com.amazonaws.wisdom#AssociationType", + "traits": { + "smithy.api#documentation": "

              The type of association.

              ", + "smithy.api#required": {} + } + }, + "associationData": { + "target": "com.amazonaws.wisdom#AssistantAssociationOutputData", + "traits": { + "smithy.api#documentation": "

              A union type that currently has a single argument, the knowledge base ID.

              ", + "smithy.api#required": {} + } + }, + "tags": { + "target": "com.amazonaws.wisdom#Tags", + "traits": { + "smithy.api#documentation": "

              The tags used to organize, track, or control access for this resource.

              " + } + } + }, + "traits": { + "smithy.api#documentation": "

              Information about the assistant association.

              ", + "smithy.api#references": [ + { + "resource": "com.amazonaws.wisdom#AssistantAssociation" + } + ] + } + }, + "com.amazonaws.wisdom#AssistantAssociationInputData": { + "type": "union", + "members": { + "knowledgeBaseId": { + "target": "com.amazonaws.wisdom#Uuid", + "traits": { + "smithy.api#documentation": "

              The the identifier of the knowledge base.

              " + } + } + }, + "traits": { + "smithy.api#documentation": "

              The data that is input into Wisdom as a result of the assistant association.

              " + } + }, + "com.amazonaws.wisdom#AssistantAssociationOutputData": { + "type": "union", + "members": { + "knowledgeBaseAssociation": { + "target": "com.amazonaws.wisdom#KnowledgeBaseAssociationData", + "traits": { + "smithy.api#documentation": "

              The knowledge base where output data is sent.

              " + } + } + }, + "traits": { + "smithy.api#documentation": "

              The data that is output as a result of the assistant association.

              " + } + }, + "com.amazonaws.wisdom#AssistantAssociationSummary": { + "type": "structure", + "members": { + "assistantAssociationId": { + "target": "com.amazonaws.wisdom#Uuid", + "traits": { + "smithy.api#documentation": "

              The identifier of the assistant association.

              ", + "smithy.api#required": {} + } + }, + "assistantAssociationArn": { + "target": "com.amazonaws.wisdom#Arn", + "traits": { + "smithy.api#documentation": "

              The Amazon Resource Name (ARN) of the assistant association.

              ", + "smithy.api#required": {} + } + }, + "assistantId": { + "target": "com.amazonaws.wisdom#Uuid", + "traits": { + "smithy.api#documentation": "

              The identifier of the Wisdom assistant.

              ", + "smithy.api#required": {} + } + }, + "assistantArn": { + "target": "com.amazonaws.wisdom#Arn", + "traits": { + "smithy.api#documentation": "

              The Amazon Resource Name (ARN) of the Wisdom assistant

              ", + "smithy.api#required": {} + } + }, + "associationType": { + "target": "com.amazonaws.wisdom#AssociationType", + "traits": { + "smithy.api#documentation": "

              The type of association.

              ", + "smithy.api#required": {} + } + }, + "associationData": { + "target": "com.amazonaws.wisdom#AssistantAssociationOutputData", + "traits": { + "smithy.api#documentation": "

              The association data.

              ", + "smithy.api#required": {} + } + }, + "tags": { + "target": "com.amazonaws.wisdom#Tags", + "traits": { + "smithy.api#documentation": "

              The tags used to organize, track, or control access for this resource.

              " + } + } + }, + "traits": { + "smithy.api#documentation": "

              Summary information about the assistant association.

              ", + "smithy.api#references": [ + { + "resource": "com.amazonaws.wisdom#AssistantAssociation" + } + ] + } + }, + "com.amazonaws.wisdom#AssistantAssociationSummaryList": { + "type": "list", + "member": { + "target": "com.amazonaws.wisdom#AssistantAssociationSummary" + } + }, + "com.amazonaws.wisdom#AssistantData": { + "type": "structure", + "members": { + "assistantId": { + "target": "com.amazonaws.wisdom#Uuid", + "traits": { + "smithy.api#documentation": "

              The identifier of the Wisdom assistant.

              ", + "smithy.api#required": {} + } + }, + "assistantArn": { + "target": "com.amazonaws.wisdom#Arn", + "traits": { + "smithy.api#documentation": "

              The Amazon Resource Name (ARN) of the Wisdom assistant

              ", + "smithy.api#required": {} + } + }, + "name": { + "target": "com.amazonaws.wisdom#Name", + "traits": { + "smithy.api#documentation": "

              The name.

              ", + "smithy.api#required": {} + } + }, + "type": { + "target": "com.amazonaws.wisdom#AssistantType", + "traits": { + "smithy.api#documentation": "

              The type of assistant.

              ", + "smithy.api#required": {} + } + }, + "status": { + "target": "com.amazonaws.wisdom#AssistantStatus", + "traits": { + "smithy.api#documentation": "

              The status of the assistant.

              ", + "smithy.api#required": {} + } + }, + "description": { + "target": "com.amazonaws.wisdom#Description", + "traits": { + "smithy.api#documentation": "

              The description.

              " + } + }, + "tags": { + "target": "com.amazonaws.wisdom#Tags", + "traits": { + "smithy.api#documentation": "

              The tags used to organize, track, or control access for this resource.

              " + } + }, + "serverSideEncryptionConfiguration": { + "target": "com.amazonaws.wisdom#ServerSideEncryptionConfiguration", + "traits": { + "smithy.api#documentation": "

              The KMS key used for encryption.

              " + } + } + }, + "traits": { + "smithy.api#documentation": "

              The assistant data.

              " + } + }, + "com.amazonaws.wisdom#AssistantList": { + "type": "list", + "member": { + "target": "com.amazonaws.wisdom#AssistantSummary" + } + }, + "com.amazonaws.wisdom#AssistantStatus": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "CREATE_IN_PROGRESS", + "name": "CREATE_IN_PROGRESS" + }, + { + "value": "CREATE_FAILED", + "name": "CREATE_FAILED" + }, + { + "value": "ACTIVE", + "name": "ACTIVE" + }, + { + "value": "DELETE_IN_PROGRESS", + "name": "DELETE_IN_PROGRESS" + }, + { + "value": "DELETE_FAILED", + "name": "DELETE_FAILED" + }, + { + "value": "DELETED", + "name": "DELETED" + } + ] + } + }, + "com.amazonaws.wisdom#AssistantSummary": { + "type": "structure", + "members": { + "assistantId": { + "target": "com.amazonaws.wisdom#Uuid", + "traits": { + "smithy.api#documentation": "

              The identifier of the Wisdom assistant.

              ", + "smithy.api#required": {} + } + }, + "assistantArn": { + "target": "com.amazonaws.wisdom#Arn", + "traits": { + "smithy.api#documentation": "

              The Amazon Resource Name (ARN) of the Wisdom assistant

              ", + "smithy.api#required": {} + } + }, + "name": { + "target": "com.amazonaws.wisdom#Name", + "traits": { + "smithy.api#documentation": "

              The name of the assistant.

              ", + "smithy.api#required": {} + } + }, + "type": { + "target": "com.amazonaws.wisdom#AssistantType", + "traits": { + "smithy.api#documentation": "

              The type of the assistant.

              ", + "smithy.api#required": {} + } + }, + "status": { + "target": "com.amazonaws.wisdom#AssistantStatus", + "traits": { + "smithy.api#documentation": "

              The status of the assistant.

              ", + "smithy.api#required": {} + } + }, + "description": { + "target": "com.amazonaws.wisdom#Description", + "traits": { + "smithy.api#documentation": "

              The description of the assistant.

              " + } + }, + "tags": { + "target": "com.amazonaws.wisdom#Tags", + "traits": { + "smithy.api#documentation": "

              The tags used to organize, track, or control access for this resource.

              " + } + }, + "serverSideEncryptionConfiguration": { + "target": "com.amazonaws.wisdom#ServerSideEncryptionConfiguration", + "traits": { + "smithy.api#documentation": "

              The KMS key used for encryption.

              " + } + } + }, + "traits": { + "smithy.api#documentation": "

              Summary information about the assistant.

              " + } + }, + "com.amazonaws.wisdom#AssistantType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "AGENT", + "name": "AGENT" + } + ] + } + }, + "com.amazonaws.wisdom#AssociationType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "KNOWLEDGE_BASE", + "name": "KNOWLEDGE_BASE" + } + ] + } + }, + "com.amazonaws.wisdom#ClientToken": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 4096 + } + } + }, + "com.amazonaws.wisdom#ConflictException": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#documentation": "

              The request could not be processed because of conflict in the current state of the\n resource. For example, if you're using a Create API (such as\n CreateAssistant) that accepts name, a conflicting resource (usually with the\n same name) is being created or mutated.

              ", + "smithy.api#error": "client", + "smithy.api#httpError": 409 + } + }, + "com.amazonaws.wisdom#Content": { + "type": "resource", + "identifiers": { + "knowledgeBaseId": { + "target": "com.amazonaws.wisdom#UuidOrArn" + }, + "contentId": { + "target": "com.amazonaws.wisdom#UuidOrArn" + } + }, + "create": { + "target": "com.amazonaws.wisdom#CreateContent" + }, + "read": { + "target": "com.amazonaws.wisdom#GetContent" + }, + "update": { + "target": "com.amazonaws.wisdom#UpdateContent" + }, + "delete": { + "target": "com.amazonaws.wisdom#DeleteContent" + }, + "list": { + "target": "com.amazonaws.wisdom#ListContents" + }, + "operations": [ + { + "target": "com.amazonaws.wisdom#GetContentSummary" + } + ], + "traits": { + "aws.api#arn": { + "template": "content/{knowledgeBaseId}/{contentId}", + "absolute": false, + "noAccount": false, + "noRegion": false + }, + "aws.iam#disableConditionKeyInference": {} + } + }, + "com.amazonaws.wisdom#ContentData": { + "type": "structure", + "members": { + "contentArn": { + "target": "com.amazonaws.wisdom#Arn", + "traits": { + "smithy.api#documentation": "

              The Amazon Resource Name (ARN) of the content.

              ", + "smithy.api#required": {} + } + }, + "contentId": { + "target": "com.amazonaws.wisdom#Uuid", + "traits": { + "smithy.api#documentation": "

              The identifier of the content.

              ", + "smithy.api#required": {} + } + }, + "knowledgeBaseArn": { + "target": "com.amazonaws.wisdom#Arn", + "traits": { + "smithy.api#documentation": "

              The Amazon Resource Name (ARN) of the knowledge base.

              ", + "smithy.api#required": {} + } + }, + "knowledgeBaseId": { + "target": "com.amazonaws.wisdom#Uuid", + "traits": { + "smithy.api#documentation": "

              The the identifier of the knowledge base.

              ", + "smithy.api#required": {} + } + }, + "name": { + "target": "com.amazonaws.wisdom#Name", + "traits": { + "smithy.api#documentation": "

              The name of the content.

              ", + "smithy.api#required": {} + } + }, + "revisionId": { + "target": "com.amazonaws.wisdom#NonEmptyString", + "traits": { + "smithy.api#documentation": "

              The identifier of the content revision.

              ", + "smithy.api#required": {} + } + }, + "title": { + "target": "com.amazonaws.wisdom#ContentTitle", + "traits": { + "smithy.api#documentation": "

              The title of the content.

              ", + "smithy.api#required": {} + } + }, + "contentType": { + "target": "com.amazonaws.wisdom#ContentType", + "traits": { + "smithy.api#documentation": "

              The media type of the content.

              ", + "smithy.api#required": {} + } + }, + "status": { + "target": "com.amazonaws.wisdom#ContentStatus", + "traits": { + "smithy.api#documentation": "

              The status of the content.

              ", + "smithy.api#required": {} + } + }, + "metadata": { + "target": "com.amazonaws.wisdom#ContentMetadata", + "traits": { + "smithy.api#documentation": "

              A key/value map to store attributes without affecting tagging or recommendations. \nFor example, when synchronizing data between an external system and Wisdom, you can store an external version identifier as metadata to utilize for determining drift.

              ", + "smithy.api#required": {} + } + }, + "tags": { + "target": "com.amazonaws.wisdom#Tags", + "traits": { + "smithy.api#documentation": "

              The tags used to organize, track, or control access for this resource.

              " + } + }, + "linkOutUri": { + "target": "com.amazonaws.wisdom#Uri", + "traits": { + "smithy.api#documentation": "

              The URI of the content.

              " + } + }, + "url": { + "target": "com.amazonaws.wisdom#Url", + "traits": { + "smithy.api#documentation": "

              The URL of the content.

              ", + "smithy.api#required": {}, + "smithy.api#sensitive": {} + } + }, + "urlExpiry": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "

              The expiration time of the URL as an epoch timestamp.

              ", + "smithy.api#required": {}, + "smithy.api#timestampFormat": "epoch-seconds" + } + } + }, + "traits": { + "smithy.api#documentation": "

              Information about the content.

              ", + "smithy.api#references": [ + { + "resource": "com.amazonaws.wisdom#Content" + }, + { + "resource": "com.amazonaws.wisdom#KnowledgeBase" + } + ] + } + }, + "com.amazonaws.wisdom#ContentMetadata": { + "type": "map", + "key": { + "target": "com.amazonaws.wisdom#NonEmptyString" + }, + "value": { + "target": "com.amazonaws.wisdom#NonEmptyString" + } + }, + "com.amazonaws.wisdom#ContentReference": { + "type": "structure", + "members": { + "knowledgeBaseArn": { + "target": "com.amazonaws.wisdom#Arn", + "traits": { + "smithy.api#documentation": "

              The Amazon Resource Name (ARN) of the knowledge base.

              " + } + }, + "knowledgeBaseId": { + "target": "com.amazonaws.wisdom#Uuid", + "traits": { + "smithy.api#documentation": "

              The the identifier of the knowledge base.

              " + } + }, + "contentArn": { + "target": "com.amazonaws.wisdom#Arn", + "traits": { + "smithy.api#documentation": "

              The Amazon Resource Name (ARN) of the content.

              " + } + }, + "contentId": { + "target": "com.amazonaws.wisdom#Uuid", + "traits": { + "smithy.api#documentation": "

              The identifier of the content.

              " + } + } + }, + "traits": { + "smithy.api#documentation": "

              Reference information about the content.

              " + } + }, + "com.amazonaws.wisdom#ContentStatus": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "CREATE_IN_PROGRESS", + "name": "CREATE_IN_PROGRESS" + }, + { + "value": "CREATE_FAILED", + "name": "CREATE_FAILED" + }, + { + "value": "ACTIVE", + "name": "ACTIVE" + }, + { + "value": "DELETE_IN_PROGRESS", + "name": "DELETE_IN_PROGRESS" + }, + { + "value": "DELETE_FAILED", + "name": "DELETE_FAILED" + }, + { + "value": "DELETED", + "name": "DELETED" + }, + { + "value": "UPDATE_FAILED", + "name": "UPDATE_FAILED" + } + ] + } + }, + "com.amazonaws.wisdom#ContentSummary": { + "type": "structure", + "members": { + "contentArn": { + "target": "com.amazonaws.wisdom#Arn", + "traits": { + "smithy.api#documentation": "

              The Amazon Resource Name (ARN) of the content.

              ", + "smithy.api#required": {} + } + }, + "contentId": { + "target": "com.amazonaws.wisdom#Uuid", + "traits": { + "smithy.api#documentation": "

              The identifier of the content.

              ", + "smithy.api#required": {} + } + }, + "knowledgeBaseArn": { + "target": "com.amazonaws.wisdom#Arn", + "traits": { + "smithy.api#documentation": "

              The Amazon Resource Name (ARN) of the knowledge base.

              ", + "smithy.api#required": {} + } + }, + "knowledgeBaseId": { + "target": "com.amazonaws.wisdom#Uuid", + "traits": { + "smithy.api#documentation": "

              The the identifier of the knowledge base.

              ", + "smithy.api#required": {} + } + }, + "name": { + "target": "com.amazonaws.wisdom#Name", + "traits": { + "smithy.api#documentation": "

              The name of the content.

              ", + "smithy.api#required": {} + } + }, + "revisionId": { + "target": "com.amazonaws.wisdom#NonEmptyString", + "traits": { + "smithy.api#documentation": "

              The identifier of the revision of the content.

              ", + "smithy.api#required": {} + } + }, + "title": { + "target": "com.amazonaws.wisdom#ContentTitle", + "traits": { + "smithy.api#documentation": "

              The title of the content.

              ", + "smithy.api#required": {} + } + }, + "contentType": { + "target": "com.amazonaws.wisdom#ContentType", + "traits": { + "smithy.api#documentation": "

              The media type of the content.

              ", + "smithy.api#required": {} + } + }, + "status": { + "target": "com.amazonaws.wisdom#ContentStatus", + "traits": { + "smithy.api#documentation": "

              The status of the content.

              ", + "smithy.api#required": {} + } + }, + "metadata": { + "target": "com.amazonaws.wisdom#ContentMetadata", + "traits": { + "smithy.api#documentation": "

              A key/value map to store attributes without affecting tagging or recommendations. \nFor example, when synchronizing data between an external system and Wisdom, you can store an external version identifier as metadata to utilize for determining drift.

              ", + "smithy.api#required": {} + } + }, + "tags": { + "target": "com.amazonaws.wisdom#Tags", + "traits": { + "smithy.api#documentation": "

              The tags used to organize, track, or control access for this resource.

              " + } + } + }, + "traits": { + "smithy.api#documentation": "

              Summary information about the content.

              ", + "smithy.api#references": [ + { + "resource": "com.amazonaws.wisdom#Content" + }, + { + "resource": "com.amazonaws.wisdom#KnowledgeBase" + } + ] + } + }, + "com.amazonaws.wisdom#ContentSummaryList": { + "type": "list", + "member": { + "target": "com.amazonaws.wisdom#ContentSummary" + } + }, + "com.amazonaws.wisdom#ContentTitle": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 255 + } + } + }, + "com.amazonaws.wisdom#ContentType": { + "type": "string", + "traits": { + "smithy.api#pattern": "^(text/(plain|html))|(application/x\\.wisdom-json;source=(salesforce|servicenow))$" + } + }, + "com.amazonaws.wisdom#CreateAssistant": { + "type": "operation", + "input": { + "target": "com.amazonaws.wisdom#CreateAssistantRequest" + }, + "output": { + "target": "com.amazonaws.wisdom#CreateAssistantResponse" + }, + "errors": [ + { + "target": "com.amazonaws.wisdom#AccessDeniedException" + }, + { + "target": "com.amazonaws.wisdom#ConflictException" + }, + { + "target": "com.amazonaws.wisdom#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.wisdom#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

              Creates an Amazon Connect Wisdom assistant.

              ", + "smithy.api#http": { + "method": "POST", + "uri": "/assistants", + "code": 200 + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.wisdom#CreateAssistantAssociation": { + "type": "operation", + "input": { + "target": "com.amazonaws.wisdom#CreateAssistantAssociationRequest" + }, + "output": { + "target": "com.amazonaws.wisdom#CreateAssistantAssociationResponse" + }, + "errors": [ + { + "target": "com.amazonaws.wisdom#AccessDeniedException" + }, + { + "target": "com.amazonaws.wisdom#ConflictException" + }, + { + "target": "com.amazonaws.wisdom#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.wisdom#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.wisdom#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

              Creates an association between an Amazon Connect Wisdom assistant and another resource. Currently, the\n only supported association is with a knowledge base. An assistant can have only a single\n association.

              ", + "smithy.api#http": { + "method": "POST", + "uri": "/assistants/{assistantId}/associations", + "code": 200 + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.wisdom#CreateAssistantAssociationRequest": { + "type": "structure", + "members": { + "assistantId": { + "target": "com.amazonaws.wisdom#UuidOrArn", + "traits": { + "smithy.api#documentation": "

              The identifier of the Wisdom assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

              ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "associationType": { + "target": "com.amazonaws.wisdom#AssociationType", + "traits": { + "smithy.api#documentation": "

              The type of association.

              ", + "smithy.api#required": {} + } + }, + "association": { + "target": "com.amazonaws.wisdom#AssistantAssociationInputData", + "traits": { + "smithy.api#documentation": "

              The identifier of the associated resource.

              ", + "smithy.api#required": {} + } + }, + "clientToken": { + "target": "com.amazonaws.wisdom#ClientToken", + "traits": { + "smithy.api#documentation": "

              A unique, case-sensitive identifier that you provide to ensure the idempotency of the\n request.

              ", + "smithy.api#idempotencyToken": {} + } + }, + "tags": { + "target": "com.amazonaws.wisdom#Tags", + "traits": { + "smithy.api#documentation": "

              The tags used to organize, track, or control access for this resource.

              " + } + } + } + }, + "com.amazonaws.wisdom#CreateAssistantAssociationResponse": { + "type": "structure", + "members": { + "assistantAssociation": { + "target": "com.amazonaws.wisdom#AssistantAssociationData", + "traits": { + "smithy.api#documentation": "

              The assistant association.

              " + } + } + } + }, + "com.amazonaws.wisdom#CreateAssistantRequest": { + "type": "structure", + "members": { + "clientToken": { + "target": "com.amazonaws.wisdom#ClientToken", + "traits": { + "smithy.api#documentation": "

              A unique, case-sensitive identifier that you provide to ensure the idempotency of the\n request.

              ", + "smithy.api#idempotencyToken": {} + } + }, + "name": { + "target": "com.amazonaws.wisdom#Name", + "traits": { + "smithy.api#documentation": "

              The name of the assistant.

              ", + "smithy.api#required": {} + } + }, + "type": { + "target": "com.amazonaws.wisdom#AssistantType", + "traits": { + "smithy.api#documentation": "

              The type of assistant.

              ", + "smithy.api#required": {} + } + }, + "description": { + "target": "com.amazonaws.wisdom#Description", + "traits": { + "smithy.api#documentation": "

              The description of the assistant.

              " + } + }, + "tags": { + "target": "com.amazonaws.wisdom#Tags", + "traits": { + "smithy.api#documentation": "

              The tags used to organize, track, or control access for this resource.

              " + } + }, + "serverSideEncryptionConfiguration": { + "target": "com.amazonaws.wisdom#ServerSideEncryptionConfiguration", + "traits": { + "smithy.api#documentation": "

              The KMS key used for encryption.

              " + } + } + } + }, + "com.amazonaws.wisdom#CreateAssistantResponse": { + "type": "structure", + "members": { + "assistant": { + "target": "com.amazonaws.wisdom#AssistantData", + "traits": { + "smithy.api#documentation": "

              Information about the assistant.

              " + } + } + } + }, + "com.amazonaws.wisdom#CreateContent": { + "type": "operation", + "input": { + "target": "com.amazonaws.wisdom#CreateContentRequest" + }, + "output": { + "target": "com.amazonaws.wisdom#CreateContentResponse" + }, + "errors": [ + { + "target": "com.amazonaws.wisdom#AccessDeniedException" + }, + { + "target": "com.amazonaws.wisdom#ConflictException" + }, + { + "target": "com.amazonaws.wisdom#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.wisdom#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.wisdom#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

              Creates Wisdom content. Before to calling this API, use StartContentUpload to\n upload an asset.

              ", + "smithy.api#http": { + "method": "POST", + "uri": "/knowledgeBases/{knowledgeBaseId}/contents", + "code": 200 + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.wisdom#CreateContentRequest": { + "type": "structure", + "members": { + "knowledgeBaseId": { + "target": "com.amazonaws.wisdom#UuidOrArn", + "traits": { + "smithy.api#documentation": "

              The the identifier of the knowledge base. Can be either the ID or the ARN. URLs cannot contain the ARN.

              ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "name": { + "target": "com.amazonaws.wisdom#Name", + "traits": { + "smithy.api#documentation": "

              The name of the content. Each piece of content in a knowledge base must have a unique\n name. You can retrieve a piece of content using only its knowledge base and its name with the\n SearchContent API.

              ", + "smithy.api#required": {} + } + }, + "title": { + "target": "com.amazonaws.wisdom#ContentTitle", + "traits": { + "smithy.api#documentation": "

              The title of the content. If not set, the title is equal to the name.

              " + } + }, + "overrideLinkOutUri": { + "target": "com.amazonaws.wisdom#Uri", + "traits": { + "smithy.api#documentation": "

              The URI you want to use for the article. If the knowledge base has a templateUri, setting\n this argument overrides it for this piece of content.

              " + } + }, + "metadata": { + "target": "com.amazonaws.wisdom#ContentMetadata", + "traits": { + "smithy.api#documentation": "

              A key/value map to store attributes without affecting tagging or recommendations. \nFor example, when synchronizing data between an external system and Wisdom, you can store an external version identifier as metadata to utilize for determining drift.

              " + } + }, + "uploadId": { + "target": "com.amazonaws.wisdom#NonEmptyString", + "traits": { + "smithy.api#documentation": "

              A pointer to the uploaded asset. This value is returned by StartContentUpload.

              ", + "smithy.api#required": {} + } + }, + "clientToken": { + "target": "com.amazonaws.wisdom#NonEmptyString", + "traits": { + "smithy.api#documentation": "

              A unique, case-sensitive identifier that you provide to ensure the idempotency of the\n request.

              ", + "smithy.api#idempotencyToken": {} + } + }, + "tags": { + "target": "com.amazonaws.wisdom#Tags", + "traits": { + "smithy.api#documentation": "

              The tags used to organize, track, or control access for this resource.

              " + } + } + } + }, + "com.amazonaws.wisdom#CreateContentResponse": { + "type": "structure", + "members": { + "content": { + "target": "com.amazonaws.wisdom#ContentData", + "traits": { + "smithy.api#documentation": "

              The content.

              " + } + } + } + }, + "com.amazonaws.wisdom#CreateKnowledgeBase": { + "type": "operation", + "input": { + "target": "com.amazonaws.wisdom#CreateKnowledgeBaseRequest" + }, + "output": { + "target": "com.amazonaws.wisdom#CreateKnowledgeBaseResponse" + }, + "errors": [ + { + "target": "com.amazonaws.wisdom#AccessDeniedException" + }, + { + "target": "com.amazonaws.wisdom#ConflictException" + }, + { + "target": "com.amazonaws.wisdom#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.wisdom#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

              Creates a knowledge base.

              \n \n

              When using this API, you cannot reuse Amazon AppIntegrations\n DataIntegrations with external knowledge bases such as Salesforce and ServiceNow. If you do,\n you'll get an InvalidRequestException error.

              \n\n

              For example, you're programmatically managing your external knowledge base, and you want\n to add or remove one of the fields that is being ingested from Salesforce. Do the\n following:

              \n
                \n
              1. \n

                Call DeleteKnowledgeBase.

                \n
              2. \n
              3. \n

                Call DeleteDataIntegration.

                \n
              4. \n
              5. \n

                Call CreateDataIntegration to recreate the DataIntegration or a create different\n one.

                \n
              6. \n
              7. \n

                Call CreateKnowledgeBase.

                \n
              8. \n
              \n
              ", + "smithy.api#http": { + "method": "POST", + "uri": "/knowledgeBases", + "code": 200 + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.wisdom#CreateKnowledgeBaseRequest": { + "type": "structure", + "members": { + "clientToken": { + "target": "com.amazonaws.wisdom#NonEmptyString", + "traits": { + "smithy.api#documentation": "

              A unique, case-sensitive identifier that you provide to ensure the idempotency of the\n request.

              ", + "smithy.api#idempotencyToken": {} + } + }, + "name": { + "target": "com.amazonaws.wisdom#Name", + "traits": { + "smithy.api#documentation": "

              The name of the knowledge base.

              ", + "smithy.api#required": {} + } + }, + "knowledgeBaseType": { + "target": "com.amazonaws.wisdom#KnowledgeBaseType", + "traits": { + "smithy.api#documentation": "

              The type of knowledge base. Only CUSTOM knowledge bases allow you to upload your own content.\n EXTERNAL knowledge bases support integrations with third-party systems whose content is\n synchronized automatically.

              ", + "smithy.api#required": {} + } + }, + "sourceConfiguration": { + "target": "com.amazonaws.wisdom#SourceConfiguration", + "traits": { + "smithy.api#documentation": "

              The source of the knowledge base content. Only set this argument for EXTERNAL knowledge\n bases.

              " + } + }, + "renderingConfiguration": { + "target": "com.amazonaws.wisdom#RenderingConfiguration", + "traits": { + "smithy.api#documentation": "

              Information about how to render the content.

              " + } + }, + "serverSideEncryptionConfiguration": { + "target": "com.amazonaws.wisdom#ServerSideEncryptionConfiguration", + "traits": { + "smithy.api#documentation": "

              The KMS key used for encryption.

              " + } + }, + "description": { + "target": "com.amazonaws.wisdom#Description", + "traits": { + "smithy.api#documentation": "

              The description.

              " + } + }, + "tags": { + "target": "com.amazonaws.wisdom#Tags", + "traits": { + "smithy.api#documentation": "

              The tags used to organize, track, or control access for this resource.

              " + } + } + } + }, + "com.amazonaws.wisdom#CreateKnowledgeBaseResponse": { + "type": "structure", + "members": { + "knowledgeBase": { + "target": "com.amazonaws.wisdom#KnowledgeBaseData", + "traits": { + "smithy.api#documentation": "

              The knowledge base.

              " + } + } + } + }, + "com.amazonaws.wisdom#CreateSession": { + "type": "operation", + "input": { + "target": "com.amazonaws.wisdom#CreateSessionRequest" + }, + "output": { + "target": "com.amazonaws.wisdom#CreateSessionResponse" + }, + "errors": [ + { + "target": "com.amazonaws.wisdom#ConflictException" + }, + { + "target": "com.amazonaws.wisdom#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.wisdom#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

              Creates a session. A session is a contextual container used for generating\n recommendations. Amazon Connect creates a new Wisdom session for each contact on which Wisdom is\n enabled.

              ", + "smithy.api#http": { + "method": "POST", + "uri": "/assistants/{assistantId}/sessions", + "code": 200 + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.wisdom#CreateSessionRequest": { + "type": "structure", + "members": { + "clientToken": { + "target": "com.amazonaws.wisdom#ClientToken", + "traits": { + "smithy.api#documentation": "

              A unique, case-sensitive identifier that you provide to ensure the idempotency of the\n request.

              ", + "smithy.api#idempotencyToken": {} + } + }, + "assistantId": { + "target": "com.amazonaws.wisdom#UuidOrArn", + "traits": { + "smithy.api#documentation": "

              The identifier of the Wisdom assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

              ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "name": { + "target": "com.amazonaws.wisdom#Name", + "traits": { + "smithy.api#documentation": "

              The name of the session.

              ", + "smithy.api#required": {} + } + }, + "description": { + "target": "com.amazonaws.wisdom#Description", + "traits": { + "smithy.api#documentation": "

              The description.

              " + } + }, + "tags": { + "target": "com.amazonaws.wisdom#Tags", + "traits": { + "smithy.api#documentation": "

              The tags used to organize, track, or control access for this resource.

              " + } + } + } + }, + "com.amazonaws.wisdom#CreateSessionResponse": { + "type": "structure", + "members": { + "session": { + "target": "com.amazonaws.wisdom#SessionData", + "traits": { + "smithy.api#documentation": "

              The session.

              " + } + } + } + }, + "com.amazonaws.wisdom#DeleteAssistant": { + "type": "operation", + "input": { + "target": "com.amazonaws.wisdom#DeleteAssistantRequest" + }, + "output": { + "target": "com.amazonaws.wisdom#DeleteAssistantResponse" + }, + "errors": [ + { + "target": "com.amazonaws.wisdom#AccessDeniedException" + }, + { + "target": "com.amazonaws.wisdom#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.wisdom#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

              Deletes an assistant.

              ", + "smithy.api#http": { + "method": "DELETE", + "uri": "/assistants/{assistantId}", + "code": 204 + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.wisdom#DeleteAssistantAssociation": { + "type": "operation", + "input": { + "target": "com.amazonaws.wisdom#DeleteAssistantAssociationRequest" + }, + "output": { + "target": "com.amazonaws.wisdom#DeleteAssistantAssociationResponse" + }, + "errors": [ + { + "target": "com.amazonaws.wisdom#AccessDeniedException" + }, + { + "target": "com.amazonaws.wisdom#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.wisdom#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

              Deletes an assistant association.

              ", + "smithy.api#http": { + "method": "DELETE", + "uri": "/assistants/{assistantId}/associations/{assistantAssociationId}", + "code": 204 + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.wisdom#DeleteAssistantAssociationRequest": { + "type": "structure", + "members": { + "assistantAssociationId": { + "target": "com.amazonaws.wisdom#UuidOrArn", + "traits": { + "smithy.api#documentation": "

              The identifier of the assistant association. Can be either the ID or the ARN. URLs cannot contain the ARN.

              ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "assistantId": { + "target": "com.amazonaws.wisdom#UuidOrArn", + "traits": { + "smithy.api#documentation": "

              The identifier of the Wisdom assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

              ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.wisdom#DeleteAssistantAssociationResponse": { + "type": "structure", + "members": {} + }, + "com.amazonaws.wisdom#DeleteAssistantRequest": { + "type": "structure", + "members": { + "assistantId": { + "target": "com.amazonaws.wisdom#UuidOrArn", + "traits": { + "smithy.api#documentation": "

              The identifier of the Wisdom assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

              ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.wisdom#DeleteAssistantResponse": { + "type": "structure", + "members": {} + }, + "com.amazonaws.wisdom#DeleteContent": { + "type": "operation", + "input": { + "target": "com.amazonaws.wisdom#DeleteContentRequest" + }, + "output": { + "target": "com.amazonaws.wisdom#DeleteContentResponse" + }, + "errors": [ + { + "target": "com.amazonaws.wisdom#AccessDeniedException" + }, + { + "target": "com.amazonaws.wisdom#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.wisdom#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

              Deletes the content.

              ", + "smithy.api#http": { + "method": "DELETE", + "uri": "/knowledgeBases/{knowledgeBaseId}/contents/{contentId}", + "code": 204 + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.wisdom#DeleteContentRequest": { + "type": "structure", + "members": { + "knowledgeBaseId": { + "target": "com.amazonaws.wisdom#UuidOrArn", + "traits": { + "smithy.api#documentation": "

              The the identifier of the knowledge base. Can be either the ID or the ARN. URLs cannot contain the ARN.

              ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "contentId": { + "target": "com.amazonaws.wisdom#UuidOrArn", + "traits": { + "smithy.api#documentation": "

              The identifier of the content. Can be either the ID or the ARN. URLs cannot contain the ARN.

              ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.wisdom#DeleteContentResponse": { + "type": "structure", + "members": {} + }, + "com.amazonaws.wisdom#DeleteKnowledgeBase": { + "type": "operation", + "input": { + "target": "com.amazonaws.wisdom#DeleteKnowledgeBaseRequest" + }, + "output": { + "target": "com.amazonaws.wisdom#DeleteKnowledgeBaseResponse" + }, + "errors": [ + { + "target": "com.amazonaws.wisdom#AccessDeniedException" + }, + { + "target": "com.amazonaws.wisdom#ConflictException" + }, + { + "target": "com.amazonaws.wisdom#ResourceNotFoundException" + } + ], + "traits": { + "smithy.api#documentation": "

              Deletes the knowledge base.

              \n \n

              When you use this API to delete an external knowledge base such as Salesforce or\n ServiceNow, you must also delete the Amazon AppIntegrations DataIntegration.\n This is because you can't reuse the DataIntegration after it's been associated with an\n external knowledge base. However, you can delete and recreate it. See DeleteDataIntegration and CreateDataIntegration in the Amazon AppIntegrations API\n Reference.

              \n
              ", + "smithy.api#http": { + "method": "DELETE", + "uri": "/knowledgeBases/{knowledgeBaseId}", + "code": 204 + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.wisdom#DeleteKnowledgeBaseRequest": { + "type": "structure", + "members": { + "knowledgeBaseId": { + "target": "com.amazonaws.wisdom#UuidOrArn", + "traits": { + "smithy.api#documentation": "

              The knowledge base to delete content from. Can be either the ID or the ARN. URLs cannot contain the ARN.

              ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.wisdom#DeleteKnowledgeBaseResponse": { + "type": "structure", + "members": {} + }, + "com.amazonaws.wisdom#Description": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 255 + }, + "smithy.api#pattern": "^[a-zA-Z0-9\\s_.,-]+" + } + }, + "com.amazonaws.wisdom#Document": { + "type": "structure", + "members": { + "contentReference": { + "target": "com.amazonaws.wisdom#ContentReference", + "traits": { + "smithy.api#documentation": "

              A reference to the content resource.

              ", + "smithy.api#required": {} + } + }, + "title": { + "target": "com.amazonaws.wisdom#DocumentText", + "traits": { + "smithy.api#documentation": "

              The title of the document.

              " + } + }, + "excerpt": { + "target": "com.amazonaws.wisdom#DocumentText", + "traits": { + "smithy.api#documentation": "

              The excerpt from the document.

              " + } + } + }, + "traits": { + "smithy.api#documentation": "

              The document.

              " + } + }, + "com.amazonaws.wisdom#DocumentText": { + "type": "structure", + "members": { + "text": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

              Text in the document.

              ", + "smithy.api#sensitive": {} + } + }, + "highlights": { + "target": "com.amazonaws.wisdom#Highlights", + "traits": { + "smithy.api#documentation": "

              Highlights in the document text.

              " + } + } + }, + "traits": { + "smithy.api#documentation": "

              The text of the document.

              " + } + }, + "com.amazonaws.wisdom#Filter": { + "type": "structure", + "members": { + "field": { + "target": "com.amazonaws.wisdom#FilterField", + "traits": { + "smithy.api#documentation": "

              The field on which to filter.

              ", + "smithy.api#required": {} + } + }, + "operator": { + "target": "com.amazonaws.wisdom#FilterOperator", + "traits": { + "smithy.api#documentation": "

              The operator to use for comparing the field’s value with the provided value.

              ", + "smithy.api#required": {} + } + }, + "value": { + "target": "com.amazonaws.wisdom#NonEmptyString", + "traits": { + "smithy.api#documentation": "

              The desired field value on which to filter.

              ", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

              A search filter.

              " + } + }, + "com.amazonaws.wisdom#FilterField": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "NAME", + "name": "NAME" + } + ] + } + }, + "com.amazonaws.wisdom#FilterList": { + "type": "list", + "member": { + "target": "com.amazonaws.wisdom#Filter" + } + }, + "com.amazonaws.wisdom#FilterOperator": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "EQUALS", + "name": "EQUALS" + } + ] + } + }, + "com.amazonaws.wisdom#GenericArn": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 2048 + }, + "smithy.api#pattern": "^arn:[a-z-]+?:[a-z-]+?:[a-z0-9-]*?:([0-9]{12})?:[a-zA-Z0-9-:/]+$" + } + }, + "com.amazonaws.wisdom#GetAssistant": { + "type": "operation", + "input": { + "target": "com.amazonaws.wisdom#GetAssistantRequest" + }, + "output": { + "target": "com.amazonaws.wisdom#GetAssistantResponse" + }, + "errors": [ + { + "target": "com.amazonaws.wisdom#AccessDeniedException" + }, + { + "target": "com.amazonaws.wisdom#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.wisdom#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

              Retrieves information about an assistant.

              ", + "smithy.api#http": { + "method": "GET", + "uri": "/assistants/{assistantId}", + "code": 200 + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.wisdom#GetAssistantAssociation": { + "type": "operation", + "input": { + "target": "com.amazonaws.wisdom#GetAssistantAssociationRequest" + }, + "output": { + "target": "com.amazonaws.wisdom#GetAssistantAssociationResponse" + }, + "errors": [ + { + "target": "com.amazonaws.wisdom#AccessDeniedException" + }, + { + "target": "com.amazonaws.wisdom#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.wisdom#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

              Retrieves information about an assistant association.

              ", + "smithy.api#http": { + "method": "GET", + "uri": "/assistants/{assistantId}/associations/{assistantAssociationId}", + "code": 200 + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.wisdom#GetAssistantAssociationRequest": { + "type": "structure", + "members": { + "assistantAssociationId": { + "target": "com.amazonaws.wisdom#UuidOrArn", + "traits": { + "smithy.api#documentation": "

              The identifier of the assistant association. Can be either the ID or the ARN. URLs cannot contain the ARN.

              ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "assistantId": { + "target": "com.amazonaws.wisdom#UuidOrArn", + "traits": { + "smithy.api#documentation": "

              The identifier of the Wisdom assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

              ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.wisdom#GetAssistantAssociationResponse": { + "type": "structure", + "members": { + "assistantAssociation": { + "target": "com.amazonaws.wisdom#AssistantAssociationData", + "traits": { + "smithy.api#documentation": "

              The assistant association.

              " + } + } + } + }, + "com.amazonaws.wisdom#GetAssistantRequest": { + "type": "structure", + "members": { + "assistantId": { + "target": "com.amazonaws.wisdom#UuidOrArn", + "traits": { + "smithy.api#documentation": "

              The identifier of the Wisdom assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

              ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.wisdom#GetAssistantResponse": { + "type": "structure", + "members": { + "assistant": { + "target": "com.amazonaws.wisdom#AssistantData", + "traits": { + "smithy.api#documentation": "

              Information about the assistant.

              " + } + } + } + }, + "com.amazonaws.wisdom#GetContent": { + "type": "operation", + "input": { + "target": "com.amazonaws.wisdom#GetContentRequest" + }, + "output": { + "target": "com.amazonaws.wisdom#GetContentResponse" + }, + "errors": [ + { + "target": "com.amazonaws.wisdom#AccessDeniedException" + }, + { + "target": "com.amazonaws.wisdom#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.wisdom#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

              Retrieves content, including a pre-signed URL to download the content.

              ", + "smithy.api#http": { + "method": "GET", + "uri": "/knowledgeBases/{knowledgeBaseId}/contents/{contentId}", + "code": 200 + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.wisdom#GetContentRequest": { + "type": "structure", + "members": { + "contentId": { + "target": "com.amazonaws.wisdom#UuidOrArn", + "traits": { + "smithy.api#documentation": "

              The identifier of the content. Can be either the ID or the ARN. URLs cannot contain the ARN.

              ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "knowledgeBaseId": { + "target": "com.amazonaws.wisdom#UuidOrArn", + "traits": { + "smithy.api#documentation": "

              The the identifier of the knowledge base. Can be either the ID or the ARN. URLs cannot contain the ARN.

              ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.wisdom#GetContentResponse": { + "type": "structure", + "members": { + "content": { + "target": "com.amazonaws.wisdom#ContentData", + "traits": { + "smithy.api#documentation": "

              The content.

              " + } + } + } + }, + "com.amazonaws.wisdom#GetContentSummary": { + "type": "operation", + "input": { + "target": "com.amazonaws.wisdom#GetContentSummaryRequest" + }, + "output": { + "target": "com.amazonaws.wisdom#GetContentSummaryResponse" + }, + "errors": [ + { + "target": "com.amazonaws.wisdom#AccessDeniedException" + }, + { + "target": "com.amazonaws.wisdom#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.wisdom#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

              Retrieves summary information about the content.

              ", + "smithy.api#http": { + "method": "GET", + "uri": "/knowledgeBases/{knowledgeBaseId}/contents/{contentId}/summary", + "code": 200 + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.wisdom#GetContentSummaryRequest": { + "type": "structure", + "members": { + "contentId": { + "target": "com.amazonaws.wisdom#UuidOrArn", + "traits": { + "smithy.api#documentation": "

              The identifier of the content. Can be either the ID or the ARN. URLs cannot contain the ARN.

              ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "knowledgeBaseId": { + "target": "com.amazonaws.wisdom#UuidOrArn", + "traits": { + "smithy.api#documentation": "

              The the identifier of the knowledge base. Can be either the ID or the ARN. URLs cannot contain the ARN.

              ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.wisdom#GetContentSummaryResponse": { + "type": "structure", + "members": { + "contentSummary": { + "target": "com.amazonaws.wisdom#ContentSummary", + "traits": { + "smithy.api#documentation": "

              The content summary.

              " + } + } + } + }, + "com.amazonaws.wisdom#GetKnowledgeBase": { + "type": "operation", + "input": { + "target": "com.amazonaws.wisdom#GetKnowledgeBaseRequest" + }, + "output": { + "target": "com.amazonaws.wisdom#GetKnowledgeBaseResponse" + }, + "errors": [ + { + "target": "com.amazonaws.wisdom#AccessDeniedException" + }, + { + "target": "com.amazonaws.wisdom#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.wisdom#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

              Retrieves information about the knowledge base.

              ", + "smithy.api#http": { + "method": "GET", + "uri": "/knowledgeBases/{knowledgeBaseId}", + "code": 200 + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.wisdom#GetKnowledgeBaseRequest": { + "type": "structure", + "members": { + "knowledgeBaseId": { + "target": "com.amazonaws.wisdom#UuidOrArn", + "traits": { + "smithy.api#documentation": "

              The the identifier of the knowledge base. Can be either the ID or the ARN. URLs cannot contain the ARN.

              ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.wisdom#GetKnowledgeBaseResponse": { + "type": "structure", + "members": { + "knowledgeBase": { + "target": "com.amazonaws.wisdom#KnowledgeBaseData", + "traits": { + "smithy.api#documentation": "

              The knowledge base.

              " + } + } + } + }, + "com.amazonaws.wisdom#GetRecommendations": { + "type": "operation", + "input": { + "target": "com.amazonaws.wisdom#GetRecommendationsRequest" + }, + "output": { + "target": "com.amazonaws.wisdom#GetRecommendationsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.wisdom#AccessDeniedException" + }, + { + "target": "com.amazonaws.wisdom#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.wisdom#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

              Retrieves recommendations for the specified session. To avoid retrieving the same\n recommendations in subsequent calls, use NotifyRecommendationsReceived. This API supports long-polling behavior with the\n waitTimeSeconds parameter. Short poll is the default behavior and only returns\n recommendations already available. To perform a manual query against an assistant, use QueryAssistant.

              ", + "smithy.api#http": { + "method": "GET", + "uri": "/assistants/{assistantId}/sessions/{sessionId}/recommendations", + "code": 200 + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.wisdom#GetRecommendationsRequest": { + "type": "structure", + "members": { + "assistantId": { + "target": "com.amazonaws.wisdom#UuidOrArn", + "traits": { + "smithy.api#documentation": "

              The identifier of the Wisdom assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

              ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "sessionId": { + "target": "com.amazonaws.wisdom#UuidOrArn", + "traits": { + "smithy.api#documentation": "

              The identifier of the session. Can be either the ID or the ARN. URLs cannot contain the ARN.

              ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "maxResults": { + "target": "com.amazonaws.wisdom#MaxResults", + "traits": { + "smithy.api#documentation": "

              The maximum number of results to return per page.

              ", + "smithy.api#httpQuery": "maxResults" + } + }, + "waitTimeSeconds": { + "target": "com.amazonaws.wisdom#WaitTimeSeconds", + "traits": { + "smithy.api#documentation": "

              The duration (in seconds) for which the call waits for a recommendation to be made\n available before returning. If a recommendation is available, the call returns sooner than\n WaitTimeSeconds. If no messages are available and the wait time expires, the\n call returns successfully with an empty list.

              ", + "smithy.api#httpQuery": "waitTimeSeconds" + } + } + } + }, + "com.amazonaws.wisdom#GetRecommendationsResponse": { + "type": "structure", + "members": { + "recommendations": { + "target": "com.amazonaws.wisdom#RecommendationList", + "traits": { + "smithy.api#documentation": "

              The recommendations.

              ", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.wisdom#GetSession": { + "type": "operation", + "input": { + "target": "com.amazonaws.wisdom#GetSessionRequest" + }, + "output": { + "target": "com.amazonaws.wisdom#GetSessionResponse" + }, + "errors": [ + { + "target": "com.amazonaws.wisdom#AccessDeniedException" + }, + { + "target": "com.amazonaws.wisdom#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.wisdom#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

              Retrieves information for a specified session.

              ", + "smithy.api#http": { + "method": "GET", + "uri": "/assistants/{assistantId}/sessions/{sessionId}", + "code": 200 + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.wisdom#GetSessionRequest": { + "type": "structure", + "members": { + "assistantId": { + "target": "com.amazonaws.wisdom#UuidOrArn", + "traits": { + "smithy.api#documentation": "

              The identifier of the Wisdom assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

              ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "sessionId": { + "target": "com.amazonaws.wisdom#UuidOrArn", + "traits": { + "smithy.api#documentation": "

              The identifier of the session. Can be either the ID or the ARN. URLs cannot contain the ARN.

              ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.wisdom#GetSessionResponse": { + "type": "structure", + "members": { + "session": { + "target": "com.amazonaws.wisdom#SessionData", + "traits": { + "smithy.api#documentation": "

              The session.

              " + } + } + } + }, + "com.amazonaws.wisdom#Headers": { + "type": "map", + "key": { + "target": "com.amazonaws.wisdom#NonEmptyString" + }, + "value": { + "target": "com.amazonaws.wisdom#NonEmptyString" + } + }, + "com.amazonaws.wisdom#Highlight": { + "type": "structure", + "members": { + "beginOffsetInclusive": { + "target": "com.amazonaws.wisdom#HighlightOffset", + "traits": { + "smithy.api#documentation": "

              The offset for the start of the highlight.

              " + } + }, + "endOffsetExclusive": { + "target": "com.amazonaws.wisdom#HighlightOffset", + "traits": { + "smithy.api#documentation": "

              The offset for the end of the highlight.

              " + } + } + }, + "traits": { + "smithy.api#documentation": "

              Offset specification to describe highlighting of document excerpts for rendering search\n results and recommendations.

              " + } + }, + "com.amazonaws.wisdom#HighlightOffset": { + "type": "integer" + }, + "com.amazonaws.wisdom#Highlights": { + "type": "list", + "member": { + "target": "com.amazonaws.wisdom#Highlight" + } + }, + "com.amazonaws.wisdom#KnowledgeBase": { + "type": "resource", + "identifiers": { + "knowledgeBaseId": { + "target": "com.amazonaws.wisdom#UuidOrArn" + } + }, + "create": { + "target": "com.amazonaws.wisdom#CreateKnowledgeBase" + }, + "read": { + "target": "com.amazonaws.wisdom#GetKnowledgeBase" + }, + "delete": { + "target": "com.amazonaws.wisdom#DeleteKnowledgeBase" + }, + "list": { + "target": "com.amazonaws.wisdom#ListKnowledgeBases" + }, + "operations": [ + { + "target": "com.amazonaws.wisdom#RemoveKnowledgeBaseTemplateUri" + }, + { + "target": "com.amazonaws.wisdom#SearchContent" + }, + { + "target": "com.amazonaws.wisdom#StartContentUpload" + }, + { + "target": "com.amazonaws.wisdom#UpdateKnowledgeBaseTemplateUri" + } + ], + "resources": [ + { + "target": "com.amazonaws.wisdom#Content" + } + ], + "traits": { + "aws.api#arn": { + "template": "knowledge-base/{knowledgeBaseId}", + "absolute": false, + "noAccount": false, + "noRegion": false + }, + "aws.cloudformation#cfnResource": {}, + "aws.iam#disableConditionKeyInference": {} + } + }, + "com.amazonaws.wisdom#KnowledgeBaseAssociationData": { + "type": "structure", + "members": { + "knowledgeBaseId": { + "target": "com.amazonaws.wisdom#Uuid", + "traits": { + "smithy.api#documentation": "

              The the identifier of the knowledge base.

              " + } + }, + "knowledgeBaseArn": { + "target": "com.amazonaws.wisdom#Arn", + "traits": { + "smithy.api#documentation": "

              The Amazon Resource Name (ARN) of the knowledge base.

              " + } + } + }, + "traits": { + "smithy.api#documentation": "

              Association information about the knowledge base.

              " + } + }, + "com.amazonaws.wisdom#KnowledgeBaseData": { + "type": "structure", + "members": { + "knowledgeBaseId": { + "target": "com.amazonaws.wisdom#Uuid", + "traits": { + "smithy.api#documentation": "

              The the identifier of the knowledge base.

              ", + "smithy.api#required": {} + } + }, + "knowledgeBaseArn": { + "target": "com.amazonaws.wisdom#Arn", + "traits": { + "smithy.api#documentation": "

              The Amazon Resource Name (ARN) of the knowledge base.

              ", + "smithy.api#required": {} + } + }, + "name": { + "target": "com.amazonaws.wisdom#Name", + "traits": { + "smithy.api#documentation": "

              The name of the knowledge base.

              ", + "smithy.api#required": {} + } + }, + "knowledgeBaseType": { + "target": "com.amazonaws.wisdom#KnowledgeBaseType", + "traits": { + "smithy.api#documentation": "

              The type of knowledge base.

              ", + "smithy.api#required": {} + } + }, + "status": { + "target": "com.amazonaws.wisdom#KnowledgeBaseStatus", + "traits": { + "smithy.api#documentation": "

              The status of the knowledge base.

              ", + "smithy.api#required": {} + } + }, + "lastContentModificationTime": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "

              An epoch timestamp indicating the most recent content modification inside the knowledge\n base. If no content exists in a knowledge base, this value is unset.

              ", + "smithy.api#timestampFormat": "epoch-seconds" + } + }, + "sourceConfiguration": { + "target": "com.amazonaws.wisdom#SourceConfiguration", + "traits": { + "smithy.api#documentation": "

              Source configuration information about the knowledge base.

              " + } + }, + "renderingConfiguration": { + "target": "com.amazonaws.wisdom#RenderingConfiguration", + "traits": { + "smithy.api#documentation": "

              Information about how to render the content.

              " + } + }, + "serverSideEncryptionConfiguration": { + "target": "com.amazonaws.wisdom#ServerSideEncryptionConfiguration", + "traits": { + "smithy.api#documentation": "

              The KMS key used for encryption.

              " + } + }, + "description": { + "target": "com.amazonaws.wisdom#Description", + "traits": { + "smithy.api#documentation": "

              The description.

              " + } + }, + "tags": { + "target": "com.amazonaws.wisdom#Tags", + "traits": { + "smithy.api#documentation": "

              The tags used to organize, track, or control access for this resource.

              " + } + } + }, + "traits": { + "smithy.api#documentation": "

              Information about the knowledge base.

              ", + "smithy.api#references": [ + { + "resource": "com.amazonaws.wisdom#KnowledgeBase" + } + ] + } + }, + "com.amazonaws.wisdom#KnowledgeBaseList": { + "type": "list", + "member": { + "target": "com.amazonaws.wisdom#KnowledgeBaseSummary" + } + }, + "com.amazonaws.wisdom#KnowledgeBaseStatus": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "CREATE_IN_PROGRESS", + "name": "CREATE_IN_PROGRESS" + }, + { + "value": "CREATE_FAILED", + "name": "CREATE_FAILED" + }, + { + "value": "ACTIVE", + "name": "ACTIVE" + }, + { + "value": "DELETE_IN_PROGRESS", + "name": "DELETE_IN_PROGRESS" + }, + { + "value": "DELETE_FAILED", + "name": "DELETE_FAILED" + }, + { + "value": "DELETED", + "name": "DELETED" + } + ] + } + }, + "com.amazonaws.wisdom#KnowledgeBaseSummary": { + "type": "structure", + "members": { + "knowledgeBaseId": { + "target": "com.amazonaws.wisdom#Uuid", + "traits": { + "smithy.api#documentation": "

              The the identifier of the knowledge base.

              ", + "smithy.api#required": {} + } + }, + "knowledgeBaseArn": { + "target": "com.amazonaws.wisdom#Arn", + "traits": { + "smithy.api#documentation": "

              The Amazon Resource Name (ARN) of the knowledge base.

              ", + "smithy.api#required": {} + } + }, + "name": { + "target": "com.amazonaws.wisdom#Name", + "traits": { + "smithy.api#documentation": "

              The name of the knowledge base.

              ", + "smithy.api#required": {} + } + }, + "knowledgeBaseType": { + "target": "com.amazonaws.wisdom#KnowledgeBaseType", + "traits": { + "smithy.api#documentation": "

              The type of knowledge base.

              ", + "smithy.api#required": {} + } + }, + "status": { + "target": "com.amazonaws.wisdom#KnowledgeBaseStatus", + "traits": { + "smithy.api#documentation": "

              The status of the knowledge base summary.

              ", + "smithy.api#required": {} + } + }, + "sourceConfiguration": { + "target": "com.amazonaws.wisdom#SourceConfiguration", + "traits": { + "smithy.api#documentation": "

              [KEVIN]

              " + } + }, + "renderingConfiguration": { + "target": "com.amazonaws.wisdom#RenderingConfiguration", + "traits": { + "smithy.api#documentation": "

              Information about how to render the content.

              " + } + }, + "serverSideEncryptionConfiguration": { + "target": "com.amazonaws.wisdom#ServerSideEncryptionConfiguration", + "traits": { + "smithy.api#documentation": "

              The KMS key used for encryption.

              " + } + }, + "description": { + "target": "com.amazonaws.wisdom#Description", + "traits": { + "smithy.api#documentation": "

              The description of the knowledge base.

              " + } + }, + "tags": { + "target": "com.amazonaws.wisdom#Tags", + "traits": { + "smithy.api#documentation": "

              The tags used to organize, track, or control access for this resource.

              " + } + } + }, + "traits": { + "smithy.api#documentation": "

              Summary information about the knowledge base.

              ", + "smithy.api#references": [ + { + "resource": "com.amazonaws.wisdom#KnowledgeBase" + } + ] + } + }, + "com.amazonaws.wisdom#KnowledgeBaseType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "EXTERNAL", + "name": "EXTERNAL" + }, + { + "value": "CUSTOM", + "name": "CUSTOM" + } + ] + } + }, + "com.amazonaws.wisdom#ListAssistantAssociations": { + "type": "operation", + "input": { + "target": "com.amazonaws.wisdom#ListAssistantAssociationsRequest" + }, + "output": { + "target": "com.amazonaws.wisdom#ListAssistantAssociationsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.wisdom#AccessDeniedException" + }, + { + "target": "com.amazonaws.wisdom#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.wisdom#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

              Lists information about assistant associations.

              ", + "smithy.api#http": { + "method": "GET", + "uri": "/assistants/{assistantId}/associations", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "items": "assistantAssociationSummaries", + "pageSize": "maxResults" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.wisdom#ListAssistantAssociationsRequest": { + "type": "structure", + "members": { + "nextToken": { + "target": "com.amazonaws.wisdom#NextToken", + "traits": { + "smithy.api#documentation": "

              The token for the next set of results. Use the value returned in the previous \nresponse in the next request to retrieve the next set of results.

              ", + "smithy.api#httpQuery": "nextToken" + } + }, + "maxResults": { + "target": "com.amazonaws.wisdom#MaxResults", + "traits": { + "smithy.api#documentation": "

              The maximum number of results to return per page.

              ", + "smithy.api#httpQuery": "maxResults" + } + }, + "assistantId": { + "target": "com.amazonaws.wisdom#UuidOrArn", + "traits": { + "smithy.api#documentation": "

              The identifier of the Wisdom assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

              ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.wisdom#ListAssistantAssociationsResponse": { + "type": "structure", + "members": { + "assistantAssociationSummaries": { + "target": "com.amazonaws.wisdom#AssistantAssociationSummaryList", + "traits": { + "smithy.api#documentation": "

              Summary information about assistant associations.

              ", + "smithy.api#required": {} + } + }, + "nextToken": { + "target": "com.amazonaws.wisdom#NextToken", + "traits": { + "smithy.api#documentation": "

              If there are additional results, this is the token for the next set of results.

              " + } + } + } + }, + "com.amazonaws.wisdom#ListAssistants": { + "type": "operation", + "input": { + "target": "com.amazonaws.wisdom#ListAssistantsRequest" + }, + "output": { + "target": "com.amazonaws.wisdom#ListAssistantsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.wisdom#AccessDeniedException" + }, + { + "target": "com.amazonaws.wisdom#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

              Lists information about assistants.

              ", + "smithy.api#http": { + "method": "GET", + "uri": "/assistants", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "items": "assistantSummaries", + "pageSize": "maxResults" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.wisdom#ListAssistantsRequest": { + "type": "structure", + "members": { + "nextToken": { + "target": "com.amazonaws.wisdom#NextToken", + "traits": { + "smithy.api#documentation": "

              The token for the next set of results. Use the value returned in the previous \nresponse in the next request to retrieve the next set of results.

              ", + "smithy.api#httpQuery": "nextToken" + } + }, + "maxResults": { + "target": "com.amazonaws.wisdom#MaxResults", + "traits": { + "smithy.api#documentation": "

              The maximum number of results to return per page.

              ", + "smithy.api#httpQuery": "maxResults" + } + } + } + }, + "com.amazonaws.wisdom#ListAssistantsResponse": { + "type": "structure", + "members": { + "assistantSummaries": { + "target": "com.amazonaws.wisdom#AssistantList", + "traits": { + "smithy.api#documentation": "

              Information about the assistants.

              ", + "smithy.api#required": {} + } + }, + "nextToken": { + "target": "com.amazonaws.wisdom#NextToken", + "traits": { + "smithy.api#documentation": "

              If there are additional results, this is the token for the next set of results.

              " + } + } + } + }, + "com.amazonaws.wisdom#ListContents": { + "type": "operation", + "input": { + "target": "com.amazonaws.wisdom#ListContentsRequest" + }, + "output": { + "target": "com.amazonaws.wisdom#ListContentsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.wisdom#AccessDeniedException" + }, + { + "target": "com.amazonaws.wisdom#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.wisdom#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

              Lists the content.

              ", + "smithy.api#http": { + "method": "GET", + "uri": "/knowledgeBases/{knowledgeBaseId}/contents", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "items": "contentSummaries", + "pageSize": "maxResults" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.wisdom#ListContentsRequest": { + "type": "structure", + "members": { + "nextToken": { + "target": "com.amazonaws.wisdom#NextToken", + "traits": { + "smithy.api#documentation": "

              The token for the next set of results. Use the value returned in the previous \nresponse in the next request to retrieve the next set of results.

              ", + "smithy.api#httpQuery": "nextToken" + } + }, + "maxResults": { + "target": "com.amazonaws.wisdom#MaxResults", + "traits": { + "smithy.api#documentation": "

              The maximum number of results to return per page.

              ", + "smithy.api#httpQuery": "maxResults" + } + }, + "knowledgeBaseId": { + "target": "com.amazonaws.wisdom#UuidOrArn", + "traits": { + "smithy.api#documentation": "

              The the identifier of the knowledge base. Can be either the ID or the ARN. URLs cannot contain the ARN.

              ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.wisdom#ListContentsResponse": { + "type": "structure", + "members": { + "contentSummaries": { + "target": "com.amazonaws.wisdom#ContentSummaryList", + "traits": { + "smithy.api#documentation": "

              Information about the content.

              ", + "smithy.api#required": {} + } + }, + "nextToken": { + "target": "com.amazonaws.wisdom#NextToken", + "traits": { + "smithy.api#documentation": "

              If there are additional results, this is the token for the next set of results.

              " + } + } + } + }, + "com.amazonaws.wisdom#ListKnowledgeBases": { + "type": "operation", + "input": { + "target": "com.amazonaws.wisdom#ListKnowledgeBasesRequest" + }, + "output": { + "target": "com.amazonaws.wisdom#ListKnowledgeBasesResponse" + }, + "errors": [ + { + "target": "com.amazonaws.wisdom#AccessDeniedException" + }, + { + "target": "com.amazonaws.wisdom#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

              Lists the knowledge bases.

              ", + "smithy.api#http": { + "method": "GET", + "uri": "/knowledgeBases", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "items": "knowledgeBaseSummaries", + "pageSize": "maxResults" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.wisdom#ListKnowledgeBasesRequest": { + "type": "structure", + "members": { + "nextToken": { + "target": "com.amazonaws.wisdom#NonEmptyString", + "traits": { + "smithy.api#documentation": "

              The token for the next set of results. Use the value returned in the previous \nresponse in the next request to retrieve the next set of results.

              ", + "smithy.api#httpQuery": "nextToken" + } + }, + "maxResults": { + "target": "com.amazonaws.wisdom#MaxResults", + "traits": { + "smithy.api#documentation": "

              The maximum number of results to return per page.

              ", + "smithy.api#httpQuery": "maxResults" + } + } + } + }, + "com.amazonaws.wisdom#ListKnowledgeBasesResponse": { + "type": "structure", + "members": { + "knowledgeBaseSummaries": { + "target": "com.amazonaws.wisdom#KnowledgeBaseList", + "traits": { + "smithy.api#documentation": "

              Information about the knowledge bases.

              ", + "smithy.api#required": {} + } + }, + "nextToken": { + "target": "com.amazonaws.wisdom#NonEmptyString", + "traits": { + "smithy.api#documentation": "

              If there are additional results, this is the token for the next set of results.

              " + } + } + } + }, + "com.amazonaws.wisdom#ListTagsForResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.wisdom#ListTagsForResourceRequest" + }, + "output": { + "target": "com.amazonaws.wisdom#ListTagsForResourceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.wisdom#ResourceNotFoundException" + } + ], + "traits": { + "smithy.api#documentation": "

              Lists the tags for the specified resource.

              ", + "smithy.api#http": { + "method": "GET", + "uri": "/tags/{resourceArn}", + "code": 200 + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.wisdom#ListTagsForResourceRequest": { + "type": "structure", + "members": { + "resourceArn": { + "target": "com.amazonaws.wisdom#Arn", + "traits": { + "smithy.api#documentation": "

              The Amazon Resource Name (ARN) of the resource.

              ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.wisdom#ListTagsForResourceResponse": { + "type": "structure", + "members": { + "tags": { + "target": "com.amazonaws.wisdom#Tags", + "traits": { + "smithy.api#documentation": "

              The tags used to organize, track, or control access for this resource.

              " + } + } + } + }, + "com.amazonaws.wisdom#MaxResults": { + "type": "integer", + "traits": { + "smithy.api#box": {}, + "smithy.api#range": { + "min": 1, + "max": 100 + } + } + }, + "com.amazonaws.wisdom#Name": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 255 + }, + "smithy.api#pattern": "^[a-zA-Z0-9\\s_.,-]+" + } + }, + "com.amazonaws.wisdom#NextToken": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 2048 + } + } + }, + "com.amazonaws.wisdom#NonEmptyString": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 4096 + } + } + }, + "com.amazonaws.wisdom#NotifyRecommendationsReceived": { + "type": "operation", + "input": { + "target": "com.amazonaws.wisdom#NotifyRecommendationsReceivedRequest" + }, + "output": { + "target": "com.amazonaws.wisdom#NotifyRecommendationsReceivedResponse" + }, + "errors": [ + { + "target": "com.amazonaws.wisdom#AccessDeniedException" + }, + { + "target": "com.amazonaws.wisdom#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.wisdom#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

              Removes the specified recommendations from the specified assistant's queue of newly\n available recommendations. You can use this API in conjunction with GetRecommendations and a waitTimeSeconds input for long-polling\n behavior and avoiding duplicate recommendations.

              ", + "smithy.api#http": { + "method": "POST", + "uri": "/assistants/{assistantId}/sessions/{sessionId}/recommendations/notify", + "code": 200 + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.wisdom#NotifyRecommendationsReceivedError": { + "type": "structure", + "members": { + "recommendationId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

              The identifier of the recommendation that is in error.

              " + } + }, + "message": { + "target": "com.amazonaws.wisdom#NotifyRecommendationsReceivedErrorMessage", + "traits": { + "smithy.api#documentation": "

              A recommendation is causing an error.

              " + } + } + }, + "traits": { + "smithy.api#documentation": "

              An error occurred when creating a recommendation.

              " + } + }, + "com.amazonaws.wisdom#NotifyRecommendationsReceivedErrorList": { + "type": "list", + "member": { + "target": "com.amazonaws.wisdom#NotifyRecommendationsReceivedError" + } + }, + "com.amazonaws.wisdom#NotifyRecommendationsReceivedErrorMessage": { + "type": "string" + }, + "com.amazonaws.wisdom#NotifyRecommendationsReceivedRequest": { + "type": "structure", + "members": { + "assistantId": { + "target": "com.amazonaws.wisdom#UuidOrArn", + "traits": { + "smithy.api#documentation": "

              The identifier of the Wisdom assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

              ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "sessionId": { + "target": "com.amazonaws.wisdom#UuidOrArn", + "traits": { + "smithy.api#documentation": "

              The identifier of the session. Can be either the ID or the ARN. URLs cannot contain the ARN.

              ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "recommendationIds": { + "target": "com.amazonaws.wisdom#RecommendationIdList", + "traits": { + "smithy.api#documentation": "

              The identifiers of the recommendations.

              ", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.wisdom#NotifyRecommendationsReceivedResponse": { + "type": "structure", + "members": { + "recommendationIds": { + "target": "com.amazonaws.wisdom#RecommendationIdList", + "traits": { + "smithy.api#documentation": "

              The identifiers of the recommendations.

              " + } + }, + "errors": { + "target": "com.amazonaws.wisdom#NotifyRecommendationsReceivedErrorList", + "traits": { + "smithy.api#documentation": "

              The identifiers of recommendations that are causing errors.

              " + } + } + } + }, + "com.amazonaws.wisdom#ObjectFieldsList": { + "type": "list", + "member": { + "target": "com.amazonaws.wisdom#NonEmptyString" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 100 + } + } + }, + "com.amazonaws.wisdom#PreconditionFailedException": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#documentation": "

              The provided revisionId does not match, indicating the content has been\n modified since it was last read.

              ", + "smithy.api#error": "client", + "smithy.api#httpError": 412 + } + }, + "com.amazonaws.wisdom#QueryAssistant": { + "type": "operation", + "input": { + "target": "com.amazonaws.wisdom#QueryAssistantRequest" + }, + "output": { + "target": "com.amazonaws.wisdom#QueryAssistantResponse" + }, + "errors": [ + { + "target": "com.amazonaws.wisdom#AccessDeniedException" + }, + { + "target": "com.amazonaws.wisdom#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.wisdom#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

              Performs a manual search against the specified assistant. To retrieve recommendations for\n an assistant, use GetRecommendations.\n

              ", + "smithy.api#http": { + "method": "POST", + "uri": "/assistants/{assistantId}/query", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "items": "results", + "pageSize": "maxResults" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.wisdom#QueryAssistantRequest": { + "type": "structure", + "members": { + "assistantId": { + "target": "com.amazonaws.wisdom#UuidOrArn", + "traits": { + "smithy.api#documentation": "

              The identifier of the Wisdom assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

              ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "queryText": { + "target": "com.amazonaws.wisdom#QueryText", + "traits": { + "smithy.api#documentation": "

              The text to search for.

              ", + "smithy.api#required": {} + } + }, + "nextToken": { + "target": "com.amazonaws.wisdom#NextToken", + "traits": { + "smithy.api#documentation": "

              The token for the next set of results. Use the value returned in the previous \nresponse in the next request to retrieve the next set of results.

              " + } + }, + "maxResults": { + "target": "com.amazonaws.wisdom#MaxResults", + "traits": { + "smithy.api#documentation": "

              The maximum number of results to return per page.

              " + } + } + } + }, + "com.amazonaws.wisdom#QueryAssistantResponse": { + "type": "structure", + "members": { + "results": { + "target": "com.amazonaws.wisdom#QueryResultsList", + "traits": { + "smithy.api#documentation": "

              The results of the query.

              ", + "smithy.api#required": {} + } + }, + "nextToken": { + "target": "com.amazonaws.wisdom#NextToken", + "traits": { + "smithy.api#documentation": "

              If there are additional results, this is the token for the next set of results.

              " + } + } + } + }, + "com.amazonaws.wisdom#QueryResultsList": { + "type": "list", + "member": { + "target": "com.amazonaws.wisdom#ResultData" + } + }, + "com.amazonaws.wisdom#QueryText": { + "type": "string", + "traits": { + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.wisdom#RecommendationData": { + "type": "structure", + "members": { + "recommendationId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

              The identifier of the recommendation.

              ", + "smithy.api#required": {} + } + }, + "document": { + "target": "com.amazonaws.wisdom#Document", + "traits": { + "smithy.api#documentation": "

              The recommended document.

              ", + "smithy.api#required": {} + } + }, + "relevanceScore": { + "target": "com.amazonaws.wisdom#RelevanceScore", + "traits": { + "smithy.api#documentation": "

              The relevance score of the recommendation.

              " + } + }, + "relevanceLevel": { + "target": "com.amazonaws.wisdom#RelevanceLevel", + "traits": { + "smithy.api#documentation": "

              The relevance level of the recommendation.

              " + } + } + }, + "traits": { + "smithy.api#documentation": "

              Information about the recommendation.

              " + } + }, + "com.amazonaws.wisdom#RecommendationIdList": { + "type": "list", + "member": { + "target": "smithy.api#String" + } + }, + "com.amazonaws.wisdom#RecommendationList": { + "type": "list", + "member": { + "target": "com.amazonaws.wisdom#RecommendationData" + } + }, + "com.amazonaws.wisdom#RelevanceLevel": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "HIGH", + "name": "HIGH" + }, + { + "value": "MEDIUM", + "name": "MEDIUM" + }, + { + "value": "LOW", + "name": "LOW" + } + ] + } + }, + "com.amazonaws.wisdom#RelevanceScore": { + "type": "double", + "traits": { + "smithy.api#range": { + "min": 0.0 + } + } + }, + "com.amazonaws.wisdom#RemoveKnowledgeBaseTemplateUri": { + "type": "operation", + "input": { + "target": "com.amazonaws.wisdom#RemoveKnowledgeBaseTemplateUriRequest" + }, + "output": { + "target": "com.amazonaws.wisdom#RemoveKnowledgeBaseTemplateUriResponse" + }, + "errors": [ + { + "target": "com.amazonaws.wisdom#AccessDeniedException" + }, + { + "target": "com.amazonaws.wisdom#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.wisdom#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

              Removes a URI template from a knowledge base.

              ", + "smithy.api#http": { + "method": "DELETE", + "uri": "/knowledgeBases/{knowledgeBaseId}/templateUri", + "code": 204 + } + } + }, + "com.amazonaws.wisdom#RemoveKnowledgeBaseTemplateUriRequest": { + "type": "structure", + "members": { + "knowledgeBaseId": { + "target": "com.amazonaws.wisdom#UuidOrArn", + "traits": { + "smithy.api#documentation": "

              The the identifier of the knowledge base. Can be either the ID or the ARN. URLs cannot contain the ARN.

              ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.wisdom#RemoveKnowledgeBaseTemplateUriResponse": { + "type": "structure", + "members": {} + }, + "com.amazonaws.wisdom#RenderingConfiguration": { + "type": "structure", + "members": { + "templateUri": { + "target": "com.amazonaws.wisdom#Uri", + "traits": { + "smithy.api#documentation": "

              A URI template containing exactly one variable in ${variableName} format.\n This can only be set for EXTERNAL knowledge bases. For Salesforce and ServiceNow,\n the variable must be one of the following:

              \n
                \n
              • \n

                Salesforce: Id, ArticleNumber, VersionNumber,\n Title, PublishStatus, or IsDeleted\n

                \n
              • \n
              • \n

                ServiceNow: number, short_description,\n sys_mod_count, workflow_state, or active\n

                \n
              • \n
              \n\n

              The variable is replaced with the actual value for a piece of content when calling GetContent.

              " + } + } + }, + "traits": { + "smithy.api#documentation": "

              Information about how to render the content.

              " + } + }, + "com.amazonaws.wisdom#ResourceNotFoundException": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String" + }, + "resourceName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

              The specified resource name.

              " + } + } + }, + "traits": { + "smithy.api#documentation": "

              The specified resource does not exist.

              ", + "smithy.api#error": "client", + "smithy.api#httpError": 404 + } + }, + "com.amazonaws.wisdom#ResultData": { + "type": "structure", + "members": { + "resultId": { + "target": "com.amazonaws.wisdom#Uuid", + "traits": { + "smithy.api#documentation": "

              The identifier of the result data.

              ", + "smithy.api#required": {} + } + }, + "document": { + "target": "com.amazonaws.wisdom#Document", + "traits": { + "smithy.api#documentation": "

              The document.

              ", + "smithy.api#required": {} + } + }, + "relevanceScore": { + "target": "com.amazonaws.wisdom#RelevanceScore", + "traits": { + "smithy.api#documentation": "

              The relevance score of the results.

              " + } + } + }, + "traits": { + "smithy.api#documentation": "

              Information about the result.

              " + } + }, + "com.amazonaws.wisdom#SearchContent": { + "type": "operation", + "input": { + "target": "com.amazonaws.wisdom#SearchContentRequest" + }, + "output": { + "target": "com.amazonaws.wisdom#SearchContentResponse" + }, + "errors": [ + { + "target": "com.amazonaws.wisdom#AccessDeniedException" + }, + { + "target": "com.amazonaws.wisdom#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.wisdom#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

              Searches for content in a specified knowledge base. Can be used to get a specific content\n resource by its name.

              ", + "smithy.api#http": { + "method": "POST", + "uri": "/knowledgeBases/{knowledgeBaseId}/search", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "items": "contentSummaries", + "pageSize": "maxResults" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.wisdom#SearchContentRequest": { + "type": "structure", + "members": { + "nextToken": { + "target": "com.amazonaws.wisdom#NextToken", + "traits": { + "smithy.api#documentation": "

              The token for the next set of results. Use the value returned in the previous \nresponse in the next request to retrieve the next set of results.

              ", + "smithy.api#httpQuery": "nextToken" + } + }, + "maxResults": { + "target": "com.amazonaws.wisdom#MaxResults", + "traits": { + "smithy.api#documentation": "

              The maximum number of results to return per page.

              ", + "smithy.api#httpQuery": "maxResults" + } + }, + "knowledgeBaseId": { + "target": "com.amazonaws.wisdom#UuidOrArn", + "traits": { + "smithy.api#documentation": "

              The the identifier of the knowledge base. Can be either the ID or the ARN. URLs cannot contain the ARN.

              ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "searchExpression": { + "target": "com.amazonaws.wisdom#SearchExpression", + "traits": { + "smithy.api#documentation": "

              The search expression to filter results.

              ", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.wisdom#SearchContentResponse": { + "type": "structure", + "members": { + "contentSummaries": { + "target": "com.amazonaws.wisdom#ContentSummaryList", + "traits": { + "smithy.api#documentation": "

              Summary information about the content.

              ", + "smithy.api#required": {} + } + }, + "nextToken": { + "target": "com.amazonaws.wisdom#NextToken", + "traits": { + "smithy.api#documentation": "

              If there are additional results, this is the token for the next set of results.

              " + } + } + } + }, + "com.amazonaws.wisdom#SearchExpression": { + "type": "structure", + "members": { + "filters": { + "target": "com.amazonaws.wisdom#FilterList", + "traits": { + "smithy.api#documentation": "

              The search expression filters.

              ", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

              The search expression.

              " + } + }, + "com.amazonaws.wisdom#SearchSessions": { + "type": "operation", + "input": { + "target": "com.amazonaws.wisdom#SearchSessionsRequest" + }, + "output": { + "target": "com.amazonaws.wisdom#SearchSessionsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.wisdom#AccessDeniedException" + }, + { + "target": "com.amazonaws.wisdom#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.wisdom#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

              Searches for sessions.

              ", + "smithy.api#http": { + "method": "POST", + "uri": "/assistants/{assistantId}/searchSessions", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "items": "sessionSummaries", + "pageSize": "maxResults" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.wisdom#SearchSessionsRequest": { + "type": "structure", + "members": { + "nextToken": { + "target": "com.amazonaws.wisdom#NextToken", + "traits": { + "smithy.api#documentation": "

              The token for the next set of results. Use the value returned in the previous \nresponse in the next request to retrieve the next set of results.

              ", + "smithy.api#httpQuery": "nextToken" + } + }, + "maxResults": { + "target": "com.amazonaws.wisdom#MaxResults", + "traits": { + "smithy.api#documentation": "

              The maximum number of results to return per page.

              ", + "smithy.api#httpQuery": "maxResults" + } + }, + "assistantId": { + "target": "com.amazonaws.wisdom#UuidOrArn", + "traits": { + "smithy.api#documentation": "

              The identifier of the Wisdom assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

              ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "searchExpression": { + "target": "com.amazonaws.wisdom#SearchExpression", + "traits": { + "smithy.api#documentation": "

              The search expression to filter results.

              ", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.wisdom#SearchSessionsResponse": { + "type": "structure", + "members": { + "sessionSummaries": { + "target": "com.amazonaws.wisdom#SessionSummaries", + "traits": { + "smithy.api#documentation": "

              Summary information about the sessions.

              ", + "smithy.api#required": {} + } + }, + "nextToken": { + "target": "com.amazonaws.wisdom#NextToken", + "traits": { + "smithy.api#documentation": "

              If there are additional results, this is the token for the next set of results.

              " + } + } + } + }, + "com.amazonaws.wisdom#ServerSideEncryptionConfiguration": { + "type": "structure", + "members": { + "kmsKeyId": { + "target": "com.amazonaws.wisdom#NonEmptyString", + "traits": { + "smithy.api#documentation": "

              The KMS key. For information about valid ID values, see Key identifiers (KeyId) in the\n AWS Key Management Service Developer Guide.

              " + } + } + }, + "traits": { + "smithy.api#documentation": "

              The KMS key used for encryption.

              " + } + }, + "com.amazonaws.wisdom#ServiceQuotaExceededException": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#documentation": "

              You've exceeded your service quota. To perform the requested action, remove some of the\n relevant resources, or use service quotas to request a service quota increase.

              ", + "smithy.api#error": "client", + "smithy.api#httpError": 402 + } + }, + "com.amazonaws.wisdom#Session": { + "type": "resource", + "identifiers": { + "assistantId": { + "target": "com.amazonaws.wisdom#UuidOrArn" + }, + "sessionId": { + "target": "com.amazonaws.wisdom#UuidOrArn" + } + }, + "create": { + "target": "com.amazonaws.wisdom#CreateSession" + }, + "read": { + "target": "com.amazonaws.wisdom#GetSession" + }, + "traits": { + "aws.api#arn": { + "template": "session/{assistantId}/{sessionId}", + "absolute": false, + "noAccount": false, + "noRegion": false + }, + "aws.iam#disableConditionKeyInference": {} + } + }, + "com.amazonaws.wisdom#SessionData": { + "type": "structure", + "members": { + "sessionArn": { + "target": "com.amazonaws.wisdom#Arn", + "traits": { + "smithy.api#documentation": "

              The Amazon Resource Name (ARN) of the session.

              ", + "smithy.api#required": {} + } + }, + "sessionId": { + "target": "com.amazonaws.wisdom#Uuid", + "traits": { + "smithy.api#documentation": "

              The identifier of the session.

              ", + "smithy.api#required": {} + } + }, + "name": { + "target": "com.amazonaws.wisdom#Name", + "traits": { + "smithy.api#documentation": "

              The name of the session.

              ", + "smithy.api#required": {} + } + }, + "description": { + "target": "com.amazonaws.wisdom#Description", + "traits": { + "smithy.api#documentation": "

              The description of the session.

              " + } + }, + "tags": { + "target": "com.amazonaws.wisdom#Tags", + "traits": { + "smithy.api#documentation": "

              The tags used to organize, track, or control access for this resource.

              " + } + } + }, + "traits": { + "smithy.api#documentation": "

              Information about the session.

              " + } + }, + "com.amazonaws.wisdom#SessionSummaries": { + "type": "list", + "member": { + "target": "com.amazonaws.wisdom#SessionSummary" + } + }, + "com.amazonaws.wisdom#SessionSummary": { + "type": "structure", + "members": { + "sessionId": { + "target": "com.amazonaws.wisdom#Uuid", + "traits": { + "smithy.api#documentation": "

              The identifier of the session.

              ", + "smithy.api#required": {} + } + }, + "sessionArn": { + "target": "com.amazonaws.wisdom#Arn", + "traits": { + "smithy.api#documentation": "

              The Amazon Resource Name (ARN) of the session.

              ", + "smithy.api#required": {} + } + }, + "assistantId": { + "target": "com.amazonaws.wisdom#Uuid", + "traits": { + "smithy.api#documentation": "

              The identifier of the Wisdom assistant.

              ", + "smithy.api#required": {} + } + }, + "assistantArn": { + "target": "com.amazonaws.wisdom#Arn", + "traits": { + "smithy.api#documentation": "

              The Amazon Resource Name (ARN) of the Wisdom assistant

              ", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

              Summary information about the session.

              " + } + }, + "com.amazonaws.wisdom#SourceConfiguration": { + "type": "union", + "members": { + "appIntegrations": { + "target": "com.amazonaws.wisdom#AppIntegrationsConfiguration", + "traits": { + "smithy.api#documentation": "

              Configuration information for Amazon AppIntegrations to automatically ingest content.

              " + } + } + }, + "traits": { + "smithy.api#documentation": "

              Configuration information about the external data source.

              " + } + }, + "com.amazonaws.wisdom#StartContentUpload": { + "type": "operation", + "input": { + "target": "com.amazonaws.wisdom#StartContentUploadRequest" + }, + "output": { + "target": "com.amazonaws.wisdom#StartContentUploadResponse" + }, + "errors": [ + { + "target": "com.amazonaws.wisdom#AccessDeniedException" + }, + { + "target": "com.amazonaws.wisdom#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.wisdom#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

              Get a URL to upload content to a knowledge base. To upload content, first make a PUT\n request to the returned URL with your file, making sure to include the required headers. Then\n use CreateContent to finalize the content creation process or UpdateContent to modify an existing resource. You can only upload content to a\n knowledge base of type CUSTOM.

              ", + "smithy.api#http": { + "method": "POST", + "uri": "/knowledgeBases/{knowledgeBaseId}/upload", + "code": 200 + } + } + }, + "com.amazonaws.wisdom#StartContentUploadRequest": { + "type": "structure", + "members": { + "knowledgeBaseId": { + "target": "com.amazonaws.wisdom#UuidOrArn", + "traits": { + "smithy.api#documentation": "

              The the identifier of the knowledge base. Can be either the ID or the ARN. URLs cannot contain the ARN.

              ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "contentType": { + "target": "com.amazonaws.wisdom#ContentType", + "traits": { + "smithy.api#documentation": "

              The type of content to upload.

              ", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.wisdom#StartContentUploadResponse": { + "type": "structure", + "members": { + "uploadId": { + "target": "com.amazonaws.wisdom#NonEmptyString", + "traits": { + "smithy.api#documentation": "

              The identifier of the upload.

              ", + "smithy.api#required": {} + } + }, + "url": { + "target": "com.amazonaws.wisdom#Url", + "traits": { + "smithy.api#documentation": "

              The URL of the upload.

              ", + "smithy.api#required": {}, + "smithy.api#sensitive": {} + } + }, + "urlExpiry": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "

              The expiration time of the URL as an epoch timestamp.

              ", + "smithy.api#required": {}, + "smithy.api#timestampFormat": "epoch-seconds" + } + }, + "headersToInclude": { + "target": "com.amazonaws.wisdom#Headers", + "traits": { + "smithy.api#documentation": "

              The headers to include in the upload.

              ", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.wisdom#TagKey": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 128 + }, + "smithy.api#pattern": "^(?!aws:)[a-zA-Z+-=._:/]+$" + } + }, + "com.amazonaws.wisdom#TagKeyList": { + "type": "list", + "member": { + "target": "com.amazonaws.wisdom#TagKey" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 50 + } + } + }, + "com.amazonaws.wisdom#TagResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.wisdom#TagResourceRequest" + }, + "output": { + "target": "com.amazonaws.wisdom#TagResourceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.wisdom#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.wisdom#TooManyTagsException" + } + ], + "traits": { + "smithy.api#documentation": "

              Adds the specified tags to the specified resource.

              ", + "smithy.api#http": { + "method": "POST", + "uri": "/tags/{resourceArn}", + "code": 200 + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.wisdom#TagResourceRequest": { + "type": "structure", + "members": { + "resourceArn": { + "target": "com.amazonaws.wisdom#Arn", + "traits": { + "smithy.api#documentation": "

              The Amazon Resource Name (ARN) of the resource.

              ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "tags": { + "target": "com.amazonaws.wisdom#Tags", + "traits": { + "smithy.api#documentation": "

              The tags used to organize, track, or control access for this resource.

              ", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.wisdom#TagResourceResponse": { + "type": "structure", + "members": {} + }, + "com.amazonaws.wisdom#TagValue": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 256 + } + } + }, + "com.amazonaws.wisdom#Tags": { + "type": "map", + "key": { + "target": "com.amazonaws.wisdom#TagKey" + }, + "value": { + "target": "com.amazonaws.wisdom#TagValue" + } + }, + "com.amazonaws.wisdom#TooManyTagsException": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String" + }, + "resourceName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

              The specified resource name.

              " + } + } + }, + "traits": { + "smithy.api#documentation": "

              Amazon Connect Wisdom throws this exception if you have too many tags in your tag set.

              ", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.wisdom#UntagResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.wisdom#UntagResourceRequest" + }, + "output": { + "target": "com.amazonaws.wisdom#UntagResourceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.wisdom#ResourceNotFoundException" + } + ], + "traits": { + "smithy.api#documentation": "

              Removes the specified tags from the specified resource.

              ", + "smithy.api#http": { + "method": "DELETE", + "uri": "/tags/{resourceArn}", + "code": 200 + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.wisdom#UntagResourceRequest": { + "type": "structure", + "members": { + "resourceArn": { + "target": "com.amazonaws.wisdom#Arn", + "traits": { + "smithy.api#documentation": "

              The Amazon Resource Name (ARN) of the resource.

              ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "tagKeys": { + "target": "com.amazonaws.wisdom#TagKeyList", + "traits": { + "smithy.api#documentation": "

              The tag keys.

              ", + "smithy.api#httpQuery": "tagKeys", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.wisdom#UntagResourceResponse": { + "type": "structure", + "members": {} + }, + "com.amazonaws.wisdom#UpdateContent": { + "type": "operation", + "input": { + "target": "com.amazonaws.wisdom#UpdateContentRequest" + }, + "output": { + "target": "com.amazonaws.wisdom#UpdateContentResponse" + }, + "errors": [ + { + "target": "com.amazonaws.wisdom#AccessDeniedException" + }, + { + "target": "com.amazonaws.wisdom#PreconditionFailedException" + }, + { + "target": "com.amazonaws.wisdom#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.wisdom#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

              Updates information about the content.

              ", + "smithy.api#http": { + "method": "POST", + "uri": "/knowledgeBases/{knowledgeBaseId}/contents/{contentId}", + "code": 200 + } + } + }, + "com.amazonaws.wisdom#UpdateContentRequest": { + "type": "structure", + "members": { + "knowledgeBaseId": { + "target": "com.amazonaws.wisdom#UuidOrArn", + "traits": { + "smithy.api#documentation": "

              The the identifier of the knowledge base. Can be either the ID or the ARN

              ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "contentId": { + "target": "com.amazonaws.wisdom#UuidOrArn", + "traits": { + "smithy.api#documentation": "

              The identifier of the content. Can be either the ID or the ARN. URLs cannot contain the ARN.

              ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "revisionId": { + "target": "com.amazonaws.wisdom#NonEmptyString", + "traits": { + "smithy.api#documentation": "

              The revisionId of the content resource to update, taken from an earlier call\n to GetContent, GetContentSummary, SearchContent, or\n ListContents. If included, this argument acts as an optimistic lock to ensure\n content was not modified since it was last read. If it has been modified, this API throws a\n PreconditionFailedException.

              " + } + }, + "title": { + "target": "com.amazonaws.wisdom#ContentTitle", + "traits": { + "smithy.api#documentation": "

              The title of the content.

              " + } + }, + "overrideLinkOutUri": { + "target": "com.amazonaws.wisdom#Uri", + "traits": { + "smithy.api#documentation": "

              The URI for the article. If the knowledge base has a templateUri, setting this argument\n overrides it for this piece of content. To remove an existing overrideLinkOurUri,\n exclude this argument and set removeOverrideLinkOutUri to true.

              " + } + }, + "removeOverrideLinkOutUri": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

              Unset the existing overrideLinkOutUri if it exists.

              " + } + }, + "metadata": { + "target": "com.amazonaws.wisdom#ContentMetadata", + "traits": { + "smithy.api#documentation": "

              A key/value map to store attributes without affecting tagging or recommendations. For\n example, when synchronizing data between an external system and Wisdom, you can store an\n external version identifier as metadata to utilize for determining drift.

              " + } + }, + "uploadId": { + "target": "com.amazonaws.wisdom#NonEmptyString", + "traits": { + "smithy.api#documentation": "

              A pointer to the uploaded asset. This value is returned by StartContentUpload.\n

              " + } + } + } + }, + "com.amazonaws.wisdom#UpdateContentResponse": { + "type": "structure", + "members": { + "content": { + "target": "com.amazonaws.wisdom#ContentData", + "traits": { + "smithy.api#documentation": "

              The content.

              " + } + } + } + }, + "com.amazonaws.wisdom#UpdateKnowledgeBaseTemplateUri": { + "type": "operation", + "input": { + "target": "com.amazonaws.wisdom#UpdateKnowledgeBaseTemplateUriRequest" + }, + "output": { + "target": "com.amazonaws.wisdom#UpdateKnowledgeBaseTemplateUriResponse" + }, + "errors": [ + { + "target": "com.amazonaws.wisdom#AccessDeniedException" + }, + { + "target": "com.amazonaws.wisdom#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.wisdom#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

              Updates the template URI of a knowledge base. This is only supported for knowledge bases\n of type EXTERNAL. Include a single variable in ${variable} format; this\n interpolated by Wisdom using ingested content. For example, if you ingest a Salesforce\n article, it has an Id value, and you can set the template URI to\n https://myInstanceName.lightning.force.com/lightning/r/Knowledge__kav/*${Id}*/view.\n

              ", + "smithy.api#http": { + "method": "POST", + "uri": "/knowledgeBases/{knowledgeBaseId}/templateUri", + "code": 200 + } + } + }, + "com.amazonaws.wisdom#UpdateKnowledgeBaseTemplateUriRequest": { + "type": "structure", + "members": { + "knowledgeBaseId": { + "target": "com.amazonaws.wisdom#UuidOrArn", + "traits": { + "smithy.api#documentation": "

              The the identifier of the knowledge base. Can be either the ID or the ARN. URLs cannot contain the ARN.

              ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "templateUri": { + "target": "com.amazonaws.wisdom#Uri", + "traits": { + "smithy.api#documentation": "

              The template URI to update.

              ", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.wisdom#UpdateKnowledgeBaseTemplateUriResponse": { + "type": "structure", + "members": { + "knowledgeBase": { + "target": "com.amazonaws.wisdom#KnowledgeBaseData", + "traits": { + "smithy.api#documentation": "

              The knowledge base to update.

              " + } + } + } + }, + "com.amazonaws.wisdom#Uri": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 4096 + } + } + }, + "com.amazonaws.wisdom#Url": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 4096 + } + } + }, + "com.amazonaws.wisdom#Uuid": { + "type": "string", + "traits": { + "smithy.api#pattern": "^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$" + } + }, + "com.amazonaws.wisdom#UuidOrArn": { + "type": "string", + "traits": { + "smithy.api#pattern": "^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$|^arn:[a-z-]*?:wisdom:[a-z0-9-]*?:[0-9]{12}:[a-z-]*?/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}(?:/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12})?$" + } + }, + "com.amazonaws.wisdom#ValidationException": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String" + } + }, + "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.wisdom#WaitTimeSeconds": { + "type": "integer", + "traits": { + "smithy.api#range": { + "min": 0, + "max": 20 + } + } + }, + "com.amazonaws.wisdom#WisdomService": { + "type": "service", + "version": "2020-10-19", + "operations": [ + { + "target": "com.amazonaws.wisdom#ListTagsForResource" + }, + { + "target": "com.amazonaws.wisdom#TagResource" + }, + { + "target": "com.amazonaws.wisdom#UntagResource" + } + ], + "resources": [ + { + "target": "com.amazonaws.wisdom#Assistant" + }, + { + "target": "com.amazonaws.wisdom#KnowledgeBase" + } + ], + "traits": { + "aws.api#service": { + "sdkId": "Wisdom", + "arnNamespace": "wisdom", + "cloudFormationName": "Wisdom", + "cloudTrailEventSource": "wisdom.amazonaws.com", + "endpointPrefix": "wisdom" + }, + "aws.auth#sigv4": { + "name": "wisdom" + }, + "aws.protocols#restJson1": {}, + "smithy.api#cors": {}, + "smithy.api#documentation": "

              All Amazon Connect Wisdom functionality is accessible using the API. For example, you can create an\n assistant and a knowledge base.

              \n\n

              Some more advanced features are only accessible using the Wisdom API. For example, you\n can manually manage content by uploading custom files and control their lifecycle.

              ", + "smithy.api#title": "Amazon Connect Wisdom Service" + } + } + } +} diff --git a/codegen/sdk-codegen/aws-models/workmail.2017-10-01.json b/codegen/sdk-codegen/aws-models/workmail.2017-10-01.json index 7ad60a21190f5..342463944b4e4 100644 --- a/codegen/sdk-codegen/aws-models/workmail.2017-10-01.json +++ b/codegen/sdk-codegen/aws-models/workmail.2017-10-01.json @@ -110,7 +110,7 @@ "min": 1, "max": 64 }, - "smithy.api#pattern": "[a-zA-Z]+" + "smithy.api#pattern": "^[a-zA-Z]+$" } }, "com.amazonaws.workmail#AccessControlRuleDescription": { @@ -120,7 +120,7 @@ "min": 0, "max": 255 }, - "smithy.api#pattern": "[\\u0020-\\u00FF]+" + "smithy.api#pattern": "^[\\u0020-\\u00FF]+$" } }, "com.amazonaws.workmail#AccessControlRuleEffect": { @@ -145,7 +145,7 @@ "min": 1, "max": 64 }, - "smithy.api#pattern": "[a-zA-Z0-9_-]+" + "smithy.api#pattern": "^[a-zA-Z0-9_-]+$" } }, "com.amazonaws.workmail#AccessControlRuleNameList": { @@ -1167,6 +1167,62 @@ "type": "structure", "members": {} }, + "com.amazonaws.workmail#DeleteMobileDeviceAccessOverride": { + "type": "operation", + "input": { + "target": "com.amazonaws.workmail#DeleteMobileDeviceAccessOverrideRequest" + }, + "output": { + "target": "com.amazonaws.workmail#DeleteMobileDeviceAccessOverrideResponse" + }, + "errors": [ + { + "target": "com.amazonaws.workmail#EntityNotFoundException" + }, + { + "target": "com.amazonaws.workmail#InvalidParameterException" + }, + { + "target": "com.amazonaws.workmail#OrganizationNotFoundException" + }, + { + "target": "com.amazonaws.workmail#OrganizationStateException" + } + ], + "traits": { + "smithy.api#documentation": "

              Deletes the mobile device access override for the given WorkMail organization, user, and device.

              " + } + }, + "com.amazonaws.workmail#DeleteMobileDeviceAccessOverrideRequest": { + "type": "structure", + "members": { + "OrganizationId": { + "target": "com.amazonaws.workmail#OrganizationId", + "traits": { + "smithy.api#documentation": "

              The Amazon WorkMail organization for which the access override will be deleted.

              ", + "smithy.api#required": {} + } + }, + "UserId": { + "target": "com.amazonaws.workmail#EntityIdentifier", + "traits": { + "smithy.api#documentation": "

              The WorkMail user for which you want to delete the override. Accepts the following types of user identities:

              \n
                \n
              • \n

                User ID: 12345678-1234-1234-1234-123456789012 or S-1-1-12-1234567890-123456789-123456789-1234 \n

                \n
              • \n
              • \n

                Email address: user@domain.tld\n

                \n
              • \n
              • \n

                User name: user\n

                \n
              • \n
              ", + "smithy.api#required": {} + } + }, + "DeviceId": { + "target": "com.amazonaws.workmail#DeviceId", + "traits": { + "smithy.api#documentation": "

              The mobile device for which you delete the override. DeviceId is case insensitive.

              ", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.workmail#DeleteMobileDeviceAccessOverrideResponse": { + "type": "structure", + "members": {} + }, "com.amazonaws.workmail#DeleteMobileDeviceAccessRule": { "type": "operation", "input": { @@ -1996,7 +2052,17 @@ "min": 0, "max": 1023 }, - "smithy.api#pattern": "[\\S\\s]*" + "smithy.api#pattern": "^[\\S\\s]*$" + } + }, + "com.amazonaws.workmail#DeviceId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 32 + }, + "smithy.api#pattern": "^[A-Za-z0-9]+$" } }, "com.amazonaws.workmail#DeviceModel": { @@ -2006,7 +2072,7 @@ "min": 1, "max": 256 }, - "smithy.api#pattern": "[\\u0020-\\u00FF]+" + "smithy.api#pattern": "^[\\u0020-\\u00FF]+$" } }, "com.amazonaws.workmail#DeviceModelList": { @@ -2028,7 +2094,7 @@ "min": 1, "max": 256 }, - "smithy.api#pattern": "[\\u0020-\\u00FF]+" + "smithy.api#pattern": "^[\\u0020-\\u00FF]+$" } }, "com.amazonaws.workmail#DeviceOperatingSystemList": { @@ -2050,7 +2116,7 @@ "min": 1, "max": 256 }, - "smithy.api#pattern": "[\\u0020-\\u00FF]+" + "smithy.api#pattern": "^[\\u0020-\\u00FF]+$" } }, "com.amazonaws.workmail#DeviceTypeList": { @@ -2072,7 +2138,7 @@ "min": 1, "max": 256 }, - "smithy.api#pattern": "[\\u0020-\\u00FF]+" + "smithy.api#pattern": "^[\\u0020-\\u00FF]+$" } }, "com.amazonaws.workmail#DeviceUserAgentList": { @@ -2289,7 +2355,7 @@ "min": 3, "max": 255 }, - "smithy.api#pattern": "[a-zA-Z0-9.-]+\\.[a-zA-Z-]{2,}" + "smithy.api#pattern": "^[a-zA-Z0-9.-]+\\.[a-zA-Z-]{2,}$" } }, "com.amazonaws.workmail#Domains": { @@ -2311,7 +2377,7 @@ "min": 1, "max": 254 }, - "smithy.api#pattern": "[a-zA-Z0-9._%+-]{1,64}@[a-zA-Z0-9.-]+\\.[a-zA-Z-]{2,}" + "smithy.api#pattern": "^[a-zA-Z0-9._%+-]{1,64}@[a-zA-Z0-9.-]+\\.[a-zA-Z-]{2,}$" } }, "com.amazonaws.workmail#EmailAddressInUseException": { @@ -2338,6 +2404,16 @@ "smithy.api#error": "client" } }, + "com.amazonaws.workmail#EntityIdentifier": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 256 + }, + "smithy.api#pattern": "^[a-zA-Z0-9._%+@-]+$" + } + }, "com.amazonaws.workmail#EntityNotFoundException": { "type": "structure", "members": { @@ -2722,6 +2798,102 @@ } } }, + "com.amazonaws.workmail#GetMobileDeviceAccessOverride": { + "type": "operation", + "input": { + "target": "com.amazonaws.workmail#GetMobileDeviceAccessOverrideRequest" + }, + "output": { + "target": "com.amazonaws.workmail#GetMobileDeviceAccessOverrideResponse" + }, + "errors": [ + { + "target": "com.amazonaws.workmail#EntityNotFoundException" + }, + { + "target": "com.amazonaws.workmail#InvalidParameterException" + }, + { + "target": "com.amazonaws.workmail#OrganizationNotFoundException" + }, + { + "target": "com.amazonaws.workmail#OrganizationStateException" + }, + { + "target": "com.amazonaws.workmail#ResourceNotFoundException" + } + ], + "traits": { + "smithy.api#documentation": "

              Gets the mobile device access override for the given WorkMail organization, user, and device.

              " + } + }, + "com.amazonaws.workmail#GetMobileDeviceAccessOverrideRequest": { + "type": "structure", + "members": { + "OrganizationId": { + "target": "com.amazonaws.workmail#OrganizationId", + "traits": { + "smithy.api#documentation": "

              The Amazon WorkMail organization to which you want to apply the override.

              ", + "smithy.api#required": {} + } + }, + "UserId": { + "target": "com.amazonaws.workmail#EntityIdentifier", + "traits": { + "smithy.api#documentation": "

              Identifies the WorkMail user for the override. Accepts the following types of user identities:

              \n
                \n
              • \n

                User ID: 12345678-1234-1234-1234-123456789012 or S-1-1-12-1234567890-123456789-123456789-1234 \n

                \n
              • \n
              • \n

                Email address: user@domain.tld\n

                \n
              • \n
              • \n

                User name: user\n

                \n
              • \n
              ", + "smithy.api#required": {} + } + }, + "DeviceId": { + "target": "com.amazonaws.workmail#DeviceId", + "traits": { + "smithy.api#documentation": "

              The mobile device to which the override applies. DeviceId is case insensitive.

              ", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.workmail#GetMobileDeviceAccessOverrideResponse": { + "type": "structure", + "members": { + "UserId": { + "target": "com.amazonaws.workmail#WorkMailIdentifier", + "traits": { + "smithy.api#documentation": "

              The WorkMail user to which the access override applies.

              " + } + }, + "DeviceId": { + "target": "com.amazonaws.workmail#DeviceId", + "traits": { + "smithy.api#documentation": "

              The device to which the access override applies.

              " + } + }, + "Effect": { + "target": "com.amazonaws.workmail#MobileDeviceAccessRuleEffect", + "traits": { + "smithy.api#documentation": "

              The effect of the override, ALLOW or DENY.

              " + } + }, + "Description": { + "target": "com.amazonaws.workmail#MobileDeviceAccessRuleDescription", + "traits": { + "smithy.api#documentation": "

              A description of the override.

              " + } + }, + "DateCreated": { + "target": "com.amazonaws.workmail#Timestamp", + "traits": { + "smithy.api#documentation": "

              The date the override was first created.

              " + } + }, + "DateModified": { + "target": "com.amazonaws.workmail#Timestamp", + "traits": { + "smithy.api#documentation": "

              The date the description was last modified.

              " + } + } + } + }, "com.amazonaws.workmail#Group": { "type": "structure", "members": { @@ -2773,7 +2945,7 @@ "min": 1, "max": 256 }, - "smithy.api#pattern": "[\\u0020-\\u00FF]+" + "smithy.api#pattern": "^[\\u0020-\\u00FF]+$" } }, "com.amazonaws.workmail#Groups": { @@ -2789,7 +2961,7 @@ "min": 1, "max": 32 }, - "smithy.api#pattern": "[\\S\\s]*" + "smithy.api#pattern": "^[\\S\\s]*$" } }, "com.amazonaws.workmail#IdempotencyClientToken": { @@ -2799,7 +2971,7 @@ "min": 1, "max": 128 }, - "smithy.api#pattern": "[\\x21-\\x7e]+" + "smithy.api#pattern": "^[\\x21-\\x7e]+$" } }, "com.amazonaws.workmail#InvalidConfigurationException": { @@ -2883,7 +3055,7 @@ "min": 20, "max": 2048 }, - "smithy.api#pattern": "arn:aws:kms:[a-z0-9-]*:[a-z0-9-]+:[A-Za-z0-9][A-Za-z0-9:_/+=,@.-]{0,1023}" + "smithy.api#pattern": "^arn:aws:kms:[a-z0-9-]*:[a-z0-9-]+:[A-Za-z0-9][A-Za-z0-9:_/+=,@.-]{0,1023}$" } }, "com.amazonaws.workmail#LimitExceededException": { @@ -3330,6 +3502,90 @@ } } }, + "com.amazonaws.workmail#ListMobileDeviceAccessOverrides": { + "type": "operation", + "input": { + "target": "com.amazonaws.workmail#ListMobileDeviceAccessOverridesRequest" + }, + "output": { + "target": "com.amazonaws.workmail#ListMobileDeviceAccessOverridesResponse" + }, + "errors": [ + { + "target": "com.amazonaws.workmail#EntityNotFoundException" + }, + { + "target": "com.amazonaws.workmail#InvalidParameterException" + }, + { + "target": "com.amazonaws.workmail#OrganizationNotFoundException" + }, + { + "target": "com.amazonaws.workmail#OrganizationStateException" + } + ], + "traits": { + "smithy.api#documentation": "

              Lists all the mobile device access overrides for any given combination of WorkMail organization, user, or device.

              ", + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.workmail#ListMobileDeviceAccessOverridesRequest": { + "type": "structure", + "members": { + "OrganizationId": { + "target": "com.amazonaws.workmail#OrganizationId", + "traits": { + "smithy.api#documentation": "

              The Amazon WorkMail organization under which to list mobile device access overrides.

              ", + "smithy.api#required": {} + } + }, + "UserId": { + "target": "com.amazonaws.workmail#EntityIdentifier", + "traits": { + "smithy.api#documentation": "

              The WorkMail user under which you list the mobile device access overrides. Accepts the following types of user identities:

              \n
                \n
              • \n

                User ID: 12345678-1234-1234-1234-123456789012 or S-1-1-12-1234567890-123456789-123456789-1234 \n

                \n
              • \n
              • \n

                Email address: user@domain.tld\n

                \n
              • \n
              • \n

                User name: user\n

                \n
              • \n
              " + } + }, + "DeviceId": { + "target": "com.amazonaws.workmail#DeviceId", + "traits": { + "smithy.api#documentation": "

              The mobile device to which the access override applies.

              " + } + }, + "NextToken": { + "target": "com.amazonaws.workmail#NextToken", + "traits": { + "smithy.api#documentation": "

              The token to use to retrieve the next page of results. The first call does not require a token.

              " + } + }, + "MaxResults": { + "target": "com.amazonaws.workmail#MaxResults", + "traits": { + "smithy.api#documentation": "

              The maximum number of results to return in a single call.

              " + } + } + } + }, + "com.amazonaws.workmail#ListMobileDeviceAccessOverridesResponse": { + "type": "structure", + "members": { + "Overrides": { + "target": "com.amazonaws.workmail#MobileDeviceAccessOverridesList", + "traits": { + "smithy.api#documentation": "

              The list of mobile device access overrides that exist for the specified Amazon WorkMail organization and user.

              " + } + }, + "NextToken": { + "target": "com.amazonaws.workmail#NextToken", + "traits": { + "smithy.api#documentation": "

              The token to use to retrieve the next page of results. The value is “null” when there are no more results to return.

              " + } + } + } + }, "com.amazonaws.workmail#ListMobileDeviceAccessRules": { "type": "operation", "input": { @@ -3727,7 +3983,7 @@ "min": 1, "max": 1024 }, - "smithy.api#pattern": "[\\S\\s]*" + "smithy.api#pattern": "^[\\S\\s]*$" } }, "com.amazonaws.workmail#MailboxExportJob": { @@ -3799,7 +4055,7 @@ "min": 1, "max": 63 }, - "smithy.api#pattern": "[A-Za-z0-9-]+" + "smithy.api#pattern": "^[A-Za-z0-9-]+$" } }, "com.amazonaws.workmail#MailboxExportJobState": { @@ -3949,6 +4205,56 @@ } } }, + "com.amazonaws.workmail#MobileDeviceAccessOverride": { + "type": "structure", + "members": { + "UserId": { + "target": "com.amazonaws.workmail#WorkMailIdentifier", + "traits": { + "smithy.api#documentation": "

              The WorkMail user to which the access override applies.

              " + } + }, + "DeviceId": { + "target": "com.amazonaws.workmail#DeviceId", + "traits": { + "smithy.api#documentation": "

              The device to which the override applies.

              " + } + }, + "Effect": { + "target": "com.amazonaws.workmail#MobileDeviceAccessRuleEffect", + "traits": { + "smithy.api#documentation": "

              The effect of the override, ALLOW or DENY.

              " + } + }, + "Description": { + "target": "com.amazonaws.workmail#MobileDeviceAccessRuleDescription", + "traits": { + "smithy.api#documentation": "

              A description of the override.

              " + } + }, + "DateCreated": { + "target": "com.amazonaws.workmail#Timestamp", + "traits": { + "smithy.api#documentation": "

              The date the override was first created.

              " + } + }, + "DateModified": { + "target": "com.amazonaws.workmail#Timestamp", + "traits": { + "smithy.api#documentation": "

              The date the override was last modified.

              " + } + } + }, + "traits": { + "smithy.api#documentation": "

              The override object.

              " + } + }, + "com.amazonaws.workmail#MobileDeviceAccessOverridesList": { + "type": "list", + "member": { + "target": "com.amazonaws.workmail#MobileDeviceAccessOverride" + } + }, "com.amazonaws.workmail#MobileDeviceAccessRule": { "type": "structure", "members": { @@ -4048,7 +4354,7 @@ "min": 1, "max": 256 }, - "smithy.api#pattern": "[\\S\\s]+" + "smithy.api#pattern": "^[\\S\\s]+$" } }, "com.amazonaws.workmail#MobileDeviceAccessRuleEffect": { @@ -4073,7 +4379,7 @@ "min": 1, "max": 64 }, - "smithy.api#pattern": "[a-zA-Z0-9_-]+" + "smithy.api#pattern": "^[a-zA-Z0-9_-]+$" } }, "com.amazonaws.workmail#MobileDeviceAccessRuleName": { @@ -4083,7 +4389,7 @@ "min": 1, "max": 64 }, - "smithy.api#pattern": "[\\S\\s]+" + "smithy.api#pattern": "^[\\S\\s]+$" } }, "com.amazonaws.workmail#MobileDeviceAccessRulesList": { @@ -4117,7 +4423,7 @@ "min": 1, "max": 1024 }, - "smithy.api#pattern": "[\\S\\s]*|[a-zA-Z0-9/+=]{1,1024}" + "smithy.api#pattern": "^[\\S\\s]*|[a-zA-Z0-9/+=]{1,1024}$" } }, "com.amazonaws.workmail#OrganizationId": { @@ -4137,7 +4443,7 @@ "min": 1, "max": 62 }, - "smithy.api#pattern": "^(?!d-)([\\da-zA-Z]+)([-][\\da-zA-Z]+)*" + "smithy.api#pattern": "^(?!d-)([\\da-zA-Z]+)([-][\\da-zA-Z]+)*$" } }, "com.amazonaws.workmail#OrganizationNotFoundException": { @@ -4215,7 +4521,7 @@ "min": 0, "max": 256 }, - "smithy.api#pattern": "[\\u0020-\\u00FF]+", + "smithy.api#pattern": "^[\\u0020-\\u00FF]+$", "smithy.api#sensitive": {} } }, @@ -4295,7 +4601,7 @@ "min": 0, "max": 256 }, - "smithy.api#pattern": "[\\w\\d\\s\\S\\-!?=,.;:'_]+", + "smithy.api#pattern": "^[\\w\\d\\s\\S\\-!?=,.;:'_]+$", "smithy.api#sensitive": {} } }, @@ -4468,6 +4774,78 @@ "type": "structure", "members": {} }, + "com.amazonaws.workmail#PutMobileDeviceAccessOverride": { + "type": "operation", + "input": { + "target": "com.amazonaws.workmail#PutMobileDeviceAccessOverrideRequest" + }, + "output": { + "target": "com.amazonaws.workmail#PutMobileDeviceAccessOverrideResponse" + }, + "errors": [ + { + "target": "com.amazonaws.workmail#EntityNotFoundException" + }, + { + "target": "com.amazonaws.workmail#EntityStateException" + }, + { + "target": "com.amazonaws.workmail#InvalidParameterException" + }, + { + "target": "com.amazonaws.workmail#OrganizationNotFoundException" + }, + { + "target": "com.amazonaws.workmail#OrganizationStateException" + } + ], + "traits": { + "smithy.api#documentation": "

              Creates or updates a mobile device access override for the given WorkMail organization, user, and device.

              " + } + }, + "com.amazonaws.workmail#PutMobileDeviceAccessOverrideRequest": { + "type": "structure", + "members": { + "OrganizationId": { + "target": "com.amazonaws.workmail#OrganizationId", + "traits": { + "smithy.api#documentation": "

              Identifies the Amazon WorkMail organization for which you create the override.

              ", + "smithy.api#required": {} + } + }, + "UserId": { + "target": "com.amazonaws.workmail#EntityIdentifier", + "traits": { + "smithy.api#documentation": "

              The WorkMail user for which you create the override. Accepts the following types of user identities:

              \n
                \n
              • \n

                User ID: 12345678-1234-1234-1234-123456789012 or S-1-1-12-1234567890-123456789-123456789-1234 \n

                \n
              • \n
              • \n

                Email address: user@domain.tld\n

                \n
              • \n
              • \n

                User name: user\n

                \n
              • \n
              ", + "smithy.api#required": {} + } + }, + "DeviceId": { + "target": "com.amazonaws.workmail#DeviceId", + "traits": { + "smithy.api#documentation": "

              The mobile device for which you create the override. DeviceId is case insensitive.

              ", + "smithy.api#required": {} + } + }, + "Effect": { + "target": "com.amazonaws.workmail#MobileDeviceAccessRuleEffect", + "traits": { + "smithy.api#documentation": "

              The effect of the override, ALLOW or DENY.

              ", + "smithy.api#required": {} + } + }, + "Description": { + "target": "com.amazonaws.workmail#MobileDeviceAccessRuleDescription", + "traits": { + "smithy.api#documentation": "

              A description of the override.

              " + } + } + } + }, + "com.amazonaws.workmail#PutMobileDeviceAccessOverrideResponse": { + "type": "structure", + "members": {} + }, "com.amazonaws.workmail#PutRetentionPolicy": { "type": "operation", "input": { @@ -4772,7 +5150,7 @@ "min": 1, "max": 20 }, - "smithy.api#pattern": "[\\w\\-.]+(@[a-zA-Z0-9.\\-]+\\.[a-zA-Z0-9-]{2,})?" + "smithy.api#pattern": "^[\\w\\-.]+(@[a-zA-Z0-9.\\-]+\\.[a-zA-Z0-9-]{2,})?$" } }, "com.amazonaws.workmail#ResourceNotFoundException": { @@ -4854,7 +5232,7 @@ "min": 1, "max": 63 }, - "smithy.api#pattern": "[A-Za-z0-9.-]+" + "smithy.api#pattern": "^[A-Za-z0-9.-]+$" } }, "com.amazonaws.workmail#S3ObjectKey": { @@ -4864,7 +5242,7 @@ "min": 1, "max": 1023 }, - "smithy.api#pattern": "[A-Za-z0-9!_.*'()/-]+" + "smithy.api#pattern": "^[A-Za-z0-9!_.*'()/-]+$" } }, "com.amazonaws.workmail#ShortString": { @@ -4874,7 +5252,7 @@ "min": 1, "max": 64 }, - "smithy.api#pattern": "[a-zA-Z0-9_-]+" + "smithy.api#pattern": "^[a-zA-Z0-9_-]+$" } }, "com.amazonaws.workmail#StartMailboxExportJob": { @@ -5576,7 +5954,7 @@ "min": 1, "max": 64 }, - "smithy.api#pattern": "[\\w\\-.]+(@[a-zA-Z0-9.\\-]+\\.[a-zA-Z0-9-]{2,})?" + "smithy.api#pattern": "^[\\w\\-.]+(@[a-zA-Z0-9.\\-]+\\.[a-zA-Z0-9-]{2,})?$" } }, "com.amazonaws.workmail#UserRole": { @@ -5656,6 +6034,9 @@ { "target": "com.amazonaws.workmail#DeleteMailboxPermissions" }, + { + "target": "com.amazonaws.workmail#DeleteMobileDeviceAccessOverride" + }, { "target": "com.amazonaws.workmail#DeleteMobileDeviceAccessRule" }, @@ -5707,6 +6088,9 @@ { "target": "com.amazonaws.workmail#GetMobileDeviceAccessEffect" }, + { + "target": "com.amazonaws.workmail#GetMobileDeviceAccessOverride" + }, { "target": "com.amazonaws.workmail#ListAccessControlRules" }, @@ -5725,6 +6109,9 @@ { "target": "com.amazonaws.workmail#ListMailboxPermissions" }, + { + "target": "com.amazonaws.workmail#ListMobileDeviceAccessOverrides" + }, { "target": "com.amazonaws.workmail#ListMobileDeviceAccessRules" }, @@ -5749,6 +6136,9 @@ { "target": "com.amazonaws.workmail#PutMailboxPermissions" }, + { + "target": "com.amazonaws.workmail#PutMobileDeviceAccessOverride" + }, { "target": "com.amazonaws.workmail#PutRetentionPolicy" }, diff --git a/codegen/sdk-codegen/aws-models/workspaces.2015-04-08.json b/codegen/sdk-codegen/aws-models/workspaces.2015-04-08.json index b5070c77e81d0..f9291c75deca9 100644 --- a/codegen/sdk-codegen/aws-models/workspaces.2015-04-08.json +++ b/codegen/sdk-codegen/aws-models/workspaces.2015-04-08.json @@ -493,7 +493,7 @@ "OwnerAccountId": { "target": "com.amazonaws.workspaces#AwsAccount", "traits": { - "smithy.api#documentation": "

              The identifier of the AWS account that owns the connection alias.

              " + "smithy.api#documentation": "

              The identifier of the Amazon Web Services account that owns the connection alias.

              " } }, "Associations": { @@ -519,7 +519,7 @@ "AssociatedAccountId": { "target": "com.amazonaws.workspaces#AwsAccount", "traits": { - "smithy.api#documentation": "

              The identifier of the AWS account that associated the connection alias with a directory.

              " + "smithy.api#documentation": "

              The identifier of the Amazon Web Services account that associated the connection alias with a directory.

              " } }, "ResourceId": { @@ -591,14 +591,14 @@ "SharedAccountId": { "target": "com.amazonaws.workspaces#AwsAccount", "traits": { - "smithy.api#documentation": "

              The identifier of the AWS account that the connection alias is shared with.

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

              The identifier of the Amazon Web Services account that the connection alias is shared with.

              ", "smithy.api#required": {} } }, "AllowAssociation": { "target": "com.amazonaws.workspaces#BooleanObject", "traits": { - "smithy.api#documentation": "

              Indicates whether the specified AWS account is allowed to associate the connection alias with a directory.

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

              Indicates whether the specified Amazon Web Services account is allowed to associate the connection alias with a directory.

              ", "smithy.api#required": {} } } @@ -709,7 +709,7 @@ } ], "traits": { - "smithy.api#documentation": "

              Copies the specified image from the specified Region to the current Region. \n For more information about copying images, see \n \n Copy a Custom WorkSpaces Image.

              \n \n \n

              In the China (Ningxia) Region, you can copy images only within the same Region.

              \n \n

              In the AWS GovCloud (US-West) Region, to copy images to and from other AWS Regions, \n contact AWS Support.

              \n
              \n \n \n

              Before copying a shared image, be sure to verify that it has been shared from the\n correct AWS account. To determine if an image has been shared and to see the AWS \n account ID that owns an image, use the DescribeWorkSpaceImages and DescribeWorkspaceImagePermissions API operations.

              \n
              " + "smithy.api#documentation": "

              Copies the specified image from the specified Region to the current Region. \n For more information about copying images, see \n \n Copy a Custom WorkSpaces Image.

              \n \n

              In the China (Ningxia) Region, you can copy images only within the same Region.

              \n \n

              In Amazon Web Services GovCloud (US), to copy images to and from other Regions, contact Amazon Web Services Support.

              \n \n \n

              Before copying a shared image, be sure to verify that it has been shared from the\n correct Amazon Web Services account. To determine if an image has been shared and to see the \n ID of the Amazon Web Services account that owns an image, use the DescribeWorkSpaceImages and DescribeWorkspaceImagePermissions API operations.

              \n
              " } }, "com.amazonaws.workspaces#CopyWorkspaceImageRequest": { @@ -799,7 +799,7 @@ "ConnectionString": { "target": "com.amazonaws.workspaces#ConnectionString", "traits": { - "smithy.api#documentation": "

              A connection string in the form of a fully qualified domain name (FQDN), such as www.example.com.

              \n \n \n

              After you create a connection string, it is always associated to your AWS account. You cannot recreate the same \n connection string with a different account, even if you delete all instances of it from the original account. The \n connection string is globally reserved for your account.

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

              A connection string in the form of a fully qualified domain name (FQDN), such as www.example.com.

              \n \n \n

              After you create a connection string, it is always associated to your Amazon Web Services account. You cannot recreate the same \n connection string with a different account, even if you delete all instances of it from the original account. The \n connection string is globally reserved for your account.

              \n
              ", "smithy.api#required": {} } }, @@ -938,6 +938,84 @@ "type": "structure", "members": {} }, + "com.amazonaws.workspaces#CreateUpdatedWorkspaceImage": { + "type": "operation", + "input": { + "target": "com.amazonaws.workspaces#CreateUpdatedWorkspaceImageRequest" + }, + "output": { + "target": "com.amazonaws.workspaces#CreateUpdatedWorkspaceImageResult" + }, + "errors": [ + { + "target": "com.amazonaws.workspaces#AccessDeniedException" + }, + { + "target": "com.amazonaws.workspaces#InvalidParameterValuesException" + }, + { + "target": "com.amazonaws.workspaces#InvalidResourceStateException" + }, + { + "target": "com.amazonaws.workspaces#OperationNotSupportedException" + }, + { + "target": "com.amazonaws.workspaces#ResourceAlreadyExistsException" + }, + { + "target": "com.amazonaws.workspaces#ResourceLimitExceededException" + }, + { + "target": "com.amazonaws.workspaces#ResourceNotFoundException" + } + ], + "traits": { + "smithy.api#documentation": "

              Creates a new updated WorkSpace image based on the specified source image. The \n new updated WorkSpace image has the latest drivers and other updates required by \n the Amazon WorkSpaces components.

              \n \n

              To determine which WorkSpace images need to be updated with the latest Amazon \n WorkSpaces requirements, use \n \n DescribeWorkspaceImages.

              \n \n \n
                \n
              • \n

                Only Windows 10 WorkSpace images can be programmatically updated at this time.

                \n
              • \n
              • \n

                Microsoft Windows updates and other application updates are not included \n in the update process.

                \n
              • \n
              • \n

                The source WorkSpace image is not deleted. You can delete the source image after you've \n verified your new updated image and created a new bundle.

                \n
              • \n
              \n
              " + } + }, + "com.amazonaws.workspaces#CreateUpdatedWorkspaceImageRequest": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.workspaces#WorkspaceImageName", + "traits": { + "smithy.api#documentation": "

              The name of the new updated WorkSpace image.

              ", + "smithy.api#required": {} + } + }, + "Description": { + "target": "com.amazonaws.workspaces#WorkspaceImageDescription", + "traits": { + "smithy.api#documentation": "

              A description of whether updates for the WorkSpace image are available.

              ", + "smithy.api#required": {} + } + }, + "SourceImageId": { + "target": "com.amazonaws.workspaces#WorkspaceImageId", + "traits": { + "smithy.api#documentation": "

              The identifier of the source WorkSpace image.

              ", + "smithy.api#required": {} + } + }, + "Tags": { + "target": "com.amazonaws.workspaces#TagList", + "traits": { + "smithy.api#documentation": "

              The tags that you want to add to the new updated WorkSpace image.

              \n \n \n

              To add tags at the same time when you're creating the updated image, you must create \n an IAM policy that grants your IAM user permissions to use workspaces:CreateTags.

              \n
              " + } + } + } + }, + "com.amazonaws.workspaces#CreateUpdatedWorkspaceImageResult": { + "type": "structure", + "members": { + "ImageId": { + "target": "com.amazonaws.workspaces#WorkspaceImageId", + "traits": { + "smithy.api#documentation": "

              The identifier of the new updated WorkSpace image.

              " + } + } + } + }, "com.amazonaws.workspaces#CreateWorkspaceBundle": { "type": "operation", "input": { @@ -1083,7 +1161,7 @@ "com.amazonaws.workspaces#DedicatedTenancyManagementCidrRange": { "type": "string", "traits": { - "smithy.api#pattern": "(^([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.0\\.0)(\\/(16$))$" + "smithy.api#pattern": "^(^([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.0\\.0)(\\/(16$))$" } }, "com.amazonaws.workspaces#DedicatedTenancyModificationStateEnum": { @@ -1417,7 +1495,7 @@ } ], "traits": { - "smithy.api#documentation": "

              Deregisters the specified directory. This operation is asynchronous \n and returns before the WorkSpace directory is deregistered. If any WorkSpaces are\n registered to this directory, you must remove them before you can deregister the directory.

              \n \n \n

              Simple AD and AD Connector are made available to you free of charge to use with WorkSpaces. \n If there are no WorkSpaces being used with your Simple AD or AD Connector directory for 30 \n consecutive days, this directory will be automatically deregistered for use with Amazon WorkSpaces, \n and you will be charged for this directory as per the \n AWS Directory Services pricing terms.

              \n \n

              To delete empty directories, see \n \n Delete the Directory for Your WorkSpaces. If you delete your \n Simple AD or AD Connector directory, you can always create a new one when you want to start using \n WorkSpaces again.

              \n
              " + "smithy.api#documentation": "

              Deregisters the specified directory. This operation is asynchronous \n and returns before the WorkSpace directory is deregistered. If any WorkSpaces are\n registered to this directory, you must remove them before you can deregister the directory.

              \n \n \n

              Simple AD and AD Connector are made available to you free of charge to use with WorkSpaces. \n If there are no WorkSpaces being used with your Simple AD or AD Connector directory for 30 \n consecutive days, this directory will be automatically deregistered for use with Amazon WorkSpaces, \n and you will be charged for this directory as per the \n Directory Service pricing terms.

              \n \n

              To delete empty directories, see \n \n Delete the Directory for Your WorkSpaces. If you delete your \n Simple AD or AD Connector directory, you can always create a new one when you want to start using \n WorkSpaces again.

              \n
              " } }, "com.amazonaws.workspaces#DeregisterWorkspaceDirectoryRequest": { @@ -1588,7 +1666,7 @@ } ], "traits": { - "smithy.api#documentation": "

              Describes the permissions that the owner of a connection alias has granted to another AWS account for \n the specified connection alias. For more information, see \n Cross-Region Redirection for Amazon WorkSpaces.

              " + "smithy.api#documentation": "

              Describes the permissions that the owner of a connection alias has granted to another Amazon Web Services account for \n the specified connection alias. For more information, see \n Cross-Region Redirection for Amazon WorkSpaces.

              " } }, "com.amazonaws.workspaces#DescribeConnectionAliasPermissionsRequest": { @@ -1841,7 +1919,7 @@ "Owner": { "target": "com.amazonaws.workspaces#BundleOwner", "traits": { - "smithy.api#documentation": "

              The owner of the bundles. You cannot combine this parameter with any other filter.

              \n

              To describe the bundles provided by AWS, specify AMAZON. To describe the\n bundles that belong to your account, don't specify a value.

              " + "smithy.api#documentation": "

              The owner of the bundles. You cannot combine this parameter with any other filter.

              \n

              To describe the bundles provided by Amazon Web Services, specify AMAZON. \n To describe the bundles that belong to your account, don't specify a value.

              " } }, "NextToken": { @@ -1951,7 +2029,7 @@ } ], "traits": { - "smithy.api#documentation": "

              Describes the permissions that the owner of an image has granted to other \n AWS accounts for an image.

              " + "smithy.api#documentation": "

              Describes the permissions that the owner of an image has granted to other \n Amazon Web Services accounts for an image.

              " } }, "com.amazonaws.workspaces#DescribeWorkspaceImagePermissionsRequest": { @@ -1990,7 +2068,7 @@ "ImagePermissions": { "target": "com.amazonaws.workspaces#ImagePermissions", "traits": { - "smithy.api#documentation": "

              The identifiers of the AWS accounts that the image has been shared with.

              " + "smithy.api#documentation": "

              The identifiers of the Amazon Web Services accounts that the image has been shared with.

              " } }, "NextToken": { @@ -2311,7 +2389,7 @@ } ], "traits": { - "smithy.api#documentation": "

              Disassociates a connection alias from a directory. Disassociating a connection alias disables cross-Region \n redirection between two directories in different AWS Regions. For more information, see \n \n Cross-Region Redirection for Amazon WorkSpaces.

              \n \n \n

              Before performing this operation, call \n DescribeConnectionAliases to make sure that the current state of the connection alias is CREATED.

              \n
              " + "smithy.api#documentation": "

              Disassociates a connection alias from a directory. Disassociating a connection alias disables cross-Region \n redirection between two directories in different Regions. For more information, see \n \n Cross-Region Redirection for Amazon WorkSpaces.

              \n \n \n

              Before performing this operation, call \n DescribeConnectionAliases to make sure that the current state of the connection alias is CREATED.

              \n
              " } }, "com.amazonaws.workspaces#DisassociateConnectionAliasRequest": { @@ -2491,12 +2569,12 @@ "SharedAccountId": { "target": "com.amazonaws.workspaces#AwsAccount", "traits": { - "smithy.api#documentation": "

              The identifier of the AWS account that an image has been shared with.

              " + "smithy.api#documentation": "

              The identifier of the Amazon Web Services account that an image has been shared with.

              " } } }, "traits": { - "smithy.api#documentation": "

              Describes the AWS accounts that have been granted permission to use a shared image. For more \n information about sharing images, see \n \n Share or Unshare a Custom WorkSpaces Image.

              " + "smithy.api#documentation": "

              Describes the Amazon Web Services accounts that have been granted permission to use a shared image. \n For more information about sharing images, see \n \n Share or Unshare a Custom WorkSpaces Image.

              " } }, "com.amazonaws.workspaces#ImagePermissions": { @@ -2549,7 +2627,7 @@ } ], "traits": { - "smithy.api#documentation": "

              Imports the specified Windows 10 Bring Your Own License (BYOL) image into Amazon\n WorkSpaces. The image must be an already licensed Amazon EC2 image that is in your AWS\n account, and you must own the image. For more information about creating BYOL images, see\n \n Bring Your Own Windows Desktop Licenses.

              " + "smithy.api#documentation": "

              Imports the specified Windows 10 Bring Your Own License (BYOL) image into Amazon\n WorkSpaces. The image must be an already licensed Amazon EC2 image that is in your \n Amazon Web Services account, and you must own the image. For more information about creating BYOL images, see\n \n Bring Your Own Windows Desktop Licenses.

              " } }, "com.amazonaws.workspaces#ImportWorkspaceImageRequest": { @@ -2644,7 +2722,7 @@ "com.amazonaws.workspaces#IpGroupId": { "type": "string", "traits": { - "smithy.api#pattern": "wsipg-[0-9a-z]{8,63}$" + "smithy.api#pattern": "^wsipg-[0-9a-z]{8,63}$" } }, "com.amazonaws.workspaces#IpGroupIdList": { @@ -2721,7 +2799,7 @@ } ], "traits": { - "smithy.api#documentation": "

              Retrieves a list of IP address ranges, specified as IPv4 CIDR blocks, that you can use\n for the network management interface when you enable Bring Your Own License (BYOL).

              \n \n

              This operation can be run only by AWS accounts that are enabled for BYOL. If your account \n isn't enabled for BYOL, you'll receive an AccessDeniedException error.

              \n \n

              The management network interface is connected to a secure Amazon WorkSpaces management\n network. It is used for interactive streaming of the WorkSpace desktop to Amazon WorkSpaces\n clients, and to allow Amazon WorkSpaces to manage the WorkSpace.

              " + "smithy.api#documentation": "

              Retrieves a list of IP address ranges, specified as IPv4 CIDR blocks, that you can use\n for the network management interface when you enable Bring Your Own License (BYOL).

              \n \n

              This operation can be run only by Amazon Web Services accounts that are enabled for BYOL. If your account \n isn't enabled for BYOL, you'll receive an AccessDeniedException error.

              \n \n

              The management network interface is connected to a secure Amazon WorkSpaces management\n network. It is used for interactive streaming of the WorkSpace desktop to Amazon WorkSpaces\n clients, and to allow Amazon WorkSpaces to manage the WorkSpace.

              " } }, "com.amazonaws.workspaces#ListAvailableManagementCidrRangesRequest": { @@ -3536,7 +3614,7 @@ "Tenancy": { "target": "com.amazonaws.workspaces#Tenancy", "traits": { - "smithy.api#documentation": "

              Indicates whether your WorkSpace directory is dedicated or shared. To use Bring Your Own\n License (BYOL) images, this value must be set to DEDICATED and your AWS account must be \n enabled for BYOL. If your account has not been enabled for BYOL, you will receive an \n InvalidParameterValuesException error. For more information about BYOL images, see\n Bring Your Own Windows Desktop Images.

              " + "smithy.api#documentation": "

              Indicates whether your WorkSpace directory is dedicated or shared. To use Bring Your Own\n License (BYOL) images, this value must be set to DEDICATED and your Amazon Web Services account must be \n enabled for BYOL. If your account has not been enabled for BYOL, you will receive an \n InvalidParameterValuesException error. For more information about BYOL images, see\n Bring Your Own Windows Desktop Images.

              " } }, "Tags": { @@ -4123,7 +4201,7 @@ "target": "com.amazonaws.workspaces#TerminateWorkspacesResult" }, "traits": { - "smithy.api#documentation": "

              Terminates the specified WorkSpaces.

              \n \n \n

              Terminating a WorkSpace is a permanent action and cannot be undone. The user's data is\n destroyed. If you need to archive any user data, contact AWS Support before\n terminating the WorkSpace.

              \n
              \n\n

              You can terminate a WorkSpace that is in any state except SUSPENDED.

              \n

              This operation is asynchronous and returns before the WorkSpaces have been completely\n terminated. After a WorkSpace is terminated, the TERMINATED state is returned \n only briefly before the WorkSpace directory metadata is cleaned up, so this state is rarely \n returned. To confirm that a WorkSpace is terminated, check for the WorkSpace ID by using \n \n DescribeWorkSpaces. If the WorkSpace ID isn't returned, then the WorkSpace has \n been successfully terminated.

              \n \n \n

              Simple AD and AD Connector are made available to you free of charge to use with WorkSpaces. \n If there are no WorkSpaces being used with your Simple AD or AD Connector directory for 30 \n consecutive days, this directory will be automatically deregistered for use with Amazon WorkSpaces, \n and you will be charged for this directory as per the \n AWS Directory Services pricing terms.

              \n \n

              To delete empty directories, see \n \n Delete the Directory for Your WorkSpaces. If you delete your \n Simple AD or AD Connector directory, you can always create a new one when you want to start using \n WorkSpaces again.

              \n
              " + "smithy.api#documentation": "

              Terminates the specified WorkSpaces.

              \n \n \n

              Terminating a WorkSpace is a permanent action and cannot be undone. The user's data is\n destroyed. If you need to archive any user data, contact Amazon Web Services Support before\n terminating the WorkSpace.

              \n
              \n\n

              You can terminate a WorkSpace that is in any state except SUSPENDED.

              \n

              This operation is asynchronous and returns before the WorkSpaces have been completely\n terminated. After a WorkSpace is terminated, the TERMINATED state is returned \n only briefly before the WorkSpace directory metadata is cleaned up, so this state is rarely \n returned. To confirm that a WorkSpace is terminated, check for the WorkSpace ID by using \n \n DescribeWorkSpaces. If the WorkSpace ID isn't returned, then the WorkSpace has \n been successfully terminated.

              \n \n \n

              Simple AD and AD Connector are made available to you free of charge to use with WorkSpaces. \n If there are no WorkSpaces being used with your Simple AD or AD Connector directory for 30 \n consecutive days, this directory will be automatically deregistered for use with Amazon WorkSpaces, \n and you will be charged for this directory as per the \n Directory Service pricing terms.

              \n \n

              To delete empty directories, see \n \n Delete the Directory for Your WorkSpaces. If you delete your \n Simple AD or AD Connector directory, you can always create a new one when you want to start using \n WorkSpaces again.

              \n
              " } }, "com.amazonaws.workspaces#TerminateWorkspacesRequest": { @@ -4224,7 +4302,7 @@ "ConnectionAliasPermission": { "target": "com.amazonaws.workspaces#ConnectionAliasPermission", "traits": { - "smithy.api#documentation": "

              Indicates whether to share or unshare the connection alias with the specified AWS account.

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

              Indicates whether to share or unshare the connection alias with the specified Amazon Web Services account.

              ", "smithy.api#required": {} } } @@ -4234,6 +4312,36 @@ "type": "structure", "members": {} }, + "com.amazonaws.workspaces#UpdateDescription": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 255 + }, + "smithy.api#pattern": "^[a-zA-Z0-9_./() -]+$" + } + }, + "com.amazonaws.workspaces#UpdateResult": { + "type": "structure", + "members": { + "UpdateAvailable": { + "target": "com.amazonaws.workspaces#BooleanObject", + "traits": { + "smithy.api#documentation": "

              Indicates whether updated drivers or other components are available for the specified WorkSpace image.

              " + } + }, + "Description": { + "target": "com.amazonaws.workspaces#UpdateDescription", + "traits": { + "smithy.api#documentation": "

              A description of whether updates for the WorkSpace image are pending or available.

              " + } + } + }, + "traits": { + "smithy.api#documentation": "

              Describes whether a WorkSpace image needs to be updated with the latest \n drivers and other components required by Amazon WorkSpaces.

              \n \n \n

              Only Windows 10 WorkSpace images can be programmatically updated at this time.

              \n
              " + } + }, "com.amazonaws.workspaces#UpdateRulesOfIpGroup": { "type": "operation", "input": { @@ -4359,7 +4467,7 @@ } ], "traits": { - "smithy.api#documentation": "

              Shares or unshares an image with one account in the same AWS Region by specifying whether that account has \n permission to copy the image. If the copy image permission is granted, the image is shared with that account. \n If the copy image permission is revoked, the image is unshared with the account.

              \n \n

              After an image has been shared, the recipient account can copy the image to other AWS Regions as needed.

              \n \n \n

              In the China (Ningxia) Region, you can copy images only within the same Region.

              \n \n

              In the AWS GovCloud (US-West) Region, to copy images to and from other AWS Regions, \n contact AWS Support.

              \n
              \n \n

              For more information about sharing images, see \n \n Share or Unshare a Custom WorkSpaces Image.

              \n \n \n
                \n
              • \n

                To delete an image that has been shared, you must unshare the image before you delete it.

                \n
              • \n
              • \n

                Sharing Bring Your Own License (BYOL) images across AWS accounts isn't supported at \n this time in the AWS GovCloud (US-West) Region. To share BYOL images across accounts in \n the AWS GovCloud (US-West) Region, contact AWS Support.

                \n
              • \n
              \n
              " + "smithy.api#documentation": "

              Shares or unshares an image with one account in the same Amazon Web Services Region by specifying whether that account has \n permission to copy the image. If the copy image permission is granted, the image is shared with that account. \n If the copy image permission is revoked, the image is unshared with the account.

              \n \n

              After an image has been shared, the recipient account can copy the image to other Regions as needed.

              \n \n

              In the China (Ningxia) Region, you can copy images only within the same Region.

              \n \n

              In Amazon Web Services GovCloud (US), to copy images to and from other Regions, contact Amazon Web Services Support.

              \n \n

              For more information about sharing images, see \n \n Share or Unshare a Custom WorkSpaces Image.

              \n \n \n
                \n
              • \n

                To delete an image that has been shared, you must unshare the image before you delete it.

                \n
              • \n
              • \n

                Sharing Bring Your Own License (BYOL) images across Amazon Web Services accounts isn't supported at \n this time in Amazon Web Services GovCloud (US). To share BYOL images across accounts in \n Amazon Web Services GovCloud (US), contact Amazon Web Services Support.

                \n
              • \n
              \n
              " } }, "com.amazonaws.workspaces#UpdateWorkspaceImagePermissionRequest": { @@ -4382,7 +4490,7 @@ "SharedAccountId": { "target": "com.amazonaws.workspaces#AwsAccount", "traits": { - "smithy.api#documentation": "

              The identifier of the AWS account to share or unshare the image with.

              \n \n \n

              Before sharing the image, confirm that you are sharing to the correct AWS account ID.

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

              The identifier of the Amazon Web Services account to share or unshare the image with.

              \n \n \n

              Before sharing the image, confirm that you are sharing to the correct Amazon Web Services account ID.

              \n
              ", "smithy.api#required": {} } } @@ -4436,7 +4544,7 @@ "DirectoryId": { "target": "com.amazonaws.workspaces#DirectoryId", "traits": { - "smithy.api#documentation": "

              The identifier of the AWS Directory Service directory for the WorkSpace.

              " + "smithy.api#documentation": "

              The identifier of the Directory Service directory for the WorkSpace.

              " } }, "UserName": { @@ -4490,7 +4598,7 @@ "VolumeEncryptionKey": { "target": "com.amazonaws.workspaces#VolumeEncryptionKey", "traits": { - "smithy.api#documentation": "

              The symmetric AWS KMS customer master key (CMK) used to encrypt data stored on your WorkSpace. \n Amazon WorkSpaces does not support asymmetric CMKs.

              " + "smithy.api#documentation": "

              The symmetric KMS key used to encrypt data stored on your WorkSpace. \n Amazon WorkSpaces does not support asymmetric KMS keys.

              " } }, "UserVolumeEncryptionEnabled": { @@ -4528,13 +4636,13 @@ "DeviceTypeWindows": { "target": "com.amazonaws.workspaces#AccessPropertyValue", "traits": { - "smithy.api#documentation": "

              Indicates whether users can use Windows clients to access their WorkSpaces. To restrict\n WorkSpaces access to trusted devices (also known as managed devices) with valid\n certificates, specify a value of TRUST. For more information, see Restrict\n WorkSpaces Access to Trusted Devices.

              " + "smithy.api#documentation": "

              Indicates whether users can use Windows clients to access their WorkSpaces.

              " } }, "DeviceTypeOsx": { "target": "com.amazonaws.workspaces#AccessPropertyValue", "traits": { - "smithy.api#documentation": "

              Indicates whether users can use macOS clients to access their WorkSpaces. To restrict\n WorkSpaces access to trusted devices (also known as managed devices) with valid\n certificates, specify a value of TRUST. For more information, see Restrict\n WorkSpaces Access to Trusted Devices.

              " + "smithy.api#documentation": "

              Indicates whether users can use macOS clients to access their WorkSpaces.

              " } }, "DeviceTypeWeb": { @@ -4552,7 +4660,7 @@ "DeviceTypeAndroid": { "target": "com.amazonaws.workspaces#AccessPropertyValue", "traits": { - "smithy.api#documentation": "

              Indicates whether users can use Android devices to access their WorkSpaces.

              " + "smithy.api#documentation": "

              Indicates whether users can use Android and Android-compatible Chrome OS devices \n to access their WorkSpaces.

              " } }, "DeviceTypeChromeOs": { @@ -4596,7 +4704,7 @@ "Owner": { "target": "com.amazonaws.workspaces#BundleOwner", "traits": { - "smithy.api#documentation": "

              The owner of the bundle. This is the account identifier of the owner, or\n AMAZON if the bundle is provided by AWS.

              " + "smithy.api#documentation": "

              The owner of the bundle. This is the account identifier of the owner, or\n AMAZON if the bundle is provided by Amazon Web Services.

              " } }, "Description": { @@ -4969,13 +5077,19 @@ "Created": { "target": "com.amazonaws.workspaces#Timestamp", "traits": { - "smithy.api#documentation": "

              The date when the image was created. If the image has been shared, the AWS account \n that the image has been shared with sees the original creation date of the image.

              " + "smithy.api#documentation": "

              The date when the image was created. If the image has been shared, the Amazon Web Services account \n that the image has been shared with sees the original creation date of the image.

              " } }, "OwnerAccountId": { "target": "com.amazonaws.workspaces#AwsAccount", "traits": { - "smithy.api#documentation": "

              The identifier of the AWS account that owns the image.

              " + "smithy.api#documentation": "

              The identifier of the Amazon Web Services account that owns the image.

              " + } + }, + "Updates": { + "target": "com.amazonaws.workspaces#UpdateResult", + "traits": { + "smithy.api#documentation": "

              The updates (if any) that are available for the specified image.

              " } } }, @@ -4999,7 +5113,7 @@ "com.amazonaws.workspaces#WorkspaceImageId": { "type": "string", "traits": { - "smithy.api#pattern": "wsi-[0-9a-z]{9,63}$" + "smithy.api#pattern": "^wsi-[0-9a-z]{9,63}$" } }, "com.amazonaws.workspaces#WorkspaceImageIdList": { @@ -5137,14 +5251,14 @@ "DirectoryId": { "target": "com.amazonaws.workspaces#DirectoryId", "traits": { - "smithy.api#documentation": "

              The identifier of the AWS Directory Service directory for the WorkSpace. You can use\n DescribeWorkspaceDirectories to list the available directories.

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

              The identifier of the Directory Service directory for the WorkSpace. You can use\n DescribeWorkspaceDirectories to list the available directories.

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

              The user name of the user for the WorkSpace. This user name must exist in the AWS\n Directory Service directory for the WorkSpace.

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

              The user name of the user for the WorkSpace. This user name must exist in the Directory Service\n directory for the WorkSpace.

              ", "smithy.api#required": {} } }, @@ -5158,7 +5272,7 @@ "VolumeEncryptionKey": { "target": "com.amazonaws.workspaces#VolumeEncryptionKey", "traits": { - "smithy.api#documentation": "

              The symmetric AWS KMS customer master key (CMK) used to encrypt data stored on your WorkSpace. \n Amazon WorkSpaces does not support asymmetric CMKs.

              " + "smithy.api#documentation": "

              The symmetric KMS key used to encrypt data stored on your WorkSpace. \n Amazon WorkSpaces does not support asymmetric KMS keys.

              " } }, "UserVolumeEncryptionEnabled": { @@ -5352,6 +5466,9 @@ { "target": "com.amazonaws.workspaces#CreateTags" }, + { + "target": "com.amazonaws.workspaces#CreateUpdatedWorkspaceImage" + }, { "target": "com.amazonaws.workspaces#CreateWorkspaceBundle" }, diff --git a/codegen/smithy-aws-typescript-codegen/src/main/resources/software/amazon/smithy/aws/typescript/codegen/endpoints.json b/codegen/smithy-aws-typescript-codegen/src/main/resources/software/amazon/smithy/aws/typescript/codegen/endpoints.json index 732962996d00b..d902b59f2b178 100644 --- a/codegen/smithy-aws-typescript-codegen/src/main/resources/software/amazon/smithy/aws/typescript/codegen/endpoints.json +++ b/codegen/smithy-aws-typescript-codegen/src/main/resources/software/amazon/smithy/aws/typescript/codegen/endpoints.json @@ -136,6 +136,18 @@ "us-west-2": {} } }, + "account": { + "endpoints": { + "aws-global": { + "credentialScope": { + "region": "us-east-1" + }, + "hostname": "account.us-east-1.amazonaws.com" + } + }, + "isRegionalized": false, + "partitionEndpoint": "aws-global" + }, "acm": { "endpoints": { "af-south-1": {}, @@ -843,7 +855,11 @@ "protocols": ["https"] }, "endpoints": { + "ap-northeast-1": {}, + "ap-southeast-1": {}, + "ap-southeast-2": {}, "eu-central-1": {}, + "eu-north-1": {}, "eu-west-1": {}, "us-east-1": {}, "us-east-2": {}, @@ -899,6 +915,22 @@ "us-west-2": {} } }, + "auditmanager": { + "endpoints": { + "ap-northeast-1": {}, + "ap-south-1": {}, + "ap-southeast-1": {}, + "ap-southeast-2": {}, + "ca-central-1": {}, + "eu-central-1": {}, + "eu-west-1": {}, + "eu-west-2": {}, + "us-east-1": {}, + "us-east-2": {}, + "us-west-1": {}, + "us-west-2": {} + } + }, "autoscaling": { "defaults": { "protocols": ["http", "https"] @@ -1101,6 +1133,61 @@ "us-west-2": {} } }, + "cloudcontrolapi": { + "endpoints": { + "af-south-1": {}, + "ap-east-1": {}, + "ap-northeast-1": {}, + "ap-northeast-2": {}, + "ap-northeast-3": {}, + "ap-south-1": {}, + "ap-southeast-1": {}, + "ap-southeast-2": {}, + "ca-central-1": {}, + "eu-central-1": {}, + "eu-north-1": {}, + "eu-south-1": {}, + "eu-west-1": {}, + "eu-west-2": {}, + "eu-west-3": {}, + "fips-ca-central-1": { + "credentialScope": { + "region": "ca-central-1" + }, + "hostname": "cloudcontrolapi-fips.ca-central-1.amazonaws.com" + }, + "fips-us-east-1": { + "credentialScope": { + "region": "us-east-1" + }, + "hostname": "cloudcontrolapi-fips.us-east-1.amazonaws.com" + }, + "fips-us-east-2": { + "credentialScope": { + "region": "us-east-2" + }, + "hostname": "cloudcontrolapi-fips.us-east-2.amazonaws.com" + }, + "fips-us-west-1": { + "credentialScope": { + "region": "us-west-1" + }, + "hostname": "cloudcontrolapi-fips.us-west-1.amazonaws.com" + }, + "fips-us-west-2": { + "credentialScope": { + "region": "us-west-2" + }, + "hostname": "cloudcontrolapi-fips.us-west-2.amazonaws.com" + }, + "me-south-1": {}, + "sa-east-1": {}, + "us-east-1": {}, + "us-east-2": {}, + "us-west-1": {}, + "us-west-2": {} + } + }, "clouddirectory": { "endpoints": { "ap-southeast-1": {}, @@ -1201,6 +1288,7 @@ "ap-east-1": {}, "ap-northeast-1": {}, "ap-northeast-2": {}, + "ap-northeast-3": {}, "ap-south-1": {}, "ap-southeast-1": {}, "ap-southeast-2": {}, @@ -1349,6 +1437,7 @@ }, "codecommit": { "endpoints": { + "af-south-1": {}, "ap-east-1": {}, "ap-northeast-1": {}, "ap-northeast-2": {}, @@ -3992,6 +4081,26 @@ "us-west-2": {} } }, + "kafkaconnect": { + "endpoints": { + "ap-northeast-1": {}, + "ap-northeast-2": {}, + "ap-south-1": {}, + "ap-southeast-1": {}, + "ap-southeast-2": {}, + "ca-central-1": {}, + "eu-central-1": {}, + "eu-north-1": {}, + "eu-west-1": {}, + "eu-west-2": {}, + "eu-west-3": {}, + "sa-east-1": {}, + "us-east-1": {}, + "us-east-2": {}, + "us-west-1": {}, + "us-west-2": {} + } + }, "kinesis": { "endpoints": { "af-south-1": {}, @@ -4114,6 +4223,7 @@ "ap-east-1": {}, "ap-northeast-1": {}, "ap-northeast-2": {}, + "ap-northeast-3": {}, "ap-south-1": {}, "ap-southeast-1": {}, "ap-southeast-2": {}, @@ -4643,7 +4753,9 @@ }, "models-v2-lex": { "endpoints": { + "af-south-1": {}, "ap-northeast-1": {}, + "ap-northeast-2": {}, "ap-southeast-1": {}, "ap-southeast-2": {}, "ca-central-1": {}, @@ -5369,6 +5481,24 @@ "us-west-2": {} } }, + "quicksight": { + "endpoints": { + "ap-northeast-1": {}, + "ap-northeast-2": {}, + "ap-south-1": {}, + "ap-southeast-1": {}, + "ap-southeast-2": {}, + "api": {}, + "ca-central-1": {}, + "eu-central-1": {}, + "eu-west-1": {}, + "eu-west-2": {}, + "sa-east-1": {}, + "us-east-1": {}, + "us-east-2": {}, + "us-west-2": {} + } + }, "ram": { "endpoints": { "af-south-1": {}, @@ -5706,7 +5836,9 @@ }, "runtime-v2-lex": { "endpoints": { + "af-south-1": {}, "ap-northeast-1": {}, + "ap-northeast-2": {}, "ap-southeast-1": {}, "ap-southeast-2": {}, "ca-central-1": {}, @@ -7365,6 +7497,17 @@ } } }, + "voiceid": { + "endpoints": { + "ap-northeast-1": {}, + "ap-southeast-1": {}, + "ap-southeast-2": {}, + "eu-central-1": {}, + "eu-west-2": {}, + "us-east-1": {}, + "us-west-2": {} + } + }, "waf": { "endpoints": { "aws-fips": { @@ -7775,6 +7918,18 @@ "cn-northwest-1": {} } }, + "account": { + "endpoints": { + "aws-cn-global": { + "credentialScope": { + "region": "cn-northwest-1" + }, + "hostname": "account.cn-northwest-1.amazonaws.com.cn" + } + }, + "isRegionalized": false, + "partitionEndpoint": "aws-cn-global" + }, "acm": { "endpoints": { "cn-north-1": {}, @@ -7818,6 +7973,12 @@ "cn-northwest-1": {} } }, + "appmesh": { + "endpoints": { + "cn-north-1": {}, + "cn-northwest-1": {} + } + }, "appsync": { "endpoints": { "cn-north-1": {}, @@ -8880,6 +9041,24 @@ "us-gov-west-1": {} } }, + "cloudcontrolapi": { + "endpoints": { + "fips-us-gov-east-1": { + "credentialScope": { + "region": "us-gov-east-1" + }, + "hostname": "cloudcontrolapi-fips.us-gov-east-1.amazonaws.com" + }, + "fips-us-gov-west-1": { + "credentialScope": { + "region": "us-gov-west-1" + }, + "hostname": "cloudcontrolapi-fips.us-gov-west-1.amazonaws.com" + }, + "us-gov-east-1": {}, + "us-gov-west-1": {} + } + }, "clouddirectory": { "endpoints": { "us-gov-west-1": {} @@ -9562,6 +9741,17 @@ "isRegionalized": false, "partitionEndpoint": "aws-us-gov-global" }, + "identitystore": { + "endpoints": { + "fips-us-gov-west-1": { + "credentialScope": { + "region": "us-gov-west-1" + }, + "hostname": "identitystore.us-gov-west-1.amazonaws.com" + }, + "us-gov-west-1": {} + } + }, "inspector": { "endpoints": { "fips-us-gov-east-1": { @@ -9603,6 +9793,21 @@ "us-gov-west-1": {} } }, + "iotevents": { + "endpoints": { + "us-gov-west-1": {} + } + }, + "ioteventsdata": { + "endpoints": { + "us-gov-west-1": { + "credentialScope": { + "region": "us-gov-west-1" + }, + "hostname": "data.iotevents.us-gov-west-1.amazonaws.com" + } + } + }, "iotsecuredtunneling": { "endpoints": { "fips-us-gov-east-1": { @@ -9907,6 +10112,12 @@ "us-gov-west-1": {} } }, + "quicksight": { + "endpoints": { + "api": {}, + "us-gov-west-1": {} + } + }, "ram": { "endpoints": { "us-gov-east-1": {