From 85d1ace73cf6e086d1a01ce94fe65bc8edc3ad5b Mon Sep 17 00:00:00 2001 From: awstools Date: Thu, 30 Nov 2023 01:18:28 +0000 Subject: [PATCH] feat(client-marketplace-agreement): The AWS Marketplace Agreement Service provides an API interface that helps AWS Marketplace sellers manage their agreements, including listing, filtering, and viewing details about their agreements. --- .../client-marketplace-agreement/.gitignore | 9 + clients/client-marketplace-agreement/LICENSE | 201 ++ .../client-marketplace-agreement/README.md | 249 ++ .../api-extractor.json | 4 + .../client-marketplace-agreement/package.json | 102 + .../src/MarketplaceAgreement.ts | 106 + .../src/MarketplaceAgreementClient.ts | 317 +++ .../src/commands/DescribeAgreementCommand.ts | 182 ++ .../src/commands/GetAgreementTermsCommand.ts | 305 +++ .../src/commands/SearchAgreementsCommand.ts | 283 ++ .../src/commands/index.ts | 4 + .../src/endpoint/EndpointParameters.ts | 34 + .../src/endpoint/endpointResolver.ts | 16 + .../src/endpoint/ruleset.ts | 32 + .../src/extensionConfiguration.ts | 12 + .../client-marketplace-agreement/src/index.ts | 39 + .../MarketplaceAgreementServiceException.ts | 22 + .../src/models/index.ts | 2 + .../src/models/models_0.ts | 1561 +++++++++++ .../pagination/GetAgreementTermsPaginator.ts | 50 + .../src/pagination/Interfaces.ts | 11 + .../pagination/SearchAgreementsPaginator.ts | 50 + .../src/pagination/index.ts | 4 + .../src/protocols/Aws_json1_0.ts | 700 +++++ .../src/runtimeConfig.browser.ts | 44 + .../src/runtimeConfig.native.ts | 18 + .../src/runtimeConfig.shared.ts | 27 + .../src/runtimeConfig.ts | 61 + .../src/runtimeExtensions.ts | 45 + .../tsconfig.cjs.json | 6 + .../tsconfig.es.json | 8 + .../tsconfig.json | 13 + .../tsconfig.types.json | 10 + .../client-marketplace-agreement/typedoc.json | 6 + .../aws-models/marketplace-agreement.json | 2328 +++++++++++++++++ 35 files changed, 6861 insertions(+) create mode 100644 clients/client-marketplace-agreement/.gitignore create mode 100644 clients/client-marketplace-agreement/LICENSE create mode 100644 clients/client-marketplace-agreement/README.md create mode 100644 clients/client-marketplace-agreement/api-extractor.json create mode 100644 clients/client-marketplace-agreement/package.json create mode 100644 clients/client-marketplace-agreement/src/MarketplaceAgreement.ts create mode 100644 clients/client-marketplace-agreement/src/MarketplaceAgreementClient.ts create mode 100644 clients/client-marketplace-agreement/src/commands/DescribeAgreementCommand.ts create mode 100644 clients/client-marketplace-agreement/src/commands/GetAgreementTermsCommand.ts create mode 100644 clients/client-marketplace-agreement/src/commands/SearchAgreementsCommand.ts create mode 100644 clients/client-marketplace-agreement/src/commands/index.ts create mode 100644 clients/client-marketplace-agreement/src/endpoint/EndpointParameters.ts create mode 100644 clients/client-marketplace-agreement/src/endpoint/endpointResolver.ts create mode 100644 clients/client-marketplace-agreement/src/endpoint/ruleset.ts create mode 100644 clients/client-marketplace-agreement/src/extensionConfiguration.ts create mode 100644 clients/client-marketplace-agreement/src/index.ts create mode 100644 clients/client-marketplace-agreement/src/models/MarketplaceAgreementServiceException.ts create mode 100644 clients/client-marketplace-agreement/src/models/index.ts create mode 100644 clients/client-marketplace-agreement/src/models/models_0.ts create mode 100644 clients/client-marketplace-agreement/src/pagination/GetAgreementTermsPaginator.ts create mode 100644 clients/client-marketplace-agreement/src/pagination/Interfaces.ts create mode 100644 clients/client-marketplace-agreement/src/pagination/SearchAgreementsPaginator.ts create mode 100644 clients/client-marketplace-agreement/src/pagination/index.ts create mode 100644 clients/client-marketplace-agreement/src/protocols/Aws_json1_0.ts create mode 100644 clients/client-marketplace-agreement/src/runtimeConfig.browser.ts create mode 100644 clients/client-marketplace-agreement/src/runtimeConfig.native.ts create mode 100644 clients/client-marketplace-agreement/src/runtimeConfig.shared.ts create mode 100644 clients/client-marketplace-agreement/src/runtimeConfig.ts create mode 100644 clients/client-marketplace-agreement/src/runtimeExtensions.ts create mode 100644 clients/client-marketplace-agreement/tsconfig.cjs.json create mode 100644 clients/client-marketplace-agreement/tsconfig.es.json create mode 100644 clients/client-marketplace-agreement/tsconfig.json create mode 100644 clients/client-marketplace-agreement/tsconfig.types.json create mode 100644 clients/client-marketplace-agreement/typedoc.json create mode 100644 codegen/sdk-codegen/aws-models/marketplace-agreement.json diff --git a/clients/client-marketplace-agreement/.gitignore b/clients/client-marketplace-agreement/.gitignore new file mode 100644 index 000000000000..54f14c9aef25 --- /dev/null +++ b/clients/client-marketplace-agreement/.gitignore @@ -0,0 +1,9 @@ +/node_modules/ +/build/ +/coverage/ +/docs/ +/dist-* +*.tsbuildinfo +*.tgz +*.log +package-lock.json diff --git a/clients/client-marketplace-agreement/LICENSE b/clients/client-marketplace-agreement/LICENSE new file mode 100644 index 000000000000..5001cd317c44 --- /dev/null +++ b/clients/client-marketplace-agreement/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-marketplace-agreement/README.md b/clients/client-marketplace-agreement/README.md new file mode 100644 index 000000000000..57c921e54782 --- /dev/null +++ b/clients/client-marketplace-agreement/README.md @@ -0,0 +1,249 @@ + + +# @aws-sdk/client-marketplace-agreement + +## Description + +AWS SDK for JavaScript MarketplaceAgreement Client for Node.js, Browser and React Native. + +

AWS Marketplace is a curated digital catalog that customers can use to find, buy, deploy, and manage third-party software, data, and services to build solutions and run their businesses. The AWS Marketplace Agreement Service provides an API interface that helps AWS Marketplace sellers manage their product-related agreements, including listing, searching, and filtering agreements.

+

To manage agreements in AWS Marketplace, you must ensure that your AWS Identity and +Access Management (IAM) policies and roles are set up. The user must have the required +policies/permissions that allow them to carry out the actions in AWS:

+ + +## Installing + +To install the this package, simply type add or install @aws-sdk/client-marketplace-agreement +using your favorite package manager: + +- `npm install @aws-sdk/client-marketplace-agreement` +- `yarn add @aws-sdk/client-marketplace-agreement` +- `pnpm add @aws-sdk/client-marketplace-agreement` + +## Getting Started + +### Import + +The AWS SDK is modulized by clients and commands. +To send a request, you only need to import the `MarketplaceAgreementClient` and +the commands you need, for example `DescribeAgreementCommand`: + +```js +// ES5 example +const { MarketplaceAgreementClient, DescribeAgreementCommand } = require("@aws-sdk/client-marketplace-agreement"); +``` + +```ts +// ES6+ example +import { MarketplaceAgreementClient, DescribeAgreementCommand } from "@aws-sdk/client-marketplace-agreement"; +``` + +### 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 MarketplaceAgreementClient({ region: "REGION" }); + +const params = { + /** input parameters */ +}; +const command = new DescribeAgreementCommand(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-marketplace-agreement"; +const client = new AWS.MarketplaceAgreement({ region: "REGION" }); + +// async/await. +try { + const data = await client.describeAgreement(params); + // process data. +} catch (error) { + // error handling. +} + +// Promises. +client + .describeAgreement(params) + .then((data) => { + // process data. + }) + .catch((error) => { + // error handling. + }); + +// callbacks. +client.describeAgreement(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-marketplace-agreement` 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) + +
+ +DescribeAgreement + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/marketplace-agreement/command/DescribeAgreementCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-marketplace-agreement/Interface/DescribeAgreementCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-marketplace-agreement/Interface/DescribeAgreementCommandOutput/) + +
+
+ +GetAgreementTerms + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/marketplace-agreement/command/GetAgreementTermsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-marketplace-agreement/Interface/GetAgreementTermsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-marketplace-agreement/Interface/GetAgreementTermsCommandOutput/) + +
+
+ +SearchAgreements + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/marketplace-agreement/command/SearchAgreementsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-marketplace-agreement/Interface/SearchAgreementsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-marketplace-agreement/Interface/SearchAgreementsCommandOutput/) + +
diff --git a/clients/client-marketplace-agreement/api-extractor.json b/clients/client-marketplace-agreement/api-extractor.json new file mode 100644 index 000000000000..d5bf5ffeee85 --- /dev/null +++ b/clients/client-marketplace-agreement/api-extractor.json @@ -0,0 +1,4 @@ +{ + "extends": "../../api-extractor.json", + "mainEntryPointFilePath": "/dist-types/index.d.ts" +} diff --git a/clients/client-marketplace-agreement/package.json b/clients/client-marketplace-agreement/package.json new file mode 100644 index 000000000000..ac56c727aeb7 --- /dev/null +++ b/clients/client-marketplace-agreement/package.json @@ -0,0 +1,102 @@ +{ + "name": "@aws-sdk/client-marketplace-agreement", + "description": "AWS SDK for JavaScript Marketplace Agreement 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 marketplace-agreement" + }, + "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-marketplace-agreement", + "repository": { + "type": "git", + "url": "https://github.com/aws/aws-sdk-js-v3.git", + "directory": "clients/client-marketplace-agreement" + } +} diff --git a/clients/client-marketplace-agreement/src/MarketplaceAgreement.ts b/clients/client-marketplace-agreement/src/MarketplaceAgreement.ts new file mode 100644 index 000000000000..c85f06a86bcb --- /dev/null +++ b/clients/client-marketplace-agreement/src/MarketplaceAgreement.ts @@ -0,0 +1,106 @@ +// smithy-typescript generated code +import { createAggregatedClient } from "@smithy/smithy-client"; +import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types"; + +import { + DescribeAgreementCommand, + DescribeAgreementCommandInput, + DescribeAgreementCommandOutput, +} from "./commands/DescribeAgreementCommand"; +import { + GetAgreementTermsCommand, + GetAgreementTermsCommandInput, + GetAgreementTermsCommandOutput, +} from "./commands/GetAgreementTermsCommand"; +import { + SearchAgreementsCommand, + SearchAgreementsCommandInput, + SearchAgreementsCommandOutput, +} from "./commands/SearchAgreementsCommand"; +import { MarketplaceAgreementClient, MarketplaceAgreementClientConfig } from "./MarketplaceAgreementClient"; + +const commands = { + DescribeAgreementCommand, + GetAgreementTermsCommand, + SearchAgreementsCommand, +}; + +export interface MarketplaceAgreement { + /** + * @see {@link DescribeAgreementCommand} + */ + describeAgreement( + args: DescribeAgreementCommandInput, + options?: __HttpHandlerOptions + ): Promise; + describeAgreement( + args: DescribeAgreementCommandInput, + cb: (err: any, data?: DescribeAgreementCommandOutput) => void + ): void; + describeAgreement( + args: DescribeAgreementCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DescribeAgreementCommandOutput) => void + ): void; + + /** + * @see {@link GetAgreementTermsCommand} + */ + getAgreementTerms( + args: GetAgreementTermsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + getAgreementTerms( + args: GetAgreementTermsCommandInput, + cb: (err: any, data?: GetAgreementTermsCommandOutput) => void + ): void; + getAgreementTerms( + args: GetAgreementTermsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetAgreementTermsCommandOutput) => void + ): void; + + /** + * @see {@link SearchAgreementsCommand} + */ + searchAgreements( + args: SearchAgreementsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + searchAgreements( + args: SearchAgreementsCommandInput, + cb: (err: any, data?: SearchAgreementsCommandOutput) => void + ): void; + searchAgreements( + args: SearchAgreementsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: SearchAgreementsCommandOutput) => void + ): void; +} + +/** + * @public + *

AWS Marketplace is a curated digital catalog that customers can use to find, buy, deploy, and manage third-party software, data, and services to build solutions and run their businesses. The AWS Marketplace Agreement Service provides an API interface that helps AWS Marketplace sellers manage their product-related agreements, including listing, searching, and filtering agreements.

+ *

To manage agreements in AWS Marketplace, you must ensure that your AWS Identity and + * Access Management (IAM) policies and roles are set up. The user must have the required + * policies/permissions that allow them to carry out the actions in AWS:

+ *
    + *
  • + *

    + * DescribeAgreement – Grants permission to users to obtain detailed + * meta data about any of their agreements.

    + *
  • + *
  • + *

    + * GetAgreementTerms – Grants permission to users to obtain details + * about the terms of an agreement.

    + *
  • + *
  • + *

    + * SearchAgreements – Grants permission to users to search through all + * their agreements.

    + *
  • + *
+ */ +export class MarketplaceAgreement extends MarketplaceAgreementClient implements MarketplaceAgreement {} +createAggregatedClient(commands, MarketplaceAgreement); diff --git a/clients/client-marketplace-agreement/src/MarketplaceAgreementClient.ts b/clients/client-marketplace-agreement/src/MarketplaceAgreementClient.ts new file mode 100644 index 000000000000..9aaefa5f005f --- /dev/null +++ b/clients/client-marketplace-agreement/src/MarketplaceAgreementClient.ts @@ -0,0 +1,317 @@ +// 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 { DescribeAgreementCommandInput, DescribeAgreementCommandOutput } from "./commands/DescribeAgreementCommand"; +import { GetAgreementTermsCommandInput, GetAgreementTermsCommandOutput } from "./commands/GetAgreementTermsCommand"; +import { SearchAgreementsCommandInput, SearchAgreementsCommandOutput } from "./commands/SearchAgreementsCommand"; +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 = + | DescribeAgreementCommandInput + | GetAgreementTermsCommandInput + | SearchAgreementsCommandInput; + +/** + * @public + */ +export type ServiceOutputTypes = + | DescribeAgreementCommandOutput + | GetAgreementTermsCommandOutput + | SearchAgreementsCommandOutput; + +/** + * @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 MarketplaceAgreementClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> & + ClientDefaults & + RegionInputConfig & + EndpointInputConfig & + RetryInputConfig & + HostHeaderInputConfig & + AwsAuthInputConfig & + UserAgentInputConfig & + ClientInputEndpointParameters; +/** + * @public + * + * The configuration interface of MarketplaceAgreementClient class constructor that set the region, credentials and other options. + */ +export interface MarketplaceAgreementClientConfig extends MarketplaceAgreementClientConfigType {} + +/** + * @public + */ +export type MarketplaceAgreementClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> & + Required & + RuntimeExtensionsConfig & + RegionResolvedConfig & + EndpointResolvedConfig & + RetryResolvedConfig & + HostHeaderResolvedConfig & + AwsAuthResolvedConfig & + UserAgentResolvedConfig & + ClientResolvedEndpointParameters; +/** + * @public + * + * The resolved configuration interface of MarketplaceAgreementClient class. This is resolved and normalized from the {@link MarketplaceAgreementClientConfig | constructor configuration interface}. + */ +export interface MarketplaceAgreementClientResolvedConfig extends MarketplaceAgreementClientResolvedConfigType {} + +/** + * @public + *

AWS Marketplace is a curated digital catalog that customers can use to find, buy, deploy, and manage third-party software, data, and services to build solutions and run their businesses. The AWS Marketplace Agreement Service provides an API interface that helps AWS Marketplace sellers manage their product-related agreements, including listing, searching, and filtering agreements.

+ *

To manage agreements in AWS Marketplace, you must ensure that your AWS Identity and + * Access Management (IAM) policies and roles are set up. The user must have the required + * policies/permissions that allow them to carry out the actions in AWS:

+ *
    + *
  • + *

    + * DescribeAgreement – Grants permission to users to obtain detailed + * meta data about any of their agreements.

    + *
  • + *
  • + *

    + * GetAgreementTerms – Grants permission to users to obtain details + * about the terms of an agreement.

    + *
  • + *
  • + *

    + * SearchAgreements – Grants permission to users to search through all + * their agreements.

    + *
  • + *
+ */ +export class MarketplaceAgreementClient extends __Client< + __HttpHandlerOptions, + ServiceInputTypes, + ServiceOutputTypes, + MarketplaceAgreementClientResolvedConfig +> { + /** + * The resolved configuration of MarketplaceAgreementClient class. This is resolved and normalized from the {@link MarketplaceAgreementClientConfig | constructor configuration interface}. + */ + readonly config: MarketplaceAgreementClientResolvedConfig; + + 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-marketplace-agreement/src/commands/DescribeAgreementCommand.ts b/clients/client-marketplace-agreement/src/commands/DescribeAgreementCommand.ts new file mode 100644 index 000000000000..5e15aaa97ec7 --- /dev/null +++ b/clients/client-marketplace-agreement/src/commands/DescribeAgreementCommand.ts @@ -0,0 +1,182 @@ +// 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 { + MarketplaceAgreementClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../MarketplaceAgreementClient"; +import { DescribeAgreementInput, DescribeAgreementOutput } from "../models/models_0"; +import { de_DescribeAgreementCommand, se_DescribeAgreementCommand } from "../protocols/Aws_json1_0"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link DescribeAgreementCommand}. + */ +export interface DescribeAgreementCommandInput extends DescribeAgreementInput {} +/** + * @public + * + * The output of {@link DescribeAgreementCommand}. + */ +export interface DescribeAgreementCommandOutput extends DescribeAgreementOutput, __MetadataBearer {} + +/** + * @public + *

Provides details about an agreement, such as the proposer, acceptor, start date, and end date.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { MarketplaceAgreementClient, DescribeAgreementCommand } from "@aws-sdk/client-marketplace-agreement"; // ES Modules import + * // const { MarketplaceAgreementClient, DescribeAgreementCommand } = require("@aws-sdk/client-marketplace-agreement"); // CommonJS import + * const client = new MarketplaceAgreementClient(config); + * const input = { // DescribeAgreementInput + * agreementId: "STRING_VALUE", // required + * }; + * const command = new DescribeAgreementCommand(input); + * const response = await client.send(command); + * // { // DescribeAgreementOutput + * // agreementId: "STRING_VALUE", + * // acceptor: { // Acceptor + * // accountId: "STRING_VALUE", + * // }, + * // proposer: { // Proposer + * // accountId: "STRING_VALUE", + * // }, + * // startTime: new Date("TIMESTAMP"), + * // endTime: new Date("TIMESTAMP"), + * // acceptanceTime: new Date("TIMESTAMP"), + * // agreementType: "STRING_VALUE", + * // estimatedCharges: { // EstimatedCharges + * // currencyCode: "STRING_VALUE", + * // agreementValue: "STRING_VALUE", + * // }, + * // proposalSummary: { // ProposalSummary + * // resources: [ // Resources + * // { // Resource + * // id: "STRING_VALUE", + * // type: "STRING_VALUE", + * // }, + * // ], + * // offerId: "STRING_VALUE", + * // }, + * // status: "ACTIVE" || "ARCHIVED" || "CANCELLED" || "EXPIRED" || "RENEWED" || "REPLACED" || "ROLLED_BACK" || "SUPERSEDED" || "TERMINATED", + * // }; + * + * ``` + * + * @param DescribeAgreementCommandInput - {@link DescribeAgreementCommandInput} + * @returns {@link DescribeAgreementCommandOutput} + * @see {@link DescribeAgreementCommandInput} for command's `input` shape. + * @see {@link DescribeAgreementCommandOutput} for command's `response` shape. + * @see {@link MarketplaceAgreementClientResolvedConfig | config} for MarketplaceAgreementClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

User does not have sufficient access to perform this action.

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

Unexpected error during processing of request.

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

Request references a resource which does not exist.

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

Request was denied due to request throttling.

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

The input fails to satisfy the constraints specified by the service.

+ * + * @throws {@link MarketplaceAgreementServiceException} + *

Base exception class for all service exceptions from MarketplaceAgreement service.

+ * + */ +export class DescribeAgreementCommand extends $Command< + DescribeAgreementCommandInput, + DescribeAgreementCommandOutput, + MarketplaceAgreementClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: DescribeAgreementCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: MarketplaceAgreementClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, DescribeAgreementCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "MarketplaceAgreementClient"; + const commandName = "DescribeAgreementCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "AWSMPCommerceService_v20200301", + operation: "DescribeAgreement", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: DescribeAgreementCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_DescribeAgreementCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_DescribeAgreementCommand(output, context); + } +} diff --git a/clients/client-marketplace-agreement/src/commands/GetAgreementTermsCommand.ts b/clients/client-marketplace-agreement/src/commands/GetAgreementTermsCommand.ts new file mode 100644 index 000000000000..a6279bb9187a --- /dev/null +++ b/clients/client-marketplace-agreement/src/commands/GetAgreementTermsCommand.ts @@ -0,0 +1,305 @@ +// 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 { + MarketplaceAgreementClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../MarketplaceAgreementClient"; +import { GetAgreementTermsInput, GetAgreementTermsOutput } from "../models/models_0"; +import { de_GetAgreementTermsCommand, se_GetAgreementTermsCommand } from "../protocols/Aws_json1_0"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link GetAgreementTermsCommand}. + */ +export interface GetAgreementTermsCommandInput extends GetAgreementTermsInput {} +/** + * @public + * + * The output of {@link GetAgreementTermsCommand}. + */ +export interface GetAgreementTermsCommandOutput extends GetAgreementTermsOutput, __MetadataBearer {} + +/** + * @public + *

Obtains details about the terms in an agreement that you participated in as proposer or + * acceptor.

+ *

The details include:

+ *
    + *
  • + *

    + * TermType – The type of term, such as LegalTerm, + * RenewalTerm, or ConfigurableUpfrontPricingTerm.

    + *
  • + *
  • + *

    + * TermID – The ID of the particular term, which is common between offer + * and agreement.

    + *
  • + *
  • + *

    + * TermPayload – The key information contained in the term, such as the + * EULA for LegalTerm or pricing and dimensions for various pricing terms, + * such as ConfigurableUpfrontPricingTerm or + * UsageBasedPricingTerm.

    + *
  • + *
+ *
    + *
  • + *

    + * Configuration – The buyer/acceptor's selection at the time of + * agreement creation, such as the number of units purchased for a dimension or setting + * the EnableAutoRenew flag.

    + *
  • + *
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { MarketplaceAgreementClient, GetAgreementTermsCommand } from "@aws-sdk/client-marketplace-agreement"; // ES Modules import + * // const { MarketplaceAgreementClient, GetAgreementTermsCommand } = require("@aws-sdk/client-marketplace-agreement"); // CommonJS import + * const client = new MarketplaceAgreementClient(config); + * const input = { // GetAgreementTermsInput + * agreementId: "STRING_VALUE", // required + * maxResults: Number("int"), + * nextToken: "STRING_VALUE", + * }; + * const command = new GetAgreementTermsCommand(input); + * const response = await client.send(command); + * // { // GetAgreementTermsOutput + * // acceptedTerms: [ // AcceptedTermList + * // { // AcceptedTerm Union: only one key present + * // legalTerm: { // LegalTerm + * // type: "STRING_VALUE", + * // documents: [ // DocumentList + * // { // DocumentItem + * // type: "STRING_VALUE", + * // url: "STRING_VALUE", + * // version: "STRING_VALUE", + * // }, + * // ], + * // }, + * // supportTerm: { // SupportTerm + * // type: "STRING_VALUE", + * // refundPolicy: "STRING_VALUE", + * // }, + * // renewalTerm: { // RenewalTerm + * // type: "STRING_VALUE", + * // configuration: { // RenewalTermConfiguration + * // enableAutoRenew: true || false, // required + * // }, + * // }, + * // usageBasedPricingTerm: { // UsageBasedPricingTerm + * // type: "STRING_VALUE", + * // currencyCode: "STRING_VALUE", + * // rateCards: [ // UsageBasedRateCardList + * // { // UsageBasedRateCardItem + * // rateCard: [ // RateCardList + * // { // RateCardItem + * // dimensionKey: "STRING_VALUE", + * // price: "STRING_VALUE", + * // }, + * // ], + * // }, + * // ], + * // }, + * // configurableUpfrontPricingTerm: { // ConfigurableUpfrontPricingTerm + * // type: "STRING_VALUE", + * // currencyCode: "STRING_VALUE", + * // rateCards: [ // ConfigurableUpfrontRateCardList + * // { // ConfigurableUpfrontRateCardItem + * // selector: { // Selector + * // type: "STRING_VALUE", + * // value: "STRING_VALUE", + * // }, + * // constraints: { // Constraints + * // multipleDimensionSelection: "STRING_VALUE", + * // quantityConfiguration: "STRING_VALUE", + * // }, + * // rateCard: [ + * // { + * // dimensionKey: "STRING_VALUE", + * // price: "STRING_VALUE", + * // }, + * // ], + * // }, + * // ], + * // configuration: { // ConfigurableUpfrontPricingTermConfiguration + * // selectorValue: "STRING_VALUE", // required + * // dimensions: [ // DimensionList // required + * // { // Dimension + * // dimensionKey: "STRING_VALUE", // required + * // dimensionValue: Number("int"), // required + * // }, + * // ], + * // }, + * // }, + * // byolPricingTerm: { // ByolPricingTerm + * // type: "STRING_VALUE", + * // }, + * // recurringPaymentTerm: { // RecurringPaymentTerm + * // type: "STRING_VALUE", + * // currencyCode: "STRING_VALUE", + * // billingPeriod: "STRING_VALUE", + * // price: "STRING_VALUE", + * // }, + * // validityTerm: { // ValidityTerm + * // type: "STRING_VALUE", + * // agreementDuration: "STRING_VALUE", + * // agreementStartDate: new Date("TIMESTAMP"), + * // agreementEndDate: new Date("TIMESTAMP"), + * // }, + * // paymentScheduleTerm: { // PaymentScheduleTerm + * // type: "STRING_VALUE", + * // currencyCode: "STRING_VALUE", + * // schedule: [ // ScheduleList + * // { // ScheduleItem + * // chargeDate: new Date("TIMESTAMP"), + * // chargeAmount: "STRING_VALUE", + * // }, + * // ], + * // }, + * // freeTrialPricingTerm: { // FreeTrialPricingTerm + * // type: "STRING_VALUE", + * // duration: "STRING_VALUE", + * // grants: [ // GrantList + * // { // GrantItem + * // dimensionKey: "STRING_VALUE", + * // maxQuantity: Number("int"), + * // }, + * // ], + * // }, + * // fixedUpfrontPricingTerm: { // FixedUpfrontPricingTerm + * // type: "STRING_VALUE", + * // currencyCode: "STRING_VALUE", + * // duration: "STRING_VALUE", + * // price: "STRING_VALUE", + * // grants: [ + * // { + * // dimensionKey: "STRING_VALUE", + * // maxQuantity: Number("int"), + * // }, + * // ], + * // }, + * // }, + * // ], + * // nextToken: "STRING_VALUE", + * // }; + * + * ``` + * + * @param GetAgreementTermsCommandInput - {@link GetAgreementTermsCommandInput} + * @returns {@link GetAgreementTermsCommandOutput} + * @see {@link GetAgreementTermsCommandInput} for command's `input` shape. + * @see {@link GetAgreementTermsCommandOutput} for command's `response` shape. + * @see {@link MarketplaceAgreementClientResolvedConfig | config} for MarketplaceAgreementClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

User does not have sufficient access to perform this action.

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

Unexpected error during processing of request.

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

Request references a resource which does not exist.

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

Request was denied due to request throttling.

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

The input fails to satisfy the constraints specified by the service.

+ * + * @throws {@link MarketplaceAgreementServiceException} + *

Base exception class for all service exceptions from MarketplaceAgreement service.

+ * + */ +export class GetAgreementTermsCommand extends $Command< + GetAgreementTermsCommandInput, + GetAgreementTermsCommandOutput, + MarketplaceAgreementClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: GetAgreementTermsCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: MarketplaceAgreementClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, GetAgreementTermsCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "MarketplaceAgreementClient"; + const commandName = "GetAgreementTermsCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "AWSMPCommerceService_v20200301", + operation: "GetAgreementTerms", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: GetAgreementTermsCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_GetAgreementTermsCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_GetAgreementTermsCommand(output, context); + } +} diff --git a/clients/client-marketplace-agreement/src/commands/SearchAgreementsCommand.ts b/clients/client-marketplace-agreement/src/commands/SearchAgreementsCommand.ts new file mode 100644 index 000000000000..c3348751d7ca --- /dev/null +++ b/clients/client-marketplace-agreement/src/commands/SearchAgreementsCommand.ts @@ -0,0 +1,283 @@ +// 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 { + MarketplaceAgreementClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../MarketplaceAgreementClient"; +import { SearchAgreementsInput, SearchAgreementsOutput } from "../models/models_0"; +import { de_SearchAgreementsCommand, se_SearchAgreementsCommand } from "../protocols/Aws_json1_0"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link SearchAgreementsCommand}. + */ +export interface SearchAgreementsCommandInput extends SearchAgreementsInput {} +/** + * @public + * + * The output of {@link SearchAgreementsCommand}. + */ +export interface SearchAgreementsCommandOutput extends SearchAgreementsOutput, __MetadataBearer {} + +/** + * @public + *

Searches across all agreements that a proposer or an acceptor has in AWS Marketplace. The search returns a list of agreements with basic agreement information.

+ *

The following filter combinations are supported:

+ *
    + *
  • + *

    + * PartyType as Proposer + AgreementType + + * ResourceIdentifier + *

    + *
  • + *
  • + *

    + * PartyType as Proposer + AgreementType + + * OfferId + *

    + *
  • + *
  • + *

    + * PartyType as Proposer + AgreementType + + * AcceptorAccountId + *

    + *
  • + *
  • + *

    + * PartyType as Proposer + AgreementType + + * Status + *

    + *
  • + *
  • + *

    + * PartyType as Proposer + AgreementType + + * ResourceIdentifier + Status + *

    + *
  • + *
  • + *

    + * PartyType as Proposer + AgreementType + + * OfferId + Status + *

    + *
  • + *
  • + *

    + * PartyType as Proposer + AgreementType + + * AcceptorAccountId + Status + *

    + *
  • + *
  • + *

    + * PartyType as Proposer + AgreementType + + * ResourceType + Status + *

    + *
  • + *
  • + *

    + * PartyType as Proposer + AgreementType + + * AcceptorAccountId + ResourceType + + * Status + *

    + *
  • + *
  • + *

    + * PartyType as Proposer + AgreementType + + * AcceptorAccountId + OfferId + *

    + *
  • + *
  • + *

    + * PartyType as Proposer + AgreementType + + * AcceptorAccountId + OfferId + Status + *

    + *
  • + *
  • + *

    + * PartyType as Proposer + AgreementType + + * AcceptorAccountId + ResourceIdentifier + *

    + *
  • + *
  • + *

    + * PartyType as Proposer + AgreementType + + * AcceptorAccountId + ResourceIdentifier + + * Status + *

    + *
  • + *
  • + *

    + * PartyType as Proposer + AgreementType + + * AcceptorAccountId + ResourceType + *

    + *
  • + *
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { MarketplaceAgreementClient, SearchAgreementsCommand } from "@aws-sdk/client-marketplace-agreement"; // ES Modules import + * // const { MarketplaceAgreementClient, SearchAgreementsCommand } = require("@aws-sdk/client-marketplace-agreement"); // CommonJS import + * const client = new MarketplaceAgreementClient(config); + * const input = { // SearchAgreementsInput + * catalog: "STRING_VALUE", + * filters: [ // FilterList + * { // Filter + * name: "STRING_VALUE", + * values: [ // FilterValueList + * "STRING_VALUE", + * ], + * }, + * ], + * sort: { // Sort + * sortBy: "STRING_VALUE", + * sortOrder: "ASCENDING" || "DESCENDING", + * }, + * maxResults: Number("int"), + * nextToken: "STRING_VALUE", + * }; + * const command = new SearchAgreementsCommand(input); + * const response = await client.send(command); + * // { // SearchAgreementsOutput + * // agreementViewSummaries: [ // AgreementViewSummaryList + * // { // AgreementViewSummary + * // agreementId: "STRING_VALUE", + * // acceptanceTime: new Date("TIMESTAMP"), + * // startTime: new Date("TIMESTAMP"), + * // endTime: new Date("TIMESTAMP"), + * // agreementType: "STRING_VALUE", + * // acceptor: { // Acceptor + * // accountId: "STRING_VALUE", + * // }, + * // proposer: { // Proposer + * // accountId: "STRING_VALUE", + * // }, + * // proposalSummary: { // ProposalSummary + * // resources: [ // Resources + * // { // Resource + * // id: "STRING_VALUE", + * // type: "STRING_VALUE", + * // }, + * // ], + * // offerId: "STRING_VALUE", + * // }, + * // status: "ACTIVE" || "ARCHIVED" || "CANCELLED" || "EXPIRED" || "RENEWED" || "REPLACED" || "ROLLED_BACK" || "SUPERSEDED" || "TERMINATED", + * // }, + * // ], + * // nextToken: "STRING_VALUE", + * // }; + * + * ``` + * + * @param SearchAgreementsCommandInput - {@link SearchAgreementsCommandInput} + * @returns {@link SearchAgreementsCommandOutput} + * @see {@link SearchAgreementsCommandInput} for command's `input` shape. + * @see {@link SearchAgreementsCommandOutput} for command's `response` shape. + * @see {@link MarketplaceAgreementClientResolvedConfig | config} for MarketplaceAgreementClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

User does not have sufficient access to perform this action.

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

Unexpected error during processing of request.

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

Request was denied due to request throttling.

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

The input fails to satisfy the constraints specified by the service.

+ * + * @throws {@link MarketplaceAgreementServiceException} + *

Base exception class for all service exceptions from MarketplaceAgreement service.

+ * + */ +export class SearchAgreementsCommand extends $Command< + SearchAgreementsCommandInput, + SearchAgreementsCommandOutput, + MarketplaceAgreementClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: SearchAgreementsCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: MarketplaceAgreementClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, SearchAgreementsCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "MarketplaceAgreementClient"; + const commandName = "SearchAgreementsCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "AWSMPCommerceService_v20200301", + operation: "SearchAgreements", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: SearchAgreementsCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_SearchAgreementsCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_SearchAgreementsCommand(output, context); + } +} diff --git a/clients/client-marketplace-agreement/src/commands/index.ts b/clients/client-marketplace-agreement/src/commands/index.ts new file mode 100644 index 000000000000..5631c46237d4 --- /dev/null +++ b/clients/client-marketplace-agreement/src/commands/index.ts @@ -0,0 +1,4 @@ +// smithy-typescript generated code +export * from "./DescribeAgreementCommand"; +export * from "./GetAgreementTermsCommand"; +export * from "./SearchAgreementsCommand"; diff --git a/clients/client-marketplace-agreement/src/endpoint/EndpointParameters.ts b/clients/client-marketplace-agreement/src/endpoint/EndpointParameters.ts new file mode 100644 index 000000000000..095f928a3b18 --- /dev/null +++ b/clients/client-marketplace-agreement/src/endpoint/EndpointParameters.ts @@ -0,0 +1,34 @@ +// smithy-typescript generated code +import { Endpoint, EndpointParameters as __EndpointParameters, EndpointV2, Provider } from "@smithy/types"; + +/** + * @public + */ +export interface ClientInputEndpointParameters { + region?: string | Provider; + useDualstackEndpoint?: boolean | 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, + useDualstackEndpoint: options.useDualstackEndpoint ?? false, + useFipsEndpoint: options.useFipsEndpoint ?? false, + defaultSigningName: "aws-marketplace", + }; +}; + +export interface EndpointParameters extends __EndpointParameters { + Region?: string; + UseDualStack?: boolean; + UseFIPS?: boolean; + Endpoint?: string; +} diff --git a/clients/client-marketplace-agreement/src/endpoint/endpointResolver.ts b/clients/client-marketplace-agreement/src/endpoint/endpointResolver.ts new file mode 100644 index 000000000000..5a2f95973187 --- /dev/null +++ b/clients/client-marketplace-agreement/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-marketplace-agreement/src/endpoint/ruleset.ts b/clients/client-marketplace-agreement/src/endpoint/ruleset.ts new file mode 100644 index 000000000000..0e87c35e777b --- /dev/null +++ b/clients/client-marketplace-agreement/src/endpoint/ruleset.ts @@ -0,0 +1,32 @@ +// @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/marketplace-agreement.json */ + +const s="required", +t="fn", +u="argv", +v="ref"; +const a=true, +b="isSet", +c="booleanEquals", +d="error", +e="endpoint", +f="tree", +g="PartitionResult", +h={[s]:false,"type":"String"}, +i={[s]:true,"default":false,"type":"Boolean"}, +j={[v]:"Endpoint"}, +k={[t]:c,[u]:[{[v]:"UseFIPS"},true]}, +l={[t]:c,[u]:[{[v]:"UseDualStack"},true]}, +m={}, +n={[t]:"getAttr",[u]:[{[v]:g},"supportsFIPS"]}, +o={[t]:c,[u]:[true,{[t]:"getAttr",[u]:[{[v]:g},"supportsDualStack"]}]}, +p=[k], +q=[l], +r=[{[v]:"Region"}]; +const _data={version:"1.0",parameters:{Region:h,UseDualStack:i,UseFIPS:i,Endpoint:h},rules:[{conditions:[{[t]:b,[u]:[j]}],rules:[{conditions:p,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:d},{rules:[{conditions:q,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:d},{endpoint:{url:j,properties:m,headers:m},type:e}],type:f}],type:f},{rules:[{conditions:[{[t]:b,[u]:r}],rules:[{conditions:[{[t]:"aws.partition",[u]:r,assign:g}],rules:[{conditions:[k,l],rules:[{conditions:[{[t]:c,[u]:[a,n]},o],rules:[{rules:[{endpoint:{url:"https://agreement-marketplace-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:m,headers:m},type:e}],type:f}],type:f},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:d}],type:f},{conditions:p,rules:[{conditions:[{[t]:c,[u]:[n,a]}],rules:[{rules:[{endpoint:{url:"https://agreement-marketplace-fips.{Region}.{PartitionResult#dnsSuffix}",properties:m,headers:m},type:e}],type:f}],type:f},{error:"FIPS is enabled but this partition does not support FIPS",type:d}],type:f},{conditions:q,rules:[{conditions:[o],rules:[{rules:[{endpoint:{url:"https://agreement-marketplace.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:m,headers:m},type:e}],type:f}],type:f},{error:"DualStack is enabled but this partition does not support DualStack",type:d}],type:f},{rules:[{endpoint:{url:"https://agreement-marketplace.{Region}.{PartitionResult#dnsSuffix}",properties:m,headers:m},type:e}],type:f}],type:f}],type:f},{error:"Invalid Configuration: Missing Region",type:d}],type:f}]}; +export const ruleSet: RuleSetObject = _data; diff --git a/clients/client-marketplace-agreement/src/extensionConfiguration.ts b/clients/client-marketplace-agreement/src/extensionConfiguration.ts new file mode 100644 index 000000000000..526c437abf18 --- /dev/null +++ b/clients/client-marketplace-agreement/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 MarketplaceAgreementExtensionConfiguration + extends HttpHandlerExtensionConfiguration, + DefaultExtensionConfiguration, + AwsRegionExtensionConfiguration {} diff --git a/clients/client-marketplace-agreement/src/index.ts b/clients/client-marketplace-agreement/src/index.ts new file mode 100644 index 000000000000..e5edf04d9d3a --- /dev/null +++ b/clients/client-marketplace-agreement/src/index.ts @@ -0,0 +1,39 @@ +// smithy-typescript generated code +/* eslint-disable */ +/** + *

AWS Marketplace is a curated digital catalog that customers can use to find, buy, deploy, and manage third-party software, data, and services to build solutions and run their businesses. The AWS Marketplace Agreement Service provides an API interface that helps AWS Marketplace sellers manage their product-related agreements, including listing, searching, and filtering agreements.

+ *

To manage agreements in AWS Marketplace, you must ensure that your AWS Identity and + * Access Management (IAM) policies and roles are set up. The user must have the required + * policies/permissions that allow them to carry out the actions in AWS:

+ *
    + *
  • + *

    + * DescribeAgreement – Grants permission to users to obtain detailed + * meta data about any of their agreements.

    + *
  • + *
  • + *

    + * GetAgreementTerms – Grants permission to users to obtain details + * about the terms of an agreement.

    + *
  • + *
  • + *

    + * SearchAgreements – Grants permission to users to search through all + * their agreements.

    + *
  • + *
+ * + * @packageDocumentation + */ +export * from "./MarketplaceAgreementClient"; +export * from "./MarketplaceAgreement"; +export { ClientInputEndpointParameters } from "./endpoint/EndpointParameters"; +export { RuntimeExtension } from "./runtimeExtensions"; +export { MarketplaceAgreementExtensionConfiguration } from "./extensionConfiguration"; +export * from "./commands"; +export * from "./pagination"; +export * from "./models"; + +import "@aws-sdk/util-endpoints"; + +export { MarketplaceAgreementServiceException } from "./models/MarketplaceAgreementServiceException"; diff --git a/clients/client-marketplace-agreement/src/models/MarketplaceAgreementServiceException.ts b/clients/client-marketplace-agreement/src/models/MarketplaceAgreementServiceException.ts new file mode 100644 index 000000000000..337d9715b71f --- /dev/null +++ b/clients/client-marketplace-agreement/src/models/MarketplaceAgreementServiceException.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 MarketplaceAgreement service. + */ +export class MarketplaceAgreementServiceException extends __ServiceException { + /** + * @internal + */ + constructor(options: __ServiceExceptionOptions) { + super(options); + Object.setPrototypeOf(this, MarketplaceAgreementServiceException.prototype); + } +} diff --git a/clients/client-marketplace-agreement/src/models/index.ts b/clients/client-marketplace-agreement/src/models/index.ts new file mode 100644 index 000000000000..9eaceb12865f --- /dev/null +++ b/clients/client-marketplace-agreement/src/models/index.ts @@ -0,0 +1,2 @@ +// smithy-typescript generated code +export * from "./models_0"; diff --git a/clients/client-marketplace-agreement/src/models/models_0.ts b/clients/client-marketplace-agreement/src/models/models_0.ts new file mode 100644 index 000000000000..ab8478ac3ddc --- /dev/null +++ b/clients/client-marketplace-agreement/src/models/models_0.ts @@ -0,0 +1,1561 @@ +// smithy-typescript generated code +import { ExceptionOptionType as __ExceptionOptionType } from "@smithy/smithy-client"; + +import { MarketplaceAgreementServiceException as __BaseException } from "./MarketplaceAgreementServiceException"; + +/** + * @public + *

Enables you and your customers to move your existing agreements to AWS Marketplace. The + * customer won't be charged for product usage in AWS Marketplace because they already paid + * for the product outside of AWS Marketplace.

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

Type of the term being updated.

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

Defines the dimensions that the acceptor has purchased from the overall set of + * dimensions presented in the rate card.

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

The name of key value of the dimension.

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

The number of units of the dimension the acceptor has purchased.

+ * + *

For Agreements with ConfigurableUpfrontPricingTerm, the + * RateCard section will define the prices and dimensions defined by the + * seller (proposer), whereas the Configuration section will define the actual + * dimensions, prices, and units the buyer has chosen to accept.

+ *
+ */ + dimensionValue: number | undefined; +} + +/** + * @public + *

Defines a prepaid payment model that allows buyers to configure the entitlements they + * want to purchase and the duration.

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

Defines the length of time for which the particular pricing/dimension is being purchased + * by the acceptor.

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

Defines the dimensions that the acceptor has purchased from the overall set of + * dimensions presented in the rate card.

+ */ + dimensions: Dimension[] | undefined; +} + +/** + * @public + *

Defines limits on how the term can be configured by acceptors.

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

Determines if buyers are allowed to select multiple dimensions in the rate card. The + * possible values are Allowed and Disallowed. The default value is + * Allowed.

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

Determines if acceptors are allowed to configure quantity for each dimension in rate + * card. The possible values are Allowed and Disallowed. The default + * value is Allowed.

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

Defines the per unit rates for each individual product dimension.

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

Dimension for which the given entitlement applies. Dimensions represent categories of capacity in a product and are specified when the product is listed in AWS Marketplace.

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

Per unit price for the product dimension that’s used for calculating the amount to be charged.

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

Differentiates between the mutually exclusive rate cards in the same pricing term to be + * selected by the buyer.

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

Category of selector.

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

Contract duration. This field supports the ISO 8601 format.

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

Within the prepaid payment model defined under ConfigurableUpfrontPricingTerm, the RateCardItem defines all the various rate cards (including pricing and dimensions) that have been proposed.

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

Differentiates between the mutually exclusive rate cards in the same pricing term to be selected by the buyer.

+ */ + selector?: Selector; + + /** + * @public + *

Defines limits on how the term can be configured by acceptors.

+ */ + constraints?: Constraints; + + /** + * @public + *

Defines the per unit rates for product dimensions.

+ */ + rateCard?: RateCardItem[]; +} + +/** + * @public + *

Defines a prepaid payment model that allows buyers to configure the entitlements they + * want to purchase and the duration.

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

Category of selector.

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

Defines the currency for the prices mentioned in the term.

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

A rate card defines the per unit rates for product dimensions.

+ */ + rateCards?: ConfigurableUpfrontRateCardItem[]; + + /** + * @public + *

Additional parameters specified by the acceptor while accepting the term.

+ */ + configuration?: ConfigurableUpfrontPricingTermConfiguration; +} + +/** + * @public + *

Entitlements granted to the acceptor of fixed upfront as part of agreement execution.

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

Unique dimension key defined in the product document. Dimensions represent categories of capacity in a product and are specified when the product is listed in AWS Marketplace.

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

Maximum amount of capacity that the buyer can be entitled to the given dimension of the product. If MaxQuantity is not provided, the buyer will be able to use an unlimited amount of the given dimension.

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

Defines a prepaid pricing model where the customers are charged a fixed upfront + * amount.

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

Category of the term being updated.

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

Defines the currency for the prices mentioned in this term.

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

Contract duration for the terms.

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

Fixed amount to be charged to the customer when this term is accepted.

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

Entitlements granted to the acceptor of fixed upfront as part of agreement + * execution.

+ */ + grants?: GrantItem[]; +} + +/** + * @public + *

Defines a short-term free pricing model where the buyers aren’t charged anything within + * a specified limit.

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

Category of the term.

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

Duration of the free trial period (5–31 days).

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

Entitlements granted to the acceptor of a free trial as part of an agreement + * execution.

+ */ + grants?: GrantItem[]; +} + +/** + * @public + *

Includes the list of references to legal resources proposed by the proposer to the acceptor. Each DocumentItem refers to an individual reference.

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

Category of the document. Document types include:

+ *
    + *
  • + *

    + * CustomEula – A custom EULA provided by you as seller. A URL for a + * EULA stored in an accessible Amazon S3 bucket is required for this document + * type.

    + *
  • + *
  • + *

    + * CustomDsa – A custom Data Subscription Agreement (DSA) provided by + * you as seller. A URL for a DSA stored in an accessible Amazon S3 bucket is required + * for this document type.

    + *
  • + *
  • + *

    + * StandardEula – The Standard Contract for AWS Marketplace (SCMP). For + * more information about SCMP, see the AWS Marketplace Seller Guide. You don’t provide + * a URL for this type because it’s managed by AWS Marketplace.

    + *
  • + *
  • + *

    + * StandardDsa – DSA for AWS Marketplace. For more information about the + * DSA, see the AWS Data Exchange User Guide. You don’t provide a URL for this type + * because it’s managed by AWS Marketplace.

    + *
  • + *
+ */ + type?: string; + + /** + * @public + *

A URL to the legal document for buyers to read. Required when Type is CustomEula.

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

Version of standard contracts provided by AWS Marketplace. Required when Type is StandardEula or StandardDsa.

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

Defines the list of text agreements proposed to the acceptors. An example is the end + * user license agreement (EULA).

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

Category of the term being updated.

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

List of references to legal resources proposed to the buyers. An example is the + * EULA.

+ */ + documents?: DocumentItem[]; +} + +/** + * @public + *

An individual installment of the payment that includes the date and amount of the charge.

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

The date that the customer would pay the price defined in this payment schedule term. Invoices are generated on the date provided.

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

The price that the customer would pay on the scheduled date (chargeDate).

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

Defines an installment-based pricing model where customers are charged a fixed price on + * different dates during the agreement validity period. This is used most commonly for + * flexible payment schedule pricing.

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

Type of the term.

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

Defines the currency for the prices mentioned in the term.

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

List of the payment schedule where each element defines one installment of payment. It + * contains the information necessary for calculating the price.

+ */ + schedule?: ScheduleItem[]; +} + +/** + * @public + *

Defines a pricing model where customers are charged a fixed recurring price at the end + * of each billing period.

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

Type of the term being updated.

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

Defines the currency for the prices mentioned in this term.

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

Defines the recurrence at which buyers are charged.

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

Amount charged to the buyer every billing period.

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

Additional parameters specified by the acceptor while accepting the term.

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

Defines whether the acceptor has chosen to auto-renew the agreement at the end of its + * lifecycle. Can be set to True or False.

+ */ + enableAutoRenew: boolean | undefined; +} + +/** + * @public + *

Defines that on graceful expiration of the agreement (when the agreement ends on its + * pre-defined end date), a new agreement will be created using the accepted terms on the + * existing agreement. In other words, the agreement will be renewed. The presence of + * RenewalTerm in the offer document means that auto-renewal is allowed. + * Buyers will have the option to accept or decline auto-renewal at the offer + * acceptance/agreement creation. Buyers can also change this flag from True to + * False or False to True at anytime during the + * agreement's lifecycle.

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

Category of the term being updated.

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

Additional parameters specified by the acceptor while accepting the term.

+ */ + configuration?: RenewalTermConfiguration; +} + +/** + * @public + *

Defines the customer support available for the acceptors when they purchase the + * software.

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

Category of the term being updated.

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

Free-text field about the refund policy description that will be shown to customers as + * is on the website and console.

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

Within the pay-as-you-go model defined under UsageBasedPricingTerm, the UsageBasedRateCardItem defines an individual rate for a product dimension.

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

Defines the per unit rates for product dimensions.

+ */ + rateCard?: RateCardItem[]; +} + +/** + * @public + *

Defines a usage-based pricing model (typically, pay-as-you-go pricing), where the + * customers are charged based on product usage.

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

Category of the term.

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

Defines the currency for the prices mentioned in the term.

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

List of rate cards.

+ */ + rateCards?: UsageBasedRateCardItem[]; +} + +/** + * @public + *

Defines the conditions that will keep an agreement created from this offer valid.

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

Category of the term being updated.

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

Defines the duration that the agreement remains active. If + * AgreementStartDate isn’t provided, the agreement duration is relative to + * the agreement signature time. The duration is represented in the ISO_8601 format.

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

Defines the date when agreement starts. The agreement starts at 00:00:00.000 UTC on the + * date provided. If AgreementStartDate isn’t provided, the agreement start date + * is determined based on agreement signature time.

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

Defines the date when the agreement ends. The agreement ends at 23:59:59.999 UTC on the + * date provided. If AgreementEndDate isn’t provided, the agreement end date is + * determined by the validity of individual terms.

+ */ + agreementEndDate?: Date; +} + +/** + * @public + *

A subset of terms proposed by the proposer, which have been accepted by the acceptor as part of agreement creation.

+ */ +export type AcceptedTerm = + | AcceptedTerm.ByolPricingTermMember + | AcceptedTerm.ConfigurableUpfrontPricingTermMember + | AcceptedTerm.FixedUpfrontPricingTermMember + | AcceptedTerm.FreeTrialPricingTermMember + | AcceptedTerm.LegalTermMember + | AcceptedTerm.PaymentScheduleTermMember + | AcceptedTerm.RecurringPaymentTermMember + | AcceptedTerm.RenewalTermMember + | AcceptedTerm.SupportTermMember + | AcceptedTerm.UsageBasedPricingTermMember + | AcceptedTerm.ValidityTermMember + | AcceptedTerm.$UnknownMember; + +/** + * @public + */ +export namespace AcceptedTerm { + /** + * @public + *

Defines the list of text agreements proposed to the acceptors. An example is the end user license agreement (EULA).

+ */ + export interface LegalTermMember { + legalTerm: LegalTerm; + supportTerm?: never; + renewalTerm?: never; + usageBasedPricingTerm?: never; + configurableUpfrontPricingTerm?: never; + byolPricingTerm?: never; + recurringPaymentTerm?: never; + validityTerm?: never; + paymentScheduleTerm?: never; + freeTrialPricingTerm?: never; + fixedUpfrontPricingTerm?: never; + $unknown?: never; + } + + /** + * @public + *

Defines the customer support available for the acceptors when they purchase the software.

+ */ + export interface SupportTermMember { + legalTerm?: never; + supportTerm: SupportTerm; + renewalTerm?: never; + usageBasedPricingTerm?: never; + configurableUpfrontPricingTerm?: never; + byolPricingTerm?: never; + recurringPaymentTerm?: never; + validityTerm?: never; + paymentScheduleTerm?: never; + freeTrialPricingTerm?: never; + fixedUpfrontPricingTerm?: never; + $unknown?: never; + } + + /** + * @public + *

Defines that on graceful expiration of the agreement (when the agreement ends on its pre-defined end date), a new agreement will be created using the accepted terms on the existing agreement. In other words, the agreement will be renewed. Presence of RenewalTerm in the offer document means that auto-renewal is allowed. Buyers will have the option to accept or decline auto-renewal at the offer acceptance/agreement creation. Buyers can also change this flag from True to False or False to True at anytime during the agreement's lifecycle.

+ */ + export interface RenewalTermMember { + legalTerm?: never; + supportTerm?: never; + renewalTerm: RenewalTerm; + usageBasedPricingTerm?: never; + configurableUpfrontPricingTerm?: never; + byolPricingTerm?: never; + recurringPaymentTerm?: never; + validityTerm?: never; + paymentScheduleTerm?: never; + freeTrialPricingTerm?: never; + fixedUpfrontPricingTerm?: never; + $unknown?: never; + } + + /** + * @public + *

Defines a usage-based pricing model (typically, pay-as-you-go pricing), where the customers are charged based on product usage.

+ */ + export interface UsageBasedPricingTermMember { + legalTerm?: never; + supportTerm?: never; + renewalTerm?: never; + usageBasedPricingTerm: UsageBasedPricingTerm; + configurableUpfrontPricingTerm?: never; + byolPricingTerm?: never; + recurringPaymentTerm?: never; + validityTerm?: never; + paymentScheduleTerm?: never; + freeTrialPricingTerm?: never; + fixedUpfrontPricingTerm?: never; + $unknown?: never; + } + + /** + * @public + *

Defines a prepaid payment model that allows buyers to configure the entitlements they want to purchase and the duration.

+ */ + export interface ConfigurableUpfrontPricingTermMember { + legalTerm?: never; + supportTerm?: never; + renewalTerm?: never; + usageBasedPricingTerm?: never; + configurableUpfrontPricingTerm: ConfigurableUpfrontPricingTerm; + byolPricingTerm?: never; + recurringPaymentTerm?: never; + validityTerm?: never; + paymentScheduleTerm?: never; + freeTrialPricingTerm?: never; + fixedUpfrontPricingTerm?: never; + $unknown?: never; + } + + /** + * @public + *

Enables you and your customers to move your existing agreements to AWS Marketplace. The customer won't be charged for product usage in AWS Marketplace because they already paid for the product outside of AWS Marketplace.

+ */ + export interface ByolPricingTermMember { + legalTerm?: never; + supportTerm?: never; + renewalTerm?: never; + usageBasedPricingTerm?: never; + configurableUpfrontPricingTerm?: never; + byolPricingTerm: ByolPricingTerm; + recurringPaymentTerm?: never; + validityTerm?: never; + paymentScheduleTerm?: never; + freeTrialPricingTerm?: never; + fixedUpfrontPricingTerm?: never; + $unknown?: never; + } + + /** + * @public + *

Defines a pricing model where customers are charged a fixed recurring price at the end of each billing period.

+ */ + export interface RecurringPaymentTermMember { + legalTerm?: never; + supportTerm?: never; + renewalTerm?: never; + usageBasedPricingTerm?: never; + configurableUpfrontPricingTerm?: never; + byolPricingTerm?: never; + recurringPaymentTerm: RecurringPaymentTerm; + validityTerm?: never; + paymentScheduleTerm?: never; + freeTrialPricingTerm?: never; + fixedUpfrontPricingTerm?: never; + $unknown?: never; + } + + /** + * @public + *

Defines the conditions that will keep an agreement created from this offer valid.

+ */ + export interface ValidityTermMember { + legalTerm?: never; + supportTerm?: never; + renewalTerm?: never; + usageBasedPricingTerm?: never; + configurableUpfrontPricingTerm?: never; + byolPricingTerm?: never; + recurringPaymentTerm?: never; + validityTerm: ValidityTerm; + paymentScheduleTerm?: never; + freeTrialPricingTerm?: never; + fixedUpfrontPricingTerm?: never; + $unknown?: never; + } + + /** + * @public + *

Defines an installment-based pricing model where customers are charged a fixed price on different dates during the agreement validity period. This is used most commonly for flexible payment schedule pricing.

+ */ + export interface PaymentScheduleTermMember { + legalTerm?: never; + supportTerm?: never; + renewalTerm?: never; + usageBasedPricingTerm?: never; + configurableUpfrontPricingTerm?: never; + byolPricingTerm?: never; + recurringPaymentTerm?: never; + validityTerm?: never; + paymentScheduleTerm: PaymentScheduleTerm; + freeTrialPricingTerm?: never; + fixedUpfrontPricingTerm?: never; + $unknown?: never; + } + + /** + * @public + *

Defines a short-term free pricing model where the buyers aren’t charged anything within a specified limit.

+ */ + export interface FreeTrialPricingTermMember { + legalTerm?: never; + supportTerm?: never; + renewalTerm?: never; + usageBasedPricingTerm?: never; + configurableUpfrontPricingTerm?: never; + byolPricingTerm?: never; + recurringPaymentTerm?: never; + validityTerm?: never; + paymentScheduleTerm?: never; + freeTrialPricingTerm: FreeTrialPricingTerm; + fixedUpfrontPricingTerm?: never; + $unknown?: never; + } + + /** + * @public + *

Defines a pre-paid pricing model where the customers are charged a fixed upfront amount.

+ */ + export interface FixedUpfrontPricingTermMember { + legalTerm?: never; + supportTerm?: never; + renewalTerm?: never; + usageBasedPricingTerm?: never; + configurableUpfrontPricingTerm?: never; + byolPricingTerm?: never; + recurringPaymentTerm?: never; + validityTerm?: never; + paymentScheduleTerm?: never; + freeTrialPricingTerm?: never; + fixedUpfrontPricingTerm: FixedUpfrontPricingTerm; + $unknown?: never; + } + + /** + * @public + */ + export interface $UnknownMember { + legalTerm?: never; + supportTerm?: never; + renewalTerm?: never; + usageBasedPricingTerm?: never; + configurableUpfrontPricingTerm?: never; + byolPricingTerm?: never; + recurringPaymentTerm?: never; + validityTerm?: never; + paymentScheduleTerm?: never; + freeTrialPricingTerm?: never; + fixedUpfrontPricingTerm?: never; + $unknown: [string, any]; + } + + export interface Visitor { + legalTerm: (value: LegalTerm) => T; + supportTerm: (value: SupportTerm) => T; + renewalTerm: (value: RenewalTerm) => T; + usageBasedPricingTerm: (value: UsageBasedPricingTerm) => T; + configurableUpfrontPricingTerm: (value: ConfigurableUpfrontPricingTerm) => T; + byolPricingTerm: (value: ByolPricingTerm) => T; + recurringPaymentTerm: (value: RecurringPaymentTerm) => T; + validityTerm: (value: ValidityTerm) => T; + paymentScheduleTerm: (value: PaymentScheduleTerm) => T; + freeTrialPricingTerm: (value: FreeTrialPricingTerm) => T; + fixedUpfrontPricingTerm: (value: FixedUpfrontPricingTerm) => T; + _: (name: string, value: any) => T; + } + + export const visit = (value: AcceptedTerm, visitor: Visitor): T => { + if (value.legalTerm !== undefined) return visitor.legalTerm(value.legalTerm); + if (value.supportTerm !== undefined) return visitor.supportTerm(value.supportTerm); + if (value.renewalTerm !== undefined) return visitor.renewalTerm(value.renewalTerm); + if (value.usageBasedPricingTerm !== undefined) return visitor.usageBasedPricingTerm(value.usageBasedPricingTerm); + if (value.configurableUpfrontPricingTerm !== undefined) + return visitor.configurableUpfrontPricingTerm(value.configurableUpfrontPricingTerm); + if (value.byolPricingTerm !== undefined) return visitor.byolPricingTerm(value.byolPricingTerm); + if (value.recurringPaymentTerm !== undefined) return visitor.recurringPaymentTerm(value.recurringPaymentTerm); + if (value.validityTerm !== undefined) return visitor.validityTerm(value.validityTerm); + if (value.paymentScheduleTerm !== undefined) return visitor.paymentScheduleTerm(value.paymentScheduleTerm); + if (value.freeTrialPricingTerm !== undefined) return visitor.freeTrialPricingTerm(value.freeTrialPricingTerm); + if (value.fixedUpfrontPricingTerm !== undefined) + return visitor.fixedUpfrontPricingTerm(value.fixedUpfrontPricingTerm); + return visitor._(value.$unknown[0], value.$unknown[1]); + }; +} + +/** + * @public + *

The details of the party accepting the agreement terms. This is commonly the buyer for + * PurchaseAgreement.

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

The AWS account ID of the acceptor.

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

User does not have sufficient access to perform this action.

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

The unique identifier for the error.

+ */ + requestId?: string; + + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "AccessDeniedException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, AccessDeniedException.prototype); + this.requestId = opts.requestId; + } +} + +/** + * @public + * @enum + */ +export const AgreementStatus = { + ACTIVE: "ACTIVE", + ARCHIVED: "ARCHIVED", + CANCELLED: "CANCELLED", + EXPIRED: "EXPIRED", + RENEWED: "RENEWED", + REPLACED: "REPLACED", + ROLLED_BACK: "ROLLED_BACK", + SUPERSEDED: "SUPERSEDED", + TERMINATED: "TERMINATED", +} as const; + +/** + * @public + */ +export type AgreementStatus = (typeof AgreementStatus)[keyof typeof AgreementStatus]; + +/** + * @public + *

The list of resources involved in the agreement.

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

The unique identifier of the resource.

+ * + *

We mention the term resource, which is most commonly a product, so a + * resourceId is also a productId.

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

Type of the resource, which is the product. Values include SaaSProduct or + * AmiProduct.

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

A summary of the proposal received from the proposer.

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

The list of resources involved in the agreement.

+ */ + resources?: Resource[]; + + /** + * @public + *

The unique identifier of the offer in AWS Marketplace.

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

Details of the party proposing the agreement terms,. This is commonly the seller for + * PurchaseAgreement.

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

The AWS account ID of the proposer.

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

A summary of the agreement, including top-level attributes (for example, the agreement + * ID, version, proposer, and acceptor).

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

The unique identifier of the agreement.

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

The date and time that the agreement was accepted.

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

The date and time when the agreement starts.

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

The date and time when the agreement ends. The field is null for + * pay-as-you-go agreements, which don’t have end dates.

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

The type of agreement. Values are PurchaseAgreement or + * VendorInsightsAgreement.

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

Details of the party accepting the agreement terms. This is commonly the buyer for + * PurchaseAgreement. + *

+ */ + acceptor?: Acceptor; + + /** + * @public + *

Details of the party proposing the agreement terms, most commonly the seller for + * PurchaseAgreement.

+ */ + proposer?: Proposer; + + /** + * @public + *

A summary of the proposal

+ */ + proposalSummary?: ProposalSummary; + + /** + * @public + *

The current status of the agreement.

+ */ + status?: AgreementStatus; +} + +/** + * @public + */ +export interface DescribeAgreementInput { + /** + * @public + *

The unique identifier of the agreement.

+ */ + agreementId: string | undefined; +} + +/** + * @public + *

Estimated cost of the agreement.

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

Defines the currency code for the charge.

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

The total known amount customer has to pay across the lifecycle of the agreement.

+ * + *

This is the total contract value if accepted terms contain + * ConfigurableUpfrontPricingTerm or FixedUpfrontPricingTerm. + * In the case of pure contract pricing, this will be the total value of the contract. In + * the case of contracts with consumption pricing, this will only include the committed + * value and not include any overages that occur.

+ *

If the accepted terms contain PaymentScheduleTerm, it will be the total + * payment schedule amount. This occurs when flexible payment schedule is used, and is the + * sum of all invoice charges in the payment schedule.

+ *

In case a customer has amended an agreement, by purchasing more units of any + * dimension, this will include both the original cost as well as the added cost incurred + * due to addition of new units.

+ *

This is 0 if the accepted terms contain + * UsageBasedPricingTerm without + * ConfigurableUpfrontPricingTerm or RecurringPaymentTerm. + * This occurs for usage-based pricing (such as SaaS metered or AMI/container hourly or + * monthly), because the exact usage is not known upfront.

+ *
+ */ + agreementValue?: string; +} + +/** + * @public + */ +export interface DescribeAgreementOutput { + /** + * @public + *

The unique identifier of the agreement.

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

The details of the party accepting the agreement terms. This is commonly the buyer for + * PurchaseAgreement.

+ */ + acceptor?: Acceptor; + + /** + * @public + *

The details of the party proposing the agreement terms. This is commonly the seller for + * PurchaseAgreement.

+ */ + proposer?: Proposer; + + /** + * @public + *

The date and time when the agreement starts.

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

The date and time when the agreement ends. The field is null for + * pay-as-you-go agreements, which don’t have end dates.

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

The date and time the offer was accepted or the agreement was created.

+ * + *

+ * AcceptanceTime and StartTime can differ for future dated + * agreements (FDAs).

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

The type of agreement. Values are PurchaseAgreement or + * VendorInsightsAgreement.

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

The estimated cost of the agreement.

+ */ + estimatedCharges?: EstimatedCharges; + + /** + * @public + *

A summary of the proposal received from the proposer.

+ */ + proposalSummary?: ProposalSummary; + + /** + * @public + *

The current status of the agreement.

+ *

Statuses include:

+ *
    + *
  • + *

    + * ACTIVE – The terms of the agreement are active.

    + *
  • + *
  • + *

    + * ARCHIVED – The agreement ended without a specified reason.

    + *
  • + *
  • + *

    + * CANCELLED – The acceptor ended the agreement before the defined end + * date.

    + *
  • + *
  • + *

    + * EXPIRED – The agreement ended on the defined end date.

    + *
  • + *
  • + *

    + * RENEWED – The agreement was renewed into a new agreement (for + * example, an auto-renewal).

    + *
  • + *
  • + *

    + * REPLACED – The agreement was replaced using an agreement replacement + * offer.

    + *
  • + *
  • + *

    + * ROLLED_BACK (Only applicable to inactive agreement revisions) – The + * agreement revision has been rolled back because of an error. An earlier revision is + * now active.

    + *
  • + *
  • + *

    + * SUPERCEDED (Only applicable to inactive agreement revisions) – The + * agreement revision is no longer active and another agreement revision is now + * active.

    + *
  • + *
  • + *

    + * TERMINATED – The agreement ended before the defined end date because + * of an AWS termination (for example, a payment failure).

    + *
  • + *
+ */ + status?: AgreementStatus; +} + +/** + * @public + *

Unexpected error during processing of request.

+ */ +export class InternalServerException extends __BaseException { + readonly name: "InternalServerException" = "InternalServerException"; + readonly $fault: "server" = "server"; + /** + * @public + *

The unique identifier for the error.

+ */ + requestId?: string; + + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "InternalServerException", + $fault: "server", + ...opts, + }); + Object.setPrototypeOf(this, InternalServerException.prototype); + this.requestId = opts.requestId; + } +} + +/** + * @public + * @enum + */ +export const ResourceType = { + AGREEMENT: "Agreement", +} as const; + +/** + * @public + */ +export type ResourceType = (typeof ResourceType)[keyof typeof ResourceType]; + +/** + * @public + *

Request references a resource which does not exist.

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

The unique identifier for the error.

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

The unique identifier for the resource.

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

The type of resource.

+ */ + resourceType?: ResourceType; + + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "ResourceNotFoundException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, ResourceNotFoundException.prototype); + this.requestId = opts.requestId; + this.resourceId = opts.resourceId; + this.resourceType = opts.resourceType; + } +} + +/** + * @public + *

Request was denied due to request throttling.

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

The unique identifier for the error.

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

The input fails to satisfy the constraints specified by the service.

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

The name of the field associated with the error.

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

See applicable actions.

+ */ + message: string | undefined; +} + +/** + * @public + * @enum + */ +export const ValidationExceptionReason = { + INVALID_AGREEMENT_ID: "INVALID_AGREEMENT_ID", + INVALID_CATALOG: "INVALID_CATALOG", + INVALID_FILTER_NAME: "INVALID_FILTER_NAME", + INVALID_FILTER_VALUES: "INVALID_FILTER_VALUES", + INVALID_MAX_RESULTS: "INVALID_MAX_RESULTS", + INVALID_NEXT_TOKEN: "INVALID_NEXT_TOKEN", + INVALID_SORT_BY: "INVALID_SORT_BY", + INVALID_SORT_ORDER: "INVALID_SORT_ORDER", + MISSING_AGREEMENT_ID: "MISSING_AGREEMENT_ID", + OTHER: "OTHER", + UNSUPPORTED_FILTERS: "UNSUPPORTED_FILTERS", +} as const; + +/** + * @public + */ +export type ValidationExceptionReason = (typeof ValidationExceptionReason)[keyof typeof ValidationExceptionReason]; + +/** + * @public + *

The input fails to satisfy the constraints specified by the service.

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

The unique identifier associated with the error.

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

The reason associated with the error.

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

The fields associated with the error.

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

The unique identifier of the agreement.

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

The maximum number of agreements to return in the response.

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

A token to specify where to start pagination

+ */ + nextToken?: string; +} + +/** + * @public + */ +export interface GetAgreementTermsOutput { + /** + * @public + *

A subset of terms proposed by the proposer that have been accepted by the acceptor as + * part of the agreement creation.

+ */ + acceptedTerms?: AcceptedTerm[]; + + /** + * @public + *

A token to specify where to start pagination

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

The filter name and value pair that is used to return a more specific list of results. + * Filters can be used to match a set of resources by various criteria, such as + * offerId or productId.

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

The name of the filter.

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

The filter value.

+ */ + values?: string[]; +} + +/** + * @public + * @enum + */ +export const SortOrder = { + ASCENDING: "ASCENDING", + DESCENDING: "DESCENDING", +} as const; + +/** + * @public + */ +export type SortOrder = (typeof SortOrder)[keyof typeof SortOrder]; + +/** + * @public + *

An object that contains the SortBy and SortOrder + * attributes.

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

The attribute on which the data is grouped, which can be by StartTime and + * EndTime. The default value is EndTime.

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

The sorting order, which can be ASCENDING or DESCENDING. The + * default value is DESCENDING.

+ */ + sortOrder?: SortOrder; +} + +/** + * @public + */ +export interface SearchAgreementsInput { + /** + * @public + *

The catalog in which the agreement was created.

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

The filter name and value pair used to return a specific list of results.

+ *

The following filters are supported:

+ *
    + *
  • + *

    + * ResourceIdentifier – The unique identifier of the resource.

    + *
  • + *
  • + *

    + * ResourceType – Type of the resource, which is the product + * (AmiProduct, ContainerProduct, or + * SaaSProduct).

    + *
  • + *
  • + *

    + * PartyType – The party type (either Acceptor or + * Proposer) of the caller. For agreements where the caller is the + * proposer, use the Proposer filter. For agreements where the caller is + * the acceptor, use the Acceptor filter.

    + *
  • + *
  • + *

    + * AcceptorAccountId – The AWS account ID of the party accepting the + * agreement terms.

    + *
  • + *
  • + *

    + * OfferId – The unique identifier of the offer in which the terms are + * registered in the agreement token.

    + *
  • + *
  • + *

    + * Status – The current status of the agreement. Values include + * ACTIVE, ARCHIVED, CANCELLED, + * EXPIRED, RENEWED, REPLACED, and + * TERMINATED.

    + *
  • + *
  • + *

    + * BeforeEndTime – A date used to filter agreements with a date before + * the endTime of an agreement.

    + *
  • + *
  • + *

    + * AfterEndTime – A date used to filter agreements with a date after the + * endTime of an agreement.

    + *
  • + *
  • + *

    + * AgreementType – The type of agreement. Values include + * PurchaseAgreement or VendorInsightsAgreement.

    + *
  • + *
+ */ + filters?: Filter[]; + + /** + * @public + *

An object that contains the SortBy and SortOrder + * attributes.

+ */ + sort?: Sort; + + /** + * @public + *

The maximum number of agreements to return in the response.

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

A token to specify where to start pagination.

+ */ + nextToken?: string; +} + +/** + * @public + */ +export interface SearchAgreementsOutput { + /** + * @public + *

A summary of the agreement, including top-level attributes (for example, the agreement + * ID, version, proposer, and acceptor).

+ */ + agreementViewSummaries?: AgreementViewSummary[]; + + /** + * @public + *

The token used for pagination. The field is null if there are no more + * results.

+ */ + nextToken?: string; +} diff --git a/clients/client-marketplace-agreement/src/pagination/GetAgreementTermsPaginator.ts b/clients/client-marketplace-agreement/src/pagination/GetAgreementTermsPaginator.ts new file mode 100644 index 000000000000..9fe2f21506f8 --- /dev/null +++ b/clients/client-marketplace-agreement/src/pagination/GetAgreementTermsPaginator.ts @@ -0,0 +1,50 @@ +// smithy-typescript generated code +import { Paginator } from "@smithy/types"; + +import { + GetAgreementTermsCommand, + GetAgreementTermsCommandInput, + GetAgreementTermsCommandOutput, +} from "../commands/GetAgreementTermsCommand"; +import { MarketplaceAgreementClient } from "../MarketplaceAgreementClient"; +import { MarketplaceAgreementPaginationConfiguration } from "./Interfaces"; + +/** + * @internal + */ +const makePagedClientRequest = async ( + client: MarketplaceAgreementClient, + input: GetAgreementTermsCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new GetAgreementTermsCommand(input), ...args); +}; +/** + * @public + */ +export async function* paginateGetAgreementTerms( + config: MarketplaceAgreementPaginationConfiguration, + input: GetAgreementTermsCommandInput, + ...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: GetAgreementTermsCommandOutput; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof MarketplaceAgreementClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected MarketplaceAgreement | MarketplaceAgreementClient"); + } + yield page; + const prevToken = token; + token = page.nextToken; + hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken)); + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-marketplace-agreement/src/pagination/Interfaces.ts b/clients/client-marketplace-agreement/src/pagination/Interfaces.ts new file mode 100644 index 000000000000..878c04c31207 --- /dev/null +++ b/clients/client-marketplace-agreement/src/pagination/Interfaces.ts @@ -0,0 +1,11 @@ +// smithy-typescript generated code +import { PaginationConfiguration } from "@smithy/types"; + +import { MarketplaceAgreementClient } from "../MarketplaceAgreementClient"; + +/** + * @public + */ +export interface MarketplaceAgreementPaginationConfiguration extends PaginationConfiguration { + client: MarketplaceAgreementClient; +} diff --git a/clients/client-marketplace-agreement/src/pagination/SearchAgreementsPaginator.ts b/clients/client-marketplace-agreement/src/pagination/SearchAgreementsPaginator.ts new file mode 100644 index 000000000000..167c88986840 --- /dev/null +++ b/clients/client-marketplace-agreement/src/pagination/SearchAgreementsPaginator.ts @@ -0,0 +1,50 @@ +// smithy-typescript generated code +import { Paginator } from "@smithy/types"; + +import { + SearchAgreementsCommand, + SearchAgreementsCommandInput, + SearchAgreementsCommandOutput, +} from "../commands/SearchAgreementsCommand"; +import { MarketplaceAgreementClient } from "../MarketplaceAgreementClient"; +import { MarketplaceAgreementPaginationConfiguration } from "./Interfaces"; + +/** + * @internal + */ +const makePagedClientRequest = async ( + client: MarketplaceAgreementClient, + input: SearchAgreementsCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new SearchAgreementsCommand(input), ...args); +}; +/** + * @public + */ +export async function* paginateSearchAgreements( + config: MarketplaceAgreementPaginationConfiguration, + input: SearchAgreementsCommandInput, + ...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: SearchAgreementsCommandOutput; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof MarketplaceAgreementClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected MarketplaceAgreement | MarketplaceAgreementClient"); + } + yield page; + const prevToken = token; + token = page.nextToken; + hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken)); + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-marketplace-agreement/src/pagination/index.ts b/clients/client-marketplace-agreement/src/pagination/index.ts new file mode 100644 index 000000000000..2bee959bb080 --- /dev/null +++ b/clients/client-marketplace-agreement/src/pagination/index.ts @@ -0,0 +1,4 @@ +export * from "./GetAgreementTermsPaginator"; +// smithy-typescript generated code +export * from "./Interfaces"; +export * from "./SearchAgreementsPaginator"; diff --git a/clients/client-marketplace-agreement/src/protocols/Aws_json1_0.ts b/clients/client-marketplace-agreement/src/protocols/Aws_json1_0.ts new file mode 100644 index 000000000000..3c96319f6063 --- /dev/null +++ b/clients/client-marketplace-agreement/src/protocols/Aws_json1_0.ts @@ -0,0 +1,700 @@ +// smithy-typescript generated code +import { awsExpectUnion as __expectUnion } from "@aws-sdk/core"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { + _json, + collectBody, + decorateServiceException as __decorateServiceException, + expectNonNull as __expectNonNull, + expectNumber as __expectNumber, + expectString as __expectString, + parseEpochTimestamp as __parseEpochTimestamp, + take, + withBaseException, +} from "@smithy/smithy-client"; +import { + Endpoint as __Endpoint, + HeaderBag as __HeaderBag, + ResponseMetadata as __ResponseMetadata, + SerdeContext as __SerdeContext, +} from "@smithy/types"; + +import { DescribeAgreementCommandInput, DescribeAgreementCommandOutput } from "../commands/DescribeAgreementCommand"; +import { GetAgreementTermsCommandInput, GetAgreementTermsCommandOutput } from "../commands/GetAgreementTermsCommand"; +import { SearchAgreementsCommandInput, SearchAgreementsCommandOutput } from "../commands/SearchAgreementsCommand"; +import { MarketplaceAgreementServiceException as __BaseException } from "../models/MarketplaceAgreementServiceException"; +import { + AcceptedTerm, + AccessDeniedException, + AgreementViewSummary, + DescribeAgreementInput, + DescribeAgreementOutput, + Filter, + GetAgreementTermsInput, + GetAgreementTermsOutput, + InternalServerException, + PaymentScheduleTerm, + ResourceNotFoundException, + ScheduleItem, + SearchAgreementsInput, + SearchAgreementsOutput, + Sort, + ThrottlingException, + ValidationException, + ValidityTerm, +} from "../models/models_0"; + +/** + * serializeAws_json1_0DescribeAgreementCommand + */ +export const se_DescribeAgreementCommand = async ( + input: DescribeAgreementCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("DescribeAgreement"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_json1_0GetAgreementTermsCommand + */ +export const se_GetAgreementTermsCommand = async ( + input: GetAgreementTermsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("GetAgreementTerms"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_json1_0SearchAgreementsCommand + */ +export const se_SearchAgreementsCommand = async ( + input: SearchAgreementsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("SearchAgreements"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * deserializeAws_json1_0DescribeAgreementCommand + */ +export const de_DescribeAgreementCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_DescribeAgreementCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = de_DescribeAgreementOutput(data, context); + const response: DescribeAgreementCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_0DescribeAgreementCommandError + */ +const de_DescribeAgreementCommandError = 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 "AccessDeniedException": + case "com.amazonaws.marketplaceagreement#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.marketplaceagreement#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.marketplaceagreement#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.marketplaceagreement#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.marketplaceagreement#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_json1_0GetAgreementTermsCommand + */ +export const de_GetAgreementTermsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_GetAgreementTermsCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = de_GetAgreementTermsOutput(data, context); + const response: GetAgreementTermsCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_0GetAgreementTermsCommandError + */ +const de_GetAgreementTermsCommandError = 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 "AccessDeniedException": + case "com.amazonaws.marketplaceagreement#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.marketplaceagreement#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.marketplaceagreement#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.marketplaceagreement#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.marketplaceagreement#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_json1_0SearchAgreementsCommand + */ +export const de_SearchAgreementsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_SearchAgreementsCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = de_SearchAgreementsOutput(data, context); + const response: SearchAgreementsCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_0SearchAgreementsCommandError + */ +const de_SearchAgreementsCommandError = 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 "AccessDeniedException": + case "com.amazonaws.marketplaceagreement#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.marketplaceagreement#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.marketplaceagreement#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.marketplaceagreement#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_json1_0AccessDeniedExceptionRes + */ +const de_AccessDeniedExceptionRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = _json(body); + const exception = new AccessDeniedException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + +/** + * deserializeAws_json1_0InternalServerExceptionRes + */ +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_0ResourceNotFoundExceptionRes + */ +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_0ThrottlingExceptionRes + */ +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_0ValidationExceptionRes + */ +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_DescribeAgreementInput omitted. + +// se_Filter omitted. + +// se_FilterList omitted. + +// se_FilterValueList omitted. + +// se_GetAgreementTermsInput omitted. + +// se_SearchAgreementsInput omitted. + +// se_Sort omitted. + +/** + * deserializeAws_json1_0AcceptedTerm + */ +const de_AcceptedTerm = (output: any, context: __SerdeContext): AcceptedTerm => { + if (output.byolPricingTerm != null) { + return { + byolPricingTerm: _json(output.byolPricingTerm), + }; + } + if (output.configurableUpfrontPricingTerm != null) { + return { + configurableUpfrontPricingTerm: _json(output.configurableUpfrontPricingTerm), + }; + } + if (output.fixedUpfrontPricingTerm != null) { + return { + fixedUpfrontPricingTerm: _json(output.fixedUpfrontPricingTerm), + }; + } + if (output.freeTrialPricingTerm != null) { + return { + freeTrialPricingTerm: _json(output.freeTrialPricingTerm), + }; + } + if (output.legalTerm != null) { + return { + legalTerm: _json(output.legalTerm), + }; + } + if (output.paymentScheduleTerm != null) { + return { + paymentScheduleTerm: de_PaymentScheduleTerm(output.paymentScheduleTerm, context), + }; + } + if (output.recurringPaymentTerm != null) { + return { + recurringPaymentTerm: _json(output.recurringPaymentTerm), + }; + } + if (output.renewalTerm != null) { + return { + renewalTerm: _json(output.renewalTerm), + }; + } + if (output.supportTerm != null) { + return { + supportTerm: _json(output.supportTerm), + }; + } + if (output.usageBasedPricingTerm != null) { + return { + usageBasedPricingTerm: _json(output.usageBasedPricingTerm), + }; + } + if (output.validityTerm != null) { + return { + validityTerm: de_ValidityTerm(output.validityTerm, context), + }; + } + return { $unknown: Object.entries(output)[0] }; +}; + +/** + * deserializeAws_json1_0AcceptedTermList + */ +const de_AcceptedTermList = (output: any, context: __SerdeContext): AcceptedTerm[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_AcceptedTerm(__expectUnion(entry), context); + }); + return retVal; +}; + +// de_Acceptor omitted. + +// de_AccessDeniedException omitted. + +/** + * deserializeAws_json1_0AgreementViewSummary + */ +const de_AgreementViewSummary = (output: any, context: __SerdeContext): AgreementViewSummary => { + return take(output, { + acceptanceTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + acceptor: _json, + agreementId: __expectString, + agreementType: __expectString, + endTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + proposalSummary: _json, + proposer: _json, + startTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + status: __expectString, + }) as any; +}; + +/** + * deserializeAws_json1_0AgreementViewSummaryList + */ +const de_AgreementViewSummaryList = (output: any, context: __SerdeContext): AgreementViewSummary[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_AgreementViewSummary(entry, context); + }); + return retVal; +}; + +// de_ByolPricingTerm omitted. + +// de_ConfigurableUpfrontPricingTerm omitted. + +// de_ConfigurableUpfrontPricingTermConfiguration omitted. + +// de_ConfigurableUpfrontRateCardItem omitted. + +// de_ConfigurableUpfrontRateCardList omitted. + +// de_Constraints omitted. + +/** + * deserializeAws_json1_0DescribeAgreementOutput + */ +const de_DescribeAgreementOutput = (output: any, context: __SerdeContext): DescribeAgreementOutput => { + return take(output, { + acceptanceTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + acceptor: _json, + agreementId: __expectString, + agreementType: __expectString, + endTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + estimatedCharges: _json, + proposalSummary: _json, + proposer: _json, + startTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + status: __expectString, + }) as any; +}; + +// de_Dimension omitted. + +// de_DimensionList omitted. + +// de_DocumentItem omitted. + +// de_DocumentList omitted. + +// de_EstimatedCharges omitted. + +// de_FixedUpfrontPricingTerm omitted. + +// de_FreeTrialPricingTerm omitted. + +/** + * deserializeAws_json1_0GetAgreementTermsOutput + */ +const de_GetAgreementTermsOutput = (output: any, context: __SerdeContext): GetAgreementTermsOutput => { + return take(output, { + acceptedTerms: (_: any) => de_AcceptedTermList(_, context), + nextToken: __expectString, + }) as any; +}; + +// de_GrantItem omitted. + +// de_GrantList omitted. + +// de_InternalServerException omitted. + +// de_LegalTerm omitted. + +/** + * deserializeAws_json1_0PaymentScheduleTerm + */ +const de_PaymentScheduleTerm = (output: any, context: __SerdeContext): PaymentScheduleTerm => { + return take(output, { + currencyCode: __expectString, + schedule: (_: any) => de_ScheduleList(_, context), + type: __expectString, + }) as any; +}; + +// de_ProposalSummary omitted. + +// de_Proposer omitted. + +// de_RateCardItem omitted. + +// de_RateCardList omitted. + +// de_RecurringPaymentTerm omitted. + +// de_RenewalTerm omitted. + +// de_RenewalTermConfiguration omitted. + +// de_Resource omitted. + +// de_ResourceNotFoundException omitted. + +// de_Resources omitted. + +/** + * deserializeAws_json1_0ScheduleItem + */ +const de_ScheduleItem = (output: any, context: __SerdeContext): ScheduleItem => { + return take(output, { + chargeAmount: __expectString, + chargeDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; +}; + +/** + * deserializeAws_json1_0ScheduleList + */ +const de_ScheduleList = (output: any, context: __SerdeContext): ScheduleItem[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_ScheduleItem(entry, context); + }); + return retVal; +}; + +/** + * deserializeAws_json1_0SearchAgreementsOutput + */ +const de_SearchAgreementsOutput = (output: any, context: __SerdeContext): SearchAgreementsOutput => { + return take(output, { + agreementViewSummaries: (_: any) => de_AgreementViewSummaryList(_, context), + nextToken: __expectString, + }) as any; +}; + +// de_Selector omitted. + +// de_SupportTerm omitted. + +// de_ThrottlingException omitted. + +// de_UsageBasedPricingTerm omitted. + +// de_UsageBasedRateCardItem omitted. + +// de_UsageBasedRateCardList omitted. + +// de_ValidationException omitted. + +// de_ValidationExceptionField omitted. + +// de_ValidationExceptionFieldList omitted. + +/** + * deserializeAws_json1_0ValidityTerm + */ +const de_ValidityTerm = (output: any, context: __SerdeContext): ValidityTerm => { + return take(output, { + agreementDuration: __expectString, + agreementEndDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + agreementStartDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + type: __expectString, + }) as any; +}; + +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.0", + "x-amz-target": `AWSMPCommerceService_v20200301.${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-marketplace-agreement/src/runtimeConfig.browser.ts b/clients/client-marketplace-agreement/src/runtimeConfig.browser.ts new file mode 100644 index 000000000000..fb8ef6ca0bf7 --- /dev/null +++ b/clients/client-marketplace-agreement/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 { MarketplaceAgreementClientConfig } from "./MarketplaceAgreementClient"; +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: MarketplaceAgreementClientConfig) => { + 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-marketplace-agreement/src/runtimeConfig.native.ts b/clients/client-marketplace-agreement/src/runtimeConfig.native.ts new file mode 100644 index 000000000000..a84126cb5d40 --- /dev/null +++ b/clients/client-marketplace-agreement/src/runtimeConfig.native.ts @@ -0,0 +1,18 @@ +// smithy-typescript generated code +import { Sha256 } from "@aws-crypto/sha256-js"; + +import { MarketplaceAgreementClientConfig } from "./MarketplaceAgreementClient"; +import { getRuntimeConfig as getBrowserRuntimeConfig } from "./runtimeConfig.browser"; + +/** + * @internal + */ +export const getRuntimeConfig = (config: MarketplaceAgreementClientConfig) => { + const browserDefaults = getBrowserRuntimeConfig(config); + return { + ...browserDefaults, + ...config, + runtime: "react-native", + sha256: config?.sha256 ?? Sha256, + }; +}; diff --git a/clients/client-marketplace-agreement/src/runtimeConfig.shared.ts b/clients/client-marketplace-agreement/src/runtimeConfig.shared.ts new file mode 100644 index 000000000000..04d68a3e1b35 --- /dev/null +++ b/clients/client-marketplace-agreement/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 { defaultEndpointResolver } from "./endpoint/endpointResolver"; +import { MarketplaceAgreementClientConfig } from "./MarketplaceAgreementClient"; + +/** + * @internal + */ +export const getRuntimeConfig = (config: MarketplaceAgreementClientConfig) => { + return { + apiVersion: "2020-03-01", + 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 ?? "Marketplace Agreement", + urlParser: config?.urlParser ?? parseUrl, + utf8Decoder: config?.utf8Decoder ?? fromUtf8, + utf8Encoder: config?.utf8Encoder ?? toUtf8, + }; +}; diff --git a/clients/client-marketplace-agreement/src/runtimeConfig.ts b/clients/client-marketplace-agreement/src/runtimeConfig.ts new file mode 100644 index 000000000000..bb4303fd6c7c --- /dev/null +++ b/clients/client-marketplace-agreement/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 { MarketplaceAgreementClientConfig } from "./MarketplaceAgreementClient"; +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: MarketplaceAgreementClientConfig) => { + 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-marketplace-agreement/src/runtimeExtensions.ts b/clients/client-marketplace-agreement/src/runtimeExtensions.ts new file mode 100644 index 000000000000..5a97fbd398e6 --- /dev/null +++ b/clients/client-marketplace-agreement/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 { MarketplaceAgreementExtensionConfiguration } from "./extensionConfiguration"; + +/** + * @public + */ +export interface RuntimeExtension { + configure(extensionConfiguration: MarketplaceAgreementExtensionConfiguration): void; +} + +/** + * @public + */ +export interface RuntimeExtensionsConfig { + extensions: RuntimeExtension[]; +} + +const asPartial = >(t: T) => t; + +/** + * @internal + */ +export const resolveRuntimeExtensions = (runtimeConfig: any, extensions: RuntimeExtension[]) => { + const extensionConfiguration: MarketplaceAgreementExtensionConfiguration = { + ...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-marketplace-agreement/tsconfig.cjs.json b/clients/client-marketplace-agreement/tsconfig.cjs.json new file mode 100644 index 000000000000..3567d85ba846 --- /dev/null +++ b/clients/client-marketplace-agreement/tsconfig.cjs.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig", + "compilerOptions": { + "outDir": "dist-cjs" + } +} diff --git a/clients/client-marketplace-agreement/tsconfig.es.json b/clients/client-marketplace-agreement/tsconfig.es.json new file mode 100644 index 000000000000..809f57bde65e --- /dev/null +++ b/clients/client-marketplace-agreement/tsconfig.es.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig", + "compilerOptions": { + "lib": ["dom"], + "module": "esnext", + "outDir": "dist-es" + } +} diff --git a/clients/client-marketplace-agreement/tsconfig.json b/clients/client-marketplace-agreement/tsconfig.json new file mode 100644 index 000000000000..344909de2128 --- /dev/null +++ b/clients/client-marketplace-agreement/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-marketplace-agreement/tsconfig.types.json b/clients/client-marketplace-agreement/tsconfig.types.json new file mode 100644 index 000000000000..4c3dfa7b3d25 --- /dev/null +++ b/clients/client-marketplace-agreement/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-marketplace-agreement/typedoc.json b/clients/client-marketplace-agreement/typedoc.json new file mode 100644 index 000000000000..8a364aa93b69 --- /dev/null +++ b/clients/client-marketplace-agreement/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/marketplace-agreement.json b/codegen/sdk-codegen/aws-models/marketplace-agreement.json new file mode 100644 index 000000000000..06895228cfcd --- /dev/null +++ b/codegen/sdk-codegen/aws-models/marketplace-agreement.json @@ -0,0 +1,2328 @@ +{ + "smithy": "2.0", + "shapes": { + "com.amazonaws.marketplaceagreement#AWSAccountId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 32 + }, + "smithy.api#pattern": "^[0-9]+$" + } + }, + "com.amazonaws.marketplaceagreement#AWSMPCommerceService_v20200301": { + "type": "service", + "version": "2020-03-01", + "operations": [ + { + "target": "com.amazonaws.marketplaceagreement#DescribeAgreement" + }, + { + "target": "com.amazonaws.marketplaceagreement#GetAgreementTerms" + }, + { + "target": "com.amazonaws.marketplaceagreement#SearchAgreements" + } + ], + "traits": { + "aws.api#service": { + "sdkId": "Marketplace Agreement", + "endpointPrefix": "agreement-marketplace" + }, + "aws.auth#sigv4": { + "name": "aws-marketplace" + }, + "aws.protocols#awsJson1_0": {}, + "smithy.api#documentation": "

AWS Marketplace is a curated digital catalog that customers can use to find, buy, deploy, and manage third-party software, data, and services to build solutions and run their businesses. The AWS Marketplace Agreement Service provides an API interface that helps AWS Marketplace sellers manage their product-related agreements, including listing, searching, and filtering agreements.

\n

To manage agreements in AWS Marketplace, you must ensure that your AWS Identity and\n Access Management (IAM) policies and roles are set up. The user must have the required\n policies/permissions that allow them to carry out the actions in AWS:

\n
    \n
  • \n

    \n DescribeAgreement – Grants permission to users to obtain detailed\n meta data about any of their agreements.

    \n
  • \n
  • \n

    \n GetAgreementTerms – Grants permission to users to obtain details\n about the terms of an agreement.

    \n
  • \n
  • \n

    \n SearchAgreements – Grants permission to users to search through all\n their agreements.

    \n
  • \n
", + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "pageSize": "maxResults" + }, + "smithy.api#title": "AWS Marketplace Agreement Service", + "smithy.rules#endpointRuleSet": { + "version": "1.0", + "parameters": { + "Region": { + "builtIn": "AWS::Region", + "required": false, + "documentation": "The AWS region used to dispatch the request.", + "type": "String" + }, + "UseDualStack": { + "builtIn": "AWS::UseDualStack", + "required": true, + "default": false, + "documentation": "When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.", + "type": "Boolean" + }, + "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": [], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + } + ], + "type": "tree" + }, + { + "conditions": [], + "rules": [ + { + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "aws.partition", + "argv": [ + { + "ref": "Region" + } + ], + "assign": "PartitionResult" + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + true, + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + true, + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsDualStack" + ] + } + ] + } + ], + "rules": [ + { + "conditions": [], + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://agreement-marketplace-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + }, + true + ] + } + ], + "rules": [ + { + "conditions": [], + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://agreement-marketplace-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + true, + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsDualStack" + ] + } + ] + } + ], + "rules": [ + { + "conditions": [], + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://agreement-marketplace.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" + } + ], + "type": "tree" + }, + { + "conditions": [], + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://agreement-marketplace.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + } + ], + "type": "tree" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" + } + ], + "type": "tree" + } + ] + }, + "smithy.rules#endpointTests": { + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://agreement-marketplace-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://agreement-marketplace-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://agreement-marketplace.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://agreement-marketplace.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://agreement-marketplace-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://agreement-marketplace-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://agreement-marketplace.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://agreement-marketplace.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://agreement-marketplace-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://agreement-marketplace-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://agreement-marketplace.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://agreement-marketplace.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://agreement-marketplace-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://agreement-marketplace.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://agreement-marketplace-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://agreement-marketplace.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": 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, + "UseDualStack": 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, + "UseDualStack": 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, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" + } + } + }, + "com.amazonaws.marketplaceagreement#AcceptedTerm": { + "type": "union", + "members": { + "legalTerm": { + "target": "com.amazonaws.marketplaceagreement#LegalTerm", + "traits": { + "smithy.api#documentation": "

Defines the list of text agreements proposed to the acceptors. An example is the end user license agreement (EULA).

" + } + }, + "supportTerm": { + "target": "com.amazonaws.marketplaceagreement#SupportTerm", + "traits": { + "smithy.api#documentation": "

Defines the customer support available for the acceptors when they purchase the software.

" + } + }, + "renewalTerm": { + "target": "com.amazonaws.marketplaceagreement#RenewalTerm", + "traits": { + "smithy.api#documentation": "

Defines that on graceful expiration of the agreement (when the agreement ends on its pre-defined end date), a new agreement will be created using the accepted terms on the existing agreement. In other words, the agreement will be renewed. Presence of RenewalTerm in the offer document means that auto-renewal is allowed. Buyers will have the option to accept or decline auto-renewal at the offer acceptance/agreement creation. Buyers can also change this flag from True to False or False to True at anytime during the agreement's lifecycle.

" + } + }, + "usageBasedPricingTerm": { + "target": "com.amazonaws.marketplaceagreement#UsageBasedPricingTerm", + "traits": { + "smithy.api#documentation": "

Defines a usage-based pricing model (typically, pay-as-you-go pricing), where the customers are charged based on product usage.

" + } + }, + "configurableUpfrontPricingTerm": { + "target": "com.amazonaws.marketplaceagreement#ConfigurableUpfrontPricingTerm", + "traits": { + "smithy.api#documentation": "

Defines a prepaid payment model that allows buyers to configure the entitlements they want to purchase and the duration.

" + } + }, + "byolPricingTerm": { + "target": "com.amazonaws.marketplaceagreement#ByolPricingTerm", + "traits": { + "smithy.api#documentation": "

Enables you and your customers to move your existing agreements to AWS Marketplace. The customer won't be charged for product usage in AWS Marketplace because they already paid for the product outside of AWS Marketplace.

" + } + }, + "recurringPaymentTerm": { + "target": "com.amazonaws.marketplaceagreement#RecurringPaymentTerm", + "traits": { + "smithy.api#documentation": "

Defines a pricing model where customers are charged a fixed recurring price at the end of each billing period.

" + } + }, + "validityTerm": { + "target": "com.amazonaws.marketplaceagreement#ValidityTerm", + "traits": { + "smithy.api#documentation": "

Defines the conditions that will keep an agreement created from this offer valid.

" + } + }, + "paymentScheduleTerm": { + "target": "com.amazonaws.marketplaceagreement#PaymentScheduleTerm", + "traits": { + "smithy.api#documentation": "

Defines an installment-based pricing model where customers are charged a fixed price on different dates during the agreement validity period. This is used most commonly for flexible payment schedule pricing.

" + } + }, + "freeTrialPricingTerm": { + "target": "com.amazonaws.marketplaceagreement#FreeTrialPricingTerm", + "traits": { + "smithy.api#documentation": "

Defines a short-term free pricing model where the buyers aren’t charged anything within a specified limit.

" + } + }, + "fixedUpfrontPricingTerm": { + "target": "com.amazonaws.marketplaceagreement#FixedUpfrontPricingTerm", + "traits": { + "smithy.api#documentation": "

Defines a pre-paid pricing model where the customers are charged a fixed upfront amount.

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

A subset of terms proposed by the proposer, which have been accepted by the acceptor as part of agreement creation.

" + } + }, + "com.amazonaws.marketplaceagreement#AcceptedTermList": { + "type": "list", + "member": { + "target": "com.amazonaws.marketplaceagreement#AcceptedTerm" + } + }, + "com.amazonaws.marketplaceagreement#Acceptor": { + "type": "structure", + "members": { + "accountId": { + "target": "com.amazonaws.marketplaceagreement#AWSAccountId", + "traits": { + "smithy.api#documentation": "

The AWS account ID of the acceptor.

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

The details of the party accepting the agreement terms. This is commonly the buyer for\n PurchaseAgreement.

" + } + }, + "com.amazonaws.marketplaceagreement#AccessDeniedException": { + "type": "structure", + "members": { + "requestId": { + "target": "com.amazonaws.marketplaceagreement#RequestId", + "traits": { + "smithy.api#documentation": "

The unique identifier for the error.

" + } + }, + "message": { + "target": "com.amazonaws.marketplaceagreement#ExceptionMessage" + } + }, + "traits": { + "smithy.api#documentation": "

User does not have sufficient access to perform this action.

", + "smithy.api#error": "client", + "smithy.api#httpError": 403 + } + }, + "com.amazonaws.marketplaceagreement#AgreementResourceType": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 64 + }, + "smithy.api#pattern": "^[a-zA-Z]+$" + } + }, + "com.amazonaws.marketplaceagreement#AgreementStatus": { + "type": "enum", + "members": { + "ACTIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACTIVE" + } + }, + "ARCHIVED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ARCHIVED" + } + }, + "CANCELLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CANCELLED" + } + }, + "EXPIRED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EXPIRED" + } + }, + "RENEWED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RENEWED" + } + }, + "REPLACED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "REPLACED" + } + }, + "ROLLED_BACK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ROLLED_BACK" + } + }, + "SUPERSEDED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SUPERSEDED" + } + }, + "TERMINATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TERMINATED" + } + } + } + }, + "com.amazonaws.marketplaceagreement#AgreementType": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 64 + }, + "smithy.api#pattern": "^[A-Za-z]+$" + } + }, + "com.amazonaws.marketplaceagreement#AgreementViewSummary": { + "type": "structure", + "members": { + "agreementId": { + "target": "com.amazonaws.marketplaceagreement#ResourceId", + "traits": { + "smithy.api#documentation": "

The unique identifier of the agreement.

" + } + }, + "acceptanceTime": { + "target": "com.amazonaws.marketplaceagreement#Timestamp", + "traits": { + "smithy.api#documentation": "

The date and time that the agreement was accepted.

" + } + }, + "startTime": { + "target": "com.amazonaws.marketplaceagreement#Timestamp", + "traits": { + "smithy.api#documentation": "

The date and time when the agreement starts.

" + } + }, + "endTime": { + "target": "com.amazonaws.marketplaceagreement#Timestamp", + "traits": { + "smithy.api#documentation": "

The date and time when the agreement ends. The field is null for\n pay-as-you-go agreements, which don’t have end dates.

" + } + }, + "agreementType": { + "target": "com.amazonaws.marketplaceagreement#AgreementType", + "traits": { + "smithy.api#documentation": "

The type of agreement. Values are PurchaseAgreement or\n VendorInsightsAgreement.

" + } + }, + "acceptor": { + "target": "com.amazonaws.marketplaceagreement#Acceptor", + "traits": { + "smithy.api#documentation": "

Details of the party accepting the agreement terms. This is commonly the buyer for\n PurchaseAgreement.\n

" + } + }, + "proposer": { + "target": "com.amazonaws.marketplaceagreement#Proposer", + "traits": { + "smithy.api#documentation": "

Details of the party proposing the agreement terms, most commonly the seller for\n PurchaseAgreement.

" + } + }, + "proposalSummary": { + "target": "com.amazonaws.marketplaceagreement#ProposalSummary", + "traits": { + "smithy.api#documentation": "

A summary of the proposal

" + } + }, + "status": { + "target": "com.amazonaws.marketplaceagreement#AgreementStatus", + "traits": { + "smithy.api#documentation": "

The current status of the agreement.

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

A summary of the agreement, including top-level attributes (for example, the agreement\n ID, version, proposer, and acceptor).

" + } + }, + "com.amazonaws.marketplaceagreement#AgreementViewSummaryList": { + "type": "list", + "member": { + "target": "com.amazonaws.marketplaceagreement#AgreementViewSummary" + } + }, + "com.amazonaws.marketplaceagreement#Boolean": { + "type": "boolean" + }, + "com.amazonaws.marketplaceagreement#BoundedString": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 4096 + }, + "smithy.api#pattern": "^(.)+$" + } + }, + "com.amazonaws.marketplaceagreement#ByolPricingTerm": { + "type": "structure", + "members": { + "type": { + "target": "com.amazonaws.marketplaceagreement#UnversionedTermType", + "traits": { + "smithy.api#documentation": "

Type of the term being updated.

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

Enables you and your customers to move your existing agreements to AWS Marketplace. The\n customer won't be charged for product usage in AWS Marketplace because they already paid\n for the product outside of AWS Marketplace.

" + } + }, + "com.amazonaws.marketplaceagreement#Catalog": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 64 + }, + "smithy.api#pattern": "^[a-zA-Z]+$" + } + }, + "com.amazonaws.marketplaceagreement#ConfigurableUpfrontPricingTerm": { + "type": "structure", + "members": { + "type": { + "target": "com.amazonaws.marketplaceagreement#UnversionedTermType", + "traits": { + "smithy.api#documentation": "

Category of selector.

" + } + }, + "currencyCode": { + "target": "com.amazonaws.marketplaceagreement#CurrencyCode", + "traits": { + "smithy.api#documentation": "

Defines the currency for the prices mentioned in the term.

" + } + }, + "rateCards": { + "target": "com.amazonaws.marketplaceagreement#ConfigurableUpfrontRateCardList", + "traits": { + "smithy.api#documentation": "

A rate card defines the per unit rates for product dimensions.

" + } + }, + "configuration": { + "target": "com.amazonaws.marketplaceagreement#ConfigurableUpfrontPricingTermConfiguration", + "traits": { + "smithy.api#documentation": "

Additional parameters specified by the acceptor while accepting the term.

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

Defines a prepaid payment model that allows buyers to configure the entitlements they\n want to purchase and the duration.

" + } + }, + "com.amazonaws.marketplaceagreement#ConfigurableUpfrontPricingTermConfiguration": { + "type": "structure", + "members": { + "selectorValue": { + "target": "com.amazonaws.marketplaceagreement#BoundedString", + "traits": { + "smithy.api#documentation": "

Defines the length of time for which the particular pricing/dimension is being purchased\n by the acceptor.

", + "smithy.api#required": {} + } + }, + "dimensions": { + "target": "com.amazonaws.marketplaceagreement#DimensionList", + "traits": { + "smithy.api#documentation": "

Defines the dimensions that the acceptor has purchased from the overall set of\n dimensions presented in the rate card.

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

Defines a prepaid payment model that allows buyers to configure the entitlements they\n want to purchase and the duration.

" + } + }, + "com.amazonaws.marketplaceagreement#ConfigurableUpfrontRateCardItem": { + "type": "structure", + "members": { + "selector": { + "target": "com.amazonaws.marketplaceagreement#Selector", + "traits": { + "smithy.api#documentation": "

Differentiates between the mutually exclusive rate cards in the same pricing term to be selected by the buyer.

" + } + }, + "constraints": { + "target": "com.amazonaws.marketplaceagreement#Constraints", + "traits": { + "smithy.api#documentation": "

Defines limits on how the term can be configured by acceptors.

" + } + }, + "rateCard": { + "target": "com.amazonaws.marketplaceagreement#RateCardList", + "traits": { + "smithy.api#documentation": "

Defines the per unit rates for product dimensions.

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

Within the prepaid payment model defined under ConfigurableUpfrontPricingTerm, the RateCardItem defines all the various rate cards (including pricing and dimensions) that have been proposed.

" + } + }, + "com.amazonaws.marketplaceagreement#ConfigurableUpfrontRateCardList": { + "type": "list", + "member": { + "target": "com.amazonaws.marketplaceagreement#ConfigurableUpfrontRateCardItem" + } + }, + "com.amazonaws.marketplaceagreement#Constraints": { + "type": "structure", + "members": { + "multipleDimensionSelection": { + "target": "com.amazonaws.marketplaceagreement#BoundedString", + "traits": { + "smithy.api#documentation": "

Determines if buyers are allowed to select multiple dimensions in the rate card. The\n possible values are Allowed and Disallowed. The default value is\n Allowed.

" + } + }, + "quantityConfiguration": { + "target": "com.amazonaws.marketplaceagreement#BoundedString", + "traits": { + "smithy.api#documentation": "

Determines if acceptors are allowed to configure quantity for each dimension in rate\n card. The possible values are Allowed and Disallowed. The default\n value is Allowed.

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

Defines limits on how the term can be configured by acceptors.

" + } + }, + "com.amazonaws.marketplaceagreement#CurrencyCode": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 3, + "max": 3 + }, + "smithy.api#pattern": "^[A-Z]+$" + } + }, + "com.amazonaws.marketplaceagreement#DescribeAgreement": { + "type": "operation", + "input": { + "target": "com.amazonaws.marketplaceagreement#DescribeAgreementInput" + }, + "output": { + "target": "com.amazonaws.marketplaceagreement#DescribeAgreementOutput" + }, + "errors": [ + { + "target": "com.amazonaws.marketplaceagreement#AccessDeniedException" + }, + { + "target": "com.amazonaws.marketplaceagreement#InternalServerException" + }, + { + "target": "com.amazonaws.marketplaceagreement#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.marketplaceagreement#ThrottlingException" + }, + { + "target": "com.amazonaws.marketplaceagreement#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Provides details about an agreement, such as the proposer, acceptor, start date, and end date.

" + } + }, + "com.amazonaws.marketplaceagreement#DescribeAgreementInput": { + "type": "structure", + "members": { + "agreementId": { + "target": "com.amazonaws.marketplaceagreement#ResourceId", + "traits": { + "smithy.api#documentation": "

The unique identifier of the agreement.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.marketplaceagreement#DescribeAgreementOutput": { + "type": "structure", + "members": { + "agreementId": { + "target": "com.amazonaws.marketplaceagreement#ResourceId", + "traits": { + "smithy.api#documentation": "

The unique identifier of the agreement.

" + } + }, + "acceptor": { + "target": "com.amazonaws.marketplaceagreement#Acceptor", + "traits": { + "smithy.api#documentation": "

The details of the party accepting the agreement terms. This is commonly the buyer for\n PurchaseAgreement.

" + } + }, + "proposer": { + "target": "com.amazonaws.marketplaceagreement#Proposer", + "traits": { + "smithy.api#documentation": "

The details of the party proposing the agreement terms. This is commonly the seller for\n PurchaseAgreement.

" + } + }, + "startTime": { + "target": "com.amazonaws.marketplaceagreement#Timestamp", + "traits": { + "smithy.api#documentation": "

The date and time when the agreement starts.

" + } + }, + "endTime": { + "target": "com.amazonaws.marketplaceagreement#Timestamp", + "traits": { + "smithy.api#documentation": "

The date and time when the agreement ends. The field is null for\n pay-as-you-go agreements, which don’t have end dates.

" + } + }, + "acceptanceTime": { + "target": "com.amazonaws.marketplaceagreement#Timestamp", + "traits": { + "smithy.api#documentation": "

The date and time the offer was accepted or the agreement was created.

\n \n

\n AcceptanceTime and StartTime can differ for future dated\n agreements (FDAs).

\n
" + } + }, + "agreementType": { + "target": "com.amazonaws.marketplaceagreement#AgreementType", + "traits": { + "smithy.api#documentation": "

The type of agreement. Values are PurchaseAgreement or\n VendorInsightsAgreement.

" + } + }, + "estimatedCharges": { + "target": "com.amazonaws.marketplaceagreement#EstimatedCharges", + "traits": { + "smithy.api#documentation": "

The estimated cost of the agreement.

" + } + }, + "proposalSummary": { + "target": "com.amazonaws.marketplaceagreement#ProposalSummary", + "traits": { + "smithy.api#documentation": "

A summary of the proposal received from the proposer.

" + } + }, + "status": { + "target": "com.amazonaws.marketplaceagreement#AgreementStatus", + "traits": { + "smithy.api#documentation": "

The current status of the agreement.

\n

Statuses include:

\n
    \n
  • \n

    \n ACTIVE – The terms of the agreement are active.

    \n
  • \n
  • \n

    \n ARCHIVED – The agreement ended without a specified reason.

    \n
  • \n
  • \n

    \n CANCELLED – The acceptor ended the agreement before the defined end\n date.

    \n
  • \n
  • \n

    \n EXPIRED – The agreement ended on the defined end date.

    \n
  • \n
  • \n

    \n RENEWED – The agreement was renewed into a new agreement (for\n example, an auto-renewal).

    \n
  • \n
  • \n

    \n REPLACED – The agreement was replaced using an agreement replacement\n offer.

    \n
  • \n
  • \n

    \n ROLLED_BACK (Only applicable to inactive agreement revisions) – The\n agreement revision has been rolled back because of an error. An earlier revision is\n now active.

    \n
  • \n
  • \n

    \n SUPERCEDED (Only applicable to inactive agreement revisions) – The\n agreement revision is no longer active and another agreement revision is now\n active.

    \n
  • \n
  • \n

    \n TERMINATED – The agreement ended before the defined end date because\n of an AWS termination (for example, a payment failure).

    \n
  • \n
" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.marketplaceagreement#Dimension": { + "type": "structure", + "members": { + "dimensionKey": { + "target": "com.amazonaws.marketplaceagreement#BoundedString", + "traits": { + "smithy.api#documentation": "

The name of key value of the dimension.

", + "smithy.api#required": {} + } + }, + "dimensionValue": { + "target": "com.amazonaws.marketplaceagreement#ZeroValueInteger", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The number of units of the dimension the acceptor has purchased.

\n \n

For Agreements with ConfigurableUpfrontPricingTerm, the\n RateCard section will define the prices and dimensions defined by the\n seller (proposer), whereas the Configuration section will define the actual\n dimensions, prices, and units the buyer has chosen to accept.

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

Defines the dimensions that the acceptor has purchased from the overall set of\n dimensions presented in the rate card.

" + } + }, + "com.amazonaws.marketplaceagreement#DimensionList": { + "type": "list", + "member": { + "target": "com.amazonaws.marketplaceagreement#Dimension" + }, + "traits": { + "smithy.api#length": { + "min": 1 + } + } + }, + "com.amazonaws.marketplaceagreement#DocumentItem": { + "type": "structure", + "members": { + "type": { + "target": "com.amazonaws.marketplaceagreement#BoundedString", + "traits": { + "smithy.api#documentation": "

Category of the document. Document types include:

\n
    \n
  • \n

    \n CustomEula – A custom EULA provided by you as seller. A URL for a\n EULA stored in an accessible Amazon S3 bucket is required for this document\n type.

    \n
  • \n
  • \n

    \n CustomDsa – A custom Data Subscription Agreement (DSA) provided by\n you as seller. A URL for a DSA stored in an accessible Amazon S3 bucket is required\n for this document type.

    \n
  • \n
  • \n

    \n StandardEula – The Standard Contract for AWS Marketplace (SCMP). For\n more information about SCMP, see the AWS Marketplace Seller Guide. You don’t provide\n a URL for this type because it’s managed by AWS Marketplace.

    \n
  • \n
  • \n

    \n StandardDsa – DSA for AWS Marketplace. For more information about the\n DSA, see the AWS Data Exchange User Guide. You don’t provide a URL for this type\n because it’s managed by AWS Marketplace.

    \n
  • \n
" + } + }, + "url": { + "target": "com.amazonaws.marketplaceagreement#BoundedString", + "traits": { + "smithy.api#documentation": "

A URL to the legal document for buyers to read. Required when Type is CustomEula.

" + } + }, + "version": { + "target": "com.amazonaws.marketplaceagreement#BoundedString", + "traits": { + "smithy.api#documentation": "

Version of standard contracts provided by AWS Marketplace. Required when Type is StandardEula or StandardDsa.

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

Includes the list of references to legal resources proposed by the proposer to the acceptor. Each DocumentItem refers to an individual reference.

" + } + }, + "com.amazonaws.marketplaceagreement#DocumentList": { + "type": "list", + "member": { + "target": "com.amazonaws.marketplaceagreement#DocumentItem" + } + }, + "com.amazonaws.marketplaceagreement#EstimatedCharges": { + "type": "structure", + "members": { + "currencyCode": { + "target": "com.amazonaws.marketplaceagreement#CurrencyCode", + "traits": { + "smithy.api#documentation": "

Defines the currency code for the charge.

" + } + }, + "agreementValue": { + "target": "com.amazonaws.marketplaceagreement#BoundedString", + "traits": { + "smithy.api#documentation": "

The total known amount customer has to pay across the lifecycle of the agreement.

\n \n

This is the total contract value if accepted terms contain\n ConfigurableUpfrontPricingTerm or FixedUpfrontPricingTerm.\n In the case of pure contract pricing, this will be the total value of the contract. In\n the case of contracts with consumption pricing, this will only include the committed\n value and not include any overages that occur.

\n

If the accepted terms contain PaymentScheduleTerm, it will be the total\n payment schedule amount. This occurs when flexible payment schedule is used, and is the\n sum of all invoice charges in the payment schedule.

\n

In case a customer has amended an agreement, by purchasing more units of any\n dimension, this will include both the original cost as well as the added cost incurred\n due to addition of new units.

\n

This is 0 if the accepted terms contain\n UsageBasedPricingTerm without\n ConfigurableUpfrontPricingTerm or RecurringPaymentTerm.\n This occurs for usage-based pricing (such as SaaS metered or AMI/container hourly or\n monthly), because the exact usage is not known upfront.

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

Estimated cost of the agreement.

" + } + }, + "com.amazonaws.marketplaceagreement#ExceptionMessage": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1024 + } + } + }, + "com.amazonaws.marketplaceagreement#Filter": { + "type": "structure", + "members": { + "name": { + "target": "com.amazonaws.marketplaceagreement#FilterName", + "traits": { + "smithy.api#documentation": "

The name of the filter.

" + } + }, + "values": { + "target": "com.amazonaws.marketplaceagreement#FilterValueList", + "traits": { + "smithy.api#documentation": "

The filter value.

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

The filter name and value pair that is used to return a more specific list of results.\n Filters can be used to match a set of resources by various criteria, such as\n offerId or productId.

" + } + }, + "com.amazonaws.marketplaceagreement#FilterList": { + "type": "list", + "member": { + "target": "com.amazonaws.marketplaceagreement#Filter" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 10 + } + } + }, + "com.amazonaws.marketplaceagreement#FilterName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 32 + }, + "smithy.api#pattern": "^[A-Za-z_]+$" + } + }, + "com.amazonaws.marketplaceagreement#FilterValue": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 64 + }, + "smithy.api#pattern": "^[A-Za-z0-9+:_-]+$" + } + }, + "com.amazonaws.marketplaceagreement#FilterValueList": { + "type": "list", + "member": { + "target": "com.amazonaws.marketplaceagreement#FilterValue" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1 + } + } + }, + "com.amazonaws.marketplaceagreement#FixedUpfrontPricingTerm": { + "type": "structure", + "members": { + "type": { + "target": "com.amazonaws.marketplaceagreement#UnversionedTermType", + "traits": { + "smithy.api#documentation": "

Category of the term being updated.

" + } + }, + "currencyCode": { + "target": "com.amazonaws.marketplaceagreement#CurrencyCode", + "traits": { + "smithy.api#documentation": "

Defines the currency for the prices mentioned in this term.

" + } + }, + "duration": { + "target": "com.amazonaws.marketplaceagreement#BoundedString", + "traits": { + "smithy.api#documentation": "

Contract duration for the terms.

" + } + }, + "price": { + "target": "com.amazonaws.marketplaceagreement#BoundedString", + "traits": { + "smithy.api#documentation": "

Fixed amount to be charged to the customer when this term is accepted.

" + } + }, + "grants": { + "target": "com.amazonaws.marketplaceagreement#GrantList", + "traits": { + "smithy.api#documentation": "

Entitlements granted to the acceptor of fixed upfront as part of agreement\n execution.

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

Defines a prepaid pricing model where the customers are charged a fixed upfront\n amount.

" + } + }, + "com.amazonaws.marketplaceagreement#FreeTrialPricingTerm": { + "type": "structure", + "members": { + "type": { + "target": "com.amazonaws.marketplaceagreement#UnversionedTermType", + "traits": { + "smithy.api#documentation": "

Category of the term.

" + } + }, + "duration": { + "target": "com.amazonaws.marketplaceagreement#BoundedString", + "traits": { + "smithy.api#documentation": "

Duration of the free trial period (5–31 days).

" + } + }, + "grants": { + "target": "com.amazonaws.marketplaceagreement#GrantList", + "traits": { + "smithy.api#documentation": "

Entitlements granted to the acceptor of a free trial as part of an agreement\n execution.

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

Defines a short-term free pricing model where the buyers aren’t charged anything within\n a specified limit.

" + } + }, + "com.amazonaws.marketplaceagreement#GetAgreementTerms": { + "type": "operation", + "input": { + "target": "com.amazonaws.marketplaceagreement#GetAgreementTermsInput" + }, + "output": { + "target": "com.amazonaws.marketplaceagreement#GetAgreementTermsOutput" + }, + "errors": [ + { + "target": "com.amazonaws.marketplaceagreement#AccessDeniedException" + }, + { + "target": "com.amazonaws.marketplaceagreement#InternalServerException" + }, + { + "target": "com.amazonaws.marketplaceagreement#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.marketplaceagreement#ThrottlingException" + }, + { + "target": "com.amazonaws.marketplaceagreement#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Obtains details about the terms in an agreement that you participated in as proposer or\n acceptor.

\n

The details include:

\n
    \n
  • \n

    \n TermType – The type of term, such as LegalTerm,\n RenewalTerm, or ConfigurableUpfrontPricingTerm.

    \n
  • \n
  • \n

    \n TermID – The ID of the particular term, which is common between offer\n and agreement.

    \n
  • \n
  • \n

    \n TermPayload – The key information contained in the term, such as the\n EULA for LegalTerm or pricing and dimensions for various pricing terms,\n such as ConfigurableUpfrontPricingTerm or\n UsageBasedPricingTerm.

    \n
  • \n
\n
    \n
  • \n

    \n Configuration – The buyer/acceptor's selection at the time of\n agreement creation, such as the number of units purchased for a dimension or setting\n the EnableAutoRenew flag.

    \n
  • \n
", + "smithy.api#paginated": {} + } + }, + "com.amazonaws.marketplaceagreement#GetAgreementTermsInput": { + "type": "structure", + "members": { + "agreementId": { + "target": "com.amazonaws.marketplaceagreement#ResourceId", + "traits": { + "smithy.api#documentation": "

The unique identifier of the agreement.

", + "smithy.api#required": {} + } + }, + "maxResults": { + "target": "com.amazonaws.marketplaceagreement#MaxResults", + "traits": { + "smithy.api#documentation": "

The maximum number of agreements to return in the response.

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

A token to specify where to start pagination

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.marketplaceagreement#GetAgreementTermsOutput": { + "type": "structure", + "members": { + "acceptedTerms": { + "target": "com.amazonaws.marketplaceagreement#AcceptedTermList", + "traits": { + "smithy.api#documentation": "

A subset of terms proposed by the proposer that have been accepted by the acceptor as\n part of the agreement creation.

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

A token to specify where to start pagination

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.marketplaceagreement#GrantItem": { + "type": "structure", + "members": { + "dimensionKey": { + "target": "com.amazonaws.marketplaceagreement#BoundedString", + "traits": { + "smithy.api#documentation": "

Unique dimension key defined in the product document. Dimensions represent categories of capacity in a product and are specified when the product is listed in AWS Marketplace.

" + } + }, + "maxQuantity": { + "target": "com.amazonaws.marketplaceagreement#PositiveIntegerWithDefaultValueOne", + "traits": { + "smithy.api#default": 1, + "smithy.api#documentation": "

Maximum amount of capacity that the buyer can be entitled to the given dimension of the product. If MaxQuantity is not provided, the buyer will be able to use an unlimited amount of the given dimension.

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

Entitlements granted to the acceptor of fixed upfront as part of agreement execution.

" + } + }, + "com.amazonaws.marketplaceagreement#GrantList": { + "type": "list", + "member": { + "target": "com.amazonaws.marketplaceagreement#GrantItem" + } + }, + "com.amazonaws.marketplaceagreement#InternalServerException": { + "type": "structure", + "members": { + "requestId": { + "target": "com.amazonaws.marketplaceagreement#RequestId", + "traits": { + "smithy.api#documentation": "

The unique identifier for the error.

" + } + }, + "message": { + "target": "com.amazonaws.marketplaceagreement#ExceptionMessage" + } + }, + "traits": { + "smithy.api#documentation": "

Unexpected error during processing of request.

", + "smithy.api#error": "server", + "smithy.api#httpError": 500 + } + }, + "com.amazonaws.marketplaceagreement#LegalTerm": { + "type": "structure", + "members": { + "type": { + "target": "com.amazonaws.marketplaceagreement#UnversionedTermType", + "traits": { + "smithy.api#documentation": "

Category of the term being updated.

" + } + }, + "documents": { + "target": "com.amazonaws.marketplaceagreement#DocumentList", + "traits": { + "smithy.api#documentation": "

List of references to legal resources proposed to the buyers. An example is the\n EULA.

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

Defines the list of text agreements proposed to the acceptors. An example is the end\n user license agreement (EULA).

" + } + }, + "com.amazonaws.marketplaceagreement#MaxResults": { + "type": "integer", + "traits": { + "smithy.api#range": { + "min": 1, + "max": 50 + } + } + }, + "com.amazonaws.marketplaceagreement#NextToken": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 8192 + }, + "smithy.api#pattern": "^[a-zA-Z0-9+/=]+$" + } + }, + "com.amazonaws.marketplaceagreement#OfferId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 64 + }, + "smithy.api#pattern": "^\\S{1,64}$" + } + }, + "com.amazonaws.marketplaceagreement#PaymentScheduleTerm": { + "type": "structure", + "members": { + "type": { + "target": "com.amazonaws.marketplaceagreement#UnversionedTermType", + "traits": { + "smithy.api#documentation": "

Type of the term.

" + } + }, + "currencyCode": { + "target": "com.amazonaws.marketplaceagreement#CurrencyCode", + "traits": { + "smithy.api#documentation": "

Defines the currency for the prices mentioned in the term.

" + } + }, + "schedule": { + "target": "com.amazonaws.marketplaceagreement#ScheduleList", + "traits": { + "smithy.api#documentation": "

List of the payment schedule where each element defines one installment of payment. It\n contains the information necessary for calculating the price.

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

Defines an installment-based pricing model where customers are charged a fixed price on\n different dates during the agreement validity period. This is used most commonly for\n flexible payment schedule pricing.

" + } + }, + "com.amazonaws.marketplaceagreement#PositiveIntegerWithDefaultValueOne": { + "type": "integer", + "traits": { + "smithy.api#default": 1, + "smithy.api#range": { + "min": 1 + } + } + }, + "com.amazonaws.marketplaceagreement#ProposalSummary": { + "type": "structure", + "members": { + "resources": { + "target": "com.amazonaws.marketplaceagreement#Resources", + "traits": { + "smithy.api#documentation": "

The list of resources involved in the agreement.

" + } + }, + "offerId": { + "target": "com.amazonaws.marketplaceagreement#OfferId", + "traits": { + "smithy.api#documentation": "

The unique identifier of the offer in AWS Marketplace.

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

A summary of the proposal received from the proposer.

" + } + }, + "com.amazonaws.marketplaceagreement#Proposer": { + "type": "structure", + "members": { + "accountId": { + "target": "com.amazonaws.marketplaceagreement#AWSAccountId", + "traits": { + "smithy.api#documentation": "

The AWS account ID of the proposer.

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

Details of the party proposing the agreement terms,. This is commonly the seller for\n PurchaseAgreement.

" + } + }, + "com.amazonaws.marketplaceagreement#RateCardItem": { + "type": "structure", + "members": { + "dimensionKey": { + "target": "com.amazonaws.marketplaceagreement#BoundedString", + "traits": { + "smithy.api#documentation": "

Dimension for which the given entitlement applies. Dimensions represent categories of capacity in a product and are specified when the product is listed in AWS Marketplace.

" + } + }, + "price": { + "target": "com.amazonaws.marketplaceagreement#BoundedString", + "traits": { + "smithy.api#documentation": "

Per unit price for the product dimension that’s used for calculating the amount to be charged.

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

Defines the per unit rates for each individual product dimension.

" + } + }, + "com.amazonaws.marketplaceagreement#RateCardList": { + "type": "list", + "member": { + "target": "com.amazonaws.marketplaceagreement#RateCardItem" + } + }, + "com.amazonaws.marketplaceagreement#RecurringPaymentTerm": { + "type": "structure", + "members": { + "type": { + "target": "com.amazonaws.marketplaceagreement#UnversionedTermType", + "traits": { + "smithy.api#documentation": "

Type of the term being updated.

" + } + }, + "currencyCode": { + "target": "com.amazonaws.marketplaceagreement#CurrencyCode", + "traits": { + "smithy.api#documentation": "

Defines the currency for the prices mentioned in this term.

" + } + }, + "billingPeriod": { + "target": "com.amazonaws.marketplaceagreement#BoundedString", + "traits": { + "smithy.api#documentation": "

Defines the recurrence at which buyers are charged.

" + } + }, + "price": { + "target": "com.amazonaws.marketplaceagreement#BoundedString", + "traits": { + "smithy.api#documentation": "

Amount charged to the buyer every billing period.

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

Defines a pricing model where customers are charged a fixed recurring price at the end\n of each billing period.

" + } + }, + "com.amazonaws.marketplaceagreement#RenewalTerm": { + "type": "structure", + "members": { + "type": { + "target": "com.amazonaws.marketplaceagreement#UnversionedTermType", + "traits": { + "smithy.api#documentation": "

Category of the term being updated.

" + } + }, + "configuration": { + "target": "com.amazonaws.marketplaceagreement#RenewalTermConfiguration", + "traits": { + "smithy.api#documentation": "

Additional parameters specified by the acceptor while accepting the term.

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

Defines that on graceful expiration of the agreement (when the agreement ends on its\n pre-defined end date), a new agreement will be created using the accepted terms on the\n existing agreement. In other words, the agreement will be renewed. The presence of\n RenewalTerm in the offer document means that auto-renewal is allowed.\n Buyers will have the option to accept or decline auto-renewal at the offer\n acceptance/agreement creation. Buyers can also change this flag from True to\n False or False to True at anytime during the\n agreement's lifecycle.

" + } + }, + "com.amazonaws.marketplaceagreement#RenewalTermConfiguration": { + "type": "structure", + "members": { + "enableAutoRenew": { + "target": "com.amazonaws.marketplaceagreement#Boolean", + "traits": { + "smithy.api#documentation": "

Defines whether the acceptor has chosen to auto-renew the agreement at the end of its\n lifecycle. Can be set to True or False.

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

Additional parameters specified by the acceptor while accepting the term.

" + } + }, + "com.amazonaws.marketplaceagreement#RequestId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 128 + }, + "smithy.api#pattern": "^[A-Za-z0-9-]+$" + } + }, + "com.amazonaws.marketplaceagreement#Resource": { + "type": "structure", + "members": { + "id": { + "target": "com.amazonaws.marketplaceagreement#ResourceId", + "traits": { + "smithy.api#documentation": "

The unique identifier of the resource.

\n \n

We mention the term resource, which is most commonly a product, so a\n resourceId is also a productId.

\n
" + } + }, + "type": { + "target": "com.amazonaws.marketplaceagreement#AgreementResourceType", + "traits": { + "smithy.api#documentation": "

Type of the resource, which is the product. Values include SaaSProduct or\n AmiProduct.

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

The list of resources involved in the agreement.

" + } + }, + "com.amazonaws.marketplaceagreement#ResourceId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 64 + }, + "smithy.api#pattern": "^[A-Za-z0-9_/-]+$" + } + }, + "com.amazonaws.marketplaceagreement#ResourceNotFoundException": { + "type": "structure", + "members": { + "requestId": { + "target": "com.amazonaws.marketplaceagreement#RequestId", + "traits": { + "smithy.api#documentation": "

The unique identifier for the error.

" + } + }, + "message": { + "target": "com.amazonaws.marketplaceagreement#ExceptionMessage" + }, + "resourceId": { + "target": "com.amazonaws.marketplaceagreement#ResourceId", + "traits": { + "smithy.api#documentation": "

The unique identifier for the resource.

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

The type of resource.

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

Request references a resource which does not exist.

", + "smithy.api#error": "client", + "smithy.api#httpError": 404 + } + }, + "com.amazonaws.marketplaceagreement#ResourceType": { + "type": "enum", + "members": { + "AGREEMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Agreement" + } + } + } + }, + "com.amazonaws.marketplaceagreement#Resources": { + "type": "list", + "member": { + "target": "com.amazonaws.marketplaceagreement#Resource" + } + }, + "com.amazonaws.marketplaceagreement#ScheduleItem": { + "type": "structure", + "members": { + "chargeDate": { + "target": "com.amazonaws.marketplaceagreement#Timestamp", + "traits": { + "smithy.api#documentation": "

The date that the customer would pay the price defined in this payment schedule term. Invoices are generated on the date provided.

" + } + }, + "chargeAmount": { + "target": "com.amazonaws.marketplaceagreement#BoundedString", + "traits": { + "smithy.api#documentation": "

The price that the customer would pay on the scheduled date (chargeDate).

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

An individual installment of the payment that includes the date and amount of the charge.

" + } + }, + "com.amazonaws.marketplaceagreement#ScheduleList": { + "type": "list", + "member": { + "target": "com.amazonaws.marketplaceagreement#ScheduleItem" + } + }, + "com.amazonaws.marketplaceagreement#SearchAgreements": { + "type": "operation", + "input": { + "target": "com.amazonaws.marketplaceagreement#SearchAgreementsInput" + }, + "output": { + "target": "com.amazonaws.marketplaceagreement#SearchAgreementsOutput" + }, + "errors": [ + { + "target": "com.amazonaws.marketplaceagreement#AccessDeniedException" + }, + { + "target": "com.amazonaws.marketplaceagreement#InternalServerException" + }, + { + "target": "com.amazonaws.marketplaceagreement#ThrottlingException" + }, + { + "target": "com.amazonaws.marketplaceagreement#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Searches across all agreements that a proposer or an acceptor has in AWS Marketplace. The search returns a list of agreements with basic agreement information.

\n

The following filter combinations are supported:

\n
    \n
  • \n

    \n PartyType as Proposer + AgreementType +\n ResourceIdentifier\n

    \n
  • \n
  • \n

    \n PartyType as Proposer + AgreementType +\n OfferId\n

    \n
  • \n
  • \n

    \n PartyType as Proposer + AgreementType +\n AcceptorAccountId\n

    \n
  • \n
  • \n

    \n PartyType as Proposer + AgreementType +\n Status\n

    \n
  • \n
  • \n

    \n PartyType as Proposer + AgreementType +\n ResourceIdentifier + Status\n

    \n
  • \n
  • \n

    \n PartyType as Proposer + AgreementType +\n OfferId + Status\n

    \n
  • \n
  • \n

    \n PartyType as Proposer + AgreementType +\n AcceptorAccountId + Status\n

    \n
  • \n
  • \n

    \n PartyType as Proposer + AgreementType +\n ResourceType + Status\n

    \n
  • \n
  • \n

    \n PartyType as Proposer + AgreementType +\n AcceptorAccountId + ResourceType +\n Status\n

    \n
  • \n
  • \n

    \n PartyType as Proposer + AgreementType +\n AcceptorAccountId + OfferId\n

    \n
  • \n
  • \n

    \n PartyType as Proposer + AgreementType +\n AcceptorAccountId + OfferId + Status\n

    \n
  • \n
  • \n

    \n PartyType as Proposer + AgreementType +\n AcceptorAccountId + ResourceIdentifier\n

    \n
  • \n
  • \n

    \n PartyType as Proposer + AgreementType +\n AcceptorAccountId + ResourceIdentifier +\n Status\n

    \n
  • \n
  • \n

    \n PartyType as Proposer + AgreementType +\n AcceptorAccountId + ResourceType\n

    \n
  • \n
", + "smithy.api#paginated": {} + } + }, + "com.amazonaws.marketplaceagreement#SearchAgreementsInput": { + "type": "structure", + "members": { + "catalog": { + "target": "com.amazonaws.marketplaceagreement#Catalog", + "traits": { + "smithy.api#documentation": "

The catalog in which the agreement was created.

" + } + }, + "filters": { + "target": "com.amazonaws.marketplaceagreement#FilterList", + "traits": { + "smithy.api#documentation": "

The filter name and value pair used to return a specific list of results.

\n

The following filters are supported:

\n
    \n
  • \n

    \n ResourceIdentifier – The unique identifier of the resource.

    \n
  • \n
  • \n

    \n ResourceType – Type of the resource, which is the product\n (AmiProduct, ContainerProduct, or\n SaaSProduct).

    \n
  • \n
  • \n

    \n PartyType – The party type (either Acceptor or\n Proposer) of the caller. For agreements where the caller is the\n proposer, use the Proposer filter. For agreements where the caller is\n the acceptor, use the Acceptor filter.

    \n
  • \n
  • \n

    \n AcceptorAccountId – The AWS account ID of the party accepting the\n agreement terms.

    \n
  • \n
  • \n

    \n OfferId – The unique identifier of the offer in which the terms are\n registered in the agreement token.

    \n
  • \n
  • \n

    \n Status – The current status of the agreement. Values include\n ACTIVE, ARCHIVED, CANCELLED,\n EXPIRED, RENEWED, REPLACED, and\n TERMINATED.

    \n
  • \n
  • \n

    \n BeforeEndTime – A date used to filter agreements with a date before\n the endTime of an agreement.

    \n
  • \n
  • \n

    \n AfterEndTime – A date used to filter agreements with a date after the\n endTime of an agreement.

    \n
  • \n
  • \n

    \n AgreementType – The type of agreement. Values include\n PurchaseAgreement or VendorInsightsAgreement.

    \n
  • \n
" + } + }, + "sort": { + "target": "com.amazonaws.marketplaceagreement#Sort", + "traits": { + "smithy.api#documentation": "

An object that contains the SortBy and SortOrder\n attributes.

" + } + }, + "maxResults": { + "target": "com.amazonaws.marketplaceagreement#MaxResults", + "traits": { + "smithy.api#documentation": "

The maximum number of agreements to return in the response.

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

A token to specify where to start pagination.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.marketplaceagreement#SearchAgreementsOutput": { + "type": "structure", + "members": { + "agreementViewSummaries": { + "target": "com.amazonaws.marketplaceagreement#AgreementViewSummaryList", + "traits": { + "smithy.api#documentation": "

A summary of the agreement, including top-level attributes (for example, the agreement\n ID, version, proposer, and acceptor).

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

The token used for pagination. The field is null if there are no more\n results.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.marketplaceagreement#Selector": { + "type": "structure", + "members": { + "type": { + "target": "com.amazonaws.marketplaceagreement#BoundedString", + "traits": { + "smithy.api#documentation": "

Category of selector.

" + } + }, + "value": { + "target": "com.amazonaws.marketplaceagreement#BoundedString", + "traits": { + "smithy.api#documentation": "

Contract duration. This field supports the ISO 8601 format.

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

Differentiates between the mutually exclusive rate cards in the same pricing term to be\n selected by the buyer.

" + } + }, + "com.amazonaws.marketplaceagreement#Sort": { + "type": "structure", + "members": { + "sortBy": { + "target": "com.amazonaws.marketplaceagreement#SortBy", + "traits": { + "smithy.api#documentation": "

The attribute on which the data is grouped, which can be by StartTime and\n EndTime. The default value is EndTime.

" + } + }, + "sortOrder": { + "target": "com.amazonaws.marketplaceagreement#SortOrder", + "traits": { + "smithy.api#documentation": "

The sorting order, which can be ASCENDING or DESCENDING. The\n default value is DESCENDING.

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

An object that contains the SortBy and SortOrder\n attributes.

" + } + }, + "com.amazonaws.marketplaceagreement#SortBy": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 255 + }, + "smithy.api#pattern": "^[A-Za-z_]+$" + } + }, + "com.amazonaws.marketplaceagreement#SortOrder": { + "type": "enum", + "members": { + "ASCENDING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ASCENDING" + } + }, + "DESCENDING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DESCENDING" + } + } + } + }, + "com.amazonaws.marketplaceagreement#SupportTerm": { + "type": "structure", + "members": { + "type": { + "target": "com.amazonaws.marketplaceagreement#UnversionedTermType", + "traits": { + "smithy.api#documentation": "

Category of the term being updated.

" + } + }, + "refundPolicy": { + "target": "com.amazonaws.marketplaceagreement#BoundedString", + "traits": { + "smithy.api#documentation": "

Free-text field about the refund policy description that will be shown to customers as\n is on the website and console.

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

Defines the customer support available for the acceptors when they purchase the\n software.

" + } + }, + "com.amazonaws.marketplaceagreement#ThrottlingException": { + "type": "structure", + "members": { + "requestId": { + "target": "com.amazonaws.marketplaceagreement#RequestId", + "traits": { + "smithy.api#documentation": "

The unique identifier for the error.

" + } + }, + "message": { + "target": "com.amazonaws.marketplaceagreement#ExceptionMessage" + } + }, + "traits": { + "smithy.api#documentation": "

Request was denied due to request throttling.

", + "smithy.api#error": "client", + "smithy.api#httpError": 429 + } + }, + "com.amazonaws.marketplaceagreement#Timestamp": { + "type": "timestamp" + }, + "com.amazonaws.marketplaceagreement#UnversionedTermType": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 4096 + }, + "smithy.api#pattern": "^[A-Za-z]+$" + } + }, + "com.amazonaws.marketplaceagreement#UsageBasedPricingTerm": { + "type": "structure", + "members": { + "type": { + "target": "com.amazonaws.marketplaceagreement#UnversionedTermType", + "traits": { + "smithy.api#documentation": "

Category of the term.

" + } + }, + "currencyCode": { + "target": "com.amazonaws.marketplaceagreement#CurrencyCode", + "traits": { + "smithy.api#documentation": "

Defines the currency for the prices mentioned in the term.

" + } + }, + "rateCards": { + "target": "com.amazonaws.marketplaceagreement#UsageBasedRateCardList", + "traits": { + "smithy.api#documentation": "

List of rate cards.

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

Defines a usage-based pricing model (typically, pay-as-you-go pricing), where the\n customers are charged based on product usage.

" + } + }, + "com.amazonaws.marketplaceagreement#UsageBasedRateCardItem": { + "type": "structure", + "members": { + "rateCard": { + "target": "com.amazonaws.marketplaceagreement#RateCardList", + "traits": { + "smithy.api#documentation": "

Defines the per unit rates for product dimensions.

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

Within the pay-as-you-go model defined under UsageBasedPricingTerm, the UsageBasedRateCardItem defines an individual rate for a product dimension.

" + } + }, + "com.amazonaws.marketplaceagreement#UsageBasedRateCardList": { + "type": "list", + "member": { + "target": "com.amazonaws.marketplaceagreement#UsageBasedRateCardItem" + } + }, + "com.amazonaws.marketplaceagreement#ValidationException": { + "type": "structure", + "members": { + "requestId": { + "target": "com.amazonaws.marketplaceagreement#RequestId", + "traits": { + "smithy.api#documentation": "

The unique identifier associated with the error.

" + } + }, + "message": { + "target": "com.amazonaws.marketplaceagreement#ExceptionMessage" + }, + "reason": { + "target": "com.amazonaws.marketplaceagreement#ValidationExceptionReason", + "traits": { + "smithy.api#documentation": "

The reason associated with the error.

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

The fields associated with the error.

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

The input fails to satisfy the constraints specified by the service.

", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.marketplaceagreement#ValidationExceptionField": { + "type": "structure", + "members": { + "name": { + "target": "com.amazonaws.marketplaceagreement#BoundedString", + "traits": { + "smithy.api#documentation": "

The name of the field associated with the error.

", + "smithy.api#required": {} + } + }, + "message": { + "target": "com.amazonaws.marketplaceagreement#BoundedString", + "traits": { + "smithy.api#documentation": "

See applicable actions.

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

The input fails to satisfy the constraints specified by the service.

" + } + }, + "com.amazonaws.marketplaceagreement#ValidationExceptionFieldList": { + "type": "list", + "member": { + "target": "com.amazonaws.marketplaceagreement#ValidationExceptionField" + } + }, + "com.amazonaws.marketplaceagreement#ValidationExceptionReason": { + "type": "enum", + "members": { + "INVALID_AGREEMENT_ID": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INVALID_AGREEMENT_ID" + } + }, + "MISSING_AGREEMENT_ID": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MISSING_AGREEMENT_ID" + } + }, + "INVALID_CATALOG": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INVALID_CATALOG" + } + }, + "INVALID_FILTER_NAME": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INVALID_FILTER_NAME" + } + }, + "INVALID_FILTER_VALUES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INVALID_FILTER_VALUES" + } + }, + "INVALID_SORT_BY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INVALID_SORT_BY" + } + }, + "INVALID_SORT_ORDER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INVALID_SORT_ORDER" + } + }, + "INVALID_NEXT_TOKEN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INVALID_NEXT_TOKEN" + } + }, + "INVALID_MAX_RESULTS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INVALID_MAX_RESULTS" + } + }, + "UNSUPPORTED_FILTERS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "UNSUPPORTED_FILTERS" + } + }, + "OTHER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "OTHER" + } + } + } + }, + "com.amazonaws.marketplaceagreement#ValidityTerm": { + "type": "structure", + "members": { + "type": { + "target": "com.amazonaws.marketplaceagreement#UnversionedTermType", + "traits": { + "smithy.api#documentation": "

Category of the term being updated.

" + } + }, + "agreementDuration": { + "target": "com.amazonaws.marketplaceagreement#BoundedString", + "traits": { + "smithy.api#documentation": "

Defines the duration that the agreement remains active. If\n AgreementStartDate isn’t provided, the agreement duration is relative to\n the agreement signature time. The duration is represented in the ISO_8601 format.

" + } + }, + "agreementStartDate": { + "target": "com.amazonaws.marketplaceagreement#Timestamp", + "traits": { + "smithy.api#documentation": "

Defines the date when agreement starts. The agreement starts at 00:00:00.000 UTC on the\n date provided. If AgreementStartDate isn’t provided, the agreement start date\n is determined based on agreement signature time.

" + } + }, + "agreementEndDate": { + "target": "com.amazonaws.marketplaceagreement#Timestamp", + "traits": { + "smithy.api#documentation": "

Defines the date when the agreement ends. The agreement ends at 23:59:59.999 UTC on the\n date provided. If AgreementEndDate isn’t provided, the agreement end date is\n determined by the validity of individual terms.

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

Defines the conditions that will keep an agreement created from this offer valid.

" + } + }, + "com.amazonaws.marketplaceagreement#ZeroValueInteger": { + "type": "integer", + "traits": { + "smithy.api#default": 0, + "smithy.api#range": { + "min": 0 + } + } + } + } +}