@aws-sdk/client-appsync 3.130.0 → 3.141.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +31 -0
- package/README.md +1 -1
- package/dist-cjs/AppSync.js +15 -0
- package/dist-cjs/commands/AssociateApiCommand.js +2 -2
- package/dist-cjs/commands/CreateApiCacheCommand.js +2 -2
- package/dist-cjs/commands/CreateApiKeyCommand.js +2 -2
- package/dist-cjs/commands/CreateDataSourceCommand.js +2 -2
- package/dist-cjs/commands/CreateDomainNameCommand.js +2 -2
- package/dist-cjs/commands/CreateFunctionCommand.js +2 -2
- package/dist-cjs/commands/CreateGraphqlApiCommand.js +2 -2
- package/dist-cjs/commands/CreateResolverCommand.js +2 -2
- package/dist-cjs/commands/CreateTypeCommand.js +2 -2
- package/dist-cjs/commands/DeleteApiCacheCommand.js +2 -2
- package/dist-cjs/commands/DeleteApiKeyCommand.js +2 -2
- package/dist-cjs/commands/DeleteDataSourceCommand.js +2 -2
- package/dist-cjs/commands/DeleteDomainNameCommand.js +2 -2
- package/dist-cjs/commands/DeleteFunctionCommand.js +2 -2
- package/dist-cjs/commands/DeleteGraphqlApiCommand.js +2 -2
- package/dist-cjs/commands/DeleteResolverCommand.js +2 -2
- package/dist-cjs/commands/DeleteTypeCommand.js +2 -2
- package/dist-cjs/commands/DisassociateApiCommand.js +2 -2
- package/dist-cjs/commands/EvaluateMappingTemplateCommand.js +36 -0
- package/dist-cjs/commands/FlushApiCacheCommand.js +2 -2
- package/dist-cjs/commands/GetApiAssociationCommand.js +2 -2
- package/dist-cjs/commands/GetApiCacheCommand.js +2 -2
- package/dist-cjs/commands/GetDataSourceCommand.js +2 -2
- package/dist-cjs/commands/GetDomainNameCommand.js +2 -2
- package/dist-cjs/commands/GetFunctionCommand.js +2 -2
- package/dist-cjs/commands/GetGraphqlApiCommand.js +2 -2
- package/dist-cjs/commands/GetIntrospectionSchemaCommand.js +2 -2
- package/dist-cjs/commands/GetResolverCommand.js +2 -2
- package/dist-cjs/commands/GetSchemaCreationStatusCommand.js +2 -2
- package/dist-cjs/commands/GetTypeCommand.js +2 -2
- package/dist-cjs/commands/ListApiKeysCommand.js +2 -2
- package/dist-cjs/commands/ListDataSourcesCommand.js +2 -2
- package/dist-cjs/commands/ListDomainNamesCommand.js +2 -2
- package/dist-cjs/commands/ListFunctionsCommand.js +2 -2
- package/dist-cjs/commands/ListGraphqlApisCommand.js +2 -2
- package/dist-cjs/commands/ListResolversByFunctionCommand.js +2 -2
- package/dist-cjs/commands/ListResolversCommand.js +2 -2
- package/dist-cjs/commands/ListTagsForResourceCommand.js +2 -2
- package/dist-cjs/commands/ListTypesCommand.js +2 -2
- package/dist-cjs/commands/StartSchemaCreationCommand.js +2 -2
- package/dist-cjs/commands/TagResourceCommand.js +2 -2
- package/dist-cjs/commands/UntagResourceCommand.js +2 -2
- package/dist-cjs/commands/UpdateApiCacheCommand.js +2 -2
- package/dist-cjs/commands/UpdateApiKeyCommand.js +2 -2
- package/dist-cjs/commands/UpdateDataSourceCommand.js +2 -2
- package/dist-cjs/commands/UpdateDomainNameCommand.js +2 -2
- package/dist-cjs/commands/UpdateFunctionCommand.js +2 -2
- package/dist-cjs/commands/UpdateGraphqlApiCommand.js +2 -2
- package/dist-cjs/commands/UpdateResolverCommand.js +2 -2
- package/dist-cjs/commands/UpdateTypeCommand.js +2 -2
- package/dist-cjs/commands/index.js +1 -0
- package/dist-cjs/models/models_0.js +524 -766
- package/dist-cjs/protocols/Aws_restJson1.js +77 -2
- package/dist-es/AppSync.js +15 -0
- package/dist-es/commands/AssociateApiCommand.js +3 -3
- package/dist-es/commands/CreateApiCacheCommand.js +3 -3
- package/dist-es/commands/CreateApiKeyCommand.js +3 -3
- package/dist-es/commands/CreateDataSourceCommand.js +3 -3
- package/dist-es/commands/CreateDomainNameCommand.js +3 -3
- package/dist-es/commands/CreateFunctionCommand.js +3 -3
- package/dist-es/commands/CreateGraphqlApiCommand.js +3 -3
- package/dist-es/commands/CreateResolverCommand.js +3 -3
- package/dist-es/commands/CreateTypeCommand.js +3 -3
- package/dist-es/commands/DeleteApiCacheCommand.js +3 -3
- package/dist-es/commands/DeleteApiKeyCommand.js +3 -3
- package/dist-es/commands/DeleteDataSourceCommand.js +3 -3
- package/dist-es/commands/DeleteDomainNameCommand.js +3 -3
- package/dist-es/commands/DeleteFunctionCommand.js +3 -3
- package/dist-es/commands/DeleteGraphqlApiCommand.js +3 -3
- package/dist-es/commands/DeleteResolverCommand.js +3 -3
- package/dist-es/commands/DeleteTypeCommand.js +3 -3
- package/dist-es/commands/DisassociateApiCommand.js +3 -3
- package/dist-es/commands/EvaluateMappingTemplateCommand.js +39 -0
- package/dist-es/commands/FlushApiCacheCommand.js +3 -3
- package/dist-es/commands/GetApiAssociationCommand.js +3 -3
- package/dist-es/commands/GetApiCacheCommand.js +3 -3
- package/dist-es/commands/GetDataSourceCommand.js +3 -3
- package/dist-es/commands/GetDomainNameCommand.js +3 -3
- package/dist-es/commands/GetFunctionCommand.js +3 -3
- package/dist-es/commands/GetGraphqlApiCommand.js +3 -3
- package/dist-es/commands/GetIntrospectionSchemaCommand.js +3 -3
- package/dist-es/commands/GetResolverCommand.js +3 -3
- package/dist-es/commands/GetSchemaCreationStatusCommand.js +3 -3
- package/dist-es/commands/GetTypeCommand.js +3 -3
- package/dist-es/commands/ListApiKeysCommand.js +3 -3
- package/dist-es/commands/ListDataSourcesCommand.js +3 -3
- package/dist-es/commands/ListDomainNamesCommand.js +3 -3
- package/dist-es/commands/ListFunctionsCommand.js +3 -3
- package/dist-es/commands/ListGraphqlApisCommand.js +3 -3
- package/dist-es/commands/ListResolversByFunctionCommand.js +3 -3
- package/dist-es/commands/ListResolversCommand.js +3 -3
- package/dist-es/commands/ListTagsForResourceCommand.js +3 -3
- package/dist-es/commands/ListTypesCommand.js +3 -3
- package/dist-es/commands/StartSchemaCreationCommand.js +3 -3
- package/dist-es/commands/TagResourceCommand.js +3 -3
- package/dist-es/commands/UntagResourceCommand.js +3 -3
- package/dist-es/commands/UpdateApiCacheCommand.js +3 -3
- package/dist-es/commands/UpdateApiKeyCommand.js +3 -3
- package/dist-es/commands/UpdateDataSourceCommand.js +3 -3
- package/dist-es/commands/UpdateDomainNameCommand.js +3 -3
- package/dist-es/commands/UpdateFunctionCommand.js +3 -3
- package/dist-es/commands/UpdateGraphqlApiCommand.js +3 -3
- package/dist-es/commands/UpdateResolverCommand.js +3 -3
- package/dist-es/commands/UpdateTypeCommand.js +3 -3
- package/dist-es/commands/index.js +1 -0
- package/dist-es/models/models_0.js +130 -508
- package/dist-es/protocols/Aws_restJson1.js +98 -0
- package/dist-types/AppSync.d.ts +13 -0
- package/dist-types/AppSyncClient.d.ts +3 -2
- package/dist-types/commands/EvaluateMappingTemplateCommand.d.ts +41 -0
- package/dist-types/commands/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +551 -761
- package/dist-types/protocols/Aws_restJson1.d.ts +3 -0
- package/dist-types/ts3.4/AppSync.d.ts +5 -0
- package/dist-types/ts3.4/AppSyncClient.d.ts +3 -2
- package/dist-types/ts3.4/commands/EvaluateMappingTemplateCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/index.d.ts +1 -0
- package/dist-types/ts3.4/models/models_0.d.ts +275 -506
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +3 -0
- package/package.json +7 -7
|
@@ -666,6 +666,30 @@ export var serializeAws_restJson1DisassociateApiCommand = function (input, conte
|
|
|
666
666
|
}
|
|
667
667
|
});
|
|
668
668
|
}); };
|
|
669
|
+
export var serializeAws_restJson1EvaluateMappingTemplateCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
670
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
671
|
+
return __generator(this, function (_c) {
|
|
672
|
+
switch (_c.label) {
|
|
673
|
+
case 0: return [4, context.endpoint()];
|
|
674
|
+
case 1:
|
|
675
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
676
|
+
headers = {
|
|
677
|
+
"content-type": "application/json",
|
|
678
|
+
};
|
|
679
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/v1/dataplane-evaluatetemplate";
|
|
680
|
+
body = JSON.stringify(__assign(__assign({}, (input.context != null && { context: input.context })), (input.template != null && { template: input.template })));
|
|
681
|
+
return [2, new __HttpRequest({
|
|
682
|
+
protocol: protocol,
|
|
683
|
+
hostname: hostname,
|
|
684
|
+
port: port,
|
|
685
|
+
method: "POST",
|
|
686
|
+
headers: headers,
|
|
687
|
+
path: resolvedPath,
|
|
688
|
+
body: body,
|
|
689
|
+
})];
|
|
690
|
+
}
|
|
691
|
+
});
|
|
692
|
+
}); };
|
|
669
693
|
export var serializeAws_restJson1FlushApiCacheCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
670
694
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
671
695
|
return __generator(this, function (_c) {
|
|
@@ -3062,6 +3086,75 @@ var deserializeAws_restJson1DisassociateApiCommandError = function (output, cont
|
|
|
3062
3086
|
}
|
|
3063
3087
|
});
|
|
3064
3088
|
}); };
|
|
3089
|
+
export var deserializeAws_restJson1EvaluateMappingTemplateCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3090
|
+
var contents, data, _a, _b;
|
|
3091
|
+
return __generator(this, function (_c) {
|
|
3092
|
+
switch (_c.label) {
|
|
3093
|
+
case 0:
|
|
3094
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
3095
|
+
return [2, deserializeAws_restJson1EvaluateMappingTemplateCommandError(output, context)];
|
|
3096
|
+
}
|
|
3097
|
+
contents = {
|
|
3098
|
+
$metadata: deserializeMetadata(output),
|
|
3099
|
+
error: undefined,
|
|
3100
|
+
evaluationResult: undefined,
|
|
3101
|
+
};
|
|
3102
|
+
_a = __expectNonNull;
|
|
3103
|
+
_b = __expectObject;
|
|
3104
|
+
return [4, parseBody(output.body, context)];
|
|
3105
|
+
case 1:
|
|
3106
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
3107
|
+
if (data.error !== undefined && data.error !== null) {
|
|
3108
|
+
contents.error = deserializeAws_restJson1ErrorDetail(data.error, context);
|
|
3109
|
+
}
|
|
3110
|
+
if (data.evaluationResult !== undefined && data.evaluationResult !== null) {
|
|
3111
|
+
contents.evaluationResult = __expectString(data.evaluationResult);
|
|
3112
|
+
}
|
|
3113
|
+
return [2, Promise.resolve(contents)];
|
|
3114
|
+
}
|
|
3115
|
+
});
|
|
3116
|
+
}); };
|
|
3117
|
+
var deserializeAws_restJson1EvaluateMappingTemplateCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3118
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
|
|
3119
|
+
var _c;
|
|
3120
|
+
return __generator(this, function (_d) {
|
|
3121
|
+
switch (_d.label) {
|
|
3122
|
+
case 0:
|
|
3123
|
+
_a = [__assign({}, output)];
|
|
3124
|
+
_c = {};
|
|
3125
|
+
return [4, parseBody(output.body, context)];
|
|
3126
|
+
case 1:
|
|
3127
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
3128
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3129
|
+
_b = errorCode;
|
|
3130
|
+
switch (_b) {
|
|
3131
|
+
case "AccessDeniedException": return [3, 2];
|
|
3132
|
+
case "com.amazonaws.appsync#AccessDeniedException": return [3, 2];
|
|
3133
|
+
case "BadRequestException": return [3, 4];
|
|
3134
|
+
case "com.amazonaws.appsync#BadRequestException": return [3, 4];
|
|
3135
|
+
case "InternalFailureException": return [3, 6];
|
|
3136
|
+
case "com.amazonaws.appsync#InternalFailureException": return [3, 6];
|
|
3137
|
+
}
|
|
3138
|
+
return [3, 8];
|
|
3139
|
+
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
3140
|
+
case 3: throw _d.sent();
|
|
3141
|
+
case 4: return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
|
|
3142
|
+
case 5: throw _d.sent();
|
|
3143
|
+
case 6: return [4, deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)];
|
|
3144
|
+
case 7: throw _d.sent();
|
|
3145
|
+
case 8:
|
|
3146
|
+
parsedBody = parsedOutput.body;
|
|
3147
|
+
$metadata = deserializeMetadata(output);
|
|
3148
|
+
statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
3149
|
+
response = new __BaseException({
|
|
3150
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
3151
|
+
$fault: "client",
|
|
3152
|
+
$metadata: $metadata,
|
|
3153
|
+
});
|
|
3154
|
+
throw __decorateServiceException(response, parsedBody);
|
|
3155
|
+
}
|
|
3156
|
+
});
|
|
3157
|
+
}); };
|
|
3065
3158
|
export var deserializeAws_restJson1FlushApiCacheCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3066
3159
|
var contents;
|
|
3067
3160
|
return __generator(this, function (_a) {
|
|
@@ -5715,6 +5808,11 @@ var deserializeAws_restJson1ElasticsearchDataSourceConfig = function (output, co
|
|
|
5715
5808
|
endpoint: __expectString(output.endpoint),
|
|
5716
5809
|
};
|
|
5717
5810
|
};
|
|
5811
|
+
var deserializeAws_restJson1ErrorDetail = function (output, context) {
|
|
5812
|
+
return {
|
|
5813
|
+
message: __expectString(output.message),
|
|
5814
|
+
};
|
|
5815
|
+
};
|
|
5718
5816
|
var deserializeAws_restJson1FunctionConfiguration = function (output, context) {
|
|
5719
5817
|
return {
|
|
5720
5818
|
dataSourceName: __expectString(output.dataSourceName),
|
package/dist-types/AppSync.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ import { DeleteGraphqlApiCommandInput, DeleteGraphqlApiCommandOutput } from "./c
|
|
|
18
18
|
import { DeleteResolverCommandInput, DeleteResolverCommandOutput } from "./commands/DeleteResolverCommand";
|
|
19
19
|
import { DeleteTypeCommandInput, DeleteTypeCommandOutput } from "./commands/DeleteTypeCommand";
|
|
20
20
|
import { DisassociateApiCommandInput, DisassociateApiCommandOutput } from "./commands/DisassociateApiCommand";
|
|
21
|
+
import { EvaluateMappingTemplateCommandInput, EvaluateMappingTemplateCommandOutput } from "./commands/EvaluateMappingTemplateCommand";
|
|
21
22
|
import { FlushApiCacheCommandInput, FlushApiCacheCommandOutput } from "./commands/FlushApiCacheCommand";
|
|
22
23
|
import { GetApiAssociationCommandInput, GetApiAssociationCommandOutput } from "./commands/GetApiAssociationCommand";
|
|
23
24
|
import { GetApiCacheCommandInput, GetApiCacheCommandOutput } from "./commands/GetApiCacheCommand";
|
|
@@ -166,6 +167,18 @@ export declare class AppSync extends AppSyncClient {
|
|
|
166
167
|
disassociateApi(args: DisassociateApiCommandInput, options?: __HttpHandlerOptions): Promise<DisassociateApiCommandOutput>;
|
|
167
168
|
disassociateApi(args: DisassociateApiCommandInput, cb: (err: any, data?: DisassociateApiCommandOutput) => void): void;
|
|
168
169
|
disassociateApi(args: DisassociateApiCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DisassociateApiCommandOutput) => void): void;
|
|
170
|
+
/**
|
|
171
|
+
* <p>Evaluates a given template and returns the response. The mapping template can be a
|
|
172
|
+
* request or response template.</p>
|
|
173
|
+
* <p>Request templates take the incoming request after a GraphQL operation is parsed and
|
|
174
|
+
* convert it into a request configuration for the selected data source operation. Response
|
|
175
|
+
* templates interpret responses from the data source and map it to the shape of the GraphQL
|
|
176
|
+
* field output type.</p>
|
|
177
|
+
* <p>Mapping templates are written in the Apache Velocity Template Language (VTL).</p>
|
|
178
|
+
*/
|
|
179
|
+
evaluateMappingTemplate(args: EvaluateMappingTemplateCommandInput, options?: __HttpHandlerOptions): Promise<EvaluateMappingTemplateCommandOutput>;
|
|
180
|
+
evaluateMappingTemplate(args: EvaluateMappingTemplateCommandInput, cb: (err: any, data?: EvaluateMappingTemplateCommandOutput) => void): void;
|
|
181
|
+
evaluateMappingTemplate(args: EvaluateMappingTemplateCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: EvaluateMappingTemplateCommandOutput) => void): void;
|
|
169
182
|
/**
|
|
170
183
|
* <p>Flushes an <code>ApiCache</code> object.</p>
|
|
171
184
|
*/
|
|
@@ -24,6 +24,7 @@ import { DeleteGraphqlApiCommandInput, DeleteGraphqlApiCommandOutput } from "./c
|
|
|
24
24
|
import { DeleteResolverCommandInput, DeleteResolverCommandOutput } from "./commands/DeleteResolverCommand";
|
|
25
25
|
import { DeleteTypeCommandInput, DeleteTypeCommandOutput } from "./commands/DeleteTypeCommand";
|
|
26
26
|
import { DisassociateApiCommandInput, DisassociateApiCommandOutput } from "./commands/DisassociateApiCommand";
|
|
27
|
+
import { EvaluateMappingTemplateCommandInput, EvaluateMappingTemplateCommandOutput } from "./commands/EvaluateMappingTemplateCommand";
|
|
27
28
|
import { FlushApiCacheCommandInput, FlushApiCacheCommandOutput } from "./commands/FlushApiCacheCommand";
|
|
28
29
|
import { GetApiAssociationCommandInput, GetApiAssociationCommandOutput } from "./commands/GetApiAssociationCommand";
|
|
29
30
|
import { GetApiCacheCommandInput, GetApiCacheCommandOutput } from "./commands/GetApiCacheCommand";
|
|
@@ -55,8 +56,8 @@ import { UpdateFunctionCommandInput, UpdateFunctionCommandOutput } from "./comma
|
|
|
55
56
|
import { UpdateGraphqlApiCommandInput, UpdateGraphqlApiCommandOutput } from "./commands/UpdateGraphqlApiCommand";
|
|
56
57
|
import { UpdateResolverCommandInput, UpdateResolverCommandOutput } from "./commands/UpdateResolverCommand";
|
|
57
58
|
import { UpdateTypeCommandInput, UpdateTypeCommandOutput } from "./commands/UpdateTypeCommand";
|
|
58
|
-
export declare type ServiceInputTypes = AssociateApiCommandInput | CreateApiCacheCommandInput | CreateApiKeyCommandInput | CreateDataSourceCommandInput | CreateDomainNameCommandInput | CreateFunctionCommandInput | CreateGraphqlApiCommandInput | CreateResolverCommandInput | CreateTypeCommandInput | DeleteApiCacheCommandInput | DeleteApiKeyCommandInput | DeleteDataSourceCommandInput | DeleteDomainNameCommandInput | DeleteFunctionCommandInput | DeleteGraphqlApiCommandInput | DeleteResolverCommandInput | DeleteTypeCommandInput | DisassociateApiCommandInput | FlushApiCacheCommandInput | GetApiAssociationCommandInput | GetApiCacheCommandInput | GetDataSourceCommandInput | GetDomainNameCommandInput | GetFunctionCommandInput | GetGraphqlApiCommandInput | GetIntrospectionSchemaCommandInput | GetResolverCommandInput | GetSchemaCreationStatusCommandInput | GetTypeCommandInput | ListApiKeysCommandInput | ListDataSourcesCommandInput | ListDomainNamesCommandInput | ListFunctionsCommandInput | ListGraphqlApisCommandInput | ListResolversByFunctionCommandInput | ListResolversCommandInput | ListTagsForResourceCommandInput | ListTypesCommandInput | StartSchemaCreationCommandInput | TagResourceCommandInput | UntagResourceCommandInput | UpdateApiCacheCommandInput | UpdateApiKeyCommandInput | UpdateDataSourceCommandInput | UpdateDomainNameCommandInput | UpdateFunctionCommandInput | UpdateGraphqlApiCommandInput | UpdateResolverCommandInput | UpdateTypeCommandInput;
|
|
59
|
-
export declare type ServiceOutputTypes = AssociateApiCommandOutput | CreateApiCacheCommandOutput | CreateApiKeyCommandOutput | CreateDataSourceCommandOutput | CreateDomainNameCommandOutput | CreateFunctionCommandOutput | CreateGraphqlApiCommandOutput | CreateResolverCommandOutput | CreateTypeCommandOutput | DeleteApiCacheCommandOutput | DeleteApiKeyCommandOutput | DeleteDataSourceCommandOutput | DeleteDomainNameCommandOutput | DeleteFunctionCommandOutput | DeleteGraphqlApiCommandOutput | DeleteResolverCommandOutput | DeleteTypeCommandOutput | DisassociateApiCommandOutput | FlushApiCacheCommandOutput | GetApiAssociationCommandOutput | GetApiCacheCommandOutput | GetDataSourceCommandOutput | GetDomainNameCommandOutput | GetFunctionCommandOutput | GetGraphqlApiCommandOutput | GetIntrospectionSchemaCommandOutput | GetResolverCommandOutput | GetSchemaCreationStatusCommandOutput | GetTypeCommandOutput | ListApiKeysCommandOutput | ListDataSourcesCommandOutput | ListDomainNamesCommandOutput | ListFunctionsCommandOutput | ListGraphqlApisCommandOutput | ListResolversByFunctionCommandOutput | ListResolversCommandOutput | ListTagsForResourceCommandOutput | ListTypesCommandOutput | StartSchemaCreationCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput | UpdateApiCacheCommandOutput | UpdateApiKeyCommandOutput | UpdateDataSourceCommandOutput | UpdateDomainNameCommandOutput | UpdateFunctionCommandOutput | UpdateGraphqlApiCommandOutput | UpdateResolverCommandOutput | UpdateTypeCommandOutput;
|
|
59
|
+
export declare type ServiceInputTypes = AssociateApiCommandInput | CreateApiCacheCommandInput | CreateApiKeyCommandInput | CreateDataSourceCommandInput | CreateDomainNameCommandInput | CreateFunctionCommandInput | CreateGraphqlApiCommandInput | CreateResolverCommandInput | CreateTypeCommandInput | DeleteApiCacheCommandInput | DeleteApiKeyCommandInput | DeleteDataSourceCommandInput | DeleteDomainNameCommandInput | DeleteFunctionCommandInput | DeleteGraphqlApiCommandInput | DeleteResolverCommandInput | DeleteTypeCommandInput | DisassociateApiCommandInput | EvaluateMappingTemplateCommandInput | FlushApiCacheCommandInput | GetApiAssociationCommandInput | GetApiCacheCommandInput | GetDataSourceCommandInput | GetDomainNameCommandInput | GetFunctionCommandInput | GetGraphqlApiCommandInput | GetIntrospectionSchemaCommandInput | GetResolverCommandInput | GetSchemaCreationStatusCommandInput | GetTypeCommandInput | ListApiKeysCommandInput | ListDataSourcesCommandInput | ListDomainNamesCommandInput | ListFunctionsCommandInput | ListGraphqlApisCommandInput | ListResolversByFunctionCommandInput | ListResolversCommandInput | ListTagsForResourceCommandInput | ListTypesCommandInput | StartSchemaCreationCommandInput | TagResourceCommandInput | UntagResourceCommandInput | UpdateApiCacheCommandInput | UpdateApiKeyCommandInput | UpdateDataSourceCommandInput | UpdateDomainNameCommandInput | UpdateFunctionCommandInput | UpdateGraphqlApiCommandInput | UpdateResolverCommandInput | UpdateTypeCommandInput;
|
|
60
|
+
export declare type ServiceOutputTypes = AssociateApiCommandOutput | CreateApiCacheCommandOutput | CreateApiKeyCommandOutput | CreateDataSourceCommandOutput | CreateDomainNameCommandOutput | CreateFunctionCommandOutput | CreateGraphqlApiCommandOutput | CreateResolverCommandOutput | CreateTypeCommandOutput | DeleteApiCacheCommandOutput | DeleteApiKeyCommandOutput | DeleteDataSourceCommandOutput | DeleteDomainNameCommandOutput | DeleteFunctionCommandOutput | DeleteGraphqlApiCommandOutput | DeleteResolverCommandOutput | DeleteTypeCommandOutput | DisassociateApiCommandOutput | EvaluateMappingTemplateCommandOutput | FlushApiCacheCommandOutput | GetApiAssociationCommandOutput | GetApiCacheCommandOutput | GetDataSourceCommandOutput | GetDomainNameCommandOutput | GetFunctionCommandOutput | GetGraphqlApiCommandOutput | GetIntrospectionSchemaCommandOutput | GetResolverCommandOutput | GetSchemaCreationStatusCommandOutput | GetTypeCommandOutput | ListApiKeysCommandOutput | ListDataSourcesCommandOutput | ListDomainNamesCommandOutput | ListFunctionsCommandOutput | ListGraphqlApisCommandOutput | ListResolversByFunctionCommandOutput | ListResolversCommandOutput | ListTagsForResourceCommandOutput | ListTypesCommandOutput | StartSchemaCreationCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput | UpdateApiCacheCommandOutput | UpdateApiKeyCommandOutput | UpdateDataSourceCommandOutput | UpdateDomainNameCommandOutput | UpdateFunctionCommandOutput | UpdateGraphqlApiCommandOutput | UpdateResolverCommandOutput | UpdateTypeCommandOutput;
|
|
60
61
|
export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> {
|
|
61
62
|
/**
|
|
62
63
|
* The HTTP handler to use. Fetch in browser and Https in Nodejs.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
2
|
+
import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types";
|
|
3
|
+
import { AppSyncClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AppSyncClient";
|
|
4
|
+
import { EvaluateMappingTemplateRequest, EvaluateMappingTemplateResponse } from "../models/models_0";
|
|
5
|
+
export interface EvaluateMappingTemplateCommandInput extends EvaluateMappingTemplateRequest {
|
|
6
|
+
}
|
|
7
|
+
export interface EvaluateMappingTemplateCommandOutput extends EvaluateMappingTemplateResponse, __MetadataBearer {
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* <p>Evaluates a given template and returns the response. The mapping template can be a
|
|
11
|
+
* request or response template.</p>
|
|
12
|
+
* <p>Request templates take the incoming request after a GraphQL operation is parsed and
|
|
13
|
+
* convert it into a request configuration for the selected data source operation. Response
|
|
14
|
+
* templates interpret responses from the data source and map it to the shape of the GraphQL
|
|
15
|
+
* field output type.</p>
|
|
16
|
+
* <p>Mapping templates are written in the Apache Velocity Template Language (VTL).</p>
|
|
17
|
+
* @example
|
|
18
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
19
|
+
* ```javascript
|
|
20
|
+
* import { AppSyncClient, EvaluateMappingTemplateCommand } from "@aws-sdk/client-appsync"; // ES Modules import
|
|
21
|
+
* // const { AppSyncClient, EvaluateMappingTemplateCommand } = require("@aws-sdk/client-appsync"); // CommonJS import
|
|
22
|
+
* const client = new AppSyncClient(config);
|
|
23
|
+
* const command = new EvaluateMappingTemplateCommand(input);
|
|
24
|
+
* const response = await client.send(command);
|
|
25
|
+
* ```
|
|
26
|
+
*
|
|
27
|
+
* @see {@link EvaluateMappingTemplateCommandInput} for command's `input` shape.
|
|
28
|
+
* @see {@link EvaluateMappingTemplateCommandOutput} for command's `response` shape.
|
|
29
|
+
* @see {@link AppSyncClientResolvedConfig | config} for AppSyncClient's `config` shape.
|
|
30
|
+
*
|
|
31
|
+
*/
|
|
32
|
+
export declare class EvaluateMappingTemplateCommand extends $Command<EvaluateMappingTemplateCommandInput, EvaluateMappingTemplateCommandOutput, AppSyncClientResolvedConfig> {
|
|
33
|
+
readonly input: EvaluateMappingTemplateCommandInput;
|
|
34
|
+
constructor(input: EvaluateMappingTemplateCommandInput);
|
|
35
|
+
/**
|
|
36
|
+
* @internal
|
|
37
|
+
*/
|
|
38
|
+
resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: AppSyncClientResolvedConfig, options?: __HttpHandlerOptions): Handler<EvaluateMappingTemplateCommandInput, EvaluateMappingTemplateCommandOutput>;
|
|
39
|
+
private serialize;
|
|
40
|
+
private deserialize;
|
|
41
|
+
}
|
|
@@ -16,6 +16,7 @@ export * from "./DeleteGraphqlApiCommand";
|
|
|
16
16
|
export * from "./DeleteResolverCommand";
|
|
17
17
|
export * from "./DeleteTypeCommand";
|
|
18
18
|
export * from "./DisassociateApiCommand";
|
|
19
|
+
export * from "./EvaluateMappingTemplateCommand";
|
|
19
20
|
export * from "./FlushApiCacheCommand";
|
|
20
21
|
export * from "./GetApiAssociationCommand";
|
|
21
22
|
export * from "./GetApiCacheCommand";
|