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

Welcome to the AWS Entity Resolution API Reference.

+

AWS Entity Resolution is an AWS service that provides pre-configured entity resolution capabilities +that enable developers and analysts at advertising and marketing companies to build an accurate and +complete view of their consumers.

+

+With AWS Entity Resolution, you have the ability to match source records containing consumer identifiers, +such as name, email address, and phone number. This holds true even when these records have incomplete or +conflicting identifiers. For example, AWS Entity Resolution can effectively match a source record from a +customer relationship management (CRM) system, which includes account information like first name, last name, +postal address, phone number, and email address, with a source record from a marketing system containing +campaign information, such as username and email address.

+

To learn more about AWS Entity Resolution concepts, procedures, and best practices, see the +AWS Entity Resolution +User Guide.

+ +## Installing + +To install the this package, simply type add or install @aws-sdk/client-entityresolution +using your favorite package manager: + +- `npm install @aws-sdk/client-entityresolution` +- `yarn add @aws-sdk/client-entityresolution` +- `pnpm add @aws-sdk/client-entityresolution` + +## Getting Started + +### Import + +The AWS SDK is modulized by clients and commands. +To send a request, you only need to import the `EntityResolutionClient` and +the commands you need, for example `CreateMatchingWorkflowCommand`: + +```js +// ES5 example +const { EntityResolutionClient, CreateMatchingWorkflowCommand } = require("@aws-sdk/client-entityresolution"); +``` + +```ts +// ES6+ example +import { EntityResolutionClient, CreateMatchingWorkflowCommand } from "@aws-sdk/client-entityresolution"; +``` + +### 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 EntityResolutionClient({ region: "REGION" }); + +const params = { + /** input parameters */ +}; +const command = new CreateMatchingWorkflowCommand(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-entityresolution"; +const client = new AWS.EntityResolution({ region: "REGION" }); + +// async/await. +try { + const data = await client.createMatchingWorkflow(params); + // process data. +} catch (error) { + // error handling. +} + +// Promises. +client + .createMatchingWorkflow(params) + .then((data) => { + // process data. + }) + .catch((error) => { + // error handling. + }); + +// callbacks. +client.createMatchingWorkflow(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-entityresolution` 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) + +
+ +CreateMatchingWorkflow + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-entityresolution/classes/creatematchingworkflowcommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-entityresolution/interfaces/creatematchingworkflowcommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-entityresolution/interfaces/creatematchingworkflowcommandoutput.html) + +
+
+ +CreateSchemaMapping + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-entityresolution/classes/createschemamappingcommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-entityresolution/interfaces/createschemamappingcommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-entityresolution/interfaces/createschemamappingcommandoutput.html) + +
+
+ +DeleteMatchingWorkflow + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-entityresolution/classes/deletematchingworkflowcommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-entityresolution/interfaces/deletematchingworkflowcommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-entityresolution/interfaces/deletematchingworkflowcommandoutput.html) + +
+
+ +DeleteSchemaMapping + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-entityresolution/classes/deleteschemamappingcommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-entityresolution/interfaces/deleteschemamappingcommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-entityresolution/interfaces/deleteschemamappingcommandoutput.html) + +
+
+ +GetMatchId + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-entityresolution/classes/getmatchidcommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-entityresolution/interfaces/getmatchidcommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-entityresolution/interfaces/getmatchidcommandoutput.html) + +
+
+ +GetMatchingJob + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-entityresolution/classes/getmatchingjobcommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-entityresolution/interfaces/getmatchingjobcommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-entityresolution/interfaces/getmatchingjobcommandoutput.html) + +
+
+ +GetMatchingWorkflow + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-entityresolution/classes/getmatchingworkflowcommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-entityresolution/interfaces/getmatchingworkflowcommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-entityresolution/interfaces/getmatchingworkflowcommandoutput.html) + +
+
+ +GetSchemaMapping + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-entityresolution/classes/getschemamappingcommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-entityresolution/interfaces/getschemamappingcommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-entityresolution/interfaces/getschemamappingcommandoutput.html) + +
+
+ +ListMatchingJobs + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-entityresolution/classes/listmatchingjobscommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-entityresolution/interfaces/listmatchingjobscommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-entityresolution/interfaces/listmatchingjobscommandoutput.html) + +
+
+ +ListMatchingWorkflows + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-entityresolution/classes/listmatchingworkflowscommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-entityresolution/interfaces/listmatchingworkflowscommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-entityresolution/interfaces/listmatchingworkflowscommandoutput.html) + +
+
+ +ListSchemaMappings + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-entityresolution/classes/listschemamappingscommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-entityresolution/interfaces/listschemamappingscommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-entityresolution/interfaces/listschemamappingscommandoutput.html) + +
+
+ +ListTagsForResource + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-entityresolution/classes/listtagsforresourcecommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-entityresolution/interfaces/listtagsforresourcecommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-entityresolution/interfaces/listtagsforresourcecommandoutput.html) + +
+
+ +StartMatchingJob + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-entityresolution/classes/startmatchingjobcommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-entityresolution/interfaces/startmatchingjobcommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-entityresolution/interfaces/startmatchingjobcommandoutput.html) + +
+
+ +TagResource + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-entityresolution/classes/tagresourcecommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-entityresolution/interfaces/tagresourcecommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-entityresolution/interfaces/tagresourcecommandoutput.html) + +
+
+ +UntagResource + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-entityresolution/classes/untagresourcecommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-entityresolution/interfaces/untagresourcecommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-entityresolution/interfaces/untagresourcecommandoutput.html) + +
+
+ +UpdateMatchingWorkflow + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-entityresolution/classes/updatematchingworkflowcommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-entityresolution/interfaces/updatematchingworkflowcommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-entityresolution/interfaces/updatematchingworkflowcommandoutput.html) + +
diff --git a/clients/client-entityresolution/api-extractor.json b/clients/client-entityresolution/api-extractor.json new file mode 100644 index 000000000000..d5bf5ffeee85 --- /dev/null +++ b/clients/client-entityresolution/api-extractor.json @@ -0,0 +1,4 @@ +{ + "extends": "../../api-extractor.json", + "mainEntryPointFilePath": "/dist-types/index.d.ts" +} diff --git a/clients/client-entityresolution/package.json b/clients/client-entityresolution/package.json new file mode 100644 index 000000000000..53b4825deac3 --- /dev/null +++ b/clients/client-entityresolution/package.json @@ -0,0 +1,99 @@ +{ + "name": "@aws-sdk/client-entityresolution", + "description": "AWS SDK for JavaScript Entityresolution 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 entityresolution" + }, + "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/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/types": "*", + "@aws-sdk/util-endpoints": "*", + "@aws-sdk/util-user-agent-browser": "*", + "@aws-sdk/util-user-agent-node": "*", + "@smithy/config-resolver": "^2.0.1", + "@smithy/fetch-http-handler": "^2.0.1", + "@smithy/hash-node": "^2.0.1", + "@smithy/invalid-dependency": "^2.0.1", + "@smithy/middleware-content-length": "^2.0.1", + "@smithy/middleware-endpoint": "^2.0.1", + "@smithy/middleware-retry": "^2.0.1", + "@smithy/middleware-serde": "^2.0.1", + "@smithy/middleware-stack": "^2.0.0", + "@smithy/node-config-provider": "^2.0.1", + "@smithy/node-http-handler": "^2.0.1", + "@smithy/protocol-http": "^2.0.1", + "@smithy/smithy-client": "^2.0.1", + "@smithy/types": "^2.0.2", + "@smithy/url-parser": "^2.0.1", + "@smithy/util-base64": "^2.0.0", + "@smithy/util-body-length-browser": "^2.0.0", + "@smithy/util-body-length-node": "^2.0.0", + "@smithy/util-defaults-mode-browser": "^2.0.1", + "@smithy/util-defaults-mode-node": "^2.0.1", + "@smithy/util-retry": "^2.0.0", + "@smithy/util-utf8": "^2.0.0", + "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-entityresolution", + "repository": { + "type": "git", + "url": "https://github.com/aws/aws-sdk-js-v3.git", + "directory": "clients/client-entityresolution" + } +} diff --git a/clients/client-entityresolution/src/EntityResolution.ts b/clients/client-entityresolution/src/EntityResolution.ts new file mode 100644 index 000000000000..fe618f8732d7 --- /dev/null +++ b/clients/client-entityresolution/src/EntityResolution.ts @@ -0,0 +1,369 @@ +// smithy-typescript generated code +import { createAggregatedClient } from "@smithy/smithy-client"; +import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types"; + +import { + CreateMatchingWorkflowCommand, + CreateMatchingWorkflowCommandInput, + CreateMatchingWorkflowCommandOutput, +} from "./commands/CreateMatchingWorkflowCommand"; +import { + CreateSchemaMappingCommand, + CreateSchemaMappingCommandInput, + CreateSchemaMappingCommandOutput, +} from "./commands/CreateSchemaMappingCommand"; +import { + DeleteMatchingWorkflowCommand, + DeleteMatchingWorkflowCommandInput, + DeleteMatchingWorkflowCommandOutput, +} from "./commands/DeleteMatchingWorkflowCommand"; +import { + DeleteSchemaMappingCommand, + DeleteSchemaMappingCommandInput, + DeleteSchemaMappingCommandOutput, +} from "./commands/DeleteSchemaMappingCommand"; +import { GetMatchIdCommand, GetMatchIdCommandInput, GetMatchIdCommandOutput } from "./commands/GetMatchIdCommand"; +import { + GetMatchingJobCommand, + GetMatchingJobCommandInput, + GetMatchingJobCommandOutput, +} from "./commands/GetMatchingJobCommand"; +import { + GetMatchingWorkflowCommand, + GetMatchingWorkflowCommandInput, + GetMatchingWorkflowCommandOutput, +} from "./commands/GetMatchingWorkflowCommand"; +import { + GetSchemaMappingCommand, + GetSchemaMappingCommandInput, + GetSchemaMappingCommandOutput, +} from "./commands/GetSchemaMappingCommand"; +import { + ListMatchingJobsCommand, + ListMatchingJobsCommandInput, + ListMatchingJobsCommandOutput, +} from "./commands/ListMatchingJobsCommand"; +import { + ListMatchingWorkflowsCommand, + ListMatchingWorkflowsCommandInput, + ListMatchingWorkflowsCommandOutput, +} from "./commands/ListMatchingWorkflowsCommand"; +import { + ListSchemaMappingsCommand, + ListSchemaMappingsCommandInput, + ListSchemaMappingsCommandOutput, +} from "./commands/ListSchemaMappingsCommand"; +import { + ListTagsForResourceCommand, + ListTagsForResourceCommandInput, + ListTagsForResourceCommandOutput, +} from "./commands/ListTagsForResourceCommand"; +import { + StartMatchingJobCommand, + StartMatchingJobCommandInput, + StartMatchingJobCommandOutput, +} from "./commands/StartMatchingJobCommand"; +import { TagResourceCommand, TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand"; +import { + UntagResourceCommand, + UntagResourceCommandInput, + UntagResourceCommandOutput, +} from "./commands/UntagResourceCommand"; +import { + UpdateMatchingWorkflowCommand, + UpdateMatchingWorkflowCommandInput, + UpdateMatchingWorkflowCommandOutput, +} from "./commands/UpdateMatchingWorkflowCommand"; +import { EntityResolutionClient, EntityResolutionClientConfig } from "./EntityResolutionClient"; + +const commands = { + CreateMatchingWorkflowCommand, + CreateSchemaMappingCommand, + DeleteMatchingWorkflowCommand, + DeleteSchemaMappingCommand, + GetMatchIdCommand, + GetMatchingJobCommand, + GetMatchingWorkflowCommand, + GetSchemaMappingCommand, + ListMatchingJobsCommand, + ListMatchingWorkflowsCommand, + ListSchemaMappingsCommand, + ListTagsForResourceCommand, + StartMatchingJobCommand, + TagResourceCommand, + UntagResourceCommand, + UpdateMatchingWorkflowCommand, +}; + +export interface EntityResolution { + /** + * @see {@link CreateMatchingWorkflowCommand} + */ + createMatchingWorkflow( + args: CreateMatchingWorkflowCommandInput, + options?: __HttpHandlerOptions + ): Promise; + createMatchingWorkflow( + args: CreateMatchingWorkflowCommandInput, + cb: (err: any, data?: CreateMatchingWorkflowCommandOutput) => void + ): void; + createMatchingWorkflow( + args: CreateMatchingWorkflowCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateMatchingWorkflowCommandOutput) => void + ): void; + + /** + * @see {@link CreateSchemaMappingCommand} + */ + createSchemaMapping( + args: CreateSchemaMappingCommandInput, + options?: __HttpHandlerOptions + ): Promise; + createSchemaMapping( + args: CreateSchemaMappingCommandInput, + cb: (err: any, data?: CreateSchemaMappingCommandOutput) => void + ): void; + createSchemaMapping( + args: CreateSchemaMappingCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateSchemaMappingCommandOutput) => void + ): void; + + /** + * @see {@link DeleteMatchingWorkflowCommand} + */ + deleteMatchingWorkflow( + args: DeleteMatchingWorkflowCommandInput, + options?: __HttpHandlerOptions + ): Promise; + deleteMatchingWorkflow( + args: DeleteMatchingWorkflowCommandInput, + cb: (err: any, data?: DeleteMatchingWorkflowCommandOutput) => void + ): void; + deleteMatchingWorkflow( + args: DeleteMatchingWorkflowCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteMatchingWorkflowCommandOutput) => void + ): void; + + /** + * @see {@link DeleteSchemaMappingCommand} + */ + deleteSchemaMapping( + args: DeleteSchemaMappingCommandInput, + options?: __HttpHandlerOptions + ): Promise; + deleteSchemaMapping( + args: DeleteSchemaMappingCommandInput, + cb: (err: any, data?: DeleteSchemaMappingCommandOutput) => void + ): void; + deleteSchemaMapping( + args: DeleteSchemaMappingCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteSchemaMappingCommandOutput) => void + ): void; + + /** + * @see {@link GetMatchIdCommand} + */ + getMatchId(args: GetMatchIdCommandInput, options?: __HttpHandlerOptions): Promise; + getMatchId(args: GetMatchIdCommandInput, cb: (err: any, data?: GetMatchIdCommandOutput) => void): void; + getMatchId( + args: GetMatchIdCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetMatchIdCommandOutput) => void + ): void; + + /** + * @see {@link GetMatchingJobCommand} + */ + getMatchingJob( + args: GetMatchingJobCommandInput, + options?: __HttpHandlerOptions + ): Promise; + getMatchingJob(args: GetMatchingJobCommandInput, cb: (err: any, data?: GetMatchingJobCommandOutput) => void): void; + getMatchingJob( + args: GetMatchingJobCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetMatchingJobCommandOutput) => void + ): void; + + /** + * @see {@link GetMatchingWorkflowCommand} + */ + getMatchingWorkflow( + args: GetMatchingWorkflowCommandInput, + options?: __HttpHandlerOptions + ): Promise; + getMatchingWorkflow( + args: GetMatchingWorkflowCommandInput, + cb: (err: any, data?: GetMatchingWorkflowCommandOutput) => void + ): void; + getMatchingWorkflow( + args: GetMatchingWorkflowCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetMatchingWorkflowCommandOutput) => void + ): void; + + /** + * @see {@link GetSchemaMappingCommand} + */ + getSchemaMapping( + args: GetSchemaMappingCommandInput, + options?: __HttpHandlerOptions + ): Promise; + getSchemaMapping( + args: GetSchemaMappingCommandInput, + cb: (err: any, data?: GetSchemaMappingCommandOutput) => void + ): void; + getSchemaMapping( + args: GetSchemaMappingCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetSchemaMappingCommandOutput) => void + ): void; + + /** + * @see {@link ListMatchingJobsCommand} + */ + listMatchingJobs( + args: ListMatchingJobsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + listMatchingJobs( + args: ListMatchingJobsCommandInput, + cb: (err: any, data?: ListMatchingJobsCommandOutput) => void + ): void; + listMatchingJobs( + args: ListMatchingJobsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListMatchingJobsCommandOutput) => void + ): void; + + /** + * @see {@link ListMatchingWorkflowsCommand} + */ + listMatchingWorkflows( + args: ListMatchingWorkflowsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + listMatchingWorkflows( + args: ListMatchingWorkflowsCommandInput, + cb: (err: any, data?: ListMatchingWorkflowsCommandOutput) => void + ): void; + listMatchingWorkflows( + args: ListMatchingWorkflowsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListMatchingWorkflowsCommandOutput) => void + ): void; + + /** + * @see {@link ListSchemaMappingsCommand} + */ + listSchemaMappings( + args: ListSchemaMappingsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + listSchemaMappings( + args: ListSchemaMappingsCommandInput, + cb: (err: any, data?: ListSchemaMappingsCommandOutput) => void + ): void; + listSchemaMappings( + args: ListSchemaMappingsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListSchemaMappingsCommandOutput) => void + ): void; + + /** + * @see {@link ListTagsForResourceCommand} + */ + listTagsForResource( + args: ListTagsForResourceCommandInput, + options?: __HttpHandlerOptions + ): Promise; + listTagsForResource( + args: ListTagsForResourceCommandInput, + cb: (err: any, data?: ListTagsForResourceCommandOutput) => void + ): void; + listTagsForResource( + args: ListTagsForResourceCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListTagsForResourceCommandOutput) => void + ): void; + + /** + * @see {@link StartMatchingJobCommand} + */ + startMatchingJob( + args: StartMatchingJobCommandInput, + options?: __HttpHandlerOptions + ): Promise; + startMatchingJob( + args: StartMatchingJobCommandInput, + cb: (err: any, data?: StartMatchingJobCommandOutput) => void + ): void; + startMatchingJob( + args: StartMatchingJobCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: StartMatchingJobCommandOutput) => void + ): void; + + /** + * @see {@link TagResourceCommand} + */ + tagResource(args: TagResourceCommandInput, options?: __HttpHandlerOptions): Promise; + tagResource(args: TagResourceCommandInput, cb: (err: any, data?: TagResourceCommandOutput) => void): void; + tagResource( + args: TagResourceCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: TagResourceCommandOutput) => void + ): void; + + /** + * @see {@link UntagResourceCommand} + */ + untagResource(args: UntagResourceCommandInput, options?: __HttpHandlerOptions): Promise; + untagResource(args: UntagResourceCommandInput, cb: (err: any, data?: UntagResourceCommandOutput) => void): void; + untagResource( + args: UntagResourceCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UntagResourceCommandOutput) => void + ): void; + + /** + * @see {@link UpdateMatchingWorkflowCommand} + */ + updateMatchingWorkflow( + args: UpdateMatchingWorkflowCommandInput, + options?: __HttpHandlerOptions + ): Promise; + updateMatchingWorkflow( + args: UpdateMatchingWorkflowCommandInput, + cb: (err: any, data?: UpdateMatchingWorkflowCommandOutput) => void + ): void; + updateMatchingWorkflow( + args: UpdateMatchingWorkflowCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateMatchingWorkflowCommandOutput) => void + ): void; +} + +/** + * @public + *

Welcome to the AWS Entity Resolution API Reference.

+ *

AWS Entity Resolution is an AWS service that provides pre-configured entity resolution capabilities + * that enable developers and analysts at advertising and marketing companies to build an accurate and + * complete view of their consumers.

+ *

+ * With AWS Entity Resolution, you have the ability to match source records containing consumer identifiers, + * such as name, email address, and phone number. This holds true even when these records have incomplete or + * conflicting identifiers. For example, AWS Entity Resolution can effectively match a source record from a + * customer relationship management (CRM) system, which includes account information like first name, last name, + * postal address, phone number, and email address, with a source record from a marketing system containing + * campaign information, such as username and email address.

+ *

To learn more about AWS Entity Resolution concepts, procedures, and best practices, see the + * AWS Entity Resolution + * User Guide.

+ */ +export class EntityResolution extends EntityResolutionClient implements EntityResolution {} +createAggregatedClient(commands, EntityResolution); diff --git a/clients/client-entityresolution/src/EntityResolutionClient.ts b/clients/client-entityresolution/src/EntityResolutionClient.ts new file mode 100644 index 000000000000..0fd0534f872d --- /dev/null +++ b/clients/client-entityresolution/src/EntityResolutionClient.ts @@ -0,0 +1,362 @@ +// 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, + 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 { + CreateMatchingWorkflowCommandInput, + CreateMatchingWorkflowCommandOutput, +} from "./commands/CreateMatchingWorkflowCommand"; +import { + CreateSchemaMappingCommandInput, + CreateSchemaMappingCommandOutput, +} from "./commands/CreateSchemaMappingCommand"; +import { + DeleteMatchingWorkflowCommandInput, + DeleteMatchingWorkflowCommandOutput, +} from "./commands/DeleteMatchingWorkflowCommand"; +import { + DeleteSchemaMappingCommandInput, + DeleteSchemaMappingCommandOutput, +} from "./commands/DeleteSchemaMappingCommand"; +import { GetMatchIdCommandInput, GetMatchIdCommandOutput } from "./commands/GetMatchIdCommand"; +import { GetMatchingJobCommandInput, GetMatchingJobCommandOutput } from "./commands/GetMatchingJobCommand"; +import { + GetMatchingWorkflowCommandInput, + GetMatchingWorkflowCommandOutput, +} from "./commands/GetMatchingWorkflowCommand"; +import { GetSchemaMappingCommandInput, GetSchemaMappingCommandOutput } from "./commands/GetSchemaMappingCommand"; +import { ListMatchingJobsCommandInput, ListMatchingJobsCommandOutput } from "./commands/ListMatchingJobsCommand"; +import { + ListMatchingWorkflowsCommandInput, + ListMatchingWorkflowsCommandOutput, +} from "./commands/ListMatchingWorkflowsCommand"; +import { ListSchemaMappingsCommandInput, ListSchemaMappingsCommandOutput } from "./commands/ListSchemaMappingsCommand"; +import { + ListTagsForResourceCommandInput, + ListTagsForResourceCommandOutput, +} from "./commands/ListTagsForResourceCommand"; +import { StartMatchingJobCommandInput, StartMatchingJobCommandOutput } from "./commands/StartMatchingJobCommand"; +import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand"; +import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand"; +import { + UpdateMatchingWorkflowCommandInput, + UpdateMatchingWorkflowCommandOutput, +} from "./commands/UpdateMatchingWorkflowCommand"; +import { + ClientInputEndpointParameters, + ClientResolvedEndpointParameters, + EndpointParameters, + resolveClientEndpointParameters, +} from "./endpoint/EndpointParameters"; +import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig"; + +export { __Client }; + +/** + * @public + */ +export type ServiceInputTypes = + | CreateMatchingWorkflowCommandInput + | CreateSchemaMappingCommandInput + | DeleteMatchingWorkflowCommandInput + | DeleteSchemaMappingCommandInput + | GetMatchIdCommandInput + | GetMatchingJobCommandInput + | GetMatchingWorkflowCommandInput + | GetSchemaMappingCommandInput + | ListMatchingJobsCommandInput + | ListMatchingWorkflowsCommandInput + | ListSchemaMappingsCommandInput + | ListTagsForResourceCommandInput + | StartMatchingJobCommandInput + | TagResourceCommandInput + | UntagResourceCommandInput + | UpdateMatchingWorkflowCommandInput; + +/** + * @public + */ +export type ServiceOutputTypes = + | CreateMatchingWorkflowCommandOutput + | CreateSchemaMappingCommandOutput + | DeleteMatchingWorkflowCommandOutput + | DeleteSchemaMappingCommandOutput + | GetMatchIdCommandOutput + | GetMatchingJobCommandOutput + | GetMatchingWorkflowCommandOutput + | GetSchemaMappingCommandOutput + | ListMatchingJobsCommandOutput + | ListMatchingWorkflowsCommandOutput + | ListSchemaMappingsCommandOutput + | ListTagsForResourceCommandOutput + | StartMatchingJobCommandOutput + | TagResourceCommandOutput + | UntagResourceCommandOutput + | UpdateMatchingWorkflowCommandOutput; + +/** + * @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. + */ + retryMode?: string | __Provider; + + /** + * Optional logger for logging debug/info/warn/error. + */ + logger?: __Logger; + + /** + * 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 EntityResolutionClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> & + ClientDefaults & + RegionInputConfig & + EndpointInputConfig & + RetryInputConfig & + HostHeaderInputConfig & + AwsAuthInputConfig & + UserAgentInputConfig & + ClientInputEndpointParameters; +/** + * @public + * + * The configuration interface of EntityResolutionClient class constructor that set the region, credentials and other options. + */ +export interface EntityResolutionClientConfig extends EntityResolutionClientConfigType {} + +/** + * @public + */ +export type EntityResolutionClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> & + Required & + RegionResolvedConfig & + EndpointResolvedConfig & + RetryResolvedConfig & + HostHeaderResolvedConfig & + AwsAuthResolvedConfig & + UserAgentResolvedConfig & + ClientResolvedEndpointParameters; +/** + * @public + * + * The resolved configuration interface of EntityResolutionClient class. This is resolved and normalized from the {@link EntityResolutionClientConfig | constructor configuration interface}. + */ +export interface EntityResolutionClientResolvedConfig extends EntityResolutionClientResolvedConfigType {} + +/** + * @public + *

Welcome to the AWS Entity Resolution API Reference.

+ *

AWS Entity Resolution is an AWS service that provides pre-configured entity resolution capabilities + * that enable developers and analysts at advertising and marketing companies to build an accurate and + * complete view of their consumers.

+ *

+ * With AWS Entity Resolution, you have the ability to match source records containing consumer identifiers, + * such as name, email address, and phone number. This holds true even when these records have incomplete or + * conflicting identifiers. For example, AWS Entity Resolution can effectively match a source record from a + * customer relationship management (CRM) system, which includes account information like first name, last name, + * postal address, phone number, and email address, with a source record from a marketing system containing + * campaign information, such as username and email address.

+ *

To learn more about AWS Entity Resolution concepts, procedures, and best practices, see the + * AWS Entity Resolution + * User Guide.

+ */ +export class EntityResolutionClient extends __Client< + __HttpHandlerOptions, + ServiceInputTypes, + ServiceOutputTypes, + EntityResolutionClientResolvedConfig +> { + /** + * The resolved configuration of EntityResolutionClient class. This is resolved and normalized from the {@link EntityResolutionClientConfig | constructor configuration interface}. + */ + readonly config: EntityResolutionClientResolvedConfig; + + constructor(configuration: EntityResolutionClientConfig) { + 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); + super(_config_7); + this.config = _config_7; + 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-entityresolution/src/commands/CreateMatchingWorkflowCommand.ts b/clients/client-entityresolution/src/commands/CreateMatchingWorkflowCommand.ts new file mode 100644 index 000000000000..5476c7d8eda8 --- /dev/null +++ b/clients/client-entityresolution/src/commands/CreateMatchingWorkflowCommand.ts @@ -0,0 +1,252 @@ +// 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, +} from "@smithy/types"; + +import { EntityResolutionClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EntityResolutionClient"; +import { CreateMatchingWorkflowInput, CreateMatchingWorkflowOutput } from "../models/models_0"; +import { de_CreateMatchingWorkflowCommand, se_CreateMatchingWorkflowCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link CreateMatchingWorkflowCommand}. + */ +export interface CreateMatchingWorkflowCommandInput extends CreateMatchingWorkflowInput {} +/** + * @public + * + * The output of {@link CreateMatchingWorkflowCommand}. + */ +export interface CreateMatchingWorkflowCommandOutput extends CreateMatchingWorkflowOutput, __MetadataBearer {} + +/** + * @public + *

Creates a MatchingWorkflow object which stores the configuration of the data processing job + * to be run. It is important to note that there should not be a pre-existing MatchingWorkflow + * with the same name. To modify an existing workflow, utilize the UpdateMatchingWorkflow API.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { EntityResolutionClient, CreateMatchingWorkflowCommand } from "@aws-sdk/client-entityresolution"; // ES Modules import + * // const { EntityResolutionClient, CreateMatchingWorkflowCommand } = require("@aws-sdk/client-entityresolution"); // CommonJS import + * const client = new EntityResolutionClient(config); + * const input = { // CreateMatchingWorkflowInput + * workflowName: "STRING_VALUE", // required + * description: "STRING_VALUE", + * inputSourceConfig: [ // InputSourceConfig // required + * { // InputSource + * inputSourceARN: "STRING_VALUE", // required + * schemaName: "STRING_VALUE", // required + * applyNormalization: true || false, + * }, + * ], + * outputSourceConfig: [ // OutputSourceConfig // required + * { // OutputSource + * outputS3Path: "STRING_VALUE", // required + * output: [ // OutputAttributes // required + * { // OutputAttribute + * name: "STRING_VALUE", // required + * hashed: true || false, + * }, + * ], + * KMSArn: "STRING_VALUE", + * applyNormalization: true || false, + * }, + * ], + * resolutionTechniques: { // ResolutionTechniques + * resolutionType: "RULE_MATCHING" || "ML_MATCHING", + * ruleBasedProperties: { // RuleBasedProperties + * rules: [ // RuleList // required + * { // Rule + * ruleName: "STRING_VALUE", // required + * matchingKeys: [ // MatchingKeys // required + * "STRING_VALUE", + * ], + * }, + * ], + * attributeMatchingModel: "ONE_TO_ONE" || "MANY_TO_MANY", // required + * }, + * }, + * incrementalRunConfig: { // IncrementalRunConfig + * incrementalRunType: "IMMEDIATE", + * }, + * roleArn: "STRING_VALUE", // required + * tags: { // TagMap + * "": "STRING_VALUE", + * }, + * }; + * const command = new CreateMatchingWorkflowCommand(input); + * const response = await client.send(command); + * // { // CreateMatchingWorkflowOutput + * // workflowName: "STRING_VALUE", // required + * // workflowArn: "STRING_VALUE", // required + * // description: "STRING_VALUE", + * // inputSourceConfig: [ // InputSourceConfig // required + * // { // InputSource + * // inputSourceARN: "STRING_VALUE", // required + * // schemaName: "STRING_VALUE", // required + * // applyNormalization: true || false, + * // }, + * // ], + * // outputSourceConfig: [ // OutputSourceConfig // required + * // { // OutputSource + * // outputS3Path: "STRING_VALUE", // required + * // output: [ // OutputAttributes // required + * // { // OutputAttribute + * // name: "STRING_VALUE", // required + * // hashed: true || false, + * // }, + * // ], + * // KMSArn: "STRING_VALUE", + * // applyNormalization: true || false, + * // }, + * // ], + * // resolutionTechniques: { // ResolutionTechniques + * // resolutionType: "RULE_MATCHING" || "ML_MATCHING", + * // ruleBasedProperties: { // RuleBasedProperties + * // rules: [ // RuleList // required + * // { // Rule + * // ruleName: "STRING_VALUE", // required + * // matchingKeys: [ // MatchingKeys // required + * // "STRING_VALUE", + * // ], + * // }, + * // ], + * // attributeMatchingModel: "ONE_TO_ONE" || "MANY_TO_MANY", // required + * // }, + * // }, + * // incrementalRunConfig: { // IncrementalRunConfig + * // incrementalRunType: "IMMEDIATE", + * // }, + * // roleArn: "STRING_VALUE", // required + * // }; + * + * ``` + * + * @param CreateMatchingWorkflowCommandInput - {@link CreateMatchingWorkflowCommandInput} + * @returns {@link CreateMatchingWorkflowCommandOutput} + * @see {@link CreateMatchingWorkflowCommandInput} for command's `input` shape. + * @see {@link CreateMatchingWorkflowCommandOutput} for command's `response` shape. + * @see {@link EntityResolutionClientResolvedConfig | config} for EntityResolutionClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You do not have sufficient access to perform this action. HTTP Status Code: 403 + *

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

The request could not be processed because of conflict in the current state of the resource. Example: Workflow already exists, + * Schema already exists, Workflow is currently running, etc. HTTP Status Code: 400 + *

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

The request was rejected because it attempted to create resources beyond the current AWS Entity Resolution account limits. + * The error message describes the limit exceeded. HTTP Status Code: 402 + *

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

This exception occurs when there is an internal failure in the AWS Entity Resolution service. HTTP Status Code: 500 + *

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

The request was denied due to request throttling. HTTP Status Code: 429 + *

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

The input fails to satisfy the constraints specified by AWS Entity Resolution. HTTP Status Code: 400 + *

+ * + * @throws {@link EntityResolutionServiceException} + *

Base exception class for all service exceptions from EntityResolution service.

+ * + */ +export class CreateMatchingWorkflowCommand extends $Command< + CreateMatchingWorkflowCommandInput, + CreateMatchingWorkflowCommandOutput, + EntityResolutionClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + 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: CreateMatchingWorkflowCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: EntityResolutionClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, CreateMatchingWorkflowCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "EntityResolutionClient"; + const commandName = "CreateMatchingWorkflowCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: CreateMatchingWorkflowCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_CreateMatchingWorkflowCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_CreateMatchingWorkflowCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-entityresolution/src/commands/CreateSchemaMappingCommand.ts b/clients/client-entityresolution/src/commands/CreateSchemaMappingCommand.ts new file mode 100644 index 000000000000..338ed22d45b2 --- /dev/null +++ b/clients/client-entityresolution/src/commands/CreateSchemaMappingCommand.ts @@ -0,0 +1,192 @@ +// 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, +} from "@smithy/types"; + +import { EntityResolutionClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EntityResolutionClient"; +import { CreateSchemaMappingInput, CreateSchemaMappingOutput } from "../models/models_0"; +import { de_CreateSchemaMappingCommand, se_CreateSchemaMappingCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link CreateSchemaMappingCommand}. + */ +export interface CreateSchemaMappingCommandInput extends CreateSchemaMappingInput {} +/** + * @public + * + * The output of {@link CreateSchemaMappingCommand}. + */ +export interface CreateSchemaMappingCommandOutput extends CreateSchemaMappingOutput, __MetadataBearer {} + +/** + * @public + *

Creates a schema mapping, which defines the schema of the input customer records table. + * The SchemaMapping also provides Entity Resolution with some metadata about the + * table, such as the attribute types of the columns and which columns to match on.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { EntityResolutionClient, CreateSchemaMappingCommand } from "@aws-sdk/client-entityresolution"; // ES Modules import + * // const { EntityResolutionClient, CreateSchemaMappingCommand } = require("@aws-sdk/client-entityresolution"); // CommonJS import + * const client = new EntityResolutionClient(config); + * const input = { // CreateSchemaMappingInput + * schemaName: "STRING_VALUE", // required + * description: "STRING_VALUE", + * mappedInputFields: [ // SchemaInputAttributes + * { // SchemaInputAttribute + * fieldName: "STRING_VALUE", // required + * type: "NAME" || "NAME_FIRST" || "NAME_MIDDLE" || "NAME_LAST" || "ADDRESS" || "ADDRESS_STREET1" || "ADDRESS_STREET2" || "ADDRESS_STREET3" || "ADDRESS_CITY" || "ADDRESS_STATE" || "ADDRESS_COUNTRY" || "ADDRESS_POSTALCODE" || "PHONE" || "PHONE_NUMBER" || "PHONE_COUNTRYCODE" || "EMAIL_ADDRESS" || "UNIQUE_ID" || "DATE" || "STRING", // required + * groupName: "STRING_VALUE", + * matchKey: "STRING_VALUE", + * }, + * ], + * tags: { // TagMap + * "": "STRING_VALUE", + * }, + * }; + * const command = new CreateSchemaMappingCommand(input); + * const response = await client.send(command); + * // { // CreateSchemaMappingOutput + * // schemaName: "STRING_VALUE", // required + * // schemaArn: "STRING_VALUE", // required + * // description: "STRING_VALUE", // required + * // mappedInputFields: [ // SchemaInputAttributes // required + * // { // SchemaInputAttribute + * // fieldName: "STRING_VALUE", // required + * // type: "NAME" || "NAME_FIRST" || "NAME_MIDDLE" || "NAME_LAST" || "ADDRESS" || "ADDRESS_STREET1" || "ADDRESS_STREET2" || "ADDRESS_STREET3" || "ADDRESS_CITY" || "ADDRESS_STATE" || "ADDRESS_COUNTRY" || "ADDRESS_POSTALCODE" || "PHONE" || "PHONE_NUMBER" || "PHONE_COUNTRYCODE" || "EMAIL_ADDRESS" || "UNIQUE_ID" || "DATE" || "STRING", // required + * // groupName: "STRING_VALUE", + * // matchKey: "STRING_VALUE", + * // }, + * // ], + * // }; + * + * ``` + * + * @param CreateSchemaMappingCommandInput - {@link CreateSchemaMappingCommandInput} + * @returns {@link CreateSchemaMappingCommandOutput} + * @see {@link CreateSchemaMappingCommandInput} for command's `input` shape. + * @see {@link CreateSchemaMappingCommandOutput} for command's `response` shape. + * @see {@link EntityResolutionClientResolvedConfig | config} for EntityResolutionClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You do not have sufficient access to perform this action. HTTP Status Code: 403 + *

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

The request could not be processed because of conflict in the current state of the resource. Example: Workflow already exists, + * Schema already exists, Workflow is currently running, etc. HTTP Status Code: 400 + *

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

The request was rejected because it attempted to create resources beyond the current AWS Entity Resolution account limits. + * The error message describes the limit exceeded. HTTP Status Code: 402 + *

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

This exception occurs when there is an internal failure in the AWS Entity Resolution service. HTTP Status Code: 500 + *

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

The request was denied due to request throttling. HTTP Status Code: 429 + *

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

The input fails to satisfy the constraints specified by AWS Entity Resolution. HTTP Status Code: 400 + *

+ * + * @throws {@link EntityResolutionServiceException} + *

Base exception class for all service exceptions from EntityResolution service.

+ * + */ +export class CreateSchemaMappingCommand extends $Command< + CreateSchemaMappingCommandInput, + CreateSchemaMappingCommandOutput, + EntityResolutionClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + 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: CreateSchemaMappingCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: EntityResolutionClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, CreateSchemaMappingCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "EntityResolutionClient"; + const commandName = "CreateSchemaMappingCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: CreateSchemaMappingCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_CreateSchemaMappingCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_CreateSchemaMappingCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-entityresolution/src/commands/DeleteMatchingWorkflowCommand.ts b/clients/client-entityresolution/src/commands/DeleteMatchingWorkflowCommand.ts new file mode 100644 index 000000000000..9fcb92692af4 --- /dev/null +++ b/clients/client-entityresolution/src/commands/DeleteMatchingWorkflowCommand.ts @@ -0,0 +1,159 @@ +// 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, +} from "@smithy/types"; + +import { EntityResolutionClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EntityResolutionClient"; +import { DeleteMatchingWorkflowInput, DeleteMatchingWorkflowOutput } from "../models/models_0"; +import { de_DeleteMatchingWorkflowCommand, se_DeleteMatchingWorkflowCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link DeleteMatchingWorkflowCommand}. + */ +export interface DeleteMatchingWorkflowCommandInput extends DeleteMatchingWorkflowInput {} +/** + * @public + * + * The output of {@link DeleteMatchingWorkflowCommand}. + */ +export interface DeleteMatchingWorkflowCommandOutput extends DeleteMatchingWorkflowOutput, __MetadataBearer {} + +/** + * @public + *

Deletes the MatchingWorkflow with a given name. This operation will succeed even if a + * workflow with the given name does not exist.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { EntityResolutionClient, DeleteMatchingWorkflowCommand } from "@aws-sdk/client-entityresolution"; // ES Modules import + * // const { EntityResolutionClient, DeleteMatchingWorkflowCommand } = require("@aws-sdk/client-entityresolution"); // CommonJS import + * const client = new EntityResolutionClient(config); + * const input = { // DeleteMatchingWorkflowInput + * workflowName: "STRING_VALUE", // required + * }; + * const command = new DeleteMatchingWorkflowCommand(input); + * const response = await client.send(command); + * // { // DeleteMatchingWorkflowOutput + * // message: "STRING_VALUE", // required + * // }; + * + * ``` + * + * @param DeleteMatchingWorkflowCommandInput - {@link DeleteMatchingWorkflowCommandInput} + * @returns {@link DeleteMatchingWorkflowCommandOutput} + * @see {@link DeleteMatchingWorkflowCommandInput} for command's `input` shape. + * @see {@link DeleteMatchingWorkflowCommandOutput} for command's `response` shape. + * @see {@link EntityResolutionClientResolvedConfig | config} for EntityResolutionClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You do not have sufficient access to perform this action. HTTP Status Code: 403 + *

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

This exception occurs when there is an internal failure in the AWS Entity Resolution service. HTTP Status Code: 500 + *

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

The request was denied due to request throttling. HTTP Status Code: 429 + *

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

The input fails to satisfy the constraints specified by AWS Entity Resolution. HTTP Status Code: 400 + *

+ * + * @throws {@link EntityResolutionServiceException} + *

Base exception class for all service exceptions from EntityResolution service.

+ * + */ +export class DeleteMatchingWorkflowCommand extends $Command< + DeleteMatchingWorkflowCommandInput, + DeleteMatchingWorkflowCommandOutput, + EntityResolutionClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + 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: DeleteMatchingWorkflowCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: EntityResolutionClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, DeleteMatchingWorkflowCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "EntityResolutionClient"; + const commandName = "DeleteMatchingWorkflowCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: DeleteMatchingWorkflowCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_DeleteMatchingWorkflowCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_DeleteMatchingWorkflowCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-entityresolution/src/commands/DeleteSchemaMappingCommand.ts b/clients/client-entityresolution/src/commands/DeleteSchemaMappingCommand.ts new file mode 100644 index 000000000000..039c96221704 --- /dev/null +++ b/clients/client-entityresolution/src/commands/DeleteSchemaMappingCommand.ts @@ -0,0 +1,165 @@ +// 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, +} from "@smithy/types"; + +import { EntityResolutionClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EntityResolutionClient"; +import { DeleteSchemaMappingInput, DeleteSchemaMappingOutput } from "../models/models_0"; +import { de_DeleteSchemaMappingCommand, se_DeleteSchemaMappingCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link DeleteSchemaMappingCommand}. + */ +export interface DeleteSchemaMappingCommandInput extends DeleteSchemaMappingInput {} +/** + * @public + * + * The output of {@link DeleteSchemaMappingCommand}. + */ +export interface DeleteSchemaMappingCommandOutput extends DeleteSchemaMappingOutput, __MetadataBearer {} + +/** + * @public + *

Deletes the SchemaMapping with a given name. This operation will succeed even if a schema + * with the given name does not exist. This operation will fail if there is a DataIntegrationWorkflow + * object that references the SchemaMapping in the workflow's InputSourceConfig.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { EntityResolutionClient, DeleteSchemaMappingCommand } from "@aws-sdk/client-entityresolution"; // ES Modules import + * // const { EntityResolutionClient, DeleteSchemaMappingCommand } = require("@aws-sdk/client-entityresolution"); // CommonJS import + * const client = new EntityResolutionClient(config); + * const input = { // DeleteSchemaMappingInput + * schemaName: "STRING_VALUE", // required + * }; + * const command = new DeleteSchemaMappingCommand(input); + * const response = await client.send(command); + * // { // DeleteSchemaMappingOutput + * // message: "STRING_VALUE", // required + * // }; + * + * ``` + * + * @param DeleteSchemaMappingCommandInput - {@link DeleteSchemaMappingCommandInput} + * @returns {@link DeleteSchemaMappingCommandOutput} + * @see {@link DeleteSchemaMappingCommandInput} for command's `input` shape. + * @see {@link DeleteSchemaMappingCommandOutput} for command's `response` shape. + * @see {@link EntityResolutionClientResolvedConfig | config} for EntityResolutionClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You do not have sufficient access to perform this action. HTTP Status Code: 403 + *

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

The request could not be processed because of conflict in the current state of the resource. Example: Workflow already exists, + * Schema already exists, Workflow is currently running, etc. HTTP Status Code: 400 + *

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

This exception occurs when there is an internal failure in the AWS Entity Resolution service. HTTP Status Code: 500 + *

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

The request was denied due to request throttling. HTTP Status Code: 429 + *

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

The input fails to satisfy the constraints specified by AWS Entity Resolution. HTTP Status Code: 400 + *

+ * + * @throws {@link EntityResolutionServiceException} + *

Base exception class for all service exceptions from EntityResolution service.

+ * + */ +export class DeleteSchemaMappingCommand extends $Command< + DeleteSchemaMappingCommandInput, + DeleteSchemaMappingCommandOutput, + EntityResolutionClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + 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: DeleteSchemaMappingCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: EntityResolutionClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, DeleteSchemaMappingCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "EntityResolutionClient"; + const commandName = "DeleteSchemaMappingCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: DeleteSchemaMappingCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_DeleteSchemaMappingCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_DeleteSchemaMappingCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-entityresolution/src/commands/GetMatchIdCommand.ts b/clients/client-entityresolution/src/commands/GetMatchIdCommand.ts new file mode 100644 index 000000000000..c388660f7747 --- /dev/null +++ b/clients/client-entityresolution/src/commands/GetMatchIdCommand.ts @@ -0,0 +1,163 @@ +// 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, +} from "@smithy/types"; + +import { EntityResolutionClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EntityResolutionClient"; +import { GetMatchIdInput, GetMatchIdInputFilterSensitiveLog, GetMatchIdOutput } from "../models/models_0"; +import { de_GetMatchIdCommand, se_GetMatchIdCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link GetMatchIdCommand}. + */ +export interface GetMatchIdCommandInput extends GetMatchIdInput {} +/** + * @public + * + * The output of {@link GetMatchIdCommand}. + */ +export interface GetMatchIdCommandOutput extends GetMatchIdOutput, __MetadataBearer {} + +/** + * @public + *

Returns the corresponding Match ID of a customer record if the record has been processed.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { EntityResolutionClient, GetMatchIdCommand } from "@aws-sdk/client-entityresolution"; // ES Modules import + * // const { EntityResolutionClient, GetMatchIdCommand } = require("@aws-sdk/client-entityresolution"); // CommonJS import + * const client = new EntityResolutionClient(config); + * const input = { // GetMatchIdInput + * workflowName: "STRING_VALUE", // required + * record: { // RecordAttributeMap // required + * "": "STRING_VALUE", + * }, + * }; + * const command = new GetMatchIdCommand(input); + * const response = await client.send(command); + * // { // GetMatchIdOutput + * // matchId: "STRING_VALUE", + * // }; + * + * ``` + * + * @param GetMatchIdCommandInput - {@link GetMatchIdCommandInput} + * @returns {@link GetMatchIdCommandOutput} + * @see {@link GetMatchIdCommandInput} for command's `input` shape. + * @see {@link GetMatchIdCommandOutput} for command's `response` shape. + * @see {@link EntityResolutionClientResolvedConfig | config} for EntityResolutionClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You do not have sufficient access to perform this action. HTTP Status Code: 403 + *

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

This exception occurs when there is an internal failure in the AWS Entity Resolution service. HTTP Status Code: 500 + *

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

The resource could not be found. HTTP Status Code: 404 + *

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

The request was denied due to request throttling. HTTP Status Code: 429 + *

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

The input fails to satisfy the constraints specified by AWS Entity Resolution. HTTP Status Code: 400 + *

+ * + * @throws {@link EntityResolutionServiceException} + *

Base exception class for all service exceptions from EntityResolution service.

+ * + */ +export class GetMatchIdCommand extends $Command< + GetMatchIdCommandInput, + GetMatchIdCommandOutput, + EntityResolutionClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + 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: GetMatchIdCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: EntityResolutionClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(getEndpointPlugin(configuration, GetMatchIdCommand.getEndpointParameterInstructions())); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "EntityResolutionClient"; + const commandName = "GetMatchIdCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: GetMatchIdInputFilterSensitiveLog, + outputFilterSensitiveLog: (_: any) => _, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: GetMatchIdCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_GetMatchIdCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_GetMatchIdCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-entityresolution/src/commands/GetMatchingJobCommand.ts b/clients/client-entityresolution/src/commands/GetMatchingJobCommand.ts new file mode 100644 index 000000000000..1253453bfa80 --- /dev/null +++ b/clients/client-entityresolution/src/commands/GetMatchingJobCommand.ts @@ -0,0 +1,175 @@ +// 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, +} from "@smithy/types"; + +import { EntityResolutionClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EntityResolutionClient"; +import { GetMatchingJobInput, GetMatchingJobOutput } from "../models/models_0"; +import { de_GetMatchingJobCommand, se_GetMatchingJobCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link GetMatchingJobCommand}. + */ +export interface GetMatchingJobCommandInput extends GetMatchingJobInput {} +/** + * @public + * + * The output of {@link GetMatchingJobCommand}. + */ +export interface GetMatchingJobCommandOutput extends GetMatchingJobOutput, __MetadataBearer {} + +/** + * @public + *

Gets the status, metrics, and errors (if there are any) that are associated with a job.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { EntityResolutionClient, GetMatchingJobCommand } from "@aws-sdk/client-entityresolution"; // ES Modules import + * // const { EntityResolutionClient, GetMatchingJobCommand } = require("@aws-sdk/client-entityresolution"); // CommonJS import + * const client = new EntityResolutionClient(config); + * const input = { // GetMatchingJobInput + * workflowName: "STRING_VALUE", // required + * jobId: "STRING_VALUE", // required + * }; + * const command = new GetMatchingJobCommand(input); + * const response = await client.send(command); + * // { // GetMatchingJobOutput + * // jobId: "STRING_VALUE", // required + * // status: "RUNNING" || "SUCCEEDED" || "FAILED" || "QUEUED", // required + * // startTime: new Date("TIMESTAMP"), // required + * // endTime: new Date("TIMESTAMP"), + * // metrics: { // JobMetrics + * // inputRecords: Number("int"), + * // totalRecordsProcessed: Number("int"), + * // matchIDs: Number("int"), + * // recordsNotProcessed: Number("int"), + * // }, + * // errorDetails: { // ErrorDetails + * // errorMessage: "STRING_VALUE", + * // }, + * // }; + * + * ``` + * + * @param GetMatchingJobCommandInput - {@link GetMatchingJobCommandInput} + * @returns {@link GetMatchingJobCommandOutput} + * @see {@link GetMatchingJobCommandInput} for command's `input` shape. + * @see {@link GetMatchingJobCommandOutput} for command's `response` shape. + * @see {@link EntityResolutionClientResolvedConfig | config} for EntityResolutionClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You do not have sufficient access to perform this action. HTTP Status Code: 403 + *

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

This exception occurs when there is an internal failure in the AWS Entity Resolution service. HTTP Status Code: 500 + *

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

The resource could not be found. HTTP Status Code: 404 + *

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

The request was denied due to request throttling. HTTP Status Code: 429 + *

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

The input fails to satisfy the constraints specified by AWS Entity Resolution. HTTP Status Code: 400 + *

+ * + * @throws {@link EntityResolutionServiceException} + *

Base exception class for all service exceptions from EntityResolution service.

+ * + */ +export class GetMatchingJobCommand extends $Command< + GetMatchingJobCommandInput, + GetMatchingJobCommandOutput, + EntityResolutionClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + 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: GetMatchingJobCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: EntityResolutionClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, GetMatchingJobCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "EntityResolutionClient"; + const commandName = "GetMatchingJobCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: GetMatchingJobCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_GetMatchingJobCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_GetMatchingJobCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-entityresolution/src/commands/GetMatchingWorkflowCommand.ts b/clients/client-entityresolution/src/commands/GetMatchingWorkflowCommand.ts new file mode 100644 index 000000000000..35ec8c20d834 --- /dev/null +++ b/clients/client-entityresolution/src/commands/GetMatchingWorkflowCommand.ts @@ -0,0 +1,207 @@ +// 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, +} from "@smithy/types"; + +import { EntityResolutionClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EntityResolutionClient"; +import { GetMatchingWorkflowInput, GetMatchingWorkflowOutput } from "../models/models_0"; +import { de_GetMatchingWorkflowCommand, se_GetMatchingWorkflowCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link GetMatchingWorkflowCommand}. + */ +export interface GetMatchingWorkflowCommandInput extends GetMatchingWorkflowInput {} +/** + * @public + * + * The output of {@link GetMatchingWorkflowCommand}. + */ +export interface GetMatchingWorkflowCommandOutput extends GetMatchingWorkflowOutput, __MetadataBearer {} + +/** + * @public + *

Returns the MatchingWorkflow with a given name, if it exists.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { EntityResolutionClient, GetMatchingWorkflowCommand } from "@aws-sdk/client-entityresolution"; // ES Modules import + * // const { EntityResolutionClient, GetMatchingWorkflowCommand } = require("@aws-sdk/client-entityresolution"); // CommonJS import + * const client = new EntityResolutionClient(config); + * const input = { // GetMatchingWorkflowInput + * workflowName: "STRING_VALUE", // required + * }; + * const command = new GetMatchingWorkflowCommand(input); + * const response = await client.send(command); + * // { // GetMatchingWorkflowOutput + * // workflowName: "STRING_VALUE", // required + * // workflowArn: "STRING_VALUE", // required + * // description: "STRING_VALUE", + * // inputSourceConfig: [ // InputSourceConfig // required + * // { // InputSource + * // inputSourceARN: "STRING_VALUE", // required + * // schemaName: "STRING_VALUE", // required + * // applyNormalization: true || false, + * // }, + * // ], + * // outputSourceConfig: [ // OutputSourceConfig // required + * // { // OutputSource + * // outputS3Path: "STRING_VALUE", // required + * // output: [ // OutputAttributes // required + * // { // OutputAttribute + * // name: "STRING_VALUE", // required + * // hashed: true || false, + * // }, + * // ], + * // KMSArn: "STRING_VALUE", + * // applyNormalization: true || false, + * // }, + * // ], + * // resolutionTechniques: { // ResolutionTechniques + * // resolutionType: "RULE_MATCHING" || "ML_MATCHING", + * // ruleBasedProperties: { // RuleBasedProperties + * // rules: [ // RuleList // required + * // { // Rule + * // ruleName: "STRING_VALUE", // required + * // matchingKeys: [ // MatchingKeys // required + * // "STRING_VALUE", + * // ], + * // }, + * // ], + * // attributeMatchingModel: "ONE_TO_ONE" || "MANY_TO_MANY", // required + * // }, + * // }, + * // createdAt: new Date("TIMESTAMP"), // required + * // updatedAt: new Date("TIMESTAMP"), // required + * // incrementalRunConfig: { // IncrementalRunConfig + * // incrementalRunType: "IMMEDIATE", + * // }, + * // roleArn: "STRING_VALUE", // required + * // tags: { // TagMap + * // "": "STRING_VALUE", + * // }, + * // }; + * + * ``` + * + * @param GetMatchingWorkflowCommandInput - {@link GetMatchingWorkflowCommandInput} + * @returns {@link GetMatchingWorkflowCommandOutput} + * @see {@link GetMatchingWorkflowCommandInput} for command's `input` shape. + * @see {@link GetMatchingWorkflowCommandOutput} for command's `response` shape. + * @see {@link EntityResolutionClientResolvedConfig | config} for EntityResolutionClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You do not have sufficient access to perform this action. HTTP Status Code: 403 + *

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

This exception occurs when there is an internal failure in the AWS Entity Resolution service. HTTP Status Code: 500 + *

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

The resource could not be found. HTTP Status Code: 404 + *

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

The request was denied due to request throttling. HTTP Status Code: 429 + *

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

The input fails to satisfy the constraints specified by AWS Entity Resolution. HTTP Status Code: 400 + *

+ * + * @throws {@link EntityResolutionServiceException} + *

Base exception class for all service exceptions from EntityResolution service.

+ * + */ +export class GetMatchingWorkflowCommand extends $Command< + GetMatchingWorkflowCommandInput, + GetMatchingWorkflowCommandOutput, + EntityResolutionClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + 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: GetMatchingWorkflowCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: EntityResolutionClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, GetMatchingWorkflowCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "EntityResolutionClient"; + const commandName = "GetMatchingWorkflowCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: GetMatchingWorkflowCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_GetMatchingWorkflowCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_GetMatchingWorkflowCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-entityresolution/src/commands/GetSchemaMappingCommand.ts b/clients/client-entityresolution/src/commands/GetSchemaMappingCommand.ts new file mode 100644 index 000000000000..5a6683518f80 --- /dev/null +++ b/clients/client-entityresolution/src/commands/GetSchemaMappingCommand.ts @@ -0,0 +1,177 @@ +// 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, +} from "@smithy/types"; + +import { EntityResolutionClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EntityResolutionClient"; +import { GetSchemaMappingInput, GetSchemaMappingOutput } from "../models/models_0"; +import { de_GetSchemaMappingCommand, se_GetSchemaMappingCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link GetSchemaMappingCommand}. + */ +export interface GetSchemaMappingCommandInput extends GetSchemaMappingInput {} +/** + * @public + * + * The output of {@link GetSchemaMappingCommand}. + */ +export interface GetSchemaMappingCommandOutput extends GetSchemaMappingOutput, __MetadataBearer {} + +/** + * @public + *

Returns the SchemaMapping of a given name.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { EntityResolutionClient, GetSchemaMappingCommand } from "@aws-sdk/client-entityresolution"; // ES Modules import + * // const { EntityResolutionClient, GetSchemaMappingCommand } = require("@aws-sdk/client-entityresolution"); // CommonJS import + * const client = new EntityResolutionClient(config); + * const input = { // GetSchemaMappingInput + * schemaName: "STRING_VALUE", // required + * }; + * const command = new GetSchemaMappingCommand(input); + * const response = await client.send(command); + * // { // GetSchemaMappingOutput + * // schemaName: "STRING_VALUE", // required + * // schemaArn: "STRING_VALUE", // required + * // description: "STRING_VALUE", + * // mappedInputFields: [ // SchemaInputAttributes // required + * // { // SchemaInputAttribute + * // fieldName: "STRING_VALUE", // required + * // type: "NAME" || "NAME_FIRST" || "NAME_MIDDLE" || "NAME_LAST" || "ADDRESS" || "ADDRESS_STREET1" || "ADDRESS_STREET2" || "ADDRESS_STREET3" || "ADDRESS_CITY" || "ADDRESS_STATE" || "ADDRESS_COUNTRY" || "ADDRESS_POSTALCODE" || "PHONE" || "PHONE_NUMBER" || "PHONE_COUNTRYCODE" || "EMAIL_ADDRESS" || "UNIQUE_ID" || "DATE" || "STRING", // required + * // groupName: "STRING_VALUE", + * // matchKey: "STRING_VALUE", + * // }, + * // ], + * // createdAt: new Date("TIMESTAMP"), // required + * // updatedAt: new Date("TIMESTAMP"), // required + * // tags: { // TagMap + * // "": "STRING_VALUE", + * // }, + * // }; + * + * ``` + * + * @param GetSchemaMappingCommandInput - {@link GetSchemaMappingCommandInput} + * @returns {@link GetSchemaMappingCommandOutput} + * @see {@link GetSchemaMappingCommandInput} for command's `input` shape. + * @see {@link GetSchemaMappingCommandOutput} for command's `response` shape. + * @see {@link EntityResolutionClientResolvedConfig | config} for EntityResolutionClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You do not have sufficient access to perform this action. HTTP Status Code: 403 + *

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

This exception occurs when there is an internal failure in the AWS Entity Resolution service. HTTP Status Code: 500 + *

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

The resource could not be found. HTTP Status Code: 404 + *

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

The request was denied due to request throttling. HTTP Status Code: 429 + *

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

The input fails to satisfy the constraints specified by AWS Entity Resolution. HTTP Status Code: 400 + *

+ * + * @throws {@link EntityResolutionServiceException} + *

Base exception class for all service exceptions from EntityResolution service.

+ * + */ +export class GetSchemaMappingCommand extends $Command< + GetSchemaMappingCommandInput, + GetSchemaMappingCommandOutput, + EntityResolutionClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + 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: GetSchemaMappingCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: EntityResolutionClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, GetSchemaMappingCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "EntityResolutionClient"; + const commandName = "GetSchemaMappingCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: GetSchemaMappingCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_GetSchemaMappingCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_GetSchemaMappingCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-entityresolution/src/commands/ListMatchingJobsCommand.ts b/clients/client-entityresolution/src/commands/ListMatchingJobsCommand.ts new file mode 100644 index 000000000000..bf19f2faaa91 --- /dev/null +++ b/clients/client-entityresolution/src/commands/ListMatchingJobsCommand.ts @@ -0,0 +1,172 @@ +// 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, +} from "@smithy/types"; + +import { EntityResolutionClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EntityResolutionClient"; +import { ListMatchingJobsInput, ListMatchingJobsOutput } from "../models/models_0"; +import { de_ListMatchingJobsCommand, se_ListMatchingJobsCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link ListMatchingJobsCommand}. + */ +export interface ListMatchingJobsCommandInput extends ListMatchingJobsInput {} +/** + * @public + * + * The output of {@link ListMatchingJobsCommand}. + */ +export interface ListMatchingJobsCommandOutput extends ListMatchingJobsOutput, __MetadataBearer {} + +/** + * @public + *

Lists all jobs for a given workflow.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { EntityResolutionClient, ListMatchingJobsCommand } from "@aws-sdk/client-entityresolution"; // ES Modules import + * // const { EntityResolutionClient, ListMatchingJobsCommand } = require("@aws-sdk/client-entityresolution"); // CommonJS import + * const client = new EntityResolutionClient(config); + * const input = { // ListMatchingJobsInput + * workflowName: "STRING_VALUE", // required + * nextToken: "STRING_VALUE", + * maxResults: Number("int"), + * }; + * const command = new ListMatchingJobsCommand(input); + * const response = await client.send(command); + * // { // ListMatchingJobsOutput + * // jobs: [ // JobList + * // { // JobSummary + * // jobId: "STRING_VALUE", // required + * // status: "RUNNING" || "SUCCEEDED" || "FAILED" || "QUEUED", // required + * // startTime: new Date("TIMESTAMP"), // required + * // endTime: new Date("TIMESTAMP"), + * // }, + * // ], + * // nextToken: "STRING_VALUE", + * // }; + * + * ``` + * + * @param ListMatchingJobsCommandInput - {@link ListMatchingJobsCommandInput} + * @returns {@link ListMatchingJobsCommandOutput} + * @see {@link ListMatchingJobsCommandInput} for command's `input` shape. + * @see {@link ListMatchingJobsCommandOutput} for command's `response` shape. + * @see {@link EntityResolutionClientResolvedConfig | config} for EntityResolutionClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You do not have sufficient access to perform this action. HTTP Status Code: 403 + *

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

This exception occurs when there is an internal failure in the AWS Entity Resolution service. HTTP Status Code: 500 + *

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

The resource could not be found. HTTP Status Code: 404 + *

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

The request was denied due to request throttling. HTTP Status Code: 429 + *

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

The input fails to satisfy the constraints specified by AWS Entity Resolution. HTTP Status Code: 400 + *

+ * + * @throws {@link EntityResolutionServiceException} + *

Base exception class for all service exceptions from EntityResolution service.

+ * + */ +export class ListMatchingJobsCommand extends $Command< + ListMatchingJobsCommandInput, + ListMatchingJobsCommandOutput, + EntityResolutionClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + 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: ListMatchingJobsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: EntityResolutionClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, ListMatchingJobsCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "EntityResolutionClient"; + const commandName = "ListMatchingJobsCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: ListMatchingJobsCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_ListMatchingJobsCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_ListMatchingJobsCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-entityresolution/src/commands/ListMatchingWorkflowsCommand.ts b/clients/client-entityresolution/src/commands/ListMatchingWorkflowsCommand.ts new file mode 100644 index 000000000000..e48e6ac4c922 --- /dev/null +++ b/clients/client-entityresolution/src/commands/ListMatchingWorkflowsCommand.ts @@ -0,0 +1,167 @@ +// 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, +} from "@smithy/types"; + +import { EntityResolutionClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EntityResolutionClient"; +import { ListMatchingWorkflowsInput, ListMatchingWorkflowsOutput } from "../models/models_0"; +import { de_ListMatchingWorkflowsCommand, se_ListMatchingWorkflowsCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link ListMatchingWorkflowsCommand}. + */ +export interface ListMatchingWorkflowsCommandInput extends ListMatchingWorkflowsInput {} +/** + * @public + * + * The output of {@link ListMatchingWorkflowsCommand}. + */ +export interface ListMatchingWorkflowsCommandOutput extends ListMatchingWorkflowsOutput, __MetadataBearer {} + +/** + * @public + *

Returns a list of all the MatchingWorkflows that have been created for an AWS account.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { EntityResolutionClient, ListMatchingWorkflowsCommand } from "@aws-sdk/client-entityresolution"; // ES Modules import + * // const { EntityResolutionClient, ListMatchingWorkflowsCommand } = require("@aws-sdk/client-entityresolution"); // CommonJS import + * const client = new EntityResolutionClient(config); + * const input = { // ListMatchingWorkflowsInput + * nextToken: "STRING_VALUE", + * maxResults: Number("int"), + * }; + * const command = new ListMatchingWorkflowsCommand(input); + * const response = await client.send(command); + * // { // ListMatchingWorkflowsOutput + * // workflowSummaries: [ // MatchingWorkflowList + * // { // MatchingWorkflowSummary + * // workflowName: "STRING_VALUE", // required + * // workflowArn: "STRING_VALUE", // required + * // createdAt: new Date("TIMESTAMP"), // required + * // updatedAt: new Date("TIMESTAMP"), // required + * // }, + * // ], + * // nextToken: "STRING_VALUE", + * // }; + * + * ``` + * + * @param ListMatchingWorkflowsCommandInput - {@link ListMatchingWorkflowsCommandInput} + * @returns {@link ListMatchingWorkflowsCommandOutput} + * @see {@link ListMatchingWorkflowsCommandInput} for command's `input` shape. + * @see {@link ListMatchingWorkflowsCommandOutput} for command's `response` shape. + * @see {@link EntityResolutionClientResolvedConfig | config} for EntityResolutionClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You do not have sufficient access to perform this action. HTTP Status Code: 403 + *

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

This exception occurs when there is an internal failure in the AWS Entity Resolution service. HTTP Status Code: 500 + *

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

The request was denied due to request throttling. HTTP Status Code: 429 + *

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

The input fails to satisfy the constraints specified by AWS Entity Resolution. HTTP Status Code: 400 + *

+ * + * @throws {@link EntityResolutionServiceException} + *

Base exception class for all service exceptions from EntityResolution service.

+ * + */ +export class ListMatchingWorkflowsCommand extends $Command< + ListMatchingWorkflowsCommandInput, + ListMatchingWorkflowsCommandOutput, + EntityResolutionClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + 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: ListMatchingWorkflowsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: EntityResolutionClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, ListMatchingWorkflowsCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "EntityResolutionClient"; + const commandName = "ListMatchingWorkflowsCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: ListMatchingWorkflowsCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_ListMatchingWorkflowsCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_ListMatchingWorkflowsCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-entityresolution/src/commands/ListSchemaMappingsCommand.ts b/clients/client-entityresolution/src/commands/ListSchemaMappingsCommand.ts new file mode 100644 index 000000000000..1f2fffe655ea --- /dev/null +++ b/clients/client-entityresolution/src/commands/ListSchemaMappingsCommand.ts @@ -0,0 +1,167 @@ +// 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, +} from "@smithy/types"; + +import { EntityResolutionClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EntityResolutionClient"; +import { ListSchemaMappingsInput, ListSchemaMappingsOutput } from "../models/models_0"; +import { de_ListSchemaMappingsCommand, se_ListSchemaMappingsCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link ListSchemaMappingsCommand}. + */ +export interface ListSchemaMappingsCommandInput extends ListSchemaMappingsInput {} +/** + * @public + * + * The output of {@link ListSchemaMappingsCommand}. + */ +export interface ListSchemaMappingsCommandOutput extends ListSchemaMappingsOutput, __MetadataBearer {} + +/** + * @public + *

Returns a list of all the SchemaMappings that have been created for an AWS account.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { EntityResolutionClient, ListSchemaMappingsCommand } from "@aws-sdk/client-entityresolution"; // ES Modules import + * // const { EntityResolutionClient, ListSchemaMappingsCommand } = require("@aws-sdk/client-entityresolution"); // CommonJS import + * const client = new EntityResolutionClient(config); + * const input = { // ListSchemaMappingsInput + * nextToken: "STRING_VALUE", + * maxResults: Number("int"), + * }; + * const command = new ListSchemaMappingsCommand(input); + * const response = await client.send(command); + * // { // ListSchemaMappingsOutput + * // schemaList: [ // SchemaMappingList + * // { // SchemaMappingSummary + * // schemaName: "STRING_VALUE", // required + * // schemaArn: "STRING_VALUE", // required + * // createdAt: new Date("TIMESTAMP"), // required + * // updatedAt: new Date("TIMESTAMP"), // required + * // }, + * // ], + * // nextToken: "STRING_VALUE", + * // }; + * + * ``` + * + * @param ListSchemaMappingsCommandInput - {@link ListSchemaMappingsCommandInput} + * @returns {@link ListSchemaMappingsCommandOutput} + * @see {@link ListSchemaMappingsCommandInput} for command's `input` shape. + * @see {@link ListSchemaMappingsCommandOutput} for command's `response` shape. + * @see {@link EntityResolutionClientResolvedConfig | config} for EntityResolutionClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You do not have sufficient access to perform this action. HTTP Status Code: 403 + *

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

This exception occurs when there is an internal failure in the AWS Entity Resolution service. HTTP Status Code: 500 + *

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

The request was denied due to request throttling. HTTP Status Code: 429 + *

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

The input fails to satisfy the constraints specified by AWS Entity Resolution. HTTP Status Code: 400 + *

+ * + * @throws {@link EntityResolutionServiceException} + *

Base exception class for all service exceptions from EntityResolution service.

+ * + */ +export class ListSchemaMappingsCommand extends $Command< + ListSchemaMappingsCommandInput, + ListSchemaMappingsCommandOutput, + EntityResolutionClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + 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: ListSchemaMappingsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: EntityResolutionClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, ListSchemaMappingsCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "EntityResolutionClient"; + const commandName = "ListSchemaMappingsCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: ListSchemaMappingsCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_ListSchemaMappingsCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_ListSchemaMappingsCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-entityresolution/src/commands/ListTagsForResourceCommand.ts b/clients/client-entityresolution/src/commands/ListTagsForResourceCommand.ts new file mode 100644 index 000000000000..e7b308dc0017 --- /dev/null +++ b/clients/client-entityresolution/src/commands/ListTagsForResourceCommand.ts @@ -0,0 +1,158 @@ +// 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, +} from "@smithy/types"; + +import { EntityResolutionClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EntityResolutionClient"; +import { ListTagsForResourceInput, ListTagsForResourceOutput } from "../models/models_0"; +import { de_ListTagsForResourceCommand, se_ListTagsForResourceCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link ListTagsForResourceCommand}. + */ +export interface ListTagsForResourceCommandInput extends ListTagsForResourceInput {} +/** + * @public + * + * The output of {@link ListTagsForResourceCommand}. + */ +export interface ListTagsForResourceCommandOutput extends ListTagsForResourceOutput, __MetadataBearer {} + +/** + * @public + *

Displays the tags associated with an AWS Entity Resolution resource. In Entity + * Resolution, SchemaMapping, and MatchingWorkflow can be + * tagged.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { EntityResolutionClient, ListTagsForResourceCommand } from "@aws-sdk/client-entityresolution"; // ES Modules import + * // const { EntityResolutionClient, ListTagsForResourceCommand } = require("@aws-sdk/client-entityresolution"); // CommonJS import + * const client = new EntityResolutionClient(config); + * const input = { // ListTagsForResourceInput + * resourceArn: "STRING_VALUE", // required + * }; + * const command = new ListTagsForResourceCommand(input); + * const response = await client.send(command); + * // { // ListTagsForResourceOutput + * // tags: { // TagMap // required + * // "": "STRING_VALUE", + * // }, + * // }; + * + * ``` + * + * @param ListTagsForResourceCommandInput - {@link ListTagsForResourceCommandInput} + * @returns {@link ListTagsForResourceCommandOutput} + * @see {@link ListTagsForResourceCommandInput} for command's `input` shape. + * @see {@link ListTagsForResourceCommandOutput} for command's `response` shape. + * @see {@link EntityResolutionClientResolvedConfig | config} for EntityResolutionClient's `config` shape. + * + * @throws {@link InternalServerException} (server fault) + *

This exception occurs when there is an internal failure in the AWS Entity Resolution service. HTTP Status Code: 500 + *

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

The resource could not be found. HTTP Status Code: 404 + *

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

The input fails to satisfy the constraints specified by AWS Entity Resolution. HTTP Status Code: 400 + *

+ * + * @throws {@link EntityResolutionServiceException} + *

Base exception class for all service exceptions from EntityResolution service.

+ * + */ +export class ListTagsForResourceCommand extends $Command< + ListTagsForResourceCommandInput, + ListTagsForResourceCommandOutput, + EntityResolutionClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + 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: ListTagsForResourceCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: EntityResolutionClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, ListTagsForResourceCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "EntityResolutionClient"; + const commandName = "ListTagsForResourceCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: ListTagsForResourceCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_ListTagsForResourceCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_ListTagsForResourceCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-entityresolution/src/commands/StartMatchingJobCommand.ts b/clients/client-entityresolution/src/commands/StartMatchingJobCommand.ts new file mode 100644 index 000000000000..d654dd2e0be5 --- /dev/null +++ b/clients/client-entityresolution/src/commands/StartMatchingJobCommand.ts @@ -0,0 +1,173 @@ +// 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, +} from "@smithy/types"; + +import { EntityResolutionClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EntityResolutionClient"; +import { StartMatchingJobInput, StartMatchingJobOutput } from "../models/models_0"; +import { de_StartMatchingJobCommand, se_StartMatchingJobCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link StartMatchingJobCommand}. + */ +export interface StartMatchingJobCommandInput extends StartMatchingJobInput {} +/** + * @public + * + * The output of {@link StartMatchingJobCommand}. + */ +export interface StartMatchingJobCommandOutput extends StartMatchingJobOutput, __MetadataBearer {} + +/** + * @public + *

Starts the MatchingJob of a workflow. The workflow must have previously been created + * using the CreateMatchingWorkflow endpoint.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { EntityResolutionClient, StartMatchingJobCommand } from "@aws-sdk/client-entityresolution"; // ES Modules import + * // const { EntityResolutionClient, StartMatchingJobCommand } = require("@aws-sdk/client-entityresolution"); // CommonJS import + * const client = new EntityResolutionClient(config); + * const input = { // StartMatchingJobInput + * workflowName: "STRING_VALUE", // required + * }; + * const command = new StartMatchingJobCommand(input); + * const response = await client.send(command); + * // { // StartMatchingJobOutput + * // jobId: "STRING_VALUE", // required + * // }; + * + * ``` + * + * @param StartMatchingJobCommandInput - {@link StartMatchingJobCommandInput} + * @returns {@link StartMatchingJobCommandOutput} + * @see {@link StartMatchingJobCommandInput} for command's `input` shape. + * @see {@link StartMatchingJobCommandOutput} for command's `response` shape. + * @see {@link EntityResolutionClientResolvedConfig | config} for EntityResolutionClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You do not have sufficient access to perform this action. HTTP Status Code: 403 + *

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

The request could not be processed because of conflict in the current state of the resource. Example: Workflow already exists, + * Schema already exists, Workflow is currently running, etc. HTTP Status Code: 400 + *

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

The request was rejected because it attempted to create resources beyond the current AWS Entity Resolution account limits. + * The error message describes the limit exceeded. HTTP Status Code: 402 + *

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

This exception occurs when there is an internal failure in the AWS Entity Resolution service. HTTP Status Code: 500 + *

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

The resource could not be found. HTTP Status Code: 404 + *

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

The request was denied due to request throttling. HTTP Status Code: 429 + *

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

The input fails to satisfy the constraints specified by AWS Entity Resolution. HTTP Status Code: 400 + *

+ * + * @throws {@link EntityResolutionServiceException} + *

Base exception class for all service exceptions from EntityResolution service.

+ * + */ +export class StartMatchingJobCommand extends $Command< + StartMatchingJobCommandInput, + StartMatchingJobCommandOutput, + EntityResolutionClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + 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: StartMatchingJobCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: EntityResolutionClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, StartMatchingJobCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "EntityResolutionClient"; + const commandName = "StartMatchingJobCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: StartMatchingJobCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_StartMatchingJobCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_StartMatchingJobCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-entityresolution/src/commands/TagResourceCommand.ts b/clients/client-entityresolution/src/commands/TagResourceCommand.ts new file mode 100644 index 000000000000..24141bbf0665 --- /dev/null +++ b/clients/client-entityresolution/src/commands/TagResourceCommand.ts @@ -0,0 +1,162 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@smithy/types"; + +import { EntityResolutionClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EntityResolutionClient"; +import { TagResourceInput, TagResourceOutput } from "../models/models_0"; +import { de_TagResourceCommand, se_TagResourceCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link TagResourceCommand}. + */ +export interface TagResourceCommandInput extends TagResourceInput {} +/** + * @public + * + * The output of {@link TagResourceCommand}. + */ +export interface TagResourceCommandOutput extends TagResourceOutput, __MetadataBearer {} + +/** + * @public + *

Assigns one or more tags (key-value pairs) to the specified AWS Entity Resolution + * resource. Tags can help you organize and categorize your resources. You can also use them + * to scope user permissions by granting a user permission to access or change only resources + * with certain tag values. In Entity Resolution, SchemaMapping, and + * MatchingWorkflow can be tagged. Tags don't have any semantic meaning to AWS + * and are interpreted strictly as strings of characters. You can use the + * TagResource action with a resource that already has tags. If you specify a + * new tag key, this tag is appended to the list of tags associated with the resource. If you + * specify a tag key that is already associated with the resource, the new tag value that you + * specify replaces the previous value for that tag.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { EntityResolutionClient, TagResourceCommand } from "@aws-sdk/client-entityresolution"; // ES Modules import + * // const { EntityResolutionClient, TagResourceCommand } = require("@aws-sdk/client-entityresolution"); // CommonJS import + * const client = new EntityResolutionClient(config); + * const input = { // TagResourceInput + * resourceArn: "STRING_VALUE", // required + * tags: { // TagMap // required + * "": "STRING_VALUE", + * }, + * }; + * const command = new TagResourceCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param TagResourceCommandInput - {@link TagResourceCommandInput} + * @returns {@link TagResourceCommandOutput} + * @see {@link TagResourceCommandInput} for command's `input` shape. + * @see {@link TagResourceCommandOutput} for command's `response` shape. + * @see {@link EntityResolutionClientResolvedConfig | config} for EntityResolutionClient's `config` shape. + * + * @throws {@link InternalServerException} (server fault) + *

This exception occurs when there is an internal failure in the AWS Entity Resolution service. HTTP Status Code: 500 + *

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

The resource could not be found. HTTP Status Code: 404 + *

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

The input fails to satisfy the constraints specified by AWS Entity Resolution. HTTP Status Code: 400 + *

+ * + * @throws {@link EntityResolutionServiceException} + *

Base exception class for all service exceptions from EntityResolution service.

+ * + */ +export class TagResourceCommand extends $Command< + TagResourceCommandInput, + TagResourceCommandOutput, + EntityResolutionClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + 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: TagResourceCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: EntityResolutionClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(getEndpointPlugin(configuration, TagResourceCommand.getEndpointParameterInstructions())); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "EntityResolutionClient"; + const commandName = "TagResourceCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: TagResourceCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_TagResourceCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_TagResourceCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-entityresolution/src/commands/UntagResourceCommand.ts b/clients/client-entityresolution/src/commands/UntagResourceCommand.ts new file mode 100644 index 000000000000..01b28f7b2c64 --- /dev/null +++ b/clients/client-entityresolution/src/commands/UntagResourceCommand.ts @@ -0,0 +1,151 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@smithy/types"; + +import { EntityResolutionClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EntityResolutionClient"; +import { UntagResourceInput, UntagResourceOutput } from "../models/models_0"; +import { de_UntagResourceCommand, se_UntagResourceCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link UntagResourceCommand}. + */ +export interface UntagResourceCommandInput extends UntagResourceInput {} +/** + * @public + * + * The output of {@link UntagResourceCommand}. + */ +export interface UntagResourceCommandOutput extends UntagResourceOutput, __MetadataBearer {} + +/** + * @public + *

Removes one or more tags from the specified AWS Entity Resolution resource. In Entity + * Resolution, SchemaMapping, and MatchingWorkflow can be + * tagged.

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

This exception occurs when there is an internal failure in the AWS Entity Resolution service. HTTP Status Code: 500 + *

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

The resource could not be found. HTTP Status Code: 404 + *

+ * + * @throws {@link EntityResolutionServiceException} + *

Base exception class for all service exceptions from EntityResolution service.

+ * + */ +export class UntagResourceCommand extends $Command< + UntagResourceCommandInput, + UntagResourceCommandOutput, + EntityResolutionClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + 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: UntagResourceCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: EntityResolutionClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(getEndpointPlugin(configuration, UntagResourceCommand.getEndpointParameterInstructions())); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "EntityResolutionClient"; + const commandName = "UntagResourceCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: UntagResourceCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_UntagResourceCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_UntagResourceCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-entityresolution/src/commands/UpdateMatchingWorkflowCommand.ts b/clients/client-entityresolution/src/commands/UpdateMatchingWorkflowCommand.ts new file mode 100644 index 000000000000..6a51bc72b243 --- /dev/null +++ b/clients/client-entityresolution/src/commands/UpdateMatchingWorkflowCommand.ts @@ -0,0 +1,243 @@ +// 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, +} from "@smithy/types"; + +import { EntityResolutionClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EntityResolutionClient"; +import { UpdateMatchingWorkflowInput, UpdateMatchingWorkflowOutput } from "../models/models_0"; +import { de_UpdateMatchingWorkflowCommand, se_UpdateMatchingWorkflowCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link UpdateMatchingWorkflowCommand}. + */ +export interface UpdateMatchingWorkflowCommandInput extends UpdateMatchingWorkflowInput {} +/** + * @public + * + * The output of {@link UpdateMatchingWorkflowCommand}. + */ +export interface UpdateMatchingWorkflowCommandOutput extends UpdateMatchingWorkflowOutput, __MetadataBearer {} + +/** + * @public + *

Updates an existing MatchingWorkflow. This method is identical to + * CreateMatchingWorkflow, except it uses an HTTP PUT request instead of + * a POST request, and the MatchingWorkflow must already exist for the + * method to succeed.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { EntityResolutionClient, UpdateMatchingWorkflowCommand } from "@aws-sdk/client-entityresolution"; // ES Modules import + * // const { EntityResolutionClient, UpdateMatchingWorkflowCommand } = require("@aws-sdk/client-entityresolution"); // CommonJS import + * const client = new EntityResolutionClient(config); + * const input = { // UpdateMatchingWorkflowInput + * workflowName: "STRING_VALUE", // required + * description: "STRING_VALUE", + * inputSourceConfig: [ // InputSourceConfig // required + * { // InputSource + * inputSourceARN: "STRING_VALUE", // required + * schemaName: "STRING_VALUE", // required + * applyNormalization: true || false, + * }, + * ], + * outputSourceConfig: [ // OutputSourceConfig // required + * { // OutputSource + * outputS3Path: "STRING_VALUE", // required + * output: [ // OutputAttributes // required + * { // OutputAttribute + * name: "STRING_VALUE", // required + * hashed: true || false, + * }, + * ], + * KMSArn: "STRING_VALUE", + * applyNormalization: true || false, + * }, + * ], + * resolutionTechniques: { // ResolutionTechniques + * resolutionType: "RULE_MATCHING" || "ML_MATCHING", + * ruleBasedProperties: { // RuleBasedProperties + * rules: [ // RuleList // required + * { // Rule + * ruleName: "STRING_VALUE", // required + * matchingKeys: [ // MatchingKeys // required + * "STRING_VALUE", + * ], + * }, + * ], + * attributeMatchingModel: "ONE_TO_ONE" || "MANY_TO_MANY", // required + * }, + * }, + * incrementalRunConfig: { // IncrementalRunConfig + * incrementalRunType: "IMMEDIATE", + * }, + * roleArn: "STRING_VALUE", // required + * }; + * const command = new UpdateMatchingWorkflowCommand(input); + * const response = await client.send(command); + * // { // UpdateMatchingWorkflowOutput + * // workflowName: "STRING_VALUE", // required + * // description: "STRING_VALUE", + * // inputSourceConfig: [ // InputSourceConfig // required + * // { // InputSource + * // inputSourceARN: "STRING_VALUE", // required + * // schemaName: "STRING_VALUE", // required + * // applyNormalization: true || false, + * // }, + * // ], + * // outputSourceConfig: [ // OutputSourceConfig // required + * // { // OutputSource + * // outputS3Path: "STRING_VALUE", // required + * // output: [ // OutputAttributes // required + * // { // OutputAttribute + * // name: "STRING_VALUE", // required + * // hashed: true || false, + * // }, + * // ], + * // KMSArn: "STRING_VALUE", + * // applyNormalization: true || false, + * // }, + * // ], + * // resolutionTechniques: { // ResolutionTechniques + * // resolutionType: "RULE_MATCHING" || "ML_MATCHING", + * // ruleBasedProperties: { // RuleBasedProperties + * // rules: [ // RuleList // required + * // { // Rule + * // ruleName: "STRING_VALUE", // required + * // matchingKeys: [ // MatchingKeys // required + * // "STRING_VALUE", + * // ], + * // }, + * // ], + * // attributeMatchingModel: "ONE_TO_ONE" || "MANY_TO_MANY", // required + * // }, + * // }, + * // incrementalRunConfig: { // IncrementalRunConfig + * // incrementalRunType: "IMMEDIATE", + * // }, + * // roleArn: "STRING_VALUE", // required + * // }; + * + * ``` + * + * @param UpdateMatchingWorkflowCommandInput - {@link UpdateMatchingWorkflowCommandInput} + * @returns {@link UpdateMatchingWorkflowCommandOutput} + * @see {@link UpdateMatchingWorkflowCommandInput} for command's `input` shape. + * @see {@link UpdateMatchingWorkflowCommandOutput} for command's `response` shape. + * @see {@link EntityResolutionClientResolvedConfig | config} for EntityResolutionClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You do not have sufficient access to perform this action. HTTP Status Code: 403 + *

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

This exception occurs when there is an internal failure in the AWS Entity Resolution service. HTTP Status Code: 500 + *

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

The resource could not be found. HTTP Status Code: 404 + *

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

The request was denied due to request throttling. HTTP Status Code: 429 + *

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

The input fails to satisfy the constraints specified by AWS Entity Resolution. HTTP Status Code: 400 + *

+ * + * @throws {@link EntityResolutionServiceException} + *

Base exception class for all service exceptions from EntityResolution service.

+ * + */ +export class UpdateMatchingWorkflowCommand extends $Command< + UpdateMatchingWorkflowCommandInput, + UpdateMatchingWorkflowCommandOutput, + EntityResolutionClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + 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: UpdateMatchingWorkflowCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: EntityResolutionClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, UpdateMatchingWorkflowCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "EntityResolutionClient"; + const commandName = "UpdateMatchingWorkflowCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: UpdateMatchingWorkflowCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_UpdateMatchingWorkflowCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_UpdateMatchingWorkflowCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-entityresolution/src/commands/index.ts b/clients/client-entityresolution/src/commands/index.ts new file mode 100644 index 000000000000..2c9f729cd8e6 --- /dev/null +++ b/clients/client-entityresolution/src/commands/index.ts @@ -0,0 +1,17 @@ +// smithy-typescript generated code +export * from "./CreateMatchingWorkflowCommand"; +export * from "./CreateSchemaMappingCommand"; +export * from "./DeleteMatchingWorkflowCommand"; +export * from "./DeleteSchemaMappingCommand"; +export * from "./GetMatchIdCommand"; +export * from "./GetMatchingJobCommand"; +export * from "./GetMatchingWorkflowCommand"; +export * from "./GetSchemaMappingCommand"; +export * from "./ListMatchingJobsCommand"; +export * from "./ListMatchingWorkflowsCommand"; +export * from "./ListSchemaMappingsCommand"; +export * from "./ListTagsForResourceCommand"; +export * from "./StartMatchingJobCommand"; +export * from "./TagResourceCommand"; +export * from "./UntagResourceCommand"; +export * from "./UpdateMatchingWorkflowCommand"; diff --git a/clients/client-entityresolution/src/endpoint/EndpointParameters.ts b/clients/client-entityresolution/src/endpoint/EndpointParameters.ts new file mode 100644 index 000000000000..33fafe11dc21 --- /dev/null +++ b/clients/client-entityresolution/src/endpoint/EndpointParameters.ts @@ -0,0 +1,31 @@ +// smithy-typescript generated code +import { Endpoint, EndpointParameters as __EndpointParameters, EndpointV2, Provider } from "@smithy/types"; + +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: "entityresolution", + }; +}; + +export interface EndpointParameters extends __EndpointParameters { + Region?: string; + UseDualStack?: boolean; + UseFIPS?: boolean; + Endpoint?: string; +} diff --git a/clients/client-entityresolution/src/endpoint/endpointResolver.ts b/clients/client-entityresolution/src/endpoint/endpointResolver.ts new file mode 100644 index 000000000000..3fbea60c40b6 --- /dev/null +++ b/clients/client-entityresolution/src/endpoint/endpointResolver.ts @@ -0,0 +1,16 @@ +// smithy-typescript generated code +import { EndpointParams, resolveEndpoint } from "@aws-sdk/util-endpoints"; +import { EndpointV2, Logger } from "@smithy/types"; + +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-entityresolution/src/endpoint/ruleset.ts b/clients/client-entityresolution/src/endpoint/ruleset.ts new file mode 100644 index 000000000000..c909d3ff2637 --- /dev/null +++ b/clients/client-entityresolution/src/endpoint/ruleset.ts @@ -0,0 +1,30 @@ +// @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/entityresolution.json */ + +const q="required", +r="fn", +s="argv", +t="ref"; +const a="isSet", +b="tree", +c="error", +d="endpoint", +e="PartitionResult", +f={[q]:false,"type":"String"}, +g={[q]:true,"default":false,"type":"Boolean"}, +h={[t]:"Endpoint"}, +i={[r]:"booleanEquals",[s]:[{[t]:"UseFIPS"},true]}, +j={[r]:"booleanEquals",[s]:[{[t]:"UseDualStack"},true]}, +k={}, +l={[r]:"booleanEquals",[s]:[true,{[r]:"getAttr",[s]:[{[t]:e},"supportsFIPS"]}]}, +m={[r]:"booleanEquals",[s]:[true,{[r]:"getAttr",[s]:[{[t]:e},"supportsDualStack"]}]}, +n=[i], +o=[j], +p=[{[t]:"Region"}]; +const _data={version:"1.0",parameters:{Region:f,UseDualStack:g,UseFIPS:g,Endpoint:f},rules:[{conditions:[{[r]:a,[s]:[h]}],type:b,rules:[{conditions:n,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:c},{type:b,rules:[{conditions:o,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:c},{endpoint:{url:h,properties:k,headers:k},type:d}]}]},{type:b,rules:[{conditions:[{[r]:a,[s]:p}],type:b,rules:[{conditions:[{[r]:"aws.partition",[s]:p,assign:e}],type:b,rules:[{conditions:[i,j],type:b,rules:[{conditions:[l,m],type:b,rules:[{type:b,rules:[{endpoint:{url:"https://entityresolution-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:k,headers:k},type:d}]}]},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:c}]},{conditions:n,type:b,rules:[{conditions:[l],type:b,rules:[{type:b,rules:[{endpoint:{url:"https://entityresolution-fips.{Region}.{PartitionResult#dnsSuffix}",properties:k,headers:k},type:d}]}]},{error:"FIPS is enabled but this partition does not support FIPS",type:c}]},{conditions:o,type:b,rules:[{conditions:[m],type:b,rules:[{type:b,rules:[{endpoint:{url:"https://entityresolution.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:k,headers:k},type:d}]}]},{error:"DualStack is enabled but this partition does not support DualStack",type:c}]},{type:b,rules:[{endpoint:{url:"https://entityresolution.{Region}.{PartitionResult#dnsSuffix}",properties:k,headers:k},type:d}]}]}]},{error:"Invalid Configuration: Missing Region",type:c}]}]}; +export const ruleSet: RuleSetObject = _data; diff --git a/clients/client-entityresolution/src/index.ts b/clients/client-entityresolution/src/index.ts new file mode 100644 index 000000000000..e1e3d7ac4485 --- /dev/null +++ b/clients/client-entityresolution/src/index.ts @@ -0,0 +1,27 @@ +// smithy-typescript generated code +/* eslint-disable */ +/** + *

Welcome to the AWS Entity Resolution API Reference.

+ *

AWS Entity Resolution is an AWS service that provides pre-configured entity resolution capabilities + * that enable developers and analysts at advertising and marketing companies to build an accurate and + * complete view of their consumers.

+ *

+ * With AWS Entity Resolution, you have the ability to match source records containing consumer identifiers, + * such as name, email address, and phone number. This holds true even when these records have incomplete or + * conflicting identifiers. For example, AWS Entity Resolution can effectively match a source record from a + * customer relationship management (CRM) system, which includes account information like first name, last name, + * postal address, phone number, and email address, with a source record from a marketing system containing + * campaign information, such as username and email address.

+ *

To learn more about AWS Entity Resolution concepts, procedures, and best practices, see the + * AWS Entity Resolution + * User Guide.

+ * + * @packageDocumentation + */ +export * from "./EntityResolutionClient"; +export * from "./EntityResolution"; +export * from "./commands"; +export * from "./pagination"; +export * from "./models"; + +export { EntityResolutionServiceException } from "./models/EntityResolutionServiceException"; diff --git a/clients/client-entityresolution/src/models/EntityResolutionServiceException.ts b/clients/client-entityresolution/src/models/EntityResolutionServiceException.ts new file mode 100644 index 000000000000..f70949a74add --- /dev/null +++ b/clients/client-entityresolution/src/models/EntityResolutionServiceException.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 EntityResolution service. + */ +export class EntityResolutionServiceException extends __ServiceException { + /** + * @internal + */ + constructor(options: __ServiceExceptionOptions) { + super(options); + Object.setPrototypeOf(this, EntityResolutionServiceException.prototype); + } +} diff --git a/clients/client-entityresolution/src/models/index.ts b/clients/client-entityresolution/src/models/index.ts new file mode 100644 index 000000000000..9eaceb12865f --- /dev/null +++ b/clients/client-entityresolution/src/models/index.ts @@ -0,0 +1,2 @@ +// smithy-typescript generated code +export * from "./models_0"; diff --git a/clients/client-entityresolution/src/models/models_0.ts b/clients/client-entityresolution/src/models/models_0.ts new file mode 100644 index 000000000000..c41ad5195cfc --- /dev/null +++ b/clients/client-entityresolution/src/models/models_0.ts @@ -0,0 +1,1220 @@ +// smithy-typescript generated code +import { ExceptionOptionType as __ExceptionOptionType, SENSITIVE_STRING } from "@smithy/smithy-client"; + +import { EntityResolutionServiceException as __BaseException } from "./EntityResolutionServiceException"; + +/** + * @public + *

You do not have sufficient access to perform this action. HTTP Status Code: 403 + *

+ */ +export class AccessDeniedException extends __BaseException { + readonly name: "AccessDeniedException" = "AccessDeniedException"; + readonly $fault: "client" = "client"; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "AccessDeniedException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, AccessDeniedException.prototype); + } +} + +/** + * @public + * @enum + */ +export const AttributeMatchingModel = { + MANY_TO_MANY: "MANY_TO_MANY", + ONE_TO_ONE: "ONE_TO_ONE", +} as const; + +/** + * @public + */ +export type AttributeMatchingModel = (typeof AttributeMatchingModel)[keyof typeof AttributeMatchingModel]; + +/** + * @public + *

The request could not be processed because of conflict in the current state of the resource. Example: Workflow already exists, + * Schema already exists, Workflow is currently running, etc. HTTP Status Code: 400 + *

+ */ +export class ConflictException extends __BaseException { + readonly name: "ConflictException" = "ConflictException"; + readonly $fault: "client" = "client"; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "ConflictException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, ConflictException.prototype); + } +} + +/** + * @public + * @enum + */ +export const IncrementalRunType = { + IMMEDIATE: "IMMEDIATE", +} as const; + +/** + * @public + */ +export type IncrementalRunType = (typeof IncrementalRunType)[keyof typeof IncrementalRunType]; + +/** + * @public + *

An object which defines an incremental run type and has only incrementalRunType as a field.

+ */ +export interface IncrementalRunConfig { + /** + *

The type of incremental run. It takes only one value: IMMEDIATE.

+ */ + incrementalRunType?: IncrementalRunType | string; +} + +/** + * @public + *

An object containing InputSourceARN, SchemaName, + * and ApplyNormalization.

+ */ +export interface InputSource { + /** + *

An Glue table ARN for the input source table.

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

The name of the schema to be retrieved.

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

Normalizes the attributes defined in the schema in the input data. For example, if an + * attribute has an AttributeType of PHONE_NUMBER, and the data in + * the input table is in a format of 1234567890, Entity Resolution will normalize this field + * in the output to (123)-456-7890.

+ */ + applyNormalization?: boolean; +} + +/** + * @public + *

A list of OutputAttribute objects, each of which have the fields Name and Hashed. Each of + * these objects selects a column to be included in the output table, and whether the + * values of the column should be hashed.

+ */ +export interface OutputAttribute { + /** + *

A name of a column to be written to the output. This must be an InputField name + * in the schema mapping.

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

Enables the ability to hash the column values in the output.

+ */ + hashed?: boolean; +} + +/** + * @public + *

A list of OutputAttribute objects, each of which have the fields Name and Hashed. Each of + * these objects selects a column to be included in the output table, and whether the + * values of the column should be hashed.

+ */ +export interface OutputSource { + /** + *

The S3 path to which Entity Resolution will write the output table.

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

A list of OutputAttribute objects, each of which have the fields Name and Hashed. Each of + * these objects selects a column to be included in the output table, and whether the + * values of the column should be hashed.

+ */ + output: OutputAttribute[] | undefined; + + /** + *

Customer KMS ARN for encryption at rest. If not provided, system will use an + * Entity Resolution managed KMS key.

+ */ + KMSArn?: string; + + /** + *

Normalizes the attributes defined in the schema in the input data. For example, if an + * attribute has an AttributeType of PHONE_NUMBER, and the data in + * the input table is in a format of 1234567890, Entity Resolution will normalize this field + * in the output to (123)-456-7890.

+ */ + applyNormalization?: boolean; +} + +/** + * @public + * @enum + */ +export const ResolutionType = { + ML_MATCHING: "ML_MATCHING", + RULE_MATCHING: "RULE_MATCHING", +} as const; + +/** + * @public + */ +export type ResolutionType = (typeof ResolutionType)[keyof typeof ResolutionType]; + +/** + * @public + *

An object containing RuleName, and MatchingKeys.

+ */ +export interface Rule { + /** + *

A name for the matching rule.

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

A list of MatchingKeys. The MatchingKeys must have been defined in + * the SchemaMapping. Two records are considered to match according to this rule if all + * of the MatchingKeys match.

+ */ + matchingKeys: string[] | undefined; +} + +/** + * @public + *

An object which defines the list of matching rules to run and has a field Rules, which + * is a list of rule objects.

+ */ +export interface RuleBasedProperties { + /** + *

A list of Rule objects, each of which have fields RuleName and MatchingKeys.

+ */ + rules: Rule[] | undefined; + + /** + *

You can either choose ONE_TO_ONE or MANY_TO_MANY as the AttributeMatchingModel. When + * choosing MANY_TO_MANY, the system can match attribute across the sub-types of an attribute type. For + * example, if the value of the Email field of Profile A and the value of BusinessEmail field of Profile B matches, + * the two profiles are matched on the Email type. When choosing ONE_TO_ONE the system can only match if + * the sub-types are exact matches. For example, only when the value of the Email field of Profile A and the value of + * the Email field of Profile B matches, the two profiles are matched on the Email type.

+ */ + attributeMatchingModel: AttributeMatchingModel | string | undefined; +} + +/** + * @public + *

An object which defines the resolutionType and the ruleBasedProperties + *

+ */ +export interface ResolutionTechniques { + /** + *

There are two types of matching, RULE_MATCHING and ML_MATCHING + *

+ */ + resolutionType?: ResolutionType | string; + + /** + *

An object which defines the list of matching rules to run and has a field Rules, which + * is a list of rule objects.

+ */ + ruleBasedProperties?: RuleBasedProperties; +} + +/** + * @public + */ +export interface CreateMatchingWorkflowInput { + /** + *

The name of the workflow. There cannot be multiple DataIntegrationWorkflows with the same name.

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

A description of the workflow.

+ */ + description?: string; + + /** + *

A list of InputSource objects, which have the fields InputSourceARN and + * SchemaName.

+ */ + inputSourceConfig: InputSource[] | undefined; + + /** + *

A list of OutputSource objects, each of which contains fields OutputS3Path, + * ApplyNormalization, and Output.

+ */ + outputSourceConfig: OutputSource[] | undefined; + + /** + *

An object which defines the resolutionType and the ruleBasedProperties + *

+ */ + resolutionTechniques: ResolutionTechniques | undefined; + + /** + *

An object which defines an incremental run type and has only incrementalRunType as a field.

+ */ + incrementalRunConfig?: IncrementalRunConfig; + + /** + *

The Amazon Resource Name (ARN) of the IAM role. AWS Entity Resolution assumes this role + * to create resources on your behalf as part of workflow execution.

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

The tags used to organize, track, or control access for this resource.

+ */ + tags?: Record; +} + +/** + * @public + */ +export interface CreateMatchingWorkflowOutput { + /** + *

The name of the workflow.

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

The ARN (Amazon Resource Name) that Entity Resolution generated for the MatchingWorkflow.

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

A description of the workflow.

+ */ + description?: string; + + /** + *

A list of InputSource objects, which have the fields InputSourceARN and + * SchemaName.

+ */ + inputSourceConfig: InputSource[] | undefined; + + /** + *

A list of OutputSource objects, each of which contains fields OutputS3Path, + * ApplyNormalization, and Output.

+ */ + outputSourceConfig: OutputSource[] | undefined; + + /** + *

An object which defines the resolutionType and the ruleBasedProperties + *

+ */ + resolutionTechniques: ResolutionTechniques | undefined; + + /** + *

An object which defines an incremental run type and has only incrementalRunType as a field.

+ */ + incrementalRunConfig?: IncrementalRunConfig; + + /** + *

The Amazon Resource Name (ARN) of the IAM role. AWS Entity Resolution assumes this role + * to create resources on your behalf as part of workflow execution.

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

The request was rejected because it attempted to create resources beyond the current AWS Entity Resolution account limits. + * The error message describes the limit exceeded. HTTP Status Code: 402 + *

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

This exception occurs when there is an internal failure in the AWS Entity Resolution service. HTTP Status Code: 500 + *

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

The request was denied due to request throttling. HTTP Status Code: 429 + *

+ */ +export class ThrottlingException extends __BaseException { + readonly name: "ThrottlingException" = "ThrottlingException"; + readonly $fault: "client" = "client"; + $retryable = { + throttling: true, + }; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "ThrottlingException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, ThrottlingException.prototype); + } +} + +/** + * @public + *

The input fails to satisfy the constraints specified by AWS Entity Resolution. HTTP Status Code: 400 + *

+ */ +export class ValidationException extends __BaseException { + readonly name: "ValidationException" = "ValidationException"; + readonly $fault: "client" = "client"; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "ValidationException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, ValidationException.prototype); + } +} + +/** + * @public + * @enum + */ +export const SchemaAttributeType = { + ADDRESS: "ADDRESS", + ADDRESS_CITY: "ADDRESS_CITY", + ADDRESS_COUNTRY: "ADDRESS_COUNTRY", + ADDRESS_POSTALCODE: "ADDRESS_POSTALCODE", + ADDRESS_STATE: "ADDRESS_STATE", + ADDRESS_STREET1: "ADDRESS_STREET1", + ADDRESS_STREET2: "ADDRESS_STREET2", + ADDRESS_STREET3: "ADDRESS_STREET3", + DATE: "DATE", + EMAIL_ADDRESS: "EMAIL_ADDRESS", + NAME: "NAME", + NAME_FIRST: "NAME_FIRST", + NAME_LAST: "NAME_LAST", + NAME_MIDDLE: "NAME_MIDDLE", + PHONE: "PHONE", + PHONE_COUNTRYCODE: "PHONE_COUNTRYCODE", + PHONE_NUMBER: "PHONE_NUMBER", + STRING: "STRING", + UNIQUE_ID: "UNIQUE_ID", +} as const; + +/** + * @public + */ +export type SchemaAttributeType = (typeof SchemaAttributeType)[keyof typeof SchemaAttributeType]; + +/** + * @public + *

An object containing FieldField, Type, GroupName, + * and MatchKey.

+ */ +export interface SchemaInputAttribute { + /** + *

A string containing the field name.

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

The type of the attribute, selected from a list of values.

+ */ + type: SchemaAttributeType | string | undefined; + + /** + *

Instruct Entity Resolution to combine several columns into a unified column with the + * identical attribute type. For example, when working with columns such as first_name, + * middle_name, and last_name, assigning them a common GroupName will prompt + * Entity Resolution to concatenate them into a single value.

+ */ + groupName?: string; + + /** + *

A key that allows grouping of multiple input attributes into a unified matching group. + * For example, let's consider a scenario where the source table contains various addresses, + * such as business_address and shipping_address. By assigning the MatchKey + * Address' to both attributes, Entity Resolution will match records + * across these fields to create a consolidated matching group. If no MatchKey is + * specified for a column, it won't be utilized for matching purposes but will still be + * included in the output table.

+ */ + matchKey?: string; +} + +/** + * @public + */ +export interface CreateSchemaMappingInput { + /** + *

The name of the schema. There cannot be multiple SchemaMappings with the + * same name.

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

A description of the schema.

+ */ + description?: string; + + /** + *

A list of MappedInputFields. Each MappedInputField corresponds + * to a column the source data table, and contains column name plus additional information + * that Entity Resolution uses for matching.

+ */ + mappedInputFields?: SchemaInputAttribute[]; + + /** + *

The tags used to organize, track, or control access for this resource.

+ */ + tags?: Record; +} + +/** + * @public + */ +export interface CreateSchemaMappingOutput { + /** + *

The name of the schema.

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

The ARN (Amazon Resource Name) that Entity Resolution generated for the + * SchemaMapping.

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

A description of the schema.

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

A list of MappedInputFields. Each MappedInputField corresponds + * to a column the source data table, and contains column name plus additional information + * that Entity Resolution uses for matching.

+ */ + mappedInputFields: SchemaInputAttribute[] | undefined; +} + +/** + * @public + */ +export interface DeleteMatchingWorkflowInput { + /** + *

The name of the workflow to be retrieved.

+ */ + workflowName: string | undefined; +} + +/** + * @public + */ +export interface DeleteMatchingWorkflowOutput { + /** + *

A successful operation message.

+ */ + message: string | undefined; +} + +/** + * @public + */ +export interface DeleteSchemaMappingInput { + /** + *

The name of the schema to delete.

+ */ + schemaName: string | undefined; +} + +/** + * @public + */ +export interface DeleteSchemaMappingOutput { + /** + *

A successful operation message.

+ */ + message: string | undefined; +} + +/** + * @public + */ +export interface GetMatchIdInput { + /** + *

The name of the workflow.

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

The record to fetch the Match ID for.

+ */ + record: Record | undefined; +} + +/** + * @public + */ +export interface GetMatchIdOutput { + /** + *

The unique identifiers for this group of match records.

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

The resource could not be found. HTTP Status Code: 404 + *

+ */ +export class ResourceNotFoundException extends __BaseException { + readonly name: "ResourceNotFoundException" = "ResourceNotFoundException"; + readonly $fault: "client" = "client"; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "ResourceNotFoundException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, ResourceNotFoundException.prototype); + } +} + +/** + * @public + */ +export interface GetMatchingJobInput { + /** + *

The name of the workflow.

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

The ID of the job.

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

An object containing an error message, if there was an error.

+ */ +export interface ErrorDetails { + /** + *

The error message from the job, if there is one.

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

An object containing InputRecords, TotalRecordsProcessed, + * MatchIDs, and RecordsNotProcessed.

+ */ +export interface JobMetrics { + /** + *

The total number of input records.

+ */ + inputRecords?: number; + + /** + *

The total number of records processed.

+ */ + totalRecordsProcessed?: number; + + /** + *

The total number of matchIDs generated.

+ */ + matchIDs?: number; + + /** + *

The total number of records that did not get processed,

+ */ + recordsNotProcessed?: number; +} + +/** + * @public + * @enum + */ +export const JobStatus = { + FAILED: "FAILED", + QUEUED: "QUEUED", + RUNNING: "RUNNING", + SUCCEEDED: "SUCCEEDED", +} as const; + +/** + * @public + */ +export type JobStatus = (typeof JobStatus)[keyof typeof JobStatus]; + +/** + * @public + */ +export interface GetMatchingJobOutput { + /** + *

The ID of the job.

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

The current status of the job. Either running, succeeded, + * queued, or failed.

+ */ + status: JobStatus | string | undefined; + + /** + *

The time at which the job was started.

+ */ + startTime: Date | undefined; + + /** + *

The time at which the job has finished.

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

Metrics associated with the execution, specifically total records processed, + * unique IDs generated, and records the execution skipped.

+ */ + metrics?: JobMetrics; + + /** + *

An object containing an error message, if there was an error.

+ */ + errorDetails?: ErrorDetails; +} + +/** + * @public + */ +export interface GetMatchingWorkflowInput { + /** + *

The name of the workflow.

+ */ + workflowName: string | undefined; +} + +/** + * @public + */ +export interface GetMatchingWorkflowOutput { + /** + *

The name of the workflow.

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

The ARN (Amazon Resource Name) that Entity Resolution generated for the MatchingWorkflow.

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

A description of the workflow.

+ */ + description?: string; + + /** + *

A list of InputSource objects, which have the fields InputSourceARN and + * SchemaName.

+ */ + inputSourceConfig: InputSource[] | undefined; + + /** + *

A list of OutputSource objects, each of which contains fields OutputS3Path, + * ApplyNormalization, and Output.

+ */ + outputSourceConfig: OutputSource[] | undefined; + + /** + *

An object which defines the resolutionType and the ruleBasedProperties + *

+ */ + resolutionTechniques: ResolutionTechniques | undefined; + + /** + *

The timestamp of when the workflow was created.

+ */ + createdAt: Date | undefined; + + /** + *

The timestamp of when the workflow was last updated.

+ */ + updatedAt: Date | undefined; + + /** + *

An object which defines an incremental run type and has only incrementalRunType as a field.

+ */ + incrementalRunConfig?: IncrementalRunConfig; + + /** + *

The Amazon Resource Name (ARN) of the IAM role. AWS Entity Resolution assumes this role to access + * resources on your behalf.

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

The tags used to organize, track, or control access for this resource.

+ */ + tags?: Record; +} + +/** + * @public + */ +export interface GetSchemaMappingInput { + /** + *

The name of the schema to be retrieved.

+ */ + schemaName: string | undefined; +} + +/** + * @public + */ +export interface GetSchemaMappingOutput { + /** + *

The name of the schema.

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

The ARN (Amazon Resource Name) that Entity Resolution generated for the SchemaMapping.

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

A description of the schema.

+ */ + description?: string; + + /** + *

A list of MappedInputFields. Each MappedInputField corresponds + * to a column the source data table, and contains column name plus additional information + * Venice uses for matching.

+ */ + mappedInputFields: SchemaInputAttribute[] | undefined; + + /** + *

The timestamp of when the SchemaMapping was created.

+ */ + createdAt: Date | undefined; + + /** + *

The timestamp of when the SchemaMapping was last updated.

+ */ + updatedAt: Date | undefined; + + /** + *

The tags used to organize, track, or control access for this resource.

+ */ + tags?: Record; +} + +/** + * @public + */ +export interface ListMatchingJobsInput { + /** + *

The name of the workflow to be retrieved.

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

The pagination token from the previous ListSchemaMappings API call.

+ */ + nextToken?: string; + + /** + *

The maximum number of objects returned per page.

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

An object containing the JobId, Status, + * StartTime, and EndTime of a job.

+ */ +export interface JobSummary { + /** + *

The ID of the job.

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

The current status of the job. Either running, succeeded, + * queued, or failed.

+ */ + status: JobStatus | string | undefined; + + /** + *

The time at which the job was started.

+ */ + startTime: Date | undefined; + + /** + *

The time at which the job has finished.

+ */ + endTime?: Date; +} + +/** + * @public + */ +export interface ListMatchingJobsOutput { + /** + *

A list of JobSummary objects, each of which contain the ID, status, start time, and end time of a job.

+ */ + jobs?: JobSummary[]; + + /** + *

The pagination token from the previous ListSchemaMappings API call.

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

The pagination token from the previous ListSchemaMappings API call.

+ */ + nextToken?: string; + + /** + *

The maximum number of objects returned per page.

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

A list of MatchingWorkflowSummary objects, each of which contain the fields + * WorkflowName, WorkflowArn, CreatedAt, UpdatedAt.

+ */ +export interface MatchingWorkflowSummary { + /** + *

The name of the workflow.

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

The ARN (Amazon Resource Name) that Entity Resolution generated for the MatchingWorkflow.

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

The timestamp of when the workflow was created.

+ */ + createdAt: Date | undefined; + + /** + *

The timestamp of when the workflow was last updated.

+ */ + updatedAt: Date | undefined; +} + +/** + * @public + */ +export interface ListMatchingWorkflowsOutput { + /** + *

A list of MatchingWorkflowSummary objects, each of which contain the fields + * WorkflowName, WorkflowArn, CreatedAt, and UpdatedAt.

+ */ + workflowSummaries?: MatchingWorkflowSummary[]; + + /** + *

The pagination token from the previous ListSchemaMappings API call.

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

The pagination token from the previous ListSchemaMappings API call.

+ */ + nextToken?: string; + + /** + *

The maximum number of objects returned per page.

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

An object containing SchemaName, SchemaArn, + * CreatedAt, andUpdatedAt.

+ */ +export interface SchemaMappingSummary { + /** + *

The name of the schema.

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

The ARN (Amazon Resource Name) that Entity Resolution generated for the + * SchemaMapping.

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

The timestamp of when the SchemaMapping was created.

+ */ + createdAt: Date | undefined; + + /** + *

The timestamp of when the SchemaMapping was last updated.

+ */ + updatedAt: Date | undefined; +} + +/** + * @public + */ +export interface ListSchemaMappingsOutput { + /** + *

A list of SchemaMappingSummary objects, each of which contain the fields + * SchemaName, SchemaArn, CreatedAt, UpdatedAt.

+ */ + schemaList?: SchemaMappingSummary[]; + + /** + *

The pagination token from the previous ListDomains API call.

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

The ARN of the resource for which you want to view tags.

+ */ + resourceArn: string | undefined; +} + +/** + * @public + */ +export interface ListTagsForResourceOutput { + /** + *

The tags used to organize, track, or control access for this resource.

+ */ + tags: Record | undefined; +} + +/** + * @public + */ +export interface StartMatchingJobInput { + /** + *

The name of the matching job to be retrieved.

+ */ + workflowName: string | undefined; +} + +/** + * @public + */ +export interface StartMatchingJobOutput { + /** + *

The ID of the job.

+ */ + jobId: string | undefined; +} + +/** + * @public + */ +export interface TagResourceInput { + /** + *

The ARN of the resource for which you want to view tags.

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

The tags used to organize, track, or control access for this resource.

+ */ + tags: Record | undefined; +} + +/** + * @public + */ +export interface TagResourceOutput {} + +/** + * @public + */ +export interface UntagResourceInput { + /** + *

The ARN of the resource for which you want to untag.

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

The list of tag keys to remove from the resource.

+ */ + tagKeys: string[] | undefined; +} + +/** + * @public + */ +export interface UntagResourceOutput {} + +/** + * @public + */ +export interface UpdateMatchingWorkflowInput { + /** + *

The name of the workflow to be retrieved.

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

A description of the workflow.

+ */ + description?: string; + + /** + *

A list of InputSource objects, which have the fields InputSourceARN and + * SchemaName.

+ */ + inputSourceConfig: InputSource[] | undefined; + + /** + *

A list of OutputSource objects, each of which contains fields OutputS3Path, + * ApplyNormalization, and Output.

+ */ + outputSourceConfig: OutputSource[] | undefined; + + /** + *

An object which defines the resolutionType and the ruleBasedProperties + *

+ */ + resolutionTechniques: ResolutionTechniques | undefined; + + /** + *

An object which defines an incremental run type and has only incrementalRunType as a field.

+ */ + incrementalRunConfig?: IncrementalRunConfig; + + /** + *

The Amazon Resource Name (ARN) of the IAM role. AWS Entity Resolution assumes this role + * to create resources on your behalf as part of workflow execution.

+ */ + roleArn: string | undefined; +} + +/** + * @public + */ +export interface UpdateMatchingWorkflowOutput { + /** + *

The name of the workflow.

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

A description of the workflow.

+ */ + description?: string; + + /** + *

A list of InputSource objects, which have the fields InputSourceARN and + * SchemaName.

+ */ + inputSourceConfig: InputSource[] | undefined; + + /** + *

A list of OutputSource objects, each of which contains fields OutputS3Path, + * ApplyNormalization, and Output.

+ */ + outputSourceConfig: OutputSource[] | undefined; + + /** + *

An object which defines the resolutionType and the ruleBasedProperties + *

+ */ + resolutionTechniques: ResolutionTechniques | undefined; + + /** + *

An object which defines an incremental run type and has only incrementalRunType as a field.

+ */ + incrementalRunConfig?: IncrementalRunConfig; + + /** + *

The Amazon Resource Name (ARN) of the IAM role. AWS Entity Resolution assumes this role + * to create resources on your behalf as part of workflow execution.

+ */ + roleArn: string | undefined; +} + +/** + * @internal + */ +export const GetMatchIdInputFilterSensitiveLog = (obj: GetMatchIdInput): any => ({ + ...obj, + ...(obj.record && { record: SENSITIVE_STRING }), +}); diff --git a/clients/client-entityresolution/src/pagination/Interfaces.ts b/clients/client-entityresolution/src/pagination/Interfaces.ts new file mode 100644 index 000000000000..d7aafac3c590 --- /dev/null +++ b/clients/client-entityresolution/src/pagination/Interfaces.ts @@ -0,0 +1,11 @@ +// smithy-typescript generated code +import { PaginationConfiguration } from "@smithy/types"; + +import { EntityResolutionClient } from "../EntityResolutionClient"; + +/** + * @public + */ +export interface EntityResolutionPaginationConfiguration extends PaginationConfiguration { + client: EntityResolutionClient; +} diff --git a/clients/client-entityresolution/src/pagination/ListMatchingJobsPaginator.ts b/clients/client-entityresolution/src/pagination/ListMatchingJobsPaginator.ts new file mode 100644 index 000000000000..7619910764c5 --- /dev/null +++ b/clients/client-entityresolution/src/pagination/ListMatchingJobsPaginator.ts @@ -0,0 +1,50 @@ +// smithy-typescript generated code +import { Paginator } from "@smithy/types"; + +import { + ListMatchingJobsCommand, + ListMatchingJobsCommandInput, + ListMatchingJobsCommandOutput, +} from "../commands/ListMatchingJobsCommand"; +import { EntityResolutionClient } from "../EntityResolutionClient"; +import { EntityResolutionPaginationConfiguration } from "./Interfaces"; + +/** + * @internal + */ +const makePagedClientRequest = async ( + client: EntityResolutionClient, + input: ListMatchingJobsCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new ListMatchingJobsCommand(input), ...args); +}; +/** + * @public + */ +export async function* paginateListMatchingJobs( + config: EntityResolutionPaginationConfiguration, + input: ListMatchingJobsCommandInput, + ...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: ListMatchingJobsCommandOutput; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof EntityResolutionClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected EntityResolution | EntityResolutionClient"); + } + yield page; + const prevToken = token; + token = page.nextToken; + hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken)); + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-entityresolution/src/pagination/ListMatchingWorkflowsPaginator.ts b/clients/client-entityresolution/src/pagination/ListMatchingWorkflowsPaginator.ts new file mode 100644 index 000000000000..544988f76ccd --- /dev/null +++ b/clients/client-entityresolution/src/pagination/ListMatchingWorkflowsPaginator.ts @@ -0,0 +1,50 @@ +// smithy-typescript generated code +import { Paginator } from "@smithy/types"; + +import { + ListMatchingWorkflowsCommand, + ListMatchingWorkflowsCommandInput, + ListMatchingWorkflowsCommandOutput, +} from "../commands/ListMatchingWorkflowsCommand"; +import { EntityResolutionClient } from "../EntityResolutionClient"; +import { EntityResolutionPaginationConfiguration } from "./Interfaces"; + +/** + * @internal + */ +const makePagedClientRequest = async ( + client: EntityResolutionClient, + input: ListMatchingWorkflowsCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new ListMatchingWorkflowsCommand(input), ...args); +}; +/** + * @public + */ +export async function* paginateListMatchingWorkflows( + config: EntityResolutionPaginationConfiguration, + input: ListMatchingWorkflowsCommandInput, + ...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: ListMatchingWorkflowsCommandOutput; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof EntityResolutionClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected EntityResolution | EntityResolutionClient"); + } + yield page; + const prevToken = token; + token = page.nextToken; + hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken)); + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-entityresolution/src/pagination/ListSchemaMappingsPaginator.ts b/clients/client-entityresolution/src/pagination/ListSchemaMappingsPaginator.ts new file mode 100644 index 000000000000..1557a405301e --- /dev/null +++ b/clients/client-entityresolution/src/pagination/ListSchemaMappingsPaginator.ts @@ -0,0 +1,50 @@ +// smithy-typescript generated code +import { Paginator } from "@smithy/types"; + +import { + ListSchemaMappingsCommand, + ListSchemaMappingsCommandInput, + ListSchemaMappingsCommandOutput, +} from "../commands/ListSchemaMappingsCommand"; +import { EntityResolutionClient } from "../EntityResolutionClient"; +import { EntityResolutionPaginationConfiguration } from "./Interfaces"; + +/** + * @internal + */ +const makePagedClientRequest = async ( + client: EntityResolutionClient, + input: ListSchemaMappingsCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new ListSchemaMappingsCommand(input), ...args); +}; +/** + * @public + */ +export async function* paginateListSchemaMappings( + config: EntityResolutionPaginationConfiguration, + input: ListSchemaMappingsCommandInput, + ...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: ListSchemaMappingsCommandOutput; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof EntityResolutionClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected EntityResolution | EntityResolutionClient"); + } + yield page; + const prevToken = token; + token = page.nextToken; + hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken)); + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-entityresolution/src/pagination/index.ts b/clients/client-entityresolution/src/pagination/index.ts new file mode 100644 index 000000000000..38cff6ba6b83 --- /dev/null +++ b/clients/client-entityresolution/src/pagination/index.ts @@ -0,0 +1,5 @@ +// smithy-typescript generated code +export * from "./Interfaces"; +export * from "./ListMatchingJobsPaginator"; +export * from "./ListMatchingWorkflowsPaginator"; +export * from "./ListSchemaMappingsPaginator"; diff --git a/clients/client-entityresolution/src/protocols/Aws_restJson1.ts b/clients/client-entityresolution/src/protocols/Aws_restJson1.ts new file mode 100644 index 000000000000..db0586869d74 --- /dev/null +++ b/clients/client-entityresolution/src/protocols/Aws_restJson1.ts @@ -0,0 +1,1876 @@ +// smithy-typescript generated code +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { + _json, + collectBody, + decorateServiceException as __decorateServiceException, + expectNonNull as __expectNonNull, + expectNumber as __expectNumber, + expectObject as __expectObject, + expectString as __expectString, + extendedEncodeURIComponent as __extendedEncodeURIComponent, + map, + parseEpochTimestamp as __parseEpochTimestamp, + resolvedPath as __resolvedPath, + take, + withBaseException, +} from "@smithy/smithy-client"; +import { + Endpoint as __Endpoint, + ResponseMetadata as __ResponseMetadata, + SerdeContext as __SerdeContext, +} from "@smithy/types"; + +import { + CreateMatchingWorkflowCommandInput, + CreateMatchingWorkflowCommandOutput, +} from "../commands/CreateMatchingWorkflowCommand"; +import { + CreateSchemaMappingCommandInput, + CreateSchemaMappingCommandOutput, +} from "../commands/CreateSchemaMappingCommand"; +import { + DeleteMatchingWorkflowCommandInput, + DeleteMatchingWorkflowCommandOutput, +} from "../commands/DeleteMatchingWorkflowCommand"; +import { + DeleteSchemaMappingCommandInput, + DeleteSchemaMappingCommandOutput, +} from "../commands/DeleteSchemaMappingCommand"; +import { GetMatchIdCommandInput, GetMatchIdCommandOutput } from "../commands/GetMatchIdCommand"; +import { GetMatchingJobCommandInput, GetMatchingJobCommandOutput } from "../commands/GetMatchingJobCommand"; +import { + GetMatchingWorkflowCommandInput, + GetMatchingWorkflowCommandOutput, +} from "../commands/GetMatchingWorkflowCommand"; +import { GetSchemaMappingCommandInput, GetSchemaMappingCommandOutput } from "../commands/GetSchemaMappingCommand"; +import { ListMatchingJobsCommandInput, ListMatchingJobsCommandOutput } from "../commands/ListMatchingJobsCommand"; +import { + ListMatchingWorkflowsCommandInput, + ListMatchingWorkflowsCommandOutput, +} from "../commands/ListMatchingWorkflowsCommand"; +import { ListSchemaMappingsCommandInput, ListSchemaMappingsCommandOutput } from "../commands/ListSchemaMappingsCommand"; +import { + ListTagsForResourceCommandInput, + ListTagsForResourceCommandOutput, +} from "../commands/ListTagsForResourceCommand"; +import { StartMatchingJobCommandInput, StartMatchingJobCommandOutput } from "../commands/StartMatchingJobCommand"; +import { TagResourceCommandInput, TagResourceCommandOutput } from "../commands/TagResourceCommand"; +import { UntagResourceCommandInput, UntagResourceCommandOutput } from "../commands/UntagResourceCommand"; +import { + UpdateMatchingWorkflowCommandInput, + UpdateMatchingWorkflowCommandOutput, +} from "../commands/UpdateMatchingWorkflowCommand"; +import { EntityResolutionServiceException as __BaseException } from "../models/EntityResolutionServiceException"; +import { + AccessDeniedException, + ConflictException, + ExceedsLimitException, + IncrementalRunConfig, + InputSource, + InternalServerException, + JobSummary, + MatchingWorkflowSummary, + OutputAttribute, + OutputSource, + ResolutionTechniques, + ResourceNotFoundException, + Rule, + RuleBasedProperties, + SchemaInputAttribute, + SchemaMappingSummary, + ThrottlingException, + ValidationException, +} from "../models/models_0"; + +/** + * serializeAws_restJson1CreateMatchingWorkflowCommand + */ +export const se_CreateMatchingWorkflowCommand = async ( + input: CreateMatchingWorkflowCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/matchingworkflows"; + let body: any; + body = JSON.stringify( + take(input, { + description: [], + incrementalRunConfig: (_) => _json(_), + inputSourceConfig: (_) => _json(_), + outputSourceConfig: (_) => _json(_), + resolutionTechniques: (_) => _json(_), + roleArn: [], + tags: (_) => _json(_), + workflowName: [], + }) + ); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +/** + * serializeAws_restJson1CreateSchemaMappingCommand + */ +export const se_CreateSchemaMappingCommand = async ( + input: CreateSchemaMappingCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/schemas"; + let body: any; + body = JSON.stringify( + take(input, { + description: [], + mappedInputFields: (_) => _json(_), + schemaName: [], + tags: (_) => _json(_), + }) + ); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +/** + * serializeAws_restJson1DeleteMatchingWorkflowCommand + */ +export const se_DeleteMatchingWorkflowCommand = async ( + input: DeleteMatchingWorkflowCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/matchingworkflows/{workflowName}"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "workflowName", + () => input.workflowName!, + "{workflowName}", + false + ); + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "DELETE", + headers, + path: resolvedPath, + body, + }); +}; + +/** + * serializeAws_restJson1DeleteSchemaMappingCommand + */ +export const se_DeleteSchemaMappingCommand = async ( + input: DeleteSchemaMappingCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/schemas/{schemaName}"; + resolvedPath = __resolvedPath(resolvedPath, input, "schemaName", () => input.schemaName!, "{schemaName}", false); + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "DELETE", + headers, + path: resolvedPath, + body, + }); +}; + +/** + * serializeAws_restJson1GetMatchIdCommand + */ +export const se_GetMatchIdCommand = async ( + input: GetMatchIdCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/matchingworkflows/{workflowName}/matches"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "workflowName", + () => input.workflowName!, + "{workflowName}", + false + ); + let body: any; + body = JSON.stringify( + take(input, { + record: (_) => _json(_), + }) + ); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +/** + * serializeAws_restJson1GetMatchingJobCommand + */ +export const se_GetMatchingJobCommand = async ( + input: GetMatchingJobCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/matchingworkflows/{workflowName}/jobs/{jobId}"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "workflowName", + () => input.workflowName!, + "{workflowName}", + false + ); + resolvedPath = __resolvedPath(resolvedPath, input, "jobId", () => input.jobId!, "{jobId}", false); + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; + +/** + * serializeAws_restJson1GetMatchingWorkflowCommand + */ +export const se_GetMatchingWorkflowCommand = async ( + input: GetMatchingWorkflowCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/matchingworkflows/{workflowName}"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "workflowName", + () => input.workflowName!, + "{workflowName}", + false + ); + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; + +/** + * serializeAws_restJson1GetSchemaMappingCommand + */ +export const se_GetSchemaMappingCommand = async ( + input: GetSchemaMappingCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/schemas/{schemaName}"; + resolvedPath = __resolvedPath(resolvedPath, input, "schemaName", () => input.schemaName!, "{schemaName}", false); + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; + +/** + * serializeAws_restJson1ListMatchingJobsCommand + */ +export const se_ListMatchingJobsCommand = async ( + input: ListMatchingJobsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/matchingworkflows/{workflowName}/jobs"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "workflowName", + () => input.workflowName!, + "{workflowName}", + false + ); + const query: any = map({ + nextToken: [, input.nextToken!], + maxResults: [() => input.maxResults !== void 0, () => input.maxResults!.toString()], + }); + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; + +/** + * serializeAws_restJson1ListMatchingWorkflowsCommand + */ +export const se_ListMatchingWorkflowsCommand = async ( + input: ListMatchingWorkflowsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/matchingworkflows"; + const query: any = map({ + nextToken: [, input.nextToken!], + maxResults: [() => input.maxResults !== void 0, () => input.maxResults!.toString()], + }); + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; + +/** + * serializeAws_restJson1ListSchemaMappingsCommand + */ +export const se_ListSchemaMappingsCommand = async ( + input: ListSchemaMappingsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/schemas"; + const query: any = map({ + nextToken: [, input.nextToken!], + maxResults: [() => input.maxResults !== void 0, () => input.maxResults!.toString()], + }); + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; + +/** + * serializeAws_restJson1ListTagsForResourceCommand + */ +export const se_ListTagsForResourceCommand = async ( + input: ListTagsForResourceCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}"; + resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn!, "{resourceArn}", false); + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; + +/** + * serializeAws_restJson1StartMatchingJobCommand + */ +export const se_StartMatchingJobCommand = async ( + input: StartMatchingJobCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/matchingworkflows/{workflowName}/jobs"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "workflowName", + () => input.workflowName!, + "{workflowName}", + false + ); + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +/** + * serializeAws_restJson1TagResourceCommand + */ +export const se_TagResourceCommand = async ( + input: TagResourceCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}"; + resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn!, "{resourceArn}", false); + let body: any; + body = JSON.stringify( + take(input, { + tags: (_) => _json(_), + }) + ); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +/** + * serializeAws_restJson1UntagResourceCommand + */ +export const se_UntagResourceCommand = async ( + input: UntagResourceCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}"; + resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn!, "{resourceArn}", false); + const query: any = map({ + tagKeys: [ + __expectNonNull(input.tagKeys, `tagKeys`) != null, + () => (input.tagKeys! || []).map((_entry) => _entry as any), + ], + }); + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "DELETE", + headers, + path: resolvedPath, + query, + body, + }); +}; + +/** + * serializeAws_restJson1UpdateMatchingWorkflowCommand + */ +export const se_UpdateMatchingWorkflowCommand = async ( + input: UpdateMatchingWorkflowCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/matchingworkflows/{workflowName}"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "workflowName", + () => input.workflowName!, + "{workflowName}", + false + ); + let body: any; + body = JSON.stringify( + take(input, { + description: [], + incrementalRunConfig: (_) => _json(_), + inputSourceConfig: (_) => _json(_), + outputSourceConfig: (_) => _json(_), + resolutionTechniques: (_) => _json(_), + roleArn: [], + }) + ); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "PUT", + headers, + path: resolvedPath, + body, + }); +}; + +/** + * deserializeAws_restJson1CreateMatchingWorkflowCommand + */ +export const de_CreateMatchingWorkflowCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CreateMatchingWorkflowCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + description: __expectString, + incrementalRunConfig: _json, + inputSourceConfig: _json, + outputSourceConfig: _json, + resolutionTechniques: _json, + roleArn: __expectString, + workflowArn: __expectString, + workflowName: __expectString, + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1CreateMatchingWorkflowCommandError + */ +const de_CreateMatchingWorkflowCommandError = 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.entityresolution#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ConflictException": + case "com.amazonaws.entityresolution#ConflictException": + throw await de_ConflictExceptionRes(parsedOutput, context); + case "ExceedsLimitException": + case "com.amazonaws.entityresolution#ExceedsLimitException": + throw await de_ExceedsLimitExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.entityresolution#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.entityresolution#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.entityresolution#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1CreateSchemaMappingCommand + */ +export const de_CreateSchemaMappingCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CreateSchemaMappingCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + description: __expectString, + mappedInputFields: _json, + schemaArn: __expectString, + schemaName: __expectString, + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1CreateSchemaMappingCommandError + */ +const de_CreateSchemaMappingCommandError = 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.entityresolution#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ConflictException": + case "com.amazonaws.entityresolution#ConflictException": + throw await de_ConflictExceptionRes(parsedOutput, context); + case "ExceedsLimitException": + case "com.amazonaws.entityresolution#ExceedsLimitException": + throw await de_ExceedsLimitExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.entityresolution#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.entityresolution#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.entityresolution#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1DeleteMatchingWorkflowCommand + */ +export const de_DeleteMatchingWorkflowCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_DeleteMatchingWorkflowCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1DeleteMatchingWorkflowCommandError + */ +const de_DeleteMatchingWorkflowCommandError = 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.entityresolution#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.entityresolution#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.entityresolution#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.entityresolution#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1DeleteSchemaMappingCommand + */ +export const de_DeleteSchemaMappingCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_DeleteSchemaMappingCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1DeleteSchemaMappingCommandError + */ +const de_DeleteSchemaMappingCommandError = 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.entityresolution#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ConflictException": + case "com.amazonaws.entityresolution#ConflictException": + throw await de_ConflictExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.entityresolution#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.entityresolution#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.entityresolution#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1GetMatchIdCommand + */ +export const de_GetMatchIdCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_GetMatchIdCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + matchId: __expectString, + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1GetMatchIdCommandError + */ +const de_GetMatchIdCommandError = 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.entityresolution#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.entityresolution#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.entityresolution#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.entityresolution#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.entityresolution#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1GetMatchingJobCommand + */ +export const de_GetMatchingJobCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_GetMatchingJobCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + endTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + errorDetails: _json, + jobId: __expectString, + metrics: _json, + startTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + status: __expectString, + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1GetMatchingJobCommandError + */ +const de_GetMatchingJobCommandError = 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.entityresolution#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.entityresolution#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.entityresolution#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.entityresolution#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.entityresolution#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1GetMatchingWorkflowCommand + */ +export const de_GetMatchingWorkflowCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_GetMatchingWorkflowCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + incrementalRunConfig: _json, + inputSourceConfig: _json, + outputSourceConfig: _json, + resolutionTechniques: _json, + roleArn: __expectString, + tags: _json, + updatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + workflowArn: __expectString, + workflowName: __expectString, + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1GetMatchingWorkflowCommandError + */ +const de_GetMatchingWorkflowCommandError = 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.entityresolution#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.entityresolution#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.entityresolution#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.entityresolution#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.entityresolution#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1GetSchemaMappingCommand + */ +export const de_GetSchemaMappingCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_GetSchemaMappingCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + mappedInputFields: _json, + schemaArn: __expectString, + schemaName: __expectString, + tags: _json, + updatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1GetSchemaMappingCommandError + */ +const de_GetSchemaMappingCommandError = 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.entityresolution#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.entityresolution#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.entityresolution#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.entityresolution#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.entityresolution#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1ListMatchingJobsCommand + */ +export const de_ListMatchingJobsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_ListMatchingJobsCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + jobs: (_) => de_JobList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1ListMatchingJobsCommandError + */ +const de_ListMatchingJobsCommandError = 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.entityresolution#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.entityresolution#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.entityresolution#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.entityresolution#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.entityresolution#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1ListMatchingWorkflowsCommand + */ +export const de_ListMatchingWorkflowsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_ListMatchingWorkflowsCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + nextToken: __expectString, + workflowSummaries: (_) => de_MatchingWorkflowList(_, context), + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1ListMatchingWorkflowsCommandError + */ +const de_ListMatchingWorkflowsCommandError = 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.entityresolution#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.entityresolution#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.entityresolution#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.entityresolution#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1ListSchemaMappingsCommand + */ +export const de_ListSchemaMappingsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_ListSchemaMappingsCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + nextToken: __expectString, + schemaList: (_) => de_SchemaMappingList(_, context), + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1ListSchemaMappingsCommandError + */ +const de_ListSchemaMappingsCommandError = 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.entityresolution#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.entityresolution#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.entityresolution#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.entityresolution#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1ListTagsForResourceCommand + */ +export const de_ListTagsForResourceCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_ListTagsForResourceCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + tags: _json, + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1ListTagsForResourceCommandError + */ +const de_ListTagsForResourceCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InternalServerException": + case "com.amazonaws.entityresolution#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.entityresolution#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.entityresolution#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1StartMatchingJobCommand + */ +export const de_StartMatchingJobCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_StartMatchingJobCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + jobId: __expectString, + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1StartMatchingJobCommandError + */ +const de_StartMatchingJobCommandError = 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.entityresolution#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ConflictException": + case "com.amazonaws.entityresolution#ConflictException": + throw await de_ConflictExceptionRes(parsedOutput, context); + case "ExceedsLimitException": + case "com.amazonaws.entityresolution#ExceedsLimitException": + throw await de_ExceedsLimitExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.entityresolution#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.entityresolution#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.entityresolution#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.entityresolution#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1TagResourceCommand + */ +export const de_TagResourceCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_TagResourceCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + await collectBody(output.body, context); + return contents; +}; + +/** + * deserializeAws_restJson1TagResourceCommandError + */ +const de_TagResourceCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InternalServerException": + case "com.amazonaws.entityresolution#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.entityresolution#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.entityresolution#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1UntagResourceCommand + */ +export const de_UntagResourceCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_UntagResourceCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + await collectBody(output.body, context); + return contents; +}; + +/** + * deserializeAws_restJson1UntagResourceCommandError + */ +const de_UntagResourceCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InternalServerException": + case "com.amazonaws.entityresolution#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.entityresolution#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1UpdateMatchingWorkflowCommand + */ +export const de_UpdateMatchingWorkflowCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_UpdateMatchingWorkflowCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + description: __expectString, + incrementalRunConfig: _json, + inputSourceConfig: _json, + outputSourceConfig: _json, + resolutionTechniques: _json, + roleArn: __expectString, + workflowName: __expectString, + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1UpdateMatchingWorkflowCommandError + */ +const de_UpdateMatchingWorkflowCommandError = 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.entityresolution#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.entityresolution#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.entityresolution#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.entityresolution#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.entityresolution#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +const throwDefaultError = withBaseException(__BaseException); +/** + * deserializeAws_restJson1AccessDeniedExceptionRes + */ +const de_AccessDeniedExceptionRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const contents: any = map({}); + const data: any = parsedOutput.body; + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); + const exception = new AccessDeniedException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return __decorateServiceException(exception, parsedOutput.body); +}; + +/** + * deserializeAws_restJson1ConflictExceptionRes + */ +const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { + const contents: any = map({}); + const data: any = parsedOutput.body; + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); + const exception = new ConflictException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return __decorateServiceException(exception, parsedOutput.body); +}; + +/** + * deserializeAws_restJson1ExceedsLimitExceptionRes + */ +const de_ExceedsLimitExceptionRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const contents: any = map({}); + const data: any = parsedOutput.body; + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); + const exception = new ExceedsLimitException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return __decorateServiceException(exception, parsedOutput.body); +}; + +/** + * deserializeAws_restJson1InternalServerExceptionRes + */ +const de_InternalServerExceptionRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const contents: any = map({}); + const data: any = parsedOutput.body; + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); + const exception = new InternalServerException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return __decorateServiceException(exception, parsedOutput.body); +}; + +/** + * deserializeAws_restJson1ResourceNotFoundExceptionRes + */ +const de_ResourceNotFoundExceptionRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const contents: any = map({}); + const data: any = parsedOutput.body; + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); + const exception = new ResourceNotFoundException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return __decorateServiceException(exception, parsedOutput.body); +}; + +/** + * deserializeAws_restJson1ThrottlingExceptionRes + */ +const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { + const contents: any = map({}); + const data: any = parsedOutput.body; + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); + const exception = new ThrottlingException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return __decorateServiceException(exception, parsedOutput.body); +}; + +/** + * deserializeAws_restJson1ValidationExceptionRes + */ +const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { + const contents: any = map({}); + const data: any = parsedOutput.body; + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); + const exception = new ValidationException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return __decorateServiceException(exception, parsedOutput.body); +}; + +// se_IncrementalRunConfig omitted. + +// se_InputSource omitted. + +// se_InputSourceConfig omitted. + +// se_MatchingKeys omitted. + +// se_OutputAttribute omitted. + +// se_OutputAttributes omitted. + +// se_OutputSource omitted. + +// se_OutputSourceConfig omitted. + +// se_RecordAttributeMap omitted. + +// se_ResolutionTechniques omitted. + +// se_Rule omitted. + +// se_RuleBasedProperties omitted. + +// se_RuleList omitted. + +// se_SchemaInputAttribute omitted. + +// se_SchemaInputAttributes omitted. + +// se_TagMap omitted. + +// de_ErrorDetails omitted. + +// de_IncrementalRunConfig omitted. + +// de_InputSource omitted. + +// de_InputSourceConfig omitted. + +/** + * deserializeAws_restJson1JobList + */ +const de_JobList = (output: any, context: __SerdeContext): JobSummary[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_JobSummary(entry, context); + }); + return retVal; +}; + +// de_JobMetrics omitted. + +/** + * deserializeAws_restJson1JobSummary + */ +const de_JobSummary = (output: any, context: __SerdeContext): JobSummary => { + return take(output, { + endTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + jobId: __expectString, + startTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + status: __expectString, + }) as any; +}; + +// de_MatchingKeys omitted. + +/** + * deserializeAws_restJson1MatchingWorkflowList + */ +const de_MatchingWorkflowList = (output: any, context: __SerdeContext): MatchingWorkflowSummary[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_MatchingWorkflowSummary(entry, context); + }); + return retVal; +}; + +/** + * deserializeAws_restJson1MatchingWorkflowSummary + */ +const de_MatchingWorkflowSummary = (output: any, context: __SerdeContext): MatchingWorkflowSummary => { + return take(output, { + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + updatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + workflowArn: __expectString, + workflowName: __expectString, + }) as any; +}; + +// de_OutputAttribute omitted. + +// de_OutputAttributes omitted. + +// de_OutputSource omitted. + +// de_OutputSourceConfig omitted. + +// de_ResolutionTechniques omitted. + +// de_Rule omitted. + +// de_RuleBasedProperties omitted. + +// de_RuleList omitted. + +// de_SchemaInputAttribute omitted. + +// de_SchemaInputAttributes omitted. + +/** + * deserializeAws_restJson1SchemaMappingList + */ +const de_SchemaMappingList = (output: any, context: __SerdeContext): SchemaMappingSummary[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_SchemaMappingSummary(entry, context); + }); + return retVal; +}; + +/** + * deserializeAws_restJson1SchemaMappingSummary + */ +const de_SchemaMappingSummary = (output: any, context: __SerdeContext): SchemaMappingSummary => { + return take(output, { + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + schemaArn: __expectString, + schemaName: __expectString, + updatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; +}; + +// de_TagMap omitted. + +const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ + httpStatusCode: output.statusCode, + requestId: + output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"], + extendedRequestId: output.headers["x-amz-id-2"], + cfId: output.headers["x-amz-cf-id"], +}); + +// Encode Uint8Array data into string with utf-8. +const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => + collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); + +const isSerializableHeaderValue = (value: any): boolean => + value !== undefined && + value !== null && + value !== "" && + (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) && + (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0); + +const parseBody = (streamBody: any, context: __SerdeContext): any => + collectBodyString(streamBody, context).then((encoded) => { + if (encoded.length) { + return JSON.parse(encoded); + } + return {}; + }); + +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-entityresolution/src/runtimeConfig.browser.ts b/clients/client-entityresolution/src/runtimeConfig.browser.ts new file mode 100644 index 000000000000..bbda7ac5c9ee --- /dev/null +++ b/clients/client-entityresolution/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 { EntityResolutionClientConfig } from "./EntityResolutionClient"; +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: EntityResolutionClientConfig) => { + 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-entityresolution/src/runtimeConfig.native.ts b/clients/client-entityresolution/src/runtimeConfig.native.ts new file mode 100644 index 000000000000..74d794d7aecc --- /dev/null +++ b/clients/client-entityresolution/src/runtimeConfig.native.ts @@ -0,0 +1,18 @@ +// smithy-typescript generated code +import { Sha256 } from "@aws-crypto/sha256-js"; + +import { EntityResolutionClientConfig } from "./EntityResolutionClient"; +import { getRuntimeConfig as getBrowserRuntimeConfig } from "./runtimeConfig.browser"; + +/** + * @internal + */ +export const getRuntimeConfig = (config: EntityResolutionClientConfig) => { + const browserDefaults = getBrowserRuntimeConfig(config); + return { + ...browserDefaults, + ...config, + runtime: "react-native", + sha256: config?.sha256 ?? Sha256, + }; +}; diff --git a/clients/client-entityresolution/src/runtimeConfig.shared.ts b/clients/client-entityresolution/src/runtimeConfig.shared.ts new file mode 100644 index 000000000000..dd988b5a61a7 --- /dev/null +++ b/clients/client-entityresolution/src/runtimeConfig.shared.ts @@ -0,0 +1,24 @@ +// 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 { EntityResolutionClientConfig } from "./EntityResolutionClient"; + +/** + * @internal + */ +export const getRuntimeConfig = (config: EntityResolutionClientConfig) => ({ + apiVersion: "2018-05-10", + base64Decoder: config?.base64Decoder ?? fromBase64, + base64Encoder: config?.base64Encoder ?? toBase64, + disableHostPrefix: config?.disableHostPrefix ?? false, + endpointProvider: config?.endpointProvider ?? defaultEndpointResolver, + logger: config?.logger ?? new NoOpLogger(), + serviceId: config?.serviceId ?? "EntityResolution", + urlParser: config?.urlParser ?? parseUrl, + utf8Decoder: config?.utf8Decoder ?? fromUtf8, + utf8Encoder: config?.utf8Encoder ?? toUtf8, +}); diff --git a/clients/client-entityresolution/src/runtimeConfig.ts b/clients/client-entityresolution/src/runtimeConfig.ts new file mode 100644 index 000000000000..88af1f7ecffe --- /dev/null +++ b/clients/client-entityresolution/src/runtimeConfig.ts @@ -0,0 +1,59 @@ +// 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 { 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 { EntityResolutionClientConfig } from "./EntityResolutionClient"; +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: EntityResolutionClientConfig) => { + emitWarningIfUnsupportedVersion(process.version); + const defaultsMode = resolveDefaultsModeConfig(config); + const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode); + const clientSharedValues = getSharedRuntimeConfig(config); + 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-entityresolution/tsconfig.cjs.json b/clients/client-entityresolution/tsconfig.cjs.json new file mode 100644 index 000000000000..3567d85ba846 --- /dev/null +++ b/clients/client-entityresolution/tsconfig.cjs.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig", + "compilerOptions": { + "outDir": "dist-cjs" + } +} diff --git a/clients/client-entityresolution/tsconfig.es.json b/clients/client-entityresolution/tsconfig.es.json new file mode 100644 index 000000000000..809f57bde65e --- /dev/null +++ b/clients/client-entityresolution/tsconfig.es.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig", + "compilerOptions": { + "lib": ["dom"], + "module": "esnext", + "outDir": "dist-es" + } +} diff --git a/clients/client-entityresolution/tsconfig.json b/clients/client-entityresolution/tsconfig.json new file mode 100644 index 000000000000..344909de2128 --- /dev/null +++ b/clients/client-entityresolution/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-entityresolution/tsconfig.types.json b/clients/client-entityresolution/tsconfig.types.json new file mode 100644 index 000000000000..4c3dfa7b3d25 --- /dev/null +++ b/clients/client-entityresolution/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-entityresolution/typedoc.json b/clients/client-entityresolution/typedoc.json new file mode 100644 index 000000000000..8a364aa93b69 --- /dev/null +++ b/clients/client-entityresolution/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/entityresolution.json b/codegen/sdk-codegen/aws-models/entityresolution.json new file mode 100644 index 000000000000..3291b2f14d7a --- /dev/null +++ b/codegen/sdk-codegen/aws-models/entityresolution.json @@ -0,0 +1,3060 @@ +{ + "smithy": "2.0", + "shapes": { + "com.amazonaws.entityresolution#AWSVeniceService": { + "type": "service", + "version": "2018-05-10", + "operations": [ + { + "target": "com.amazonaws.entityresolution#CreateMatchingWorkflow" + }, + { + "target": "com.amazonaws.entityresolution#CreateSchemaMapping" + }, + { + "target": "com.amazonaws.entityresolution#DeleteMatchingWorkflow" + }, + { + "target": "com.amazonaws.entityresolution#DeleteSchemaMapping" + }, + { + "target": "com.amazonaws.entityresolution#GetMatchId" + }, + { + "target": "com.amazonaws.entityresolution#GetMatchingJob" + }, + { + "target": "com.amazonaws.entityresolution#GetMatchingWorkflow" + }, + { + "target": "com.amazonaws.entityresolution#GetSchemaMapping" + }, + { + "target": "com.amazonaws.entityresolution#ListMatchingJobs" + }, + { + "target": "com.amazonaws.entityresolution#ListMatchingWorkflows" + }, + { + "target": "com.amazonaws.entityresolution#ListSchemaMappings" + }, + { + "target": "com.amazonaws.entityresolution#ListTagsForResource" + }, + { + "target": "com.amazonaws.entityresolution#StartMatchingJob" + }, + { + "target": "com.amazonaws.entityresolution#TagResource" + }, + { + "target": "com.amazonaws.entityresolution#UntagResource" + }, + { + "target": "com.amazonaws.entityresolution#UpdateMatchingWorkflow" + } + ], + "traits": { + "aws.api#service": { + "sdkId": "EntityResolution", + "arnNamespace": "entityresolution", + "cloudTrailEventSource": "entityresolution.amazonaws.com" + }, + "aws.auth#sigv4": { + "name": "entityresolution" + }, + "aws.protocols#restJson1": {}, + "smithy.api#cors": { + "additionalAllowedHeaders": [ + "*", + "content-type", + "x-amz-content-sha256", + "x-amz-user-agent", + "x-amzn-platform-id", + "x-amzn-trace-id" + ], + "additionalExposedHeaders": ["x-amzn-errortype", "x-amzn-requestid", "x-amzn-trace-id"], + "maxAge": 86400 + }, + "smithy.api#documentation": "

Welcome to the AWS Entity Resolution API Reference.

\n

AWS Entity Resolution is an AWS service that provides pre-configured entity resolution capabilities \n that enable developers and analysts at advertising and marketing companies to build an accurate and \n complete view of their consumers.

\n

\n With AWS Entity Resolution, you have the ability to match source records containing consumer identifiers, \n such as name, email address, and phone number. This holds true even when these records have incomplete or \n conflicting identifiers. For example, AWS Entity Resolution can effectively match a source record from a \n customer relationship management (CRM) system, which includes account information like first name, last name, \n postal address, phone number, and email address, with a source record from a marketing system containing \n campaign information, such as username and email address.

\n

To learn more about AWS Entity Resolution concepts, procedures, and best practices, see the\n AWS Entity Resolution \n User Guide.

", + "smithy.api#title": "AWS EntityResolution", + "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" + } + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "error": "Invalid Configuration: FIPS and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "type": "tree", + "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" + } + ] + } + ] + }, + { + "conditions": [], + "type": "tree", + "rules": [ + { + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [ + { + "fn": "aws.partition", + "argv": [ + { + "ref": "Region" + } + ], + "assign": "PartitionResult" + } + ], + "type": "tree", + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + true, + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + true, + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsDualStack" + ] + } + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [], + "type": "tree", + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://entityresolution-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ] + } + ] + }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + true, + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [], + "type": "tree", + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://entityresolution-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ] + } + ] + }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + true, + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsDualStack" + ] + } + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [], + "type": "tree", + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://entityresolution.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ] + } + ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" + } + ] + }, + { + "conditions": [], + "type": "tree", + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://entityresolution.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ] + } + ] + } + ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" + } + ] + } + ] + }, + "smithy.rules#endpointTests": { + "testCases": [ + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://entityresolution-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseDualStack": true, + "UseFIPS": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://entityresolution-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://entityresolution.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseDualStack": true, + "UseFIPS": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://entityresolution.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://entityresolution-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseDualStack": true, + "UseFIPS": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://entityresolution-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://entityresolution.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseDualStack": true, + "UseFIPS": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://entityresolution.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseDualStack": false, + "UseFIPS": 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", + "UseDualStack": true, + "UseFIPS": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://entityresolution-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "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", + "UseDualStack": true, + "UseFIPS": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://entityresolution.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://entityresolution-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseDualStack": true, + "UseFIPS": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://entityresolution-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://entityresolution.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseDualStack": true, + "UseFIPS": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://entityresolution.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseDualStack": false, + "UseFIPS": 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", + "UseDualStack": true, + "UseFIPS": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://entityresolution-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "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", + "UseDualStack": true, + "UseFIPS": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://entityresolution.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseDualStack": false, + "UseFIPS": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseDualStack": false, + "UseFIPS": true, + "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", + "UseDualStack": true, + "UseFIPS": false, + "Endpoint": "https://example.com" + } + } + ], + "version": "1.0" + } + } + }, + "com.amazonaws.entityresolution#AccessDeniedException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.entityresolution#ErrorMessage" + } + }, + "traits": { + "smithy.api#documentation": "

You do not have sufficient access to perform this action. HTTP Status Code: 403\n

", + "smithy.api#error": "client", + "smithy.api#httpError": 403 + } + }, + "com.amazonaws.entityresolution#AttributeMatchingModel": { + "type": "enum", + "members": { + "ONE_TO_ONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ONE_TO_ONE" + } + }, + "MANY_TO_MANY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MANY_TO_MANY" + } + } + } + }, + "com.amazonaws.entityresolution#AttributeName": { + "type": "string", + "traits": { + "smithy.api#length": { + "max": 255 + }, + "smithy.api#pattern": "^[a-zA-Z_0-9- \\t]*$" + } + }, + "com.amazonaws.entityresolution#ConflictException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.entityresolution#ErrorMessage" + } + }, + "traits": { + "smithy.api#documentation": "

The request could not be processed because of conflict in the current state of the resource. Example: Workflow already exists, \n Schema already exists, Workflow is currently running, etc. HTTP Status Code: 400\n

", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.entityresolution#CreateMatchingWorkflow": { + "type": "operation", + "input": { + "target": "com.amazonaws.entityresolution#CreateMatchingWorkflowInput" + }, + "output": { + "target": "com.amazonaws.entityresolution#CreateMatchingWorkflowOutput" + }, + "errors": [ + { + "target": "com.amazonaws.entityresolution#AccessDeniedException" + }, + { + "target": "com.amazonaws.entityresolution#ConflictException" + }, + { + "target": "com.amazonaws.entityresolution#ExceedsLimitException" + }, + { + "target": "com.amazonaws.entityresolution#InternalServerException" + }, + { + "target": "com.amazonaws.entityresolution#ThrottlingException" + }, + { + "target": "com.amazonaws.entityresolution#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Creates a MatchingWorkflow object which stores the configuration of the data processing job \n to be run. It is important to note that there should not be a pre-existing MatchingWorkflow \n with the same name. To modify an existing workflow, utilize the UpdateMatchingWorkflow API.

", + "smithy.api#http": { + "code": 200, + "method": "POST", + "uri": "/matchingworkflows" + } + } + }, + "com.amazonaws.entityresolution#CreateMatchingWorkflowInput": { + "type": "structure", + "members": { + "workflowName": { + "target": "com.amazonaws.entityresolution#EntityName", + "traits": { + "smithy.api#documentation": "

The name of the workflow. There cannot be multiple DataIntegrationWorkflows with the same name.

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

A description of the workflow.

" + } + }, + "inputSourceConfig": { + "target": "com.amazonaws.entityresolution#InputSourceConfig", + "traits": { + "smithy.api#documentation": "

A list of InputSource objects, which have the fields InputSourceARN and \n SchemaName.

", + "smithy.api#required": {} + } + }, + "outputSourceConfig": { + "target": "com.amazonaws.entityresolution#OutputSourceConfig", + "traits": { + "smithy.api#documentation": "

A list of OutputSource objects, each of which contains fields OutputS3Path, \n ApplyNormalization, and Output.

", + "smithy.api#required": {} + } + }, + "resolutionTechniques": { + "target": "com.amazonaws.entityresolution#ResolutionTechniques", + "traits": { + "smithy.api#documentation": "

An object which defines the resolutionType and the ruleBasedProperties\n

", + "smithy.api#required": {} + } + }, + "incrementalRunConfig": { + "target": "com.amazonaws.entityresolution#IncrementalRunConfig", + "traits": { + "smithy.api#documentation": "

An object which defines an incremental run type and has only incrementalRunType as a field.

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

The Amazon Resource Name (ARN) of the IAM role. AWS Entity Resolution assumes this role\n to create resources on your behalf as part of workflow execution.

", + "smithy.api#required": {} + } + }, + "tags": { + "target": "com.amazonaws.entityresolution#TagMap", + "traits": { + "smithy.api#documentation": "

The tags used to organize, track, or control access for this resource.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.entityresolution#CreateMatchingWorkflowOutput": { + "type": "structure", + "members": { + "workflowName": { + "target": "com.amazonaws.entityresolution#EntityName", + "traits": { + "smithy.api#documentation": "

The name of the workflow.

", + "smithy.api#required": {} + } + }, + "workflowArn": { + "target": "com.amazonaws.entityresolution#MatchingWorkflowArn", + "traits": { + "smithy.api#documentation": "

The ARN (Amazon Resource Name) that Entity Resolution generated for the MatchingWorkflow.

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

A description of the workflow.

" + } + }, + "inputSourceConfig": { + "target": "com.amazonaws.entityresolution#InputSourceConfig", + "traits": { + "smithy.api#documentation": "

A list of InputSource objects, which have the fields InputSourceARN and \n SchemaName.

", + "smithy.api#required": {} + } + }, + "outputSourceConfig": { + "target": "com.amazonaws.entityresolution#OutputSourceConfig", + "traits": { + "smithy.api#documentation": "

A list of OutputSource objects, each of which contains fields OutputS3Path, \n ApplyNormalization, and Output.

", + "smithy.api#required": {} + } + }, + "resolutionTechniques": { + "target": "com.amazonaws.entityresolution#ResolutionTechniques", + "traits": { + "smithy.api#documentation": "

An object which defines the resolutionType and the ruleBasedProperties\n

", + "smithy.api#required": {} + } + }, + "incrementalRunConfig": { + "target": "com.amazonaws.entityresolution#IncrementalRunConfig", + "traits": { + "smithy.api#documentation": "

An object which defines an incremental run type and has only incrementalRunType as a field.

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

The Amazon Resource Name (ARN) of the IAM role. AWS Entity Resolution assumes this role\n to create resources on your behalf as part of workflow execution.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.entityresolution#CreateSchemaMapping": { + "type": "operation", + "input": { + "target": "com.amazonaws.entityresolution#CreateSchemaMappingInput" + }, + "output": { + "target": "com.amazonaws.entityresolution#CreateSchemaMappingOutput" + }, + "errors": [ + { + "target": "com.amazonaws.entityresolution#AccessDeniedException" + }, + { + "target": "com.amazonaws.entityresolution#ConflictException" + }, + { + "target": "com.amazonaws.entityresolution#ExceedsLimitException" + }, + { + "target": "com.amazonaws.entityresolution#InternalServerException" + }, + { + "target": "com.amazonaws.entityresolution#ThrottlingException" + }, + { + "target": "com.amazonaws.entityresolution#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Creates a schema mapping, which defines the schema of the input customer records table.\n The SchemaMapping also provides Entity Resolution with some metadata about the\n table, such as the attribute types of the columns and which columns to match on.

", + "smithy.api#http": { + "code": 200, + "method": "POST", + "uri": "/schemas" + } + } + }, + "com.amazonaws.entityresolution#CreateSchemaMappingInput": { + "type": "structure", + "members": { + "schemaName": { + "target": "com.amazonaws.entityresolution#EntityName", + "traits": { + "smithy.api#documentation": "

The name of the schema. There cannot be multiple SchemaMappings with the\n same name.

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

A description of the schema.

" + } + }, + "mappedInputFields": { + "target": "com.amazonaws.entityresolution#SchemaInputAttributes", + "traits": { + "smithy.api#documentation": "

A list of MappedInputFields. Each MappedInputField corresponds\n to a column the source data table, and contains column name plus additional information\n that Entity Resolution uses for matching.

" + } + }, + "tags": { + "target": "com.amazonaws.entityresolution#TagMap", + "traits": { + "smithy.api#documentation": "

The tags used to organize, track, or control access for this resource.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.entityresolution#CreateSchemaMappingOutput": { + "type": "structure", + "members": { + "schemaName": { + "target": "com.amazonaws.entityresolution#EntityName", + "traits": { + "smithy.api#documentation": "

The name of the schema.

", + "smithy.api#required": {} + } + }, + "schemaArn": { + "target": "com.amazonaws.entityresolution#SchemaMappingArn", + "traits": { + "smithy.api#documentation": "

The ARN (Amazon Resource Name) that Entity Resolution generated for the\n SchemaMapping.

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

A description of the schema.

", + "smithy.api#required": {} + } + }, + "mappedInputFields": { + "target": "com.amazonaws.entityresolution#SchemaInputAttributes", + "traits": { + "smithy.api#documentation": "

A list of MappedInputFields. Each MappedInputField corresponds\n to a column the source data table, and contains column name plus additional information\n that Entity Resolution uses for matching.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.entityresolution#DeleteMatchingWorkflow": { + "type": "operation", + "input": { + "target": "com.amazonaws.entityresolution#DeleteMatchingWorkflowInput" + }, + "output": { + "target": "com.amazonaws.entityresolution#DeleteMatchingWorkflowOutput" + }, + "errors": [ + { + "target": "com.amazonaws.entityresolution#AccessDeniedException" + }, + { + "target": "com.amazonaws.entityresolution#InternalServerException" + }, + { + "target": "com.amazonaws.entityresolution#ThrottlingException" + }, + { + "target": "com.amazonaws.entityresolution#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Deletes the MatchingWorkflow with a given name. This operation will succeed even if a \n workflow with the given name does not exist.

", + "smithy.api#http": { + "code": 200, + "method": "DELETE", + "uri": "/matchingworkflows/{workflowName}" + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.entityresolution#DeleteMatchingWorkflowInput": { + "type": "structure", + "members": { + "workflowName": { + "target": "com.amazonaws.entityresolution#EntityName", + "traits": { + "smithy.api#documentation": "

The name of the workflow to be retrieved.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.entityresolution#DeleteMatchingWorkflowOutput": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

A successful operation message.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.entityresolution#DeleteSchemaMapping": { + "type": "operation", + "input": { + "target": "com.amazonaws.entityresolution#DeleteSchemaMappingInput" + }, + "output": { + "target": "com.amazonaws.entityresolution#DeleteSchemaMappingOutput" + }, + "errors": [ + { + "target": "com.amazonaws.entityresolution#AccessDeniedException" + }, + { + "target": "com.amazonaws.entityresolution#ConflictException" + }, + { + "target": "com.amazonaws.entityresolution#InternalServerException" + }, + { + "target": "com.amazonaws.entityresolution#ThrottlingException" + }, + { + "target": "com.amazonaws.entityresolution#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Deletes the SchemaMapping with a given name. This operation will succeed even if a schema \n with the given name does not exist. This operation will fail if there is a DataIntegrationWorkflow \n object that references the SchemaMapping in the workflow's InputSourceConfig.

", + "smithy.api#http": { + "code": 200, + "method": "DELETE", + "uri": "/schemas/{schemaName}" + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.entityresolution#DeleteSchemaMappingInput": { + "type": "structure", + "members": { + "schemaName": { + "target": "com.amazonaws.entityresolution#EntityName", + "traits": { + "smithy.api#documentation": "

The name of the schema to delete.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.entityresolution#DeleteSchemaMappingOutput": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

A successful operation message.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.entityresolution#Description": { + "type": "string", + "traits": { + "smithy.api#length": { + "max": 255 + } + } + }, + "com.amazonaws.entityresolution#EntityName": { + "type": "string", + "traits": { + "smithy.api#length": { + "max": 255 + }, + "smithy.api#pattern": "^[a-zA-Z_0-9-]*$" + } + }, + "com.amazonaws.entityresolution#ErrorDetails": { + "type": "structure", + "members": { + "errorMessage": { + "target": "com.amazonaws.entityresolution#ErrorMessage", + "traits": { + "smithy.api#documentation": "

The error message from the job, if there is one.

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

An object containing an error message, if there was an error.

" + } + }, + "com.amazonaws.entityresolution#ErrorMessage": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 2048 + } + } + }, + "com.amazonaws.entityresolution#ExceedsLimitException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.entityresolution#ErrorMessage" + } + }, + "traits": { + "smithy.api#documentation": "

The request was rejected because it attempted to create resources beyond the current AWS Entity Resolution account limits. \n The error message describes the limit exceeded. HTTP Status Code: 402\n

", + "smithy.api#error": "client", + "smithy.api#httpError": 402 + } + }, + "com.amazonaws.entityresolution#GetMatchId": { + "type": "operation", + "input": { + "target": "com.amazonaws.entityresolution#GetMatchIdInput" + }, + "output": { + "target": "com.amazonaws.entityresolution#GetMatchIdOutput" + }, + "errors": [ + { + "target": "com.amazonaws.entityresolution#AccessDeniedException" + }, + { + "target": "com.amazonaws.entityresolution#InternalServerException" + }, + { + "target": "com.amazonaws.entityresolution#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.entityresolution#ThrottlingException" + }, + { + "target": "com.amazonaws.entityresolution#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Returns the corresponding Match ID of a customer record if the record has been processed.

", + "smithy.api#http": { + "code": 200, + "method": "POST", + "uri": "/matchingworkflows/{workflowName}/matches" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.entityresolution#GetMatchIdInput": { + "type": "structure", + "members": { + "workflowName": { + "target": "com.amazonaws.entityresolution#EntityName", + "traits": { + "smithy.api#documentation": "

The name of the workflow.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "record": { + "target": "com.amazonaws.entityresolution#RecordAttributeMap", + "traits": { + "smithy.api#documentation": "

The record to fetch the Match ID for.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.entityresolution#GetMatchIdOutput": { + "type": "structure", + "members": { + "matchId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The unique identifiers for this group of match records.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.entityresolution#GetMatchingJob": { + "type": "operation", + "input": { + "target": "com.amazonaws.entityresolution#GetMatchingJobInput" + }, + "output": { + "target": "com.amazonaws.entityresolution#GetMatchingJobOutput" + }, + "errors": [ + { + "target": "com.amazonaws.entityresolution#AccessDeniedException" + }, + { + "target": "com.amazonaws.entityresolution#InternalServerException" + }, + { + "target": "com.amazonaws.entityresolution#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.entityresolution#ThrottlingException" + }, + { + "target": "com.amazonaws.entityresolution#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Gets the status, metrics, and errors (if there are any) that are associated with a job.

", + "smithy.api#http": { + "code": 200, + "method": "GET", + "uri": "/matchingworkflows/{workflowName}/jobs/{jobId}" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.entityresolution#GetMatchingJobInput": { + "type": "structure", + "members": { + "workflowName": { + "target": "com.amazonaws.entityresolution#EntityName", + "traits": { + "smithy.api#documentation": "

The name of the workflow.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "jobId": { + "target": "com.amazonaws.entityresolution#JobId", + "traits": { + "smithy.api#documentation": "

The ID of the job.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.entityresolution#GetMatchingJobOutput": { + "type": "structure", + "members": { + "jobId": { + "target": "com.amazonaws.entityresolution#JobId", + "traits": { + "smithy.api#documentation": "

The ID of the job.

", + "smithy.api#required": {} + } + }, + "status": { + "target": "com.amazonaws.entityresolution#JobStatus", + "traits": { + "smithy.api#documentation": "

The current status of the job. Either running, succeeded, \n queued, or failed.

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

The time at which the job was started.

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

The time at which the job has finished.

" + } + }, + "metrics": { + "target": "com.amazonaws.entityresolution#JobMetrics", + "traits": { + "smithy.api#documentation": "

Metrics associated with the execution, specifically total records processed, \n unique IDs generated, and records the execution skipped.

" + } + }, + "errorDetails": { + "target": "com.amazonaws.entityresolution#ErrorDetails", + "traits": { + "smithy.api#documentation": "

An object containing an error message, if there was an error.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.entityresolution#GetMatchingWorkflow": { + "type": "operation", + "input": { + "target": "com.amazonaws.entityresolution#GetMatchingWorkflowInput" + }, + "output": { + "target": "com.amazonaws.entityresolution#GetMatchingWorkflowOutput" + }, + "errors": [ + { + "target": "com.amazonaws.entityresolution#AccessDeniedException" + }, + { + "target": "com.amazonaws.entityresolution#InternalServerException" + }, + { + "target": "com.amazonaws.entityresolution#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.entityresolution#ThrottlingException" + }, + { + "target": "com.amazonaws.entityresolution#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Returns the MatchingWorkflow with a given name, if it exists.

", + "smithy.api#http": { + "code": 200, + "method": "GET", + "uri": "/matchingworkflows/{workflowName}" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.entityresolution#GetMatchingWorkflowInput": { + "type": "structure", + "members": { + "workflowName": { + "target": "com.amazonaws.entityresolution#EntityName", + "traits": { + "smithy.api#documentation": "

The name of the workflow.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.entityresolution#GetMatchingWorkflowOutput": { + "type": "structure", + "members": { + "workflowName": { + "target": "com.amazonaws.entityresolution#EntityName", + "traits": { + "smithy.api#documentation": "

The name of the workflow.

", + "smithy.api#required": {} + } + }, + "workflowArn": { + "target": "com.amazonaws.entityresolution#MatchingWorkflowArn", + "traits": { + "smithy.api#documentation": "

The ARN (Amazon Resource Name) that Entity Resolution generated for the MatchingWorkflow.

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

A description of the workflow.

" + } + }, + "inputSourceConfig": { + "target": "com.amazonaws.entityresolution#InputSourceConfig", + "traits": { + "smithy.api#documentation": "

A list of InputSource objects, which have the fields InputSourceARN and \n SchemaName.

", + "smithy.api#required": {} + } + }, + "outputSourceConfig": { + "target": "com.amazonaws.entityresolution#OutputSourceConfig", + "traits": { + "smithy.api#documentation": "

A list of OutputSource objects, each of which contains fields OutputS3Path, \n ApplyNormalization, and Output.

", + "smithy.api#required": {} + } + }, + "resolutionTechniques": { + "target": "com.amazonaws.entityresolution#ResolutionTechniques", + "traits": { + "smithy.api#documentation": "

An object which defines the resolutionType and the ruleBasedProperties\n

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

The timestamp of when the workflow was created.

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

The timestamp of when the workflow was last updated.

", + "smithy.api#required": {} + } + }, + "incrementalRunConfig": { + "target": "com.amazonaws.entityresolution#IncrementalRunConfig", + "traits": { + "smithy.api#documentation": "

An object which defines an incremental run type and has only incrementalRunType as a field.

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

The Amazon Resource Name (ARN) of the IAM role. AWS Entity Resolution assumes this role to access \n resources on your behalf.

", + "smithy.api#required": {} + } + }, + "tags": { + "target": "com.amazonaws.entityresolution#TagMap", + "traits": { + "smithy.api#documentation": "

The tags used to organize, track, or control access for this resource.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.entityresolution#GetSchemaMapping": { + "type": "operation", + "input": { + "target": "com.amazonaws.entityresolution#GetSchemaMappingInput" + }, + "output": { + "target": "com.amazonaws.entityresolution#GetSchemaMappingOutput" + }, + "errors": [ + { + "target": "com.amazonaws.entityresolution#AccessDeniedException" + }, + { + "target": "com.amazonaws.entityresolution#InternalServerException" + }, + { + "target": "com.amazonaws.entityresolution#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.entityresolution#ThrottlingException" + }, + { + "target": "com.amazonaws.entityresolution#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Returns the SchemaMapping of a given name.

", + "smithy.api#http": { + "code": 200, + "method": "GET", + "uri": "/schemas/{schemaName}" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.entityresolution#GetSchemaMappingInput": { + "type": "structure", + "members": { + "schemaName": { + "target": "com.amazonaws.entityresolution#EntityName", + "traits": { + "smithy.api#documentation": "

The name of the schema to be retrieved.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.entityresolution#GetSchemaMappingOutput": { + "type": "structure", + "members": { + "schemaName": { + "target": "com.amazonaws.entityresolution#EntityName", + "traits": { + "smithy.api#documentation": "

The name of the schema.

", + "smithy.api#required": {} + } + }, + "schemaArn": { + "target": "com.amazonaws.entityresolution#SchemaMappingArn", + "traits": { + "smithy.api#documentation": "

The ARN (Amazon Resource Name) that Entity Resolution generated for the SchemaMapping.

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

A description of the schema.

" + } + }, + "mappedInputFields": { + "target": "com.amazonaws.entityresolution#SchemaInputAttributes", + "traits": { + "smithy.api#documentation": "

A list of MappedInputFields. Each MappedInputField corresponds\n to a column the source data table, and contains column name plus additional information\n Venice uses for matching.

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

The timestamp of when the SchemaMapping was created.

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

The timestamp of when the SchemaMapping was last updated.

", + "smithy.api#required": {} + } + }, + "tags": { + "target": "com.amazonaws.entityresolution#TagMap", + "traits": { + "smithy.api#documentation": "

The tags used to organize, track, or control access for this resource.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.entityresolution#IncrementalRunConfig": { + "type": "structure", + "members": { + "incrementalRunType": { + "target": "com.amazonaws.entityresolution#IncrementalRunType", + "traits": { + "smithy.api#documentation": "

The type of incremental run. It takes only one value: IMMEDIATE.

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

An object which defines an incremental run type and has only incrementalRunType as a field.

" + } + }, + "com.amazonaws.entityresolution#IncrementalRunType": { + "type": "enum", + "members": { + "IMMEDIATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "IMMEDIATE" + } + } + } + }, + "com.amazonaws.entityresolution#InputSource": { + "type": "structure", + "members": { + "inputSourceARN": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

An Glue table ARN for the input source table.

", + "smithy.api#pattern": "^arn:aws:.*:.*:[0-9]+:.*$", + "smithy.api#required": {} + } + }, + "schemaName": { + "target": "com.amazonaws.entityresolution#EntityName", + "traits": { + "smithy.api#documentation": "

The name of the schema to be retrieved.

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

Normalizes the attributes defined in the schema in the input data. For example, if an\n attribute has an AttributeType of PHONE_NUMBER, and the data in\n the input table is in a format of 1234567890, Entity Resolution will normalize this field\n in the output to (123)-456-7890.

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

An object containing InputSourceARN, SchemaName, \n and ApplyNormalization.

" + } + }, + "com.amazonaws.entityresolution#InputSourceConfig": { + "type": "list", + "member": { + "target": "com.amazonaws.entityresolution#InputSource" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 20 + } + } + }, + "com.amazonaws.entityresolution#InternalServerException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.entityresolution#ErrorMessage" + } + }, + "traits": { + "smithy.api#documentation": "

This exception occurs when there is an internal failure in the AWS Entity Resolution service. HTTP Status Code: 500\n

", + "smithy.api#error": "server", + "smithy.api#httpError": 500, + "smithy.api#retryable": {} + } + }, + "com.amazonaws.entityresolution#JobId": { + "type": "string", + "traits": { + "smithy.api#pattern": "^[a-f0-9]{32}$" + } + }, + "com.amazonaws.entityresolution#JobList": { + "type": "list", + "member": { + "target": "com.amazonaws.entityresolution#JobSummary" + } + }, + "com.amazonaws.entityresolution#JobMetrics": { + "type": "structure", + "members": { + "inputRecords": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "

The total number of input records.

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

The total number of records processed.

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

The total number of matchIDs generated.

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

The total number of records that did not get processed,

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

An object containing InputRecords, TotalRecordsProcessed, \n MatchIDs, and RecordsNotProcessed.

" + } + }, + "com.amazonaws.entityresolution#JobStatus": { + "type": "enum", + "members": { + "RUNNING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RUNNING" + } + }, + "SUCCEEDED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SUCCEEDED" + } + }, + "FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FAILED" + } + }, + "QUEUED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "QUEUED" + } + } + } + }, + "com.amazonaws.entityresolution#JobSummary": { + "type": "structure", + "members": { + "jobId": { + "target": "com.amazonaws.entityresolution#JobId", + "traits": { + "smithy.api#documentation": "

The ID of the job.

", + "smithy.api#required": {} + } + }, + "status": { + "target": "com.amazonaws.entityresolution#JobStatus", + "traits": { + "smithy.api#documentation": "

The current status of the job. Either running, succeeded, \n queued, or failed.

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

The time at which the job was started.

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

The time at which the job has finished.

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

An object containing the JobId, Status, \n StartTime, and EndTime of a job.

" + } + }, + "com.amazonaws.entityresolution#KMSArn": { + "type": "string", + "traits": { + "smithy.api#pattern": "^arn:aws:kms:.*:[0-9]+:.*$" + } + }, + "com.amazonaws.entityresolution#ListMatchingJobs": { + "type": "operation", + "input": { + "target": "com.amazonaws.entityresolution#ListMatchingJobsInput" + }, + "output": { + "target": "com.amazonaws.entityresolution#ListMatchingJobsOutput" + }, + "errors": [ + { + "target": "com.amazonaws.entityresolution#AccessDeniedException" + }, + { + "target": "com.amazonaws.entityresolution#InternalServerException" + }, + { + "target": "com.amazonaws.entityresolution#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.entityresolution#ThrottlingException" + }, + { + "target": "com.amazonaws.entityresolution#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Lists all jobs for a given workflow.

", + "smithy.api#http": { + "code": 200, + "method": "GET", + "uri": "/matchingworkflows/{workflowName}/jobs" + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "pageSize": "maxResults", + "items": "jobs" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.entityresolution#ListMatchingJobsInput": { + "type": "structure", + "members": { + "workflowName": { + "target": "com.amazonaws.entityresolution#EntityName", + "traits": { + "smithy.api#documentation": "

The name of the workflow to be retrieved.

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

The pagination token from the previous ListSchemaMappings API call.

", + "smithy.api#httpQuery": "nextToken" + } + }, + "maxResults": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "

The maximum number of objects returned per page.

", + "smithy.api#httpQuery": "maxResults", + "smithy.api#range": { + "min": 1, + "max": 25 + } + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.entityresolution#ListMatchingJobsOutput": { + "type": "structure", + "members": { + "jobs": { + "target": "com.amazonaws.entityresolution#JobList", + "traits": { + "smithy.api#documentation": "

A list of JobSummary objects, each of which contain the ID, status, start time, and end time of a job.

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

The pagination token from the previous ListSchemaMappings API call.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.entityresolution#ListMatchingWorkflows": { + "type": "operation", + "input": { + "target": "com.amazonaws.entityresolution#ListMatchingWorkflowsInput" + }, + "output": { + "target": "com.amazonaws.entityresolution#ListMatchingWorkflowsOutput" + }, + "errors": [ + { + "target": "com.amazonaws.entityresolution#AccessDeniedException" + }, + { + "target": "com.amazonaws.entityresolution#InternalServerException" + }, + { + "target": "com.amazonaws.entityresolution#ThrottlingException" + }, + { + "target": "com.amazonaws.entityresolution#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Returns a list of all the MatchingWorkflows that have been created for an AWS account.

", + "smithy.api#http": { + "code": 200, + "method": "GET", + "uri": "/matchingworkflows" + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "pageSize": "maxResults", + "items": "workflowSummaries" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.entityresolution#ListMatchingWorkflowsInput": { + "type": "structure", + "members": { + "nextToken": { + "target": "com.amazonaws.entityresolution#NextToken", + "traits": { + "smithy.api#documentation": "

The pagination token from the previous ListSchemaMappings API call.

", + "smithy.api#httpQuery": "nextToken" + } + }, + "maxResults": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "

The maximum number of objects returned per page.

", + "smithy.api#httpQuery": "maxResults", + "smithy.api#range": { + "max": 25 + } + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.entityresolution#ListMatchingWorkflowsOutput": { + "type": "structure", + "members": { + "workflowSummaries": { + "target": "com.amazonaws.entityresolution#MatchingWorkflowList", + "traits": { + "smithy.api#documentation": "

A list of MatchingWorkflowSummary objects, each of which contain the fields \n WorkflowName, WorkflowArn, CreatedAt, and UpdatedAt.

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

The pagination token from the previous ListSchemaMappings API call.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.entityresolution#ListSchemaMappings": { + "type": "operation", + "input": { + "target": "com.amazonaws.entityresolution#ListSchemaMappingsInput" + }, + "output": { + "target": "com.amazonaws.entityresolution#ListSchemaMappingsOutput" + }, + "errors": [ + { + "target": "com.amazonaws.entityresolution#AccessDeniedException" + }, + { + "target": "com.amazonaws.entityresolution#InternalServerException" + }, + { + "target": "com.amazonaws.entityresolution#ThrottlingException" + }, + { + "target": "com.amazonaws.entityresolution#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Returns a list of all the SchemaMappings that have been created for an AWS account.

", + "smithy.api#http": { + "code": 200, + "method": "GET", + "uri": "/schemas" + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "pageSize": "maxResults", + "items": "schemaList" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.entityresolution#ListSchemaMappingsInput": { + "type": "structure", + "members": { + "nextToken": { + "target": "com.amazonaws.entityresolution#NextToken", + "traits": { + "smithy.api#documentation": "

The pagination token from the previous ListSchemaMappings API call.

", + "smithy.api#httpQuery": "nextToken" + } + }, + "maxResults": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "

The maximum number of objects returned per page.

", + "smithy.api#httpQuery": "maxResults", + "smithy.api#range": { + "max": 25 + } + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.entityresolution#ListSchemaMappingsOutput": { + "type": "structure", + "members": { + "schemaList": { + "target": "com.amazonaws.entityresolution#SchemaMappingList", + "traits": { + "smithy.api#documentation": "

A list of SchemaMappingSummary objects, each of which contain the fields \n SchemaName, SchemaArn, CreatedAt, UpdatedAt.

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

The pagination token from the previous ListDomains API call.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.entityresolution#ListTagsForResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.entityresolution#ListTagsForResourceInput" + }, + "output": { + "target": "com.amazonaws.entityresolution#ListTagsForResourceOutput" + }, + "errors": [ + { + "target": "com.amazonaws.entityresolution#InternalServerException" + }, + { + "target": "com.amazonaws.entityresolution#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.entityresolution#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Displays the tags associated with an AWS Entity Resolution resource. In Entity\n Resolution, SchemaMapping, and MatchingWorkflow can be\n tagged.

", + "smithy.api#http": { + "method": "GET", + "uri": "/tags/{resourceArn}" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.entityresolution#ListTagsForResourceInput": { + "type": "structure", + "members": { + "resourceArn": { + "target": "com.amazonaws.entityresolution#VeniceGlobalArn", + "traits": { + "smithy.api#documentation": "

The ARN of the resource for which you want to view tags.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.entityresolution#ListTagsForResourceOutput": { + "type": "structure", + "members": { + "tags": { + "target": "com.amazonaws.entityresolution#TagMap", + "traits": { + "smithy.api#documentation": "

The tags used to organize, track, or control access for this resource.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.entityresolution#MatchingKeys": { + "type": "list", + "member": { + "target": "com.amazonaws.entityresolution#AttributeName" + } + }, + "com.amazonaws.entityresolution#MatchingWorkflowArn": { + "type": "string", + "traits": { + "smithy.api#pattern": "^arn:(aws|aws-us-gov|aws-cn):entityresolution:.*:[0-9]+:(matchingworkflow/.*)$" + } + }, + "com.amazonaws.entityresolution#MatchingWorkflowList": { + "type": "list", + "member": { + "target": "com.amazonaws.entityresolution#MatchingWorkflowSummary" + } + }, + "com.amazonaws.entityresolution#MatchingWorkflowSummary": { + "type": "structure", + "members": { + "workflowName": { + "target": "com.amazonaws.entityresolution#EntityName", + "traits": { + "smithy.api#documentation": "

The name of the workflow.

", + "smithy.api#required": {} + } + }, + "workflowArn": { + "target": "com.amazonaws.entityresolution#MatchingWorkflowArn", + "traits": { + "smithy.api#documentation": "

The ARN (Amazon Resource Name) that Entity Resolution generated for the MatchingWorkflow.

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

The timestamp of when the workflow was created.

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

The timestamp of when the workflow was last updated.

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

A list of MatchingWorkflowSummary objects, each of which contain the fields \n WorkflowName, WorkflowArn, CreatedAt, UpdatedAt.

" + } + }, + "com.amazonaws.entityresolution#NextToken": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1024 + }, + "smithy.api#pattern": "^[a-zA-Z_0-9-=+/]*$" + } + }, + "com.amazonaws.entityresolution#OutputAttribute": { + "type": "structure", + "members": { + "name": { + "target": "com.amazonaws.entityresolution#AttributeName", + "traits": { + "smithy.api#documentation": "

A name of a column to be written to the output. This must be an InputField name \n in the schema mapping.

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

Enables the ability to hash the column values in the output.

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

A list of OutputAttribute objects, each of which have the fields Name and Hashed. Each of \n these objects selects a column to be included in the output table, and whether the \n values of the column should be hashed.

" + } + }, + "com.amazonaws.entityresolution#OutputAttributes": { + "type": "list", + "member": { + "target": "com.amazonaws.entityresolution#OutputAttribute" + } + }, + "com.amazonaws.entityresolution#OutputSource": { + "type": "structure", + "members": { + "outputS3Path": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The S3 path to which Entity Resolution will write the output table.

", + "smithy.api#pattern": "^s3://([^/]+)/?(.*?([^/]+)/?)$", + "smithy.api#required": {} + } + }, + "output": { + "target": "com.amazonaws.entityresolution#OutputAttributes", + "traits": { + "smithy.api#documentation": "

A list of OutputAttribute objects, each of which have the fields Name and Hashed. Each of \n these objects selects a column to be included in the output table, and whether the \n values of the column should be hashed.

", + "smithy.api#length": { + "max": 750 + }, + "smithy.api#required": {} + } + }, + "KMSArn": { + "target": "com.amazonaws.entityresolution#KMSArn", + "traits": { + "smithy.api#documentation": "

Customer KMS ARN for encryption at rest. If not provided, system will use an \n Entity Resolution managed KMS key.

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

Normalizes the attributes defined in the schema in the input data. For example, if an\n attribute has an AttributeType of PHONE_NUMBER, and the data in\n the input table is in a format of 1234567890, Entity Resolution will normalize this field\n in the output to (123)-456-7890.

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

A list of OutputAttribute objects, each of which have the fields Name and Hashed. Each of \n these objects selects a column to be included in the output table, and whether the \n values of the column should be hashed.

" + } + }, + "com.amazonaws.entityresolution#OutputSourceConfig": { + "type": "list", + "member": { + "target": "com.amazonaws.entityresolution#OutputSource" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1 + } + } + }, + "com.amazonaws.entityresolution#RecordAttributeMap": { + "type": "map", + "key": { + "target": "smithy.api#String", + "traits": { + "smithy.api#length": { + "max": 255 + }, + "smithy.api#pattern": "^[a-zA-Z_0-9- \\t]*$" + } + }, + "value": { + "target": "smithy.api#String", + "traits": { + "smithy.api#length": { + "max": 255 + }, + "smithy.api#pattern": "^[a-zA-Z_0-9-.@ ()+\\t]*$" + } + }, + "traits": { + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.entityresolution#ResolutionTechniques": { + "type": "structure", + "members": { + "resolutionType": { + "target": "com.amazonaws.entityresolution#ResolutionType", + "traits": { + "smithy.api#documentation": "

There are two types of matching, RULE_MATCHING and ML_MATCHING\n

" + } + }, + "ruleBasedProperties": { + "target": "com.amazonaws.entityresolution#RuleBasedProperties", + "traits": { + "smithy.api#documentation": "

An object which defines the list of matching rules to run and has a field Rules, which \n is a list of rule objects.

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

An object which defines the resolutionType and the ruleBasedProperties\n

" + } + }, + "com.amazonaws.entityresolution#ResolutionType": { + "type": "enum", + "members": { + "RULE_MATCHING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RULE_MATCHING" + } + }, + "ML_MATCHING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ML_MATCHING" + } + } + } + }, + "com.amazonaws.entityresolution#ResourceNotFoundException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.entityresolution#ErrorMessage" + } + }, + "traits": { + "smithy.api#documentation": "

The resource could not be found. HTTP Status Code: 404\n

", + "smithy.api#error": "client", + "smithy.api#httpError": 404 + } + }, + "com.amazonaws.entityresolution#Rule": { + "type": "structure", + "members": { + "ruleName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

A name for the matching rule.

", + "smithy.api#length": { + "max": 255 + }, + "smithy.api#pattern": "^[a-zA-Z_0-9- \\t]*$", + "smithy.api#required": {} + } + }, + "matchingKeys": { + "target": "com.amazonaws.entityresolution#MatchingKeys", + "traits": { + "smithy.api#documentation": "

A list of MatchingKeys. The MatchingKeys must have been defined in \n the SchemaMapping. Two records are considered to match according to this rule if all \n of the MatchingKeys match.

", + "smithy.api#length": { + "min": 1, + "max": 15 + }, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

An object containing RuleName, and MatchingKeys.

" + } + }, + "com.amazonaws.entityresolution#RuleBasedProperties": { + "type": "structure", + "members": { + "rules": { + "target": "com.amazonaws.entityresolution#RuleList", + "traits": { + "smithy.api#documentation": "

A list of Rule objects, each of which have fields RuleName and MatchingKeys.

", + "smithy.api#length": { + "min": 1, + "max": 15 + }, + "smithy.api#required": {} + } + }, + "attributeMatchingModel": { + "target": "com.amazonaws.entityresolution#AttributeMatchingModel", + "traits": { + "smithy.api#documentation": "

You can either choose ONE_TO_ONE or MANY_TO_MANY as the AttributeMatchingModel. When \n choosing MANY_TO_MANY, the system can match attribute across the sub-types of an attribute type. For \n example, if the value of the Email field of Profile A and the value of BusinessEmail field of Profile B matches, \n the two profiles are matched on the Email type. When choosing ONE_TO_ONE the system can only match if \n the sub-types are exact matches. For example, only when the value of the Email field of Profile A and the value of \n the Email field of Profile B matches, the two profiles are matched on the Email type.

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

An object which defines the list of matching rules to run and has a field Rules, which \n is a list of rule objects.

" + } + }, + "com.amazonaws.entityresolution#RuleList": { + "type": "list", + "member": { + "target": "com.amazonaws.entityresolution#Rule" + } + }, + "com.amazonaws.entityresolution#SchemaAttributeType": { + "type": "enum", + "members": { + "NAME": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NAME" + } + }, + "NAME_FIRST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NAME_FIRST" + } + }, + "NAME_MIDDLE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NAME_MIDDLE" + } + }, + "NAME_LAST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NAME_LAST" + } + }, + "ADDRESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ADDRESS" + } + }, + "ADDRESS_STREET1": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ADDRESS_STREET1" + } + }, + "ADDRESS_STREET2": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ADDRESS_STREET2" + } + }, + "ADDRESS_STREET3": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ADDRESS_STREET3" + } + }, + "ADDRESS_CITY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ADDRESS_CITY" + } + }, + "ADDRESS_STATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ADDRESS_STATE" + } + }, + "ADDRESS_COUNTRY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ADDRESS_COUNTRY" + } + }, + "ADDRESS_POSTALCODE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ADDRESS_POSTALCODE" + } + }, + "PHONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PHONE" + } + }, + "PHONE_NUMBER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PHONE_NUMBER" + } + }, + "PHONE_COUNTRYCODE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PHONE_COUNTRYCODE" + } + }, + "EMAIL_ADDRESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EMAIL_ADDRESS" + } + }, + "UNIQUE_ID": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "UNIQUE_ID" + } + }, + "DATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DATE" + } + }, + "STRING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "STRING" + } + } + } + }, + "com.amazonaws.entityresolution#SchemaInputAttribute": { + "type": "structure", + "members": { + "fieldName": { + "target": "com.amazonaws.entityresolution#AttributeName", + "traits": { + "smithy.api#documentation": "

A string containing the field name.

", + "smithy.api#required": {} + } + }, + "type": { + "target": "com.amazonaws.entityresolution#SchemaAttributeType", + "traits": { + "smithy.api#documentation": "

The type of the attribute, selected from a list of values.

", + "smithy.api#required": {} + } + }, + "groupName": { + "target": "com.amazonaws.entityresolution#AttributeName", + "traits": { + "smithy.api#documentation": "

Instruct Entity Resolution to combine several columns into a unified column with the\n identical attribute type. For example, when working with columns such as first_name,\n middle_name, and last_name, assigning them a common GroupName will prompt\n Entity Resolution to concatenate them into a single value.

" + } + }, + "matchKey": { + "target": "com.amazonaws.entityresolution#AttributeName", + "traits": { + "smithy.api#documentation": "

A key that allows grouping of multiple input attributes into a unified matching group.\n For example, let's consider a scenario where the source table contains various addresses,\n such as business_address and shipping_address. By assigning the MatchKey\n Address' to both attributes, Entity Resolution will match records\n across these fields to create a consolidated matching group. If no MatchKey is\n specified for a column, it won't be utilized for matching purposes but will still be\n included in the output table.

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

An object containing FieldField, Type, GroupName, \n and MatchKey.

" + } + }, + "com.amazonaws.entityresolution#SchemaInputAttributes": { + "type": "list", + "member": { + "target": "com.amazonaws.entityresolution#SchemaInputAttribute" + }, + "traits": { + "smithy.api#length": { + "min": 2, + "max": 25 + } + } + }, + "com.amazonaws.entityresolution#SchemaMappingArn": { + "type": "string", + "traits": { + "smithy.api#pattern": "^arn:(aws|aws-us-gov|aws-cn):entityresolution:.*:[0-9]+:(schemamapping/.*)$" + } + }, + "com.amazonaws.entityresolution#SchemaMappingList": { + "type": "list", + "member": { + "target": "com.amazonaws.entityresolution#SchemaMappingSummary" + } + }, + "com.amazonaws.entityresolution#SchemaMappingSummary": { + "type": "structure", + "members": { + "schemaName": { + "target": "com.amazonaws.entityresolution#EntityName", + "traits": { + "smithy.api#documentation": "

The name of the schema.

", + "smithy.api#required": {} + } + }, + "schemaArn": { + "target": "com.amazonaws.entityresolution#SchemaMappingArn", + "traits": { + "smithy.api#documentation": "

The ARN (Amazon Resource Name) that Entity Resolution generated for the\n SchemaMapping.

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

The timestamp of when the SchemaMapping was created.

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

The timestamp of when the SchemaMapping was last updated.

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

An object containing SchemaName, SchemaArn, \n CreatedAt, andUpdatedAt.

" + } + }, + "com.amazonaws.entityresolution#StartMatchingJob": { + "type": "operation", + "input": { + "target": "com.amazonaws.entityresolution#StartMatchingJobInput" + }, + "output": { + "target": "com.amazonaws.entityresolution#StartMatchingJobOutput" + }, + "errors": [ + { + "target": "com.amazonaws.entityresolution#AccessDeniedException" + }, + { + "target": "com.amazonaws.entityresolution#ConflictException" + }, + { + "target": "com.amazonaws.entityresolution#ExceedsLimitException" + }, + { + "target": "com.amazonaws.entityresolution#InternalServerException" + }, + { + "target": "com.amazonaws.entityresolution#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.entityresolution#ThrottlingException" + }, + { + "target": "com.amazonaws.entityresolution#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Starts the MatchingJob of a workflow. The workflow must have previously been created \n using the CreateMatchingWorkflow endpoint.

", + "smithy.api#http": { + "code": 200, + "method": "POST", + "uri": "/matchingworkflows/{workflowName}/jobs" + } + } + }, + "com.amazonaws.entityresolution#StartMatchingJobInput": { + "type": "structure", + "members": { + "workflowName": { + "target": "com.amazonaws.entityresolution#EntityName", + "traits": { + "smithy.api#documentation": "

The name of the matching job to be retrieved.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.entityresolution#StartMatchingJobOutput": { + "type": "structure", + "members": { + "jobId": { + "target": "com.amazonaws.entityresolution#JobId", + "traits": { + "smithy.api#documentation": "

The ID of the job.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.entityresolution#TagKey": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 128 + } + } + }, + "com.amazonaws.entityresolution#TagKeyList": { + "type": "list", + "member": { + "target": "com.amazonaws.entityresolution#TagKey" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 200 + } + } + }, + "com.amazonaws.entityresolution#TagMap": { + "type": "map", + "key": { + "target": "com.amazonaws.entityresolution#TagKey" + }, + "value": { + "target": "com.amazonaws.entityresolution#TagValue" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 200 + } + } + }, + "com.amazonaws.entityresolution#TagResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.entityresolution#TagResourceInput" + }, + "output": { + "target": "com.amazonaws.entityresolution#TagResourceOutput" + }, + "errors": [ + { + "target": "com.amazonaws.entityresolution#InternalServerException" + }, + { + "target": "com.amazonaws.entityresolution#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.entityresolution#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Assigns one or more tags (key-value pairs) to the specified AWS Entity Resolution\n resource. Tags can help you organize and categorize your resources. You can also use them\n to scope user permissions by granting a user permission to access or change only resources\n with certain tag values. In Entity Resolution, SchemaMapping, and\n MatchingWorkflow can be tagged. Tags don't have any semantic meaning to AWS\n and are interpreted strictly as strings of characters. You can use the\n TagResource action with a resource that already has tags. If you specify a\n new tag key, this tag is appended to the list of tags associated with the resource. If you\n specify a tag key that is already associated with the resource, the new tag value that you\n specify replaces the previous value for that tag.

", + "smithy.api#http": { + "method": "POST", + "uri": "/tags/{resourceArn}" + } + } + }, + "com.amazonaws.entityresolution#TagResourceInput": { + "type": "structure", + "members": { + "resourceArn": { + "target": "com.amazonaws.entityresolution#VeniceGlobalArn", + "traits": { + "smithy.api#documentation": "

The ARN of the resource for which you want to view tags.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "tags": { + "target": "com.amazonaws.entityresolution#TagMap", + "traits": { + "smithy.api#documentation": "

The tags used to organize, track, or control access for this resource.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.entityresolution#TagResourceOutput": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.entityresolution#TagValue": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 256 + } + } + }, + "com.amazonaws.entityresolution#ThrottlingException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.entityresolution#ErrorMessage" + } + }, + "traits": { + "smithy.api#documentation": "

The request was denied due to request throttling. HTTP Status Code: 429\n

", + "smithy.api#error": "client", + "smithy.api#httpError": 429, + "smithy.api#retryable": { + "throttling": true + } + } + }, + "com.amazonaws.entityresolution#UntagResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.entityresolution#UntagResourceInput" + }, + "output": { + "target": "com.amazonaws.entityresolution#UntagResourceOutput" + }, + "errors": [ + { + "target": "com.amazonaws.entityresolution#InternalServerException" + }, + { + "target": "com.amazonaws.entityresolution#ResourceNotFoundException" + } + ], + "traits": { + "smithy.api#documentation": "

Removes one or more tags from the specified AWS Entity Resolution resource. In Entity\n Resolution, SchemaMapping, and MatchingWorkflow can be\n tagged.

", + "smithy.api#http": { + "method": "DELETE", + "uri": "/tags/{resourceArn}" + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.entityresolution#UntagResourceInput": { + "type": "structure", + "members": { + "resourceArn": { + "target": "com.amazonaws.entityresolution#VeniceGlobalArn", + "traits": { + "smithy.api#documentation": "

The ARN of the resource for which you want to untag.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "tagKeys": { + "target": "com.amazonaws.entityresolution#TagKeyList", + "traits": { + "smithy.api#documentation": "

The list of tag keys to remove from the resource.

", + "smithy.api#httpQuery": "tagKeys", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.entityresolution#UntagResourceOutput": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.entityresolution#UpdateMatchingWorkflow": { + "type": "operation", + "input": { + "target": "com.amazonaws.entityresolution#UpdateMatchingWorkflowInput" + }, + "output": { + "target": "com.amazonaws.entityresolution#UpdateMatchingWorkflowOutput" + }, + "errors": [ + { + "target": "com.amazonaws.entityresolution#AccessDeniedException" + }, + { + "target": "com.amazonaws.entityresolution#InternalServerException" + }, + { + "target": "com.amazonaws.entityresolution#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.entityresolution#ThrottlingException" + }, + { + "target": "com.amazonaws.entityresolution#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Updates an existing MatchingWorkflow. This method is identical to \n CreateMatchingWorkflow, except it uses an HTTP PUT request instead of \n a POST request, and the MatchingWorkflow must already exist for the \n method to succeed.

", + "smithy.api#http": { + "code": 200, + "method": "PUT", + "uri": "/matchingworkflows/{workflowName}" + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.entityresolution#UpdateMatchingWorkflowInput": { + "type": "structure", + "members": { + "workflowName": { + "target": "com.amazonaws.entityresolution#EntityName", + "traits": { + "smithy.api#documentation": "

The name of the workflow to be retrieved.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "description": { + "target": "com.amazonaws.entityresolution#Description", + "traits": { + "smithy.api#documentation": "

A description of the workflow.

" + } + }, + "inputSourceConfig": { + "target": "com.amazonaws.entityresolution#InputSourceConfig", + "traits": { + "smithy.api#documentation": "

A list of InputSource objects, which have the fields InputSourceARN and \n SchemaName.

", + "smithy.api#required": {} + } + }, + "outputSourceConfig": { + "target": "com.amazonaws.entityresolution#OutputSourceConfig", + "traits": { + "smithy.api#documentation": "

A list of OutputSource objects, each of which contains fields OutputS3Path, \n ApplyNormalization, and Output.

", + "smithy.api#required": {} + } + }, + "resolutionTechniques": { + "target": "com.amazonaws.entityresolution#ResolutionTechniques", + "traits": { + "smithy.api#documentation": "

An object which defines the resolutionType and the ruleBasedProperties\n

", + "smithy.api#required": {} + } + }, + "incrementalRunConfig": { + "target": "com.amazonaws.entityresolution#IncrementalRunConfig", + "traits": { + "smithy.api#documentation": "

An object which defines an incremental run type and has only incrementalRunType as a field.

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

The Amazon Resource Name (ARN) of the IAM role. AWS Entity Resolution assumes this role\n to create resources on your behalf as part of workflow execution.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.entityresolution#UpdateMatchingWorkflowOutput": { + "type": "structure", + "members": { + "workflowName": { + "target": "com.amazonaws.entityresolution#EntityName", + "traits": { + "smithy.api#documentation": "

The name of the workflow.

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

A description of the workflow.

" + } + }, + "inputSourceConfig": { + "target": "com.amazonaws.entityresolution#InputSourceConfig", + "traits": { + "smithy.api#documentation": "

A list of InputSource objects, which have the fields InputSourceARN and \n SchemaName.

", + "smithy.api#required": {} + } + }, + "outputSourceConfig": { + "target": "com.amazonaws.entityresolution#OutputSourceConfig", + "traits": { + "smithy.api#documentation": "

A list of OutputSource objects, each of which contains fields OutputS3Path, \n ApplyNormalization, and Output.

", + "smithy.api#required": {} + } + }, + "resolutionTechniques": { + "target": "com.amazonaws.entityresolution#ResolutionTechniques", + "traits": { + "smithy.api#documentation": "

An object which defines the resolutionType and the ruleBasedProperties\n

", + "smithy.api#required": {} + } + }, + "incrementalRunConfig": { + "target": "com.amazonaws.entityresolution#IncrementalRunConfig", + "traits": { + "smithy.api#documentation": "

An object which defines an incremental run type and has only incrementalRunType as a field.

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

The Amazon Resource Name (ARN) of the IAM role. AWS Entity Resolution assumes this role\n to create resources on your behalf as part of workflow execution.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.entityresolution#ValidationException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.entityresolution#ErrorMessage" + } + }, + "traits": { + "smithy.api#documentation": "

The input fails to satisfy the constraints specified by AWS Entity Resolution. HTTP Status Code: 400\n

", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.entityresolution#VeniceGlobalArn": { + "type": "string", + "traits": { + "smithy.api#pattern": "^arn:(aws|aws-us-gov|aws-cn):(entityresolution):.*:[0-9]+:((schemamapping|matchingworkflow)/[a-zA-Z0-9_-]+)$" + } + } + } +}