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 + ): PromiseRetrieves 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 + ): PromiseModifies 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 + ): PromiseOperations 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: MiddlewareStackRetrieves 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: MiddlewareStackModifies 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: MiddlewareStackThe 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 +): PromiseThe 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.
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.
+ *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.
+ *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.
+ *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.
+ *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.
+ *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.
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.
+ *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.
+ *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.
+ *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.
+ *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.
+ *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 +): PromiseAWS 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 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. 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 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 Configure a higher Configure a higher Configure a lower 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. 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 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. 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
* 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 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. 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. Return a full description of an AWS App Runner service. Return a full description of an App Runner service. 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. 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. 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. 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. 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. 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. 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 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 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. 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. 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. 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 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 Configure a higher Configure a higher Configure a lower 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. 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 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. 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
* 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 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. 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. Return a full description of an AWS App Runner service. Return a full description of an App Runner service. 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. 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. 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. 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. 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. 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. 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 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 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. 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. 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. 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. A name for the auto scaling configuration. When you use it for the first time in an AWS Region, App Runner creates revision number 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 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
* A higher A higher A lower 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. 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. Describes an AWS App Runner connection resource. Describes an App Runner connection resource. 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. 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. The number of consecutive checks that must succeed before App Runner decides that the service is healthy. Default: Default: The number of consecutive checks that must fail before App Runner decides that the service is unhealthy. Default: Default: 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). 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. 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 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. 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. 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. 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. If Default: If Default: App Runner sets to 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. 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.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 {
}
/**
- * 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.MinSize
to increase the spread of your App Runner service over more Availability Zones in the AWS Region. The tradeoff is
+ * 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.MaxSize
to control your cost. The tradeoff is lower responsiveness during peak demand.OperationId
and the ListOperations call to track the operation's progress.DeleteConnection
action fails.OperationId
and the ListOperations
* call to track the operation's progress.OperationId
and the ListOperations
* call to track the operation's progress.OperationId
and the ListOperations
* call to track the operation's progress.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 {}
/**
- * 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.MinSize
to increase the spread of your App Runner service over more Availability Zones in the AWS Region. The tradeoff is
+ * 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.MaxSize
to control your cost. The tradeoff is lower responsiveness during peak demand.OperationId
and the ListOperations call to track the operation's progress.DeleteConnection
action fails.OperationId
and the ListOperations
* call to track the operation's progress.OperationId
and the ListOperations
* call to track the operation's progress.OperationId
and the ListOperations
* call to track the operation's progress.1
of this
+ * 1
of this
* name. When you use the same name in subsequent calls, App Runner creates incremental revisions of the configuration.AutoScalingConfigurationName
and different AutoScalingConfigurationRevision
values.MinSize
increases the spread of your App Runner service over more Availability Zones in the AWS Region. The tradeoff is 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.MaxSize
controls your cost. The tradeoff is lower responsiveness during peak demand.3
+ * 1
* 3
+ * 5
* apprunner.yaml
file in the source code repository.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.true
- * 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.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).
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.
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
.
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
.
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): PromiseReturns 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 + ): PromiseReturns 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.
+ *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 + ): PromiseUpdates 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 + ): PromiseUse 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.
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
.
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
.
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: MiddlewareStackReturns 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: MiddlewareStackReturns 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.
+ *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: MiddlewareStackUpdates 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: MiddlewareStackThe 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.
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
.
The unique token representing this resource operation request.
+ *Use the RequestToken
with GetResourceRequestStatus to return the current status of a resource operation
+ * request.
The resource operation type.
+ */ + Operation?: Operation | string; + + /** + *The current status of the resource operation request.
+ *+ *