From 7c6211922215b48db87c0068c34df4e8a029f669 Mon Sep 17 00:00:00 2001 From: awstools Date: Wed, 24 May 2023 18:14:08 +0000 Subject: [PATCH] feat(client-appsync): This release introduces AppSync Merged APIs, which provide the ability to compose multiple source APIs into a single federated/merged API. --- clients/client-appsync/README.md | 72 + clients/client-appsync/src/AppSync.ts | 207 +++ clients/client-appsync/src/AppSyncClient.ts | 51 + .../AssociateMergedGraphqlApiCommand.ts | 185 +++ .../AssociateSourceGraphqlApiCommand.ts | 185 +++ .../src/commands/CreateGraphqlApiCommand.ts | 7 + .../DisassociateMergedGraphqlApiCommand.ts | 170 +++ .../DisassociateSourceGraphqlApiCommand.ts | 170 +++ .../src/commands/GetGraphqlApiCommand.ts | 4 + .../GetSourceApiAssociationCommand.ts | 171 +++ .../src/commands/ListGraphqlApisCommand.ts | 6 + .../ListSourceApiAssociationsCommand.ts | 172 +++ .../commands/ListTypesByAssociationCommand.ts | 173 +++ .../src/commands/StartSchemaMergeCommand.ts | 161 +++ .../src/commands/UpdateGraphqlApiCommand.ts | 6 + .../UpdateSourceApiAssociationCommand.ts | 182 +++ clients/client-appsync/src/commands/index.ts | 9 + clients/client-appsync/src/models/models_0.ts | 680 ++++++++- .../src/protocols/Aws_restJson1.ts | 1007 +++++++++++++- codegen/sdk-codegen/aws-models/appsync.json | 1214 ++++++++++++++++- 20 files changed, 4678 insertions(+), 154 deletions(-) create mode 100644 clients/client-appsync/src/commands/AssociateMergedGraphqlApiCommand.ts create mode 100644 clients/client-appsync/src/commands/AssociateSourceGraphqlApiCommand.ts create mode 100644 clients/client-appsync/src/commands/DisassociateMergedGraphqlApiCommand.ts create mode 100644 clients/client-appsync/src/commands/DisassociateSourceGraphqlApiCommand.ts create mode 100644 clients/client-appsync/src/commands/GetSourceApiAssociationCommand.ts create mode 100644 clients/client-appsync/src/commands/ListSourceApiAssociationsCommand.ts create mode 100644 clients/client-appsync/src/commands/ListTypesByAssociationCommand.ts create mode 100644 clients/client-appsync/src/commands/StartSchemaMergeCommand.ts create mode 100644 clients/client-appsync/src/commands/UpdateSourceApiAssociationCommand.ts diff --git a/clients/client-appsync/README.md b/clients/client-appsync/README.md index b1b8c09c64c4..7d89439e9c1c 100644 --- a/clients/client-appsync/README.md +++ b/clients/client-appsync/README.md @@ -211,6 +211,22 @@ AssociateApi [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-appsync/classes/associateapicommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-appsync/interfaces/associateapicommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-appsync/interfaces/associateapicommandoutput.html) + +
+ +AssociateMergedGraphqlApi + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-appsync/classes/associatemergedgraphqlapicommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-appsync/interfaces/associatemergedgraphqlapicommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-appsync/interfaces/associatemergedgraphqlapicommandoutput.html) + +
+
+ +AssociateSourceGraphqlApi + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-appsync/classes/associatesourcegraphqlapicommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-appsync/interfaces/associatesourcegraphqlapicommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-appsync/interfaces/associatesourcegraphqlapicommandoutput.html) +
@@ -347,6 +363,22 @@ DisassociateApi [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-appsync/classes/disassociateapicommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-appsync/interfaces/disassociateapicommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-appsync/interfaces/disassociateapicommandoutput.html) +
+
+ +DisassociateMergedGraphqlApi + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-appsync/classes/disassociatemergedgraphqlapicommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-appsync/interfaces/disassociatemergedgraphqlapicommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-appsync/interfaces/disassociatemergedgraphqlapicommandoutput.html) + +
+
+ +DisassociateSourceGraphqlApi + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-appsync/classes/disassociatesourcegraphqlapicommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-appsync/interfaces/disassociatesourcegraphqlapicommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-appsync/interfaces/disassociatesourcegraphqlapicommandoutput.html) +
@@ -443,6 +475,14 @@ GetSchemaCreationStatus [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-appsync/classes/getschemacreationstatuscommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-appsync/interfaces/getschemacreationstatuscommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-appsync/interfaces/getschemacreationstatuscommandoutput.html) +
+
+ +GetSourceApiAssociation + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-appsync/classes/getsourceapiassociationcommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-appsync/interfaces/getsourceapiassociationcommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-appsync/interfaces/getsourceapiassociationcommandoutput.html) +
@@ -507,6 +547,14 @@ ListResolversByFunction [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-appsync/classes/listresolversbyfunctioncommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-appsync/interfaces/listresolversbyfunctioncommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-appsync/interfaces/listresolversbyfunctioncommandoutput.html) +
+
+ +ListSourceApiAssociations + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-appsync/classes/listsourceapiassociationscommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-appsync/interfaces/listsourceapiassociationscommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-appsync/interfaces/listsourceapiassociationscommandoutput.html) +
@@ -523,6 +571,14 @@ ListTypes [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-appsync/classes/listtypescommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-appsync/interfaces/listtypescommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-appsync/interfaces/listtypescommandoutput.html) +
+
+ +ListTypesByAssociation + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-appsync/classes/listtypesbyassociationcommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-appsync/interfaces/listtypesbyassociationcommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-appsync/interfaces/listtypesbyassociationcommandoutput.html) +
@@ -531,6 +587,14 @@ StartSchemaCreation [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-appsync/classes/startschemacreationcommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-appsync/interfaces/startschemacreationcommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-appsync/interfaces/startschemacreationcommandoutput.html) +
+
+ +StartSchemaMerge + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-appsync/classes/startschemamergecommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-appsync/interfaces/startschemamergecommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-appsync/interfaces/startschemamergecommandoutput.html) +
@@ -603,6 +667,14 @@ UpdateResolver [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-appsync/classes/updateresolvercommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-appsync/interfaces/updateresolvercommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-appsync/interfaces/updateresolvercommandoutput.html) +
+
+ +UpdateSourceApiAssociation + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-appsync/classes/updatesourceapiassociationcommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-appsync/interfaces/updatesourceapiassociationcommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-appsync/interfaces/updatesourceapiassociationcommandoutput.html) +
diff --git a/clients/client-appsync/src/AppSync.ts b/clients/client-appsync/src/AppSync.ts index 62ebb13fda47..e4370e0a9f0b 100644 --- a/clients/client-appsync/src/AppSync.ts +++ b/clients/client-appsync/src/AppSync.ts @@ -8,6 +8,16 @@ import { AssociateApiCommandInput, AssociateApiCommandOutput, } from "./commands/AssociateApiCommand"; +import { + AssociateMergedGraphqlApiCommand, + AssociateMergedGraphqlApiCommandInput, + AssociateMergedGraphqlApiCommandOutput, +} from "./commands/AssociateMergedGraphqlApiCommand"; +import { + AssociateSourceGraphqlApiCommand, + AssociateSourceGraphqlApiCommandInput, + AssociateSourceGraphqlApiCommandOutput, +} from "./commands/AssociateSourceGraphqlApiCommand"; import { CreateApiCacheCommand, CreateApiCacheCommandInput, @@ -85,6 +95,16 @@ import { DisassociateApiCommandInput, DisassociateApiCommandOutput, } from "./commands/DisassociateApiCommand"; +import { + DisassociateMergedGraphqlApiCommand, + DisassociateMergedGraphqlApiCommandInput, + DisassociateMergedGraphqlApiCommandOutput, +} from "./commands/DisassociateMergedGraphqlApiCommand"; +import { + DisassociateSourceGraphqlApiCommand, + DisassociateSourceGraphqlApiCommandInput, + DisassociateSourceGraphqlApiCommandOutput, +} from "./commands/DisassociateSourceGraphqlApiCommand"; import { EvaluateCodeCommand, EvaluateCodeCommandInput, @@ -133,6 +153,11 @@ import { GetSchemaCreationStatusCommandInput, GetSchemaCreationStatusCommandOutput, } from "./commands/GetSchemaCreationStatusCommand"; +import { + GetSourceApiAssociationCommand, + GetSourceApiAssociationCommandInput, + GetSourceApiAssociationCommandOutput, +} from "./commands/GetSourceApiAssociationCommand"; import { GetTypeCommand, GetTypeCommandInput, GetTypeCommandOutput } from "./commands/GetTypeCommand"; import { ListApiKeysCommand, ListApiKeysCommandInput, ListApiKeysCommandOutput } from "./commands/ListApiKeysCommand"; import { @@ -165,17 +190,32 @@ import { ListResolversCommandInput, ListResolversCommandOutput, } from "./commands/ListResolversCommand"; +import { + ListSourceApiAssociationsCommand, + ListSourceApiAssociationsCommandInput, + ListSourceApiAssociationsCommandOutput, +} from "./commands/ListSourceApiAssociationsCommand"; import { ListTagsForResourceCommand, ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput, } from "./commands/ListTagsForResourceCommand"; +import { + ListTypesByAssociationCommand, + ListTypesByAssociationCommandInput, + ListTypesByAssociationCommandOutput, +} from "./commands/ListTypesByAssociationCommand"; import { ListTypesCommand, ListTypesCommandInput, ListTypesCommandOutput } from "./commands/ListTypesCommand"; import { StartSchemaCreationCommand, StartSchemaCreationCommandInput, StartSchemaCreationCommandOutput, } from "./commands/StartSchemaCreationCommand"; +import { + StartSchemaMergeCommand, + StartSchemaMergeCommandInput, + StartSchemaMergeCommandOutput, +} from "./commands/StartSchemaMergeCommand"; import { TagResourceCommand, TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand"; import { UntagResourceCommand, @@ -217,10 +257,17 @@ import { UpdateResolverCommandInput, UpdateResolverCommandOutput, } from "./commands/UpdateResolverCommand"; +import { + UpdateSourceApiAssociationCommand, + UpdateSourceApiAssociationCommandInput, + UpdateSourceApiAssociationCommandOutput, +} from "./commands/UpdateSourceApiAssociationCommand"; import { UpdateTypeCommand, UpdateTypeCommandInput, UpdateTypeCommandOutput } from "./commands/UpdateTypeCommand"; const commands = { AssociateApiCommand, + AssociateMergedGraphqlApiCommand, + AssociateSourceGraphqlApiCommand, CreateApiCacheCommand, CreateApiKeyCommand, CreateDataSourceCommand, @@ -238,6 +285,8 @@ const commands = { DeleteResolverCommand, DeleteTypeCommand, DisassociateApiCommand, + DisassociateMergedGraphqlApiCommand, + DisassociateSourceGraphqlApiCommand, EvaluateCodeCommand, EvaluateMappingTemplateCommand, FlushApiCacheCommand, @@ -250,6 +299,7 @@ const commands = { GetIntrospectionSchemaCommand, GetResolverCommand, GetSchemaCreationStatusCommand, + GetSourceApiAssociationCommand, GetTypeCommand, ListApiKeysCommand, ListDataSourcesCommand, @@ -258,9 +308,12 @@ const commands = { ListGraphqlApisCommand, ListResolversCommand, ListResolversByFunctionCommand, + ListSourceApiAssociationsCommand, ListTagsForResourceCommand, ListTypesCommand, + ListTypesByAssociationCommand, StartSchemaCreationCommand, + StartSchemaMergeCommand, TagResourceCommand, UntagResourceCommand, UpdateApiCacheCommand, @@ -270,6 +323,7 @@ const commands = { UpdateFunctionCommand, UpdateGraphqlApiCommand, UpdateResolverCommand, + UpdateSourceApiAssociationCommand, UpdateTypeCommand, }; @@ -285,6 +339,40 @@ export interface AppSync { cb: (err: any, data?: AssociateApiCommandOutput) => void ): void; + /** + * @see {@link AssociateMergedGraphqlApiCommand} + */ + associateMergedGraphqlApi( + args: AssociateMergedGraphqlApiCommandInput, + options?: __HttpHandlerOptions + ): Promise; + associateMergedGraphqlApi( + args: AssociateMergedGraphqlApiCommandInput, + cb: (err: any, data?: AssociateMergedGraphqlApiCommandOutput) => void + ): void; + associateMergedGraphqlApi( + args: AssociateMergedGraphqlApiCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: AssociateMergedGraphqlApiCommandOutput) => void + ): void; + + /** + * @see {@link AssociateSourceGraphqlApiCommand} + */ + associateSourceGraphqlApi( + args: AssociateSourceGraphqlApiCommandInput, + options?: __HttpHandlerOptions + ): Promise; + associateSourceGraphqlApi( + args: AssociateSourceGraphqlApiCommandInput, + cb: (err: any, data?: AssociateSourceGraphqlApiCommandOutput) => void + ): void; + associateSourceGraphqlApi( + args: AssociateSourceGraphqlApiCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: AssociateSourceGraphqlApiCommandOutput) => void + ): void; + /** * @see {@link CreateApiCacheCommand} */ @@ -529,6 +617,40 @@ export interface AppSync { cb: (err: any, data?: DisassociateApiCommandOutput) => void ): void; + /** + * @see {@link DisassociateMergedGraphqlApiCommand} + */ + disassociateMergedGraphqlApi( + args: DisassociateMergedGraphqlApiCommandInput, + options?: __HttpHandlerOptions + ): Promise; + disassociateMergedGraphqlApi( + args: DisassociateMergedGraphqlApiCommandInput, + cb: (err: any, data?: DisassociateMergedGraphqlApiCommandOutput) => void + ): void; + disassociateMergedGraphqlApi( + args: DisassociateMergedGraphqlApiCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DisassociateMergedGraphqlApiCommandOutput) => void + ): void; + + /** + * @see {@link DisassociateSourceGraphqlApiCommand} + */ + disassociateSourceGraphqlApi( + args: DisassociateSourceGraphqlApiCommandInput, + options?: __HttpHandlerOptions + ): Promise; + disassociateSourceGraphqlApi( + args: DisassociateSourceGraphqlApiCommandInput, + cb: (err: any, data?: DisassociateSourceGraphqlApiCommandOutput) => void + ): void; + disassociateSourceGraphqlApi( + args: DisassociateSourceGraphqlApiCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DisassociateSourceGraphqlApiCommandOutput) => void + ): void; + /** * @see {@link EvaluateCodeCommand} */ @@ -685,6 +807,23 @@ export interface AppSync { cb: (err: any, data?: GetSchemaCreationStatusCommandOutput) => void ): void; + /** + * @see {@link GetSourceApiAssociationCommand} + */ + getSourceApiAssociation( + args: GetSourceApiAssociationCommandInput, + options?: __HttpHandlerOptions + ): Promise; + getSourceApiAssociation( + args: GetSourceApiAssociationCommandInput, + cb: (err: any, data?: GetSourceApiAssociationCommandOutput) => void + ): void; + getSourceApiAssociation( + args: GetSourceApiAssociationCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetSourceApiAssociationCommandOutput) => void + ): void; + /** * @see {@link GetTypeCommand} */ @@ -788,6 +927,23 @@ export interface AppSync { cb: (err: any, data?: ListResolversByFunctionCommandOutput) => void ): void; + /** + * @see {@link ListSourceApiAssociationsCommand} + */ + listSourceApiAssociations( + args: ListSourceApiAssociationsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + listSourceApiAssociations( + args: ListSourceApiAssociationsCommandInput, + cb: (err: any, data?: ListSourceApiAssociationsCommandOutput) => void + ): void; + listSourceApiAssociations( + args: ListSourceApiAssociationsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListSourceApiAssociationsCommandOutput) => void + ): void; + /** * @see {@link ListTagsForResourceCommand} */ @@ -816,6 +972,23 @@ export interface AppSync { cb: (err: any, data?: ListTypesCommandOutput) => void ): void; + /** + * @see {@link ListTypesByAssociationCommand} + */ + listTypesByAssociation( + args: ListTypesByAssociationCommandInput, + options?: __HttpHandlerOptions + ): Promise; + listTypesByAssociation( + args: ListTypesByAssociationCommandInput, + cb: (err: any, data?: ListTypesByAssociationCommandOutput) => void + ): void; + listTypesByAssociation( + args: ListTypesByAssociationCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListTypesByAssociationCommandOutput) => void + ): void; + /** * @see {@link StartSchemaCreationCommand} */ @@ -833,6 +1006,23 @@ export interface AppSync { cb: (err: any, data?: StartSchemaCreationCommandOutput) => void ): void; + /** + * @see {@link StartSchemaMergeCommand} + */ + startSchemaMerge( + args: StartSchemaMergeCommandInput, + options?: __HttpHandlerOptions + ): Promise; + startSchemaMerge( + args: StartSchemaMergeCommandInput, + cb: (err: any, data?: StartSchemaMergeCommandOutput) => void + ): void; + startSchemaMerge( + args: StartSchemaMergeCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: StartSchemaMergeCommandOutput) => void + ): void; + /** * @see {@link TagResourceCommand} */ @@ -959,6 +1149,23 @@ export interface AppSync { cb: (err: any, data?: UpdateResolverCommandOutput) => void ): void; + /** + * @see {@link UpdateSourceApiAssociationCommand} + */ + updateSourceApiAssociation( + args: UpdateSourceApiAssociationCommandInput, + options?: __HttpHandlerOptions + ): Promise; + updateSourceApiAssociation( + args: UpdateSourceApiAssociationCommandInput, + cb: (err: any, data?: UpdateSourceApiAssociationCommandOutput) => void + ): void; + updateSourceApiAssociation( + args: UpdateSourceApiAssociationCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateSourceApiAssociationCommandOutput) => void + ): void; + /** * @see {@link UpdateTypeCommand} */ diff --git a/clients/client-appsync/src/AppSyncClient.ts b/clients/client-appsync/src/AppSyncClient.ts index 0a0b9d3963b9..8610588973d9 100644 --- a/clients/client-appsync/src/AppSyncClient.ts +++ b/clients/client-appsync/src/AppSyncClient.ts @@ -52,6 +52,14 @@ import { } from "@smithy/types"; import { AssociateApiCommandInput, AssociateApiCommandOutput } from "./commands/AssociateApiCommand"; +import { + AssociateMergedGraphqlApiCommandInput, + AssociateMergedGraphqlApiCommandOutput, +} from "./commands/AssociateMergedGraphqlApiCommand"; +import { + AssociateSourceGraphqlApiCommandInput, + AssociateSourceGraphqlApiCommandOutput, +} from "./commands/AssociateSourceGraphqlApiCommand"; import { CreateApiCacheCommandInput, CreateApiCacheCommandOutput } from "./commands/CreateApiCacheCommand"; import { CreateApiKeyCommandInput, CreateApiKeyCommandOutput } from "./commands/CreateApiKeyCommand"; import { CreateDataSourceCommandInput, CreateDataSourceCommandOutput } from "./commands/CreateDataSourceCommand"; @@ -69,6 +77,14 @@ import { DeleteGraphqlApiCommandInput, DeleteGraphqlApiCommandOutput } from "./c import { DeleteResolverCommandInput, DeleteResolverCommandOutput } from "./commands/DeleteResolverCommand"; import { DeleteTypeCommandInput, DeleteTypeCommandOutput } from "./commands/DeleteTypeCommand"; import { DisassociateApiCommandInput, DisassociateApiCommandOutput } from "./commands/DisassociateApiCommand"; +import { + DisassociateMergedGraphqlApiCommandInput, + DisassociateMergedGraphqlApiCommandOutput, +} from "./commands/DisassociateMergedGraphqlApiCommand"; +import { + DisassociateSourceGraphqlApiCommandInput, + DisassociateSourceGraphqlApiCommandOutput, +} from "./commands/DisassociateSourceGraphqlApiCommand"; import { EvaluateCodeCommandInput, EvaluateCodeCommandOutput } from "./commands/EvaluateCodeCommand"; import { EvaluateMappingTemplateCommandInput, @@ -90,6 +106,10 @@ import { GetSchemaCreationStatusCommandInput, GetSchemaCreationStatusCommandOutput, } from "./commands/GetSchemaCreationStatusCommand"; +import { + GetSourceApiAssociationCommandInput, + GetSourceApiAssociationCommandOutput, +} from "./commands/GetSourceApiAssociationCommand"; import { GetTypeCommandInput, GetTypeCommandOutput } from "./commands/GetTypeCommand"; import { ListApiKeysCommandInput, ListApiKeysCommandOutput } from "./commands/ListApiKeysCommand"; import { ListDataSourcesCommandInput, ListDataSourcesCommandOutput } from "./commands/ListDataSourcesCommand"; @@ -101,15 +121,24 @@ import { ListResolversByFunctionCommandOutput, } from "./commands/ListResolversByFunctionCommand"; import { ListResolversCommandInput, ListResolversCommandOutput } from "./commands/ListResolversCommand"; +import { + ListSourceApiAssociationsCommandInput, + ListSourceApiAssociationsCommandOutput, +} from "./commands/ListSourceApiAssociationsCommand"; import { ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput, } from "./commands/ListTagsForResourceCommand"; +import { + ListTypesByAssociationCommandInput, + ListTypesByAssociationCommandOutput, +} from "./commands/ListTypesByAssociationCommand"; import { ListTypesCommandInput, ListTypesCommandOutput } from "./commands/ListTypesCommand"; import { StartSchemaCreationCommandInput, StartSchemaCreationCommandOutput, } from "./commands/StartSchemaCreationCommand"; +import { StartSchemaMergeCommandInput, StartSchemaMergeCommandOutput } from "./commands/StartSchemaMergeCommand"; import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand"; import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand"; import { UpdateApiCacheCommandInput, UpdateApiCacheCommandOutput } from "./commands/UpdateApiCacheCommand"; @@ -119,6 +148,10 @@ import { UpdateDomainNameCommandInput, UpdateDomainNameCommandOutput } from "./c import { UpdateFunctionCommandInput, UpdateFunctionCommandOutput } from "./commands/UpdateFunctionCommand"; import { UpdateGraphqlApiCommandInput, UpdateGraphqlApiCommandOutput } from "./commands/UpdateGraphqlApiCommand"; import { UpdateResolverCommandInput, UpdateResolverCommandOutput } from "./commands/UpdateResolverCommand"; +import { + UpdateSourceApiAssociationCommandInput, + UpdateSourceApiAssociationCommandOutput, +} from "./commands/UpdateSourceApiAssociationCommand"; import { UpdateTypeCommandInput, UpdateTypeCommandOutput } from "./commands/UpdateTypeCommand"; import { ClientInputEndpointParameters, @@ -135,6 +168,8 @@ export { __Client }; */ export type ServiceInputTypes = | AssociateApiCommandInput + | AssociateMergedGraphqlApiCommandInput + | AssociateSourceGraphqlApiCommandInput | CreateApiCacheCommandInput | CreateApiKeyCommandInput | CreateDataSourceCommandInput @@ -152,6 +187,8 @@ export type ServiceInputTypes = | DeleteResolverCommandInput | DeleteTypeCommandInput | DisassociateApiCommandInput + | DisassociateMergedGraphqlApiCommandInput + | DisassociateSourceGraphqlApiCommandInput | EvaluateCodeCommandInput | EvaluateMappingTemplateCommandInput | FlushApiCacheCommandInput @@ -164,6 +201,7 @@ export type ServiceInputTypes = | GetIntrospectionSchemaCommandInput | GetResolverCommandInput | GetSchemaCreationStatusCommandInput + | GetSourceApiAssociationCommandInput | GetTypeCommandInput | ListApiKeysCommandInput | ListDataSourcesCommandInput @@ -172,9 +210,12 @@ export type ServiceInputTypes = | ListGraphqlApisCommandInput | ListResolversByFunctionCommandInput | ListResolversCommandInput + | ListSourceApiAssociationsCommandInput | ListTagsForResourceCommandInput + | ListTypesByAssociationCommandInput | ListTypesCommandInput | StartSchemaCreationCommandInput + | StartSchemaMergeCommandInput | TagResourceCommandInput | UntagResourceCommandInput | UpdateApiCacheCommandInput @@ -184,6 +225,7 @@ export type ServiceInputTypes = | UpdateFunctionCommandInput | UpdateGraphqlApiCommandInput | UpdateResolverCommandInput + | UpdateSourceApiAssociationCommandInput | UpdateTypeCommandInput; /** @@ -191,6 +233,8 @@ export type ServiceInputTypes = */ export type ServiceOutputTypes = | AssociateApiCommandOutput + | AssociateMergedGraphqlApiCommandOutput + | AssociateSourceGraphqlApiCommandOutput | CreateApiCacheCommandOutput | CreateApiKeyCommandOutput | CreateDataSourceCommandOutput @@ -208,6 +252,8 @@ export type ServiceOutputTypes = | DeleteResolverCommandOutput | DeleteTypeCommandOutput | DisassociateApiCommandOutput + | DisassociateMergedGraphqlApiCommandOutput + | DisassociateSourceGraphqlApiCommandOutput | EvaluateCodeCommandOutput | EvaluateMappingTemplateCommandOutput | FlushApiCacheCommandOutput @@ -220,6 +266,7 @@ export type ServiceOutputTypes = | GetIntrospectionSchemaCommandOutput | GetResolverCommandOutput | GetSchemaCreationStatusCommandOutput + | GetSourceApiAssociationCommandOutput | GetTypeCommandOutput | ListApiKeysCommandOutput | ListDataSourcesCommandOutput @@ -228,9 +275,12 @@ export type ServiceOutputTypes = | ListGraphqlApisCommandOutput | ListResolversByFunctionCommandOutput | ListResolversCommandOutput + | ListSourceApiAssociationsCommandOutput | ListTagsForResourceCommandOutput + | ListTypesByAssociationCommandOutput | ListTypesCommandOutput | StartSchemaCreationCommandOutput + | StartSchemaMergeCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput | UpdateApiCacheCommandOutput @@ -240,6 +290,7 @@ export type ServiceOutputTypes = | UpdateFunctionCommandOutput | UpdateGraphqlApiCommandOutput | UpdateResolverCommandOutput + | UpdateSourceApiAssociationCommandOutput | UpdateTypeCommandOutput; /** diff --git a/clients/client-appsync/src/commands/AssociateMergedGraphqlApiCommand.ts b/clients/client-appsync/src/commands/AssociateMergedGraphqlApiCommand.ts new file mode 100644 index 000000000000..bb6b0af75bd3 --- /dev/null +++ b/clients/client-appsync/src/commands/AssociateMergedGraphqlApiCommand.ts @@ -0,0 +1,185 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@aws-sdk/middleware-endpoint"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, +} from "@aws-sdk/types"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { SerdeContext as __SerdeContext } from "@smithy/types"; + +import { AppSyncClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AppSyncClient"; +import { AssociateMergedGraphqlApiRequest, AssociateMergedGraphqlApiResponse } from "../models/models_0"; +import { de_AssociateMergedGraphqlApiCommand, se_AssociateMergedGraphqlApiCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link AssociateMergedGraphqlApiCommand}. + */ +export interface AssociateMergedGraphqlApiCommandInput extends AssociateMergedGraphqlApiRequest {} +/** + * @public + * + * The output of {@link AssociateMergedGraphqlApiCommand}. + */ +export interface AssociateMergedGraphqlApiCommandOutput extends AssociateMergedGraphqlApiResponse, __MetadataBearer {} + +/** + * @public + *

Creates an association between a Merged API and source API using the source API's identifier.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { AppSyncClient, AssociateMergedGraphqlApiCommand } from "@aws-sdk/client-appsync"; // ES Modules import + * // const { AppSyncClient, AssociateMergedGraphqlApiCommand } = require("@aws-sdk/client-appsync"); // CommonJS import + * const client = new AppSyncClient(config); + * const input = { // AssociateMergedGraphqlApiRequest + * sourceApiIdentifier: "STRING_VALUE", // required + * mergedApiIdentifier: "STRING_VALUE", // required + * description: "STRING_VALUE", + * sourceApiAssociationConfig: { // SourceApiAssociationConfig + * mergeType: "MANUAL_MERGE" || "AUTO_MERGE", + * }, + * }; + * const command = new AssociateMergedGraphqlApiCommand(input); + * const response = await client.send(command); + * // { // AssociateMergedGraphqlApiResponse + * // sourceApiAssociation: { // SourceApiAssociation + * // associationId: "STRING_VALUE", + * // associationArn: "STRING_VALUE", + * // sourceApiId: "STRING_VALUE", + * // sourceApiArn: "STRING_VALUE", + * // mergedApiArn: "STRING_VALUE", + * // mergedApiId: "STRING_VALUE", + * // description: "STRING_VALUE", + * // sourceApiAssociationConfig: { // SourceApiAssociationConfig + * // mergeType: "MANUAL_MERGE" || "AUTO_MERGE", + * // }, + * // sourceApiAssociationStatus: "MERGE_SCHEDULED" || "MERGE_FAILED" || "MERGE_SUCCESS" || "MERGE_IN_PROGRESS" || "AUTO_MERGE_SCHEDULE_FAILED" || "DELETION_SCHEDULED" || "DELETION_IN_PROGRESS" || "DELETION_FAILED", + * // sourceApiAssociationStatusDetail: "STRING_VALUE", + * // lastSuccessfulMergeDate: new Date("TIMESTAMP"), + * // }, + * // }; + * + * ``` + * + * @param AssociateMergedGraphqlApiCommandInput - {@link AssociateMergedGraphqlApiCommandInput} + * @returns {@link AssociateMergedGraphqlApiCommandOutput} + * @see {@link AssociateMergedGraphqlApiCommandInput} for command's `input` shape. + * @see {@link AssociateMergedGraphqlApiCommandOutput} for command's `response` shape. + * @see {@link AppSyncClientResolvedConfig | config} for AppSyncClient's `config` shape. + * + * @throws {@link BadRequestException} (client fault) + *

The request is not well formed. For example, a value is invalid or a required field is + * missing. Check the field values, and then try again.

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

Another modification is in progress at this time and it must complete before you can + * make your change.

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

An internal AppSync error occurred. Try your request again.

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

The request exceeded a limit. Try your request again.

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

The resource specified in the request was not found. Check the resource, and then try + * again.

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

You aren't authorized to perform this operation.

+ * + * @throws {@link AppSyncServiceException} + *

Base exception class for all service exceptions from AppSync service.

+ * + */ +export class AssociateMergedGraphqlApiCommand extends $Command< + AssociateMergedGraphqlApiCommandInput, + AssociateMergedGraphqlApiCommandOutput, + AppSyncClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: AssociateMergedGraphqlApiCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: AppSyncClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, AssociateMergedGraphqlApiCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "AppSyncClient"; + const commandName = "AssociateMergedGraphqlApiCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: AssociateMergedGraphqlApiCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_AssociateMergedGraphqlApiCommand(input, context); + } + + /** + * @internal + */ + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return de_AssociateMergedGraphqlApiCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-appsync/src/commands/AssociateSourceGraphqlApiCommand.ts b/clients/client-appsync/src/commands/AssociateSourceGraphqlApiCommand.ts new file mode 100644 index 000000000000..5eb4e330cebe --- /dev/null +++ b/clients/client-appsync/src/commands/AssociateSourceGraphqlApiCommand.ts @@ -0,0 +1,185 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@aws-sdk/middleware-endpoint"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, +} from "@aws-sdk/types"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { SerdeContext as __SerdeContext } from "@smithy/types"; + +import { AppSyncClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AppSyncClient"; +import { AssociateSourceGraphqlApiRequest, AssociateSourceGraphqlApiResponse } from "../models/models_0"; +import { de_AssociateSourceGraphqlApiCommand, se_AssociateSourceGraphqlApiCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link AssociateSourceGraphqlApiCommand}. + */ +export interface AssociateSourceGraphqlApiCommandInput extends AssociateSourceGraphqlApiRequest {} +/** + * @public + * + * The output of {@link AssociateSourceGraphqlApiCommand}. + */ +export interface AssociateSourceGraphqlApiCommandOutput extends AssociateSourceGraphqlApiResponse, __MetadataBearer {} + +/** + * @public + *

Creates an association between a Merged API and source API using the Merged API's identifier.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { AppSyncClient, AssociateSourceGraphqlApiCommand } from "@aws-sdk/client-appsync"; // ES Modules import + * // const { AppSyncClient, AssociateSourceGraphqlApiCommand } = require("@aws-sdk/client-appsync"); // CommonJS import + * const client = new AppSyncClient(config); + * const input = { // AssociateSourceGraphqlApiRequest + * mergedApiIdentifier: "STRING_VALUE", // required + * sourceApiIdentifier: "STRING_VALUE", // required + * description: "STRING_VALUE", + * sourceApiAssociationConfig: { // SourceApiAssociationConfig + * mergeType: "MANUAL_MERGE" || "AUTO_MERGE", + * }, + * }; + * const command = new AssociateSourceGraphqlApiCommand(input); + * const response = await client.send(command); + * // { // AssociateSourceGraphqlApiResponse + * // sourceApiAssociation: { // SourceApiAssociation + * // associationId: "STRING_VALUE", + * // associationArn: "STRING_VALUE", + * // sourceApiId: "STRING_VALUE", + * // sourceApiArn: "STRING_VALUE", + * // mergedApiArn: "STRING_VALUE", + * // mergedApiId: "STRING_VALUE", + * // description: "STRING_VALUE", + * // sourceApiAssociationConfig: { // SourceApiAssociationConfig + * // mergeType: "MANUAL_MERGE" || "AUTO_MERGE", + * // }, + * // sourceApiAssociationStatus: "MERGE_SCHEDULED" || "MERGE_FAILED" || "MERGE_SUCCESS" || "MERGE_IN_PROGRESS" || "AUTO_MERGE_SCHEDULE_FAILED" || "DELETION_SCHEDULED" || "DELETION_IN_PROGRESS" || "DELETION_FAILED", + * // sourceApiAssociationStatusDetail: "STRING_VALUE", + * // lastSuccessfulMergeDate: new Date("TIMESTAMP"), + * // }, + * // }; + * + * ``` + * + * @param AssociateSourceGraphqlApiCommandInput - {@link AssociateSourceGraphqlApiCommandInput} + * @returns {@link AssociateSourceGraphqlApiCommandOutput} + * @see {@link AssociateSourceGraphqlApiCommandInput} for command's `input` shape. + * @see {@link AssociateSourceGraphqlApiCommandOutput} for command's `response` shape. + * @see {@link AppSyncClientResolvedConfig | config} for AppSyncClient's `config` shape. + * + * @throws {@link BadRequestException} (client fault) + *

The request is not well formed. For example, a value is invalid or a required field is + * missing. Check the field values, and then try again.

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

Another modification is in progress at this time and it must complete before you can + * make your change.

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

An internal AppSync error occurred. Try your request again.

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

The request exceeded a limit. Try your request again.

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

The resource specified in the request was not found. Check the resource, and then try + * again.

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

You aren't authorized to perform this operation.

+ * + * @throws {@link AppSyncServiceException} + *

Base exception class for all service exceptions from AppSync service.

+ * + */ +export class AssociateSourceGraphqlApiCommand extends $Command< + AssociateSourceGraphqlApiCommandInput, + AssociateSourceGraphqlApiCommandOutput, + AppSyncClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: AssociateSourceGraphqlApiCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: AppSyncClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, AssociateSourceGraphqlApiCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "AppSyncClient"; + const commandName = "AssociateSourceGraphqlApiCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: AssociateSourceGraphqlApiCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_AssociateSourceGraphqlApiCommand(input, context); + } + + /** + * @internal + */ + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return de_AssociateSourceGraphqlApiCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-appsync/src/commands/CreateGraphqlApiCommand.ts b/clients/client-appsync/src/commands/CreateGraphqlApiCommand.ts index d6460cc661e8..492603c295e3 100644 --- a/clients/client-appsync/src/commands/CreateGraphqlApiCommand.ts +++ b/clients/client-appsync/src/commands/CreateGraphqlApiCommand.ts @@ -94,6 +94,9 @@ export interface CreateGraphqlApiCommandOutput extends CreateGraphqlApiResponse, * identityValidationExpression: "STRING_VALUE", * }, * visibility: "GLOBAL" || "PRIVATE", + * apiType: "GRAPHQL" || "MERGED", + * mergedApiExecutionRoleArn: "STRING_VALUE", + * ownerContact: "STRING_VALUE", * }; * const command = new CreateGraphqlApiCommand(input); * const response = await client.send(command); @@ -158,6 +161,10 @@ export interface CreateGraphqlApiCommandOutput extends CreateGraphqlApiResponse, * // "": "STRING_VALUE", * // }, * // visibility: "GLOBAL" || "PRIVATE", + * // apiType: "GRAPHQL" || "MERGED", + * // mergedApiExecutionRoleArn: "STRING_VALUE", + * // owner: "STRING_VALUE", + * // ownerContact: "STRING_VALUE", * // }, * // }; * diff --git a/clients/client-appsync/src/commands/DisassociateMergedGraphqlApiCommand.ts b/clients/client-appsync/src/commands/DisassociateMergedGraphqlApiCommand.ts new file mode 100644 index 000000000000..74245eeb543b --- /dev/null +++ b/clients/client-appsync/src/commands/DisassociateMergedGraphqlApiCommand.ts @@ -0,0 +1,170 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@aws-sdk/middleware-endpoint"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, +} from "@aws-sdk/types"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { SerdeContext as __SerdeContext } from "@smithy/types"; + +import { AppSyncClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AppSyncClient"; +import { DisassociateMergedGraphqlApiRequest, DisassociateMergedGraphqlApiResponse } from "../models/models_0"; +import { + de_DisassociateMergedGraphqlApiCommand, + se_DisassociateMergedGraphqlApiCommand, +} from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link DisassociateMergedGraphqlApiCommand}. + */ +export interface DisassociateMergedGraphqlApiCommandInput extends DisassociateMergedGraphqlApiRequest {} +/** + * @public + * + * The output of {@link DisassociateMergedGraphqlApiCommand}. + */ +export interface DisassociateMergedGraphqlApiCommandOutput + extends DisassociateMergedGraphqlApiResponse, + __MetadataBearer {} + +/** + * @public + *

Deletes an association between a Merged API and source API using the source API's identifier and the + * association ID.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { AppSyncClient, DisassociateMergedGraphqlApiCommand } from "@aws-sdk/client-appsync"; // ES Modules import + * // const { AppSyncClient, DisassociateMergedGraphqlApiCommand } = require("@aws-sdk/client-appsync"); // CommonJS import + * const client = new AppSyncClient(config); + * const input = { // DisassociateMergedGraphqlApiRequest + * sourceApiIdentifier: "STRING_VALUE", // required + * associationId: "STRING_VALUE", // required + * }; + * const command = new DisassociateMergedGraphqlApiCommand(input); + * const response = await client.send(command); + * // { // DisassociateMergedGraphqlApiResponse + * // sourceApiAssociationStatus: "MERGE_SCHEDULED" || "MERGE_FAILED" || "MERGE_SUCCESS" || "MERGE_IN_PROGRESS" || "AUTO_MERGE_SCHEDULE_FAILED" || "DELETION_SCHEDULED" || "DELETION_IN_PROGRESS" || "DELETION_FAILED", + * // }; + * + * ``` + * + * @param DisassociateMergedGraphqlApiCommandInput - {@link DisassociateMergedGraphqlApiCommandInput} + * @returns {@link DisassociateMergedGraphqlApiCommandOutput} + * @see {@link DisassociateMergedGraphqlApiCommandInput} for command's `input` shape. + * @see {@link DisassociateMergedGraphqlApiCommandOutput} for command's `response` shape. + * @see {@link AppSyncClientResolvedConfig | config} for AppSyncClient's `config` shape. + * + * @throws {@link BadRequestException} (client fault) + *

The request is not well formed. For example, a value is invalid or a required field is + * missing. Check the field values, and then try again.

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

Another modification is in progress at this time and it must complete before you can + * make your change.

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

An internal AppSync error occurred. Try your request again.

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

The resource specified in the request was not found. Check the resource, and then try + * again.

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

You aren't authorized to perform this operation.

+ * + * @throws {@link AppSyncServiceException} + *

Base exception class for all service exceptions from AppSync service.

+ * + */ +export class DisassociateMergedGraphqlApiCommand extends $Command< + DisassociateMergedGraphqlApiCommandInput, + DisassociateMergedGraphqlApiCommandOutput, + AppSyncClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: DisassociateMergedGraphqlApiCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: AppSyncClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, DisassociateMergedGraphqlApiCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "AppSyncClient"; + const commandName = "DisassociateMergedGraphqlApiCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: DisassociateMergedGraphqlApiCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_DisassociateMergedGraphqlApiCommand(input, context); + } + + /** + * @internal + */ + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return de_DisassociateMergedGraphqlApiCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-appsync/src/commands/DisassociateSourceGraphqlApiCommand.ts b/clients/client-appsync/src/commands/DisassociateSourceGraphqlApiCommand.ts new file mode 100644 index 000000000000..0d672b70cb30 --- /dev/null +++ b/clients/client-appsync/src/commands/DisassociateSourceGraphqlApiCommand.ts @@ -0,0 +1,170 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@aws-sdk/middleware-endpoint"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, +} from "@aws-sdk/types"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { SerdeContext as __SerdeContext } from "@smithy/types"; + +import { AppSyncClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AppSyncClient"; +import { DisassociateSourceGraphqlApiRequest, DisassociateSourceGraphqlApiResponse } from "../models/models_0"; +import { + de_DisassociateSourceGraphqlApiCommand, + se_DisassociateSourceGraphqlApiCommand, +} from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link DisassociateSourceGraphqlApiCommand}. + */ +export interface DisassociateSourceGraphqlApiCommandInput extends DisassociateSourceGraphqlApiRequest {} +/** + * @public + * + * The output of {@link DisassociateSourceGraphqlApiCommand}. + */ +export interface DisassociateSourceGraphqlApiCommandOutput + extends DisassociateSourceGraphqlApiResponse, + __MetadataBearer {} + +/** + * @public + *

Deletes an association between a Merged API and source API using the Merged API's identifier and the + * association ID.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { AppSyncClient, DisassociateSourceGraphqlApiCommand } from "@aws-sdk/client-appsync"; // ES Modules import + * // const { AppSyncClient, DisassociateSourceGraphqlApiCommand } = require("@aws-sdk/client-appsync"); // CommonJS import + * const client = new AppSyncClient(config); + * const input = { // DisassociateSourceGraphqlApiRequest + * mergedApiIdentifier: "STRING_VALUE", // required + * associationId: "STRING_VALUE", // required + * }; + * const command = new DisassociateSourceGraphqlApiCommand(input); + * const response = await client.send(command); + * // { // DisassociateSourceGraphqlApiResponse + * // sourceApiAssociationStatus: "MERGE_SCHEDULED" || "MERGE_FAILED" || "MERGE_SUCCESS" || "MERGE_IN_PROGRESS" || "AUTO_MERGE_SCHEDULE_FAILED" || "DELETION_SCHEDULED" || "DELETION_IN_PROGRESS" || "DELETION_FAILED", + * // }; + * + * ``` + * + * @param DisassociateSourceGraphqlApiCommandInput - {@link DisassociateSourceGraphqlApiCommandInput} + * @returns {@link DisassociateSourceGraphqlApiCommandOutput} + * @see {@link DisassociateSourceGraphqlApiCommandInput} for command's `input` shape. + * @see {@link DisassociateSourceGraphqlApiCommandOutput} for command's `response` shape. + * @see {@link AppSyncClientResolvedConfig | config} for AppSyncClient's `config` shape. + * + * @throws {@link BadRequestException} (client fault) + *

The request is not well formed. For example, a value is invalid or a required field is + * missing. Check the field values, and then try again.

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

Another modification is in progress at this time and it must complete before you can + * make your change.

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

An internal AppSync error occurred. Try your request again.

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

The resource specified in the request was not found. Check the resource, and then try + * again.

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

You aren't authorized to perform this operation.

+ * + * @throws {@link AppSyncServiceException} + *

Base exception class for all service exceptions from AppSync service.

+ * + */ +export class DisassociateSourceGraphqlApiCommand extends $Command< + DisassociateSourceGraphqlApiCommandInput, + DisassociateSourceGraphqlApiCommandOutput, + AppSyncClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: DisassociateSourceGraphqlApiCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: AppSyncClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, DisassociateSourceGraphqlApiCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "AppSyncClient"; + const commandName = "DisassociateSourceGraphqlApiCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: DisassociateSourceGraphqlApiCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_DisassociateSourceGraphqlApiCommand(input, context); + } + + /** + * @internal + */ + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return de_DisassociateSourceGraphqlApiCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-appsync/src/commands/GetGraphqlApiCommand.ts b/clients/client-appsync/src/commands/GetGraphqlApiCommand.ts index 861833975285..b975d83d8036 100644 --- a/clients/client-appsync/src/commands/GetGraphqlApiCommand.ts +++ b/clients/client-appsync/src/commands/GetGraphqlApiCommand.ts @@ -109,6 +109,10 @@ export interface GetGraphqlApiCommandOutput extends GetGraphqlApiResponse, __Met * // "": "STRING_VALUE", * // }, * // visibility: "GLOBAL" || "PRIVATE", + * // apiType: "GRAPHQL" || "MERGED", + * // mergedApiExecutionRoleArn: "STRING_VALUE", + * // owner: "STRING_VALUE", + * // ownerContact: "STRING_VALUE", * // }, * // }; * diff --git a/clients/client-appsync/src/commands/GetSourceApiAssociationCommand.ts b/clients/client-appsync/src/commands/GetSourceApiAssociationCommand.ts new file mode 100644 index 000000000000..0f572ab31867 --- /dev/null +++ b/clients/client-appsync/src/commands/GetSourceApiAssociationCommand.ts @@ -0,0 +1,171 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@aws-sdk/middleware-endpoint"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, +} from "@aws-sdk/types"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { SerdeContext as __SerdeContext } from "@smithy/types"; + +import { AppSyncClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AppSyncClient"; +import { GetSourceApiAssociationRequest, GetSourceApiAssociationResponse } from "../models/models_0"; +import { de_GetSourceApiAssociationCommand, se_GetSourceApiAssociationCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link GetSourceApiAssociationCommand}. + */ +export interface GetSourceApiAssociationCommandInput extends GetSourceApiAssociationRequest {} +/** + * @public + * + * The output of {@link GetSourceApiAssociationCommand}. + */ +export interface GetSourceApiAssociationCommandOutput extends GetSourceApiAssociationResponse, __MetadataBearer {} + +/** + * @public + *

Retrieves a SourceApiAssociation object.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { AppSyncClient, GetSourceApiAssociationCommand } from "@aws-sdk/client-appsync"; // ES Modules import + * // const { AppSyncClient, GetSourceApiAssociationCommand } = require("@aws-sdk/client-appsync"); // CommonJS import + * const client = new AppSyncClient(config); + * const input = { // GetSourceApiAssociationRequest + * mergedApiIdentifier: "STRING_VALUE", // required + * associationId: "STRING_VALUE", // required + * }; + * const command = new GetSourceApiAssociationCommand(input); + * const response = await client.send(command); + * // { // GetSourceApiAssociationResponse + * // sourceApiAssociation: { // SourceApiAssociation + * // associationId: "STRING_VALUE", + * // associationArn: "STRING_VALUE", + * // sourceApiId: "STRING_VALUE", + * // sourceApiArn: "STRING_VALUE", + * // mergedApiArn: "STRING_VALUE", + * // mergedApiId: "STRING_VALUE", + * // description: "STRING_VALUE", + * // sourceApiAssociationConfig: { // SourceApiAssociationConfig + * // mergeType: "MANUAL_MERGE" || "AUTO_MERGE", + * // }, + * // sourceApiAssociationStatus: "MERGE_SCHEDULED" || "MERGE_FAILED" || "MERGE_SUCCESS" || "MERGE_IN_PROGRESS" || "AUTO_MERGE_SCHEDULE_FAILED" || "DELETION_SCHEDULED" || "DELETION_IN_PROGRESS" || "DELETION_FAILED", + * // sourceApiAssociationStatusDetail: "STRING_VALUE", + * // lastSuccessfulMergeDate: new Date("TIMESTAMP"), + * // }, + * // }; + * + * ``` + * + * @param GetSourceApiAssociationCommandInput - {@link GetSourceApiAssociationCommandInput} + * @returns {@link GetSourceApiAssociationCommandOutput} + * @see {@link GetSourceApiAssociationCommandInput} for command's `input` shape. + * @see {@link GetSourceApiAssociationCommandOutput} for command's `response` shape. + * @see {@link AppSyncClientResolvedConfig | config} for AppSyncClient's `config` shape. + * + * @throws {@link BadRequestException} (client fault) + *

The request is not well formed. For example, a value is invalid or a required field is + * missing. Check the field values, and then try again.

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

An internal AppSync error occurred. Try your request again.

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

The resource specified in the request was not found. Check the resource, and then try + * again.

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

You aren't authorized to perform this operation.

+ * + * @throws {@link AppSyncServiceException} + *

Base exception class for all service exceptions from AppSync service.

+ * + */ +export class GetSourceApiAssociationCommand extends $Command< + GetSourceApiAssociationCommandInput, + GetSourceApiAssociationCommandOutput, + AppSyncClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: GetSourceApiAssociationCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: AppSyncClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, GetSourceApiAssociationCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "AppSyncClient"; + const commandName = "GetSourceApiAssociationCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: GetSourceApiAssociationCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_GetSourceApiAssociationCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_GetSourceApiAssociationCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-appsync/src/commands/ListGraphqlApisCommand.ts b/clients/client-appsync/src/commands/ListGraphqlApisCommand.ts index 1754dc3efe46..6a6775c51411 100644 --- a/clients/client-appsync/src/commands/ListGraphqlApisCommand.ts +++ b/clients/client-appsync/src/commands/ListGraphqlApisCommand.ts @@ -46,6 +46,8 @@ export interface ListGraphqlApisCommandOutput extends ListGraphqlApisResponse, _ * const input = { // ListGraphqlApisRequest * nextToken: "STRING_VALUE", * maxResults: Number("int"), + * apiType: "GRAPHQL" || "MERGED", + * owner: "CURRENT_ACCOUNT" || "OTHER_ACCOUNTS", * }; * const command = new ListGraphqlApisCommand(input); * const response = await client.send(command); @@ -111,6 +113,10 @@ export interface ListGraphqlApisCommandOutput extends ListGraphqlApisResponse, _ * // "": "STRING_VALUE", * // }, * // visibility: "GLOBAL" || "PRIVATE", + * // apiType: "GRAPHQL" || "MERGED", + * // mergedApiExecutionRoleArn: "STRING_VALUE", + * // owner: "STRING_VALUE", + * // ownerContact: "STRING_VALUE", * // }, * // ], * // nextToken: "STRING_VALUE", diff --git a/clients/client-appsync/src/commands/ListSourceApiAssociationsCommand.ts b/clients/client-appsync/src/commands/ListSourceApiAssociationsCommand.ts new file mode 100644 index 000000000000..292390b1c8f4 --- /dev/null +++ b/clients/client-appsync/src/commands/ListSourceApiAssociationsCommand.ts @@ -0,0 +1,172 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@aws-sdk/middleware-endpoint"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, +} from "@aws-sdk/types"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { SerdeContext as __SerdeContext } from "@smithy/types"; + +import { AppSyncClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AppSyncClient"; +import { ListSourceApiAssociationsRequest, ListSourceApiAssociationsResponse } from "../models/models_0"; +import { de_ListSourceApiAssociationsCommand, se_ListSourceApiAssociationsCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link ListSourceApiAssociationsCommand}. + */ +export interface ListSourceApiAssociationsCommandInput extends ListSourceApiAssociationsRequest {} +/** + * @public + * + * The output of {@link ListSourceApiAssociationsCommand}. + */ +export interface ListSourceApiAssociationsCommandOutput extends ListSourceApiAssociationsResponse, __MetadataBearer {} + +/** + * @public + *

Lists the SourceApiAssociationSummary data.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { AppSyncClient, ListSourceApiAssociationsCommand } from "@aws-sdk/client-appsync"; // ES Modules import + * // const { AppSyncClient, ListSourceApiAssociationsCommand } = require("@aws-sdk/client-appsync"); // CommonJS import + * const client = new AppSyncClient(config); + * const input = { // ListSourceApiAssociationsRequest + * apiId: "STRING_VALUE", // required + * nextToken: "STRING_VALUE", + * maxResults: Number("int"), + * }; + * const command = new ListSourceApiAssociationsCommand(input); + * const response = await client.send(command); + * // { // ListSourceApiAssociationsResponse + * // sourceApiAssociationSummaries: [ // SourceApiAssociationSummaryList + * // { // SourceApiAssociationSummary + * // associationId: "STRING_VALUE", + * // associationArn: "STRING_VALUE", + * // sourceApiId: "STRING_VALUE", + * // sourceApiArn: "STRING_VALUE", + * // mergedApiId: "STRING_VALUE", + * // mergedApiArn: "STRING_VALUE", + * // description: "STRING_VALUE", + * // }, + * // ], + * // nextToken: "STRING_VALUE", + * // }; + * + * ``` + * + * @param ListSourceApiAssociationsCommandInput - {@link ListSourceApiAssociationsCommandInput} + * @returns {@link ListSourceApiAssociationsCommandOutput} + * @see {@link ListSourceApiAssociationsCommandInput} for command's `input` shape. + * @see {@link ListSourceApiAssociationsCommandOutput} for command's `response` shape. + * @see {@link AppSyncClientResolvedConfig | config} for AppSyncClient's `config` shape. + * + * @throws {@link BadRequestException} (client fault) + *

The request is not well formed. For example, a value is invalid or a required field is + * missing. Check the field values, and then try again.

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

An internal AppSync error occurred. Try your request again.

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

The resource specified in the request was not found. Check the resource, and then try + * again.

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

You aren't authorized to perform this operation.

+ * + * @throws {@link AppSyncServiceException} + *

Base exception class for all service exceptions from AppSync service.

+ * + */ +export class ListSourceApiAssociationsCommand extends $Command< + ListSourceApiAssociationsCommandInput, + ListSourceApiAssociationsCommandOutput, + AppSyncClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: ListSourceApiAssociationsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: AppSyncClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, ListSourceApiAssociationsCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "AppSyncClient"; + const commandName = "ListSourceApiAssociationsCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: ListSourceApiAssociationsCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_ListSourceApiAssociationsCommand(input, context); + } + + /** + * @internal + */ + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return de_ListSourceApiAssociationsCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-appsync/src/commands/ListTypesByAssociationCommand.ts b/clients/client-appsync/src/commands/ListTypesByAssociationCommand.ts new file mode 100644 index 000000000000..9e89d6fbe54f --- /dev/null +++ b/clients/client-appsync/src/commands/ListTypesByAssociationCommand.ts @@ -0,0 +1,173 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@aws-sdk/middleware-endpoint"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, +} from "@aws-sdk/types"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { SerdeContext as __SerdeContext } from "@smithy/types"; + +import { AppSyncClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AppSyncClient"; +import { ListTypesByAssociationRequest, ListTypesByAssociationResponse } from "../models/models_0"; +import { de_ListTypesByAssociationCommand, se_ListTypesByAssociationCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link ListTypesByAssociationCommand}. + */ +export interface ListTypesByAssociationCommandInput extends ListTypesByAssociationRequest {} +/** + * @public + * + * The output of {@link ListTypesByAssociationCommand}. + */ +export interface ListTypesByAssociationCommandOutput extends ListTypesByAssociationResponse, __MetadataBearer {} + +/** + * @public + *

Lists Type objects by the source API association ID.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { AppSyncClient, ListTypesByAssociationCommand } from "@aws-sdk/client-appsync"; // ES Modules import + * // const { AppSyncClient, ListTypesByAssociationCommand } = require("@aws-sdk/client-appsync"); // CommonJS import + * const client = new AppSyncClient(config); + * const input = { // ListTypesByAssociationRequest + * mergedApiIdentifier: "STRING_VALUE", // required + * associationId: "STRING_VALUE", // required + * format: "SDL" || "JSON", // required + * nextToken: "STRING_VALUE", + * maxResults: Number("int"), + * }; + * const command = new ListTypesByAssociationCommand(input); + * const response = await client.send(command); + * // { // ListTypesByAssociationResponse + * // types: [ // TypeList + * // { // Type + * // name: "STRING_VALUE", + * // description: "STRING_VALUE", + * // arn: "STRING_VALUE", + * // definition: "STRING_VALUE", + * // format: "SDL" || "JSON", + * // }, + * // ], + * // nextToken: "STRING_VALUE", + * // }; + * + * ``` + * + * @param ListTypesByAssociationCommandInput - {@link ListTypesByAssociationCommandInput} + * @returns {@link ListTypesByAssociationCommandOutput} + * @see {@link ListTypesByAssociationCommandInput} for command's `input` shape. + * @see {@link ListTypesByAssociationCommandOutput} for command's `response` shape. + * @see {@link AppSyncClientResolvedConfig | config} for AppSyncClient's `config` shape. + * + * @throws {@link BadRequestException} (client fault) + *

The request is not well formed. For example, a value is invalid or a required field is + * missing. Check the field values, and then try again.

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

Another modification is in progress at this time and it must complete before you can + * make your change.

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

An internal AppSync error occurred. Try your request again.

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

The resource specified in the request was not found. Check the resource, and then try + * again.

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

You aren't authorized to perform this operation.

+ * + * @throws {@link AppSyncServiceException} + *

Base exception class for all service exceptions from AppSync service.

+ * + */ +export class ListTypesByAssociationCommand extends $Command< + ListTypesByAssociationCommandInput, + ListTypesByAssociationCommandOutput, + AppSyncClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: ListTypesByAssociationCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: AppSyncClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, ListTypesByAssociationCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "AppSyncClient"; + const commandName = "ListTypesByAssociationCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: ListTypesByAssociationCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_ListTypesByAssociationCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_ListTypesByAssociationCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-appsync/src/commands/StartSchemaMergeCommand.ts b/clients/client-appsync/src/commands/StartSchemaMergeCommand.ts new file mode 100644 index 000000000000..1bd91f4ceacb --- /dev/null +++ b/clients/client-appsync/src/commands/StartSchemaMergeCommand.ts @@ -0,0 +1,161 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@aws-sdk/middleware-endpoint"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, +} from "@aws-sdk/types"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { SerdeContext as __SerdeContext } from "@smithy/types"; + +import { AppSyncClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AppSyncClient"; +import { StartSchemaMergeRequest, StartSchemaMergeResponse } from "../models/models_0"; +import { de_StartSchemaMergeCommand, se_StartSchemaMergeCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link StartSchemaMergeCommand}. + */ +export interface StartSchemaMergeCommandInput extends StartSchemaMergeRequest {} +/** + * @public + * + * The output of {@link StartSchemaMergeCommand}. + */ +export interface StartSchemaMergeCommandOutput extends StartSchemaMergeResponse, __MetadataBearer {} + +/** + * @public + *

Initiates a merge operation. Returns a status that shows the result of the merge operation.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { AppSyncClient, StartSchemaMergeCommand } from "@aws-sdk/client-appsync"; // ES Modules import + * // const { AppSyncClient, StartSchemaMergeCommand } = require("@aws-sdk/client-appsync"); // CommonJS import + * const client = new AppSyncClient(config); + * const input = { // StartSchemaMergeRequest + * associationId: "STRING_VALUE", // required + * mergedApiIdentifier: "STRING_VALUE", // required + * }; + * const command = new StartSchemaMergeCommand(input); + * const response = await client.send(command); + * // { // StartSchemaMergeResponse + * // sourceApiAssociationStatus: "MERGE_SCHEDULED" || "MERGE_FAILED" || "MERGE_SUCCESS" || "MERGE_IN_PROGRESS" || "AUTO_MERGE_SCHEDULE_FAILED" || "DELETION_SCHEDULED" || "DELETION_IN_PROGRESS" || "DELETION_FAILED", + * // }; + * + * ``` + * + * @param StartSchemaMergeCommandInput - {@link StartSchemaMergeCommandInput} + * @returns {@link StartSchemaMergeCommandOutput} + * @see {@link StartSchemaMergeCommandInput} for command's `input` shape. + * @see {@link StartSchemaMergeCommandOutput} for command's `response` shape. + * @see {@link AppSyncClientResolvedConfig | config} for AppSyncClient's `config` shape. + * + * @throws {@link BadRequestException} (client fault) + *

The request is not well formed. For example, a value is invalid or a required field is + * missing. Check the field values, and then try again.

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

Another modification is in progress at this time and it must complete before you can + * make your change.

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

An internal AppSync error occurred. Try your request again.

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

The resource specified in the request was not found. Check the resource, and then try + * again.

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

You aren't authorized to perform this operation.

+ * + * @throws {@link AppSyncServiceException} + *

Base exception class for all service exceptions from AppSync service.

+ * + */ +export class StartSchemaMergeCommand extends $Command< + StartSchemaMergeCommandInput, + StartSchemaMergeCommandOutput, + AppSyncClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: StartSchemaMergeCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: AppSyncClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, StartSchemaMergeCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "AppSyncClient"; + const commandName = "StartSchemaMergeCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: StartSchemaMergeCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_StartSchemaMergeCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_StartSchemaMergeCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-appsync/src/commands/UpdateGraphqlApiCommand.ts b/clients/client-appsync/src/commands/UpdateGraphqlApiCommand.ts index 2679a03fa0f6..afc83af2411d 100644 --- a/clients/client-appsync/src/commands/UpdateGraphqlApiCommand.ts +++ b/clients/client-appsync/src/commands/UpdateGraphqlApiCommand.ts @@ -91,6 +91,8 @@ export interface UpdateGraphqlApiCommandOutput extends UpdateGraphqlApiResponse, * authorizerUri: "STRING_VALUE", // required * identityValidationExpression: "STRING_VALUE", * }, + * mergedApiExecutionRoleArn: "STRING_VALUE", + * ownerContact: "STRING_VALUE", * }; * const command = new UpdateGraphqlApiCommand(input); * const response = await client.send(command); @@ -155,6 +157,10 @@ export interface UpdateGraphqlApiCommandOutput extends UpdateGraphqlApiResponse, * // "": "STRING_VALUE", * // }, * // visibility: "GLOBAL" || "PRIVATE", + * // apiType: "GRAPHQL" || "MERGED", + * // mergedApiExecutionRoleArn: "STRING_VALUE", + * // owner: "STRING_VALUE", + * // ownerContact: "STRING_VALUE", * // }, * // }; * diff --git a/clients/client-appsync/src/commands/UpdateSourceApiAssociationCommand.ts b/clients/client-appsync/src/commands/UpdateSourceApiAssociationCommand.ts new file mode 100644 index 000000000000..808888e262ff --- /dev/null +++ b/clients/client-appsync/src/commands/UpdateSourceApiAssociationCommand.ts @@ -0,0 +1,182 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@aws-sdk/middleware-endpoint"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, +} from "@aws-sdk/types"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { SerdeContext as __SerdeContext } from "@smithy/types"; + +import { AppSyncClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AppSyncClient"; +import { UpdateSourceApiAssociationRequest, UpdateSourceApiAssociationResponse } from "../models/models_0"; +import { de_UpdateSourceApiAssociationCommand, se_UpdateSourceApiAssociationCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link UpdateSourceApiAssociationCommand}. + */ +export interface UpdateSourceApiAssociationCommandInput extends UpdateSourceApiAssociationRequest {} +/** + * @public + * + * The output of {@link UpdateSourceApiAssociationCommand}. + */ +export interface UpdateSourceApiAssociationCommandOutput extends UpdateSourceApiAssociationResponse, __MetadataBearer {} + +/** + * @public + *

Updates some of the configuration choices of a particular source API association.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { AppSyncClient, UpdateSourceApiAssociationCommand } from "@aws-sdk/client-appsync"; // ES Modules import + * // const { AppSyncClient, UpdateSourceApiAssociationCommand } = require("@aws-sdk/client-appsync"); // CommonJS import + * const client = new AppSyncClient(config); + * const input = { // UpdateSourceApiAssociationRequest + * associationId: "STRING_VALUE", // required + * mergedApiIdentifier: "STRING_VALUE", // required + * description: "STRING_VALUE", + * sourceApiAssociationConfig: { // SourceApiAssociationConfig + * mergeType: "MANUAL_MERGE" || "AUTO_MERGE", + * }, + * }; + * const command = new UpdateSourceApiAssociationCommand(input); + * const response = await client.send(command); + * // { // UpdateSourceApiAssociationResponse + * // sourceApiAssociation: { // SourceApiAssociation + * // associationId: "STRING_VALUE", + * // associationArn: "STRING_VALUE", + * // sourceApiId: "STRING_VALUE", + * // sourceApiArn: "STRING_VALUE", + * // mergedApiArn: "STRING_VALUE", + * // mergedApiId: "STRING_VALUE", + * // description: "STRING_VALUE", + * // sourceApiAssociationConfig: { // SourceApiAssociationConfig + * // mergeType: "MANUAL_MERGE" || "AUTO_MERGE", + * // }, + * // sourceApiAssociationStatus: "MERGE_SCHEDULED" || "MERGE_FAILED" || "MERGE_SUCCESS" || "MERGE_IN_PROGRESS" || "AUTO_MERGE_SCHEDULE_FAILED" || "DELETION_SCHEDULED" || "DELETION_IN_PROGRESS" || "DELETION_FAILED", + * // sourceApiAssociationStatusDetail: "STRING_VALUE", + * // lastSuccessfulMergeDate: new Date("TIMESTAMP"), + * // }, + * // }; + * + * ``` + * + * @param UpdateSourceApiAssociationCommandInput - {@link UpdateSourceApiAssociationCommandInput} + * @returns {@link UpdateSourceApiAssociationCommandOutput} + * @see {@link UpdateSourceApiAssociationCommandInput} for command's `input` shape. + * @see {@link UpdateSourceApiAssociationCommandOutput} for command's `response` shape. + * @see {@link AppSyncClientResolvedConfig | config} for AppSyncClient's `config` shape. + * + * @throws {@link BadRequestException} (client fault) + *

The request is not well formed. For example, a value is invalid or a required field is + * missing. Check the field values, and then try again.

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

Another modification is in progress at this time and it must complete before you can + * make your change.

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

An internal AppSync error occurred. Try your request again.

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

The resource specified in the request was not found. Check the resource, and then try + * again.

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

You aren't authorized to perform this operation.

+ * + * @throws {@link AppSyncServiceException} + *

Base exception class for all service exceptions from AppSync service.

+ * + */ +export class UpdateSourceApiAssociationCommand extends $Command< + UpdateSourceApiAssociationCommandInput, + UpdateSourceApiAssociationCommandOutput, + AppSyncClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: UpdateSourceApiAssociationCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: AppSyncClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, UpdateSourceApiAssociationCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "AppSyncClient"; + const commandName = "UpdateSourceApiAssociationCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: UpdateSourceApiAssociationCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_UpdateSourceApiAssociationCommand(input, context); + } + + /** + * @internal + */ + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return de_UpdateSourceApiAssociationCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-appsync/src/commands/index.ts b/clients/client-appsync/src/commands/index.ts index cc7a59425863..fd8a1b0e2bd2 100644 --- a/clients/client-appsync/src/commands/index.ts +++ b/clients/client-appsync/src/commands/index.ts @@ -1,5 +1,7 @@ // smithy-typescript generated code export * from "./AssociateApiCommand"; +export * from "./AssociateMergedGraphqlApiCommand"; +export * from "./AssociateSourceGraphqlApiCommand"; export * from "./CreateApiCacheCommand"; export * from "./CreateApiKeyCommand"; export * from "./CreateDataSourceCommand"; @@ -17,6 +19,8 @@ export * from "./DeleteGraphqlApiCommand"; export * from "./DeleteResolverCommand"; export * from "./DeleteTypeCommand"; export * from "./DisassociateApiCommand"; +export * from "./DisassociateMergedGraphqlApiCommand"; +export * from "./DisassociateSourceGraphqlApiCommand"; export * from "./EvaluateCodeCommand"; export * from "./EvaluateMappingTemplateCommand"; export * from "./FlushApiCacheCommand"; @@ -29,6 +33,7 @@ export * from "./GetGraphqlApiCommand"; export * from "./GetIntrospectionSchemaCommand"; export * from "./GetResolverCommand"; export * from "./GetSchemaCreationStatusCommand"; +export * from "./GetSourceApiAssociationCommand"; export * from "./GetTypeCommand"; export * from "./ListApiKeysCommand"; export * from "./ListDataSourcesCommand"; @@ -37,9 +42,12 @@ export * from "./ListFunctionsCommand"; export * from "./ListGraphqlApisCommand"; export * from "./ListResolversByFunctionCommand"; export * from "./ListResolversCommand"; +export * from "./ListSourceApiAssociationsCommand"; export * from "./ListTagsForResourceCommand"; +export * from "./ListTypesByAssociationCommand"; export * from "./ListTypesCommand"; export * from "./StartSchemaCreationCommand"; +export * from "./StartSchemaMergeCommand"; export * from "./TagResourceCommand"; export * from "./UntagResourceCommand"; export * from "./UpdateApiCacheCommand"; @@ -49,4 +57,5 @@ export * from "./UpdateDomainNameCommand"; export * from "./UpdateFunctionCommand"; export * from "./UpdateGraphqlApiCommand"; export * from "./UpdateResolverCommand"; +export * from "./UpdateSourceApiAssociationCommand"; export * from "./UpdateTypeCommand"; diff --git a/clients/client-appsync/src/models/models_0.ts b/clients/client-appsync/src/models/models_0.ts index e2438b616829..3b7efe013750 100644 --- a/clients/client-appsync/src/models/models_0.ts +++ b/clients/client-appsync/src/models/models_0.ts @@ -785,6 +785,259 @@ export class NotFoundException extends __BaseException { } } +/** + * @public + * @enum + */ +export const MergeType = { + AUTO_MERGE: "AUTO_MERGE", + MANUAL_MERGE: "MANUAL_MERGE", +} as const; + +/** + * @public + */ +export type MergeType = (typeof MergeType)[keyof typeof MergeType]; + +/** + * @public + *

Describes properties used to specify configurations related to a source API.

+ */ +export interface SourceApiAssociationConfig { + /** + *

The property that indicates which merging option is enabled in the source API association.

+ *

Valid merge types are MANUAL_MERGE (default) and AUTO_MERGE. Manual merges are the + * default behavior and require the user to trigger any changes from the source APIs to the merged API manually. + * Auto merges subscribe the merged API to the changes performed on the source APIs so that any change in the + * source APIs are also made to the merged API. Auto merges use MergedApiExecutionRoleArn to perform + * merge operations.

+ */ + mergeType?: MergeType | string; +} + +/** + * @public + */ +export interface AssociateMergedGraphqlApiRequest { + /** + *

The identifier of the AppSync Source API. This is generated by the AppSync service. In most cases, source + * APIs (especially in your account) only require the API ID value or ARN of the source API. However, source APIs + * from other accounts (cross-account use cases) strictly require the full resource ARN of the source API.

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

The identifier of the AppSync Merged API. This is generated by the AppSync service. In most cases, Merged APIs (especially in your account) only require the API ID value or ARN of the merged API. However, Merged APIs in other accounts (cross-account use cases) strictly require the full resource ARN of the merged API.

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

The description field.

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

The SourceApiAssociationConfig object data.

+ */ + sourceApiAssociationConfig?: SourceApiAssociationConfig; +} + +/** + * @public + * @enum + */ +export const SourceApiAssociationStatus = { + AUTO_MERGE_SCHEDULE_FAILED: "AUTO_MERGE_SCHEDULE_FAILED", + DELETION_FAILED: "DELETION_FAILED", + DELETION_IN_PROGRESS: "DELETION_IN_PROGRESS", + DELETION_SCHEDULED: "DELETION_SCHEDULED", + MERGE_FAILED: "MERGE_FAILED", + MERGE_IN_PROGRESS: "MERGE_IN_PROGRESS", + MERGE_SCHEDULED: "MERGE_SCHEDULED", + MERGE_SUCCESS: "MERGE_SUCCESS", +} as const; + +/** + * @public + */ +export type SourceApiAssociationStatus = (typeof SourceApiAssociationStatus)[keyof typeof SourceApiAssociationStatus]; + +/** + * @public + *

Describes the configuration of a source API. A source API is a GraphQL API that is linked to a merged API. + * There can be multiple source APIs attached to each merged API. + * When linked to a merged API, the source API's schema, data sources, and resolvers will be combined with other linked source API data to form a new, singular API. + *

+ *

Source APIs can originate from your account or from other accounts via Amazon Web Services Resource Access Manager. For more + * information about sharing resources from other accounts, see What is Amazon Web Services Resource Access + * Manager? in the Amazon Web Services Resource Access Manager guide.

+ */ +export interface SourceApiAssociation { + /** + *

The ID generated by the AppSync service for the source API association.

+ */ + associationId?: string; + + /** + *

The Amazon Resource Name (ARN) of the source API association.

+ */ + associationArn?: string; + + /** + *

The ID of the AppSync source API.

+ */ + sourceApiId?: string; + + /** + *

The Amazon Resource Name (ARN) of the AppSync source API.

+ */ + sourceApiArn?: string; + + /** + *

The Amazon Resource Name (ARN) of the AppSync Merged API.

+ */ + mergedApiArn?: string; + + /** + *

The ID of the AppSync Merged API.

+ */ + mergedApiId?: string; + + /** + *

The description field.

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

The SourceApiAssociationConfig object data.

+ */ + sourceApiAssociationConfig?: SourceApiAssociationConfig; + + /** + *

The state of the source API association.

+ */ + sourceApiAssociationStatus?: SourceApiAssociationStatus | string; + + /** + *

The detailed message related to the current state of the source API association.

+ */ + sourceApiAssociationStatusDetail?: string; + + /** + *

The datetime value of the last successful merge of the source API association. The result will be in UTC + * format and your local time zone.

+ */ + lastSuccessfulMergeDate?: Date; +} + +/** + * @public + */ +export interface AssociateMergedGraphqlApiResponse { + /** + *

The SourceApiAssociation object data.

+ */ + sourceApiAssociation?: SourceApiAssociation; +} + +/** + * @public + *

Another modification is in progress at this time and it must complete before you can + * make your change.

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

The request exceeded a limit. Try your request again.

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

You aren't authorized to perform this operation.

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

The identifier of the AppSync Merged API. This is generated by the AppSync service. In most cases, Merged APIs (especially in your account) only require the API ID value or ARN of the merged API. However, Merged APIs in other accounts (cross-account use cases) strictly require the full resource ARN of the merged API.

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

The identifier of the AppSync Source API. This is generated by the AppSync service. In most cases, source + * APIs (especially in your account) only require the API ID value or ARN of the source API. However, source APIs + * from other accounts (cross-account use cases) strictly require the full resource ARN of the source API.

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

The description field.

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

The SourceApiAssociationConfig object data.

+ */ + sourceApiAssociationConfig?: SourceApiAssociationConfig; +} + +/** + * @public + */ +export interface AssociateSourceGraphqlApiResponse { + /** + *

The SourceApiAssociation object data.

+ */ + sourceApiAssociation?: SourceApiAssociation; +} + /** * @public * @enum @@ -837,27 +1090,6 @@ export interface AuthorizationConfig { awsIamConfig?: AwsIamConfig; } -/** - * @public - *

Another modification is in progress at this time and it must complete before you can - * make your change.

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

Represents the input of a CreateApiCache operation.

@@ -992,26 +1224,6 @@ export interface CreateApiCacheResponse { apiCache?: ApiCache; } -/** - * @public - *

You aren't authorized to perform this operation.

- */ -export class UnauthorizedException extends __BaseException { - readonly name: "UnauthorizedException" = "UnauthorizedException"; - readonly $fault: "client" = "client"; - /** - * @internal - */ - constructor(opts: __ExceptionOptionType) { - super({ - name: "UnauthorizedException", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, UnauthorizedException.prototype); - } -} - /** * @public */ @@ -1044,26 +1256,6 @@ export interface CreateApiKeyResponse { apiKey?: ApiKey; } -/** - * @public - *

The request exceeded a limit. Try your request again.

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

Describes a Delta Sync configuration.

@@ -1786,6 +1978,20 @@ export interface CreateFunctionResponse { functionConfiguration?: FunctionConfiguration; } +/** + * @public + * @enum + */ +export const GraphQLApiType = { + GRAPHQL: "GRAPHQL", + MERGED: "MERGED", +} as const; + +/** + * @public + */ +export type GraphQLApiType = (typeof GraphQLApiType)[keyof typeof GraphQLApiType]; + /** * @public * @enum @@ -1976,6 +2182,26 @@ export interface CreateGraphqlApiRequest { * once the API has been created.

*/ visibility?: GraphQLApiVisibility | string; + + /** + *

The value that indicates whether the GraphQL API is a standard API (GRAPHQL) or merged API + * (MERGED).

+ */ + apiType?: GraphQLApiType | string; + + /** + *

The Identity and Access Management service role ARN for a merged API. The AppSync + * service assumes this role on behalf of the Merged API to validate access to source APIs at runtime and to + * prompt the AUTO_MERGE to update the merged API endpoint with the source API changes + * automatically.

+ */ + mergedApiExecutionRoleArn?: string; + + /** + *

The owner contact information for an API resource.

+ *

This field accepts any string input with a length of 0 - 256 characters.

+ */ + ownerContact?: string; } /** @@ -2062,6 +2288,31 @@ export interface GraphqlApi { * once the API has been created.

*/ visibility?: GraphQLApiVisibility | string; + + /** + *

The value that indicates whether the GraphQL API is a standard API (GRAPHQL) or merged API + * (MERGED).

+ */ + apiType?: GraphQLApiType | string; + + /** + *

The Identity and Access Management service role ARN for a merged API. The AppSync + * service assumes this role on behalf of the Merged API to validate access to source APIs at runtime and to + * prompt the AUTO_MERGE to update the merged API endpoint with the source API changes + * automatically.

+ */ + mergedApiExecutionRoleArn?: string; + + /** + *

The account owner of the GraphQL API.

+ */ + owner?: string; + + /** + *

The owner contact information for an API resource.

+ *

This field accepts any string input with a length of 0 - 256 characters.

+ */ + ownerContact?: string; } /** @@ -2555,6 +2806,58 @@ export interface DisassociateApiRequest { */ export interface DisassociateApiResponse {} +/** + * @public + */ +export interface DisassociateMergedGraphqlApiRequest { + /** + *

The identifier of the AppSync Source API. This is generated by the AppSync service. In most cases, source + * APIs (especially in your account) only require the API ID value or ARN of the source API. However, source APIs + * from other accounts (cross-account use cases) strictly require the full resource ARN of the source API.

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

The ID generated by the AppSync service for the source API association.

+ */ + associationId: string | undefined; +} + +/** + * @public + */ +export interface DisassociateMergedGraphqlApiResponse { + /** + *

The state of the source API association.

+ */ + sourceApiAssociationStatus?: SourceApiAssociationStatus | string; +} + +/** + * @public + */ +export interface DisassociateSourceGraphqlApiRequest { + /** + *

The identifier of the AppSync Merged API. This is generated by the AppSync service. In most cases, Merged APIs (especially in your account) only require the API ID value or ARN of the merged API. However, Merged APIs in other accounts (cross-account use cases) strictly require the full resource ARN of the merged API.

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

The ID generated by the AppSync service for the source API association.

+ */ + associationId: string | undefined; +} + +/** + * @public + */ +export interface DisassociateSourceGraphqlApiResponse { + /** + *

The state of the source API association.

+ */ + sourceApiAssociationStatus?: SourceApiAssociationStatus | string; +} + /** * @public */ @@ -2961,6 +3264,31 @@ export interface GetSchemaCreationStatusResponse { details?: string; } +/** + * @public + */ +export interface GetSourceApiAssociationRequest { + /** + *

The identifier of the AppSync Merged API. This is generated by the AppSync service. In most cases, Merged APIs (especially in your account) only require the API ID value or ARN of the merged API. However, Merged APIs in other accounts (cross-account use cases) strictly require the full resource ARN of the merged API.

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

The ID generated by the AppSync service for the source API association.

+ */ + associationId: string | undefined; +} + +/** + * @public + */ +export interface GetSourceApiAssociationResponse { + /** + *

The SourceApiAssociation object data.

+ */ + sourceApiAssociation?: SourceApiAssociation; +} + /** * @public */ @@ -3070,7 +3398,8 @@ export interface ListDataSourcesResponse { */ export interface ListDomainNamesRequest { /** - *

The API token.

+ *

An identifier that was returned from the previous call to this operation, which you can use to return the + * next set of items in the list.

*/ nextToken?: string; @@ -3090,7 +3419,8 @@ export interface ListDomainNamesResponse { domainNameConfigs?: DomainNameConfig[]; /** - *

The API token.

+ *

An identifier that was returned from the previous call to this operation, which you can use to return the + * next set of items in the list.

*/ nextToken?: string; } @@ -3132,6 +3462,20 @@ export interface ListFunctionsResponse { nextToken?: string; } +/** + * @public + * @enum + */ +export const Ownership = { + CURRENT_ACCOUNT: "CURRENT_ACCOUNT", + OTHER_ACCOUNTS: "OTHER_ACCOUNTS", +} as const; + +/** + * @public + */ +export type Ownership = (typeof Ownership)[keyof typeof Ownership]; + /** * @public */ @@ -3146,6 +3490,17 @@ export interface ListGraphqlApisRequest { *

The maximum number of results that you want the request to return.

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

The value that indicates whether the GraphQL API is a standard API (GRAPHQL) or merged API + * (MERGED).

+ */ + apiType?: GraphQLApiType | string; + + /** + *

The account owner of the GraphQL API.

+ */ + owner?: Ownership | string; } /** @@ -3247,6 +3602,84 @@ export interface ListResolversByFunctionResponse { nextToken?: string; } +/** + * @public + */ +export interface ListSourceApiAssociationsRequest { + /** + *

The API ID.

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

An identifier that was returned from the previous call to this operation, which you can use to return the + * next set of items in the list.

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

The maximum number of results that you want the request to return.

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

Describes the ARNs and IDs of associations, Merged APIs, and source APIs.

+ */ +export interface SourceApiAssociationSummary { + /** + *

The ID generated by the AppSync service for the source API association.

+ */ + associationId?: string; + + /** + *

The Amazon Resource Name (ARN) of the source API association.

+ */ + associationArn?: string; + + /** + *

The ID of the AppSync source API.

+ */ + sourceApiId?: string; + + /** + *

The Amazon Resource Name (ARN) of the AppSync Source API.

+ */ + sourceApiArn?: string; + + /** + *

The ID of the AppSync Merged API.

+ */ + mergedApiId?: string; + + /** + *

The Amazon Resource Name (ARN) of the AppSync Merged API.

+ */ + mergedApiArn?: string; + + /** + *

The description field.

+ */ + description?: string; +} + +/** + * @public + */ +export interface ListSourceApiAssociationsResponse { + /** + *

The SourceApiAssociationSummary object data.

+ */ + sourceApiAssociationSummaries?: SourceApiAssociationSummary[]; + + /** + *

An identifier that was returned from the previous call to this operation, which you can use to return the + * next set of items in the list.

+ */ + nextToken?: string; +} + /** * @public */ @@ -3309,6 +3742,53 @@ export interface ListTypesResponse { nextToken?: string; } +/** + * @public + */ +export interface ListTypesByAssociationRequest { + /** + *

The identifier of the AppSync Merged API. This is generated by the AppSync service. In most cases, Merged APIs (especially in your account) only require the API ID value or ARN of the merged API. However, Merged APIs in other accounts (cross-account use cases) strictly require the full resource ARN of the merged API.

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

The ID generated by the AppSync service for the source API association.

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

The format type.

+ */ + format: TypeDefinitionFormat | string | undefined; + + /** + *

An identifier that was returned from the previous call to this operation, which you can use to return the + * next set of items in the list.

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

The maximum number of results that you want the request to return.

+ */ + maxResults?: number; +} + +/** + * @public + */ +export interface ListTypesByAssociationResponse { + /** + *

The Type objects.

+ */ + types?: Type[]; + + /** + *

An identifier that was returned from the previous call to this operation, which you can use to return the + * next set of items in the list.

+ */ + nextToken?: string; +} + /** * @public */ @@ -3335,6 +3815,31 @@ export interface StartSchemaCreationResponse { status?: SchemaStatus | string; } +/** + * @public + */ +export interface StartSchemaMergeRequest { + /** + *

The ID generated by the AppSync service for the source API association.

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

The identifier of the AppSync Merged API. This is generated by the AppSync service. In most cases, Merged APIs (especially in your account) only require the API ID value or ARN of the merged API. However, Merged APIs in other accounts (cross-account use cases) strictly require the full resource ARN of the merged API.

+ */ + mergedApiIdentifier: string | undefined; +} + +/** + * @public + */ +export interface StartSchemaMergeResponse { + /** + *

The state of the source API association.

+ */ + sourceApiAssociationStatus?: SourceApiAssociationStatus | string; +} + /** * @public */ @@ -3771,6 +4276,20 @@ export interface UpdateGraphqlApiRequest { *

Configuration for Lambda function authorization.

*/ lambdaAuthorizerConfig?: LambdaAuthorizerConfig; + + /** + *

The Identity and Access Management service role ARN for a merged API. The AppSync + * service assumes this role on behalf of the Merged API to validate access to source APIs at runtime and to + * prompt the AUTO_MERGE to update the merged API endpoint with the source API changes + * automatically.

+ */ + mergedApiExecutionRoleArn?: string; + + /** + *

The owner contact information for an API resource.

+ *

This field accepts any string input with a length of 0 - 256 characters.

+ */ + ownerContact?: string; } /** @@ -3887,6 +4406,41 @@ export interface UpdateResolverResponse { resolver?: Resolver; } +/** + * @public + */ +export interface UpdateSourceApiAssociationRequest { + /** + *

The ID generated by the AppSync service for the source API association.

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

The identifier of the AppSync Merged API. This is generated by the AppSync service. In most cases, Merged APIs (especially in your account) only require the API ID value or ARN of the merged API. However, Merged APIs in other accounts (cross-account use cases) strictly require the full resource ARN of the merged API.

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

The description field.

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

The SourceApiAssociationConfig object data.

+ */ + sourceApiAssociationConfig?: SourceApiAssociationConfig; +} + +/** + * @public + */ +export interface UpdateSourceApiAssociationResponse { + /** + *

The SourceApiAssociation object data.

+ */ + sourceApiAssociation?: SourceApiAssociation; +} + /** * @public */ diff --git a/clients/client-appsync/src/protocols/Aws_restJson1.ts b/clients/client-appsync/src/protocols/Aws_restJson1.ts index e7524d6722a0..d6245bd70393 100644 --- a/clients/client-appsync/src/protocols/Aws_restJson1.ts +++ b/clients/client-appsync/src/protocols/Aws_restJson1.ts @@ -3,10 +3,12 @@ import { _json, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, + expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, map, + parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, take, withBaseException, @@ -16,6 +18,14 @@ import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@s import { Endpoint as __Endpoint, SerdeContext as __SerdeContext } from "@smithy/types"; import { AssociateApiCommandInput, AssociateApiCommandOutput } from "../commands/AssociateApiCommand"; +import { + AssociateMergedGraphqlApiCommandInput, + AssociateMergedGraphqlApiCommandOutput, +} from "../commands/AssociateMergedGraphqlApiCommand"; +import { + AssociateSourceGraphqlApiCommandInput, + AssociateSourceGraphqlApiCommandOutput, +} from "../commands/AssociateSourceGraphqlApiCommand"; import { CreateApiCacheCommandInput, CreateApiCacheCommandOutput } from "../commands/CreateApiCacheCommand"; import { CreateApiKeyCommandInput, CreateApiKeyCommandOutput } from "../commands/CreateApiKeyCommand"; import { CreateDataSourceCommandInput, CreateDataSourceCommandOutput } from "../commands/CreateDataSourceCommand"; @@ -33,6 +43,14 @@ import { DeleteGraphqlApiCommandInput, DeleteGraphqlApiCommandOutput } from "../ import { DeleteResolverCommandInput, DeleteResolverCommandOutput } from "../commands/DeleteResolverCommand"; import { DeleteTypeCommandInput, DeleteTypeCommandOutput } from "../commands/DeleteTypeCommand"; import { DisassociateApiCommandInput, DisassociateApiCommandOutput } from "../commands/DisassociateApiCommand"; +import { + DisassociateMergedGraphqlApiCommandInput, + DisassociateMergedGraphqlApiCommandOutput, +} from "../commands/DisassociateMergedGraphqlApiCommand"; +import { + DisassociateSourceGraphqlApiCommandInput, + DisassociateSourceGraphqlApiCommandOutput, +} from "../commands/DisassociateSourceGraphqlApiCommand"; import { EvaluateCodeCommandInput, EvaluateCodeCommandOutput } from "../commands/EvaluateCodeCommand"; import { EvaluateMappingTemplateCommandInput, @@ -54,6 +72,10 @@ import { GetSchemaCreationStatusCommandInput, GetSchemaCreationStatusCommandOutput, } from "../commands/GetSchemaCreationStatusCommand"; +import { + GetSourceApiAssociationCommandInput, + GetSourceApiAssociationCommandOutput, +} from "../commands/GetSourceApiAssociationCommand"; import { GetTypeCommandInput, GetTypeCommandOutput } from "../commands/GetTypeCommand"; import { ListApiKeysCommandInput, ListApiKeysCommandOutput } from "../commands/ListApiKeysCommand"; import { ListDataSourcesCommandInput, ListDataSourcesCommandOutput } from "../commands/ListDataSourcesCommand"; @@ -65,15 +87,24 @@ import { ListResolversByFunctionCommandOutput, } from "../commands/ListResolversByFunctionCommand"; import { ListResolversCommandInput, ListResolversCommandOutput } from "../commands/ListResolversCommand"; +import { + ListSourceApiAssociationsCommandInput, + ListSourceApiAssociationsCommandOutput, +} from "../commands/ListSourceApiAssociationsCommand"; import { ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput, } from "../commands/ListTagsForResourceCommand"; +import { + ListTypesByAssociationCommandInput, + ListTypesByAssociationCommandOutput, +} from "../commands/ListTypesByAssociationCommand"; import { ListTypesCommandInput, ListTypesCommandOutput } from "../commands/ListTypesCommand"; import { StartSchemaCreationCommandInput, StartSchemaCreationCommandOutput, } from "../commands/StartSchemaCreationCommand"; +import { StartSchemaMergeCommandInput, StartSchemaMergeCommandOutput } from "../commands/StartSchemaMergeCommand"; import { TagResourceCommandInput, TagResourceCommandOutput } from "../commands/TagResourceCommand"; import { UntagResourceCommandInput, UntagResourceCommandOutput } from "../commands/UntagResourceCommand"; import { UpdateApiCacheCommandInput, UpdateApiCacheCommandOutput } from "../commands/UpdateApiCacheCommand"; @@ -83,6 +114,10 @@ import { UpdateDomainNameCommandInput, UpdateDomainNameCommandOutput } from "../ import { UpdateFunctionCommandInput, UpdateFunctionCommandOutput } from "../commands/UpdateFunctionCommand"; import { UpdateGraphqlApiCommandInput, UpdateGraphqlApiCommandOutput } from "../commands/UpdateGraphqlApiCommand"; import { UpdateResolverCommandInput, UpdateResolverCommandOutput } from "../commands/UpdateResolverCommand"; +import { + UpdateSourceApiAssociationCommandInput, + UpdateSourceApiAssociationCommandOutput, +} from "../commands/UpdateSourceApiAssociationCommand"; import { UpdateTypeCommandInput, UpdateTypeCommandOutput } from "../commands/UpdateTypeCommand"; import { AppSyncServiceException as __BaseException } from "../models/AppSyncServiceException"; import { @@ -116,6 +151,8 @@ import { PipelineConfig, RdsHttpEndpointConfig, RelationalDatabaseDataSourceConfig, + SourceApiAssociation, + SourceApiAssociationConfig, SyncConfig, UnauthorizedException, UserPoolConfig, @@ -153,6 +190,88 @@ export const se_AssociateApiCommand = async ( }); }; +/** + * serializeAws_restJson1AssociateMergedGraphqlApiCommand + */ +export const se_AssociateMergedGraphqlApiCommand = async ( + input: AssociateMergedGraphqlApiCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/v1/sourceApis/{sourceApiIdentifier}/mergedApiAssociations"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "sourceApiIdentifier", + () => input.sourceApiIdentifier!, + "{sourceApiIdentifier}", + false + ); + let body: any; + body = JSON.stringify( + take(input, { + description: [], + mergedApiIdentifier: [], + sourceApiAssociationConfig: (_) => _json(_), + }) + ); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +/** + * serializeAws_restJson1AssociateSourceGraphqlApiCommand + */ +export const se_AssociateSourceGraphqlApiCommand = async ( + input: AssociateSourceGraphqlApiCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/v1/mergedApis/{mergedApiIdentifier}/sourceApiAssociations"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "mergedApiIdentifier", + () => input.mergedApiIdentifier!, + "{mergedApiIdentifier}", + false + ); + let body: any; + body = JSON.stringify( + take(input, { + description: [], + sourceApiAssociationConfig: (_) => _json(_), + sourceApiIdentifier: [], + }) + ); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + /** * serializeAws_restJson1CreateApiCacheCommand */ @@ -347,11 +466,14 @@ export const se_CreateGraphqlApiCommand = async ( body = JSON.stringify( take(input, { additionalAuthenticationProviders: (_) => _json(_), + apiType: [], authenticationType: [], lambdaAuthorizerConfig: (_) => _json(_), logConfig: (_) => _json(_), + mergedApiExecutionRoleArn: [], name: [], openIDConnectConfig: (_) => _json(_), + ownerContact: [], tags: (_) => _json(_), userPoolConfig: (_) => _json(_), visibility: [], @@ -666,6 +788,86 @@ export const se_DisassociateApiCommand = async ( }); }; +/** + * serializeAws_restJson1DisassociateMergedGraphqlApiCommand + */ +export const se_DisassociateMergedGraphqlApiCommand = async ( + input: DisassociateMergedGraphqlApiCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/v1/sourceApis/{sourceApiIdentifier}/mergedApiAssociations/{associationId}"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "sourceApiIdentifier", + () => input.sourceApiIdentifier!, + "{sourceApiIdentifier}", + false + ); + resolvedPath = __resolvedPath( + resolvedPath, + input, + "associationId", + () => input.associationId!, + "{associationId}", + false + ); + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "DELETE", + headers, + path: resolvedPath, + body, + }); +}; + +/** + * serializeAws_restJson1DisassociateSourceGraphqlApiCommand + */ +export const se_DisassociateSourceGraphqlApiCommand = async ( + input: DisassociateSourceGraphqlApiCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/v1/mergedApis/{mergedApiIdentifier}/sourceApiAssociations/{associationId}"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "mergedApiIdentifier", + () => input.mergedApiIdentifier!, + "{mergedApiIdentifier}", + false + ); + resolvedPath = __resolvedPath( + resolvedPath, + input, + "associationId", + () => input.associationId!, + "{associationId}", + false + ); + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "DELETE", + headers, + path: resolvedPath, + body, + }); +}; + /** * serializeAws_restJson1EvaluateCodeCommand */ @@ -979,6 +1181,46 @@ export const se_GetSchemaCreationStatusCommand = async ( }); }; +/** + * serializeAws_restJson1GetSourceApiAssociationCommand + */ +export const se_GetSourceApiAssociationCommand = async ( + input: GetSourceApiAssociationCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/v1/mergedApis/{mergedApiIdentifier}/sourceApiAssociations/{associationId}"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "mergedApiIdentifier", + () => input.mergedApiIdentifier!, + "{mergedApiIdentifier}", + false + ); + resolvedPath = __resolvedPath( + resolvedPath, + input, + "associationId", + () => input.associationId!, + "{associationId}", + false + ); + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; + /** * serializeAws_restJson1GetTypeCommand */ @@ -1134,6 +1376,8 @@ export const se_ListGraphqlApisCommand = async ( const query: any = map({ nextToken: [, input.nextToken!], maxResults: [() => input.maxResults !== void 0, () => input.maxResults!.toString()], + apiType: [, input.apiType!], + owner: [, input.owner!], }); let body: any; return new __HttpRequest({ @@ -1210,6 +1454,35 @@ export const se_ListResolversByFunctionCommand = async ( }); }; +/** + * serializeAws_restJson1ListSourceApiAssociationsCommand + */ +export const se_ListSourceApiAssociationsCommand = async ( + input: ListSourceApiAssociationsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/apis/{apiId}/sourceApiAssociations"; + resolvedPath = __resolvedPath(resolvedPath, input, "apiId", () => input.apiId!, "{apiId}", false); + const query: any = map({ + nextToken: [, input.nextToken!], + maxResults: [() => input.maxResults !== void 0, () => input.maxResults!.toString()], + }); + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; + /** * serializeAws_restJson1ListTagsForResourceCommand */ @@ -1262,6 +1535,52 @@ export const se_ListTypesCommand = async ( }); }; +/** + * serializeAws_restJson1ListTypesByAssociationCommand + */ +export const se_ListTypesByAssociationCommand = async ( + input: ListTypesByAssociationCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/v1/mergedApis/{mergedApiIdentifier}/sourceApiAssociations/{associationId}/types"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "mergedApiIdentifier", + () => input.mergedApiIdentifier!, + "{mergedApiIdentifier}", + false + ); + resolvedPath = __resolvedPath( + resolvedPath, + input, + "associationId", + () => input.associationId!, + "{associationId}", + false + ); + const query: any = map({ + format: [, __expectNonNull(input.format!, `format`)], + nextToken: [, input.nextToken!], + maxResults: [() => input.maxResults !== void 0, () => input.maxResults!.toString()], + }); + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; + /** * serializeAws_restJson1StartSchemaCreationCommand */ @@ -1293,6 +1612,46 @@ export const se_StartSchemaCreationCommand = async ( }); }; +/** + * serializeAws_restJson1StartSchemaMergeCommand + */ +export const se_StartSchemaMergeCommand = async ( + input: StartSchemaMergeCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/v1/mergedApis/{mergedApiIdentifier}/sourceApiAssociations/{associationId}/merge"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "associationId", + () => input.associationId!, + "{associationId}", + false + ); + resolvedPath = __resolvedPath( + resolvedPath, + input, + "mergedApiIdentifier", + () => input.mergedApiIdentifier!, + "{mergedApiIdentifier}", + false + ); + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + /** * serializeAws_restJson1TagResourceCommand */ @@ -1552,8 +1911,10 @@ export const se_UpdateGraphqlApiCommand = async ( authenticationType: [], lambdaAuthorizerConfig: (_) => _json(_), logConfig: (_) => _json(_), + mergedApiExecutionRoleArn: [], name: [], openIDConnectConfig: (_) => _json(_), + ownerContact: [], userPoolConfig: (_) => _json(_), xrayEnabled: [], }) @@ -1612,6 +1973,54 @@ export const se_UpdateResolverCommand = async ( }); }; +/** + * serializeAws_restJson1UpdateSourceApiAssociationCommand + */ +export const se_UpdateSourceApiAssociationCommand = async ( + input: UpdateSourceApiAssociationCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/v1/mergedApis/{mergedApiIdentifier}/sourceApiAssociations/{associationId}"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "associationId", + () => input.associationId!, + "{associationId}", + false + ); + resolvedPath = __resolvedPath( + resolvedPath, + input, + "mergedApiIdentifier", + () => input.mergedApiIdentifier!, + "{mergedApiIdentifier}", + false + ); + let body: any; + body = JSON.stringify( + take(input, { + description: [], + sourceApiAssociationConfig: (_) => _json(_), + }) + ); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + /** * serializeAws_restJson1UpdateTypeCommand */ @@ -1702,33 +2111,33 @@ const de_AssociateApiCommandError = async ( }; /** - * deserializeAws_restJson1CreateApiCacheCommand + * deserializeAws_restJson1AssociateMergedGraphqlApiCommand */ -export const de_CreateApiCacheCommand = async ( +export const de_AssociateMergedGraphqlApiCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CreateApiCacheCommandError(output, context); + return de_AssociateMergedGraphqlApiCommandError(output, context); } const contents: any = map({ $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); const doc = take(data, { - apiCache: _json, + sourceApiAssociation: (_) => de_SourceApiAssociation(_, context), }); Object.assign(contents, doc); return contents; }; /** - * deserializeAws_restJson1CreateApiCacheCommandError + * deserializeAws_restJson1AssociateMergedGraphqlApiCommandError */ -const de_CreateApiCacheCommandError = async ( +const de_AssociateMergedGraphqlApiCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseErrorBody(output.body, context), @@ -1744,6 +2153,9 @@ const de_CreateApiCacheCommandError = async ( case "InternalFailureException": case "com.amazonaws.appsync#InternalFailureException": throw await de_InternalFailureExceptionRes(parsedOutput, context); + case "LimitExceededException": + case "com.amazonaws.appsync#LimitExceededException": + throw await de_LimitExceededExceptionRes(parsedOutput, context); case "NotFoundException": case "com.amazonaws.appsync#NotFoundException": throw await de_NotFoundExceptionRes(parsedOutput, context); @@ -1761,42 +2173,163 @@ const de_CreateApiCacheCommandError = async ( }; /** - * deserializeAws_restJson1CreateApiKeyCommand + * deserializeAws_restJson1AssociateSourceGraphqlApiCommand */ -export const de_CreateApiKeyCommand = async ( +export const de_AssociateSourceGraphqlApiCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CreateApiKeyCommandError(output, context); + return de_AssociateSourceGraphqlApiCommandError(output, context); } const contents: any = map({ $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); const doc = take(data, { - apiKey: _json, + sourceApiAssociation: (_) => de_SourceApiAssociation(_, context), }); Object.assign(contents, doc); return contents; }; /** - * deserializeAws_restJson1CreateApiKeyCommandError + * deserializeAws_restJson1AssociateSourceGraphqlApiCommandError */ -const de_CreateApiKeyCommandError = async ( +const de_AssociateSourceGraphqlApiCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseErrorBody(output.body, context), }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); switch (errorCode) { - case "ApiKeyLimitExceededException": - case "com.amazonaws.appsync#ApiKeyLimitExceededException": - throw await de_ApiKeyLimitExceededExceptionRes(parsedOutput, context); + case "BadRequestException": + case "com.amazonaws.appsync#BadRequestException": + throw await de_BadRequestExceptionRes(parsedOutput, context); + case "ConcurrentModificationException": + case "com.amazonaws.appsync#ConcurrentModificationException": + throw await de_ConcurrentModificationExceptionRes(parsedOutput, context); + case "InternalFailureException": + case "com.amazonaws.appsync#InternalFailureException": + throw await de_InternalFailureExceptionRes(parsedOutput, context); + case "LimitExceededException": + case "com.amazonaws.appsync#LimitExceededException": + throw await de_LimitExceededExceptionRes(parsedOutput, context); + case "NotFoundException": + case "com.amazonaws.appsync#NotFoundException": + throw await de_NotFoundExceptionRes(parsedOutput, context); + case "UnauthorizedException": + case "com.amazonaws.appsync#UnauthorizedException": + throw await de_UnauthorizedExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1CreateApiCacheCommand + */ +export const de_CreateApiCacheCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CreateApiCacheCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + apiCache: _json, + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1CreateApiCacheCommandError + */ +const de_CreateApiCacheCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.appsync#BadRequestException": + throw await de_BadRequestExceptionRes(parsedOutput, context); + case "ConcurrentModificationException": + case "com.amazonaws.appsync#ConcurrentModificationException": + throw await de_ConcurrentModificationExceptionRes(parsedOutput, context); + case "InternalFailureException": + case "com.amazonaws.appsync#InternalFailureException": + throw await de_InternalFailureExceptionRes(parsedOutput, context); + case "NotFoundException": + case "com.amazonaws.appsync#NotFoundException": + throw await de_NotFoundExceptionRes(parsedOutput, context); + case "UnauthorizedException": + case "com.amazonaws.appsync#UnauthorizedException": + throw await de_UnauthorizedExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1CreateApiKeyCommand + */ +export const de_CreateApiKeyCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CreateApiKeyCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + apiKey: _json, + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1CreateApiKeyCommandError + */ +const de_CreateApiKeyCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "ApiKeyLimitExceededException": + case "com.amazonaws.appsync#ApiKeyLimitExceededException": + throw await de_ApiKeyLimitExceededExceptionRes(parsedOutput, context); case "ApiKeyValidityOutOfBoundsException": case "com.amazonaws.appsync#ApiKeyValidityOutOfBoundsException": throw await de_ApiKeyValidityOutOfBoundsExceptionRes(parsedOutput, context); @@ -2665,6 +3198,124 @@ const de_DisassociateApiCommandError = async ( } }; +/** + * deserializeAws_restJson1DisassociateMergedGraphqlApiCommand + */ +export const de_DisassociateMergedGraphqlApiCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_DisassociateMergedGraphqlApiCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + sourceApiAssociationStatus: __expectString, + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1DisassociateMergedGraphqlApiCommandError + */ +const de_DisassociateMergedGraphqlApiCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.appsync#BadRequestException": + throw await de_BadRequestExceptionRes(parsedOutput, context); + case "ConcurrentModificationException": + case "com.amazonaws.appsync#ConcurrentModificationException": + throw await de_ConcurrentModificationExceptionRes(parsedOutput, context); + case "InternalFailureException": + case "com.amazonaws.appsync#InternalFailureException": + throw await de_InternalFailureExceptionRes(parsedOutput, context); + case "NotFoundException": + case "com.amazonaws.appsync#NotFoundException": + throw await de_NotFoundExceptionRes(parsedOutput, context); + case "UnauthorizedException": + case "com.amazonaws.appsync#UnauthorizedException": + throw await de_UnauthorizedExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1DisassociateSourceGraphqlApiCommand + */ +export const de_DisassociateSourceGraphqlApiCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_DisassociateSourceGraphqlApiCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + sourceApiAssociationStatus: __expectString, + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1DisassociateSourceGraphqlApiCommandError + */ +const de_DisassociateSourceGraphqlApiCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.appsync#BadRequestException": + throw await de_BadRequestExceptionRes(parsedOutput, context); + case "ConcurrentModificationException": + case "com.amazonaws.appsync#ConcurrentModificationException": + throw await de_ConcurrentModificationExceptionRes(parsedOutput, context); + case "InternalFailureException": + case "com.amazonaws.appsync#InternalFailureException": + throw await de_InternalFailureExceptionRes(parsedOutput, context); + case "NotFoundException": + case "com.amazonaws.appsync#NotFoundException": + throw await de_NotFoundExceptionRes(parsedOutput, context); + case "UnauthorizedException": + case "com.amazonaws.appsync#UnauthorizedException": + throw await de_UnauthorizedExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + /** * deserializeAws_restJson1EvaluateCodeCommand */ @@ -3335,6 +3986,62 @@ const de_GetSchemaCreationStatusCommandError = async ( } }; +/** + * deserializeAws_restJson1GetSourceApiAssociationCommand + */ +export const de_GetSourceApiAssociationCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_GetSourceApiAssociationCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + sourceApiAssociation: (_) => de_SourceApiAssociation(_, context), + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1GetSourceApiAssociationCommandError + */ +const de_GetSourceApiAssociationCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.appsync#BadRequestException": + throw await de_BadRequestExceptionRes(parsedOutput, context); + case "InternalFailureException": + case "com.amazonaws.appsync#InternalFailureException": + throw await de_InternalFailureExceptionRes(parsedOutput, context); + case "NotFoundException": + case "com.amazonaws.appsync#NotFoundException": + throw await de_NotFoundExceptionRes(parsedOutput, context); + case "UnauthorizedException": + case "com.amazonaws.appsync#UnauthorizedException": + throw await de_UnauthorizedExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + /** * deserializeAws_restJson1GetTypeCommand */ @@ -3787,6 +4494,63 @@ const de_ListResolversByFunctionCommandError = async ( } }; +/** + * deserializeAws_restJson1ListSourceApiAssociationsCommand + */ +export const de_ListSourceApiAssociationsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_ListSourceApiAssociationsCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + nextToken: __expectString, + sourceApiAssociationSummaries: _json, + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1ListSourceApiAssociationsCommandError + */ +const de_ListSourceApiAssociationsCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.appsync#BadRequestException": + throw await de_BadRequestExceptionRes(parsedOutput, context); + case "InternalFailureException": + case "com.amazonaws.appsync#InternalFailureException": + throw await de_InternalFailureExceptionRes(parsedOutput, context); + case "NotFoundException": + case "com.amazonaws.appsync#NotFoundException": + throw await de_NotFoundExceptionRes(parsedOutput, context); + case "UnauthorizedException": + case "com.amazonaws.appsync#UnauthorizedException": + throw await de_UnauthorizedExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + /** * deserializeAws_restJson1ListTagsForResourceCommand */ @@ -3909,6 +4673,66 @@ const de_ListTypesCommandError = async ( } }; +/** + * deserializeAws_restJson1ListTypesByAssociationCommand + */ +export const de_ListTypesByAssociationCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_ListTypesByAssociationCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + nextToken: __expectString, + types: _json, + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1ListTypesByAssociationCommandError + */ +const de_ListTypesByAssociationCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.appsync#BadRequestException": + throw await de_BadRequestExceptionRes(parsedOutput, context); + case "ConcurrentModificationException": + case "com.amazonaws.appsync#ConcurrentModificationException": + throw await de_ConcurrentModificationExceptionRes(parsedOutput, context); + case "InternalFailureException": + case "com.amazonaws.appsync#InternalFailureException": + throw await de_InternalFailureExceptionRes(parsedOutput, context); + case "NotFoundException": + case "com.amazonaws.appsync#NotFoundException": + throw await de_NotFoundExceptionRes(parsedOutput, context); + case "UnauthorizedException": + case "com.amazonaws.appsync#UnauthorizedException": + throw await de_UnauthorizedExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + /** * deserializeAws_restJson1StartSchemaCreationCommand */ @@ -3968,6 +4792,65 @@ const de_StartSchemaCreationCommandError = async ( } }; +/** + * deserializeAws_restJson1StartSchemaMergeCommand + */ +export const de_StartSchemaMergeCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_StartSchemaMergeCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + sourceApiAssociationStatus: __expectString, + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1StartSchemaMergeCommandError + */ +const de_StartSchemaMergeCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.appsync#BadRequestException": + throw await de_BadRequestExceptionRes(parsedOutput, context); + case "ConcurrentModificationException": + case "com.amazonaws.appsync#ConcurrentModificationException": + throw await de_ConcurrentModificationExceptionRes(parsedOutput, context); + case "InternalFailureException": + case "com.amazonaws.appsync#InternalFailureException": + throw await de_InternalFailureExceptionRes(parsedOutput, context); + case "NotFoundException": + case "com.amazonaws.appsync#NotFoundException": + throw await de_NotFoundExceptionRes(parsedOutput, context); + case "UnauthorizedException": + case "com.amazonaws.appsync#UnauthorizedException": + throw await de_UnauthorizedExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + /** * deserializeAws_restJson1TagResourceCommand */ @@ -4500,6 +5383,65 @@ const de_UpdateResolverCommandError = async ( } }; +/** + * deserializeAws_restJson1UpdateSourceApiAssociationCommand + */ +export const de_UpdateSourceApiAssociationCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_UpdateSourceApiAssociationCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + sourceApiAssociation: (_) => de_SourceApiAssociation(_, context), + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1UpdateSourceApiAssociationCommandError + */ +const de_UpdateSourceApiAssociationCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.appsync#BadRequestException": + throw await de_BadRequestExceptionRes(parsedOutput, context); + case "ConcurrentModificationException": + case "com.amazonaws.appsync#ConcurrentModificationException": + throw await de_ConcurrentModificationExceptionRes(parsedOutput, context); + case "InternalFailureException": + case "com.amazonaws.appsync#InternalFailureException": + throw await de_InternalFailureExceptionRes(parsedOutput, context); + case "NotFoundException": + case "com.amazonaws.appsync#NotFoundException": + throw await de_NotFoundExceptionRes(parsedOutput, context); + case "UnauthorizedException": + case "com.amazonaws.appsync#UnauthorizedException": + throw await de_UnauthorizedExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + /** * deserializeAws_restJson1UpdateTypeCommand */ @@ -4822,6 +5764,8 @@ const de_UnauthorizedExceptionRes = async ( // se_RelationalDatabaseDataSourceConfig omitted. +// se_SourceApiAssociationConfig omitted. + // se_SyncConfig omitted. // se_TagMap omitted. @@ -4918,6 +5862,31 @@ const de_UnauthorizedExceptionRes = async ( // de_Resolvers omitted. +/** + * deserializeAws_restJson1SourceApiAssociation + */ +const de_SourceApiAssociation = (output: any, context: __SerdeContext): SourceApiAssociation => { + return take(output, { + associationArn: __expectString, + associationId: __expectString, + description: __expectString, + lastSuccessfulMergeDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + mergedApiArn: __expectString, + mergedApiId: __expectString, + sourceApiArn: __expectString, + sourceApiAssociationConfig: _json, + sourceApiAssociationStatus: __expectString, + sourceApiAssociationStatusDetail: __expectString, + sourceApiId: __expectString, + }) as any; +}; + +// de_SourceApiAssociationConfig omitted. + +// de_SourceApiAssociationSummary omitted. + +// de_SourceApiAssociationSummaryList omitted. + // de_SyncConfig omitted. // de_TagMap omitted. diff --git a/codegen/sdk-codegen/aws-models/appsync.json b/codegen/sdk-codegen/aws-models/appsync.json index 63301caf6913..ef3b5f09715b 100644 --- a/codegen/sdk-codegen/aws-models/appsync.json +++ b/codegen/sdk-codegen/aws-models/appsync.json @@ -36,6 +36,12 @@ { "target": "com.amazonaws.appsync#AssociateApi" }, + { + "target": "com.amazonaws.appsync#AssociateMergedGraphqlApi" + }, + { + "target": "com.amazonaws.appsync#AssociateSourceGraphqlApi" + }, { "target": "com.amazonaws.appsync#CreateApiCache" }, @@ -87,6 +93,12 @@ { "target": "com.amazonaws.appsync#DisassociateApi" }, + { + "target": "com.amazonaws.appsync#DisassociateMergedGraphqlApi" + }, + { + "target": "com.amazonaws.appsync#DisassociateSourceGraphqlApi" + }, { "target": "com.amazonaws.appsync#EvaluateCode" }, @@ -123,6 +135,9 @@ { "target": "com.amazonaws.appsync#GetSchemaCreationStatus" }, + { + "target": "com.amazonaws.appsync#GetSourceApiAssociation" + }, { "target": "com.amazonaws.appsync#GetType" }, @@ -147,15 +162,24 @@ { "target": "com.amazonaws.appsync#ListResolversByFunction" }, + { + "target": "com.amazonaws.appsync#ListSourceApiAssociations" + }, { "target": "com.amazonaws.appsync#ListTagsForResource" }, { "target": "com.amazonaws.appsync#ListTypes" }, + { + "target": "com.amazonaws.appsync#ListTypesByAssociation" + }, { "target": "com.amazonaws.appsync#StartSchemaCreation" }, + { + "target": "com.amazonaws.appsync#StartSchemaMerge" + }, { "target": "com.amazonaws.appsync#TagResource" }, @@ -183,6 +207,9 @@ { "target": "com.amazonaws.appsync#UpdateResolver" }, + { + "target": "com.amazonaws.appsync#UpdateSourceApiAssociation" + }, { "target": "com.amazonaws.appsync#UpdateType" } @@ -1576,6 +1603,178 @@ "smithy.api#output": {} } }, + "com.amazonaws.appsync#AssociateMergedGraphqlApi": { + "type": "operation", + "input": { + "target": "com.amazonaws.appsync#AssociateMergedGraphqlApiRequest" + }, + "output": { + "target": "com.amazonaws.appsync#AssociateMergedGraphqlApiResponse" + }, + "errors": [ + { + "target": "com.amazonaws.appsync#BadRequestException" + }, + { + "target": "com.amazonaws.appsync#ConcurrentModificationException" + }, + { + "target": "com.amazonaws.appsync#InternalFailureException" + }, + { + "target": "com.amazonaws.appsync#LimitExceededException" + }, + { + "target": "com.amazonaws.appsync#NotFoundException" + }, + { + "target": "com.amazonaws.appsync#UnauthorizedException" + } + ], + "traits": { + "smithy.api#documentation": "

Creates an association between a Merged API and source API using the source API's identifier.

", + "smithy.api#http": { + "method": "POST", + "uri": "/v1/sourceApis/{sourceApiIdentifier}/mergedApiAssociations", + "code": 200 + } + } + }, + "com.amazonaws.appsync#AssociateMergedGraphqlApiRequest": { + "type": "structure", + "members": { + "sourceApiIdentifier": { + "target": "com.amazonaws.appsync#String", + "traits": { + "smithy.api#documentation": "

The identifier of the AppSync Source API. This is generated by the AppSync service. In most cases, source\n APIs (especially in your account) only require the API ID value or ARN of the source API. However, source APIs\n from other accounts (cross-account use cases) strictly require the full resource ARN of the source API.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "mergedApiIdentifier": { + "target": "com.amazonaws.appsync#String", + "traits": { + "smithy.api#documentation": "

The identifier of the AppSync Merged API. This is generated by the AppSync service. In most cases, Merged APIs (especially in your account) only require the API ID value or ARN of the merged API. However, Merged APIs in other accounts (cross-account use cases) strictly require the full resource ARN of the merged API.

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

The description field.

" + } + }, + "sourceApiAssociationConfig": { + "target": "com.amazonaws.appsync#SourceApiAssociationConfig", + "traits": { + "smithy.api#documentation": "

The SourceApiAssociationConfig object data.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.appsync#AssociateMergedGraphqlApiResponse": { + "type": "structure", + "members": { + "sourceApiAssociation": { + "target": "com.amazonaws.appsync#SourceApiAssociation", + "traits": { + "smithy.api#documentation": "

The SourceApiAssociation object data.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.appsync#AssociateSourceGraphqlApi": { + "type": "operation", + "input": { + "target": "com.amazonaws.appsync#AssociateSourceGraphqlApiRequest" + }, + "output": { + "target": "com.amazonaws.appsync#AssociateSourceGraphqlApiResponse" + }, + "errors": [ + { + "target": "com.amazonaws.appsync#BadRequestException" + }, + { + "target": "com.amazonaws.appsync#ConcurrentModificationException" + }, + { + "target": "com.amazonaws.appsync#InternalFailureException" + }, + { + "target": "com.amazonaws.appsync#LimitExceededException" + }, + { + "target": "com.amazonaws.appsync#NotFoundException" + }, + { + "target": "com.amazonaws.appsync#UnauthorizedException" + } + ], + "traits": { + "smithy.api#documentation": "

Creates an association between a Merged API and source API using the Merged API's identifier.

", + "smithy.api#http": { + "method": "POST", + "uri": "/v1/mergedApis/{mergedApiIdentifier}/sourceApiAssociations", + "code": 200 + } + } + }, + "com.amazonaws.appsync#AssociateSourceGraphqlApiRequest": { + "type": "structure", + "members": { + "mergedApiIdentifier": { + "target": "com.amazonaws.appsync#String", + "traits": { + "smithy.api#documentation": "

The identifier of the AppSync Merged API. This is generated by the AppSync service. In most cases, Merged APIs (especially in your account) only require the API ID value or ARN of the merged API. However, Merged APIs in other accounts (cross-account use cases) strictly require the full resource ARN of the merged API.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "sourceApiIdentifier": { + "target": "com.amazonaws.appsync#String", + "traits": { + "smithy.api#documentation": "

The identifier of the AppSync Source API. This is generated by the AppSync service. In most cases, source\n APIs (especially in your account) only require the API ID value or ARN of the source API. However, source APIs\n from other accounts (cross-account use cases) strictly require the full resource ARN of the source API.

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

The description field.

" + } + }, + "sourceApiAssociationConfig": { + "target": "com.amazonaws.appsync#SourceApiAssociationConfig", + "traits": { + "smithy.api#documentation": "

The SourceApiAssociationConfig object data.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.appsync#AssociateSourceGraphqlApiResponse": { + "type": "structure", + "members": { + "sourceApiAssociation": { + "target": "com.amazonaws.appsync#SourceApiAssociation", + "traits": { + "smithy.api#documentation": "

The SourceApiAssociation object data.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.appsync#AssociationStatus": { "type": "enum", "members": { @@ -2575,6 +2774,24 @@ "traits": { "smithy.api#documentation": "

Sets the value of the GraphQL API to public (GLOBAL) or private (PRIVATE). If no\n value is provided, the visibility will be set to GLOBAL by default. This value cannot be changed\n once the API has been created.

" } + }, + "apiType": { + "target": "com.amazonaws.appsync#GraphQLApiType", + "traits": { + "smithy.api#documentation": "

The value that indicates whether the GraphQL API is a standard API (GRAPHQL) or merged API\n (MERGED).

" + } + }, + "mergedApiExecutionRoleArn": { + "target": "com.amazonaws.appsync#String", + "traits": { + "smithy.api#documentation": "

The Identity and Access Management service role ARN for a merged API. The AppSync\n service assumes this role on behalf of the Merged API to validate access to source APIs at runtime and to\n prompt the AUTO_MERGE to update the merged API endpoint with the source API changes\n automatically.

" + } + }, + "ownerContact": { + "target": "com.amazonaws.appsync#String", + "traits": { + "smithy.api#documentation": "

The owner contact information for an API resource.

\n

This field accepts any string input with a length of 0 - 256 characters.

" + } } }, "traits": { @@ -2949,6 +3166,9 @@ "target": "com.amazonaws.appsync#DataSource" } }, + "com.amazonaws.appsync#Date": { + "type": "timestamp" + }, "com.amazonaws.appsync#DefaultAction": { "type": "enum", "members": { @@ -3564,73 +3784,217 @@ "smithy.api#output": {} } }, - "com.amazonaws.appsync#DomainName": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 1, - "max": 253 + "com.amazonaws.appsync#DisassociateMergedGraphqlApi": { + "type": "operation", + "input": { + "target": "com.amazonaws.appsync#DisassociateMergedGraphqlApiRequest" + }, + "output": { + "target": "com.amazonaws.appsync#DisassociateMergedGraphqlApiResponse" + }, + "errors": [ + { + "target": "com.amazonaws.appsync#BadRequestException" }, - "smithy.api#pattern": "^(\\*[\\w\\d-]*\\.)?([\\w\\d-]+\\.)+[\\w\\d-]+$" + { + "target": "com.amazonaws.appsync#ConcurrentModificationException" + }, + { + "target": "com.amazonaws.appsync#InternalFailureException" + }, + { + "target": "com.amazonaws.appsync#NotFoundException" + }, + { + "target": "com.amazonaws.appsync#UnauthorizedException" + } + ], + "traits": { + "smithy.api#documentation": "

Deletes an association between a Merged API and source API using the source API's identifier and the\n association ID.

", + "smithy.api#http": { + "method": "DELETE", + "uri": "/v1/sourceApis/{sourceApiIdentifier}/mergedApiAssociations/{associationId}", + "code": 200 + } } }, - "com.amazonaws.appsync#DomainNameConfig": { + "com.amazonaws.appsync#DisassociateMergedGraphqlApiRequest": { "type": "structure", "members": { - "domainName": { - "target": "com.amazonaws.appsync#DomainName", - "traits": { - "smithy.api#documentation": "

The domain name.

" - } - }, - "description": { - "target": "com.amazonaws.appsync#Description", - "traits": { - "smithy.api#documentation": "

A description of the DomainName configuration.

" - } - }, - "certificateArn": { - "target": "com.amazonaws.appsync#CertificateArn", - "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the certificate. This can be an Certificate Manager\n (ACM) certificate or an Identity and Access Management (IAM)\n server certificate.

" - } - }, - "appsyncDomainName": { + "sourceApiIdentifier": { "target": "com.amazonaws.appsync#String", "traits": { - "smithy.api#documentation": "

The domain name that AppSync provides.

" + "smithy.api#documentation": "

The identifier of the AppSync Source API. This is generated by the AppSync service. In most cases, source\n APIs (especially in your account) only require the API ID value or ARN of the source API. However, source APIs\n from other accounts (cross-account use cases) strictly require the full resource ARN of the source API.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} } }, - "hostedZoneId": { + "associationId": { "target": "com.amazonaws.appsync#String", "traits": { - "smithy.api#documentation": "

The ID of your Amazon RouteĀ 53 hosted zone.

" + "smithy.api#documentation": "

The ID generated by the AppSync service for the source API association.

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

Describes a configuration for a custom domain.

" - } - }, - "com.amazonaws.appsync#DomainNameConfigs": { - "type": "list", - "member": { - "target": "com.amazonaws.appsync#DomainNameConfig" + "smithy.api#input": {} } }, - "com.amazonaws.appsync#DynamodbDataSourceConfig": { + "com.amazonaws.appsync#DisassociateMergedGraphqlApiResponse": { "type": "structure", "members": { - "tableName": { - "target": "com.amazonaws.appsync#String", + "sourceApiAssociationStatus": { + "target": "com.amazonaws.appsync#SourceApiAssociationStatus", "traits": { - "smithy.api#documentation": "

The table name.

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

The state of the source API association.

" } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.appsync#DisassociateSourceGraphqlApi": { + "type": "operation", + "input": { + "target": "com.amazonaws.appsync#DisassociateSourceGraphqlApiRequest" + }, + "output": { + "target": "com.amazonaws.appsync#DisassociateSourceGraphqlApiResponse" + }, + "errors": [ + { + "target": "com.amazonaws.appsync#BadRequestException" }, - "awsRegion": { - "target": "com.amazonaws.appsync#String", - "traits": { + { + "target": "com.amazonaws.appsync#ConcurrentModificationException" + }, + { + "target": "com.amazonaws.appsync#InternalFailureException" + }, + { + "target": "com.amazonaws.appsync#NotFoundException" + }, + { + "target": "com.amazonaws.appsync#UnauthorizedException" + } + ], + "traits": { + "smithy.api#documentation": "

Deletes an association between a Merged API and source API using the Merged API's identifier and the\n association ID.

", + "smithy.api#http": { + "method": "DELETE", + "uri": "/v1/mergedApis/{mergedApiIdentifier}/sourceApiAssociations/{associationId}", + "code": 200 + } + } + }, + "com.amazonaws.appsync#DisassociateSourceGraphqlApiRequest": { + "type": "structure", + "members": { + "mergedApiIdentifier": { + "target": "com.amazonaws.appsync#String", + "traits": { + "smithy.api#documentation": "

The identifier of the AppSync Merged API. This is generated by the AppSync service. In most cases, Merged APIs (especially in your account) only require the API ID value or ARN of the merged API. However, Merged APIs in other accounts (cross-account use cases) strictly require the full resource ARN of the merged API.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "associationId": { + "target": "com.amazonaws.appsync#String", + "traits": { + "smithy.api#documentation": "

The ID generated by the AppSync service for the source API association.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.appsync#DisassociateSourceGraphqlApiResponse": { + "type": "structure", + "members": { + "sourceApiAssociationStatus": { + "target": "com.amazonaws.appsync#SourceApiAssociationStatus", + "traits": { + "smithy.api#documentation": "

The state of the source API association.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.appsync#DomainName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 253 + }, + "smithy.api#pattern": "^(\\*[\\w\\d-]*\\.)?([\\w\\d-]+\\.)+[\\w\\d-]+$" + } + }, + "com.amazonaws.appsync#DomainNameConfig": { + "type": "structure", + "members": { + "domainName": { + "target": "com.amazonaws.appsync#DomainName", + "traits": { + "smithy.api#documentation": "

The domain name.

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

A description of the DomainName configuration.

" + } + }, + "certificateArn": { + "target": "com.amazonaws.appsync#CertificateArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the certificate. This can be an Certificate Manager\n (ACM) certificate or an Identity and Access Management (IAM)\n server certificate.

" + } + }, + "appsyncDomainName": { + "target": "com.amazonaws.appsync#String", + "traits": { + "smithy.api#documentation": "

The domain name that AppSync provides.

" + } + }, + "hostedZoneId": { + "target": "com.amazonaws.appsync#String", + "traits": { + "smithy.api#documentation": "

The ID of your Amazon RouteĀ 53 hosted zone.

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

Describes a configuration for a custom domain.

" + } + }, + "com.amazonaws.appsync#DomainNameConfigs": { + "type": "list", + "member": { + "target": "com.amazonaws.appsync#DomainNameConfig" + } + }, + "com.amazonaws.appsync#DynamodbDataSourceConfig": { + "type": "structure", + "members": { + "tableName": { + "target": "com.amazonaws.appsync#String", + "traits": { + "smithy.api#documentation": "

The table name.

", + "smithy.api#required": {} + } + }, + "awsRegion": { + "target": "com.amazonaws.appsync#String", + "traits": { "smithy.api#documentation": "

The Amazon Web Services Region.

", "smithy.api#required": {} } @@ -4686,6 +5050,75 @@ "smithy.api#output": {} } }, + "com.amazonaws.appsync#GetSourceApiAssociation": { + "type": "operation", + "input": { + "target": "com.amazonaws.appsync#GetSourceApiAssociationRequest" + }, + "output": { + "target": "com.amazonaws.appsync#GetSourceApiAssociationResponse" + }, + "errors": [ + { + "target": "com.amazonaws.appsync#BadRequestException" + }, + { + "target": "com.amazonaws.appsync#InternalFailureException" + }, + { + "target": "com.amazonaws.appsync#NotFoundException" + }, + { + "target": "com.amazonaws.appsync#UnauthorizedException" + } + ], + "traits": { + "smithy.api#documentation": "

Retrieves a SourceApiAssociation object.

", + "smithy.api#http": { + "method": "GET", + "uri": "/v1/mergedApis/{mergedApiIdentifier}/sourceApiAssociations/{associationId}", + "code": 200 + } + } + }, + "com.amazonaws.appsync#GetSourceApiAssociationRequest": { + "type": "structure", + "members": { + "mergedApiIdentifier": { + "target": "com.amazonaws.appsync#String", + "traits": { + "smithy.api#documentation": "

The identifier of the AppSync Merged API. This is generated by the AppSync service. In most cases, Merged APIs (especially in your account) only require the API ID value or ARN of the merged API. However, Merged APIs in other accounts (cross-account use cases) strictly require the full resource ARN of the merged API.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "associationId": { + "target": "com.amazonaws.appsync#String", + "traits": { + "smithy.api#documentation": "

The ID generated by the AppSync service for the source API association.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.appsync#GetSourceApiAssociationResponse": { + "type": "structure", + "members": { + "sourceApiAssociation": { + "target": "com.amazonaws.appsync#SourceApiAssociation", + "traits": { + "smithy.api#documentation": "

The SourceApiAssociation object data.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.appsync#GetType": { "type": "operation", "input": { @@ -4766,6 +5199,23 @@ "smithy.api#output": {} } }, + "com.amazonaws.appsync#GraphQLApiType": { + "type": "enum", + "members": { + "GRAPHQL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GRAPHQL" + } + }, + "MERGED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MERGED" + } + } + } + }, "com.amazonaws.appsync#GraphQLApiVisibility": { "type": "enum", "members": { @@ -4889,6 +5339,30 @@ "traits": { "smithy.api#documentation": "

Sets the value of the GraphQL API to public (GLOBAL) or private (PRIVATE). If no\n value is provided, the visibility will be set to GLOBAL by default. This value cannot be changed\n once the API has been created.

" } + }, + "apiType": { + "target": "com.amazonaws.appsync#GraphQLApiType", + "traits": { + "smithy.api#documentation": "

The value that indicates whether the GraphQL API is a standard API (GRAPHQL) or merged API\n (MERGED).

" + } + }, + "mergedApiExecutionRoleArn": { + "target": "com.amazonaws.appsync#String", + "traits": { + "smithy.api#documentation": "

The Identity and Access Management service role ARN for a merged API. The AppSync\n service assumes this role on behalf of the Merged API to validate access to source APIs at runtime and to\n prompt the AUTO_MERGE to update the merged API endpoint with the source API changes\n automatically.

" + } + }, + "owner": { + "target": "com.amazonaws.appsync#String", + "traits": { + "smithy.api#documentation": "

The account owner of the GraphQL API.

" + } + }, + "ownerContact": { + "target": "com.amazonaws.appsync#String", + "traits": { + "smithy.api#documentation": "

The owner contact information for an API resource.

\n

This field accepts any string input with a length of 0 - 256 characters.

" + } } }, "traits": { @@ -5202,7 +5676,7 @@ "nextToken": { "target": "com.amazonaws.appsync#PaginationToken", "traits": { - "smithy.api#documentation": "

The API token.

", + "smithy.api#documentation": "

An identifier that was returned from the previous call to this operation, which you can use to return the\n next set of items in the list.

", "smithy.api#httpQuery": "nextToken" } }, @@ -5231,7 +5705,7 @@ "nextToken": { "target": "com.amazonaws.appsync#PaginationToken", "traits": { - "smithy.api#documentation": "

The API token.

" + "smithy.api#documentation": "

An identifier that was returned from the previous call to this operation, which you can use to return the\n next set of items in the list.

" } } }, @@ -5366,6 +5840,20 @@ "smithy.api#documentation": "

The maximum number of results that you want the request to return.

", "smithy.api#httpQuery": "maxResults" } + }, + "apiType": { + "target": "com.amazonaws.appsync#GraphQLApiType", + "traits": { + "smithy.api#documentation": "

The value that indicates whether the GraphQL API is a standard API (GRAPHQL) or merged API\n (MERGED).

", + "smithy.api#httpQuery": "apiType" + } + }, + "owner": { + "target": "com.amazonaws.appsync#Ownership", + "traits": { + "smithy.api#documentation": "

The account owner of the GraphQL API.

", + "smithy.api#httpQuery": "owner" + } } }, "traits": { @@ -5572,27 +6060,21 @@ "smithy.api#output": {} } }, - "com.amazonaws.appsync#ListTagsForResource": { + "com.amazonaws.appsync#ListSourceApiAssociations": { "type": "operation", "input": { - "target": "com.amazonaws.appsync#ListTagsForResourceRequest" + "target": "com.amazonaws.appsync#ListSourceApiAssociationsRequest" }, "output": { - "target": "com.amazonaws.appsync#ListTagsForResourceResponse" + "target": "com.amazonaws.appsync#ListSourceApiAssociationsResponse" }, "errors": [ - { - "target": "com.amazonaws.appsync#AccessDeniedException" - }, { "target": "com.amazonaws.appsync#BadRequestException" }, { "target": "com.amazonaws.appsync#InternalFailureException" }, - { - "target": "com.amazonaws.appsync#LimitExceededException" - }, { "target": "com.amazonaws.appsync#NotFoundException" }, @@ -5601,37 +6083,58 @@ } ], "traits": { - "smithy.api#documentation": "

Lists the tags for a resource.

", + "smithy.api#documentation": "

Lists the SourceApiAssociationSummary data.

", "smithy.api#http": { "method": "GET", - "uri": "/v1/tags/{resourceArn}", + "uri": "/v1/apis/{apiId}/sourceApiAssociations", "code": 200 } } }, - "com.amazonaws.appsync#ListTagsForResourceRequest": { + "com.amazonaws.appsync#ListSourceApiAssociationsRequest": { "type": "structure", "members": { - "resourceArn": { - "target": "com.amazonaws.appsync#ResourceArn", + "apiId": { + "target": "com.amazonaws.appsync#String", "traits": { - "smithy.api#documentation": "

The GraphqlApi Amazon Resource Name (ARN).

", + "smithy.api#documentation": "

The API ID.

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

An identifier that was returned from the previous call to this operation, which you can use to return the\n next set of items in the list.

", + "smithy.api#httpQuery": "nextToken" + } + }, + "maxResults": { + "target": "com.amazonaws.appsync#MaxResults", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The maximum number of results that you want the request to return.

", + "smithy.api#httpQuery": "maxResults" + } } }, "traits": { "smithy.api#input": {} } }, - "com.amazonaws.appsync#ListTagsForResourceResponse": { + "com.amazonaws.appsync#ListSourceApiAssociationsResponse": { "type": "structure", "members": { - "tags": { - "target": "com.amazonaws.appsync#TagMap", + "sourceApiAssociationSummaries": { + "target": "com.amazonaws.appsync#SourceApiAssociationSummaryList", "traits": { - "smithy.api#documentation": "

A TagMap object.

" + "smithy.api#documentation": "

The SourceApiAssociationSummary object data.

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

An identifier that was returned from the previous call to this operation, which you can use to return the\n next set of items in the list.

" } } }, @@ -5639,26 +6142,93 @@ "smithy.api#output": {} } }, - "com.amazonaws.appsync#ListTypes": { + "com.amazonaws.appsync#ListTagsForResource": { "type": "operation", "input": { - "target": "com.amazonaws.appsync#ListTypesRequest" + "target": "com.amazonaws.appsync#ListTagsForResourceRequest" }, "output": { - "target": "com.amazonaws.appsync#ListTypesResponse" + "target": "com.amazonaws.appsync#ListTagsForResourceResponse" }, "errors": [ { - "target": "com.amazonaws.appsync#BadRequestException" + "target": "com.amazonaws.appsync#AccessDeniedException" }, { - "target": "com.amazonaws.appsync#ConcurrentModificationException" + "target": "com.amazonaws.appsync#BadRequestException" }, { "target": "com.amazonaws.appsync#InternalFailureException" }, { - "target": "com.amazonaws.appsync#NotFoundException" + "target": "com.amazonaws.appsync#LimitExceededException" + }, + { + "target": "com.amazonaws.appsync#NotFoundException" + }, + { + "target": "com.amazonaws.appsync#UnauthorizedException" + } + ], + "traits": { + "smithy.api#documentation": "

Lists the tags for a resource.

", + "smithy.api#http": { + "method": "GET", + "uri": "/v1/tags/{resourceArn}", + "code": 200 + } + } + }, + "com.amazonaws.appsync#ListTagsForResourceRequest": { + "type": "structure", + "members": { + "resourceArn": { + "target": "com.amazonaws.appsync#ResourceArn", + "traits": { + "smithy.api#documentation": "

The GraphqlApi Amazon Resource Name (ARN).

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

A TagMap object.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.appsync#ListTypes": { + "type": "operation", + "input": { + "target": "com.amazonaws.appsync#ListTypesRequest" + }, + "output": { + "target": "com.amazonaws.appsync#ListTypesResponse" + }, + "errors": [ + { + "target": "com.amazonaws.appsync#BadRequestException" + }, + { + "target": "com.amazonaws.appsync#ConcurrentModificationException" + }, + { + "target": "com.amazonaws.appsync#InternalFailureException" + }, + { + "target": "com.amazonaws.appsync#NotFoundException" }, { "target": "com.amazonaws.appsync#UnauthorizedException" @@ -5673,6 +6243,107 @@ } } }, + "com.amazonaws.appsync#ListTypesByAssociation": { + "type": "operation", + "input": { + "target": "com.amazonaws.appsync#ListTypesByAssociationRequest" + }, + "output": { + "target": "com.amazonaws.appsync#ListTypesByAssociationResponse" + }, + "errors": [ + { + "target": "com.amazonaws.appsync#BadRequestException" + }, + { + "target": "com.amazonaws.appsync#ConcurrentModificationException" + }, + { + "target": "com.amazonaws.appsync#InternalFailureException" + }, + { + "target": "com.amazonaws.appsync#NotFoundException" + }, + { + "target": "com.amazonaws.appsync#UnauthorizedException" + } + ], + "traits": { + "smithy.api#documentation": "

Lists Type objects by the source API association ID.

", + "smithy.api#http": { + "method": "GET", + "uri": "/v1/mergedApis/{mergedApiIdentifier}/sourceApiAssociations/{associationId}/types", + "code": 200 + } + } + }, + "com.amazonaws.appsync#ListTypesByAssociationRequest": { + "type": "structure", + "members": { + "mergedApiIdentifier": { + "target": "com.amazonaws.appsync#String", + "traits": { + "smithy.api#documentation": "

The identifier of the AppSync Merged API. This is generated by the AppSync service. In most cases, Merged APIs (especially in your account) only require the API ID value or ARN of the merged API. However, Merged APIs in other accounts (cross-account use cases) strictly require the full resource ARN of the merged API.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "associationId": { + "target": "com.amazonaws.appsync#String", + "traits": { + "smithy.api#documentation": "

The ID generated by the AppSync service for the source API association.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "format": { + "target": "com.amazonaws.appsync#TypeDefinitionFormat", + "traits": { + "smithy.api#documentation": "

The format type.

", + "smithy.api#httpQuery": "format", + "smithy.api#required": {} + } + }, + "nextToken": { + "target": "com.amazonaws.appsync#PaginationToken", + "traits": { + "smithy.api#documentation": "

An identifier that was returned from the previous call to this operation, which you can use to return the\n next set of items in the list.

", + "smithy.api#httpQuery": "nextToken" + } + }, + "maxResults": { + "target": "com.amazonaws.appsync#MaxResults", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The maximum number of results that you want the request to return.

", + "smithy.api#httpQuery": "maxResults" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.appsync#ListTypesByAssociationResponse": { + "type": "structure", + "members": { + "types": { + "target": "com.amazonaws.appsync#TypeList", + "traits": { + "smithy.api#documentation": "

The Type objects.

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

An identifier that was returned from the previous call to this operation, which you can use to return the\n next set of items in the list.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.appsync#ListTypesRequest": { "type": "structure", "members": { @@ -5812,6 +6483,23 @@ } } }, + "com.amazonaws.appsync#MergeType": { + "type": "enum", + "members": { + "MANUAL_MERGE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MANUAL_MERGE" + } + }, + "AUTO_MERGE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "AUTO_MERGE" + } + } + } + }, "com.amazonaws.appsync#NotFoundException": { "type": "structure", "members": { @@ -5899,6 +6587,23 @@ } } }, + "com.amazonaws.appsync#Ownership": { + "type": "enum", + "members": { + "CURRENT_ACCOUNT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CURRENT_ACCOUNT" + } + }, + "OTHER_ACCOUNTS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "OTHER_ACCOUNTS" + } + } + } + }, "com.amazonaws.appsync#PaginationToken": { "type": "string", "traits": { @@ -6171,6 +6876,203 @@ } } }, + "com.amazonaws.appsync#SourceApiAssociation": { + "type": "structure", + "members": { + "associationId": { + "target": "com.amazonaws.appsync#String", + "traits": { + "smithy.api#documentation": "

The ID generated by the AppSync service for the source API association.

" + } + }, + "associationArn": { + "target": "com.amazonaws.appsync#String", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the source API association.

" + } + }, + "sourceApiId": { + "target": "com.amazonaws.appsync#String", + "traits": { + "smithy.api#documentation": "

The ID of the AppSync source API.

" + } + }, + "sourceApiArn": { + "target": "com.amazonaws.appsync#String", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the AppSync source API.

" + } + }, + "mergedApiArn": { + "target": "com.amazonaws.appsync#String", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the AppSync Merged API.

" + } + }, + "mergedApiId": { + "target": "com.amazonaws.appsync#String", + "traits": { + "smithy.api#documentation": "

The ID of the AppSync Merged API.

" + } + }, + "description": { + "target": "com.amazonaws.appsync#String", + "traits": { + "smithy.api#documentation": "

The description field.

" + } + }, + "sourceApiAssociationConfig": { + "target": "com.amazonaws.appsync#SourceApiAssociationConfig", + "traits": { + "smithy.api#documentation": "

The SourceApiAssociationConfig object data.

" + } + }, + "sourceApiAssociationStatus": { + "target": "com.amazonaws.appsync#SourceApiAssociationStatus", + "traits": { + "smithy.api#documentation": "

The state of the source API association.

" + } + }, + "sourceApiAssociationStatusDetail": { + "target": "com.amazonaws.appsync#String", + "traits": { + "smithy.api#documentation": "

The detailed message related to the current state of the source API association.

" + } + }, + "lastSuccessfulMergeDate": { + "target": "com.amazonaws.appsync#Date", + "traits": { + "smithy.api#documentation": "

The datetime value of the last successful merge of the source API association. The result will be in UTC\n format and your local time zone.

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

Describes the configuration of a source API. A source API is a GraphQL API that is linked to a merged API.\n There can be multiple source APIs attached to each merged API.\n When linked to a merged API, the source API's schema, data sources, and resolvers will be combined with other linked source API data to form a new, singular API. \n

\n

Source APIs can originate from your account or from other accounts via Amazon Web Services Resource Access Manager. For more\n information about sharing resources from other accounts, see What is Amazon Web Services Resource Access\n Manager? in the Amazon Web Services Resource Access Manager guide.

" + } + }, + "com.amazonaws.appsync#SourceApiAssociationConfig": { + "type": "structure", + "members": { + "mergeType": { + "target": "com.amazonaws.appsync#MergeType", + "traits": { + "smithy.api#documentation": "

The property that indicates which merging option is enabled in the source API association.

\n

Valid merge types are MANUAL_MERGE (default) and AUTO_MERGE. Manual merges are the\n default behavior and require the user to trigger any changes from the source APIs to the merged API manually.\n Auto merges subscribe the merged API to the changes performed on the source APIs so that any change in the\n source APIs are also made to the merged API. Auto merges use MergedApiExecutionRoleArn to perform\n merge operations.

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

Describes properties used to specify configurations related to a source API.

" + } + }, + "com.amazonaws.appsync#SourceApiAssociationStatus": { + "type": "enum", + "members": { + "MERGE_SCHEDULED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MERGE_SCHEDULED" + } + }, + "MERGE_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MERGE_FAILED" + } + }, + "MERGE_SUCCESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MERGE_SUCCESS" + } + }, + "MERGE_IN_PROGRESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MERGE_IN_PROGRESS" + } + }, + "AUTO_MERGE_SCHEDULE_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "AUTO_MERGE_SCHEDULE_FAILED" + } + }, + "DELETION_SCHEDULED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DELETION_SCHEDULED" + } + }, + "DELETION_IN_PROGRESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DELETION_IN_PROGRESS" + } + }, + "DELETION_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DELETION_FAILED" + } + } + } + }, + "com.amazonaws.appsync#SourceApiAssociationSummary": { + "type": "structure", + "members": { + "associationId": { + "target": "com.amazonaws.appsync#String", + "traits": { + "smithy.api#documentation": "

The ID generated by the AppSync service for the source API association.

" + } + }, + "associationArn": { + "target": "com.amazonaws.appsync#String", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the source API association.

" + } + }, + "sourceApiId": { + "target": "com.amazonaws.appsync#String", + "traits": { + "smithy.api#documentation": "

The ID of the AppSync source API.

" + } + }, + "sourceApiArn": { + "target": "com.amazonaws.appsync#String", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the AppSync Source API.

" + } + }, + "mergedApiId": { + "target": "com.amazonaws.appsync#String", + "traits": { + "smithy.api#documentation": "

The ID of the AppSync Merged API.

" + } + }, + "mergedApiArn": { + "target": "com.amazonaws.appsync#String", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the AppSync Merged API.

" + } + }, + "description": { + "target": "com.amazonaws.appsync#String", + "traits": { + "smithy.api#documentation": "

The description field.

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

Describes the ARNs and IDs of associations, Merged APIs, and source APIs.

" + } + }, + "com.amazonaws.appsync#SourceApiAssociationSummaryList": { + "type": "list", + "member": { + "target": "com.amazonaws.appsync#SourceApiAssociationSummary" + } + }, "com.amazonaws.appsync#StartSchemaCreation": { "type": "operation", "input": { @@ -6242,6 +7144,78 @@ "smithy.api#output": {} } }, + "com.amazonaws.appsync#StartSchemaMerge": { + "type": "operation", + "input": { + "target": "com.amazonaws.appsync#StartSchemaMergeRequest" + }, + "output": { + "target": "com.amazonaws.appsync#StartSchemaMergeResponse" + }, + "errors": [ + { + "target": "com.amazonaws.appsync#BadRequestException" + }, + { + "target": "com.amazonaws.appsync#ConcurrentModificationException" + }, + { + "target": "com.amazonaws.appsync#InternalFailureException" + }, + { + "target": "com.amazonaws.appsync#NotFoundException" + }, + { + "target": "com.amazonaws.appsync#UnauthorizedException" + } + ], + "traits": { + "smithy.api#documentation": "

Initiates a merge operation. Returns a status that shows the result of the merge operation.

", + "smithy.api#http": { + "method": "POST", + "uri": "/v1/mergedApis/{mergedApiIdentifier}/sourceApiAssociations/{associationId}/merge", + "code": 200 + } + } + }, + "com.amazonaws.appsync#StartSchemaMergeRequest": { + "type": "structure", + "members": { + "associationId": { + "target": "com.amazonaws.appsync#String", + "traits": { + "smithy.api#documentation": "

The ID generated by the AppSync service for the source API association.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "mergedApiIdentifier": { + "target": "com.amazonaws.appsync#String", + "traits": { + "smithy.api#documentation": "

The identifier of the AppSync Merged API. This is generated by the AppSync service. In most cases, Merged APIs (especially in your account) only require the API ID value or ARN of the merged API. However, Merged APIs in other accounts (cross-account use cases) strictly require the full resource ARN of the merged API.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.appsync#StartSchemaMergeResponse": { + "type": "structure", + "members": { + "sourceApiAssociationStatus": { + "target": "com.amazonaws.appsync#SourceApiAssociationStatus", + "traits": { + "smithy.api#documentation": "

The state of the source API association.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.appsync#String": { "type": "string" }, @@ -7152,6 +8126,18 @@ "traits": { "smithy.api#documentation": "

Configuration for Lambda function authorization.

" } + }, + "mergedApiExecutionRoleArn": { + "target": "com.amazonaws.appsync#String", + "traits": { + "smithy.api#documentation": "

The Identity and Access Management service role ARN for a merged API. The AppSync\n service assumes this role on behalf of the Merged API to validate access to source APIs at runtime and to\n prompt the AUTO_MERGE to update the merged API endpoint with the source API changes\n automatically.

" + } + }, + "ownerContact": { + "target": "com.amazonaws.appsync#String", + "traits": { + "smithy.api#documentation": "

The owner contact information for an API resource.

\n

This field accepts any string input with a length of 0 - 256 characters.

" + } } }, "traits": { @@ -7310,6 +8296,90 @@ "smithy.api#output": {} } }, + "com.amazonaws.appsync#UpdateSourceApiAssociation": { + "type": "operation", + "input": { + "target": "com.amazonaws.appsync#UpdateSourceApiAssociationRequest" + }, + "output": { + "target": "com.amazonaws.appsync#UpdateSourceApiAssociationResponse" + }, + "errors": [ + { + "target": "com.amazonaws.appsync#BadRequestException" + }, + { + "target": "com.amazonaws.appsync#ConcurrentModificationException" + }, + { + "target": "com.amazonaws.appsync#InternalFailureException" + }, + { + "target": "com.amazonaws.appsync#NotFoundException" + }, + { + "target": "com.amazonaws.appsync#UnauthorizedException" + } + ], + "traits": { + "smithy.api#documentation": "

Updates some of the configuration choices of a particular source API association.

", + "smithy.api#http": { + "method": "POST", + "uri": "/v1/mergedApis/{mergedApiIdentifier}/sourceApiAssociations/{associationId}", + "code": 200 + } + } + }, + "com.amazonaws.appsync#UpdateSourceApiAssociationRequest": { + "type": "structure", + "members": { + "associationId": { + "target": "com.amazonaws.appsync#String", + "traits": { + "smithy.api#documentation": "

The ID generated by the AppSync service for the source API association.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "mergedApiIdentifier": { + "target": "com.amazonaws.appsync#String", + "traits": { + "smithy.api#documentation": "

The identifier of the AppSync Merged API. This is generated by the AppSync service. In most cases, Merged APIs (especially in your account) only require the API ID value or ARN of the merged API. However, Merged APIs in other accounts (cross-account use cases) strictly require the full resource ARN of the merged API.

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

The description field.

" + } + }, + "sourceApiAssociationConfig": { + "target": "com.amazonaws.appsync#SourceApiAssociationConfig", + "traits": { + "smithy.api#documentation": "

The SourceApiAssociationConfig object data.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.appsync#UpdateSourceApiAssociationResponse": { + "type": "structure", + "members": { + "sourceApiAssociation": { + "target": "com.amazonaws.appsync#SourceApiAssociation", + "traits": { + "smithy.api#documentation": "

The SourceApiAssociation object data.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.appsync#UpdateType": { "type": "operation", "input": {