diff --git a/clients/client-amplifybackend/.gitignore b/clients/client-amplifybackend/.gitignore new file mode 100644 index 000000000000..b41c05b597c4 --- /dev/null +++ b/clients/client-amplifybackend/.gitignore @@ -0,0 +1,14 @@ +/node_modules/ +/build/ +/coverage/ +/docs/ +/types/ +/dist/ +*.tsbuildinfo +*.tgz +*.log +package-lock.json + +*.d.ts +*.js +*.js.map diff --git a/clients/client-amplifybackend/.npmignore b/clients/client-amplifybackend/.npmignore new file mode 100644 index 000000000000..b7ff81137c4a --- /dev/null +++ b/clients/client-amplifybackend/.npmignore @@ -0,0 +1,4 @@ +/coverage/ +/docs/ +tsconfig.test.json +*.tsbuildinfo diff --git a/clients/client-amplifybackend/AmplifyBackend.ts b/clients/client-amplifybackend/AmplifyBackend.ts new file mode 100644 index 000000000000..4518096f6af1 --- /dev/null +++ b/clients/client-amplifybackend/AmplifyBackend.ts @@ -0,0 +1,852 @@ +import { AmplifyBackendClient } from "./AmplifyBackendClient"; +import { + CloneBackendCommand, + CloneBackendCommandInput, + CloneBackendCommandOutput, +} from "./commands/CloneBackendCommand"; +import { + CreateBackendAPICommand, + CreateBackendAPICommandInput, + CreateBackendAPICommandOutput, +} from "./commands/CreateBackendAPICommand"; +import { + CreateBackendAuthCommand, + CreateBackendAuthCommandInput, + CreateBackendAuthCommandOutput, +} from "./commands/CreateBackendAuthCommand"; +import { + CreateBackendCommand, + CreateBackendCommandInput, + CreateBackendCommandOutput, +} from "./commands/CreateBackendCommand"; +import { + CreateBackendConfigCommand, + CreateBackendConfigCommandInput, + CreateBackendConfigCommandOutput, +} from "./commands/CreateBackendConfigCommand"; +import { CreateTokenCommand, CreateTokenCommandInput, CreateTokenCommandOutput } from "./commands/CreateTokenCommand"; +import { + DeleteBackendAPICommand, + DeleteBackendAPICommandInput, + DeleteBackendAPICommandOutput, +} from "./commands/DeleteBackendAPICommand"; +import { + DeleteBackendAuthCommand, + DeleteBackendAuthCommandInput, + DeleteBackendAuthCommandOutput, +} from "./commands/DeleteBackendAuthCommand"; +import { + DeleteBackendCommand, + DeleteBackendCommandInput, + DeleteBackendCommandOutput, +} from "./commands/DeleteBackendCommand"; +import { DeleteTokenCommand, DeleteTokenCommandInput, DeleteTokenCommandOutput } from "./commands/DeleteTokenCommand"; +import { + GenerateBackendAPIModelsCommand, + GenerateBackendAPIModelsCommandInput, + GenerateBackendAPIModelsCommandOutput, +} from "./commands/GenerateBackendAPIModelsCommand"; +import { + GetBackendAPICommand, + GetBackendAPICommandInput, + GetBackendAPICommandOutput, +} from "./commands/GetBackendAPICommand"; +import { + GetBackendAPIModelsCommand, + GetBackendAPIModelsCommandInput, + GetBackendAPIModelsCommandOutput, +} from "./commands/GetBackendAPIModelsCommand"; +import { + GetBackendAuthCommand, + GetBackendAuthCommandInput, + GetBackendAuthCommandOutput, +} from "./commands/GetBackendAuthCommand"; +import { GetBackendCommand, GetBackendCommandInput, GetBackendCommandOutput } from "./commands/GetBackendCommand"; +import { + GetBackendJobCommand, + GetBackendJobCommandInput, + GetBackendJobCommandOutput, +} from "./commands/GetBackendJobCommand"; +import { GetTokenCommand, GetTokenCommandInput, GetTokenCommandOutput } from "./commands/GetTokenCommand"; +import { + ListBackendJobsCommand, + ListBackendJobsCommandInput, + ListBackendJobsCommandOutput, +} from "./commands/ListBackendJobsCommand"; +import { + RemoveAllBackendsCommand, + RemoveAllBackendsCommandInput, + RemoveAllBackendsCommandOutput, +} from "./commands/RemoveAllBackendsCommand"; +import { + RemoveBackendConfigCommand, + RemoveBackendConfigCommandInput, + RemoveBackendConfigCommandOutput, +} from "./commands/RemoveBackendConfigCommand"; +import { + UpdateBackendAPICommand, + UpdateBackendAPICommandInput, + UpdateBackendAPICommandOutput, +} from "./commands/UpdateBackendAPICommand"; +import { + UpdateBackendAuthCommand, + UpdateBackendAuthCommandInput, + UpdateBackendAuthCommandOutput, +} from "./commands/UpdateBackendAuthCommand"; +import { + UpdateBackendConfigCommand, + UpdateBackendConfigCommandInput, + UpdateBackendConfigCommandOutput, +} from "./commands/UpdateBackendConfigCommand"; +import { + UpdateBackendJobCommand, + UpdateBackendJobCommandInput, + UpdateBackendJobCommandOutput, +} from "./commands/UpdateBackendJobCommand"; +import { HttpHandlerOptions as __HttpHandlerOptions } from "@aws-sdk/types"; + +/** + *
AWS Amplify Admin API
+ */ +export class AmplifyBackend extends AmplifyBackendClient { + /** + *This operation clones an existing backend.
+ */ + public cloneBackend( + args: CloneBackendCommandInput, + options?: __HttpHandlerOptions + ): PromiseThis operation creates a backend for an Amplify app. Backends are automatically created at the time of app creation.
+ */ + public createBackend( + args: CreateBackendCommandInput, + options?: __HttpHandlerOptions + ): PromiseCreates a new backend API resource.
+ */ + public createBackendAPI( + args: CreateBackendAPICommandInput, + options?: __HttpHandlerOptions + ): PromiseCreates a new backend authentication resource.
+ */ + public createBackendAuth( + args: CreateBackendAuthCommandInput, + options?: __HttpHandlerOptions + ): PromiseCreates a config object for a backend.
+ */ + public createBackendConfig( + args: CreateBackendConfigCommandInput, + options?: __HttpHandlerOptions + ): PromiseGenerates a one time challenge code to authenticate a user into your Amplify Admin UI.
+ */ + public createToken(args: CreateTokenCommandInput, options?: __HttpHandlerOptions): PromiseRemoves an existing environment from your Ampify project.
+ */ + public deleteBackend( + args: DeleteBackendCommandInput, + options?: __HttpHandlerOptions + ): PromiseDeletes an existing backend API resource.
+ */ + public deleteBackendAPI( + args: DeleteBackendAPICommandInput, + options?: __HttpHandlerOptions + ): PromiseDeletes an existing backend authentication resource.
+ */ + public deleteBackendAuth( + args: DeleteBackendAuthCommandInput, + options?: __HttpHandlerOptions + ): PromiseDeletes the challenge token based on the given appId and sessionId.
+ */ + public deleteToken(args: DeleteTokenCommandInput, options?: __HttpHandlerOptions): PromiseGenerates a model schema for an existing backend API resource.
+ */ + public generateBackendAPIModels( + args: GenerateBackendAPIModelsCommandInput, + options?: __HttpHandlerOptions + ): PromiseProvides project level details for your Amplify UI project.
+ */ + public getBackend(args: GetBackendCommandInput, options?: __HttpHandlerOptions): PromiseGets the details for a backend api.
+ */ + public getBackendAPI( + args: GetBackendAPICommandInput, + options?: __HttpHandlerOptions + ): PromiseGenerates a model schema for existing backend API resource.
+ */ + public getBackendAPIModels( + args: GetBackendAPIModelsCommandInput, + options?: __HttpHandlerOptions + ): PromiseGets a backend auth details.
+ */ + public getBackendAuth( + args: GetBackendAuthCommandInput, + options?: __HttpHandlerOptions + ): PromiseReturns information about a specific job.
+ */ + public getBackendJob( + args: GetBackendJobCommandInput, + options?: __HttpHandlerOptions + ): PromiseGets the challenge token based on the given appId and sessionId.
+ */ + public getToken(args: GetTokenCommandInput, options?: __HttpHandlerOptions): PromiseLists the jobs for the backend of an Amplify app.
+ */ + public listBackendJobs( + args: ListBackendJobsCommandInput, + options?: __HttpHandlerOptions + ): PromiseRemoves all backend environments from your Amplify project.
+ */ + public removeAllBackends( + args: RemoveAllBackendsCommandInput, + options?: __HttpHandlerOptions + ): PromiseRemoves the AWS resources required to access the Amplify Admin UI.
+ */ + public removeBackendConfig( + args: RemoveBackendConfigCommandInput, + options?: __HttpHandlerOptions + ): PromiseUpdates an existing backend API resource.
+ */ + public updateBackendAPI( + args: UpdateBackendAPICommandInput, + options?: __HttpHandlerOptions + ): PromiseUpdates an existing backend authentication resource.
+ */ + public updateBackendAuth( + args: UpdateBackendAuthCommandInput, + options?: __HttpHandlerOptions + ): PromiseUpdates the AWS resources required to access the Amplify Admin UI.
+ */ + public updateBackendConfig( + args: UpdateBackendConfigCommandInput, + options?: __HttpHandlerOptions + ): PromiseUpdates a specific job.
+ */ + public updateBackendJob( + args: UpdateBackendJobCommandInput, + options?: __HttpHandlerOptions + ): PromiseAWS Amplify Admin API
+ */ +export class AmplifyBackendClient extends __Client< + __HttpHandlerOptions, + ServiceInputTypes, + ServiceOutputTypes, + AmplifyBackendClientResolvedConfig +> { + readonly config: AmplifyBackendClientResolvedConfig; + + constructor(configuration: AmplifyBackendClientConfig) { + let _config_0 = { + ...__ClientDefaultValues, + ...configuration, + }; + let _config_1 = resolveRegionConfig(_config_0); + let _config_2 = resolveEndpointsConfig(_config_1); + let _config_3 = resolveAwsAuthConfig(_config_2); + let _config_4 = resolveRetryConfig(_config_3); + let _config_5 = resolveUserAgentConfig(_config_4); + let _config_6 = resolveHostHeaderConfig(_config_5); + super(_config_6); + this.config = _config_6; + this.middlewareStack.use(getAwsAuthPlugin(this.config)); + this.middlewareStack.use(getRetryPlugin(this.config)); + this.middlewareStack.use(getUserAgentPlugin(this.config)); + this.middlewareStack.use(getContentLengthPlugin(this.config)); + this.middlewareStack.use(getHostHeaderPlugin(this.config)); + this.middlewareStack.use(getLoggerPlugin(this.config)); + } + + destroy(): void { + super.destroy(); + } +} diff --git a/clients/client-amplifybackend/LICENSE b/clients/client-amplifybackend/LICENSE new file mode 100644 index 000000000000..dd65ae06be7a --- /dev/null +++ b/clients/client-amplifybackend/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-2020 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-amplifybackend/README.md b/clients/client-amplifybackend/README.md new file mode 100644 index 000000000000..a9536c7cbe27 --- /dev/null +++ b/clients/client-amplifybackend/README.md @@ -0,0 +1,6 @@ +# @aws-sdk/client-amplifybackend + +[![NPM version](https://img.shields.io/npm/v/@aws-sdk/client-amplifybackend/rc.svg)](https://www.npmjs.com/package/@aws-sdk/client-amplifybackend) +[![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/client-amplifybackend.svg)](https://www.npmjs.com/package/@aws-sdk/client-amplifybackend) + +For SDK usage, please step to [SDK readme](https://github.com/aws/aws-sdk-js-v3). diff --git a/clients/client-amplifybackend/commands/CloneBackendCommand.ts b/clients/client-amplifybackend/commands/CloneBackendCommand.ts new file mode 100644 index 000000000000..c815afdc69fc --- /dev/null +++ b/clients/client-amplifybackend/commands/CloneBackendCommand.ts @@ -0,0 +1,88 @@ +import { AmplifyBackendClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AmplifyBackendClient"; +import { CloneBackendRequest, CloneBackendResponse } from "../models/models_0"; +import { + deserializeAws_restJson1CloneBackendCommand, + serializeAws_restJson1CloneBackendCommand, +} from "../protocols/Aws_restJson1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +export type CloneBackendCommandInput = CloneBackendRequest; +export type CloneBackendCommandOutput = CloneBackendResponse & __MetadataBearer; + +/** + *This operation clones an existing backend.
+ */ +export class CloneBackendCommand extends $Command< + CloneBackendCommandInput, + CloneBackendCommandOutput, + AmplifyBackendClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: CloneBackendCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStackCreates a new backend API resource.
+ */ +export class CreateBackendAPICommand extends $Command< + CreateBackendAPICommandInput, + CreateBackendAPICommandOutput, + AmplifyBackendClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: CreateBackendAPICommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStackCreates a new backend authentication resource.
+ */ +export class CreateBackendAuthCommand extends $Command< + CreateBackendAuthCommandInput, + CreateBackendAuthCommandOutput, + AmplifyBackendClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: CreateBackendAuthCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStackThis operation creates a backend for an Amplify app. Backends are automatically created at the time of app creation.
+ */ +export class CreateBackendCommand extends $Command< + CreateBackendCommandInput, + CreateBackendCommandOutput, + AmplifyBackendClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: CreateBackendCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStackCreates a config object for a backend.
+ */ +export class CreateBackendConfigCommand extends $Command< + CreateBackendConfigCommandInput, + CreateBackendConfigCommandOutput, + AmplifyBackendClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: CreateBackendConfigCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStackGenerates a one time challenge code to authenticate a user into your Amplify Admin UI.
+ */ +export class CreateTokenCommand extends $Command< + CreateTokenCommandInput, + CreateTokenCommandOutput, + AmplifyBackendClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: CreateTokenCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStackDeletes an existing backend API resource.
+ */ +export class DeleteBackendAPICommand extends $Command< + DeleteBackendAPICommandInput, + DeleteBackendAPICommandOutput, + AmplifyBackendClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DeleteBackendAPICommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStackDeletes an existing backend authentication resource.
+ */ +export class DeleteBackendAuthCommand extends $Command< + DeleteBackendAuthCommandInput, + DeleteBackendAuthCommandOutput, + AmplifyBackendClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DeleteBackendAuthCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStackRemoves an existing environment from your Ampify project.
+ */ +export class DeleteBackendCommand extends $Command< + DeleteBackendCommandInput, + DeleteBackendCommandOutput, + AmplifyBackendClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DeleteBackendCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStackDeletes the challenge token based on the given appId and sessionId.
+ */ +export class DeleteTokenCommand extends $Command< + DeleteTokenCommandInput, + DeleteTokenCommandOutput, + AmplifyBackendClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DeleteTokenCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStackGenerates a model schema for an existing backend API resource.
+ */ +export class GenerateBackendAPIModelsCommand extends $Command< + GenerateBackendAPIModelsCommandInput, + GenerateBackendAPIModelsCommandOutput, + AmplifyBackendClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GenerateBackendAPIModelsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStackGets the details for a backend api.
+ */ +export class GetBackendAPICommand extends $Command< + GetBackendAPICommandInput, + GetBackendAPICommandOutput, + AmplifyBackendClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetBackendAPICommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStackGenerates a model schema for existing backend API resource.
+ */ +export class GetBackendAPIModelsCommand extends $Command< + GetBackendAPIModelsCommandInput, + GetBackendAPIModelsCommandOutput, + AmplifyBackendClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetBackendAPIModelsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStackGets a backend auth details.
+ */ +export class GetBackendAuthCommand extends $Command< + GetBackendAuthCommandInput, + GetBackendAuthCommandOutput, + AmplifyBackendClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetBackendAuthCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStackProvides project level details for your Amplify UI project.
+ */ +export class GetBackendCommand extends $Command< + GetBackendCommandInput, + GetBackendCommandOutput, + AmplifyBackendClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetBackendCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStackReturns information about a specific job.
+ */ +export class GetBackendJobCommand extends $Command< + GetBackendJobCommandInput, + GetBackendJobCommandOutput, + AmplifyBackendClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetBackendJobCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStackGets the challenge token based on the given appId and sessionId.
+ */ +export class GetTokenCommand extends $Command< + GetTokenCommandInput, + GetTokenCommandOutput, + AmplifyBackendClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetTokenCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStackLists the jobs for the backend of an Amplify app.
+ */ +export class ListBackendJobsCommand extends $Command< + ListBackendJobsCommandInput, + ListBackendJobsCommandOutput, + AmplifyBackendClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: ListBackendJobsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStackRemoves all backend environments from your Amplify project.
+ */ +export class RemoveAllBackendsCommand extends $Command< + RemoveAllBackendsCommandInput, + RemoveAllBackendsCommandOutput, + AmplifyBackendClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: RemoveAllBackendsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStackRemoves the AWS resources required to access the Amplify Admin UI.
+ */ +export class RemoveBackendConfigCommand extends $Command< + RemoveBackendConfigCommandInput, + RemoveBackendConfigCommandOutput, + AmplifyBackendClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: RemoveBackendConfigCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStackUpdates an existing backend API resource.
+ */ +export class UpdateBackendAPICommand extends $Command< + UpdateBackendAPICommandInput, + UpdateBackendAPICommandOutput, + AmplifyBackendClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: UpdateBackendAPICommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStackUpdates an existing backend authentication resource.
+ */ +export class UpdateBackendAuthCommand extends $Command< + UpdateBackendAuthCommandInput, + UpdateBackendAuthCommandOutput, + AmplifyBackendClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: UpdateBackendAuthCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStackUpdates the AWS resources required to access the Amplify Admin UI.
+ */ +export class UpdateBackendConfigCommand extends $Command< + UpdateBackendConfigCommandInput, + UpdateBackendConfigCommandOutput, + AmplifyBackendClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: UpdateBackendConfigCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStackUpdates a specific job.
+ */ +export class UpdateBackendJobCommand extends $Command< + UpdateBackendJobCommandInput, + UpdateBackendJobCommandOutput, + AmplifyBackendClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: UpdateBackendJobCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStackAn error returned if a request is not formed properly.
+ */ +export interface BadRequestException extends __SmithyException, $MetadataBearer { + name: "BadRequestException"; + $fault: "client"; + /** + *An error message to inform that the request has failed.
+ */ + Message?: string; +} + +export namespace BadRequestException { + export const filterSensitiveLog = (obj: BadRequestException): any => ({ + ...obj, + }); +} + +/** + *The request body for CloneBackend.
+ */ +export interface CloneBackendRequest { + /** + *The app ID.
+ */ + AppId: string | undefined; + + /** + *The name of the backend environment.
+ */ + BackendEnvironmentName: string | undefined; + + /** + *The name of the destination backend environment to be created.
+ */ + TargetEnvironmentName: string | undefined; +} + +export namespace CloneBackendRequest { + export const filterSensitiveLog = (obj: CloneBackendRequest): any => ({ + ...obj, + }); +} + +export interface CloneBackendResponse { + /** + *The app ID.
+ */ + AppId?: string; + + /** + *The name of the backend environment.
+ */ + BackendEnvironmentName?: string; + + /** + *If the request failed, this is the returned error.
+ */ + Error?: string; + + /** + *The ID for the job.
+ */ + JobId?: string; + + /** + *The name of the operation.
+ */ + Operation?: string; + + /** + *The current status of the request.
+ */ + Status?: string; +} + +export namespace CloneBackendResponse { + export const filterSensitiveLog = (obj: CloneBackendResponse): any => ({ + ...obj, + }); +} + +/** + *An error returned if there's a temporary issue with the service.
+ */ +export interface GatewayTimeoutException extends __SmithyException, $MetadataBearer { + name: "GatewayTimeoutException"; + $fault: "server"; + /** + *An error message to inform that the request has failed.
+ */ + Message?: string; +} + +export namespace GatewayTimeoutException { + export const filterSensitiveLog = (obj: GatewayTimeoutException): any => ({ + ...obj, + }); +} + +/** + *An error returned when a specific resource type is not found.
+ */ +export interface NotFoundException extends __SmithyException, $MetadataBearer { + name: "NotFoundException"; + $fault: "client"; + /** + *An error message to inform that the request has failed.
+ */ + Message?: string; + + /** + *The type of resource that wasn't found.
+ */ + ResourceType?: string; +} + +export namespace NotFoundException { + export const filterSensitiveLog = (obj: NotFoundException): any => ({ + ...obj, + }); +} + +/** + *An error that is returned when a limit of a specific type has been exceeded.
+ */ +export interface TooManyRequestsException extends __SmithyException, $MetadataBearer { + name: "TooManyRequestsException"; + $fault: "client"; + /** + *The type of limit that was exceeded.
+ */ + LimitType?: string; + + /** + *An error message to inform that the request has failed.
+ */ + Message?: string; +} + +export namespace TooManyRequestsException { + export const filterSensitiveLog = (obj: TooManyRequestsException): any => ({ + ...obj, + }); +} + +/** + *Defines the resource configuration for the data model in your Amplify project.
+ */ +export interface ResourceConfig {} + +export namespace ResourceConfig { + export const filterSensitiveLog = (obj: ResourceConfig): any => ({ + ...obj, + }); +} + +/** + *The request body for CreateBackend.
+ */ +export interface CreateBackendRequest { + /** + *The app ID.
+ */ + AppId: string | undefined; + + /** + *The name of the app.
+ */ + AppName: string | undefined; + + /** + *The name of the backend environment.
+ */ + BackendEnvironmentName: string | undefined; + + /** + *The resource configuration for the create backend request.
+ */ + ResourceConfig?: ResourceConfig; + + /** + *The name of the resource.
+ */ + ResourceName?: string; +} + +export namespace CreateBackendRequest { + export const filterSensitiveLog = (obj: CreateBackendRequest): any => ({ + ...obj, + }); +} + +export interface CreateBackendResponse { + /** + *The app ID.
+ */ + AppId?: string; + + /** + *The name of the backend environment.
+ */ + BackendEnvironmentName?: string; + + /** + *If the request failed, this is the returned error.
+ */ + Error?: string; + + /** + *The ID for the job.
+ */ + JobId?: string; + + /** + *The name of the operation.
+ */ + Operation?: string; + + /** + *The current status of the request.
+ */ + Status?: string; +} + +export namespace CreateBackendResponse { + export const filterSensitiveLog = (obj: CreateBackendResponse): any => ({ + ...obj, + }); +} + +export enum Mode { + AMAZON_COGNITO_USER_POOLS = "AMAZON_COGNITO_USER_POOLS", + API_KEY = "API_KEY", + AWS_IAM = "AWS_IAM", + OPENID_CONNECT = "OPENID_CONNECT", +} + +/** + *The authentication settings for accessing provisioned data models in your Amplify project.
+ */ +export interface BackendAPIAppSyncAuthSettings { + /** + *The Amazon Cognito user pool id, if Amazon Cognito was used as an authentication setting to access your data models.
+ */ + CognitoUserPoolId?: string; + + /** + *The api key description for API_KEY, if it was used as an authentication mechanism to access your data models.
+ */ + Description?: string; + + /** + *The api key expiration time for API_KEY, if it was used as an authentication mechanism to access your data models.
+ */ + ExpirationTime?: number; + + /** + *The expiry time for the OpenID authentication mechanism.
+ */ + OpenIDAuthTTL?: string; + + /** + *The clientID for openID, if openID was used as an authentication setting to access your data models.
+ */ + OpenIDClientId?: string; + + /** + *The expiry time for the OpenID authentication mechanism.
+ */ + OpenIDIatTTL?: string; + + /** + *The openID issuer URL, if openID was used as an authentication setting to access your data models.
+ */ + OpenIDIssueURL?: string; + + /** + *The open id provider name, if openID was used as an authentication mechanism to access your data models.
+ */ + OpenIDProviderName?: string; +} + +export namespace BackendAPIAppSyncAuthSettings { + export const filterSensitiveLog = (obj: BackendAPIAppSyncAuthSettings): any => ({ + ...obj, + }); +} + +/** + *Describes the auth types for your configured data models.
+ */ +export interface BackendAPIAuthType { + /** + *Describes the authentication mode.
+ */ + Mode?: Mode | string; + + /** + *Describes settings for the authentication mode.
+ */ + Settings?: BackendAPIAppSyncAuthSettings; +} + +export namespace BackendAPIAuthType { + export const filterSensitiveLog = (obj: BackendAPIAuthType): any => ({ + ...obj, + }); +} + +export enum ResolutionStrategy { + AUTOMERGE = "AUTOMERGE", + LAMBDA = "LAMBDA", + NONE = "NONE", + OPTIMISTIC_CONCURRENCY = "OPTIMISTIC_CONCURRENCY", +} + +/** + *Describes the conflict resolution configuration for your data model configured in your Amplify project.
+ */ +export interface BackendAPIConflictResolution { + /** + *The strategy for conflict resolution.
+ */ + ResolutionStrategy?: ResolutionStrategy | string; +} + +export namespace BackendAPIConflictResolution { + export const filterSensitiveLog = (obj: BackendAPIConflictResolution): any => ({ + ...obj, + }); +} + +/** + *The resource config for the data model,configured as a part of the Amplify project.
+ */ +export interface BackendAPIResourceConfig { + /** + *Addition authentication methods used to interact with your data models.
+ */ + AdditionalAuthTypes?: BackendAPIAuthType[]; + + /** + *The API name used to interact with the data model, configured as a part of the amplify project.
+ */ + ApiName?: string; + + /** + *The conflict resoultion strategy for your data stored in the data models.
+ */ + ConflictResolution?: BackendAPIConflictResolution; + + /** + *The default authentication type for interacting with the configured data models in your amplify project.
+ */ + DefaultAuthType?: BackendAPIAuthType; + + /** + *The service used to provision and interact with the data model.
+ */ + Service?: string; + + /** + *The definition of the data model in the annotated transform of the graphql schema.
+ */ + TransformSchema?: string; +} + +export namespace BackendAPIResourceConfig { + export const filterSensitiveLog = (obj: BackendAPIResourceConfig): any => ({ + ...obj, + }); +} + +/** + *The request body for CreateBackendAPI.
+ */ +export interface CreateBackendAPIRequest { + /** + *The app ID.
+ */ + AppId: string | undefined; + + /** + *The name of the backend environment.
+ */ + BackendEnvironmentName: string | undefined; + + /** + *The resource configuration for this request.
+ */ + ResourceConfig: BackendAPIResourceConfig | undefined; + + /** + *The name of this resource.
+ */ + ResourceName: string | undefined; +} + +export namespace CreateBackendAPIRequest { + export const filterSensitiveLog = (obj: CreateBackendAPIRequest): any => ({ + ...obj, + }); +} + +export interface CreateBackendAPIResponse { + /** + *The app ID.
+ */ + AppId?: string; + + /** + *The name of the backend environment.
+ */ + BackendEnvironmentName?: string; + + /** + *If the request failed, this is the returned error.
+ */ + Error?: string; + + /** + *The ID for the job.
+ */ + JobId?: string; + + /** + *The name of the operation.
+ */ + Operation?: string; + + /** + *The current status of the request.
+ */ + Status?: string; +} + +export namespace CreateBackendAPIResponse { + export const filterSensitiveLog = (obj: CreateBackendAPIResponse): any => ({ + ...obj, + }); +} + +export enum AuthResources { + IDENTITY_POOL_AND_USER_POOL = "IDENTITY_POOL_AND_USER_POOL", + USER_POOL_ONLY = "USER_POOL_ONLY", +} + +/** + *Describes authorization configurations for the auth resources, configures as a part of your Amplify project.
+ */ +export interface CreateBackendAuthIdentityPoolConfig { + /** + *Name of the identity pool used for authorization.
+ */ + IdentityPoolName: string | undefined; + + /** + *Set to true or false based on whether you want to enable guest authorization to your Amplify app.
+ */ + UnauthenticatedLogin: boolean | undefined; +} + +export namespace CreateBackendAuthIdentityPoolConfig { + export const filterSensitiveLog = (obj: CreateBackendAuthIdentityPoolConfig): any => ({ + ...obj, + }); +} + +export enum Service { + COGNITO = "COGNITO", +} + +export enum DeliveryMethod { + EMAIL = "EMAIL", + SMS = "SMS", +} + +/** + *The configuration for the email sent when an app user forgets their password.
+ */ +export interface EmailSettings { + /** + *The body of the email.
+ */ + EmailMessage?: string; + + /** + *The subject of the email.
+ */ + EmailSubject?: string; +} + +export namespace EmailSettings { + export const filterSensitiveLog = (obj: EmailSettings): any => ({ + ...obj, + }); +} + +/** + *SMS settings for authentication.
+ */ +export interface SmsSettings { + /** + *The body of the SMS message.
+ */ + SmsMessage?: string; +} + +export namespace SmsSettings { + export const filterSensitiveLog = (obj: SmsSettings): any => ({ + ...obj, + }); +} + +/** + *Describes the forgot password policy for authenticating into the Amlify app.
+ */ +export interface CreateBackendAuthForgotPasswordConfig { + /** + *Describes which mode to use (either SMS or email) to deliver messages to app users that want to recover their password.
+ */ + DeliveryMethod: DeliveryMethod | string | undefined; + + /** + *The configuration for the email sent when an app user forgets their password.
+ */ + EmailSettings?: EmailSettings; + + /** + *The configuration for the SMS message sent when an app user forgets their password.
+ */ + SmsSettings?: SmsSettings; +} + +export namespace CreateBackendAuthForgotPasswordConfig { + export const filterSensitiveLog = (obj: CreateBackendAuthForgotPasswordConfig): any => ({ + ...obj, + }); +} + +export enum MFAMode { + OFF = "OFF", + ON = "ON", + OPTIONAL = "OPTIONAL", +} + +export enum MfaTypesElement { + SMS = "SMS", + TOTP = "TOTP", +} + +/** + *The settings of your MFA configuration for the backend of your Amplify project.
+ */ +export interface Settings { + /** + *The supported MFA types
+ */ + MfaTypes?: (MfaTypesElement | string)[]; + + /** + *The body of the SMS message.
+ */ + SmsMessage?: string; +} + +export namespace Settings { + export const filterSensitiveLog = (obj: Settings): any => ({ + ...obj, + }); +} + +/** + *Describes whether multi-factor authentication policies should be applied for your Amazon Cognito user pool configured as a part of your Amplify project.
+ */ +export interface CreateBackendAuthMFAConfig { + /** + *Describes whether MFA should be [ON, OFF, OPTIONAL] for authentication in your Amplify project.
+ */ + MFAMode: MFAMode | string | undefined; + + /** + *Describes the configuration settings and methods for your Amplify app users to use MFA.
+ */ + Settings?: Settings; +} + +export namespace CreateBackendAuthMFAConfig { + export const filterSensitiveLog = (obj: CreateBackendAuthMFAConfig): any => ({ + ...obj, + }); +} + +export enum OAuthGrantType { + CODE = "CODE", + IMPLICIT = "IMPLICIT", +} + +export enum OAuthScopesElement { + AWS_COGNITO_SIGNIN_USER_ADMIN = "AWS_COGNITO_SIGNIN_USER_ADMIN", + EMAIL = "EMAIL", + OPENID = "OPENID", + PHONE = "PHONE", + PROFILE = "PROFILE", +} + +/** + *Describes third party social federation configurations for allowing your app users to sign in using OAuth.
+ */ +export interface BackendAuthSocialProviderConfig { + /** + *Describes the client_id which can be obtained from the third party social federation provider.
+ */ + ClientId?: string; + + /** + *Describes the client_secret which can be obtained from third party social federation providers.
+ */ + ClientSecret?: string; +} + +export namespace BackendAuthSocialProviderConfig { + export const filterSensitiveLog = (obj: BackendAuthSocialProviderConfig): any => ({ + ...obj, + }); +} + +/** + *The settings for using the social providers for access to your Amplify app.
+ */ +export interface SocialProviderSettings { + /** + *Describes third party social federation configurations for allowing your app users to sign in using OAuth.
+ */ + Facebook?: BackendAuthSocialProviderConfig; + + /** + *Describes third party social federation configurations for allowing your app users to sign in using OAuth.
+ */ + Google?: BackendAuthSocialProviderConfig; + + /** + *Describes third party social federation configurations for allowing your app users to sign in using OAuth.
+ */ + LoginWithAmazon?: BackendAuthSocialProviderConfig; +} + +export namespace SocialProviderSettings { + export const filterSensitiveLog = (obj: SocialProviderSettings): any => ({ + ...obj, + }); +} + +/** + *Creates the OAuth configuration for your Amplify project.
+ */ +export interface CreateBackendAuthOAuthConfig { + /** + *The domain prefix for your Amplify app.
+ */ + DomainPrefix?: string; + + /** + *The OAuth grant type which you use to allow app users to authenticate from your Amplify app.
+ */ + OAuthGrantType: OAuthGrantType | string | undefined; + + /** + *List of OAuth related flows which use to allow your app users to authenticate from your Amplify app.
+ */ + OAuthScopes: (OAuthScopesElement | string)[] | undefined; + + /** + *The redirected URI for sigining into your Amplify app.
+ */ + RedirectSignInURIs: string[] | undefined; + + /** + *Redirect URLs used by OAuth when a user signs out of an Amplify app.
+ */ + RedirectSignOutURIs: string[] | undefined; + + /** + *The settings for using the social providers for access to your Amplify app.
+ */ + SocialProviderSettings?: SocialProviderSettings; +} + +export namespace CreateBackendAuthOAuthConfig { + export const filterSensitiveLog = (obj: CreateBackendAuthOAuthConfig): any => ({ + ...obj, + }); +} + +/** + *The password policy configuration for the backend to your Amplify project.
+ */ +export interface CreateBackendAuthPasswordPolicyConfig { + /** + *Additional constraints for the pasword used to access the backend of your Amplify project.
+ */ + AdditionalConstraints?: (AdditionalConstraintsElement | string)[]; + + /** + *The minimum length of password used to access the backend of your Amplify project.
+ */ + MinimumLength: number | undefined; +} + +export namespace CreateBackendAuthPasswordPolicyConfig { + export const filterSensitiveLog = (obj: CreateBackendAuthPasswordPolicyConfig): any => ({ + ...obj, + }); +} + +export enum RequiredSignUpAttributesElement { + ADDRESS = "ADDRESS", + BIRTHDATE = "BIRTHDATE", + EMAIL = "EMAIL", + FAMILY_NAME = "FAMILY_NAME", + GENDER = "GENDER", + GIVEN_NAME = "GIVEN_NAME", + LOCALE = "LOCALE", + MIDDLE_NAME = "MIDDLE_NAME", + NAME = "NAME", + NICKNAME = "NICKNAME", + PHONE_NUMBER = "PHONE_NUMBER", + PICTURE = "PICTURE", + PREFERRED_USERNAME = "PREFERRED_USERNAME", + PROFILE = "PROFILE", + UPDATED_AT = "UPDATED_AT", + WEBSITE = "WEBSITE", + ZONE_INFO = "ZONE_INFO", +} + +export enum SignInMethod { + EMAIL = "EMAIL", + EMAIL_AND_PHONE_NUMBER = "EMAIL_AND_PHONE_NUMBER", + PHONE_NUMBER = "PHONE_NUMBER", + USERNAME = "USERNAME", +} + +/** + *Describes the Amazon Cognito user pool configuration for the auth resource to be configured for your Amplify project.
+ */ +export interface CreateBackendAuthUserPoolConfig { + /** + *Describes the forgotten password policy for your Amazon Cognito user pool, configured as a part of your Amplify project.
+ */ + ForgotPassword?: CreateBackendAuthForgotPasswordConfig; + + /** + *Describes whether multi-factor authentication policies should be applied for your Amazon Cognito user pool configured as a part of your Amplify project.
+ */ + Mfa?: CreateBackendAuthMFAConfig; + + /** + *Describes the OAuth policy and rules for your Amazon Cognito user pool, configured as a part of your Amplify project.
+ */ + OAuth?: CreateBackendAuthOAuthConfig; + + /** + *Describes the password policy for your Amazon Cognito user pool, configured as a part of your Amplify project.
+ */ + PasswordPolicy?: CreateBackendAuthPasswordPolicyConfig; + + /** + *The required attributes to sign up new users in the user pool.
+ */ + RequiredSignUpAttributes: (RequiredSignUpAttributesElement | string)[] | undefined; + + /** + *Describes the sign-in methods that your Amplify app users to login using the Amazon Cognito user pool, configured as a part of your Amplify project.
+ */ + SignInMethod: SignInMethod | string | undefined; + + /** + *The Amazon Cognito user pool name.
+ */ + UserPoolName: string | undefined; +} + +export namespace CreateBackendAuthUserPoolConfig { + export const filterSensitiveLog = (obj: CreateBackendAuthUserPoolConfig): any => ({ + ...obj, + }); +} + +/** + *Defines the resource configuration when creating an auth resource in your Amplify project.
+ */ +export interface CreateBackendAuthResourceConfig { + /** + *Defines whether you want to configure only authentication or both authentication and authorization settings.
+ */ + AuthResources: AuthResources | string | undefined; + + /** + *Describes the authorization configuration for the Amazon Cognito identity pool, provisioned as a part of your auth resource in the Amplify project.
+ */ + IdentityPoolConfigs?: CreateBackendAuthIdentityPoolConfig; + + /** + *Defines the service name to use when configuring an authentication resource in your Amplify project.
+ */ + Service: Service | string | undefined; + + /** + *Describes authentication configuration for the Amazon Cognito user pool, provisioned as a part of your auth resource in the Amplify project.
+ */ + UserPoolConfigs: CreateBackendAuthUserPoolConfig | undefined; +} + +export namespace CreateBackendAuthResourceConfig { + export const filterSensitiveLog = (obj: CreateBackendAuthResourceConfig): any => ({ + ...obj, + }); +} + +/** + *The request body for CreateBackendAuth.
+ */ +export interface CreateBackendAuthRequest { + /** + *The app ID.
+ */ + AppId: string | undefined; + + /** + *The name of the backend environment.
+ */ + BackendEnvironmentName: string | undefined; + + /** + *The resource configuration for this request object.
+ */ + ResourceConfig: CreateBackendAuthResourceConfig | undefined; + + /** + *The name of this resource.
+ */ + ResourceName: string | undefined; +} + +export namespace CreateBackendAuthRequest { + export const filterSensitiveLog = (obj: CreateBackendAuthRequest): any => ({ + ...obj, + }); +} + +export interface CreateBackendAuthResponse { + /** + *The app ID.
+ */ + AppId?: string; + + /** + *The name of the backend environment.
+ */ + BackendEnvironmentName?: string; + + /** + *If the request failed, this is the returned error.
+ */ + Error?: string; + + /** + *The ID for the job.
+ */ + JobId?: string; + + /** + *The name of the operation.
+ */ + Operation?: string; + + /** + *The current status of the request.
+ */ + Status?: string; +} + +export namespace CreateBackendAuthResponse { + export const filterSensitiveLog = (obj: CreateBackendAuthResponse): any => ({ + ...obj, + }); +} + +/** + *The request body for CreateBackendConfig.
+ */ +export interface CreateBackendConfigRequest { + /** + *The app ID.
+ */ + AppId: string | undefined; + + /** + *The app ID for the backend manager.
+ */ + BackendManagerAppId?: string; +} + +export namespace CreateBackendConfigRequest { + export const filterSensitiveLog = (obj: CreateBackendConfigRequest): any => ({ + ...obj, + }); +} + +export interface CreateBackendConfigResponse { + /** + *The app ID.
+ */ + AppId?: string; + + /** + *The name of the backend environment.
+ */ + BackendEnvironmentName?: string; + + /** + *The ID for the job.
+ */ + JobId?: string; + + /** + *The current status of the request.
+ */ + Status?: string; +} + +export namespace CreateBackendConfigResponse { + export const filterSensitiveLog = (obj: CreateBackendConfigResponse): any => ({ + ...obj, + }); +} + +export interface CreateTokenRequest { + /** + *The app ID.
+ */ + AppId: string | undefined; +} + +export namespace CreateTokenRequest { + export const filterSensitiveLog = (obj: CreateTokenRequest): any => ({ + ...obj, + }); +} + +export interface CreateTokenResponse { + /** + *The app ID.
+ */ + AppId?: string; + + /** + *One time challenge code for authenticating into Amplify Admin UI.
+ */ + ChallengeCode?: string; + + /** + *A unique identifier provided when creating a new challenge token.
+ */ + SessionId?: string; + + /** + *The expiry time for the one time generated token code.
+ */ + Ttl?: string; +} + +export namespace CreateTokenResponse { + export const filterSensitiveLog = (obj: CreateTokenResponse): any => ({ + ...obj, + }); +} + +export interface DeleteBackendRequest { + /** + *The app ID.
+ */ + AppId: string | undefined; + + /** + *The name of the backend environment.
+ */ + BackendEnvironmentName: string | undefined; +} + +export namespace DeleteBackendRequest { + export const filterSensitiveLog = (obj: DeleteBackendRequest): any => ({ + ...obj, + }); +} + +export interface DeleteBackendResponse { + /** + *The app ID.
+ */ + AppId?: string; + + /** + *The name of the backend environment.
+ */ + BackendEnvironmentName?: string; + + /** + *If the request failed, this is the returned error.
+ */ + Error?: string; + + /** + *The ID for the job.
+ */ + JobId?: string; + + /** + *The name of the operation.
+ */ + Operation?: string; + + /** + *The current status of the request.
+ */ + Status?: string; +} + +export namespace DeleteBackendResponse { + export const filterSensitiveLog = (obj: DeleteBackendResponse): any => ({ + ...obj, + }); +} + +/** + *The request body for DeleteBackendAPI.
+ */ +export interface DeleteBackendAPIRequest { + /** + *The app ID.
+ */ + AppId: string | undefined; + + /** + *The name of the backend environment.
+ */ + BackendEnvironmentName: string | undefined; + + /** + *Defines the resource configuration for the data model in your Amplify project.
+ */ + ResourceConfig?: BackendAPIResourceConfig; + + /** + *The name of this resource.
+ */ + ResourceName: string | undefined; +} + +export namespace DeleteBackendAPIRequest { + export const filterSensitiveLog = (obj: DeleteBackendAPIRequest): any => ({ + ...obj, + }); +} + +export interface DeleteBackendAPIResponse { + /** + *The app ID.
+ */ + AppId?: string; + + /** + *The name of the backend environment.
+ */ + BackendEnvironmentName?: string; + + /** + *If the request failed, this is the returned error.
+ */ + Error?: string; + + /** + *The ID for the job.
+ */ + JobId?: string; + + /** + *The name of the operation.
+ */ + Operation?: string; + + /** + *The current status of the request.
+ */ + Status?: string; +} + +export namespace DeleteBackendAPIResponse { + export const filterSensitiveLog = (obj: DeleteBackendAPIResponse): any => ({ + ...obj, + }); +} + +/** + *The request body for DeleteBackendAuth.
+ */ +export interface DeleteBackendAuthRequest { + /** + *The app ID.
+ */ + AppId: string | undefined; + + /** + *The name of the backend environment.
+ */ + BackendEnvironmentName: string | undefined; + + /** + *The name of this resource.
+ */ + ResourceName: string | undefined; +} + +export namespace DeleteBackendAuthRequest { + export const filterSensitiveLog = (obj: DeleteBackendAuthRequest): any => ({ + ...obj, + }); +} + +export interface DeleteBackendAuthResponse { + /** + *The app ID.
+ */ + AppId?: string; + + /** + *The name of the backend environment.
+ */ + BackendEnvironmentName?: string; + + /** + *If the request failed, this is the returned error.
+ */ + Error?: string; + + /** + *The ID for the job.
+ */ + JobId?: string; + + /** + *The name of the operation.
+ */ + Operation?: string; + + /** + *The current status of the request.
+ */ + Status?: string; +} + +export namespace DeleteBackendAuthResponse { + export const filterSensitiveLog = (obj: DeleteBackendAuthResponse): any => ({ + ...obj, + }); +} + +export interface DeleteTokenRequest { + /** + *The app ID.
+ */ + AppId: string | undefined; + + /** + *The session Id.
+ */ + SessionId: string | undefined; +} + +export namespace DeleteTokenRequest { + export const filterSensitiveLog = (obj: DeleteTokenRequest): any => ({ + ...obj, + }); +} + +export interface DeleteTokenResponse { + /** + *Indicates whether the request succeeded or failed.
+ */ + IsSuccess?: boolean; +} + +export namespace DeleteTokenResponse { + export const filterSensitiveLog = (obj: DeleteTokenResponse): any => ({ + ...obj, + }); +} + +/** + *The request body for GenerateBackendAPIModels.
+ */ +export interface GenerateBackendAPIModelsRequest { + /** + *The app ID.
+ */ + AppId: string | undefined; + + /** + *The name of the backend environment.
+ */ + BackendEnvironmentName: string | undefined; + + /** + *The name of this resource.
+ */ + ResourceName: string | undefined; +} + +export namespace GenerateBackendAPIModelsRequest { + export const filterSensitiveLog = (obj: GenerateBackendAPIModelsRequest): any => ({ + ...obj, + }); +} + +export interface GenerateBackendAPIModelsResponse { + /** + *The app ID.
+ */ + AppId?: string; + + /** + *The name of the backend environment.
+ */ + BackendEnvironmentName?: string; + + /** + *If the request failed, this is the returned error.
+ */ + Error?: string; + + /** + *The ID for the job.
+ */ + JobId?: string; + + /** + *The name of the operation.
+ */ + Operation?: string; + + /** + *The current status of the request.
+ */ + Status?: string; +} + +export namespace GenerateBackendAPIModelsResponse { + export const filterSensitiveLog = (obj: GenerateBackendAPIModelsResponse): any => ({ + ...obj, + }); +} + +/** + *The request body for GetBackend.
+ */ +export interface GetBackendRequest { + /** + *The app ID.
+ */ + AppId: string | undefined; + + /** + *The name of the backend environment.
+ */ + BackendEnvironmentName?: string; +} + +export namespace GetBackendRequest { + export const filterSensitiveLog = (obj: GetBackendRequest): any => ({ + ...obj, + }); +} + +export interface GetBackendResponse { + /** + *A stringified version of the current configs for your Amplify project.
+ */ + AmplifyMetaConfig?: string; + + /** + *The app ID.
+ */ + AppId?: string; + + /** + *The name of the app.
+ */ + AppName?: string; + + /** + *A list of backend environments in an array.
+ */ + BackendEnvironmentList?: string[]; + + /** + *The name of the backend environment.
+ */ + BackendEnvironmentName?: string; + + /** + *If the request failed, this is the returned error.
+ */ + Error?: string; +} + +export namespace GetBackendResponse { + export const filterSensitiveLog = (obj: GetBackendResponse): any => ({ + ...obj, + }); +} + +/** + *The request body for GetBackendAPI.
+ */ +export interface GetBackendAPIRequest { + /** + *The app ID.
+ */ + AppId: string | undefined; + + /** + *The name of the backend environment.
+ */ + BackendEnvironmentName: string | undefined; + + /** + *Defines the resource configuration for the data model in your Amplify project.
+ */ + ResourceConfig?: BackendAPIResourceConfig; + + /** + *The name of this resource.
+ */ + ResourceName: string | undefined; +} + +export namespace GetBackendAPIRequest { + export const filterSensitiveLog = (obj: GetBackendAPIRequest): any => ({ + ...obj, + }); +} + +export interface GetBackendAPIResponse { + /** + *The app ID.
+ */ + AppId?: string; + + /** + *The name of the backend environment.
+ */ + BackendEnvironmentName?: string; + + /** + *If the request failed, this is the returned error.
+ */ + Error?: string; + + /** + *The resource configuration for this response object.
+ */ + ResourceConfig?: BackendAPIResourceConfig; + + /** + *The name of this resource.
+ */ + ResourceName?: string; +} + +export namespace GetBackendAPIResponse { + export const filterSensitiveLog = (obj: GetBackendAPIResponse): any => ({ + ...obj, + }); +} + +/** + *The request body for GetBackendAPIModels.
+ */ +export interface GetBackendAPIModelsRequest { + /** + *The app ID.
+ */ + AppId: string | undefined; + + /** + *The name of the backend environment.
+ */ + BackendEnvironmentName: string | undefined; + + /** + *The name of this resource.
+ */ + ResourceName: string | undefined; +} + +export namespace GetBackendAPIModelsRequest { + export const filterSensitiveLog = (obj: GetBackendAPIModelsRequest): any => ({ + ...obj, + }); +} + +export enum Status { + LATEST = "LATEST", + STALE = "STALE", +} + +export interface GetBackendAPIModelsResponse { + /** + *Stringified JSON of the datastore model.
+ */ + Models?: string; + + /** + *The current status of the request.
+ */ + Status?: Status | string; +} + +export namespace GetBackendAPIModelsResponse { + export const filterSensitiveLog = (obj: GetBackendAPIModelsResponse): any => ({ + ...obj, + }); +} + +/** + *The request body for GetBackendAuth.
+ */ +export interface GetBackendAuthRequest { + /** + *The app ID.
+ */ + AppId: string | undefined; + + /** + *The name of the backend environment.
+ */ + BackendEnvironmentName: string | undefined; + + /** + *The name of this resource.
+ */ + ResourceName: string | undefined; +} + +export namespace GetBackendAuthRequest { + export const filterSensitiveLog = (obj: GetBackendAuthRequest): any => ({ + ...obj, + }); +} + +export interface GetBackendAuthResponse { + /** + *The app ID.
+ */ + AppId?: string; + + /** + *The name of the backend environment.
+ */ + BackendEnvironmentName?: string; + + /** + *If the request failed, this is the returned error.
+ */ + Error?: string; + + /** + *The resource configuration for authorization requests to the backend of your Amplify project.
+ */ + ResourceConfig?: CreateBackendAuthResourceConfig; + + /** + *The name of this resource.
+ */ + ResourceName?: string; +} + +export namespace GetBackendAuthResponse { + export const filterSensitiveLog = (obj: GetBackendAuthResponse): any => ({ + ...obj, + }); +} + +export interface GetBackendJobRequest { + /** + *The app ID.
+ */ + AppId: string | undefined; + + /** + *The name of the backend environment.
+ */ + BackendEnvironmentName: string | undefined; + + /** + *The ID for the job.
+ */ + JobId: string | undefined; +} + +export namespace GetBackendJobRequest { + export const filterSensitiveLog = (obj: GetBackendJobRequest): any => ({ + ...obj, + }); +} + +export interface GetBackendJobResponse { + /** + *The app ID.
+ */ + AppId?: string; + + /** + *The name of the backend environment.
+ */ + BackendEnvironmentName?: string; + + /** + *The time when the job was created.
+ */ + CreateTime?: string; + + /** + *If the request failed, this is the returned error.
+ */ + Error?: string; + + /** + *The ID for the job.
+ */ + JobId?: string; + + /** + *The name of the operation.
+ */ + Operation?: string; + + /** + *The current status of the request.
+ */ + Status?: string; + + /** + *The time when the job was last updated.
+ */ + UpdateTime?: string; +} + +export namespace GetBackendJobResponse { + export const filterSensitiveLog = (obj: GetBackendJobResponse): any => ({ + ...obj, + }); +} + +export interface GetTokenRequest { + /** + *The app ID.
+ */ + AppId: string | undefined; + + /** + *The session Id.
+ */ + SessionId: string | undefined; +} + +export namespace GetTokenRequest { + export const filterSensitiveLog = (obj: GetTokenRequest): any => ({ + ...obj, + }); +} + +export interface GetTokenResponse { + /** + *The app ID.
+ */ + AppId?: string; + + /** + *The one time challenge code for authenticating into Amplify Admin UI.
+ */ + ChallengeCode?: string; + + /** + *A unique identifier provided when creating a new challenge token.
+ */ + SessionId?: string; + + /** + *The expiry time for the one time generated token code.
+ */ + Ttl?: string; +} + +export namespace GetTokenResponse { + export const filterSensitiveLog = (obj: GetTokenResponse): any => ({ + ...obj, + }); +} + +/** + *The request body for ListBackendJobs.
+ */ +export interface ListBackendJobsRequest { + /** + *The app ID.
+ */ + AppId: string | undefined; + + /** + *The name of the backend environment.
+ */ + BackendEnvironmentName: string | undefined; + + /** + *The ID for the job.
+ */ + JobId?: string; + + /** + *The maximum number of results you want in the response.
+ */ + MaxResults?: number; + + /** + *The token for the next set of results.
+ */ + NextToken?: string; + + /** + *Filters the list of response objects to only include those with the specified operation name.
+ */ + Operation?: string; + + /** + *Filters the list of response objects to only include those with the specified status.
+ */ + Status?: string; +} + +export namespace ListBackendJobsRequest { + export const filterSensitiveLog = (obj: ListBackendJobsRequest): any => ({ + ...obj, + }); +} + +/** + *The response object for this operation.
+ */ +export interface BackendJobRespObj { + /** + *The app ID.
+ */ + AppId: string | undefined; + + /** + *The name of the backend environment.
+ */ + BackendEnvironmentName: string | undefined; + + /** + *The time when the job was created.
+ */ + CreateTime?: string; + + /** + *If the request failed, this is the returned error.
+ */ + Error?: string; + + /** + *The ID for the job.
+ */ + JobId?: string; + + /** + *The name of the operation.
+ */ + Operation?: string; + + /** + *The current status of the request.
+ */ + Status?: string; + + /** + *The time when the job was last updated.
+ */ + UpdateTime?: string; +} + +export namespace BackendJobRespObj { + export const filterSensitiveLog = (obj: BackendJobRespObj): any => ({ + ...obj, + }); +} + +export interface ListBackendJobsResponse { + /** + *An array of jobs and their properties.
+ */ + Jobs?: BackendJobRespObj[]; + + /** + *The token for the next set of results.
+ */ + NextToken?: string; +} + +export namespace ListBackendJobsResponse { + export const filterSensitiveLog = (obj: ListBackendJobsResponse): any => ({ + ...obj, + }); +} + +/** + *The request body for RemoveAllBackends.
+ */ +export interface RemoveAllBackendsRequest { + /** + *The app ID.
+ */ + AppId: string | undefined; + + /** + *Cleans up the Amplify Console app if this value is set to true.
+ */ + CleanAmplifyApp?: boolean; +} + +export namespace RemoveAllBackendsRequest { + export const filterSensitiveLog = (obj: RemoveAllBackendsRequest): any => ({ + ...obj, + }); +} + +export interface RemoveAllBackendsResponse { + /** + *The app ID.
+ */ + AppId?: string; + + /** + *If the request failed, this is the returned error.
+ */ + Error?: string; + + /** + *The ID for the job.
+ */ + JobId?: string; + + /** + *The name of the operation.
+ */ + Operation?: string; + + /** + *The current status of the request.
+ */ + Status?: string; +} + +export namespace RemoveAllBackendsResponse { + export const filterSensitiveLog = (obj: RemoveAllBackendsResponse): any => ({ + ...obj, + }); +} + +export interface RemoveBackendConfigRequest { + /** + *The app ID.
+ */ + AppId: string | undefined; +} + +export namespace RemoveBackendConfigRequest { + export const filterSensitiveLog = (obj: RemoveBackendConfigRequest): any => ({ + ...obj, + }); +} + +export interface RemoveBackendConfigResponse { + /** + *If the request failed, this is the returned error.
+ */ + Error?: string; +} + +export namespace RemoveBackendConfigResponse { + export const filterSensitiveLog = (obj: RemoveBackendConfigResponse): any => ({ + ...obj, + }); +} + +/** + *The request body for UpdateBackendAPI.
+ */ +export interface UpdateBackendAPIRequest { + /** + *The app ID.
+ */ + AppId: string | undefined; + + /** + *The name of the backend environment.
+ */ + BackendEnvironmentName: string | undefined; + + /** + *Defines the resource configuration for the data model in your Amplify project.
+ */ + ResourceConfig?: BackendAPIResourceConfig; + + /** + *The name of this resource.
+ */ + ResourceName: string | undefined; +} + +export namespace UpdateBackendAPIRequest { + export const filterSensitiveLog = (obj: UpdateBackendAPIRequest): any => ({ + ...obj, + }); +} + +export interface UpdateBackendAPIResponse { + /** + *The app ID.
+ */ + AppId?: string; + + /** + *The name of the backend environment.
+ */ + BackendEnvironmentName?: string; + + /** + *If the request failed, this is the returned error.
+ */ + Error?: string; + + /** + *The ID for the job.
+ */ + JobId?: string; + + /** + *The name of the operation.
+ */ + Operation?: string; + + /** + *The current status of the request.
+ */ + Status?: string; +} + +export namespace UpdateBackendAPIResponse { + export const filterSensitiveLog = (obj: UpdateBackendAPIResponse): any => ({ + ...obj, + }); +} + +/** + *Describes the authorization configuration for the Amazon Cognito identity pool, provisioned as a part of your auth resource in the Amplify project.
+ */ +export interface UpdateBackendAuthIdentityPoolConfig { + /** + *A boolean value which can be set to allow or disallow guest level authorization into your Amplify app.
+ */ + UnauthenticatedLogin?: boolean; +} + +export namespace UpdateBackendAuthIdentityPoolConfig { + export const filterSensitiveLog = (obj: UpdateBackendAuthIdentityPoolConfig): any => ({ + ...obj, + }); +} + +/** + *Describes the forgot password policy for authenticating into the Amlify app.
+ */ +export interface UpdateBackendAuthForgotPasswordConfig { + /** + *Describes which mode to use (either SMS or email) to deliver messages to app users that want to recover their password.
+ */ + DeliveryMethod?: DeliveryMethod | string; + + /** + *The configuration for the email sent when an app user forgets their password.
+ */ + EmailSettings?: EmailSettings; + + /** + *The configuration for the SMS message sent when an Amplify app user forgets their password.
+ */ + SmsSettings?: SmsSettings; +} + +export namespace UpdateBackendAuthForgotPasswordConfig { + export const filterSensitiveLog = (obj: UpdateBackendAuthForgotPasswordConfig): any => ({ + ...obj, + }); +} + +/** + *Updates the multi-factor authentication (MFA) configuration for the backend of your Amplify project.
+ */ +export interface UpdateBackendAuthMFAConfig { + /** + *The MFA mode for the backend of your Amplify project.
+ */ + MFAMode?: MFAMode | string; + + /** + *The settings of your MFA configuration for the backend of your Amplify project.
+ */ + Settings?: Settings; +} + +export namespace UpdateBackendAuthMFAConfig { + export const filterSensitiveLog = (obj: UpdateBackendAuthMFAConfig): any => ({ + ...obj, + }); +} + +/** + *The OAuth configurations for authenticating users into your Amplify app.
+ */ +export interface UpdateBackendAuthOAuthConfig { + /** + *The Amazon Cognito domain prefix used to create a hosted UI for authentication.
+ */ + DomainPrefix?: string; + + /** + *The OAuth grant type to allow app users to authenticate from your Amplify app.
+ */ + OAuthGrantType?: OAuthGrantType | string; + + /** + *The list of OAuth related flows which can allow users to authenticate from your Amplify app.
+ */ + OAuthScopes?: (OAuthScopesElement | string)[]; + + /** + *Redirect URLs used by OAuth when a user signs in to an Amplify app.
+ */ + RedirectSignInURIs?: string[]; + + /** + *Redirect URLs used by OAuth when a user signs out of an Amplify app.
+ */ + RedirectSignOutURIs?: string[]; + + /** + *Describes third party social federation configurations for allowing your users to sign in with OAuth.
+ */ + SocialProviderSettings?: SocialProviderSettings; +} + +export namespace UpdateBackendAuthOAuthConfig { + export const filterSensitiveLog = (obj: UpdateBackendAuthOAuthConfig): any => ({ + ...obj, + }); +} + +/** + *Describes the password policy for your Amazon Cognito user pool configured as a part of your Amplify project.
+ */ +export interface UpdateBackendAuthPasswordPolicyConfig { + /** + *Describes additional constrains on password requirements to sign in into the auth resource, configured as a part of your Ampify project.
+ */ + AdditionalConstraints?: (AdditionalConstraintsElement | string)[]; + + /** + *Describes the minimum length of password required to sign in into the auth resource, configured as a part of your Ampify project.
+ */ + MinimumLength?: number; +} + +export namespace UpdateBackendAuthPasswordPolicyConfig { + export const filterSensitiveLog = (obj: UpdateBackendAuthPasswordPolicyConfig): any => ({ + ...obj, + }); +} + +/** + *Describes the Amazon Cognito user pool configuration for the authorization resource to be configured for your Amplify project on an update.
+ */ +export interface UpdateBackendAuthUserPoolConfig { + /** + *Describes the forgot password policy for your Amazon Cognito user pool, configured as a part of your Amplify project.
+ */ + ForgotPassword?: UpdateBackendAuthForgotPasswordConfig; + + /** + *Describes whether multi-factor authentication policies should be applied for your Amazon Cognito user pool configured as a part of your Amplify project.
+ */ + Mfa?: UpdateBackendAuthMFAConfig; + + /** + *Describes the OAuth policy and rules for your Amazon Cognito user pool, configured as a part of your Amplify project.
+ */ + OAuth?: UpdateBackendAuthOAuthConfig; + + /** + *Describes the password policy for your Amazon Cognito user pool, configured as a part of your Amplify project.
+ */ + PasswordPolicy?: UpdateBackendAuthPasswordPolicyConfig; +} + +export namespace UpdateBackendAuthUserPoolConfig { + export const filterSensitiveLog = (obj: UpdateBackendAuthUserPoolConfig): any => ({ + ...obj, + }); +} + +/** + *Defines the resource configuration when updating an authentication resource in your Amplify project.
+ */ +export interface UpdateBackendAuthResourceConfig { + /** + *Defines the service name to use when configuring an authentication resource in your Amplify project.
+ */ + AuthResources: AuthResources | string | undefined; + + /** + *Describes the authorization configuration for the Amazon Cognito identity pool, provisioned as a part of your auth resource in the Amplify project.
+ */ + IdentityPoolConfigs?: UpdateBackendAuthIdentityPoolConfig; + + /** + *Defines the service name to use when configuring an authentication resource in your Amplify project.
+ */ + Service: Service | string | undefined; + + /** + *Describes the authentication configuration for the Amazon Cognito userpool, provisioned as a part of your auth resource in the Amplify project.
+ */ + UserPoolConfigs: UpdateBackendAuthUserPoolConfig | undefined; +} + +export namespace UpdateBackendAuthResourceConfig { + export const filterSensitiveLog = (obj: UpdateBackendAuthResourceConfig): any => ({ + ...obj, + }); +} + +/** + *The request body for UpdateBackendAuth.
+ */ +export interface UpdateBackendAuthRequest { + /** + *The app ID.
+ */ + AppId: string | undefined; + + /** + *The name of the backend environment.
+ */ + BackendEnvironmentName: string | undefined; + + /** + *The resource configuration for this request object.
+ */ + ResourceConfig: UpdateBackendAuthResourceConfig | undefined; + + /** + *The name of this resource.
+ */ + ResourceName: string | undefined; +} + +export namespace UpdateBackendAuthRequest { + export const filterSensitiveLog = (obj: UpdateBackendAuthRequest): any => ({ + ...obj, + }); +} + +export interface UpdateBackendAuthResponse { + /** + *The app ID.
+ */ + AppId?: string; + + /** + *The name of the backend environment.
+ */ + BackendEnvironmentName?: string; + + /** + *If the request failed, this is the returned error.
+ */ + Error?: string; + + /** + *The ID for the job.
+ */ + JobId?: string; + + /** + *The name of the operation.
+ */ + Operation?: string; + + /** + *The current status of the request.
+ */ + Status?: string; +} + +export namespace UpdateBackendAuthResponse { + export const filterSensitiveLog = (obj: UpdateBackendAuthResponse): any => ({ + ...obj, + }); +} + +/** + *The request object for this operation.
+ */ +export interface LoginAuthConfigReqObj { + /** + *Amazon Cognito identitypool id used for the Amplify Admin UI login authorization.
+ */ + AwsCognitoIdentityPoolId?: string; + + /** + *The AWS Region for the the Amplify Admin login.
+ */ + AwsCognitoRegion?: string; + + /** + *The Amazon Cognito userpool id used for Amplify Admin UI login authentication.
+ */ + AwsUserPoolsId?: string; + + /** + *The web client ID for the Amazon Cognito userpools.
+ */ + AwsUserPoolsWebClientId?: string; +} + +export namespace LoginAuthConfigReqObj { + export const filterSensitiveLog = (obj: LoginAuthConfigReqObj): any => ({ + ...obj, + }); +} + +/** + *The request body for UpdateBackendConfig.
+ */ +export interface UpdateBackendConfigRequest { + /** + *The app ID.
+ */ + AppId: string | undefined; + + /** + *Describes the Amazon Cognito configuration for Admin UI access.
+ */ + LoginAuthConfig?: LoginAuthConfigReqObj; +} + +export namespace UpdateBackendConfigRequest { + export const filterSensitiveLog = (obj: UpdateBackendConfigRequest): any => ({ + ...obj, + }); +} + +export interface UpdateBackendConfigResponse { + /** + *The app ID.
+ */ + AppId?: string; + + /** + *The app ID for the backend manager.
+ */ + BackendManagerAppId?: string; + + /** + *If the request failed, this is the returned error.
+ */ + Error?: string; + + /** + *Describes the Amazon Cognito configurations for the Admin UI auth resource to login with.
+ */ + LoginAuthConfig?: LoginAuthConfigReqObj; +} + +export namespace UpdateBackendConfigResponse { + export const filterSensitiveLog = (obj: UpdateBackendConfigResponse): any => ({ + ...obj, + }); +} + +/** + *The request body for GetBackendJob.
+ */ +export interface UpdateBackendJobRequest { + /** + *The app ID.
+ */ + AppId: string | undefined; + + /** + *The name of the backend environment.
+ */ + BackendEnvironmentName: string | undefined; + + /** + *The ID for the job.
+ */ + JobId: string | undefined; + + /** + *Filters the list of response objects to only include those with the specified operation name.
+ */ + Operation?: string; + + /** + *Filters the list of response objects to only include those with the specified status.
+ */ + Status?: string; +} + +export namespace UpdateBackendJobRequest { + export const filterSensitiveLog = (obj: UpdateBackendJobRequest): any => ({ + ...obj, + }); +} + +export interface UpdateBackendJobResponse { + /** + *The app ID.
+ */ + AppId?: string; + + /** + *The name of the backend environment.
+ */ + BackendEnvironmentName?: string; + + /** + *The time when the job was created.
+ */ + CreateTime?: string; + + /** + *If the request failed, this is the returned error.
+ */ + Error?: string; + + /** + *The ID for the job.
+ */ + JobId?: string; + + /** + *The name of the operation.
+ */ + Operation?: string; + + /** + *The current status of the request.
+ */ + Status?: string; + + /** + *The time when the job was last updated.
+ */ + UpdateTime?: string; +} + +export namespace UpdateBackendJobResponse { + export const filterSensitiveLog = (obj: UpdateBackendJobResponse): any => ({ + ...obj, + }); +} diff --git a/clients/client-amplifybackend/package.json b/clients/client-amplifybackend/package.json new file mode 100644 index 000000000000..d97624a2c39e --- /dev/null +++ b/clients/client-amplifybackend/package.json @@ -0,0 +1,83 @@ +{ + "name": "@aws-sdk/client-amplifybackend", + "description": "AWS SDK for JavaScript Amplifybackend Client for Node.js, Browser and React Native", + "version": "1.0.0-rc.1", + "scripts": { + "clean": "yarn remove-definitions && yarn remove-dist && yarn remove-documentation", + "build-documentation": "yarn remove-documentation && typedoc ./", + "prepublishOnly": "yarn build", + "pretest": "yarn build:cjs", + "remove-definitions": "rimraf ./types", + "remove-dist": "rimraf ./dist", + "remove-documentation": "rimraf ./docs", + "test": "yarn build && jest --coverage --passWithNoTests", + "build:cjs": "tsc -p tsconfig.json", + "build:es": "tsc -p tsconfig.es.json", + "build": "yarn build:cjs && yarn build:es" + }, + "main": "./dist/cjs/index.js", + "types": "./types/index.d.ts", + "module": "./dist/es/index.js", + "browser": { + "./runtimeConfig": "./runtimeConfig.browser" + }, + "react-native": { + "./runtimeConfig": "./runtimeConfig.native" + }, + "sideEffects": false, + "dependencies": { + "@aws-crypto/sha256-browser": "^1.0.0", + "@aws-crypto/sha256-js": "^1.0.0", + "@aws-sdk/config-resolver": "1.0.0-rc.7", + "@aws-sdk/credential-provider-node": "1.0.0-rc.7", + "@aws-sdk/fetch-http-handler": "1.0.0-rc.7", + "@aws-sdk/hash-node": "1.0.0-rc.7", + "@aws-sdk/invalid-dependency": "1.0.0-rc.3", + "@aws-sdk/middleware-content-length": "1.0.0-rc.7", + "@aws-sdk/middleware-host-header": "1.0.0-rc.7", + "@aws-sdk/middleware-logger": "1.0.0-rc.7", + "@aws-sdk/middleware-retry": "1.0.0-rc.7", + "@aws-sdk/middleware-serde": "1.0.0-rc.7", + "@aws-sdk/middleware-signing": "1.0.0-rc.7", + "@aws-sdk/middleware-stack": "1.0.0-rc.7", + "@aws-sdk/middleware-user-agent": "1.0.0-rc.7", + "@aws-sdk/node-config-provider": "1.0.0-rc.7", + "@aws-sdk/node-http-handler": "1.0.0-rc.7", + "@aws-sdk/protocol-http": "1.0.0-rc.7", + "@aws-sdk/smithy-client": "1.0.0-rc.7", + "@aws-sdk/url-parser-browser": "1.0.0-rc.7", + "@aws-sdk/url-parser-node": "1.0.0-rc.7", + "@aws-sdk/util-base64-browser": "1.0.0-rc.3", + "@aws-sdk/util-base64-node": "1.0.0-rc.3", + "@aws-sdk/util-body-length-browser": "1.0.0-rc.3", + "@aws-sdk/util-body-length-node": "1.0.0-rc.3", + "@aws-sdk/util-user-agent-browser": "1.0.0-rc.7", + "@aws-sdk/util-user-agent-node": "1.0.0-rc.7", + "@aws-sdk/util-utf8-browser": "1.0.0-rc.3", + "@aws-sdk/util-utf8-node": "1.0.0-rc.3", + "tslib": "^2.0.0" + }, + "devDependencies": { + "@aws-sdk/client-documentation-generator": "1.0.0-rc.7", + "@aws-sdk/types": "1.0.0-rc.7", + "@types/node": "^12.7.5", + "jest": "^26.1.0", + "rimraf": "^3.0.0", + "typedoc": "^0.19.2", + "typescript": "~4.1.2" + }, + "engines": { + "node": ">=10.0.0" + }, + "author": { + "name": "AWS SDK for JavaScript Team", + "url": "https://aws.amazon.com/javascript/" + }, + "license": "Apache-2.0", + "homepage": "https://github.com/aws/aws-sdk-js-v3/tree/master/clients/client-amplifybackend", + "repository": { + "type": "git", + "url": "https://github.com/aws/aws-sdk-js-v3.git", + "directory": "clients/client-amplifybackend" + } +} diff --git a/clients/client-amplifybackend/protocols/Aws_restJson1.ts b/clients/client-amplifybackend/protocols/Aws_restJson1.ts new file mode 100644 index 000000000000..0a9fd55db711 --- /dev/null +++ b/clients/client-amplifybackend/protocols/Aws_restJson1.ts @@ -0,0 +1,4171 @@ +import { CloneBackendCommandInput, CloneBackendCommandOutput } from "../commands/CloneBackendCommand"; +import { CreateBackendAPICommandInput, CreateBackendAPICommandOutput } from "../commands/CreateBackendAPICommand"; +import { CreateBackendAuthCommandInput, CreateBackendAuthCommandOutput } from "../commands/CreateBackendAuthCommand"; +import { CreateBackendCommandInput, CreateBackendCommandOutput } from "../commands/CreateBackendCommand"; +import { + CreateBackendConfigCommandInput, + CreateBackendConfigCommandOutput, +} from "../commands/CreateBackendConfigCommand"; +import { CreateTokenCommandInput, CreateTokenCommandOutput } from "../commands/CreateTokenCommand"; +import { DeleteBackendAPICommandInput, DeleteBackendAPICommandOutput } from "../commands/DeleteBackendAPICommand"; +import { DeleteBackendAuthCommandInput, DeleteBackendAuthCommandOutput } from "../commands/DeleteBackendAuthCommand"; +import { DeleteBackendCommandInput, DeleteBackendCommandOutput } from "../commands/DeleteBackendCommand"; +import { DeleteTokenCommandInput, DeleteTokenCommandOutput } from "../commands/DeleteTokenCommand"; +import { + GenerateBackendAPIModelsCommandInput, + GenerateBackendAPIModelsCommandOutput, +} from "../commands/GenerateBackendAPIModelsCommand"; +import { GetBackendAPICommandInput, GetBackendAPICommandOutput } from "../commands/GetBackendAPICommand"; +import { + GetBackendAPIModelsCommandInput, + GetBackendAPIModelsCommandOutput, +} from "../commands/GetBackendAPIModelsCommand"; +import { GetBackendAuthCommandInput, GetBackendAuthCommandOutput } from "../commands/GetBackendAuthCommand"; +import { GetBackendCommandInput, GetBackendCommandOutput } from "../commands/GetBackendCommand"; +import { GetBackendJobCommandInput, GetBackendJobCommandOutput } from "../commands/GetBackendJobCommand"; +import { GetTokenCommandInput, GetTokenCommandOutput } from "../commands/GetTokenCommand"; +import { ListBackendJobsCommandInput, ListBackendJobsCommandOutput } from "../commands/ListBackendJobsCommand"; +import { RemoveAllBackendsCommandInput, RemoveAllBackendsCommandOutput } from "../commands/RemoveAllBackendsCommand"; +import { + RemoveBackendConfigCommandInput, + RemoveBackendConfigCommandOutput, +} from "../commands/RemoveBackendConfigCommand"; +import { UpdateBackendAPICommandInput, UpdateBackendAPICommandOutput } from "../commands/UpdateBackendAPICommand"; +import { UpdateBackendAuthCommandInput, UpdateBackendAuthCommandOutput } from "../commands/UpdateBackendAuthCommand"; +import { + UpdateBackendConfigCommandInput, + UpdateBackendConfigCommandOutput, +} from "../commands/UpdateBackendConfigCommand"; +import { UpdateBackendJobCommandInput, UpdateBackendJobCommandOutput } from "../commands/UpdateBackendJobCommand"; +import { + AdditionalConstraintsElement, + BackendAPIAppSyncAuthSettings, + BackendAPIAuthType, + BackendAPIConflictResolution, + BackendAPIResourceConfig, + BackendAuthSocialProviderConfig, + BackendJobRespObj, + BadRequestException, + CreateBackendAuthForgotPasswordConfig, + CreateBackendAuthIdentityPoolConfig, + CreateBackendAuthMFAConfig, + CreateBackendAuthOAuthConfig, + CreateBackendAuthPasswordPolicyConfig, + CreateBackendAuthResourceConfig, + CreateBackendAuthUserPoolConfig, + EmailSettings, + GatewayTimeoutException, + LoginAuthConfigReqObj, + MfaTypesElement, + NotFoundException, + OAuthScopesElement, + RequiredSignUpAttributesElement, + ResourceConfig, + Settings, + SmsSettings, + SocialProviderSettings, + TooManyRequestsException, + UpdateBackendAuthForgotPasswordConfig, + UpdateBackendAuthIdentityPoolConfig, + UpdateBackendAuthMFAConfig, + UpdateBackendAuthOAuthConfig, + UpdateBackendAuthPasswordPolicyConfig, + UpdateBackendAuthResourceConfig, + UpdateBackendAuthUserPoolConfig, +} from "../models/models_0"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { + SmithyException as __SmithyException, + extendedEncodeURIComponent as __extendedEncodeURIComponent, +} from "@aws-sdk/smithy-client"; +import { + Endpoint as __Endpoint, + MetadataBearer as __MetadataBearer, + ResponseMetadata as __ResponseMetadata, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +export const serializeAws_restJson1CloneBackendCommand = async ( + input: CloneBackendCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: any = { + "Content-Type": "application/json", + }; + let resolvedPath = "/backend/{AppId}/environments/{BackendEnvironmentName}/clone"; + if (input.AppId !== undefined) { + const labelValue: string = input.AppId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: AppId."); + } + resolvedPath = resolvedPath.replace("{AppId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: AppId."); + } + if (input.BackendEnvironmentName !== undefined) { + const labelValue: string = input.BackendEnvironmentName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: BackendEnvironmentName."); + } + resolvedPath = resolvedPath.replace("{BackendEnvironmentName}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: BackendEnvironmentName."); + } + let body: any; + body = JSON.stringify({ + ...(input.TargetEnvironmentName !== undefined && { targetEnvironmentName: input.TargetEnvironmentName }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1CreateBackendCommand = async ( + input: CreateBackendCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: any = { + "Content-Type": "application/json", + }; + let resolvedPath = "/backend"; + let body: any; + body = JSON.stringify({ + ...(input.AppId !== undefined && { appId: input.AppId }), + ...(input.AppName !== undefined && { appName: input.AppName }), + ...(input.BackendEnvironmentName !== undefined && { backendEnvironmentName: input.BackendEnvironmentName }), + ...(input.ResourceConfig !== undefined && { + resourceConfig: serializeAws_restJson1ResourceConfig(input.ResourceConfig, context), + }), + ...(input.ResourceName !== undefined && { resourceName: input.ResourceName }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1CreateBackendAPICommand = async ( + input: CreateBackendAPICommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: any = { + "Content-Type": "application/json", + }; + let resolvedPath = "/backend/{AppId}/api"; + if (input.AppId !== undefined) { + const labelValue: string = input.AppId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: AppId."); + } + resolvedPath = resolvedPath.replace("{AppId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: AppId."); + } + let body: any; + body = JSON.stringify({ + ...(input.BackendEnvironmentName !== undefined && { backendEnvironmentName: input.BackendEnvironmentName }), + ...(input.ResourceConfig !== undefined && { + resourceConfig: serializeAws_restJson1BackendAPIResourceConfig(input.ResourceConfig, context), + }), + ...(input.ResourceName !== undefined && { resourceName: input.ResourceName }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1CreateBackendAuthCommand = async ( + input: CreateBackendAuthCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: any = { + "Content-Type": "application/json", + }; + let resolvedPath = "/backend/{AppId}/auth"; + if (input.AppId !== undefined) { + const labelValue: string = input.AppId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: AppId."); + } + resolvedPath = resolvedPath.replace("{AppId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: AppId."); + } + let body: any; + body = JSON.stringify({ + ...(input.BackendEnvironmentName !== undefined && { backendEnvironmentName: input.BackendEnvironmentName }), + ...(input.ResourceConfig !== undefined && { + resourceConfig: serializeAws_restJson1CreateBackendAuthResourceConfig(input.ResourceConfig, context), + }), + ...(input.ResourceName !== undefined && { resourceName: input.ResourceName }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1CreateBackendConfigCommand = async ( + input: CreateBackendConfigCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: any = { + "Content-Type": "application/json", + }; + let resolvedPath = "/backend/{AppId}/config"; + if (input.AppId !== undefined) { + const labelValue: string = input.AppId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: AppId."); + } + resolvedPath = resolvedPath.replace("{AppId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: AppId."); + } + let body: any; + body = JSON.stringify({ + ...(input.BackendManagerAppId !== undefined && { backendManagerAppId: input.BackendManagerAppId }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1CreateTokenCommand = async ( + input: CreateTokenCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: any = { + "Content-Type": "", + }; + let resolvedPath = "/backend/{AppId}/challenge"; + if (input.AppId !== undefined) { + const labelValue: string = input.AppId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: AppId."); + } + resolvedPath = resolvedPath.replace("{AppId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: AppId."); + } + let body: any; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1DeleteBackendCommand = async ( + input: DeleteBackendCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: any = { + "Content-Type": "", + }; + let resolvedPath = "/backend/{AppId}/environments/{BackendEnvironmentName}/remove"; + if (input.AppId !== undefined) { + const labelValue: string = input.AppId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: AppId."); + } + resolvedPath = resolvedPath.replace("{AppId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: AppId."); + } + if (input.BackendEnvironmentName !== undefined) { + const labelValue: string = input.BackendEnvironmentName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: BackendEnvironmentName."); + } + resolvedPath = resolvedPath.replace("{BackendEnvironmentName}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: BackendEnvironmentName."); + } + let body: any; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1DeleteBackendAPICommand = async ( + input: DeleteBackendAPICommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: any = { + "Content-Type": "application/json", + }; + let resolvedPath = "/backend/{AppId}/api/{BackendEnvironmentName}/remove"; + if (input.AppId !== undefined) { + const labelValue: string = input.AppId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: AppId."); + } + resolvedPath = resolvedPath.replace("{AppId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: AppId."); + } + if (input.BackendEnvironmentName !== undefined) { + const labelValue: string = input.BackendEnvironmentName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: BackendEnvironmentName."); + } + resolvedPath = resolvedPath.replace("{BackendEnvironmentName}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: BackendEnvironmentName."); + } + let body: any; + body = JSON.stringify({ + ...(input.ResourceConfig !== undefined && { + resourceConfig: serializeAws_restJson1BackendAPIResourceConfig(input.ResourceConfig, context), + }), + ...(input.ResourceName !== undefined && { resourceName: input.ResourceName }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1DeleteBackendAuthCommand = async ( + input: DeleteBackendAuthCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: any = { + "Content-Type": "application/json", + }; + let resolvedPath = "/backend/{AppId}/auth/{BackendEnvironmentName}/remove"; + if (input.AppId !== undefined) { + const labelValue: string = input.AppId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: AppId."); + } + resolvedPath = resolvedPath.replace("{AppId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: AppId."); + } + if (input.BackendEnvironmentName !== undefined) { + const labelValue: string = input.BackendEnvironmentName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: BackendEnvironmentName."); + } + resolvedPath = resolvedPath.replace("{BackendEnvironmentName}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: BackendEnvironmentName."); + } + let body: any; + body = JSON.stringify({ + ...(input.ResourceName !== undefined && { resourceName: input.ResourceName }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1DeleteTokenCommand = async ( + input: DeleteTokenCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: any = { + "Content-Type": "", + }; + let resolvedPath = "/backend/{AppId}/challenge/{SessionId}/remove"; + if (input.AppId !== undefined) { + const labelValue: string = input.AppId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: AppId."); + } + resolvedPath = resolvedPath.replace("{AppId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: AppId."); + } + if (input.SessionId !== undefined) { + const labelValue: string = input.SessionId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: SessionId."); + } + resolvedPath = resolvedPath.replace("{SessionId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: SessionId."); + } + let body: any; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1GenerateBackendAPIModelsCommand = async ( + input: GenerateBackendAPIModelsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: any = { + "Content-Type": "application/json", + }; + let resolvedPath = "/backend/{AppId}/api/{BackendEnvironmentName}/generateModels"; + if (input.AppId !== undefined) { + const labelValue: string = input.AppId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: AppId."); + } + resolvedPath = resolvedPath.replace("{AppId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: AppId."); + } + if (input.BackendEnvironmentName !== undefined) { + const labelValue: string = input.BackendEnvironmentName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: BackendEnvironmentName."); + } + resolvedPath = resolvedPath.replace("{BackendEnvironmentName}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: BackendEnvironmentName."); + } + let body: any; + body = JSON.stringify({ + ...(input.ResourceName !== undefined && { resourceName: input.ResourceName }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1GetBackendCommand = async ( + input: GetBackendCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: any = { + "Content-Type": "application/json", + }; + let resolvedPath = "/backend/{AppId}/details"; + if (input.AppId !== undefined) { + const labelValue: string = input.AppId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: AppId."); + } + resolvedPath = resolvedPath.replace("{AppId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: AppId."); + } + let body: any; + body = JSON.stringify({ + ...(input.BackendEnvironmentName !== undefined && { backendEnvironmentName: input.BackendEnvironmentName }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1GetBackendAPICommand = async ( + input: GetBackendAPICommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: any = { + "Content-Type": "application/json", + }; + let resolvedPath = "/backend/{AppId}/api/{BackendEnvironmentName}/details"; + if (input.AppId !== undefined) { + const labelValue: string = input.AppId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: AppId."); + } + resolvedPath = resolvedPath.replace("{AppId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: AppId."); + } + if (input.BackendEnvironmentName !== undefined) { + const labelValue: string = input.BackendEnvironmentName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: BackendEnvironmentName."); + } + resolvedPath = resolvedPath.replace("{BackendEnvironmentName}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: BackendEnvironmentName."); + } + let body: any; + body = JSON.stringify({ + ...(input.ResourceConfig !== undefined && { + resourceConfig: serializeAws_restJson1BackendAPIResourceConfig(input.ResourceConfig, context), + }), + ...(input.ResourceName !== undefined && { resourceName: input.ResourceName }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1GetBackendAPIModelsCommand = async ( + input: GetBackendAPIModelsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: any = { + "Content-Type": "application/json", + }; + let resolvedPath = "/backend/{AppId}/api/{BackendEnvironmentName}/getModels"; + if (input.AppId !== undefined) { + const labelValue: string = input.AppId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: AppId."); + } + resolvedPath = resolvedPath.replace("{AppId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: AppId."); + } + if (input.BackendEnvironmentName !== undefined) { + const labelValue: string = input.BackendEnvironmentName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: BackendEnvironmentName."); + } + resolvedPath = resolvedPath.replace("{BackendEnvironmentName}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: BackendEnvironmentName."); + } + let body: any; + body = JSON.stringify({ + ...(input.ResourceName !== undefined && { resourceName: input.ResourceName }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1GetBackendAuthCommand = async ( + input: GetBackendAuthCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: any = { + "Content-Type": "application/json", + }; + let resolvedPath = "/backend/{AppId}/auth/{BackendEnvironmentName}/details"; + if (input.AppId !== undefined) { + const labelValue: string = input.AppId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: AppId."); + } + resolvedPath = resolvedPath.replace("{AppId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: AppId."); + } + if (input.BackendEnvironmentName !== undefined) { + const labelValue: string = input.BackendEnvironmentName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: BackendEnvironmentName."); + } + resolvedPath = resolvedPath.replace("{BackendEnvironmentName}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: BackendEnvironmentName."); + } + let body: any; + body = JSON.stringify({ + ...(input.ResourceName !== undefined && { resourceName: input.ResourceName }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1GetBackendJobCommand = async ( + input: GetBackendJobCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: any = { + "Content-Type": "", + }; + let resolvedPath = "/backend/{AppId}/job/{BackendEnvironmentName}/{JobId}"; + if (input.AppId !== undefined) { + const labelValue: string = input.AppId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: AppId."); + } + resolvedPath = resolvedPath.replace("{AppId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: AppId."); + } + if (input.BackendEnvironmentName !== undefined) { + const labelValue: string = input.BackendEnvironmentName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: BackendEnvironmentName."); + } + resolvedPath = resolvedPath.replace("{BackendEnvironmentName}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: BackendEnvironmentName."); + } + if (input.JobId !== undefined) { + const labelValue: string = input.JobId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: JobId."); + } + resolvedPath = resolvedPath.replace("{JobId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: JobId."); + } + let body: any; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1GetTokenCommand = async ( + input: GetTokenCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: any = { + "Content-Type": "", + }; + let resolvedPath = "/backend/{AppId}/challenge/{SessionId}"; + if (input.AppId !== undefined) { + const labelValue: string = input.AppId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: AppId."); + } + resolvedPath = resolvedPath.replace("{AppId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: AppId."); + } + if (input.SessionId !== undefined) { + const labelValue: string = input.SessionId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: SessionId."); + } + resolvedPath = resolvedPath.replace("{SessionId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: SessionId."); + } + let body: any; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1ListBackendJobsCommand = async ( + input: ListBackendJobsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: any = { + "Content-Type": "application/json", + }; + let resolvedPath = "/backend/{AppId}/job/{BackendEnvironmentName}"; + if (input.AppId !== undefined) { + const labelValue: string = input.AppId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: AppId."); + } + resolvedPath = resolvedPath.replace("{AppId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: AppId."); + } + if (input.BackendEnvironmentName !== undefined) { + const labelValue: string = input.BackendEnvironmentName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: BackendEnvironmentName."); + } + resolvedPath = resolvedPath.replace("{BackendEnvironmentName}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: BackendEnvironmentName."); + } + let body: any; + body = JSON.stringify({ + ...(input.JobId !== undefined && { jobId: input.JobId }), + ...(input.MaxResults !== undefined && { maxResults: input.MaxResults }), + ...(input.NextToken !== undefined && { nextToken: input.NextToken }), + ...(input.Operation !== undefined && { operation: input.Operation }), + ...(input.Status !== undefined && { status: input.Status }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1RemoveAllBackendsCommand = async ( + input: RemoveAllBackendsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: any = { + "Content-Type": "application/json", + }; + let resolvedPath = "/backend/{AppId}/remove"; + if (input.AppId !== undefined) { + const labelValue: string = input.AppId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: AppId."); + } + resolvedPath = resolvedPath.replace("{AppId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: AppId."); + } + let body: any; + body = JSON.stringify({ + ...(input.CleanAmplifyApp !== undefined && { cleanAmplifyApp: input.CleanAmplifyApp }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1RemoveBackendConfigCommand = async ( + input: RemoveBackendConfigCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: any = { + "Content-Type": "", + }; + let resolvedPath = "/backend/{AppId}/config/remove"; + if (input.AppId !== undefined) { + const labelValue: string = input.AppId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: AppId."); + } + resolvedPath = resolvedPath.replace("{AppId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: AppId."); + } + let body: any; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1UpdateBackendAPICommand = async ( + input: UpdateBackendAPICommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: any = { + "Content-Type": "application/json", + }; + let resolvedPath = "/backend/{AppId}/api/{BackendEnvironmentName}"; + if (input.AppId !== undefined) { + const labelValue: string = input.AppId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: AppId."); + } + resolvedPath = resolvedPath.replace("{AppId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: AppId."); + } + if (input.BackendEnvironmentName !== undefined) { + const labelValue: string = input.BackendEnvironmentName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: BackendEnvironmentName."); + } + resolvedPath = resolvedPath.replace("{BackendEnvironmentName}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: BackendEnvironmentName."); + } + let body: any; + body = JSON.stringify({ + ...(input.ResourceConfig !== undefined && { + resourceConfig: serializeAws_restJson1BackendAPIResourceConfig(input.ResourceConfig, context), + }), + ...(input.ResourceName !== undefined && { resourceName: input.ResourceName }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1UpdateBackendAuthCommand = async ( + input: UpdateBackendAuthCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: any = { + "Content-Type": "application/json", + }; + let resolvedPath = "/backend/{AppId}/auth/{BackendEnvironmentName}"; + if (input.AppId !== undefined) { + const labelValue: string = input.AppId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: AppId."); + } + resolvedPath = resolvedPath.replace("{AppId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: AppId."); + } + if (input.BackendEnvironmentName !== undefined) { + const labelValue: string = input.BackendEnvironmentName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: BackendEnvironmentName."); + } + resolvedPath = resolvedPath.replace("{BackendEnvironmentName}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: BackendEnvironmentName."); + } + let body: any; + body = JSON.stringify({ + ...(input.ResourceConfig !== undefined && { + resourceConfig: serializeAws_restJson1UpdateBackendAuthResourceConfig(input.ResourceConfig, context), + }), + ...(input.ResourceName !== undefined && { resourceName: input.ResourceName }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1UpdateBackendConfigCommand = async ( + input: UpdateBackendConfigCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: any = { + "Content-Type": "application/json", + }; + let resolvedPath = "/backend/{AppId}/config/update"; + if (input.AppId !== undefined) { + const labelValue: string = input.AppId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: AppId."); + } + resolvedPath = resolvedPath.replace("{AppId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: AppId."); + } + let body: any; + body = JSON.stringify({ + ...(input.LoginAuthConfig !== undefined && { + loginAuthConfig: serializeAws_restJson1LoginAuthConfigReqObj(input.LoginAuthConfig, context), + }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1UpdateBackendJobCommand = async ( + input: UpdateBackendJobCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: any = { + "Content-Type": "application/json", + }; + let resolvedPath = "/backend/{AppId}/job/{BackendEnvironmentName}/{JobId}"; + if (input.AppId !== undefined) { + const labelValue: string = input.AppId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: AppId."); + } + resolvedPath = resolvedPath.replace("{AppId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: AppId."); + } + if (input.BackendEnvironmentName !== undefined) { + const labelValue: string = input.BackendEnvironmentName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: BackendEnvironmentName."); + } + resolvedPath = resolvedPath.replace("{BackendEnvironmentName}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: BackendEnvironmentName."); + } + if (input.JobId !== undefined) { + const labelValue: string = input.JobId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: JobId."); + } + resolvedPath = resolvedPath.replace("{JobId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: JobId."); + } + let body: any; + body = JSON.stringify({ + ...(input.Operation !== undefined && { operation: input.Operation }), + ...(input.Status !== undefined && { status: input.Status }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +export const deserializeAws_restJson1CloneBackendCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): PromiseThe Amazon AppIntegrations APIs are in preview release and are subject to change.
+ * + *The Amazon AppIntegrations service enables you to configure and reuse connections to external applications.
+ *For information about how you can use external applications with Amazon Connect, see Set up pre-built integrations in the Amazon Connect Administrator Guide.
+ */ +export class AppIntegrations extends AppIntegrationsClient { + /** + *The Amazon AppIntegrations APIs are in preview release and are subject to change.
+ *Creates an EventIntegration, given a specified name, description, and a reference to an + * Amazon Eventbridge bus in your account and a partner event source that will push events to that bus. No + * objects are created in the your account, only metadata that is persisted on the EventIntegration + * control plane.
+ */ + public createEventIntegration( + args: CreateEventIntegrationCommandInput, + options?: __HttpHandlerOptions + ): PromiseThe Amazon AppIntegrations APIs are in preview release and are subject to change.
+ *Deletes the specified existing event integration. If the event integration is associated + * with clients, the request is rejected.
+ */ + public deleteEventIntegration( + args: DeleteEventIntegrationCommandInput, + options?: __HttpHandlerOptions + ): PromiseThe Amazon AppIntegrations APIs are in preview release and are subject to change.
+ *Return information about the event integration.
+ */ + public getEventIntegration( + args: GetEventIntegrationCommandInput, + options?: __HttpHandlerOptions + ): PromiseThe Amazon AppIntegrations APIs are in preview release and are subject to change.
+ *Returns a paginated list of event integration associations in the account.
+ */ + public listEventIntegrationAssociations( + args: ListEventIntegrationAssociationsCommandInput, + options?: __HttpHandlerOptions + ): PromiseThe Amazon AppIntegrations APIs are in preview release and are subject to change.
+ *Returns a paginated list of event integrations in the account.
+ */ + public listEventIntegrations( + args: ListEventIntegrationsCommandInput, + options?: __HttpHandlerOptions + ): PromiseThe Amazon AppIntegrations APIs are in preview release and are subject to change.
+ *Lists the tags for the specified resource.
+ */ + public listTagsForResource( + args: ListTagsForResourceCommandInput, + options?: __HttpHandlerOptions + ): PromiseThe Amazon AppIntegrations APIs are in preview release and are subject to change.
+ *Adds the specified tags to the specified resource.
+ */ + public tagResource(args: TagResourceCommandInput, options?: __HttpHandlerOptions): PromiseThe Amazon AppIntegrations APIs are in preview release and are subject to change.
+ *Removes the specified tags from the specified resource.
+ */ + public untagResource( + args: UntagResourceCommandInput, + options?: __HttpHandlerOptions + ): PromiseThe Amazon AppIntegrations APIs are in preview release and are subject to change.
+ *Updates the description of an event integration.
+ */ + public updateEventIntegration( + args: UpdateEventIntegrationCommandInput, + options?: __HttpHandlerOptions + ): PromiseThe Amazon AppIntegrations APIs are in preview release and are subject to change.
+ * + *The Amazon AppIntegrations service enables you to configure and reuse connections to external applications.
+ *For information about how you can use external applications with Amazon Connect, see Set up pre-built integrations in the Amazon Connect Administrator Guide.
+ */ +export class AppIntegrationsClient extends __Client< + __HttpHandlerOptions, + ServiceInputTypes, + ServiceOutputTypes, + AppIntegrationsClientResolvedConfig +> { + readonly config: AppIntegrationsClientResolvedConfig; + + constructor(configuration: AppIntegrationsClientConfig) { + let _config_0 = { + ...__ClientDefaultValues, + ...configuration, + }; + let _config_1 = resolveRegionConfig(_config_0); + let _config_2 = resolveEndpointsConfig(_config_1); + let _config_3 = resolveAwsAuthConfig(_config_2); + let _config_4 = resolveRetryConfig(_config_3); + let _config_5 = resolveUserAgentConfig(_config_4); + let _config_6 = resolveHostHeaderConfig(_config_5); + super(_config_6); + this.config = _config_6; + this.middlewareStack.use(getAwsAuthPlugin(this.config)); + this.middlewareStack.use(getRetryPlugin(this.config)); + this.middlewareStack.use(getUserAgentPlugin(this.config)); + this.middlewareStack.use(getContentLengthPlugin(this.config)); + this.middlewareStack.use(getHostHeaderPlugin(this.config)); + this.middlewareStack.use(getLoggerPlugin(this.config)); + } + + destroy(): void { + super.destroy(); + } +} diff --git a/clients/client-appintegrations/LICENSE b/clients/client-appintegrations/LICENSE new file mode 100644 index 000000000000..dd65ae06be7a --- /dev/null +++ b/clients/client-appintegrations/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-2020 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-appintegrations/README.md b/clients/client-appintegrations/README.md new file mode 100644 index 000000000000..dd1d65f24024 --- /dev/null +++ b/clients/client-appintegrations/README.md @@ -0,0 +1,6 @@ +# @aws-sdk/client-appintegrations + +[![NPM version](https://img.shields.io/npm/v/@aws-sdk/client-appintegrations/rc.svg)](https://www.npmjs.com/package/@aws-sdk/client-appintegrations) +[![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/client-appintegrations.svg)](https://www.npmjs.com/package/@aws-sdk/client-appintegrations) + +For SDK usage, please step to [SDK readme](https://github.com/aws/aws-sdk-js-v3). diff --git a/clients/client-appintegrations/commands/CreateEventIntegrationCommand.ts b/clients/client-appintegrations/commands/CreateEventIntegrationCommand.ts new file mode 100644 index 000000000000..753b4ce15497 --- /dev/null +++ b/clients/client-appintegrations/commands/CreateEventIntegrationCommand.ts @@ -0,0 +1,92 @@ +import { AppIntegrationsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AppIntegrationsClient"; +import { CreateEventIntegrationRequest, CreateEventIntegrationResponse } from "../models/models_0"; +import { + deserializeAws_restJson1CreateEventIntegrationCommand, + serializeAws_restJson1CreateEventIntegrationCommand, +} from "../protocols/Aws_restJson1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +export type CreateEventIntegrationCommandInput = CreateEventIntegrationRequest; +export type CreateEventIntegrationCommandOutput = CreateEventIntegrationResponse & __MetadataBearer; + +/** + *The Amazon AppIntegrations APIs are in preview release and are subject to change.
+ *Creates an EventIntegration, given a specified name, description, and a reference to an + * Amazon Eventbridge bus in your account and a partner event source that will push events to that bus. No + * objects are created in the your account, only metadata that is persisted on the EventIntegration + * control plane.
+ */ +export class CreateEventIntegrationCommand extends $Command< + CreateEventIntegrationCommandInput, + CreateEventIntegrationCommandOutput, + AppIntegrationsClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: CreateEventIntegrationCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStackThe Amazon AppIntegrations APIs are in preview release and are subject to change.
+ *Deletes the specified existing event integration. If the event integration is associated + * with clients, the request is rejected.
+ */ +export class DeleteEventIntegrationCommand extends $Command< + DeleteEventIntegrationCommandInput, + DeleteEventIntegrationCommandOutput, + AppIntegrationsClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DeleteEventIntegrationCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStackThe Amazon AppIntegrations APIs are in preview release and are subject to change.
+ *Return information about the event integration.
+ */ +export class GetEventIntegrationCommand extends $Command< + GetEventIntegrationCommandInput, + GetEventIntegrationCommandOutput, + AppIntegrationsClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetEventIntegrationCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStackThe Amazon AppIntegrations APIs are in preview release and are subject to change.
+ *Returns a paginated list of event integration associations in the account.
+ */ +export class ListEventIntegrationAssociationsCommand extends $Command< + ListEventIntegrationAssociationsCommandInput, + ListEventIntegrationAssociationsCommandOutput, + AppIntegrationsClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: ListEventIntegrationAssociationsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStackThe Amazon AppIntegrations APIs are in preview release and are subject to change.
+ *Returns a paginated list of event integrations in the account.
+ */ +export class ListEventIntegrationsCommand extends $Command< + ListEventIntegrationsCommandInput, + ListEventIntegrationsCommandOutput, + AppIntegrationsClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: ListEventIntegrationsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStackThe Amazon AppIntegrations APIs are in preview release and are subject to change.
+ *Lists the tags for the specified resource.
+ */ +export class ListTagsForResourceCommand extends $Command< + ListTagsForResourceCommandInput, + ListTagsForResourceCommandOutput, + AppIntegrationsClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: ListTagsForResourceCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStackThe Amazon AppIntegrations APIs are in preview release and are subject to change.
+ *Adds the specified tags to the specified resource.
+ */ +export class TagResourceCommand extends $Command< + TagResourceCommandInput, + TagResourceCommandOutput, + AppIntegrationsClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: TagResourceCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStackThe Amazon AppIntegrations APIs are in preview release and are subject to change.
+ *Removes the specified tags from the specified resource.
+ */ +export class UntagResourceCommand extends $Command< + UntagResourceCommandInput, + UntagResourceCommandOutput, + AppIntegrationsClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: UntagResourceCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack