diff --git a/clients/client-bcm-data-exports/.gitignore b/clients/client-bcm-data-exports/.gitignore new file mode 100644 index 000000000000..54f14c9aef25 --- /dev/null +++ b/clients/client-bcm-data-exports/.gitignore @@ -0,0 +1,9 @@ +/node_modules/ +/build/ +/coverage/ +/docs/ +/dist-* +*.tsbuildinfo +*.tgz +*.log +package-lock.json diff --git a/clients/client-bcm-data-exports/LICENSE b/clients/client-bcm-data-exports/LICENSE new file mode 100644 index 000000000000..5001cd317c44 --- /dev/null +++ b/clients/client-bcm-data-exports/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-2023 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-bcm-data-exports/README.md b/clients/client-bcm-data-exports/README.md new file mode 100644 index 000000000000..e0264d7cd76a --- /dev/null +++ b/clients/client-bcm-data-exports/README.md @@ -0,0 +1,308 @@ + + +# @aws-sdk/client-bcm-data-exports + +## Description + +AWS SDK for JavaScript BCMDataExports Client for Node.js, Browser and React Native. + +

You can use the Data Exports API to create customized exports from multiple Amazon Web Services cost management and billing datasets, such as cost and usage data and cost +optimization recommendations.

+

The Data Exports API provides the following endpoint:

+ + +## Installing + +To install the this package, simply type add or install @aws-sdk/client-bcm-data-exports +using your favorite package manager: + +- `npm install @aws-sdk/client-bcm-data-exports` +- `yarn add @aws-sdk/client-bcm-data-exports` +- `pnpm add @aws-sdk/client-bcm-data-exports` + +## Getting Started + +### Import + +The AWS SDK is modulized by clients and commands. +To send a request, you only need to import the `BCMDataExportsClient` and +the commands you need, for example `ListExportsCommand`: + +```js +// ES5 example +const { BCMDataExportsClient, ListExportsCommand } = require("@aws-sdk/client-bcm-data-exports"); +``` + +```ts +// ES6+ example +import { BCMDataExportsClient, ListExportsCommand } from "@aws-sdk/client-bcm-data-exports"; +``` + +### 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 BCMDataExportsClient({ region: "REGION" }); + +const params = { + /** input parameters */ +}; +const command = new ListExportsCommand(params); +``` + +#### Async/await + +We recommend using [await](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/await) +operator to wait for the promise returned by send operation as follows: + +```js +// async/await. +try { + const data = await client.send(command); + // process data. +} catch (error) { + // error handling. +} finally { + // finally. +} +``` + +Async-await is clean, concise, intuitive, easy to debug and has better error handling +as compared to using Promise chains or callbacks. + +#### Promises + +You can also use [Promise chaining](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises#chaining) +to execute send operation. + +```js +client.send(command).then( + (data) => { + // process data. + }, + (error) => { + // error handling. + } +); +``` + +Promises can also be called using `.catch()` and `.finally()` as follows: + +```js +client + .send(command) + .then((data) => { + // process data. + }) + .catch((error) => { + // error handling. + }) + .finally(() => { + // finally. + }); +``` + +#### Callbacks + +We do not recommend using callbacks because of [callback hell](http://callbackhell.com/), +but they are supported by the send operation. + +```js +// callbacks. +client.send(command, (err, data) => { + // process err and data. +}); +``` + +#### v2 compatible style + +The client can also send requests using v2 compatible style. +However, it results in a bigger bundle size and may be dropped in next major version. More details in the blog post +on [modular packages in AWS SDK for JavaScript](https://aws.amazon.com/blogs/developer/modular-packages-in-aws-sdk-for-javascript/) + +```ts +import * as AWS from "@aws-sdk/client-bcm-data-exports"; +const client = new AWS.BCMDataExports({ region: "REGION" }); + +// async/await. +try { + const data = await client.listExports(params); + // process data. +} catch (error) { + // error handling. +} + +// Promises. +client + .listExports(params) + .then((data) => { + // process data. + }) + .catch((error) => { + // error handling. + }); + +// callbacks. +client.listExports(params, (err, data) => { + // process err and data. +}); +``` + +### Troubleshooting + +When the service returns an exception, the error will include the exception information, +as well as response metadata (e.g. request id). + +```js +try { + const data = await client.send(command); + // process data. +} catch (error) { + const { requestId, cfId, extendedRequestId } = error.$metadata; + console.log({ requestId, cfId, extendedRequestId }); + /** + * The keys within exceptions are also parsed. + * You can access them by specifying exception names: + * if (error.name === 'SomeServiceException') { + * const value = error.specialKeyInException; + * } + */ +} +``` + +## Getting Help + +Please use these community resources for getting help. +We use the GitHub issues for tracking bugs and feature requests, but have limited bandwidth to address them. + +- Visit [Developer Guide](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/welcome.html) + or [API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/index.html). +- Check out the blog posts tagged with [`aws-sdk-js`](https://aws.amazon.com/blogs/developer/tag/aws-sdk-js/) + on AWS Developer Blog. +- Ask a question on [StackOverflow](https://stackoverflow.com/questions/tagged/aws-sdk-js) and tag it with `aws-sdk-js`. +- Join the AWS JavaScript community on [gitter](https://gitter.im/aws/aws-sdk-js-v3). +- If it turns out that you may have found a bug, please [open an issue](https://github.com/aws/aws-sdk-js-v3/issues/new/choose). + +To test your universal JavaScript code in Node.js, browser and react-native environments, +visit our [code samples repo](https://github.com/aws-samples/aws-sdk-js-tests). + +## Contributing + +This client code is generated automatically. Any modifications will be overwritten the next time the `@aws-sdk/client-bcm-data-exports` package is updated. +To contribute to client you can check our [generate clients scripts](https://github.com/aws/aws-sdk-js-v3/tree/main/scripts/generate-clients). + +## License + +This SDK is distributed under the +[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0), +see LICENSE for more information. + +## Client Commands (Operations List) + +
+ +CreateExport + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/bcm-data-exports/command/CreateExportCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bcm-data-exports/Interface/CreateExportCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bcm-data-exports/Interface/CreateExportCommandOutput/) + +
+
+ +DeleteExport + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/bcm-data-exports/command/DeleteExportCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bcm-data-exports/Interface/DeleteExportCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bcm-data-exports/Interface/DeleteExportCommandOutput/) + +
+
+ +GetExecution + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/bcm-data-exports/command/GetExecutionCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bcm-data-exports/Interface/GetExecutionCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bcm-data-exports/Interface/GetExecutionCommandOutput/) + +
+
+ +GetExport + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/bcm-data-exports/command/GetExportCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bcm-data-exports/Interface/GetExportCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bcm-data-exports/Interface/GetExportCommandOutput/) + +
+
+ +GetTable + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/bcm-data-exports/command/GetTableCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bcm-data-exports/Interface/GetTableCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bcm-data-exports/Interface/GetTableCommandOutput/) + +
+
+ +ListExecutions + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/bcm-data-exports/command/ListExecutionsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bcm-data-exports/Interface/ListExecutionsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bcm-data-exports/Interface/ListExecutionsCommandOutput/) + +
+
+ +ListExports + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/bcm-data-exports/command/ListExportsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bcm-data-exports/Interface/ListExportsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bcm-data-exports/Interface/ListExportsCommandOutput/) + +
+
+ +ListTables + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/bcm-data-exports/command/ListTablesCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bcm-data-exports/Interface/ListTablesCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bcm-data-exports/Interface/ListTablesCommandOutput/) + +
+
+ +ListTagsForResource + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/bcm-data-exports/command/ListTagsForResourceCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bcm-data-exports/Interface/ListTagsForResourceCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bcm-data-exports/Interface/ListTagsForResourceCommandOutput/) + +
+
+ +TagResource + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/bcm-data-exports/command/TagResourceCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bcm-data-exports/Interface/TagResourceCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bcm-data-exports/Interface/TagResourceCommandOutput/) + +
+
+ +UntagResource + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/bcm-data-exports/command/UntagResourceCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bcm-data-exports/Interface/UntagResourceCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bcm-data-exports/Interface/UntagResourceCommandOutput/) + +
+
+ +UpdateExport + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/bcm-data-exports/command/UpdateExportCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bcm-data-exports/Interface/UpdateExportCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bcm-data-exports/Interface/UpdateExportCommandOutput/) + +
diff --git a/clients/client-bcm-data-exports/api-extractor.json b/clients/client-bcm-data-exports/api-extractor.json new file mode 100644 index 000000000000..d5bf5ffeee85 --- /dev/null +++ b/clients/client-bcm-data-exports/api-extractor.json @@ -0,0 +1,4 @@ +{ + "extends": "../../api-extractor.json", + "mainEntryPointFilePath": "/dist-types/index.d.ts" +} diff --git a/clients/client-bcm-data-exports/package.json b/clients/client-bcm-data-exports/package.json new file mode 100644 index 000000000000..736d03f7849a --- /dev/null +++ b/clients/client-bcm-data-exports/package.json @@ -0,0 +1,102 @@ +{ + "name": "@aws-sdk/client-bcm-data-exports", + "description": "AWS SDK for JavaScript Bcm Data Exports Client for Node.js, Browser and React Native", + "version": "3.0.0", + "scripts": { + "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:docs": "typedoc", + "build:es": "tsc -p tsconfig.es.json", + "build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build", + "build:types": "tsc -p tsconfig.types.json", + "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", + "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo", + "extract:docs": "api-extractor run --local", + "generate:client": "node ../../scripts/generate-clients/single-service --solo bcm-data-exports" + }, + "main": "./dist-cjs/index.js", + "types": "./dist-types/index.d.ts", + "module": "./dist-es/index.js", + "sideEffects": false, + "dependencies": { + "@aws-crypto/sha256-browser": "3.0.0", + "@aws-crypto/sha256-js": "3.0.0", + "@aws-sdk/client-sts": "*", + "@aws-sdk/core": "*", + "@aws-sdk/credential-provider-node": "*", + "@aws-sdk/middleware-host-header": "*", + "@aws-sdk/middleware-logger": "*", + "@aws-sdk/middleware-recursion-detection": "*", + "@aws-sdk/middleware-signing": "*", + "@aws-sdk/middleware-user-agent": "*", + "@aws-sdk/region-config-resolver": "*", + "@aws-sdk/types": "*", + "@aws-sdk/util-endpoints": "*", + "@aws-sdk/util-user-agent-browser": "*", + "@aws-sdk/util-user-agent-node": "*", + "@smithy/config-resolver": "^2.0.18", + "@smithy/fetch-http-handler": "^2.2.6", + "@smithy/hash-node": "^2.0.15", + "@smithy/invalid-dependency": "^2.0.13", + "@smithy/middleware-content-length": "^2.0.15", + "@smithy/middleware-endpoint": "^2.2.0", + "@smithy/middleware-retry": "^2.0.20", + "@smithy/middleware-serde": "^2.0.13", + "@smithy/middleware-stack": "^2.0.7", + "@smithy/node-config-provider": "^2.1.5", + "@smithy/node-http-handler": "^2.1.9", + "@smithy/protocol-http": "^3.0.9", + "@smithy/smithy-client": "^2.1.15", + "@smithy/types": "^2.5.0", + "@smithy/url-parser": "^2.0.13", + "@smithy/util-base64": "^2.0.1", + "@smithy/util-body-length-browser": "^2.0.0", + "@smithy/util-body-length-node": "^2.1.0", + "@smithy/util-defaults-mode-browser": "^2.0.19", + "@smithy/util-defaults-mode-node": "^2.0.25", + "@smithy/util-endpoints": "^1.0.4", + "@smithy/util-retry": "^2.0.6", + "@smithy/util-utf8": "^2.0.2", + "tslib": "^2.5.0" + }, + "devDependencies": { + "@smithy/service-client-documentation-generator": "^2.0.0", + "@tsconfig/node14": "1.0.3", + "@types/node": "^14.14.31", + "concurrently": "7.0.0", + "downlevel-dts": "0.10.1", + "rimraf": "3.0.2", + "typedoc": "0.23.23", + "typescript": "~4.9.5" + }, + "engines": { + "node": ">=14.0.0" + }, + "typesVersions": { + "<4.0": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + "files": [ + "dist-*/**" + ], + "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-bcm-data-exports", + "repository": { + "type": "git", + "url": "https://github.com/aws/aws-sdk-js-v3.git", + "directory": "clients/client-bcm-data-exports" + } +} diff --git a/clients/client-bcm-data-exports/src/BCMDataExports.ts b/clients/client-bcm-data-exports/src/BCMDataExports.ts new file mode 100644 index 000000000000..56553e3e362f --- /dev/null +++ b/clients/client-bcm-data-exports/src/BCMDataExports.ts @@ -0,0 +1,217 @@ +// smithy-typescript generated code +import { createAggregatedClient } from "@smithy/smithy-client"; +import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types"; + +import { BCMDataExportsClient, BCMDataExportsClientConfig } from "./BCMDataExportsClient"; +import { + CreateExportCommand, + CreateExportCommandInput, + CreateExportCommandOutput, +} from "./commands/CreateExportCommand"; +import { + DeleteExportCommand, + DeleteExportCommandInput, + DeleteExportCommandOutput, +} from "./commands/DeleteExportCommand"; +import { + GetExecutionCommand, + GetExecutionCommandInput, + GetExecutionCommandOutput, +} from "./commands/GetExecutionCommand"; +import { GetExportCommand, GetExportCommandInput, GetExportCommandOutput } from "./commands/GetExportCommand"; +import { GetTableCommand, GetTableCommandInput, GetTableCommandOutput } from "./commands/GetTableCommand"; +import { + ListExecutionsCommand, + ListExecutionsCommandInput, + ListExecutionsCommandOutput, +} from "./commands/ListExecutionsCommand"; +import { ListExportsCommand, ListExportsCommandInput, ListExportsCommandOutput } from "./commands/ListExportsCommand"; +import { ListTablesCommand, ListTablesCommandInput, ListTablesCommandOutput } from "./commands/ListTablesCommand"; +import { + ListTagsForResourceCommand, + ListTagsForResourceCommandInput, + ListTagsForResourceCommandOutput, +} from "./commands/ListTagsForResourceCommand"; +import { TagResourceCommand, TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand"; +import { + UntagResourceCommand, + UntagResourceCommandInput, + UntagResourceCommandOutput, +} from "./commands/UntagResourceCommand"; +import { + UpdateExportCommand, + UpdateExportCommandInput, + UpdateExportCommandOutput, +} from "./commands/UpdateExportCommand"; + +const commands = { + CreateExportCommand, + DeleteExportCommand, + GetExecutionCommand, + GetExportCommand, + GetTableCommand, + ListExecutionsCommand, + ListExportsCommand, + ListTablesCommand, + ListTagsForResourceCommand, + TagResourceCommand, + UntagResourceCommand, + UpdateExportCommand, +}; + +export interface BCMDataExports { + /** + * @see {@link CreateExportCommand} + */ + createExport(args: CreateExportCommandInput, options?: __HttpHandlerOptions): Promise; + createExport(args: CreateExportCommandInput, cb: (err: any, data?: CreateExportCommandOutput) => void): void; + createExport( + args: CreateExportCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateExportCommandOutput) => void + ): void; + + /** + * @see {@link DeleteExportCommand} + */ + deleteExport(args: DeleteExportCommandInput, options?: __HttpHandlerOptions): Promise; + deleteExport(args: DeleteExportCommandInput, cb: (err: any, data?: DeleteExportCommandOutput) => void): void; + deleteExport( + args: DeleteExportCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteExportCommandOutput) => void + ): void; + + /** + * @see {@link GetExecutionCommand} + */ + getExecution(args: GetExecutionCommandInput, options?: __HttpHandlerOptions): Promise; + getExecution(args: GetExecutionCommandInput, cb: (err: any, data?: GetExecutionCommandOutput) => void): void; + getExecution( + args: GetExecutionCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetExecutionCommandOutput) => void + ): void; + + /** + * @see {@link GetExportCommand} + */ + getExport(args: GetExportCommandInput, options?: __HttpHandlerOptions): Promise; + getExport(args: GetExportCommandInput, cb: (err: any, data?: GetExportCommandOutput) => void): void; + getExport( + args: GetExportCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetExportCommandOutput) => void + ): void; + + /** + * @see {@link GetTableCommand} + */ + getTable(args: GetTableCommandInput, options?: __HttpHandlerOptions): Promise; + getTable(args: GetTableCommandInput, cb: (err: any, data?: GetTableCommandOutput) => void): void; + getTable( + args: GetTableCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetTableCommandOutput) => void + ): void; + + /** + * @see {@link ListExecutionsCommand} + */ + listExecutions( + args: ListExecutionsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + listExecutions(args: ListExecutionsCommandInput, cb: (err: any, data?: ListExecutionsCommandOutput) => void): void; + listExecutions( + args: ListExecutionsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListExecutionsCommandOutput) => void + ): void; + + /** + * @see {@link ListExportsCommand} + */ + listExports(args: ListExportsCommandInput, options?: __HttpHandlerOptions): Promise; + listExports(args: ListExportsCommandInput, cb: (err: any, data?: ListExportsCommandOutput) => void): void; + listExports( + args: ListExportsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListExportsCommandOutput) => void + ): void; + + /** + * @see {@link ListTablesCommand} + */ + listTables(args: ListTablesCommandInput, options?: __HttpHandlerOptions): Promise; + listTables(args: ListTablesCommandInput, cb: (err: any, data?: ListTablesCommandOutput) => void): void; + listTables( + args: ListTablesCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListTablesCommandOutput) => void + ): void; + + /** + * @see {@link ListTagsForResourceCommand} + */ + listTagsForResource( + args: ListTagsForResourceCommandInput, + options?: __HttpHandlerOptions + ): Promise; + listTagsForResource( + args: ListTagsForResourceCommandInput, + cb: (err: any, data?: ListTagsForResourceCommandOutput) => void + ): void; + listTagsForResource( + args: ListTagsForResourceCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListTagsForResourceCommandOutput) => void + ): void; + + /** + * @see {@link TagResourceCommand} + */ + tagResource(args: TagResourceCommandInput, options?: __HttpHandlerOptions): Promise; + tagResource(args: TagResourceCommandInput, cb: (err: any, data?: TagResourceCommandOutput) => void): void; + tagResource( + args: TagResourceCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: TagResourceCommandOutput) => void + ): void; + + /** + * @see {@link UntagResourceCommand} + */ + untagResource(args: UntagResourceCommandInput, options?: __HttpHandlerOptions): Promise; + untagResource(args: UntagResourceCommandInput, cb: (err: any, data?: UntagResourceCommandOutput) => void): void; + untagResource( + args: UntagResourceCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UntagResourceCommandOutput) => void + ): void; + + /** + * @see {@link UpdateExportCommand} + */ + updateExport(args: UpdateExportCommandInput, options?: __HttpHandlerOptions): Promise; + updateExport(args: UpdateExportCommandInput, cb: (err: any, data?: UpdateExportCommandOutput) => void): void; + updateExport( + args: UpdateExportCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateExportCommandOutput) => void + ): void; +} + +/** + * @public + *

You can use the Data Exports API to create customized exports from multiple Amazon Web Services cost management and billing datasets, such as cost and usage data and cost + * optimization recommendations.

+ *

The Data Exports API provides the following endpoint:

+ *
    + *
  • + *

    https://bcm-data-exports.us-east-1.api.aws

    + *
  • + *
+ */ +export class BCMDataExports extends BCMDataExportsClient implements BCMDataExports {} +createAggregatedClient(commands, BCMDataExports); diff --git a/clients/client-bcm-data-exports/src/BCMDataExportsClient.ts b/clients/client-bcm-data-exports/src/BCMDataExportsClient.ts new file mode 100644 index 000000000000..42b7aa16c79e --- /dev/null +++ b/clients/client-bcm-data-exports/src/BCMDataExportsClient.ts @@ -0,0 +1,334 @@ +// smithy-typescript generated code +import { + getHostHeaderPlugin, + HostHeaderInputConfig, + HostHeaderResolvedConfig, + resolveHostHeaderConfig, +} from "@aws-sdk/middleware-host-header"; +import { getLoggerPlugin } from "@aws-sdk/middleware-logger"; +import { getRecursionDetectionPlugin } from "@aws-sdk/middleware-recursion-detection"; +import { + AwsAuthInputConfig, + AwsAuthResolvedConfig, + getAwsAuthPlugin, + resolveAwsAuthConfig, +} from "@aws-sdk/middleware-signing"; +import { + getUserAgentPlugin, + resolveUserAgentConfig, + UserAgentInputConfig, + UserAgentResolvedConfig, +} from "@aws-sdk/middleware-user-agent"; +import { Credentials as __Credentials } from "@aws-sdk/types"; +import { RegionInputConfig, RegionResolvedConfig, resolveRegionConfig } from "@smithy/config-resolver"; +import { getContentLengthPlugin } from "@smithy/middleware-content-length"; +import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; +import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; +import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { + Client as __Client, + DefaultsMode as __DefaultsMode, + SmithyConfiguration as __SmithyConfiguration, + SmithyResolvedConfiguration as __SmithyResolvedConfiguration, +} from "@smithy/smithy-client"; +import { + BodyLengthCalculator as __BodyLengthCalculator, + CheckOptionalClientConfig as __CheckOptionalClientConfig, + Checksum as __Checksum, + ChecksumConstructor as __ChecksumConstructor, + Decoder as __Decoder, + Encoder as __Encoder, + EndpointV2 as __EndpointV2, + Hash as __Hash, + HashConstructor as __HashConstructor, + HttpHandlerOptions as __HttpHandlerOptions, + Logger as __Logger, + Provider as __Provider, + Provider, + StreamCollector as __StreamCollector, + UrlParser as __UrlParser, + UserAgent as __UserAgent, +} from "@smithy/types"; + +import { CreateExportCommandInput, CreateExportCommandOutput } from "./commands/CreateExportCommand"; +import { DeleteExportCommandInput, DeleteExportCommandOutput } from "./commands/DeleteExportCommand"; +import { GetExecutionCommandInput, GetExecutionCommandOutput } from "./commands/GetExecutionCommand"; +import { GetExportCommandInput, GetExportCommandOutput } from "./commands/GetExportCommand"; +import { GetTableCommandInput, GetTableCommandOutput } from "./commands/GetTableCommand"; +import { ListExecutionsCommandInput, ListExecutionsCommandOutput } from "./commands/ListExecutionsCommand"; +import { ListExportsCommandInput, ListExportsCommandOutput } from "./commands/ListExportsCommand"; +import { ListTablesCommandInput, ListTablesCommandOutput } from "./commands/ListTablesCommand"; +import { + ListTagsForResourceCommandInput, + ListTagsForResourceCommandOutput, +} from "./commands/ListTagsForResourceCommand"; +import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand"; +import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand"; +import { UpdateExportCommandInput, UpdateExportCommandOutput } from "./commands/UpdateExportCommand"; +import { + ClientInputEndpointParameters, + ClientResolvedEndpointParameters, + EndpointParameters, + resolveClientEndpointParameters, +} from "./endpoint/EndpointParameters"; +import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig"; +import { resolveRuntimeExtensions, RuntimeExtension, RuntimeExtensionsConfig } from "./runtimeExtensions"; + +export { __Client }; + +/** + * @public + */ +export type ServiceInputTypes = + | CreateExportCommandInput + | DeleteExportCommandInput + | GetExecutionCommandInput + | GetExportCommandInput + | GetTableCommandInput + | ListExecutionsCommandInput + | ListExportsCommandInput + | ListTablesCommandInput + | ListTagsForResourceCommandInput + | TagResourceCommandInput + | UntagResourceCommandInput + | UpdateExportCommandInput; + +/** + * @public + */ +export type ServiceOutputTypes = + | CreateExportCommandOutput + | DeleteExportCommandOutput + | GetExecutionCommandOutput + | GetExportCommandOutput + | GetTableCommandOutput + | ListExecutionsCommandOutput + | ListExportsCommandOutput + | ListTablesCommandOutput + | ListTagsForResourceCommandOutput + | TagResourceCommandOutput + | UntagResourceCommandOutput + | UpdateExportCommandOutput; + +/** + * @public + */ +export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { + /** + * The HTTP handler to use. Fetch in browser and Https in Nodejs. + */ + requestHandler?: __HttpHandler; + + /** + * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface + * that computes the SHA-256 HMAC or checksum of a string or binary buffer. + * @internal + */ + sha256?: __ChecksumConstructor | __HashConstructor; + + /** + * The function that will be used to convert strings into HTTP endpoints. + * @internal + */ + urlParser?: __UrlParser; + + /** + * A function that can calculate the length of a request body. + * @internal + */ + bodyLengthChecker?: __BodyLengthCalculator; + + /** + * A function that converts a stream into an array of bytes. + * @internal + */ + streamCollector?: __StreamCollector; + + /** + * The function that will be used to convert a base64-encoded string to a byte array. + * @internal + */ + base64Decoder?: __Decoder; + + /** + * The function that will be used to convert binary data to a base64-encoded string. + * @internal + */ + base64Encoder?: __Encoder; + + /** + * The function that will be used to convert a UTF8-encoded string to a byte array. + * @internal + */ + utf8Decoder?: __Decoder; + + /** + * The function that will be used to convert binary data to a UTF-8 encoded string. + * @internal + */ + utf8Encoder?: __Encoder; + + /** + * The runtime environment. + * @internal + */ + runtime?: string; + + /** + * Disable dynamically changing the endpoint of the client based on the hostPrefix + * trait of an operation. + */ + disableHostPrefix?: boolean; + + /** + * Unique service identifier. + * @internal + */ + serviceId?: string; + + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + + /** + * The AWS region to which this client will send requests + */ + region?: string | __Provider; + + /** + * Default credentials provider; Not available in browser runtime. + * @internal + */ + credentialDefaultProvider?: (input: any) => __Provider<__Credentials>; + + /** + * The provider populating default tracking information to be sent with `user-agent`, `x-amz-user-agent` header + * @internal + */ + defaultUserAgentProvider?: Provider<__UserAgent>; + + /** + * Value for how many times a request will be made at most in case of retry. + */ + maxAttempts?: number | __Provider; + + /** + * Specifies which retry algorithm to use. + * @see https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-smithy-util-retry/Enum/RETRY_MODES/ + * + */ + retryMode?: string | __Provider; + + /** + * Optional logger for logging debug/info/warn/error. + */ + logger?: __Logger; + + /** + * Optional extensions + */ + extensions?: RuntimeExtension[]; + + /** + * The {@link @smithy/smithy-client#DefaultsMode} that will be used to determine how certain default configuration options are resolved in the SDK. + */ + defaultsMode?: __DefaultsMode | __Provider<__DefaultsMode>; +} + +/** + * @public + */ +export type BCMDataExportsClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> & + ClientDefaults & + RegionInputConfig & + EndpointInputConfig & + RetryInputConfig & + HostHeaderInputConfig & + AwsAuthInputConfig & + UserAgentInputConfig & + ClientInputEndpointParameters; +/** + * @public + * + * The configuration interface of BCMDataExportsClient class constructor that set the region, credentials and other options. + */ +export interface BCMDataExportsClientConfig extends BCMDataExportsClientConfigType {} + +/** + * @public + */ +export type BCMDataExportsClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> & + Required & + RuntimeExtensionsConfig & + RegionResolvedConfig & + EndpointResolvedConfig & + RetryResolvedConfig & + HostHeaderResolvedConfig & + AwsAuthResolvedConfig & + UserAgentResolvedConfig & + ClientResolvedEndpointParameters; +/** + * @public + * + * The resolved configuration interface of BCMDataExportsClient class. This is resolved and normalized from the {@link BCMDataExportsClientConfig | constructor configuration interface}. + */ +export interface BCMDataExportsClientResolvedConfig extends BCMDataExportsClientResolvedConfigType {} + +/** + * @public + *

You can use the Data Exports API to create customized exports from multiple Amazon Web Services cost management and billing datasets, such as cost and usage data and cost + * optimization recommendations.

+ *

The Data Exports API provides the following endpoint:

+ *
    + *
  • + *

    https://bcm-data-exports.us-east-1.api.aws

    + *
  • + *
+ */ +export class BCMDataExportsClient extends __Client< + __HttpHandlerOptions, + ServiceInputTypes, + ServiceOutputTypes, + BCMDataExportsClientResolvedConfig +> { + /** + * The resolved configuration of BCMDataExportsClient class. This is resolved and normalized from the {@link BCMDataExportsClientConfig | constructor configuration interface}. + */ + readonly config: BCMDataExportsClientResolvedConfig; + + constructor(...[configuration]: __CheckOptionalClientConfig) { + const _config_0 = __getRuntimeConfig(configuration || {}); + const _config_1 = resolveClientEndpointParameters(_config_0); + const _config_2 = resolveRegionConfig(_config_1); + const _config_3 = resolveEndpointConfig(_config_2); + const _config_4 = resolveRetryConfig(_config_3); + const _config_5 = resolveHostHeaderConfig(_config_4); + const _config_6 = resolveAwsAuthConfig(_config_5); + const _config_7 = resolveUserAgentConfig(_config_6); + const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []); + super(_config_8); + this.config = _config_8; + 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(getRecursionDetectionPlugin(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-bcm-data-exports/src/commands/CreateExportCommand.ts b/clients/client-bcm-data-exports/src/commands/CreateExportCommand.ts new file mode 100644 index 000000000000..407c8db67b7a --- /dev/null +++ b/clients/client-bcm-data-exports/src/commands/CreateExportCommand.ts @@ -0,0 +1,201 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { BCMDataExportsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../BCMDataExportsClient"; +import { CreateExportRequest, CreateExportResponse } from "../models/models_0"; +import { de_CreateExportCommand, se_CreateExportCommand } from "../protocols/Aws_json1_1"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link CreateExportCommand}. + */ +export interface CreateExportCommandInput extends CreateExportRequest {} +/** + * @public + * + * The output of {@link CreateExportCommand}. + */ +export interface CreateExportCommandOutput extends CreateExportResponse, __MetadataBearer {} + +/** + * @public + *

Creates a data export and specifies the data query, the delivery preference, and any + * optional resource tags.

+ *

A DataQuery consists of both a QueryStatement and + * TableConfigurations.

+ *

The QueryStatement is an SQL statement. Data Exports only supports a limited + * subset of the SQL syntax. For more information on the SQL syntax that is supported, see Data query. To + * view the available tables and columns, see the Data Exports table + * dictionary.

+ *

The TableConfigurations is a collection of specified + * TableProperties for the table being queried in the QueryStatement. + * TableProperties are additional configurations you can provide to change the data and schema of + * a table. Each table can have different TableProperties. However, tables are not required to + * have any TableProperties. Each table property has a default value that it assumes if not + * specified. For more information on table configurations, see Data query. To + * view the table properties available for each table, see the Data Exports table + * dictionary or use the ListTables API to get a response of all tables + * and their available properties.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { BCMDataExportsClient, CreateExportCommand } from "@aws-sdk/client-bcm-data-exports"; // ES Modules import + * // const { BCMDataExportsClient, CreateExportCommand } = require("@aws-sdk/client-bcm-data-exports"); // CommonJS import + * const client = new BCMDataExportsClient(config); + * const input = { // CreateExportRequest + * Export: { // Export + * ExportArn: "STRING_VALUE", + * Name: "STRING_VALUE", // required + * Description: "STRING_VALUE", + * DataQuery: { // DataQuery + * QueryStatement: "STRING_VALUE", // required + * TableConfigurations: { // TableConfigurations + * "": { // TableProperties + * "": "STRING_VALUE", + * }, + * }, + * }, + * DestinationConfigurations: { // DestinationConfigurations + * S3Destination: { // S3Destination + * S3Bucket: "STRING_VALUE", // required + * S3Prefix: "STRING_VALUE", // required + * S3Region: "STRING_VALUE", // required + * S3OutputConfigurations: { // S3OutputConfigurations + * OutputType: "CUSTOM", // required + * Format: "TEXT_OR_CSV" || "PARQUET", // required + * Compression: "GZIP" || "PARQUET", // required + * Overwrite: "CREATE_NEW_REPORT" || "OVERWRITE_REPORT", // required + * }, + * }, + * }, + * RefreshCadence: { // RefreshCadence + * Frequency: "SYNCHRONOUS", // required + * }, + * }, + * ResourceTags: [ // ResourceTagList + * { // ResourceTag + * Key: "STRING_VALUE", // required + * Value: "STRING_VALUE", // required + * }, + * ], + * }; + * const command = new CreateExportCommand(input); + * const response = await client.send(command); + * // { // CreateExportResponse + * // ExportArn: "STRING_VALUE", + * // }; + * + * ``` + * + * @param CreateExportCommandInput - {@link CreateExportCommandInput} + * @returns {@link CreateExportCommandOutput} + * @see {@link CreateExportCommandInput} for command's `input` shape. + * @see {@link CreateExportCommandOutput} for command's `response` shape. + * @see {@link BCMDataExportsClientResolvedConfig | config} for BCMDataExportsClient's `config` shape. + * + * @throws {@link InternalServerException} (server fault) + *

An error on the server occurred during the processing of your request. Try again + * later.

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

You've reached the limit on the number of resources you can create, or exceeded the size + * of an individual resource.

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

The request was denied due to request throttling.

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

The input fails to satisfy the constraints specified by an Amazon Web Services + * service.

+ * + * @throws {@link BCMDataExportsServiceException} + *

Base exception class for all service exceptions from BCMDataExports service.

+ * + */ +export class CreateExportCommand extends $Command< + CreateExportCommandInput, + CreateExportCommandOutput, + BCMDataExportsClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + }; + } + + /** + * @public + */ + constructor(readonly input: CreateExportCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: BCMDataExportsClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(getEndpointPlugin(configuration, CreateExportCommand.getEndpointParameterInstructions())); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "BCMDataExportsClient"; + const commandName = "CreateExportCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "AWSBillingAndCostManagementDataExports", + operation: "CreateExport", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: CreateExportCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_CreateExportCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_CreateExportCommand(output, context); + } +} diff --git a/clients/client-bcm-data-exports/src/commands/DeleteExportCommand.ts b/clients/client-bcm-data-exports/src/commands/DeleteExportCommand.ts new file mode 100644 index 000000000000..9739cacd374f --- /dev/null +++ b/clients/client-bcm-data-exports/src/commands/DeleteExportCommand.ts @@ -0,0 +1,150 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { BCMDataExportsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../BCMDataExportsClient"; +import { DeleteExportRequest, DeleteExportResponse } from "../models/models_0"; +import { de_DeleteExportCommand, se_DeleteExportCommand } from "../protocols/Aws_json1_1"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link DeleteExportCommand}. + */ +export interface DeleteExportCommandInput extends DeleteExportRequest {} +/** + * @public + * + * The output of {@link DeleteExportCommand}. + */ +export interface DeleteExportCommandOutput extends DeleteExportResponse, __MetadataBearer {} + +/** + * @public + *

Deletes an existing data export.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { BCMDataExportsClient, DeleteExportCommand } from "@aws-sdk/client-bcm-data-exports"; // ES Modules import + * // const { BCMDataExportsClient, DeleteExportCommand } = require("@aws-sdk/client-bcm-data-exports"); // CommonJS import + * const client = new BCMDataExportsClient(config); + * const input = { // DeleteExportRequest + * ExportArn: "STRING_VALUE", // required + * }; + * const command = new DeleteExportCommand(input); + * const response = await client.send(command); + * // { // DeleteExportResponse + * // ExportArn: "STRING_VALUE", + * // }; + * + * ``` + * + * @param DeleteExportCommandInput - {@link DeleteExportCommandInput} + * @returns {@link DeleteExportCommandOutput} + * @see {@link DeleteExportCommandInput} for command's `input` shape. + * @see {@link DeleteExportCommandOutput} for command's `response` shape. + * @see {@link BCMDataExportsClientResolvedConfig | config} for BCMDataExportsClient's `config` shape. + * + * @throws {@link InternalServerException} (server fault) + *

An error on the server occurred during the processing of your request. Try again + * later.

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

The specified Amazon Resource Name (ARN) in the request doesn't exist.

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

The request was denied due to request throttling.

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

The input fails to satisfy the constraints specified by an Amazon Web Services + * service.

+ * + * @throws {@link BCMDataExportsServiceException} + *

Base exception class for all service exceptions from BCMDataExports service.

+ * + */ +export class DeleteExportCommand extends $Command< + DeleteExportCommandInput, + DeleteExportCommandOutput, + BCMDataExportsClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + }; + } + + /** + * @public + */ + constructor(readonly input: DeleteExportCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: BCMDataExportsClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(getEndpointPlugin(configuration, DeleteExportCommand.getEndpointParameterInstructions())); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "BCMDataExportsClient"; + const commandName = "DeleteExportCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "AWSBillingAndCostManagementDataExports", + operation: "DeleteExport", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: DeleteExportCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_DeleteExportCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_DeleteExportCommand(output, context); + } +} diff --git a/clients/client-bcm-data-exports/src/commands/GetExecutionCommand.ts b/clients/client-bcm-data-exports/src/commands/GetExecutionCommand.ts new file mode 100644 index 000000000000..731ac517ed0d --- /dev/null +++ b/clients/client-bcm-data-exports/src/commands/GetExecutionCommand.ts @@ -0,0 +1,187 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { BCMDataExportsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../BCMDataExportsClient"; +import { GetExecutionRequest, GetExecutionResponse } from "../models/models_0"; +import { de_GetExecutionCommand, se_GetExecutionCommand } from "../protocols/Aws_json1_1"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link GetExecutionCommand}. + */ +export interface GetExecutionCommandInput extends GetExecutionRequest {} +/** + * @public + * + * The output of {@link GetExecutionCommand}. + */ +export interface GetExecutionCommandOutput extends GetExecutionResponse, __MetadataBearer {} + +/** + * @public + *

Exports data based on the source data update.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { BCMDataExportsClient, GetExecutionCommand } from "@aws-sdk/client-bcm-data-exports"; // ES Modules import + * // const { BCMDataExportsClient, GetExecutionCommand } = require("@aws-sdk/client-bcm-data-exports"); // CommonJS import + * const client = new BCMDataExportsClient(config); + * const input = { // GetExecutionRequest + * ExportArn: "STRING_VALUE", // required + * ExecutionId: "STRING_VALUE", // required + * }; + * const command = new GetExecutionCommand(input); + * const response = await client.send(command); + * // { // GetExecutionResponse + * // ExecutionId: "STRING_VALUE", + * // Export: { // Export + * // ExportArn: "STRING_VALUE", + * // Name: "STRING_VALUE", // required + * // Description: "STRING_VALUE", + * // DataQuery: { // DataQuery + * // QueryStatement: "STRING_VALUE", // required + * // TableConfigurations: { // TableConfigurations + * // "": { // TableProperties + * // "": "STRING_VALUE", + * // }, + * // }, + * // }, + * // DestinationConfigurations: { // DestinationConfigurations + * // S3Destination: { // S3Destination + * // S3Bucket: "STRING_VALUE", // required + * // S3Prefix: "STRING_VALUE", // required + * // S3Region: "STRING_VALUE", // required + * // S3OutputConfigurations: { // S3OutputConfigurations + * // OutputType: "CUSTOM", // required + * // Format: "TEXT_OR_CSV" || "PARQUET", // required + * // Compression: "GZIP" || "PARQUET", // required + * // Overwrite: "CREATE_NEW_REPORT" || "OVERWRITE_REPORT", // required + * // }, + * // }, + * // }, + * // RefreshCadence: { // RefreshCadence + * // Frequency: "SYNCHRONOUS", // required + * // }, + * // }, + * // ExecutionStatus: { // ExecutionStatus + * // StatusCode: "INITIATION_IN_PROCESS" || "QUERY_QUEUED" || "QUERY_IN_PROCESS" || "QUERY_FAILURE" || "DELIVERY_IN_PROCESS" || "DELIVERY_SUCCESS" || "DELIVERY_FAILURE", + * // StatusReason: "INSUFFICIENT_PERMISSION" || "BILL_OWNER_CHANGED" || "INTERNAL_FAILURE", + * // CreatedAt: new Date("TIMESTAMP"), + * // CompletedAt: new Date("TIMESTAMP"), + * // LastUpdatedAt: new Date("TIMESTAMP"), + * // }, + * // }; + * + * ``` + * + * @param GetExecutionCommandInput - {@link GetExecutionCommandInput} + * @returns {@link GetExecutionCommandOutput} + * @see {@link GetExecutionCommandInput} for command's `input` shape. + * @see {@link GetExecutionCommandOutput} for command's `response` shape. + * @see {@link BCMDataExportsClientResolvedConfig | config} for BCMDataExportsClient's `config` shape. + * + * @throws {@link InternalServerException} (server fault) + *

An error on the server occurred during the processing of your request. Try again + * later.

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

The specified Amazon Resource Name (ARN) in the request doesn't exist.

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

The request was denied due to request throttling.

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

The input fails to satisfy the constraints specified by an Amazon Web Services + * service.

+ * + * @throws {@link BCMDataExportsServiceException} + *

Base exception class for all service exceptions from BCMDataExports service.

+ * + */ +export class GetExecutionCommand extends $Command< + GetExecutionCommandInput, + GetExecutionCommandOutput, + BCMDataExportsClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + }; + } + + /** + * @public + */ + constructor(readonly input: GetExecutionCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: BCMDataExportsClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(getEndpointPlugin(configuration, GetExecutionCommand.getEndpointParameterInstructions())); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "BCMDataExportsClient"; + const commandName = "GetExecutionCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "AWSBillingAndCostManagementDataExports", + operation: "GetExecution", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: GetExecutionCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_GetExecutionCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_GetExecutionCommand(output, context); + } +} diff --git a/clients/client-bcm-data-exports/src/commands/GetExportCommand.ts b/clients/client-bcm-data-exports/src/commands/GetExportCommand.ts new file mode 100644 index 000000000000..e1c3804bf9bd --- /dev/null +++ b/clients/client-bcm-data-exports/src/commands/GetExportCommand.ts @@ -0,0 +1,185 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { BCMDataExportsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../BCMDataExportsClient"; +import { GetExportRequest, GetExportResponse } from "../models/models_0"; +import { de_GetExportCommand, se_GetExportCommand } from "../protocols/Aws_json1_1"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link GetExportCommand}. + */ +export interface GetExportCommandInput extends GetExportRequest {} +/** + * @public + * + * The output of {@link GetExportCommand}. + */ +export interface GetExportCommandOutput extends GetExportResponse, __MetadataBearer {} + +/** + * @public + *

Views the definition of an existing data export.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { BCMDataExportsClient, GetExportCommand } from "@aws-sdk/client-bcm-data-exports"; // ES Modules import + * // const { BCMDataExportsClient, GetExportCommand } = require("@aws-sdk/client-bcm-data-exports"); // CommonJS import + * const client = new BCMDataExportsClient(config); + * const input = { // GetExportRequest + * ExportArn: "STRING_VALUE", // required + * }; + * const command = new GetExportCommand(input); + * const response = await client.send(command); + * // { // GetExportResponse + * // Export: { // Export + * // ExportArn: "STRING_VALUE", + * // Name: "STRING_VALUE", // required + * // Description: "STRING_VALUE", + * // DataQuery: { // DataQuery + * // QueryStatement: "STRING_VALUE", // required + * // TableConfigurations: { // TableConfigurations + * // "": { // TableProperties + * // "": "STRING_VALUE", + * // }, + * // }, + * // }, + * // DestinationConfigurations: { // DestinationConfigurations + * // S3Destination: { // S3Destination + * // S3Bucket: "STRING_VALUE", // required + * // S3Prefix: "STRING_VALUE", // required + * // S3Region: "STRING_VALUE", // required + * // S3OutputConfigurations: { // S3OutputConfigurations + * // OutputType: "CUSTOM", // required + * // Format: "TEXT_OR_CSV" || "PARQUET", // required + * // Compression: "GZIP" || "PARQUET", // required + * // Overwrite: "CREATE_NEW_REPORT" || "OVERWRITE_REPORT", // required + * // }, + * // }, + * // }, + * // RefreshCadence: { // RefreshCadence + * // Frequency: "SYNCHRONOUS", // required + * // }, + * // }, + * // ExportStatus: { // ExportStatus + * // StatusCode: "HEALTHY" || "UNHEALTHY", + * // StatusReason: "INSUFFICIENT_PERMISSION" || "BILL_OWNER_CHANGED" || "INTERNAL_FAILURE", + * // CreatedAt: new Date("TIMESTAMP"), + * // LastUpdatedAt: new Date("TIMESTAMP"), + * // LastRefreshedAt: new Date("TIMESTAMP"), + * // }, + * // }; + * + * ``` + * + * @param GetExportCommandInput - {@link GetExportCommandInput} + * @returns {@link GetExportCommandOutput} + * @see {@link GetExportCommandInput} for command's `input` shape. + * @see {@link GetExportCommandOutput} for command's `response` shape. + * @see {@link BCMDataExportsClientResolvedConfig | config} for BCMDataExportsClient's `config` shape. + * + * @throws {@link InternalServerException} (server fault) + *

An error on the server occurred during the processing of your request. Try again + * later.

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

The specified Amazon Resource Name (ARN) in the request doesn't exist.

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

The request was denied due to request throttling.

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

The input fails to satisfy the constraints specified by an Amazon Web Services + * service.

+ * + * @throws {@link BCMDataExportsServiceException} + *

Base exception class for all service exceptions from BCMDataExports service.

+ * + */ +export class GetExportCommand extends $Command< + GetExportCommandInput, + GetExportCommandOutput, + BCMDataExportsClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + }; + } + + /** + * @public + */ + constructor(readonly input: GetExportCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: BCMDataExportsClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(getEndpointPlugin(configuration, GetExportCommand.getEndpointParameterInstructions())); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "BCMDataExportsClient"; + const commandName = "GetExportCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "AWSBillingAndCostManagementDataExports", + operation: "GetExport", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: GetExportCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_GetExportCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_GetExportCommand(output, context); + } +} diff --git a/clients/client-bcm-data-exports/src/commands/GetTableCommand.ts b/clients/client-bcm-data-exports/src/commands/GetTableCommand.ts new file mode 100644 index 000000000000..855265684835 --- /dev/null +++ b/clients/client-bcm-data-exports/src/commands/GetTableCommand.ts @@ -0,0 +1,162 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { BCMDataExportsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../BCMDataExportsClient"; +import { GetTableRequest, GetTableResponse } from "../models/models_0"; +import { de_GetTableCommand, se_GetTableCommand } from "../protocols/Aws_json1_1"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link GetTableCommand}. + */ +export interface GetTableCommandInput extends GetTableRequest {} +/** + * @public + * + * The output of {@link GetTableCommand}. + */ +export interface GetTableCommandOutput extends GetTableResponse, __MetadataBearer {} + +/** + * @public + *

Returns the metadata for the specified table and table properties. This includes the list + * of columns in the table schema, their data types, and column descriptions.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { BCMDataExportsClient, GetTableCommand } from "@aws-sdk/client-bcm-data-exports"; // ES Modules import + * // const { BCMDataExportsClient, GetTableCommand } = require("@aws-sdk/client-bcm-data-exports"); // CommonJS import + * const client = new BCMDataExportsClient(config); + * const input = { // GetTableRequest + * TableName: "STRING_VALUE", // required + * TableProperties: { // TableProperties + * "": "STRING_VALUE", + * }, + * }; + * const command = new GetTableCommand(input); + * const response = await client.send(command); + * // { // GetTableResponse + * // TableName: "STRING_VALUE", + * // Description: "STRING_VALUE", + * // TableProperties: { // TableProperties + * // "": "STRING_VALUE", + * // }, + * // Schema: [ // ColumnList + * // { // Column + * // Name: "STRING_VALUE", + * // Type: "STRING_VALUE", + * // Description: "STRING_VALUE", + * // }, + * // ], + * // }; + * + * ``` + * + * @param GetTableCommandInput - {@link GetTableCommandInput} + * @returns {@link GetTableCommandOutput} + * @see {@link GetTableCommandInput} for command's `input` shape. + * @see {@link GetTableCommandOutput} for command's `response` shape. + * @see {@link BCMDataExportsClientResolvedConfig | config} for BCMDataExportsClient's `config` shape. + * + * @throws {@link InternalServerException} (server fault) + *

An error on the server occurred during the processing of your request. Try again + * later.

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

The request was denied due to request throttling.

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

The input fails to satisfy the constraints specified by an Amazon Web Services + * service.

+ * + * @throws {@link BCMDataExportsServiceException} + *

Base exception class for all service exceptions from BCMDataExports service.

+ * + */ +export class GetTableCommand extends $Command< + GetTableCommandInput, + GetTableCommandOutput, + BCMDataExportsClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + }; + } + + /** + * @public + */ + constructor(readonly input: GetTableCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: BCMDataExportsClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(getEndpointPlugin(configuration, GetTableCommand.getEndpointParameterInstructions())); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "BCMDataExportsClient"; + const commandName = "GetTableCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "AWSBillingAndCostManagementDataExports", + operation: "GetTable", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: GetTableCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_GetTableCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_GetTableCommand(output, context); + } +} diff --git a/clients/client-bcm-data-exports/src/commands/ListExecutionsCommand.ts b/clients/client-bcm-data-exports/src/commands/ListExecutionsCommand.ts new file mode 100644 index 000000000000..c6afe7c1260b --- /dev/null +++ b/clients/client-bcm-data-exports/src/commands/ListExecutionsCommand.ts @@ -0,0 +1,166 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { BCMDataExportsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../BCMDataExportsClient"; +import { ListExecutionsRequest, ListExecutionsResponse } from "../models/models_0"; +import { de_ListExecutionsCommand, se_ListExecutionsCommand } from "../protocols/Aws_json1_1"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link ListExecutionsCommand}. + */ +export interface ListExecutionsCommandInput extends ListExecutionsRequest {} +/** + * @public + * + * The output of {@link ListExecutionsCommand}. + */ +export interface ListExecutionsCommandOutput extends ListExecutionsResponse, __MetadataBearer {} + +/** + * @public + *

Lists the historical executions for the export.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { BCMDataExportsClient, ListExecutionsCommand } from "@aws-sdk/client-bcm-data-exports"; // ES Modules import + * // const { BCMDataExportsClient, ListExecutionsCommand } = require("@aws-sdk/client-bcm-data-exports"); // CommonJS import + * const client = new BCMDataExportsClient(config); + * const input = { // ListExecutionsRequest + * ExportArn: "STRING_VALUE", // required + * MaxResults: Number("int"), + * NextToken: "STRING_VALUE", + * }; + * const command = new ListExecutionsCommand(input); + * const response = await client.send(command); + * // { // ListExecutionsResponse + * // Executions: [ // ExecutionReferenceList + * // { // ExecutionReference + * // ExecutionId: "STRING_VALUE", // required + * // ExecutionStatus: { // ExecutionStatus + * // StatusCode: "INITIATION_IN_PROCESS" || "QUERY_QUEUED" || "QUERY_IN_PROCESS" || "QUERY_FAILURE" || "DELIVERY_IN_PROCESS" || "DELIVERY_SUCCESS" || "DELIVERY_FAILURE", + * // StatusReason: "INSUFFICIENT_PERMISSION" || "BILL_OWNER_CHANGED" || "INTERNAL_FAILURE", + * // CreatedAt: new Date("TIMESTAMP"), + * // CompletedAt: new Date("TIMESTAMP"), + * // LastUpdatedAt: new Date("TIMESTAMP"), + * // }, + * // }, + * // ], + * // NextToken: "STRING_VALUE", + * // }; + * + * ``` + * + * @param ListExecutionsCommandInput - {@link ListExecutionsCommandInput} + * @returns {@link ListExecutionsCommandOutput} + * @see {@link ListExecutionsCommandInput} for command's `input` shape. + * @see {@link ListExecutionsCommandOutput} for command's `response` shape. + * @see {@link BCMDataExportsClientResolvedConfig | config} for BCMDataExportsClient's `config` shape. + * + * @throws {@link InternalServerException} (server fault) + *

An error on the server occurred during the processing of your request. Try again + * later.

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

The specified Amazon Resource Name (ARN) in the request doesn't exist.

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

The request was denied due to request throttling.

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

The input fails to satisfy the constraints specified by an Amazon Web Services + * service.

+ * + * @throws {@link BCMDataExportsServiceException} + *

Base exception class for all service exceptions from BCMDataExports service.

+ * + */ +export class ListExecutionsCommand extends $Command< + ListExecutionsCommandInput, + ListExecutionsCommandOutput, + BCMDataExportsClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + }; + } + + /** + * @public + */ + constructor(readonly input: ListExecutionsCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: BCMDataExportsClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, ListExecutionsCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "BCMDataExportsClient"; + const commandName = "ListExecutionsCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "AWSBillingAndCostManagementDataExports", + operation: "ListExecutions", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: ListExecutionsCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_ListExecutionsCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_ListExecutionsCommand(output, context); + } +} diff --git a/clients/client-bcm-data-exports/src/commands/ListExportsCommand.ts b/clients/client-bcm-data-exports/src/commands/ListExportsCommand.ts new file mode 100644 index 000000000000..7a6162b418f9 --- /dev/null +++ b/clients/client-bcm-data-exports/src/commands/ListExportsCommand.ts @@ -0,0 +1,161 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { BCMDataExportsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../BCMDataExportsClient"; +import { ListExportsRequest, ListExportsResponse } from "../models/models_0"; +import { de_ListExportsCommand, se_ListExportsCommand } from "../protocols/Aws_json1_1"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link ListExportsCommand}. + */ +export interface ListExportsCommandInput extends ListExportsRequest {} +/** + * @public + * + * The output of {@link ListExportsCommand}. + */ +export interface ListExportsCommandOutput extends ListExportsResponse, __MetadataBearer {} + +/** + * @public + *

Lists all data export definitions.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { BCMDataExportsClient, ListExportsCommand } from "@aws-sdk/client-bcm-data-exports"; // ES Modules import + * // const { BCMDataExportsClient, ListExportsCommand } = require("@aws-sdk/client-bcm-data-exports"); // CommonJS import + * const client = new BCMDataExportsClient(config); + * const input = { // ListExportsRequest + * MaxResults: Number("int"), + * NextToken: "STRING_VALUE", + * }; + * const command = new ListExportsCommand(input); + * const response = await client.send(command); + * // { // ListExportsResponse + * // Exports: [ // ExportReferenceList + * // { // ExportReference + * // ExportArn: "STRING_VALUE", // required + * // ExportName: "STRING_VALUE", // required + * // ExportStatus: { // ExportStatus + * // StatusCode: "HEALTHY" || "UNHEALTHY", + * // StatusReason: "INSUFFICIENT_PERMISSION" || "BILL_OWNER_CHANGED" || "INTERNAL_FAILURE", + * // CreatedAt: new Date("TIMESTAMP"), + * // LastUpdatedAt: new Date("TIMESTAMP"), + * // LastRefreshedAt: new Date("TIMESTAMP"), + * // }, + * // }, + * // ], + * // NextToken: "STRING_VALUE", + * // }; + * + * ``` + * + * @param ListExportsCommandInput - {@link ListExportsCommandInput} + * @returns {@link ListExportsCommandOutput} + * @see {@link ListExportsCommandInput} for command's `input` shape. + * @see {@link ListExportsCommandOutput} for command's `response` shape. + * @see {@link BCMDataExportsClientResolvedConfig | config} for BCMDataExportsClient's `config` shape. + * + * @throws {@link InternalServerException} (server fault) + *

An error on the server occurred during the processing of your request. Try again + * later.

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

The request was denied due to request throttling.

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

The input fails to satisfy the constraints specified by an Amazon Web Services + * service.

+ * + * @throws {@link BCMDataExportsServiceException} + *

Base exception class for all service exceptions from BCMDataExports service.

+ * + */ +export class ListExportsCommand extends $Command< + ListExportsCommandInput, + ListExportsCommandOutput, + BCMDataExportsClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + }; + } + + /** + * @public + */ + constructor(readonly input: ListExportsCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: BCMDataExportsClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(getEndpointPlugin(configuration, ListExportsCommand.getEndpointParameterInstructions())); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "BCMDataExportsClient"; + const commandName = "ListExportsCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "AWSBillingAndCostManagementDataExports", + operation: "ListExports", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: ListExportsCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_ListExportsCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_ListExportsCommand(output, context); + } +} diff --git a/clients/client-bcm-data-exports/src/commands/ListTablesCommand.ts b/clients/client-bcm-data-exports/src/commands/ListTablesCommand.ts new file mode 100644 index 000000000000..ce48e7f2822e --- /dev/null +++ b/clients/client-bcm-data-exports/src/commands/ListTablesCommand.ts @@ -0,0 +1,164 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { BCMDataExportsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../BCMDataExportsClient"; +import { ListTablesRequest, ListTablesResponse } from "../models/models_0"; +import { de_ListTablesCommand, se_ListTablesCommand } from "../protocols/Aws_json1_1"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link ListTablesCommand}. + */ +export interface ListTablesCommandInput extends ListTablesRequest {} +/** + * @public + * + * The output of {@link ListTablesCommand}. + */ +export interface ListTablesCommandOutput extends ListTablesResponse, __MetadataBearer {} + +/** + * @public + *

Lists all available tables in data exports.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { BCMDataExportsClient, ListTablesCommand } from "@aws-sdk/client-bcm-data-exports"; // ES Modules import + * // const { BCMDataExportsClient, ListTablesCommand } = require("@aws-sdk/client-bcm-data-exports"); // CommonJS import + * const client = new BCMDataExportsClient(config); + * const input = { // ListTablesRequest + * NextToken: "STRING_VALUE", + * MaxResults: Number("int"), + * }; + * const command = new ListTablesCommand(input); + * const response = await client.send(command); + * // { // ListTablesResponse + * // Tables: [ // TableList + * // { // Table + * // TableName: "STRING_VALUE", + * // Description: "STRING_VALUE", + * // TableProperties: [ // TablePropertyDescriptionList + * // { // TablePropertyDescription + * // Name: "STRING_VALUE", + * // ValidValues: [ // GenericStringList + * // "STRING_VALUE", + * // ], + * // DefaultValue: "STRING_VALUE", + * // Description: "STRING_VALUE", + * // }, + * // ], + * // }, + * // ], + * // NextToken: "STRING_VALUE", + * // }; + * + * ``` + * + * @param ListTablesCommandInput - {@link ListTablesCommandInput} + * @returns {@link ListTablesCommandOutput} + * @see {@link ListTablesCommandInput} for command's `input` shape. + * @see {@link ListTablesCommandOutput} for command's `response` shape. + * @see {@link BCMDataExportsClientResolvedConfig | config} for BCMDataExportsClient's `config` shape. + * + * @throws {@link InternalServerException} (server fault) + *

An error on the server occurred during the processing of your request. Try again + * later.

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

The request was denied due to request throttling.

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

The input fails to satisfy the constraints specified by an Amazon Web Services + * service.

+ * + * @throws {@link BCMDataExportsServiceException} + *

Base exception class for all service exceptions from BCMDataExports service.

+ * + */ +export class ListTablesCommand extends $Command< + ListTablesCommandInput, + ListTablesCommandOutput, + BCMDataExportsClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + }; + } + + /** + * @public + */ + constructor(readonly input: ListTablesCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: BCMDataExportsClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(getEndpointPlugin(configuration, ListTablesCommand.getEndpointParameterInstructions())); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "BCMDataExportsClient"; + const commandName = "ListTablesCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "AWSBillingAndCostManagementDataExports", + operation: "ListTables", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: ListTablesCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_ListTablesCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_ListTablesCommand(output, context); + } +} diff --git a/clients/client-bcm-data-exports/src/commands/ListTagsForResourceCommand.ts b/clients/client-bcm-data-exports/src/commands/ListTagsForResourceCommand.ts new file mode 100644 index 000000000000..bd0ba3b7ac52 --- /dev/null +++ b/clients/client-bcm-data-exports/src/commands/ListTagsForResourceCommand.ts @@ -0,0 +1,160 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { BCMDataExportsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../BCMDataExportsClient"; +import { ListTagsForResourceRequest, ListTagsForResourceResponse } from "../models/models_0"; +import { de_ListTagsForResourceCommand, se_ListTagsForResourceCommand } from "../protocols/Aws_json1_1"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link ListTagsForResourceCommand}. + */ +export interface ListTagsForResourceCommandInput extends ListTagsForResourceRequest {} +/** + * @public + * + * The output of {@link ListTagsForResourceCommand}. + */ +export interface ListTagsForResourceCommandOutput extends ListTagsForResourceResponse, __MetadataBearer {} + +/** + * @public + *

List tags associated with an existing data export.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { BCMDataExportsClient, ListTagsForResourceCommand } from "@aws-sdk/client-bcm-data-exports"; // ES Modules import + * // const { BCMDataExportsClient, ListTagsForResourceCommand } = require("@aws-sdk/client-bcm-data-exports"); // CommonJS import + * const client = new BCMDataExportsClient(config); + * const input = { // ListTagsForResourceRequest + * ResourceArn: "STRING_VALUE", // required + * MaxResults: Number("int"), + * NextToken: "STRING_VALUE", + * }; + * const command = new ListTagsForResourceCommand(input); + * const response = await client.send(command); + * // { // ListTagsForResourceResponse + * // ResourceTags: [ // ResourceTagList + * // { // ResourceTag + * // Key: "STRING_VALUE", // required + * // Value: "STRING_VALUE", // required + * // }, + * // ], + * // NextToken: "STRING_VALUE", + * // }; + * + * ``` + * + * @param ListTagsForResourceCommandInput - {@link ListTagsForResourceCommandInput} + * @returns {@link ListTagsForResourceCommandOutput} + * @see {@link ListTagsForResourceCommandInput} for command's `input` shape. + * @see {@link ListTagsForResourceCommandOutput} for command's `response` shape. + * @see {@link BCMDataExportsClientResolvedConfig | config} for BCMDataExportsClient's `config` shape. + * + * @throws {@link InternalServerException} (server fault) + *

An error on the server occurred during the processing of your request. Try again + * later.

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

The specified Amazon Resource Name (ARN) in the request doesn't exist.

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

The request was denied due to request throttling.

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

The input fails to satisfy the constraints specified by an Amazon Web Services + * service.

+ * + * @throws {@link BCMDataExportsServiceException} + *

Base exception class for all service exceptions from BCMDataExports service.

+ * + */ +export class ListTagsForResourceCommand extends $Command< + ListTagsForResourceCommandInput, + ListTagsForResourceCommandOutput, + BCMDataExportsClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + }; + } + + /** + * @public + */ + constructor(readonly input: ListTagsForResourceCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: BCMDataExportsClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, ListTagsForResourceCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "BCMDataExportsClient"; + const commandName = "ListTagsForResourceCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "AWSBillingAndCostManagementDataExports", + operation: "ListTagsForResource", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: ListTagsForResourceCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_ListTagsForResourceCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_ListTagsForResourceCommand(output, context); + } +} diff --git a/clients/client-bcm-data-exports/src/commands/TagResourceCommand.ts b/clients/client-bcm-data-exports/src/commands/TagResourceCommand.ts new file mode 100644 index 000000000000..c7fb1d56d215 --- /dev/null +++ b/clients/client-bcm-data-exports/src/commands/TagResourceCommand.ts @@ -0,0 +1,154 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { BCMDataExportsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../BCMDataExportsClient"; +import { TagResourceRequest, TagResourceResponse } from "../models/models_0"; +import { de_TagResourceCommand, se_TagResourceCommand } from "../protocols/Aws_json1_1"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link TagResourceCommand}. + */ +export interface TagResourceCommandInput extends TagResourceRequest {} +/** + * @public + * + * The output of {@link TagResourceCommand}. + */ +export interface TagResourceCommandOutput extends TagResourceResponse, __MetadataBearer {} + +/** + * @public + *

Adds tags for an existing data export definition.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { BCMDataExportsClient, TagResourceCommand } from "@aws-sdk/client-bcm-data-exports"; // ES Modules import + * // const { BCMDataExportsClient, TagResourceCommand } = require("@aws-sdk/client-bcm-data-exports"); // CommonJS import + * const client = new BCMDataExportsClient(config); + * const input = { // TagResourceRequest + * ResourceArn: "STRING_VALUE", // required + * ResourceTags: [ // ResourceTagList // required + * { // ResourceTag + * Key: "STRING_VALUE", // required + * Value: "STRING_VALUE", // required + * }, + * ], + * }; + * const command = new TagResourceCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param TagResourceCommandInput - {@link TagResourceCommandInput} + * @returns {@link TagResourceCommandOutput} + * @see {@link TagResourceCommandInput} for command's `input` shape. + * @see {@link TagResourceCommandOutput} for command's `response` shape. + * @see {@link BCMDataExportsClientResolvedConfig | config} for BCMDataExportsClient's `config` shape. + * + * @throws {@link InternalServerException} (server fault) + *

An error on the server occurred during the processing of your request. Try again + * later.

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

The specified Amazon Resource Name (ARN) in the request doesn't exist.

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

The request was denied due to request throttling.

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

The input fails to satisfy the constraints specified by an Amazon Web Services + * service.

+ * + * @throws {@link BCMDataExportsServiceException} + *

Base exception class for all service exceptions from BCMDataExports service.

+ * + */ +export class TagResourceCommand extends $Command< + TagResourceCommandInput, + TagResourceCommandOutput, + BCMDataExportsClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + }; + } + + /** + * @public + */ + constructor(readonly input: TagResourceCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: BCMDataExportsClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(getEndpointPlugin(configuration, TagResourceCommand.getEndpointParameterInstructions())); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "BCMDataExportsClient"; + const commandName = "TagResourceCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "AWSBillingAndCostManagementDataExports", + operation: "TagResource", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: TagResourceCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_TagResourceCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_TagResourceCommand(output, context); + } +} diff --git a/clients/client-bcm-data-exports/src/commands/UntagResourceCommand.ts b/clients/client-bcm-data-exports/src/commands/UntagResourceCommand.ts new file mode 100644 index 000000000000..c0b34ef8f608 --- /dev/null +++ b/clients/client-bcm-data-exports/src/commands/UntagResourceCommand.ts @@ -0,0 +1,151 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { BCMDataExportsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../BCMDataExportsClient"; +import { UntagResourceRequest, UntagResourceResponse } from "../models/models_0"; +import { de_UntagResourceCommand, se_UntagResourceCommand } from "../protocols/Aws_json1_1"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link UntagResourceCommand}. + */ +export interface UntagResourceCommandInput extends UntagResourceRequest {} +/** + * @public + * + * The output of {@link UntagResourceCommand}. + */ +export interface UntagResourceCommandOutput extends UntagResourceResponse, __MetadataBearer {} + +/** + * @public + *

Deletes tags associated with an existing data export definition.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { BCMDataExportsClient, UntagResourceCommand } from "@aws-sdk/client-bcm-data-exports"; // ES Modules import + * // const { BCMDataExportsClient, UntagResourceCommand } = require("@aws-sdk/client-bcm-data-exports"); // CommonJS import + * const client = new BCMDataExportsClient(config); + * const input = { // UntagResourceRequest + * ResourceArn: "STRING_VALUE", // required + * ResourceTagKeys: [ // ResourceTagKeyList // required + * "STRING_VALUE", + * ], + * }; + * const command = new UntagResourceCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param UntagResourceCommandInput - {@link UntagResourceCommandInput} + * @returns {@link UntagResourceCommandOutput} + * @see {@link UntagResourceCommandInput} for command's `input` shape. + * @see {@link UntagResourceCommandOutput} for command's `response` shape. + * @see {@link BCMDataExportsClientResolvedConfig | config} for BCMDataExportsClient's `config` shape. + * + * @throws {@link InternalServerException} (server fault) + *

An error on the server occurred during the processing of your request. Try again + * later.

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

The specified Amazon Resource Name (ARN) in the request doesn't exist.

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

The request was denied due to request throttling.

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

The input fails to satisfy the constraints specified by an Amazon Web Services + * service.

+ * + * @throws {@link BCMDataExportsServiceException} + *

Base exception class for all service exceptions from BCMDataExports service.

+ * + */ +export class UntagResourceCommand extends $Command< + UntagResourceCommandInput, + UntagResourceCommandOutput, + BCMDataExportsClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + }; + } + + /** + * @public + */ + constructor(readonly input: UntagResourceCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: BCMDataExportsClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(getEndpointPlugin(configuration, UntagResourceCommand.getEndpointParameterInstructions())); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "BCMDataExportsClient"; + const commandName = "UntagResourceCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "AWSBillingAndCostManagementDataExports", + operation: "UntagResource", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: UntagResourceCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_UntagResourceCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_UntagResourceCommand(output, context); + } +} diff --git a/clients/client-bcm-data-exports/src/commands/UpdateExportCommand.ts b/clients/client-bcm-data-exports/src/commands/UpdateExportCommand.ts new file mode 100644 index 000000000000..ab090971ad1c --- /dev/null +++ b/clients/client-bcm-data-exports/src/commands/UpdateExportCommand.ts @@ -0,0 +1,180 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { BCMDataExportsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../BCMDataExportsClient"; +import { UpdateExportRequest, UpdateExportResponse } from "../models/models_0"; +import { de_UpdateExportCommand, se_UpdateExportCommand } from "../protocols/Aws_json1_1"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link UpdateExportCommand}. + */ +export interface UpdateExportCommandInput extends UpdateExportRequest {} +/** + * @public + * + * The output of {@link UpdateExportCommand}. + */ +export interface UpdateExportCommandOutput extends UpdateExportResponse, __MetadataBearer {} + +/** + * @public + *

Updates an existing data export by overwriting all export parameters. All export + * parameters must be provided in the UpdateExport request.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { BCMDataExportsClient, UpdateExportCommand } from "@aws-sdk/client-bcm-data-exports"; // ES Modules import + * // const { BCMDataExportsClient, UpdateExportCommand } = require("@aws-sdk/client-bcm-data-exports"); // CommonJS import + * const client = new BCMDataExportsClient(config); + * const input = { // UpdateExportRequest + * ExportArn: "STRING_VALUE", // required + * Export: { // Export + * ExportArn: "STRING_VALUE", + * Name: "STRING_VALUE", // required + * Description: "STRING_VALUE", + * DataQuery: { // DataQuery + * QueryStatement: "STRING_VALUE", // required + * TableConfigurations: { // TableConfigurations + * "": { // TableProperties + * "": "STRING_VALUE", + * }, + * }, + * }, + * DestinationConfigurations: { // DestinationConfigurations + * S3Destination: { // S3Destination + * S3Bucket: "STRING_VALUE", // required + * S3Prefix: "STRING_VALUE", // required + * S3Region: "STRING_VALUE", // required + * S3OutputConfigurations: { // S3OutputConfigurations + * OutputType: "CUSTOM", // required + * Format: "TEXT_OR_CSV" || "PARQUET", // required + * Compression: "GZIP" || "PARQUET", // required + * Overwrite: "CREATE_NEW_REPORT" || "OVERWRITE_REPORT", // required + * }, + * }, + * }, + * RefreshCadence: { // RefreshCadence + * Frequency: "SYNCHRONOUS", // required + * }, + * }, + * }; + * const command = new UpdateExportCommand(input); + * const response = await client.send(command); + * // { // UpdateExportResponse + * // ExportArn: "STRING_VALUE", + * // }; + * + * ``` + * + * @param UpdateExportCommandInput - {@link UpdateExportCommandInput} + * @returns {@link UpdateExportCommandOutput} + * @see {@link UpdateExportCommandInput} for command's `input` shape. + * @see {@link UpdateExportCommandOutput} for command's `response` shape. + * @see {@link BCMDataExportsClientResolvedConfig | config} for BCMDataExportsClient's `config` shape. + * + * @throws {@link InternalServerException} (server fault) + *

An error on the server occurred during the processing of your request. Try again + * later.

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

The specified Amazon Resource Name (ARN) in the request doesn't exist.

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

The request was denied due to request throttling.

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

The input fails to satisfy the constraints specified by an Amazon Web Services + * service.

+ * + * @throws {@link BCMDataExportsServiceException} + *

Base exception class for all service exceptions from BCMDataExports service.

+ * + */ +export class UpdateExportCommand extends $Command< + UpdateExportCommandInput, + UpdateExportCommandOutput, + BCMDataExportsClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + }; + } + + /** + * @public + */ + constructor(readonly input: UpdateExportCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: BCMDataExportsClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(getEndpointPlugin(configuration, UpdateExportCommand.getEndpointParameterInstructions())); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "BCMDataExportsClient"; + const commandName = "UpdateExportCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "AWSBillingAndCostManagementDataExports", + operation: "UpdateExport", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: UpdateExportCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_UpdateExportCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_UpdateExportCommand(output, context); + } +} diff --git a/clients/client-bcm-data-exports/src/commands/index.ts b/clients/client-bcm-data-exports/src/commands/index.ts new file mode 100644 index 000000000000..a7cbb9f1966b --- /dev/null +++ b/clients/client-bcm-data-exports/src/commands/index.ts @@ -0,0 +1,13 @@ +// smithy-typescript generated code +export * from "./CreateExportCommand"; +export * from "./DeleteExportCommand"; +export * from "./GetExecutionCommand"; +export * from "./GetExportCommand"; +export * from "./GetTableCommand"; +export * from "./ListExecutionsCommand"; +export * from "./ListExportsCommand"; +export * from "./ListTablesCommand"; +export * from "./ListTagsForResourceCommand"; +export * from "./TagResourceCommand"; +export * from "./UntagResourceCommand"; +export * from "./UpdateExportCommand"; diff --git a/clients/client-bcm-data-exports/src/endpoint/EndpointParameters.ts b/clients/client-bcm-data-exports/src/endpoint/EndpointParameters.ts new file mode 100644 index 000000000000..80196cec3dc2 --- /dev/null +++ b/clients/client-bcm-data-exports/src/endpoint/EndpointParameters.ts @@ -0,0 +1,31 @@ +// smithy-typescript generated code +import { Endpoint, EndpointParameters as __EndpointParameters, EndpointV2, Provider } from "@smithy/types"; + +/** + * @public + */ +export interface ClientInputEndpointParameters { + region?: string | Provider; + useFipsEndpoint?: boolean | Provider; + endpoint?: string | Provider | Endpoint | Provider | EndpointV2 | Provider; +} + +export type ClientResolvedEndpointParameters = ClientInputEndpointParameters & { + defaultSigningName: string; +}; + +export const resolveClientEndpointParameters = ( + options: T & ClientInputEndpointParameters +): T & ClientResolvedEndpointParameters => { + return { + ...options, + useFipsEndpoint: options.useFipsEndpoint ?? false, + defaultSigningName: "bcm-data-exports", + }; +}; + +export interface EndpointParameters extends __EndpointParameters { + Region?: string; + UseFIPS?: boolean; + Endpoint?: string; +} diff --git a/clients/client-bcm-data-exports/src/endpoint/endpointResolver.ts b/clients/client-bcm-data-exports/src/endpoint/endpointResolver.ts new file mode 100644 index 000000000000..5a2f95973187 --- /dev/null +++ b/clients/client-bcm-data-exports/src/endpoint/endpointResolver.ts @@ -0,0 +1,16 @@ +// smithy-typescript generated code +import { EndpointV2, Logger } from "@smithy/types"; +import { EndpointParams, resolveEndpoint } from "@smithy/util-endpoints"; + +import { EndpointParameters } from "./EndpointParameters"; +import { ruleSet } from "./ruleset"; + +export const defaultEndpointResolver = ( + endpointParams: EndpointParameters, + context: { logger?: Logger } = {} +): EndpointV2 => { + return resolveEndpoint(ruleSet, { + endpointParams: endpointParams as EndpointParams, + logger: context.logger, + }); +}; diff --git a/clients/client-bcm-data-exports/src/endpoint/ruleset.ts b/clients/client-bcm-data-exports/src/endpoint/ruleset.ts new file mode 100644 index 000000000000..a02cbb3de278 --- /dev/null +++ b/clients/client-bcm-data-exports/src/endpoint/ruleset.ts @@ -0,0 +1,29 @@ +// @ts-nocheck +// generated code, do not edit +import { RuleSetObject } from "@smithy/types"; + +/* This file is compressed. Log this object + or see "smithy.rules#endpointRuleSet" + in codegen/sdk-codegen/aws-models/bcm-data-exports.json */ + +const r="argv", +s="ref"; +const a=false, +b=true, +c="isSet", +d="booleanEquals", +e="error", +f="endpoint", +g="tree", +h="PartitionResult", +i="getAttr", +j={"required":false,"type":"String"}, +k={[s]:"Endpoint"}, +l={}, +m={[s]:h}, +n={[e]:"FIPS is enabled but this partition does not support FIPS","type":e}, +o=[{"fn":d,[r]:[{[s]:"UseFIPS"},true]}], +p=[{[s]:"Region"}], +q=[{"fn":d,[r]:[{"fn":i,[r]:[m,"supportsFIPS"]},true]}]; +const _data={version:"1.0",parameters:{Region:j,UseFIPS:{required:b,default:a,type:"Boolean"},Endpoint:j},rules:[{conditions:[{fn:c,[r]:[k]}],rules:[{conditions:o,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:e},{endpoint:{url:k,properties:l,headers:l},type:f}],type:g},{conditions:[{fn:c,[r]:p}],rules:[{conditions:[{fn:"aws.partition",[r]:p,assign:h}],rules:[{conditions:[{fn:"stringEquals",[r]:[{fn:i,[r]:[m,"name"]},"aws"]}],rules:[{conditions:o,rules:[{conditions:q,rules:[{endpoint:{url:"https://bcm-data-exports-fips.{Region}.api.aws",properties:l,headers:l},type:f}],type:g},n],type:g},{endpoint:{url:"https://bcm-data-exports.us-east-1.api.aws",properties:{authSchemes:[{name:"sigv4",signingName:"bcm-data-exports",signingRegion:"us-east-1"}]},headers:l},type:f}],type:g},{conditions:[{fn:d,[r]:[b,{fn:i,[r]:[m,"supportsDualStack"]}]}],rules:[{conditions:o,rules:[{conditions:q,rules:[{endpoint:{url:"https://bcm-data-exports-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:l,headers:l},type:f}],type:g},n],type:g},{endpoint:{url:"https://bcm-data-exports.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:l,headers:l},type:f}],type:g},{conditions:o,rules:[{conditions:q,rules:[{endpoint:{url:"https://bcm-data-exports-fips.{Region}.{PartitionResult#dnsSuffix}",properties:l,headers:l},type:f}],type:g},n],type:g},{endpoint:{url:"https://bcm-data-exports.{Region}.{PartitionResult#dnsSuffix}",properties:l,headers:l},type:f}],type:g}],type:g},{error:"Invalid Configuration: Missing Region",type:e}]}; +export const ruleSet: RuleSetObject = _data; diff --git a/clients/client-bcm-data-exports/src/extensionConfiguration.ts b/clients/client-bcm-data-exports/src/extensionConfiguration.ts new file mode 100644 index 000000000000..8465164e9517 --- /dev/null +++ b/clients/client-bcm-data-exports/src/extensionConfiguration.ts @@ -0,0 +1,12 @@ +// smithy-typescript generated code +import { AwsRegionExtensionConfiguration } from "@aws-sdk/types"; +import { HttpHandlerExtensionConfiguration } from "@smithy/protocol-http"; +import { DefaultExtensionConfiguration } from "@smithy/types"; + +/** + * @internal + */ +export interface BCMDataExportsExtensionConfiguration + extends HttpHandlerExtensionConfiguration, + DefaultExtensionConfiguration, + AwsRegionExtensionConfiguration {} diff --git a/clients/client-bcm-data-exports/src/index.ts b/clients/client-bcm-data-exports/src/index.ts new file mode 100644 index 000000000000..a3797c9753be --- /dev/null +++ b/clients/client-bcm-data-exports/src/index.ts @@ -0,0 +1,26 @@ +// smithy-typescript generated code +/* eslint-disable */ +/** + *

You can use the Data Exports API to create customized exports from multiple Amazon Web Services cost management and billing datasets, such as cost and usage data and cost + * optimization recommendations.

+ *

The Data Exports API provides the following endpoint:

+ *
    + *
  • + *

    https://bcm-data-exports.us-east-1.api.aws

    + *
  • + *
+ * + * @packageDocumentation + */ +export * from "./BCMDataExportsClient"; +export * from "./BCMDataExports"; +export { ClientInputEndpointParameters } from "./endpoint/EndpointParameters"; +export { RuntimeExtension } from "./runtimeExtensions"; +export { BCMDataExportsExtensionConfiguration } from "./extensionConfiguration"; +export * from "./commands"; +export * from "./pagination"; +export * from "./models"; + +import "@aws-sdk/util-endpoints"; + +export { BCMDataExportsServiceException } from "./models/BCMDataExportsServiceException"; diff --git a/clients/client-bcm-data-exports/src/models/BCMDataExportsServiceException.ts b/clients/client-bcm-data-exports/src/models/BCMDataExportsServiceException.ts new file mode 100644 index 000000000000..3619f3fe6998 --- /dev/null +++ b/clients/client-bcm-data-exports/src/models/BCMDataExportsServiceException.ts @@ -0,0 +1,22 @@ +// smithy-typescript generated code +import { + ServiceException as __ServiceException, + ServiceExceptionOptions as __ServiceExceptionOptions, +} from "@smithy/smithy-client"; + +export { __ServiceException, __ServiceExceptionOptions }; + +/** + * @public + * + * Base exception class for all service exceptions from BCMDataExports service. + */ +export class BCMDataExportsServiceException extends __ServiceException { + /** + * @internal + */ + constructor(options: __ServiceExceptionOptions) { + super(options); + Object.setPrototypeOf(this, BCMDataExportsServiceException.prototype); + } +} diff --git a/clients/client-bcm-data-exports/src/models/index.ts b/clients/client-bcm-data-exports/src/models/index.ts new file mode 100644 index 000000000000..9eaceb12865f --- /dev/null +++ b/clients/client-bcm-data-exports/src/models/index.ts @@ -0,0 +1,2 @@ +// smithy-typescript generated code +export * from "./models_0"; diff --git a/clients/client-bcm-data-exports/src/models/models_0.ts b/clients/client-bcm-data-exports/src/models/models_0.ts new file mode 100644 index 000000000000..1e180a843184 --- /dev/null +++ b/clients/client-bcm-data-exports/src/models/models_0.ts @@ -0,0 +1,1093 @@ +// smithy-typescript generated code +import { ExceptionOptionType as __ExceptionOptionType } from "@smithy/smithy-client"; + +import { BCMDataExportsServiceException as __BaseException } from "./BCMDataExportsServiceException"; + +/** + * @public + *

The SQL query of column selections and row filters from the data table you want.

+ */ +export interface DataQuery { + /** + * @public + *

The query statement.

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

The table configuration.

+ */ + TableConfigurations?: Record>; +} + +/** + * @public + * @enum + */ +export const CompressionOption = { + GZIP: "GZIP", + PARQUET: "PARQUET", +} as const; + +/** + * @public + */ +export type CompressionOption = (typeof CompressionOption)[keyof typeof CompressionOption]; + +/** + * @public + * @enum + */ +export const FormatOption = { + PARQUET: "PARQUET", + TEXT_OR_CSV: "TEXT_OR_CSV", +} as const; + +/** + * @public + */ +export type FormatOption = (typeof FormatOption)[keyof typeof FormatOption]; + +/** + * @public + * @enum + */ +export const S3OutputType = { + CUSTOM: "CUSTOM", +} as const; + +/** + * @public + */ +export type S3OutputType = (typeof S3OutputType)[keyof typeof S3OutputType]; + +/** + * @public + * @enum + */ +export const OverwriteOption = { + CREATE_NEW_REPORT: "CREATE_NEW_REPORT", + OVERWRITE_REPORT: "OVERWRITE_REPORT", +} as const; + +/** + * @public + */ +export type OverwriteOption = (typeof OverwriteOption)[keyof typeof OverwriteOption]; + +/** + * @public + *

The compression type, file format, and overwrite preference for the data export.

+ */ +export interface S3OutputConfigurations { + /** + * @public + *

The output type for the data export.

+ */ + OutputType: S3OutputType | undefined; + + /** + * @public + *

The file format for the data export.

+ */ + Format: FormatOption | undefined; + + /** + * @public + *

The compression type for the data export.

+ */ + Compression: CompressionOption | undefined; + + /** + * @public + *

The rule to follow when generating a version of the data export file. You have the choice + * to overwrite the previous version or to be delivered in addition to the previous versions. + * Overwriting exports can save on Amazon S3 storage costs. Creating new export versions allows + * you to track the changes in cost and usage data over time.

+ */ + Overwrite: OverwriteOption | undefined; +} + +/** + * @public + *

Describes the destination Amazon Simple Storage Service (Amazon S3) bucket name and object + * keys of a data exports file.

+ */ +export interface S3Destination { + /** + * @public + *

The name of the Amazon S3 bucket used as the destination of a data export file.

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

The S3 path prefix you want prepended to the name of your data export.

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

The S3 bucket Region.

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

The output configuration for the data export.

+ */ + S3OutputConfigurations: S3OutputConfigurations | undefined; +} + +/** + * @public + *

The destinations used for data exports.

+ */ +export interface DestinationConfigurations { + /** + * @public + *

An object that describes the destination of the data exports file.

+ */ + S3Destination: S3Destination | undefined; +} + +/** + * @public + * @enum + */ +export const FrequencyOption = { + SYNCHRONOUS: "SYNCHRONOUS", +} as const; + +/** + * @public + */ +export type FrequencyOption = (typeof FrequencyOption)[keyof typeof FrequencyOption]; + +/** + * @public + *

The cadence for Amazon Web Services to update the data export in your S3 bucket.

+ */ +export interface RefreshCadence { + /** + * @public + *

The frequency that data exports are updated. The export refreshes each time the source + * data updates, up to three times daily.

+ */ + Frequency: FrequencyOption | undefined; +} + +/** + * @public + *

The details that are available for an export.

+ */ +export interface Export { + /** + * @public + *

The Amazon Resource Name (ARN) for this export.

+ */ + ExportArn?: string; + + /** + * @public + *

The name of this specific data export.

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

The description for this specific data export.

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

The data query for this specific data export.

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

The destination configuration for this specific data export.

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

The cadence for Amazon Web Services to update the export in your S3 bucket.

+ */ + RefreshCadence: RefreshCadence | undefined; +} + +/** + * @public + *

The tag structure that contains a tag key and value.

+ */ +export interface ResourceTag { + /** + * @public + *

The key that's associated with the tag.

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

The value that's associated with the tag.

+ */ + Value: string | undefined; +} + +/** + * @public + */ +export interface CreateExportRequest { + /** + * @public + *

The details of the export, including data query, name, description, and destination + * configuration.

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

An optional list of tags to associate with the specified export. Each tag consists of a + * key and a value, and each key must be unique for the resource.

+ */ + ResourceTags?: ResourceTag[]; +} + +/** + * @public + */ +export interface CreateExportResponse { + /** + * @public + *

The Amazon Resource Name (ARN) for this export.

+ */ + ExportArn?: string; +} + +/** + * @public + *

An error on the server occurred during the processing of your request. Try again + * later.

+ */ +export class InternalServerException extends __BaseException { + readonly name: "InternalServerException" = "InternalServerException"; + readonly $fault: "server" = "server"; + Message: string | undefined; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "InternalServerException", + $fault: "server", + ...opts, + }); + Object.setPrototypeOf(this, InternalServerException.prototype); + this.Message = opts.Message; + } +} + +/** + * @public + *

You've reached the limit on the number of resources you can create, or exceeded the size + * of an individual resource.

+ */ +export class ServiceQuotaExceededException extends __BaseException { + readonly name: "ServiceQuotaExceededException" = "ServiceQuotaExceededException"; + readonly $fault: "client" = "client"; + Message: string | undefined; + /** + * @public + *

The identifier of the resource that exceeded quota.

+ */ + ResourceId?: string; + + /** + * @public + *

The type of the resource that exceeded quota.

+ */ + ResourceType?: string; + + /** + * @public + *

The quota code that was exceeded.

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

The service code that exceeded quota. It will always be + * “AWSBillingAndCostManagementDataExports”.

+ */ + ServiceCode: string | undefined; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "ServiceQuotaExceededException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, ServiceQuotaExceededException.prototype); + this.Message = opts.Message; + this.ResourceId = opts.ResourceId; + this.ResourceType = opts.ResourceType; + this.QuotaCode = opts.QuotaCode; + this.ServiceCode = opts.ServiceCode; + } +} + +/** + * @public + *

The request was denied due to request throttling.

+ */ +export class ThrottlingException extends __BaseException { + readonly name: "ThrottlingException" = "ThrottlingException"; + readonly $fault: "client" = "client"; + Message: string | undefined; + /** + * @public + *

The quota code that exceeded the throttling limit.

+ */ + QuotaCode?: string; + + /** + * @public + *

The service code that exceeded the throttling limit. It will always be + * “AWSBillingAndCostManagementDataExports”.

+ */ + ServiceCode?: string; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "ThrottlingException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, ThrottlingException.prototype); + this.Message = opts.Message; + this.QuotaCode = opts.QuotaCode; + this.ServiceCode = opts.ServiceCode; + } +} + +/** + * @public + *

The input failed to meet the constraints specified by the Amazon Web Services service in a + * specified field.

+ */ +export interface ValidationExceptionField { + /** + * @public + *

The field name where the invalid entry was detected.

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

A message with the reason for the validation exception error.

+ */ + Message: string | undefined; +} + +/** + * @public + * @enum + */ +export const ValidationExceptionReason = { + CANNOT_PARSE: "cannotParse", + FIELD_VALIDATION_FAILED: "fieldValidationFailed", + OTHER: "other", + UNKNOWN_OPERATION: "unknownOperation", +} as const; + +/** + * @public + */ +export type ValidationExceptionReason = (typeof ValidationExceptionReason)[keyof typeof ValidationExceptionReason]; + +/** + * @public + *

The input fails to satisfy the constraints specified by an Amazon Web Services + * service.

+ */ +export class ValidationException extends __BaseException { + readonly name: "ValidationException" = "ValidationException"; + readonly $fault: "client" = "client"; + Message: string | undefined; + /** + * @public + *

The reason for the validation exception.

+ */ + Reason?: ValidationExceptionReason; + + /** + * @public + *

The list of fields that are invalid.

+ */ + Fields?: ValidationExceptionField[]; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "ValidationException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, ValidationException.prototype); + this.Message = opts.Message; + this.Reason = opts.Reason; + this.Fields = opts.Fields; + } +} + +/** + * @public + */ +export interface DeleteExportRequest { + /** + * @public + *

The Amazon Resource Name (ARN) for this export.

+ */ + ExportArn: string | undefined; +} + +/** + * @public + */ +export interface DeleteExportResponse { + /** + * @public + *

The Amazon Resource Name (ARN) for this export.

+ */ + ExportArn?: string; +} + +/** + * @public + *

The specified Amazon Resource Name (ARN) in the request doesn't exist.

+ */ +export class ResourceNotFoundException extends __BaseException { + readonly name: "ResourceNotFoundException" = "ResourceNotFoundException"; + readonly $fault: "client" = "client"; + Message: string | undefined; + /** + * @public + *

The identifier of the resource that was not found.

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

The type of the resource that was not found.

+ */ + ResourceType: string | undefined; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "ResourceNotFoundException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, ResourceNotFoundException.prototype); + this.Message = opts.Message; + this.ResourceId = opts.ResourceId; + this.ResourceType = opts.ResourceType; + } +} + +/** + * @public + */ +export interface GetExecutionRequest { + /** + * @public + *

The Amazon Resource Name (ARN) of the Export object that generated this specific + * execution.

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

The ID for this specific execution.

+ */ + ExecutionId: string | undefined; +} + +/** + * @public + * @enum + */ +export const ExecutionStatusCode = { + DELIVERY_FAILURE: "DELIVERY_FAILURE", + DELIVERY_IN_PROCESS: "DELIVERY_IN_PROCESS", + DELIVERY_SUCCESS: "DELIVERY_SUCCESS", + INITIATION_IN_PROCESS: "INITIATION_IN_PROCESS", + QUERY_FAILURE: "QUERY_FAILURE", + QUERY_IN_PROCESS: "QUERY_IN_PROCESS", + QUERY_QUEUED: "QUERY_QUEUED", +} as const; + +/** + * @public + */ +export type ExecutionStatusCode = (typeof ExecutionStatusCode)[keyof typeof ExecutionStatusCode]; + +/** + * @public + * @enum + */ +export const ExecutionStatusReason = { + BILL_OWNER_CHANGED: "BILL_OWNER_CHANGED", + INSUFFICIENT_PERMISSION: "INSUFFICIENT_PERMISSION", + INTERNAL_FAILURE: "INTERNAL_FAILURE", +} as const; + +/** + * @public + */ +export type ExecutionStatusReason = (typeof ExecutionStatusReason)[keyof typeof ExecutionStatusReason]; + +/** + * @public + *

The status of the execution.

+ */ +export interface ExecutionStatus { + /** + * @public + *

The code for the status of the execution.

+ */ + StatusCode?: ExecutionStatusCode; + + /** + * @public + *

The reason for the failed status.

+ */ + StatusReason?: ExecutionStatusReason; + + /** + * @public + *

The time when the execution was created.

+ */ + CreatedAt?: Date; + + /** + * @public + *

The time when the execution was completed.

+ */ + CompletedAt?: Date; + + /** + * @public + *

The time when the execution was last updated.

+ */ + LastUpdatedAt?: Date; +} + +/** + * @public + */ +export interface GetExecutionResponse { + /** + * @public + *

The ID for this specific execution.

+ */ + ExecutionId?: string; + + /** + * @public + *

The export data for this specific execution. This export data is a snapshot from when the + * execution was generated. The data could be different from the current export data if the + * export was updated since the execution was generated.

+ */ + Export?: Export; + + /** + * @public + *

The status of this specific execution.

+ */ + ExecutionStatus?: ExecutionStatus; +} + +/** + * @public + */ +export interface GetExportRequest { + /** + * @public + *

The Amazon Resource Name (ARN) for this export.

+ */ + ExportArn: string | undefined; +} + +/** + * @public + * @enum + */ +export const ExportStatusCode = { + HEALTHY: "HEALTHY", + UNHEALTHY: "UNHEALTHY", +} as const; + +/** + * @public + */ +export type ExportStatusCode = (typeof ExportStatusCode)[keyof typeof ExportStatusCode]; + +/** + * @public + *

The status of the data export.

+ */ +export interface ExportStatus { + /** + * @public + *

The status code for the request.

+ */ + StatusCode?: ExportStatusCode; + + /** + * @public + *

The description for the status code.

+ */ + StatusReason?: ExecutionStatusReason; + + /** + * @public + *

The timestamp of when the export was created.

+ */ + CreatedAt?: Date; + + /** + * @public + *

The timestamp of when the export was updated.

+ */ + LastUpdatedAt?: Date; + + /** + * @public + *

The timestamp of when the export was last generated.

+ */ + LastRefreshedAt?: Date; +} + +/** + * @public + */ +export interface GetExportResponse { + /** + * @public + *

The data for this specific export.

+ */ + Export?: Export; + + /** + * @public + *

The status of this specific export.

+ */ + ExportStatus?: ExportStatus; +} + +/** + * @public + */ +export interface GetTableRequest { + /** + * @public + *

The name of the table.

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

TableProperties are additional configurations you can provide to change the data and + * schema of a table. Each table can have different TableProperties. Tables are not required to + * have any TableProperties. Each table property has a default value that it assumes if not + * specified.

+ */ + TableProperties?: Record; +} + +/** + * @public + *

Includes basic information for a data column such as its description, name, and + * type.

+ */ +export interface Column { + /** + * @public + *

The column name.

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

The kind of data a column stores.

+ */ + Type?: string; + + /** + * @public + *

The description for a column.

+ */ + Description?: string; +} + +/** + * @public + */ +export interface GetTableResponse { + /** + * @public + *

The name of the table.

+ */ + TableName?: string; + + /** + * @public + *

The table description.

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

TableProperties are additional configurations you can provide to change the data and + * schema of a table. Each table can have different TableProperties. Tables are not required to + * have any TableProperties. Each table property has a default value that it assumes if not + * specified.

+ */ + TableProperties?: Record; + + /** + * @public + *

The schema of the table.

+ */ + Schema?: Column[]; +} + +/** + * @public + */ +export interface ListExecutionsRequest { + /** + * @public + *

The Amazon Resource Name (ARN) for this export.

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

The maximum number of objects that are returned for the request.

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

The token to retrieve the next set of results.

+ */ + NextToken?: string; +} + +/** + * @public + *

The reference for the data export update.

+ */ +export interface ExecutionReference { + /** + * @public + *

The ID for this specific execution.

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

The status of this specific execution.

+ */ + ExecutionStatus: ExecutionStatus | undefined; +} + +/** + * @public + */ +export interface ListExecutionsResponse { + /** + * @public + *

The list of executions.

+ */ + Executions?: ExecutionReference[]; + + /** + * @public + *

The token to retrieve the next set of results.

+ */ + NextToken?: string; +} + +/** + * @public + */ +export interface ListExportsRequest { + /** + * @public + *

The maximum number of objects that are returned for the request.

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

The token to retrieve the next set of results.

+ */ + NextToken?: string; +} + +/** + * @public + *

The reference details for a given export.

+ */ +export interface ExportReference { + /** + * @public + *

The Amazon Resource Name (ARN) for this export.

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

The name of this specific data export.

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

The status of this specific data export.

+ */ + ExportStatus: ExportStatus | undefined; +} + +/** + * @public + */ +export interface ListExportsResponse { + /** + * @public + *

The details of the exports, including name and export status.

+ */ + Exports?: ExportReference[]; + + /** + * @public + *

The token to retrieve the next set of results.

+ */ + NextToken?: string; +} + +/** + * @public + */ +export interface ListTablesRequest { + /** + * @public + *

The token to retrieve the next set of results.

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

The maximum number of objects that are returned for the request.

+ */ + MaxResults?: number; +} + +/** + * @public + *

The properties for the data export table.

+ */ +export interface TablePropertyDescription { + /** + * @public + *

The name of the table.

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

The valid values for the table.

+ */ + ValidValues?: string[]; + + /** + * @public + *

The default value for the table.

+ */ + DefaultValue?: string; + + /** + * @public + *

The description for the table.

+ */ + Description?: string; +} + +/** + * @public + *

The details for the data export table.

+ */ +export interface Table { + /** + * @public + *

The name of the table.

+ */ + TableName?: string; + + /** + * @public + *

The description for the table.

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

The properties for the table.

+ */ + TableProperties?: TablePropertyDescription[]; +} + +/** + * @public + */ +export interface ListTablesResponse { + /** + * @public + *

The list of tables.

+ */ + Tables?: Table[]; + + /** + * @public + *

The token to retrieve the next set of results.

+ */ + NextToken?: string; +} + +/** + * @public + */ +export interface ListTagsForResourceRequest { + /** + * @public + *

The unique identifier for the resource.

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

The maximum number of objects that are returned for the request.

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

The token to retrieve the next set of results.

+ */ + NextToken?: string; +} + +/** + * @public + */ +export interface ListTagsForResourceResponse { + /** + * @public + *

An optional list of tags to associate with the specified export. Each tag consists of a + * key and a value, and each key must be unique for the resource.

+ */ + ResourceTags?: ResourceTag[]; + + /** + * @public + *

The token to retrieve the next set of results.

+ */ + NextToken?: string; +} + +/** + * @public + */ +export interface TagResourceRequest { + /** + * @public + *

The unique identifier for the resource.

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

The tags to associate with the resource. Each tag consists of a key and a value, and each + * key must be unique for the resource.

+ */ + ResourceTags: ResourceTag[] | undefined; +} + +/** + * @public + */ +export interface TagResourceResponse {} + +/** + * @public + */ +export interface UntagResourceRequest { + /** + * @public + *

The unique identifier for the resource.

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

The tag keys that are associated with the resource ARN.

+ */ + ResourceTagKeys: string[] | undefined; +} + +/** + * @public + */ +export interface UntagResourceResponse {} + +/** + * @public + */ +export interface UpdateExportRequest { + /** + * @public + *

The Amazon Resource Name (ARN) for this export.

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

The name and query details for the export.

+ */ + Export: Export | undefined; +} + +/** + * @public + */ +export interface UpdateExportResponse { + /** + * @public + *

The Amazon Resource Name (ARN) for this export.

+ */ + ExportArn?: string; +} diff --git a/clients/client-bcm-data-exports/src/pagination/Interfaces.ts b/clients/client-bcm-data-exports/src/pagination/Interfaces.ts new file mode 100644 index 000000000000..e3324fa98879 --- /dev/null +++ b/clients/client-bcm-data-exports/src/pagination/Interfaces.ts @@ -0,0 +1,11 @@ +// smithy-typescript generated code +import { PaginationConfiguration } from "@smithy/types"; + +import { BCMDataExportsClient } from "../BCMDataExportsClient"; + +/** + * @public + */ +export interface BCMDataExportsPaginationConfiguration extends PaginationConfiguration { + client: BCMDataExportsClient; +} diff --git a/clients/client-bcm-data-exports/src/pagination/ListExecutionsPaginator.ts b/clients/client-bcm-data-exports/src/pagination/ListExecutionsPaginator.ts new file mode 100644 index 000000000000..7ee1fd71b974 --- /dev/null +++ b/clients/client-bcm-data-exports/src/pagination/ListExecutionsPaginator.ts @@ -0,0 +1,50 @@ +// smithy-typescript generated code +import { Paginator } from "@smithy/types"; + +import { BCMDataExportsClient } from "../BCMDataExportsClient"; +import { + ListExecutionsCommand, + ListExecutionsCommandInput, + ListExecutionsCommandOutput, +} from "../commands/ListExecutionsCommand"; +import { BCMDataExportsPaginationConfiguration } from "./Interfaces"; + +/** + * @internal + */ +const makePagedClientRequest = async ( + client: BCMDataExportsClient, + input: ListExecutionsCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new ListExecutionsCommand(input), ...args); +}; +/** + * @public + */ +export async function* paginateListExecutions( + config: BCMDataExportsPaginationConfiguration, + input: ListExecutionsCommandInput, + ...additionalArguments: any +): Paginator { + // ToDo: replace with actual type instead of typeof input.NextToken + let token: typeof input.NextToken | undefined = config.startingToken || undefined; + let hasNext = true; + let page: ListExecutionsCommandOutput; + while (hasNext) { + input.NextToken = token; + input["MaxResults"] = config.pageSize; + if (config.client instanceof BCMDataExportsClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected BCMDataExports | BCMDataExportsClient"); + } + yield page; + const prevToken = token; + token = page.NextToken; + hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken)); + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-bcm-data-exports/src/pagination/ListExportsPaginator.ts b/clients/client-bcm-data-exports/src/pagination/ListExportsPaginator.ts new file mode 100644 index 000000000000..7de87afc12d3 --- /dev/null +++ b/clients/client-bcm-data-exports/src/pagination/ListExportsPaginator.ts @@ -0,0 +1,46 @@ +// smithy-typescript generated code +import { Paginator } from "@smithy/types"; + +import { BCMDataExportsClient } from "../BCMDataExportsClient"; +import { ListExportsCommand, ListExportsCommandInput, ListExportsCommandOutput } from "../commands/ListExportsCommand"; +import { BCMDataExportsPaginationConfiguration } from "./Interfaces"; + +/** + * @internal + */ +const makePagedClientRequest = async ( + client: BCMDataExportsClient, + input: ListExportsCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new ListExportsCommand(input), ...args); +}; +/** + * @public + */ +export async function* paginateListExports( + config: BCMDataExportsPaginationConfiguration, + input: ListExportsCommandInput, + ...additionalArguments: any +): Paginator { + // ToDo: replace with actual type instead of typeof input.NextToken + let token: typeof input.NextToken | undefined = config.startingToken || undefined; + let hasNext = true; + let page: ListExportsCommandOutput; + while (hasNext) { + input.NextToken = token; + input["MaxResults"] = config.pageSize; + if (config.client instanceof BCMDataExportsClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected BCMDataExports | BCMDataExportsClient"); + } + yield page; + const prevToken = token; + token = page.NextToken; + hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken)); + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-bcm-data-exports/src/pagination/ListTablesPaginator.ts b/clients/client-bcm-data-exports/src/pagination/ListTablesPaginator.ts new file mode 100644 index 000000000000..1d024efded95 --- /dev/null +++ b/clients/client-bcm-data-exports/src/pagination/ListTablesPaginator.ts @@ -0,0 +1,46 @@ +// smithy-typescript generated code +import { Paginator } from "@smithy/types"; + +import { BCMDataExportsClient } from "../BCMDataExportsClient"; +import { ListTablesCommand, ListTablesCommandInput, ListTablesCommandOutput } from "../commands/ListTablesCommand"; +import { BCMDataExportsPaginationConfiguration } from "./Interfaces"; + +/** + * @internal + */ +const makePagedClientRequest = async ( + client: BCMDataExportsClient, + input: ListTablesCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new ListTablesCommand(input), ...args); +}; +/** + * @public + */ +export async function* paginateListTables( + config: BCMDataExportsPaginationConfiguration, + input: ListTablesCommandInput, + ...additionalArguments: any +): Paginator { + // ToDo: replace with actual type instead of typeof input.NextToken + let token: typeof input.NextToken | undefined = config.startingToken || undefined; + let hasNext = true; + let page: ListTablesCommandOutput; + while (hasNext) { + input.NextToken = token; + input["MaxResults"] = config.pageSize; + if (config.client instanceof BCMDataExportsClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected BCMDataExports | BCMDataExportsClient"); + } + yield page; + const prevToken = token; + token = page.NextToken; + hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken)); + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-bcm-data-exports/src/pagination/index.ts b/clients/client-bcm-data-exports/src/pagination/index.ts new file mode 100644 index 000000000000..a0c45521caee --- /dev/null +++ b/clients/client-bcm-data-exports/src/pagination/index.ts @@ -0,0 +1,5 @@ +// smithy-typescript generated code +export * from "./Interfaces"; +export * from "./ListExecutionsPaginator"; +export * from "./ListExportsPaginator"; +export * from "./ListTablesPaginator"; diff --git a/clients/client-bcm-data-exports/src/protocols/Aws_json1_1.ts b/clients/client-bcm-data-exports/src/protocols/Aws_json1_1.ts new file mode 100644 index 000000000000..2b432bd717af --- /dev/null +++ b/clients/client-bcm-data-exports/src/protocols/Aws_json1_1.ts @@ -0,0 +1,1267 @@ +// smithy-typescript generated code +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { + _json, + collectBody, + decorateServiceException as __decorateServiceException, + expectNonNull as __expectNonNull, + expectString as __expectString, + parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, + take, + withBaseException, +} from "@smithy/smithy-client"; +import { + Endpoint as __Endpoint, + HeaderBag as __HeaderBag, + ResponseMetadata as __ResponseMetadata, + SerdeContext as __SerdeContext, +} from "@smithy/types"; + +import { CreateExportCommandInput, CreateExportCommandOutput } from "../commands/CreateExportCommand"; +import { DeleteExportCommandInput, DeleteExportCommandOutput } from "../commands/DeleteExportCommand"; +import { GetExecutionCommandInput, GetExecutionCommandOutput } from "../commands/GetExecutionCommand"; +import { GetExportCommandInput, GetExportCommandOutput } from "../commands/GetExportCommand"; +import { GetTableCommandInput, GetTableCommandOutput } from "../commands/GetTableCommand"; +import { ListExecutionsCommandInput, ListExecutionsCommandOutput } from "../commands/ListExecutionsCommand"; +import { ListExportsCommandInput, ListExportsCommandOutput } from "../commands/ListExportsCommand"; +import { ListTablesCommandInput, ListTablesCommandOutput } from "../commands/ListTablesCommand"; +import { + ListTagsForResourceCommandInput, + ListTagsForResourceCommandOutput, +} from "../commands/ListTagsForResourceCommand"; +import { TagResourceCommandInput, TagResourceCommandOutput } from "../commands/TagResourceCommand"; +import { UntagResourceCommandInput, UntagResourceCommandOutput } from "../commands/UntagResourceCommand"; +import { UpdateExportCommandInput, UpdateExportCommandOutput } from "../commands/UpdateExportCommand"; +import { BCMDataExportsServiceException as __BaseException } from "../models/BCMDataExportsServiceException"; +import { + CreateExportRequest, + DataQuery, + DeleteExportRequest, + DestinationConfigurations, + ExecutionReference, + ExecutionStatus, + Export, + ExportReference, + ExportStatus, + GetExecutionRequest, + GetExecutionResponse, + GetExportRequest, + GetExportResponse, + GetTableRequest, + InternalServerException, + ListExecutionsRequest, + ListExecutionsResponse, + ListExportsRequest, + ListExportsResponse, + ListTablesRequest, + ListTagsForResourceRequest, + RefreshCadence, + ResourceNotFoundException, + ResourceTag, + S3Destination, + S3OutputConfigurations, + ServiceQuotaExceededException, + TagResourceRequest, + ThrottlingException, + UntagResourceRequest, + UpdateExportRequest, + ValidationException, +} from "../models/models_0"; + +/** + * serializeAws_json1_1CreateExportCommand + */ +export const se_CreateExportCommand = async ( + input: CreateExportCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("CreateExport"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_json1_1DeleteExportCommand + */ +export const se_DeleteExportCommand = async ( + input: DeleteExportCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("DeleteExport"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_json1_1GetExecutionCommand + */ +export const se_GetExecutionCommand = async ( + input: GetExecutionCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("GetExecution"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_json1_1GetExportCommand + */ +export const se_GetExportCommand = async ( + input: GetExportCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("GetExport"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_json1_1GetTableCommand + */ +export const se_GetTableCommand = async ( + input: GetTableCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("GetTable"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_json1_1ListExecutionsCommand + */ +export const se_ListExecutionsCommand = async ( + input: ListExecutionsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("ListExecutions"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_json1_1ListExportsCommand + */ +export const se_ListExportsCommand = async ( + input: ListExportsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("ListExports"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_json1_1ListTablesCommand + */ +export const se_ListTablesCommand = async ( + input: ListTablesCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("ListTables"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_json1_1ListTagsForResourceCommand + */ +export const se_ListTagsForResourceCommand = async ( + input: ListTagsForResourceCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("ListTagsForResource"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_json1_1TagResourceCommand + */ +export const se_TagResourceCommand = async ( + input: TagResourceCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("TagResource"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_json1_1UntagResourceCommand + */ +export const se_UntagResourceCommand = async ( + input: UntagResourceCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("UntagResource"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_json1_1UpdateExportCommand + */ +export const se_UpdateExportCommand = async ( + input: UpdateExportCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("UpdateExport"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * deserializeAws_json1_1CreateExportCommand + */ +export const de_CreateExportCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_CreateExportCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = _json(data); + const response: CreateExportCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_1CreateExportCommandError + */ +const de_CreateExportCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InternalServerException": + case "com.amazonaws.bcmdataexports#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ServiceQuotaExceededException": + case "com.amazonaws.bcmdataexports#ServiceQuotaExceededException": + throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.bcmdataexports#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.bcmdataexports#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_json1_1DeleteExportCommand + */ +export const de_DeleteExportCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_DeleteExportCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = _json(data); + const response: DeleteExportCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_1DeleteExportCommandError + */ +const de_DeleteExportCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InternalServerException": + case "com.amazonaws.bcmdataexports#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.bcmdataexports#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.bcmdataexports#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.bcmdataexports#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_json1_1GetExecutionCommand + */ +export const de_GetExecutionCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_GetExecutionCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = de_GetExecutionResponse(data, context); + const response: GetExecutionCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_1GetExecutionCommandError + */ +const de_GetExecutionCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InternalServerException": + case "com.amazonaws.bcmdataexports#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.bcmdataexports#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.bcmdataexports#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.bcmdataexports#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_json1_1GetExportCommand + */ +export const de_GetExportCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_GetExportCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = de_GetExportResponse(data, context); + const response: GetExportCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_1GetExportCommandError + */ +const de_GetExportCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InternalServerException": + case "com.amazonaws.bcmdataexports#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.bcmdataexports#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.bcmdataexports#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.bcmdataexports#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_json1_1GetTableCommand + */ +export const de_GetTableCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_GetTableCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = _json(data); + const response: GetTableCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_1GetTableCommandError + */ +const de_GetTableCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InternalServerException": + case "com.amazonaws.bcmdataexports#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.bcmdataexports#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.bcmdataexports#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_json1_1ListExecutionsCommand + */ +export const de_ListExecutionsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_ListExecutionsCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = de_ListExecutionsResponse(data, context); + const response: ListExecutionsCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_1ListExecutionsCommandError + */ +const de_ListExecutionsCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InternalServerException": + case "com.amazonaws.bcmdataexports#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.bcmdataexports#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.bcmdataexports#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.bcmdataexports#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_json1_1ListExportsCommand + */ +export const de_ListExportsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_ListExportsCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = de_ListExportsResponse(data, context); + const response: ListExportsCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_1ListExportsCommandError + */ +const de_ListExportsCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InternalServerException": + case "com.amazonaws.bcmdataexports#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.bcmdataexports#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.bcmdataexports#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_json1_1ListTablesCommand + */ +export const de_ListTablesCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_ListTablesCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = _json(data); + const response: ListTablesCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_1ListTablesCommandError + */ +const de_ListTablesCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InternalServerException": + case "com.amazonaws.bcmdataexports#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.bcmdataexports#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.bcmdataexports#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_json1_1ListTagsForResourceCommand + */ +export const de_ListTagsForResourceCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_ListTagsForResourceCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = _json(data); + const response: ListTagsForResourceCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_1ListTagsForResourceCommandError + */ +const de_ListTagsForResourceCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InternalServerException": + case "com.amazonaws.bcmdataexports#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.bcmdataexports#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.bcmdataexports#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.bcmdataexports#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_json1_1TagResourceCommand + */ +export const de_TagResourceCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_TagResourceCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = _json(data); + const response: TagResourceCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_1TagResourceCommandError + */ +const de_TagResourceCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InternalServerException": + case "com.amazonaws.bcmdataexports#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.bcmdataexports#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.bcmdataexports#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.bcmdataexports#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_json1_1UntagResourceCommand + */ +export const de_UntagResourceCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_UntagResourceCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = _json(data); + const response: UntagResourceCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_1UntagResourceCommandError + */ +const de_UntagResourceCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InternalServerException": + case "com.amazonaws.bcmdataexports#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.bcmdataexports#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.bcmdataexports#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.bcmdataexports#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_json1_1UpdateExportCommand + */ +export const de_UpdateExportCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_UpdateExportCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = _json(data); + const response: UpdateExportCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_1UpdateExportCommandError + */ +const de_UpdateExportCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InternalServerException": + case "com.amazonaws.bcmdataexports#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.bcmdataexports#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.bcmdataexports#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.bcmdataexports#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_json1_1InternalServerExceptionRes + */ +const de_InternalServerExceptionRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = _json(body); + const exception = new InternalServerException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + +/** + * deserializeAws_json1_1ResourceNotFoundExceptionRes + */ +const de_ResourceNotFoundExceptionRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = _json(body); + const exception = new ResourceNotFoundException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + +/** + * deserializeAws_json1_1ServiceQuotaExceededExceptionRes + */ +const de_ServiceQuotaExceededExceptionRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = _json(body); + const exception = new ServiceQuotaExceededException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + +/** + * deserializeAws_json1_1ThrottlingExceptionRes + */ +const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { + const body = parsedOutput.body; + const deserialized: any = _json(body); + const exception = new ThrottlingException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + +/** + * deserializeAws_json1_1ValidationExceptionRes + */ +const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { + const body = parsedOutput.body; + const deserialized: any = _json(body); + const exception = new ValidationException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + +// se_CreateExportRequest omitted. + +// se_DataQuery omitted. + +// se_DeleteExportRequest omitted. + +// se_DestinationConfigurations omitted. + +// se_Export omitted. + +// se_GetExecutionRequest omitted. + +// se_GetExportRequest omitted. + +// se_GetTableRequest omitted. + +// se_ListExecutionsRequest omitted. + +// se_ListExportsRequest omitted. + +// se_ListTablesRequest omitted. + +// se_ListTagsForResourceRequest omitted. + +// se_RefreshCadence omitted. + +// se_ResourceTag omitted. + +// se_ResourceTagKeyList omitted. + +// se_ResourceTagList omitted. + +// se_S3Destination omitted. + +// se_S3OutputConfigurations omitted. + +// se_TableConfigurations omitted. + +// se_TableProperties omitted. + +// se_TagResourceRequest omitted. + +// se_UntagResourceRequest omitted. + +// se_UpdateExportRequest omitted. + +// de_Column omitted. + +// de_ColumnList omitted. + +// de_CreateExportResponse omitted. + +// de_DataQuery omitted. + +// de_DeleteExportResponse omitted. + +// de_DestinationConfigurations omitted. + +/** + * deserializeAws_json1_1ExecutionReference + */ +const de_ExecutionReference = (output: any, context: __SerdeContext): ExecutionReference => { + return take(output, { + ExecutionId: __expectString, + ExecutionStatus: (_: any) => de_ExecutionStatus(_, context), + }) as any; +}; + +/** + * deserializeAws_json1_1ExecutionReferenceList + */ +const de_ExecutionReferenceList = (output: any, context: __SerdeContext): ExecutionReference[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_ExecutionReference(entry, context); + }); + return retVal; +}; + +/** + * deserializeAws_json1_1ExecutionStatus + */ +const de_ExecutionStatus = (output: any, context: __SerdeContext): ExecutionStatus => { + return take(output, { + CompletedAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + CreatedAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + LastUpdatedAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + StatusCode: __expectString, + StatusReason: __expectString, + }) as any; +}; + +// de_Export omitted. + +/** + * deserializeAws_json1_1ExportReference + */ +const de_ExportReference = (output: any, context: __SerdeContext): ExportReference => { + return take(output, { + ExportArn: __expectString, + ExportName: __expectString, + ExportStatus: (_: any) => de_ExportStatus(_, context), + }) as any; +}; + +/** + * deserializeAws_json1_1ExportReferenceList + */ +const de_ExportReferenceList = (output: any, context: __SerdeContext): ExportReference[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_ExportReference(entry, context); + }); + return retVal; +}; + +/** + * deserializeAws_json1_1ExportStatus + */ +const de_ExportStatus = (output: any, context: __SerdeContext): ExportStatus => { + return take(output, { + CreatedAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + LastRefreshedAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + LastUpdatedAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + StatusCode: __expectString, + StatusReason: __expectString, + }) as any; +}; + +// de_GenericStringList omitted. + +/** + * deserializeAws_json1_1GetExecutionResponse + */ +const de_GetExecutionResponse = (output: any, context: __SerdeContext): GetExecutionResponse => { + return take(output, { + ExecutionId: __expectString, + ExecutionStatus: (_: any) => de_ExecutionStatus(_, context), + Export: _json, + }) as any; +}; + +/** + * deserializeAws_json1_1GetExportResponse + */ +const de_GetExportResponse = (output: any, context: __SerdeContext): GetExportResponse => { + return take(output, { + Export: _json, + ExportStatus: (_: any) => de_ExportStatus(_, context), + }) as any; +}; + +// de_GetTableResponse omitted. + +// de_InternalServerException omitted. + +/** + * deserializeAws_json1_1ListExecutionsResponse + */ +const de_ListExecutionsResponse = (output: any, context: __SerdeContext): ListExecutionsResponse => { + return take(output, { + Executions: (_: any) => de_ExecutionReferenceList(_, context), + NextToken: __expectString, + }) as any; +}; + +/** + * deserializeAws_json1_1ListExportsResponse + */ +const de_ListExportsResponse = (output: any, context: __SerdeContext): ListExportsResponse => { + return take(output, { + Exports: (_: any) => de_ExportReferenceList(_, context), + NextToken: __expectString, + }) as any; +}; + +// de_ListTablesResponse omitted. + +// de_ListTagsForResourceResponse omitted. + +// de_RefreshCadence omitted. + +// de_ResourceNotFoundException omitted. + +// de_ResourceTag omitted. + +// de_ResourceTagList omitted. + +// de_S3Destination omitted. + +// de_S3OutputConfigurations omitted. + +// de_ServiceQuotaExceededException omitted. + +// de_Table omitted. + +// de_TableConfigurations omitted. + +// de_TableList omitted. + +// de_TableProperties omitted. + +// de_TablePropertyDescription omitted. + +// de_TablePropertyDescriptionList omitted. + +// de_TagResourceResponse omitted. + +// de_ThrottlingException omitted. + +// de_UntagResourceResponse omitted. + +// de_UpdateExportResponse omitted. + +// de_ValidationException omitted. + +// de_ValidationExceptionField omitted. + +// de_ValidationExceptionFieldList omitted. + +const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ + httpStatusCode: output.statusCode, + requestId: + output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"], + extendedRequestId: output.headers["x-amz-id-2"], + cfId: output.headers["x-amz-cf-id"], +}); + +// Encode Uint8Array data into string with utf-8. +const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => + collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); + +const throwDefaultError = withBaseException(__BaseException); +const buildHttpRpcRequest = async ( + context: __SerdeContext, + headers: __HeaderBag, + path: string, + resolvedHostname: string | undefined, + body: any +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const contents: any = { + protocol, + hostname, + port, + method: "POST", + path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path, + headers, + }; + if (resolvedHostname !== undefined) { + contents.hostname = resolvedHostname; + } + if (body !== undefined) { + contents.body = body; + } + return new __HttpRequest(contents); +}; +function sharedHeaders(operation: string): __HeaderBag { + return { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": `AWSBillingAndCostManagementDataExports.${operation}`, + }; +} + +const parseBody = (streamBody: any, context: __SerdeContext): any => + collectBodyString(streamBody, context).then((encoded) => { + if (encoded.length) { + return JSON.parse(encoded); + } + return {}; + }); + +const parseErrorBody = async (errorBody: any, context: __SerdeContext) => { + const value = await parseBody(errorBody, context); + value.message = value.message ?? value.Message; + return value; +}; + +/** + * Load an error code for the aws.rest-json-1.1 protocol. + */ +const loadRestJsonErrorCode = (output: __HttpResponse, data: any): string | undefined => { + const findKey = (object: any, key: string) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()); + + const sanitizeErrorCode = (rawValue: string | number): string => { + let cleanValue = rawValue; + if (typeof cleanValue === "number") { + cleanValue = cleanValue.toString(); + } + if (cleanValue.indexOf(",") >= 0) { + cleanValue = cleanValue.split(",")[0]; + } + if (cleanValue.indexOf(":") >= 0) { + cleanValue = cleanValue.split(":")[0]; + } + if (cleanValue.indexOf("#") >= 0) { + cleanValue = cleanValue.split("#")[1]; + } + return cleanValue; + }; + + const headerKey = findKey(output.headers, "x-amzn-errortype"); + if (headerKey !== undefined) { + return sanitizeErrorCode(output.headers[headerKey]); + } + + if (data.code !== undefined) { + return sanitizeErrorCode(data.code); + } + + if (data["__type"] !== undefined) { + return sanitizeErrorCode(data["__type"]); + } +}; diff --git a/clients/client-bcm-data-exports/src/runtimeConfig.browser.ts b/clients/client-bcm-data-exports/src/runtimeConfig.browser.ts new file mode 100644 index 000000000000..5ed8102dec34 --- /dev/null +++ b/clients/client-bcm-data-exports/src/runtimeConfig.browser.ts @@ -0,0 +1,44 @@ +// smithy-typescript generated code +// @ts-ignore: package.json will be imported from dist folders +import packageInfo from "../package.json"; // eslint-disable-line + +import { Sha256 } from "@aws-crypto/sha256-browser"; +import { defaultUserAgent } from "@aws-sdk/util-user-agent-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@smithy/config-resolver"; +import { FetchHttpHandler as RequestHandler, streamCollector } from "@smithy/fetch-http-handler"; +import { invalidProvider } from "@smithy/invalid-dependency"; +import { calculateBodyLength } from "@smithy/util-body-length-browser"; +import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@smithy/util-retry"; +import { BCMDataExportsClientConfig } from "./BCMDataExportsClient"; +import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared"; +import { loadConfigsForDefaultMode } from "@smithy/smithy-client"; +import { resolveDefaultsModeConfig } from "@smithy/util-defaults-mode-browser"; + +/** + * @internal + */ +export const getRuntimeConfig = (config: BCMDataExportsClientConfig) => { + const defaultsMode = resolveDefaultsModeConfig(config); + const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode); + const clientSharedValues = getSharedRuntimeConfig(config); + return { + ...clientSharedValues, + ...config, + runtime: "browser", + defaultsMode, + bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength, + credentialDefaultProvider: + config?.credentialDefaultProvider ?? ((_: unknown) => () => Promise.reject(new Error("Credential is missing"))), + defaultUserAgentProvider: + config?.defaultUserAgentProvider ?? + defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), + maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, + region: config?.region ?? invalidProvider("Region is missing"), + requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), + sha256: config?.sha256 ?? Sha256, + streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), + }; +}; diff --git a/clients/client-bcm-data-exports/src/runtimeConfig.native.ts b/clients/client-bcm-data-exports/src/runtimeConfig.native.ts new file mode 100644 index 000000000000..b49058510261 --- /dev/null +++ b/clients/client-bcm-data-exports/src/runtimeConfig.native.ts @@ -0,0 +1,18 @@ +// smithy-typescript generated code +import { Sha256 } from "@aws-crypto/sha256-js"; + +import { BCMDataExportsClientConfig } from "./BCMDataExportsClient"; +import { getRuntimeConfig as getBrowserRuntimeConfig } from "./runtimeConfig.browser"; + +/** + * @internal + */ +export const getRuntimeConfig = (config: BCMDataExportsClientConfig) => { + const browserDefaults = getBrowserRuntimeConfig(config); + return { + ...browserDefaults, + ...config, + runtime: "react-native", + sha256: config?.sha256 ?? Sha256, + }; +}; diff --git a/clients/client-bcm-data-exports/src/runtimeConfig.shared.ts b/clients/client-bcm-data-exports/src/runtimeConfig.shared.ts new file mode 100644 index 000000000000..34bfbc3de9ef --- /dev/null +++ b/clients/client-bcm-data-exports/src/runtimeConfig.shared.ts @@ -0,0 +1,27 @@ +// smithy-typescript generated code +import { NoOpLogger } from "@smithy/smithy-client"; +import { parseUrl } from "@smithy/url-parser"; +import { fromBase64, toBase64 } from "@smithy/util-base64"; +import { fromUtf8, toUtf8 } from "@smithy/util-utf8"; + +import { BCMDataExportsClientConfig } from "./BCMDataExportsClient"; +import { defaultEndpointResolver } from "./endpoint/endpointResolver"; + +/** + * @internal + */ +export const getRuntimeConfig = (config: BCMDataExportsClientConfig) => { + return { + apiVersion: "2023-11-26", + base64Decoder: config?.base64Decoder ?? fromBase64, + base64Encoder: config?.base64Encoder ?? toBase64, + disableHostPrefix: config?.disableHostPrefix ?? false, + endpointProvider: config?.endpointProvider ?? defaultEndpointResolver, + extensions: config?.extensions ?? [], + logger: config?.logger ?? new NoOpLogger(), + serviceId: config?.serviceId ?? "BCM Data Exports", + urlParser: config?.urlParser ?? parseUrl, + utf8Decoder: config?.utf8Decoder ?? fromUtf8, + utf8Encoder: config?.utf8Encoder ?? toUtf8, + }; +}; diff --git a/clients/client-bcm-data-exports/src/runtimeConfig.ts b/clients/client-bcm-data-exports/src/runtimeConfig.ts new file mode 100644 index 000000000000..ad084a6a0c6e --- /dev/null +++ b/clients/client-bcm-data-exports/src/runtimeConfig.ts @@ -0,0 +1,61 @@ +// smithy-typescript generated code +// @ts-ignore: package.json will be imported from dist folders +import packageInfo from "../package.json"; // eslint-disable-line + +import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; +import { emitWarningIfUnsupportedVersion as awsCheckVersion } from "@aws-sdk/core"; +import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; +import { defaultUserAgent } from "@aws-sdk/util-user-agent-node"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@smithy/config-resolver"; +import { Hash } from "@smithy/hash-node"; +import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@smithy/middleware-retry"; +import { loadConfig as loadNodeConfig } from "@smithy/node-config-provider"; +import { NodeHttpHandler as RequestHandler, streamCollector } from "@smithy/node-http-handler"; +import { calculateBodyLength } from "@smithy/util-body-length-node"; +import { DEFAULT_RETRY_MODE } from "@smithy/util-retry"; +import { BCMDataExportsClientConfig } from "./BCMDataExportsClient"; +import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared"; +import { loadConfigsForDefaultMode } from "@smithy/smithy-client"; +import { resolveDefaultsModeConfig } from "@smithy/util-defaults-mode-node"; +import { emitWarningIfUnsupportedVersion } from "@smithy/smithy-client"; + +/** + * @internal + */ +export const getRuntimeConfig = (config: BCMDataExportsClientConfig) => { + emitWarningIfUnsupportedVersion(process.version); + const defaultsMode = resolveDefaultsModeConfig(config); + const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode); + const clientSharedValues = getSharedRuntimeConfig(config); + awsCheckVersion(process.version); + return { + ...clientSharedValues, + ...config, + runtime: "node", + defaultsMode, + bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength, + credentialDefaultProvider: + config?.credentialDefaultProvider ?? decorateDefaultCredentialProvider(credentialDefaultProvider), + defaultUserAgentProvider: + config?.defaultUserAgentProvider ?? + defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), + maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), + region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), + requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + retryMode: + config?.retryMode ?? + loadNodeConfig({ + ...NODE_RETRY_MODE_CONFIG_OPTIONS, + default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE, + }), + sha256: config?.sha256 ?? Hash.bind(null, "sha256"), + streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), + }; +}; diff --git a/clients/client-bcm-data-exports/src/runtimeExtensions.ts b/clients/client-bcm-data-exports/src/runtimeExtensions.ts new file mode 100644 index 000000000000..2ed5484d3fd2 --- /dev/null +++ b/clients/client-bcm-data-exports/src/runtimeExtensions.ts @@ -0,0 +1,45 @@ +// smithy-typescript generated code +import { + getAwsRegionExtensionConfiguration, + resolveAwsRegionExtensionConfiguration, +} from "@aws-sdk/region-config-resolver"; +import { getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig } from "@smithy/protocol-http"; +import { getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig } from "@smithy/smithy-client"; + +import { BCMDataExportsExtensionConfiguration } from "./extensionConfiguration"; + +/** + * @public + */ +export interface RuntimeExtension { + configure(extensionConfiguration: BCMDataExportsExtensionConfiguration): void; +} + +/** + * @public + */ +export interface RuntimeExtensionsConfig { + extensions: RuntimeExtension[]; +} + +const asPartial = >(t: T) => t; + +/** + * @internal + */ +export const resolveRuntimeExtensions = (runtimeConfig: any, extensions: RuntimeExtension[]) => { + const extensionConfiguration: BCMDataExportsExtensionConfiguration = { + ...asPartial(getAwsRegionExtensionConfiguration(runtimeConfig)), + ...asPartial(getDefaultExtensionConfiguration(runtimeConfig)), + ...asPartial(getHttpHandlerExtensionConfiguration(runtimeConfig)), + }; + + extensions.forEach((extension) => extension.configure(extensionConfiguration)); + + return { + ...runtimeConfig, + ...resolveAwsRegionExtensionConfiguration(extensionConfiguration), + ...resolveDefaultRuntimeConfig(extensionConfiguration), + ...resolveHttpHandlerRuntimeConfig(extensionConfiguration), + }; +}; diff --git a/clients/client-bcm-data-exports/tsconfig.cjs.json b/clients/client-bcm-data-exports/tsconfig.cjs.json new file mode 100644 index 000000000000..3567d85ba846 --- /dev/null +++ b/clients/client-bcm-data-exports/tsconfig.cjs.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig", + "compilerOptions": { + "outDir": "dist-cjs" + } +} diff --git a/clients/client-bcm-data-exports/tsconfig.es.json b/clients/client-bcm-data-exports/tsconfig.es.json new file mode 100644 index 000000000000..809f57bde65e --- /dev/null +++ b/clients/client-bcm-data-exports/tsconfig.es.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig", + "compilerOptions": { + "lib": ["dom"], + "module": "esnext", + "outDir": "dist-es" + } +} diff --git a/clients/client-bcm-data-exports/tsconfig.json b/clients/client-bcm-data-exports/tsconfig.json new file mode 100644 index 000000000000..344909de2128 --- /dev/null +++ b/clients/client-bcm-data-exports/tsconfig.json @@ -0,0 +1,13 @@ +{ + "extends": "@tsconfig/node14/tsconfig.json", + "compilerOptions": { + "downlevelIteration": true, + "importHelpers": true, + "incremental": true, + "removeComments": true, + "resolveJsonModule": true, + "rootDir": "src", + "useUnknownInCatchVariables": false + }, + "exclude": ["test/"] +} diff --git a/clients/client-bcm-data-exports/tsconfig.types.json b/clients/client-bcm-data-exports/tsconfig.types.json new file mode 100644 index 000000000000..4c3dfa7b3d25 --- /dev/null +++ b/clients/client-bcm-data-exports/tsconfig.types.json @@ -0,0 +1,10 @@ +{ + "extends": "./tsconfig", + "compilerOptions": { + "removeComments": false, + "declaration": true, + "declarationDir": "dist-types", + "emitDeclarationOnly": true + }, + "exclude": ["test/**/*", "dist-types/**/*"] +} diff --git a/clients/client-bcm-data-exports/typedoc.json b/clients/client-bcm-data-exports/typedoc.json new file mode 100644 index 000000000000..8a364aa93b69 --- /dev/null +++ b/clients/client-bcm-data-exports/typedoc.json @@ -0,0 +1,6 @@ +{ + "extends": ["../../typedoc.client.json"], + "entryPoints": ["src/index.ts"], + "out": "docs", + "readme": "README.md" +} diff --git a/codegen/sdk-codegen/aws-models/bcm-data-exports.json b/codegen/sdk-codegen/aws-models/bcm-data-exports.json new file mode 100644 index 000000000000..d3868e88e4da --- /dev/null +++ b/codegen/sdk-codegen/aws-models/bcm-data-exports.json @@ -0,0 +1,2294 @@ +{ + "smithy": "2.0", + "shapes": { + "com.amazonaws.bcmdataexports#AWSBillingAndCostManagementDataExports": { + "type": "service", + "version": "2023-11-26", + "operations": [ + { + "target": "com.amazonaws.bcmdataexports#CreateExport" + }, + { + "target": "com.amazonaws.bcmdataexports#DeleteExport" + }, + { + "target": "com.amazonaws.bcmdataexports#GetExecution" + }, + { + "target": "com.amazonaws.bcmdataexports#GetExport" + }, + { + "target": "com.amazonaws.bcmdataexports#GetTable" + }, + { + "target": "com.amazonaws.bcmdataexports#ListExecutions" + }, + { + "target": "com.amazonaws.bcmdataexports#ListExports" + }, + { + "target": "com.amazonaws.bcmdataexports#ListTables" + }, + { + "target": "com.amazonaws.bcmdataexports#ListTagsForResource" + }, + { + "target": "com.amazonaws.bcmdataexports#TagResource" + }, + { + "target": "com.amazonaws.bcmdataexports#UntagResource" + }, + { + "target": "com.amazonaws.bcmdataexports#UpdateExport" + } + ], + "traits": { + "aws.api#service": { + "sdkId": "BCM Data Exports", + "arnNamespace": "bcm-data-exports", + "cloudTrailEventSource": "bcm-data-exports.amazonaws.com", + "endpointPrefix": "bcm-data-exports" + }, + "aws.auth#sigv4": { + "name": "bcm-data-exports" + }, + "aws.protocols#awsJson1_1": {}, + "smithy.api#documentation": "

You can use the Data Exports API to create customized exports from multiple Amazon Web Services cost management and billing datasets, such as cost and usage data and cost\n optimization recommendations.

\n

The Data Exports API provides the following endpoint:

\n
    \n
  • \n

    https://bcm-data-exports.us-east-1.api.aws

    \n
  • \n
", + "smithy.api#title": "AWS Billing and Cost Management Data Exports", + "smithy.rules#endpointRuleSet": { + "version": "1.0", + "parameters": { + "Region": { + "builtIn": "AWS::Region", + "required": false, + "documentation": "The AWS region used to dispatch the request.", + "type": "String" + }, + "UseFIPS": { + "builtIn": "AWS::UseFIPS", + "required": true, + "default": false, + "documentation": "When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.", + "type": "Boolean" + }, + "Endpoint": { + "builtIn": "SDK::Endpoint", + "required": false, + "documentation": "Override the endpoint used to send this request", + "type": "String" + } + }, + "rules": [ + { + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "error": "Invalid Configuration: FIPS and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "aws.partition", + "argv": [ + { + "ref": "Region" + } + ], + "assign": "PartitionResult" + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "name" + ] + }, + "aws" + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + }, + true + ] + } + ], + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://bcm-data-exports-fips.{Region}.api.aws", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ], + "type": "tree" + }, + { + "conditions": [], + "endpoint": { + "url": "https://bcm-data-exports.us-east-1.api.aws", + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "bcm-data-exports", + "signingRegion": "us-east-1" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + true, + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsDualStack" + ] + } + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + }, + true + ] + } + ], + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://bcm-data-exports-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ], + "type": "tree" + }, + { + "conditions": [], + "endpoint": { + "url": "https://bcm-data-exports.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + }, + true + ] + } + ], + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://bcm-data-exports-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ], + "type": "tree" + }, + { + "conditions": [], + "endpoint": { + "url": "https://bcm-data-exports.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" + } + ] + }, + "smithy.rules#endpointTests": { + "testCases": [ + { + "documentation": "For region aws-global with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "bcm-data-exports", + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://bcm-data-exports.us-east-1.api.aws" + } + }, + "params": { + "Region": "aws-global", + "UseFIPS": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://bcm-data-exports-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "bcm-data-exports", + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://bcm-data-exports.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://bcm-data-exports-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://bcm-data-exports.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://bcm-data-exports-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://bcm-data-exports.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" + } + } + }, + "com.amazonaws.bcmdataexports#Arn": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 20, + "max": 2048 + }, + "smithy.api#pattern": "^arn:aws[-a-z0-9]*:[-a-z0-9]+:[-a-z0-9]*:[0-9]{12}:[-a-zA-Z0-9/:_]+$" + } + }, + "com.amazonaws.bcmdataexports#Column": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.bcmdataexports#GenericString", + "traits": { + "smithy.api#documentation": "

The column name.

" + } + }, + "Type": { + "target": "com.amazonaws.bcmdataexports#GenericString", + "traits": { + "smithy.api#documentation": "

The kind of data a column stores.

" + } + }, + "Description": { + "target": "com.amazonaws.bcmdataexports#GenericString", + "traits": { + "smithy.api#documentation": "

The description for a column.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Includes basic information for a data column such as its description, name, and\n type.

" + } + }, + "com.amazonaws.bcmdataexports#ColumnList": { + "type": "list", + "member": { + "target": "com.amazonaws.bcmdataexports#Column" + } + }, + "com.amazonaws.bcmdataexports#CompressionOption": { + "type": "enum", + "members": { + "GZIP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GZIP" + } + }, + "PARQUET": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PARQUET" + } + } + } + }, + "com.amazonaws.bcmdataexports#CreateExport": { + "type": "operation", + "input": { + "target": "com.amazonaws.bcmdataexports#CreateExportRequest" + }, + "output": { + "target": "com.amazonaws.bcmdataexports#CreateExportResponse" + }, + "errors": [ + { + "target": "com.amazonaws.bcmdataexports#InternalServerException" + }, + { + "target": "com.amazonaws.bcmdataexports#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.bcmdataexports#ThrottlingException" + }, + { + "target": "com.amazonaws.bcmdataexports#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Creates a data export and specifies the data query, the delivery preference, and any\n optional resource tags.

\n

A DataQuery consists of both a QueryStatement and\n TableConfigurations.

\n

The QueryStatement is an SQL statement. Data Exports only supports a limited\n subset of the SQL syntax. For more information on the SQL syntax that is supported, see Data query. To\n view the available tables and columns, see the Data Exports table\n dictionary.

\n

The TableConfigurations is a collection of specified\n TableProperties for the table being queried in the QueryStatement.\n TableProperties are additional configurations you can provide to change the data and schema of\n a table. Each table can have different TableProperties. However, tables are not required to\n have any TableProperties. Each table property has a default value that it assumes if not\n specified. For more information on table configurations, see Data query. To\n view the table properties available for each table, see the Data Exports table\n dictionary or use the ListTables API to get a response of all tables\n and their available properties.

" + } + }, + "com.amazonaws.bcmdataexports#CreateExportRequest": { + "type": "structure", + "members": { + "Export": { + "target": "com.amazonaws.bcmdataexports#Export", + "traits": { + "smithy.api#documentation": "

The details of the export, including data query, name, description, and destination\n configuration.

", + "smithy.api#required": {} + } + }, + "ResourceTags": { + "target": "com.amazonaws.bcmdataexports#ResourceTagList", + "traits": { + "smithy.api#documentation": "

An optional list of tags to associate with the specified export. Each tag consists of a\n key and a value, and each key must be unique for the resource.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.bcmdataexports#CreateExportResponse": { + "type": "structure", + "members": { + "ExportArn": { + "target": "com.amazonaws.bcmdataexports#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) for this export.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.bcmdataexports#DataQuery": { + "type": "structure", + "members": { + "QueryStatement": { + "target": "com.amazonaws.bcmdataexports#QueryStatement", + "traits": { + "smithy.api#documentation": "

The query statement.

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

The table configuration.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The SQL query of column selections and row filters from the data table you want.

" + } + }, + "com.amazonaws.bcmdataexports#DeleteExport": { + "type": "operation", + "input": { + "target": "com.amazonaws.bcmdataexports#DeleteExportRequest" + }, + "output": { + "target": "com.amazonaws.bcmdataexports#DeleteExportResponse" + }, + "errors": [ + { + "target": "com.amazonaws.bcmdataexports#InternalServerException" + }, + { + "target": "com.amazonaws.bcmdataexports#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.bcmdataexports#ThrottlingException" + }, + { + "target": "com.amazonaws.bcmdataexports#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Deletes an existing data export.

", + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.bcmdataexports#DeleteExportRequest": { + "type": "structure", + "members": { + "ExportArn": { + "target": "com.amazonaws.bcmdataexports#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) for this export.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.bcmdataexports#DeleteExportResponse": { + "type": "structure", + "members": { + "ExportArn": { + "target": "com.amazonaws.bcmdataexports#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) for this export.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.bcmdataexports#DestinationConfigurations": { + "type": "structure", + "members": { + "S3Destination": { + "target": "com.amazonaws.bcmdataexports#S3Destination", + "traits": { + "smithy.api#documentation": "

An object that describes the destination of the data exports file.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The destinations used for data exports.

" + } + }, + "com.amazonaws.bcmdataexports#ExecutionReference": { + "type": "structure", + "members": { + "ExecutionId": { + "target": "com.amazonaws.bcmdataexports#GenericString", + "traits": { + "smithy.api#documentation": "

The ID for this specific execution.

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

The status of this specific execution.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The reference for the data export update.

" + } + }, + "com.amazonaws.bcmdataexports#ExecutionReferenceList": { + "type": "list", + "member": { + "target": "com.amazonaws.bcmdataexports#ExecutionReference" + } + }, + "com.amazonaws.bcmdataexports#ExecutionStatus": { + "type": "structure", + "members": { + "StatusCode": { + "target": "com.amazonaws.bcmdataexports#ExecutionStatusCode", + "traits": { + "smithy.api#documentation": "

The code for the status of the execution.

" + } + }, + "StatusReason": { + "target": "com.amazonaws.bcmdataexports#ExecutionStatusReason", + "traits": { + "smithy.api#documentation": "

The reason for the failed status.

" + } + }, + "CreatedAt": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "

The time when the execution was created.

", + "smithy.api#timestampFormat": "date-time" + } + }, + "CompletedAt": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "

The time when the execution was completed.

", + "smithy.api#timestampFormat": "date-time" + } + }, + "LastUpdatedAt": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "

The time when the execution was last updated.

", + "smithy.api#timestampFormat": "date-time" + } + } + }, + "traits": { + "smithy.api#documentation": "

The status of the execution.

" + } + }, + "com.amazonaws.bcmdataexports#ExecutionStatusCode": { + "type": "enum", + "members": { + "INITIATION_IN_PROCESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INITIATION_IN_PROCESS" + } + }, + "QUERY_QUEUED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "QUERY_QUEUED" + } + }, + "QUERY_IN_PROCESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "QUERY_IN_PROCESS" + } + }, + "QUERY_FAILURE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "QUERY_FAILURE" + } + }, + "DELIVERY_IN_PROCESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DELIVERY_IN_PROCESS" + } + }, + "DELIVERY_SUCCESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DELIVERY_SUCCESS" + } + }, + "DELIVERY_FAILURE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DELIVERY_FAILURE" + } + } + } + }, + "com.amazonaws.bcmdataexports#ExecutionStatusReason": { + "type": "enum", + "members": { + "INSUFFICIENT_PERMISSION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INSUFFICIENT_PERMISSION" + } + }, + "BILL_OWNER_CHANGED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BILL_OWNER_CHANGED" + } + }, + "INTERNAL_FAILURE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INTERNAL_FAILURE" + } + } + } + }, + "com.amazonaws.bcmdataexports#Export": { + "type": "structure", + "members": { + "ExportArn": { + "target": "com.amazonaws.bcmdataexports#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) for this export.

" + } + }, + "Name": { + "target": "com.amazonaws.bcmdataexports#ExportName", + "traits": { + "smithy.api#documentation": "

The name of this specific data export.

", + "smithy.api#required": {} + } + }, + "Description": { + "target": "com.amazonaws.bcmdataexports#GenericString", + "traits": { + "smithy.api#documentation": "

The description for this specific data export.

" + } + }, + "DataQuery": { + "target": "com.amazonaws.bcmdataexports#DataQuery", + "traits": { + "smithy.api#documentation": "

The data query for this specific data export.

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

The destination configuration for this specific data export.

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

The cadence for Amazon Web Services to update the export in your S3 bucket.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The details that are available for an export.

" + } + }, + "com.amazonaws.bcmdataexports#ExportName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 128 + }, + "smithy.api#pattern": "^[0-9A-Za-z!\\-_.*\\'()]+$" + } + }, + "com.amazonaws.bcmdataexports#ExportReference": { + "type": "structure", + "members": { + "ExportArn": { + "target": "com.amazonaws.bcmdataexports#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) for this export.

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

The name of this specific data export.

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

The status of this specific data export.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The reference details for a given export.

" + } + }, + "com.amazonaws.bcmdataexports#ExportReferenceList": { + "type": "list", + "member": { + "target": "com.amazonaws.bcmdataexports#ExportReference" + } + }, + "com.amazonaws.bcmdataexports#ExportStatus": { + "type": "structure", + "members": { + "StatusCode": { + "target": "com.amazonaws.bcmdataexports#ExportStatusCode", + "traits": { + "smithy.api#documentation": "

The status code for the request.

" + } + }, + "StatusReason": { + "target": "com.amazonaws.bcmdataexports#ExecutionStatusReason", + "traits": { + "smithy.api#documentation": "

The description for the status code.

" + } + }, + "CreatedAt": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "

The timestamp of when the export was created.

", + "smithy.api#timestampFormat": "date-time" + } + }, + "LastUpdatedAt": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "

The timestamp of when the export was updated.

", + "smithy.api#timestampFormat": "date-time" + } + }, + "LastRefreshedAt": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "

The timestamp of when the export was last generated.

", + "smithy.api#timestampFormat": "date-time" + } + } + }, + "traits": { + "smithy.api#documentation": "

The status of the data export.

" + } + }, + "com.amazonaws.bcmdataexports#ExportStatusCode": { + "type": "enum", + "members": { + "HEALTHY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "HEALTHY" + } + }, + "UNHEALTHY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "UNHEALTHY" + } + } + } + }, + "com.amazonaws.bcmdataexports#FormatOption": { + "type": "enum", + "members": { + "TEXT_OR_CSV": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TEXT_OR_CSV" + } + }, + "PARQUET": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PARQUET" + } + } + } + }, + "com.amazonaws.bcmdataexports#FrequencyOption": { + "type": "enum", + "members": { + "SYNCHRONOUS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SYNCHRONOUS" + } + } + } + }, + "com.amazonaws.bcmdataexports#GenericString": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 1024 + }, + "smithy.api#pattern": "^[\\S\\s]*$" + } + }, + "com.amazonaws.bcmdataexports#GenericStringList": { + "type": "list", + "member": { + "target": "com.amazonaws.bcmdataexports#GenericString" + } + }, + "com.amazonaws.bcmdataexports#GetExecution": { + "type": "operation", + "input": { + "target": "com.amazonaws.bcmdataexports#GetExecutionRequest" + }, + "output": { + "target": "com.amazonaws.bcmdataexports#GetExecutionResponse" + }, + "errors": [ + { + "target": "com.amazonaws.bcmdataexports#InternalServerException" + }, + { + "target": "com.amazonaws.bcmdataexports#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.bcmdataexports#ThrottlingException" + }, + { + "target": "com.amazonaws.bcmdataexports#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Exports data based on the source data update.

", + "smithy.api#readonly": {} + } + }, + "com.amazonaws.bcmdataexports#GetExecutionRequest": { + "type": "structure", + "members": { + "ExportArn": { + "target": "com.amazonaws.bcmdataexports#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the Export object that generated this specific\n execution.

", + "smithy.api#required": {} + } + }, + "ExecutionId": { + "target": "com.amazonaws.bcmdataexports#GenericString", + "traits": { + "smithy.api#documentation": "

The ID for this specific execution.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.bcmdataexports#GetExecutionResponse": { + "type": "structure", + "members": { + "ExecutionId": { + "target": "com.amazonaws.bcmdataexports#GenericString", + "traits": { + "smithy.api#documentation": "

The ID for this specific execution.

" + } + }, + "Export": { + "target": "com.amazonaws.bcmdataexports#Export", + "traits": { + "smithy.api#documentation": "

The export data for this specific execution. This export data is a snapshot from when the\n execution was generated. The data could be different from the current export data if the\n export was updated since the execution was generated.

" + } + }, + "ExecutionStatus": { + "target": "com.amazonaws.bcmdataexports#ExecutionStatus", + "traits": { + "smithy.api#documentation": "

The status of this specific execution.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.bcmdataexports#GetExport": { + "type": "operation", + "input": { + "target": "com.amazonaws.bcmdataexports#GetExportRequest" + }, + "output": { + "target": "com.amazonaws.bcmdataexports#GetExportResponse" + }, + "errors": [ + { + "target": "com.amazonaws.bcmdataexports#InternalServerException" + }, + { + "target": "com.amazonaws.bcmdataexports#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.bcmdataexports#ThrottlingException" + }, + { + "target": "com.amazonaws.bcmdataexports#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Views the definition of an existing data export.

", + "smithy.api#readonly": {} + } + }, + "com.amazonaws.bcmdataexports#GetExportRequest": { + "type": "structure", + "members": { + "ExportArn": { + "target": "com.amazonaws.bcmdataexports#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) for this export.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.bcmdataexports#GetExportResponse": { + "type": "structure", + "members": { + "Export": { + "target": "com.amazonaws.bcmdataexports#Export", + "traits": { + "smithy.api#documentation": "

The data for this specific export.

" + } + }, + "ExportStatus": { + "target": "com.amazonaws.bcmdataexports#ExportStatus", + "traits": { + "smithy.api#documentation": "

The status of this specific export.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.bcmdataexports#GetTable": { + "type": "operation", + "input": { + "target": "com.amazonaws.bcmdataexports#GetTableRequest" + }, + "output": { + "target": "com.amazonaws.bcmdataexports#GetTableResponse" + }, + "errors": [ + { + "target": "com.amazonaws.bcmdataexports#InternalServerException" + }, + { + "target": "com.amazonaws.bcmdataexports#ThrottlingException" + }, + { + "target": "com.amazonaws.bcmdataexports#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Returns the metadata for the specified table and table properties. This includes the list\n of columns in the table schema, their data types, and column descriptions.

", + "smithy.api#readonly": {} + } + }, + "com.amazonaws.bcmdataexports#GetTableRequest": { + "type": "structure", + "members": { + "TableName": { + "target": "com.amazonaws.bcmdataexports#TableName", + "traits": { + "smithy.api#documentation": "

The name of the table.

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

TableProperties are additional configurations you can provide to change the data and\n schema of a table. Each table can have different TableProperties. Tables are not required to\n have any TableProperties. Each table property has a default value that it assumes if not\n specified.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.bcmdataexports#GetTableResponse": { + "type": "structure", + "members": { + "TableName": { + "target": "com.amazonaws.bcmdataexports#TableName", + "traits": { + "smithy.api#documentation": "

The name of the table.

" + } + }, + "Description": { + "target": "com.amazonaws.bcmdataexports#GenericString", + "traits": { + "smithy.api#documentation": "

The table description.

" + } + }, + "TableProperties": { + "target": "com.amazonaws.bcmdataexports#TableProperties", + "traits": { + "smithy.api#documentation": "

TableProperties are additional configurations you can provide to change the data and\n schema of a table. Each table can have different TableProperties. Tables are not required to\n have any TableProperties. Each table property has a default value that it assumes if not\n specified.

" + } + }, + "Schema": { + "target": "com.amazonaws.bcmdataexports#ColumnList", + "traits": { + "smithy.api#documentation": "

The schema of the table.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.bcmdataexports#InternalServerException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.bcmdataexports#GenericString", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

An error on the server occurred during the processing of your request. Try again\n later.

", + "smithy.api#error": "server", + "smithy.api#httpError": 500 + } + }, + "com.amazonaws.bcmdataexports#ListExecutions": { + "type": "operation", + "input": { + "target": "com.amazonaws.bcmdataexports#ListExecutionsRequest" + }, + "output": { + "target": "com.amazonaws.bcmdataexports#ListExecutionsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.bcmdataexports#InternalServerException" + }, + { + "target": "com.amazonaws.bcmdataexports#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.bcmdataexports#ThrottlingException" + }, + { + "target": "com.amazonaws.bcmdataexports#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Lists the historical executions for the export.

", + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "pageSize": "MaxResults", + "items": "Executions" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.bcmdataexports#ListExecutionsRequest": { + "type": "structure", + "members": { + "ExportArn": { + "target": "com.amazonaws.bcmdataexports#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) for this export.

", + "smithy.api#required": {} + } + }, + "MaxResults": { + "target": "com.amazonaws.bcmdataexports#MaxResults", + "traits": { + "smithy.api#default": null, + "smithy.api#documentation": "

The maximum number of objects that are returned for the request.

" + } + }, + "NextToken": { + "target": "com.amazonaws.bcmdataexports#NextPageToken", + "traits": { + "smithy.api#documentation": "

The token to retrieve the next set of results.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.bcmdataexports#ListExecutionsResponse": { + "type": "structure", + "members": { + "Executions": { + "target": "com.amazonaws.bcmdataexports#ExecutionReferenceList", + "traits": { + "smithy.api#documentation": "

The list of executions.

" + } + }, + "NextToken": { + "target": "com.amazonaws.bcmdataexports#NextPageToken", + "traits": { + "smithy.api#documentation": "

The token to retrieve the next set of results.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.bcmdataexports#ListExports": { + "type": "operation", + "input": { + "target": "com.amazonaws.bcmdataexports#ListExportsRequest" + }, + "output": { + "target": "com.amazonaws.bcmdataexports#ListExportsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.bcmdataexports#InternalServerException" + }, + { + "target": "com.amazonaws.bcmdataexports#ThrottlingException" + }, + { + "target": "com.amazonaws.bcmdataexports#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Lists all data export definitions.

", + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "pageSize": "MaxResults", + "items": "Exports" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.bcmdataexports#ListExportsRequest": { + "type": "structure", + "members": { + "MaxResults": { + "target": "com.amazonaws.bcmdataexports#MaxResults", + "traits": { + "smithy.api#default": null, + "smithy.api#documentation": "

The maximum number of objects that are returned for the request.

" + } + }, + "NextToken": { + "target": "com.amazonaws.bcmdataexports#NextPageToken", + "traits": { + "smithy.api#documentation": "

The token to retrieve the next set of results.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.bcmdataexports#ListExportsResponse": { + "type": "structure", + "members": { + "Exports": { + "target": "com.amazonaws.bcmdataexports#ExportReferenceList", + "traits": { + "smithy.api#documentation": "

The details of the exports, including name and export status.

" + } + }, + "NextToken": { + "target": "com.amazonaws.bcmdataexports#NextPageToken", + "traits": { + "smithy.api#documentation": "

The token to retrieve the next set of results.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.bcmdataexports#ListTables": { + "type": "operation", + "input": { + "target": "com.amazonaws.bcmdataexports#ListTablesRequest" + }, + "output": { + "target": "com.amazonaws.bcmdataexports#ListTablesResponse" + }, + "errors": [ + { + "target": "com.amazonaws.bcmdataexports#InternalServerException" + }, + { + "target": "com.amazonaws.bcmdataexports#ThrottlingException" + }, + { + "target": "com.amazonaws.bcmdataexports#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Lists all available tables in data exports.

", + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "pageSize": "MaxResults", + "items": "Tables" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.bcmdataexports#ListTablesRequest": { + "type": "structure", + "members": { + "NextToken": { + "target": "com.amazonaws.bcmdataexports#NextPageToken", + "traits": { + "smithy.api#documentation": "

The token to retrieve the next set of results.

" + } + }, + "MaxResults": { + "target": "com.amazonaws.bcmdataexports#MaxResults", + "traits": { + "smithy.api#default": null, + "smithy.api#documentation": "

The maximum number of objects that are returned for the request.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.bcmdataexports#ListTablesResponse": { + "type": "structure", + "members": { + "Tables": { + "target": "com.amazonaws.bcmdataexports#TableList", + "traits": { + "smithy.api#documentation": "

The list of tables.

" + } + }, + "NextToken": { + "target": "com.amazonaws.bcmdataexports#NextPageToken", + "traits": { + "smithy.api#documentation": "

The token to retrieve the next set of results.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.bcmdataexports#ListTagsForResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.bcmdataexports#ListTagsForResourceRequest" + }, + "output": { + "target": "com.amazonaws.bcmdataexports#ListTagsForResourceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.bcmdataexports#InternalServerException" + }, + { + "target": "com.amazonaws.bcmdataexports#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.bcmdataexports#ThrottlingException" + }, + { + "target": "com.amazonaws.bcmdataexports#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

List tags associated with an existing data export.

", + "smithy.api#readonly": {} + } + }, + "com.amazonaws.bcmdataexports#ListTagsForResourceRequest": { + "type": "structure", + "members": { + "ResourceArn": { + "target": "com.amazonaws.bcmdataexports#Arn", + "traits": { + "smithy.api#documentation": "

The unique identifier for the resource.

", + "smithy.api#required": {} + } + }, + "MaxResults": { + "target": "com.amazonaws.bcmdataexports#MaxResults", + "traits": { + "smithy.api#default": null, + "smithy.api#documentation": "

The maximum number of objects that are returned for the request.

" + } + }, + "NextToken": { + "target": "com.amazonaws.bcmdataexports#NextPageToken", + "traits": { + "smithy.api#documentation": "

The token to retrieve the next set of results.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.bcmdataexports#ListTagsForResourceResponse": { + "type": "structure", + "members": { + "ResourceTags": { + "target": "com.amazonaws.bcmdataexports#ResourceTagList", + "traits": { + "smithy.api#documentation": "

An optional list of tags to associate with the specified export. Each tag consists of a\n key and a value, and each key must be unique for the resource.

" + } + }, + "NextToken": { + "target": "com.amazonaws.bcmdataexports#NextPageToken", + "traits": { + "smithy.api#documentation": "

The token to retrieve the next set of results.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.bcmdataexports#MaxResults": { + "type": "integer", + "traits": { + "smithy.api#range": { + "min": 1 + } + } + }, + "com.amazonaws.bcmdataexports#NextPageToken": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 8192 + }, + "smithy.api#pattern": "^[\\S\\s]*$" + } + }, + "com.amazonaws.bcmdataexports#OverwriteOption": { + "type": "enum", + "members": { + "CREATE_NEW_REPORT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CREATE_NEW_REPORT" + } + }, + "OVERWRITE_REPORT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "OVERWRITE_REPORT" + } + } + } + }, + "com.amazonaws.bcmdataexports#QueryStatement": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 36000 + }, + "smithy.api#pattern": "^[\\S\\s]*$" + } + }, + "com.amazonaws.bcmdataexports#RefreshCadence": { + "type": "structure", + "members": { + "Frequency": { + "target": "com.amazonaws.bcmdataexports#FrequencyOption", + "traits": { + "smithy.api#documentation": "

The frequency that data exports are updated. The export refreshes each time the source\n data updates, up to three times daily.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The cadence for Amazon Web Services to update the data export in your S3 bucket.

" + } + }, + "com.amazonaws.bcmdataexports#ResourceNotFoundException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.bcmdataexports#GenericString", + "traits": { + "smithy.api#required": {} + } + }, + "ResourceId": { + "target": "com.amazonaws.bcmdataexports#GenericString", + "traits": { + "smithy.api#documentation": "

The identifier of the resource that was not found.

", + "smithy.api#required": {} + } + }, + "ResourceType": { + "target": "com.amazonaws.bcmdataexports#GenericString", + "traits": { + "smithy.api#documentation": "

The type of the resource that was not found.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The specified Amazon Resource Name (ARN) in the request doesn't exist.

", + "smithy.api#error": "client", + "smithy.api#httpError": 404 + } + }, + "com.amazonaws.bcmdataexports#ResourceTag": { + "type": "structure", + "members": { + "Key": { + "target": "com.amazonaws.bcmdataexports#ResourceTagKey", + "traits": { + "smithy.api#documentation": "

The key that's associated with the tag.

", + "smithy.api#required": {} + } + }, + "Value": { + "target": "com.amazonaws.bcmdataexports#ResourceTagValue", + "traits": { + "smithy.api#documentation": "

The value that's associated with the tag.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The tag structure that contains a tag key and value.

" + } + }, + "com.amazonaws.bcmdataexports#ResourceTagKey": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 128 + } + } + }, + "com.amazonaws.bcmdataexports#ResourceTagKeyList": { + "type": "list", + "member": { + "target": "com.amazonaws.bcmdataexports#ResourceTagKey" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 200 + } + } + }, + "com.amazonaws.bcmdataexports#ResourceTagList": { + "type": "list", + "member": { + "target": "com.amazonaws.bcmdataexports#ResourceTag" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 200 + } + } + }, + "com.amazonaws.bcmdataexports#ResourceTagValue": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 256 + } + } + }, + "com.amazonaws.bcmdataexports#S3Destination": { + "type": "structure", + "members": { + "S3Bucket": { + "target": "com.amazonaws.bcmdataexports#GenericString", + "traits": { + "smithy.api#documentation": "

The name of the Amazon S3 bucket used as the destination of a data export file.

", + "smithy.api#required": {} + } + }, + "S3Prefix": { + "target": "com.amazonaws.bcmdataexports#GenericString", + "traits": { + "smithy.api#documentation": "

The S3 path prefix you want prepended to the name of your data export.

", + "smithy.api#required": {} + } + }, + "S3Region": { + "target": "com.amazonaws.bcmdataexports#GenericString", + "traits": { + "smithy.api#documentation": "

The S3 bucket Region.

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

The output configuration for the data export.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Describes the destination Amazon Simple Storage Service (Amazon S3) bucket name and object\n keys of a data exports file.

" + } + }, + "com.amazonaws.bcmdataexports#S3OutputConfigurations": { + "type": "structure", + "members": { + "OutputType": { + "target": "com.amazonaws.bcmdataexports#S3OutputType", + "traits": { + "smithy.api#documentation": "

The output type for the data export.

", + "smithy.api#required": {} + } + }, + "Format": { + "target": "com.amazonaws.bcmdataexports#FormatOption", + "traits": { + "smithy.api#documentation": "

The file format for the data export.

", + "smithy.api#required": {} + } + }, + "Compression": { + "target": "com.amazonaws.bcmdataexports#CompressionOption", + "traits": { + "smithy.api#documentation": "

The compression type for the data export.

", + "smithy.api#required": {} + } + }, + "Overwrite": { + "target": "com.amazonaws.bcmdataexports#OverwriteOption", + "traits": { + "smithy.api#documentation": "

The rule to follow when generating a version of the data export file. You have the choice\n to overwrite the previous version or to be delivered in addition to the previous versions.\n Overwriting exports can save on Amazon S3 storage costs. Creating new export versions allows\n you to track the changes in cost and usage data over time.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The compression type, file format, and overwrite preference for the data export.

" + } + }, + "com.amazonaws.bcmdataexports#S3OutputType": { + "type": "enum", + "members": { + "CUSTOM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CUSTOM" + } + } + } + }, + "com.amazonaws.bcmdataexports#ServiceQuotaExceededException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.bcmdataexports#GenericString", + "traits": { + "smithy.api#required": {} + } + }, + "ResourceId": { + "target": "com.amazonaws.bcmdataexports#GenericString", + "traits": { + "smithy.api#documentation": "

The identifier of the resource that exceeded quota.

" + } + }, + "ResourceType": { + "target": "com.amazonaws.bcmdataexports#GenericString", + "traits": { + "smithy.api#documentation": "

The type of the resource that exceeded quota.

" + } + }, + "QuotaCode": { + "target": "com.amazonaws.bcmdataexports#GenericString", + "traits": { + "smithy.api#documentation": "

The quota code that was exceeded.

", + "smithy.api#required": {} + } + }, + "ServiceCode": { + "target": "com.amazonaws.bcmdataexports#GenericString", + "traits": { + "smithy.api#documentation": "

The service code that exceeded quota. It will always be\n “AWSBillingAndCostManagementDataExports”.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

You've reached the limit on the number of resources you can create, or exceeded the size\n of an individual resource.

", + "smithy.api#error": "client", + "smithy.api#httpError": 402 + } + }, + "com.amazonaws.bcmdataexports#Table": { + "type": "structure", + "members": { + "TableName": { + "target": "com.amazonaws.bcmdataexports#TableName", + "traits": { + "smithy.api#documentation": "

The name of the table.

" + } + }, + "Description": { + "target": "com.amazonaws.bcmdataexports#GenericString", + "traits": { + "smithy.api#documentation": "

The description for the table.

" + } + }, + "TableProperties": { + "target": "com.amazonaws.bcmdataexports#TablePropertyDescriptionList", + "traits": { + "smithy.api#documentation": "

The properties for the table.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The details for the data export table.

" + } + }, + "com.amazonaws.bcmdataexports#TableConfigurations": { + "type": "map", + "key": { + "target": "com.amazonaws.bcmdataexports#TableName" + }, + "value": { + "target": "com.amazonaws.bcmdataexports#TableProperties" + } + }, + "com.amazonaws.bcmdataexports#TableList": { + "type": "list", + "member": { + "target": "com.amazonaws.bcmdataexports#Table" + } + }, + "com.amazonaws.bcmdataexports#TableName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 1024 + }, + "smithy.api#pattern": "^[\\S\\s]*$" + } + }, + "com.amazonaws.bcmdataexports#TableProperties": { + "type": "map", + "key": { + "target": "com.amazonaws.bcmdataexports#TableProperty" + }, + "value": { + "target": "com.amazonaws.bcmdataexports#GenericString" + } + }, + "com.amazonaws.bcmdataexports#TableProperty": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 1024 + }, + "smithy.api#pattern": "^[\\S\\s]*$" + } + }, + "com.amazonaws.bcmdataexports#TablePropertyDescription": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.bcmdataexports#GenericString", + "traits": { + "smithy.api#documentation": "

The name of the table.

" + } + }, + "ValidValues": { + "target": "com.amazonaws.bcmdataexports#GenericStringList", + "traits": { + "smithy.api#documentation": "

The valid values for the table.

" + } + }, + "DefaultValue": { + "target": "com.amazonaws.bcmdataexports#GenericString", + "traits": { + "smithy.api#documentation": "

The default value for the table.

" + } + }, + "Description": { + "target": "com.amazonaws.bcmdataexports#GenericString", + "traits": { + "smithy.api#documentation": "

The description for the table.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The properties for the data export table.

" + } + }, + "com.amazonaws.bcmdataexports#TablePropertyDescriptionList": { + "type": "list", + "member": { + "target": "com.amazonaws.bcmdataexports#TablePropertyDescription" + } + }, + "com.amazonaws.bcmdataexports#TagResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.bcmdataexports#TagResourceRequest" + }, + "output": { + "target": "com.amazonaws.bcmdataexports#TagResourceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.bcmdataexports#InternalServerException" + }, + { + "target": "com.amazonaws.bcmdataexports#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.bcmdataexports#ThrottlingException" + }, + { + "target": "com.amazonaws.bcmdataexports#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Adds tags for an existing data export definition.

" + } + }, + "com.amazonaws.bcmdataexports#TagResourceRequest": { + "type": "structure", + "members": { + "ResourceArn": { + "target": "com.amazonaws.bcmdataexports#Arn", + "traits": { + "smithy.api#documentation": "

The unique identifier for the resource.

", + "smithy.api#required": {} + } + }, + "ResourceTags": { + "target": "com.amazonaws.bcmdataexports#ResourceTagList", + "traits": { + "smithy.api#documentation": "

The tags to associate with the resource. Each tag consists of a key and a value, and each\n key must be unique for the resource.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.bcmdataexports#TagResourceResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.bcmdataexports#ThrottlingException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.bcmdataexports#GenericString", + "traits": { + "smithy.api#required": {} + } + }, + "QuotaCode": { + "target": "com.amazonaws.bcmdataexports#GenericString", + "traits": { + "smithy.api#documentation": "

The quota code that exceeded the throttling limit.

" + } + }, + "ServiceCode": { + "target": "com.amazonaws.bcmdataexports#GenericString", + "traits": { + "smithy.api#documentation": "

The service code that exceeded the throttling limit. It will always be\n “AWSBillingAndCostManagementDataExports”.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The request was denied due to request throttling.

", + "smithy.api#error": "client", + "smithy.api#httpError": 429 + } + }, + "com.amazonaws.bcmdataexports#UntagResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.bcmdataexports#UntagResourceRequest" + }, + "output": { + "target": "com.amazonaws.bcmdataexports#UntagResourceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.bcmdataexports#InternalServerException" + }, + { + "target": "com.amazonaws.bcmdataexports#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.bcmdataexports#ThrottlingException" + }, + { + "target": "com.amazonaws.bcmdataexports#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Deletes tags associated with an existing data export definition.

" + } + }, + "com.amazonaws.bcmdataexports#UntagResourceRequest": { + "type": "structure", + "members": { + "ResourceArn": { + "target": "com.amazonaws.bcmdataexports#Arn", + "traits": { + "smithy.api#documentation": "

The unique identifier for the resource.

", + "smithy.api#required": {} + } + }, + "ResourceTagKeys": { + "target": "com.amazonaws.bcmdataexports#ResourceTagKeyList", + "traits": { + "smithy.api#documentation": "

The tag keys that are associated with the resource ARN.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.bcmdataexports#UntagResourceResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.bcmdataexports#UpdateExport": { + "type": "operation", + "input": { + "target": "com.amazonaws.bcmdataexports#UpdateExportRequest" + }, + "output": { + "target": "com.amazonaws.bcmdataexports#UpdateExportResponse" + }, + "errors": [ + { + "target": "com.amazonaws.bcmdataexports#InternalServerException" + }, + { + "target": "com.amazonaws.bcmdataexports#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.bcmdataexports#ThrottlingException" + }, + { + "target": "com.amazonaws.bcmdataexports#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Updates an existing data export by overwriting all export parameters. All export\n parameters must be provided in the UpdateExport request.

" + } + }, + "com.amazonaws.bcmdataexports#UpdateExportRequest": { + "type": "structure", + "members": { + "ExportArn": { + "target": "com.amazonaws.bcmdataexports#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) for this export.

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

The name and query details for the export.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.bcmdataexports#UpdateExportResponse": { + "type": "structure", + "members": { + "ExportArn": { + "target": "com.amazonaws.bcmdataexports#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) for this export.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.bcmdataexports#ValidationException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.bcmdataexports#GenericString", + "traits": { + "smithy.api#required": {} + } + }, + "Reason": { + "target": "com.amazonaws.bcmdataexports#ValidationExceptionReason", + "traits": { + "smithy.api#documentation": "

The reason for the validation exception.

" + } + }, + "Fields": { + "target": "com.amazonaws.bcmdataexports#ValidationExceptionFieldList", + "traits": { + "smithy.api#documentation": "

The list of fields that are invalid.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The input fails to satisfy the constraints specified by an Amazon Web Services\n service.

", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.bcmdataexports#ValidationExceptionField": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.bcmdataexports#GenericString", + "traits": { + "smithy.api#documentation": "

The field name where the invalid entry was detected.

", + "smithy.api#required": {} + } + }, + "Message": { + "target": "com.amazonaws.bcmdataexports#GenericString", + "traits": { + "smithy.api#documentation": "

A message with the reason for the validation exception error.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The input failed to meet the constraints specified by the Amazon Web Services service in a\n specified field.

" + } + }, + "com.amazonaws.bcmdataexports#ValidationExceptionFieldList": { + "type": "list", + "member": { + "target": "com.amazonaws.bcmdataexports#ValidationExceptionField" + } + }, + "com.amazonaws.bcmdataexports#ValidationExceptionReason": { + "type": "enum", + "members": { + "UNKNOWN_OPERATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "unknownOperation" + } + }, + "CANNOT_PARSE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cannotParse" + } + }, + "FIELD_VALIDATION_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "fieldValidationFailed" + } + }, + "OTHER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "other" + } + } + } + } + } +}