Skip to content

Commit 06af293

Browse files
author
awstools
committed
feat(client-appsync): Adds support for new options on GraphqlAPIs, Resolvers and Data Sources for emitting Amazon CloudWatch metrics for enhanced monitoring of AppSync APIs.
1 parent 9d13d68 commit 06af293

23 files changed

+706
-4
lines changed

clients/client-appsync/src/commands/CreateApiCacheCommand.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ export interface CreateApiCacheCommandOutput extends CreateApiCacheResponse, __M
4242
* atRestEncryptionEnabled: true || false,
4343
* apiCachingBehavior: "FULL_REQUEST_CACHING" || "PER_RESOLVER_CACHING", // required
4444
* type: "T2_SMALL" || "T2_MEDIUM" || "R4_LARGE" || "R4_XLARGE" || "R4_2XLARGE" || "R4_4XLARGE" || "R4_8XLARGE" || "SMALL" || "MEDIUM" || "LARGE" || "XLARGE" || "LARGE_2X" || "LARGE_4X" || "LARGE_8X" || "LARGE_12X", // required
45+
* healthMetricsConfig: "ENABLED" || "DISABLED",
4546
* };
4647
* const command = new CreateApiCacheCommand(input);
4748
* const response = await client.send(command);
@@ -53,6 +54,7 @@ export interface CreateApiCacheCommandOutput extends CreateApiCacheResponse, __M
5354
* // atRestEncryptionEnabled: true || false,
5455
* // type: "T2_SMALL" || "T2_MEDIUM" || "R4_LARGE" || "R4_XLARGE" || "R4_2XLARGE" || "R4_4XLARGE" || "R4_8XLARGE" || "SMALL" || "MEDIUM" || "LARGE" || "XLARGE" || "LARGE_2X" || "LARGE_4X" || "LARGE_8X" || "LARGE_12X",
5556
* // status: "AVAILABLE" || "CREATING" || "DELETING" || "MODIFYING" || "FAILED",
57+
* // healthMetricsConfig: "ENABLED" || "DISABLED",
5658
* // },
5759
* // };
5860
*

clients/client-appsync/src/commands/CreateDataSourceCommand.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ export interface CreateDataSourceCommandOutput extends CreateDataSourceResponse,
8686
* eventBridgeConfig: { // EventBridgeDataSourceConfig
8787
* eventBusArn: "STRING_VALUE", // required
8888
* },
89+
* metricsConfig: "ENABLED" || "DISABLED",
8990
* };
9091
* const command = new CreateDataSourceCommand(input);
9192
* const response = await client.send(command);
@@ -141,6 +142,7 @@ export interface CreateDataSourceCommandOutput extends CreateDataSourceResponse,
141142
* // eventBridgeConfig: { // EventBridgeDataSourceConfig
142143
* // eventBusArn: "STRING_VALUE", // required
143144
* // },
145+
* // metricsConfig: "ENABLED" || "DISABLED",
144146
* // },
145147
* // };
146148
*

clients/client-appsync/src/commands/CreateFunctionCommand.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,10 @@ export interface CreateFunctionCommandOutput extends CreateFunctionResponse, __M
9494
* @see {@link CreateFunctionCommandOutput} for command's `response` shape.
9595
* @see {@link AppSyncClientResolvedConfig | config} for AppSyncClient's `config` shape.
9696
*
97+
* @throws {@link BadRequestException} (client fault)
98+
* <p>The request is not well formed. For example, a value is invalid or a required field is missing. Check the
99+
* field values, and then try again.</p>
100+
*
97101
* @throws {@link ConcurrentModificationException} (client fault)
98102
* <p>Another modification is in progress at this time and it must complete before you can make your
99103
* change.</p>

clients/client-appsync/src/commands/CreateGraphqlApiCommand.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,11 @@ export interface CreateGraphqlApiCommandOutput extends CreateGraphqlApiResponse,
9292
* introspectionConfig: "ENABLED" || "DISABLED",
9393
* queryDepthLimit: Number("int"),
9494
* resolverCountLimit: Number("int"),
95+
* enhancedMetricsConfig: { // EnhancedMetricsConfig
96+
* resolverLevelMetricsBehavior: "FULL_REQUEST_RESOLVER_METRICS" || "PER_RESOLVER_METRICS", // required
97+
* dataSourceLevelMetricsBehavior: "FULL_REQUEST_DATA_SOURCE_METRICS" || "PER_DATA_SOURCE_METRICS", // required
98+
* operationLevelMetricsConfig: "ENABLED" || "DISABLED", // required
99+
* },
95100
* };
96101
* const command = new CreateGraphqlApiCommand(input);
97102
* const response = await client.send(command);
@@ -163,6 +168,11 @@ export interface CreateGraphqlApiCommandOutput extends CreateGraphqlApiResponse,
163168
* // introspectionConfig: "ENABLED" || "DISABLED",
164169
* // queryDepthLimit: Number("int"),
165170
* // resolverCountLimit: Number("int"),
171+
* // enhancedMetricsConfig: { // EnhancedMetricsConfig
172+
* // resolverLevelMetricsBehavior: "FULL_REQUEST_RESOLVER_METRICS" || "PER_RESOLVER_METRICS", // required
173+
* // dataSourceLevelMetricsBehavior: "FULL_REQUEST_DATA_SOURCE_METRICS" || "PER_DATA_SOURCE_METRICS", // required
174+
* // operationLevelMetricsConfig: "ENABLED" || "DISABLED", // required
175+
* // },
166176
* // },
167177
* // };
168178
*

clients/client-appsync/src/commands/CreateResolverCommand.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ export interface CreateResolverCommandOutput extends CreateResolverResponse, __M
6969
* runtimeVersion: "STRING_VALUE", // required
7070
* },
7171
* code: "STRING_VALUE",
72+
* metricsConfig: "ENABLED" || "DISABLED",
7273
* };
7374
* const command = new CreateResolverCommand(input);
7475
* const response = await client.send(command);
@@ -105,6 +106,7 @@ export interface CreateResolverCommandOutput extends CreateResolverResponse, __M
105106
* // runtimeVersion: "STRING_VALUE", // required
106107
* // },
107108
* // code: "STRING_VALUE",
109+
* // metricsConfig: "ENABLED" || "DISABLED",
108110
* // },
109111
* // };
110112
*

clients/client-appsync/src/commands/DeleteFunctionCommand.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ export interface DeleteFunctionCommandOutput extends DeleteFunctionResponse, __M
5151
* @see {@link DeleteFunctionCommandOutput} for command's `response` shape.
5252
* @see {@link AppSyncClientResolvedConfig | config} for AppSyncClient's `config` shape.
5353
*
54+
* @throws {@link BadRequestException} (client fault)
55+
* <p>The request is not well formed. For example, a value is invalid or a required field is missing. Check the
56+
* field values, and then try again.</p>
57+
*
5458
* @throws {@link ConcurrentModificationException} (client fault)
5559
* <p>Another modification is in progress at this time and it must complete before you can make your
5660
* change.</p>

clients/client-appsync/src/commands/GetApiCacheCommand.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ export interface GetApiCacheCommandOutput extends GetApiCacheResponse, __Metadat
4848
* // atRestEncryptionEnabled: true || false,
4949
* // type: "T2_SMALL" || "T2_MEDIUM" || "R4_LARGE" || "R4_XLARGE" || "R4_2XLARGE" || "R4_4XLARGE" || "R4_8XLARGE" || "SMALL" || "MEDIUM" || "LARGE" || "XLARGE" || "LARGE_2X" || "LARGE_4X" || "LARGE_8X" || "LARGE_12X",
5050
* // status: "AVAILABLE" || "CREATING" || "DELETING" || "MODIFYING" || "FAILED",
51+
* // healthMetricsConfig: "ENABLED" || "DISABLED",
5152
* // },
5253
* // };
5354
*

clients/client-appsync/src/commands/GetDataSourceCommand.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ export interface GetDataSourceCommandOutput extends GetDataSourceResponse, __Met
9393
* // eventBridgeConfig: { // EventBridgeDataSourceConfig
9494
* // eventBusArn: "STRING_VALUE", // required
9595
* // },
96+
* // metricsConfig: "ENABLED" || "DISABLED",
9697
* // },
9798
* // };
9899
*

clients/client-appsync/src/commands/GetGraphqlApiCommand.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,11 @@ export interface GetGraphqlApiCommandOutput extends GetGraphqlApiResponse, __Met
108108
* // introspectionConfig: "ENABLED" || "DISABLED",
109109
* // queryDepthLimit: Number("int"),
110110
* // resolverCountLimit: Number("int"),
111+
* // enhancedMetricsConfig: { // EnhancedMetricsConfig
112+
* // resolverLevelMetricsBehavior: "FULL_REQUEST_RESOLVER_METRICS" || "PER_RESOLVER_METRICS", // required
113+
* // dataSourceLevelMetricsBehavior: "FULL_REQUEST_DATA_SOURCE_METRICS" || "PER_DATA_SOURCE_METRICS", // required
114+
* // operationLevelMetricsConfig: "ENABLED" || "DISABLED", // required
115+
* // },
111116
* // },
112117
* // };
113118
*

clients/client-appsync/src/commands/GetResolverCommand.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ export interface GetResolverCommandOutput extends GetResolverResponse, __Metadat
7575
* // runtimeVersion: "STRING_VALUE", // required
7676
* // },
7777
* // code: "STRING_VALUE",
78+
* // metricsConfig: "ENABLED" || "DISABLED",
7879
* // },
7980
* // };
8081
*

clients/client-appsync/src/commands/ListDataSourcesCommand.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ export interface ListDataSourcesCommandOutput extends ListDataSourcesResponse, _
9595
* // eventBridgeConfig: { // EventBridgeDataSourceConfig
9696
* // eventBusArn: "STRING_VALUE", // required
9797
* // },
98+
* // metricsConfig: "ENABLED" || "DISABLED",
9899
* // },
99100
* // ],
100101
* // nextToken: "STRING_VALUE",

clients/client-appsync/src/commands/ListGraphqlApisCommand.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,11 @@ export interface ListGraphqlApisCommandOutput extends ListGraphqlApisResponse, _
112112
* // introspectionConfig: "ENABLED" || "DISABLED",
113113
* // queryDepthLimit: Number("int"),
114114
* // resolverCountLimit: Number("int"),
115+
* // enhancedMetricsConfig: { // EnhancedMetricsConfig
116+
* // resolverLevelMetricsBehavior: "FULL_REQUEST_RESOLVER_METRICS" || "PER_RESOLVER_METRICS", // required
117+
* // dataSourceLevelMetricsBehavior: "FULL_REQUEST_DATA_SOURCE_METRICS" || "PER_DATA_SOURCE_METRICS", // required
118+
* // operationLevelMetricsConfig: "ENABLED" || "DISABLED", // required
119+
* // },
115120
* // },
116121
* // ],
117122
* // nextToken: "STRING_VALUE",

clients/client-appsync/src/commands/ListResolversByFunctionCommand.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ export interface ListResolversByFunctionCommandOutput extends ListResolversByFun
7777
* // runtimeVersion: "STRING_VALUE", // required
7878
* // },
7979
* // code: "STRING_VALUE",
80+
* // metricsConfig: "ENABLED" || "DISABLED",
8081
* // },
8182
* // ],
8283
* // nextToken: "STRING_VALUE",

clients/client-appsync/src/commands/ListResolversCommand.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ export interface ListResolversCommandOutput extends ListResolversResponse, __Met
7777
* // runtimeVersion: "STRING_VALUE", // required
7878
* // },
7979
* // code: "STRING_VALUE",
80+
* // metricsConfig: "ENABLED" || "DISABLED",
8081
* // },
8182
* // ],
8283
* // nextToken: "STRING_VALUE",

clients/client-appsync/src/commands/PutGraphqlApiEnvironmentVariablesCommand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export interface PutGraphqlApiEnvironmentVariablesCommandOutput
7777
* </ul>
7878
* <p>You can create a list of environmental variables by adding it to the <code>environmentVariables</code>
7979
* payload as a list in the format <code>\{"key1":"value1","key2":"value2", …\}</code>. Note that each call of the
80-
* <code>PutGraphqlApiEnvironmentVariables</code> action will result in the overwriting of the existing
80+
* <code>PutGraphqlApiEnvironmentVariables</code> action will result in the overwriting of the existing
8181
* environmental variable list of that API. This means the existing environmental variables will be lost. To avoid
8282
* this, you must include all existing and new environmental variables in the list each time you call this
8383
* action.</p>

clients/client-appsync/src/commands/UpdateApiCacheCommand.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ export interface UpdateApiCacheCommandOutput extends UpdateApiCacheResponse, __M
4040
* ttl: Number("long"), // required
4141
* apiCachingBehavior: "FULL_REQUEST_CACHING" || "PER_RESOLVER_CACHING", // required
4242
* type: "T2_SMALL" || "T2_MEDIUM" || "R4_LARGE" || "R4_XLARGE" || "R4_2XLARGE" || "R4_4XLARGE" || "R4_8XLARGE" || "SMALL" || "MEDIUM" || "LARGE" || "XLARGE" || "LARGE_2X" || "LARGE_4X" || "LARGE_8X" || "LARGE_12X", // required
43+
* healthMetricsConfig: "ENABLED" || "DISABLED",
4344
* };
4445
* const command = new UpdateApiCacheCommand(input);
4546
* const response = await client.send(command);
@@ -51,6 +52,7 @@ export interface UpdateApiCacheCommandOutput extends UpdateApiCacheResponse, __M
5152
* // atRestEncryptionEnabled: true || false,
5253
* // type: "T2_SMALL" || "T2_MEDIUM" || "R4_LARGE" || "R4_XLARGE" || "R4_2XLARGE" || "R4_4XLARGE" || "R4_8XLARGE" || "SMALL" || "MEDIUM" || "LARGE" || "XLARGE" || "LARGE_2X" || "LARGE_4X" || "LARGE_8X" || "LARGE_12X",
5354
* // status: "AVAILABLE" || "CREATING" || "DELETING" || "MODIFYING" || "FAILED",
55+
* // healthMetricsConfig: "ENABLED" || "DISABLED",
5456
* // },
5557
* // };
5658
*

clients/client-appsync/src/commands/UpdateDataSourceCommand.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ export interface UpdateDataSourceCommandOutput extends UpdateDataSourceResponse,
8686
* eventBridgeConfig: { // EventBridgeDataSourceConfig
8787
* eventBusArn: "STRING_VALUE", // required
8888
* },
89+
* metricsConfig: "ENABLED" || "DISABLED",
8990
* };
9091
* const command = new UpdateDataSourceCommand(input);
9192
* const response = await client.send(command);
@@ -141,6 +142,7 @@ export interface UpdateDataSourceCommandOutput extends UpdateDataSourceResponse,
141142
* // eventBridgeConfig: { // EventBridgeDataSourceConfig
142143
* // eventBusArn: "STRING_VALUE", // required
143144
* // },
145+
* // metricsConfig: "ENABLED" || "DISABLED",
144146
* // },
145147
* // };
146148
*

clients/client-appsync/src/commands/UpdateFunctionCommand.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,10 @@ export interface UpdateFunctionCommandOutput extends UpdateFunctionResponse, __M
9494
* @see {@link UpdateFunctionCommandOutput} for command's `response` shape.
9595
* @see {@link AppSyncClientResolvedConfig | config} for AppSyncClient's `config` shape.
9696
*
97+
* @throws {@link BadRequestException} (client fault)
98+
* <p>The request is not well formed. For example, a value is invalid or a required field is missing. Check the
99+
* field values, and then try again.</p>
100+
*
97101
* @throws {@link ConcurrentModificationException} (client fault)
98102
* <p>Another modification is in progress at this time and it must complete before you can make your
99103
* change.</p>

clients/client-appsync/src/commands/UpdateGraphqlApiCommand.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,11 @@ export interface UpdateGraphqlApiCommandOutput extends UpdateGraphqlApiResponse,
8888
* introspectionConfig: "ENABLED" || "DISABLED",
8989
* queryDepthLimit: Number("int"),
9090
* resolverCountLimit: Number("int"),
91+
* enhancedMetricsConfig: { // EnhancedMetricsConfig
92+
* resolverLevelMetricsBehavior: "FULL_REQUEST_RESOLVER_METRICS" || "PER_RESOLVER_METRICS", // required
93+
* dataSourceLevelMetricsBehavior: "FULL_REQUEST_DATA_SOURCE_METRICS" || "PER_DATA_SOURCE_METRICS", // required
94+
* operationLevelMetricsConfig: "ENABLED" || "DISABLED", // required
95+
* },
9196
* };
9297
* const command = new UpdateGraphqlApiCommand(input);
9398
* const response = await client.send(command);
@@ -159,6 +164,11 @@ export interface UpdateGraphqlApiCommandOutput extends UpdateGraphqlApiResponse,
159164
* // introspectionConfig: "ENABLED" || "DISABLED",
160165
* // queryDepthLimit: Number("int"),
161166
* // resolverCountLimit: Number("int"),
167+
* // enhancedMetricsConfig: { // EnhancedMetricsConfig
168+
* // resolverLevelMetricsBehavior: "FULL_REQUEST_RESOLVER_METRICS" || "PER_RESOLVER_METRICS", // required
169+
* // dataSourceLevelMetricsBehavior: "FULL_REQUEST_DATA_SOURCE_METRICS" || "PER_DATA_SOURCE_METRICS", // required
170+
* // operationLevelMetricsConfig: "ENABLED" || "DISABLED", // required
171+
* // },
162172
* // },
163173
* // };
164174
*

clients/client-appsync/src/commands/UpdateResolverCommand.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ export interface UpdateResolverCommandOutput extends UpdateResolverResponse, __M
6767
* runtimeVersion: "STRING_VALUE", // required
6868
* },
6969
* code: "STRING_VALUE",
70+
* metricsConfig: "ENABLED" || "DISABLED",
7071
* };
7172
* const command = new UpdateResolverCommand(input);
7273
* const response = await client.send(command);
@@ -103,6 +104,7 @@ export interface UpdateResolverCommandOutput extends UpdateResolverResponse, __M
103104
* // runtimeVersion: "STRING_VALUE", // required
104105
* // },
105106
* // code: "STRING_VALUE",
107+
* // metricsConfig: "ENABLED" || "DISABLED",
106108
* // },
107109
* // };
108110
*

0 commit comments

Comments
 (0)