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
*

0 commit comments

Comments
 (0)