Skip to content

Commit

Permalink
feat(client-appsync): Adds support for new options on GraphqlAPIs, Re…
Browse files Browse the repository at this point in the history
…solvers and Data Sources for emitting Amazon CloudWatch metrics for enhanced monitoring of AppSync APIs.
  • Loading branch information
awstools committed Feb 12, 2024
1 parent 9d13d68 commit 06af293
Show file tree
Hide file tree
Showing 23 changed files with 706 additions and 4 deletions.
2 changes: 2 additions & 0 deletions clients/client-appsync/src/commands/CreateApiCacheCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export interface CreateApiCacheCommandOutput extends CreateApiCacheResponse, __M
* atRestEncryptionEnabled: true || false,
* apiCachingBehavior: "FULL_REQUEST_CACHING" || "PER_RESOLVER_CACHING", // required
* 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
* healthMetricsConfig: "ENABLED" || "DISABLED",
* };
* const command = new CreateApiCacheCommand(input);
* const response = await client.send(command);
Expand All @@ -53,6 +54,7 @@ export interface CreateApiCacheCommandOutput extends CreateApiCacheResponse, __M
* // atRestEncryptionEnabled: true || false,
* // 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",
* // status: "AVAILABLE" || "CREATING" || "DELETING" || "MODIFYING" || "FAILED",
* // healthMetricsConfig: "ENABLED" || "DISABLED",
* // },
* // };
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ export interface CreateDataSourceCommandOutput extends CreateDataSourceResponse,
* eventBridgeConfig: { // EventBridgeDataSourceConfig
* eventBusArn: "STRING_VALUE", // required
* },
* metricsConfig: "ENABLED" || "DISABLED",
* };
* const command = new CreateDataSourceCommand(input);
* const response = await client.send(command);
Expand Down Expand Up @@ -141,6 +142,7 @@ export interface CreateDataSourceCommandOutput extends CreateDataSourceResponse,
* // eventBridgeConfig: { // EventBridgeDataSourceConfig
* // eventBusArn: "STRING_VALUE", // required
* // },
* // metricsConfig: "ENABLED" || "DISABLED",
* // },
* // };
*
Expand Down
4 changes: 4 additions & 0 deletions clients/client-appsync/src/commands/CreateFunctionCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ export interface CreateFunctionCommandOutput extends CreateFunctionResponse, __M
* @see {@link CreateFunctionCommandOutput} for command's `response` shape.
* @see {@link AppSyncClientResolvedConfig | config} for AppSyncClient's `config` shape.
*
* @throws {@link BadRequestException} (client fault)
* <p>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.</p>
*
* @throws {@link ConcurrentModificationException} (client fault)
* <p>Another modification is in progress at this time and it must complete before you can make your
* change.</p>
Expand Down
10 changes: 10 additions & 0 deletions clients/client-appsync/src/commands/CreateGraphqlApiCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,11 @@ export interface CreateGraphqlApiCommandOutput extends CreateGraphqlApiResponse,
* introspectionConfig: "ENABLED" || "DISABLED",
* queryDepthLimit: Number("int"),
* resolverCountLimit: Number("int"),
* enhancedMetricsConfig: { // EnhancedMetricsConfig
* resolverLevelMetricsBehavior: "FULL_REQUEST_RESOLVER_METRICS" || "PER_RESOLVER_METRICS", // required
* dataSourceLevelMetricsBehavior: "FULL_REQUEST_DATA_SOURCE_METRICS" || "PER_DATA_SOURCE_METRICS", // required
* operationLevelMetricsConfig: "ENABLED" || "DISABLED", // required
* },
* };
* const command = new CreateGraphqlApiCommand(input);
* const response = await client.send(command);
Expand Down Expand Up @@ -163,6 +168,11 @@ export interface CreateGraphqlApiCommandOutput extends CreateGraphqlApiResponse,
* // introspectionConfig: "ENABLED" || "DISABLED",
* // queryDepthLimit: Number("int"),
* // resolverCountLimit: Number("int"),
* // enhancedMetricsConfig: { // EnhancedMetricsConfig
* // resolverLevelMetricsBehavior: "FULL_REQUEST_RESOLVER_METRICS" || "PER_RESOLVER_METRICS", // required
* // dataSourceLevelMetricsBehavior: "FULL_REQUEST_DATA_SOURCE_METRICS" || "PER_DATA_SOURCE_METRICS", // required
* // operationLevelMetricsConfig: "ENABLED" || "DISABLED", // required
* // },
* // },
* // };
*
Expand Down
2 changes: 2 additions & 0 deletions clients/client-appsync/src/commands/CreateResolverCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ export interface CreateResolverCommandOutput extends CreateResolverResponse, __M
* runtimeVersion: "STRING_VALUE", // required
* },
* code: "STRING_VALUE",
* metricsConfig: "ENABLED" || "DISABLED",
* };
* const command = new CreateResolverCommand(input);
* const response = await client.send(command);
Expand Down Expand Up @@ -105,6 +106,7 @@ export interface CreateResolverCommandOutput extends CreateResolverResponse, __M
* // runtimeVersion: "STRING_VALUE", // required
* // },
* // code: "STRING_VALUE",
* // metricsConfig: "ENABLED" || "DISABLED",
* // },
* // };
*
Expand Down
4 changes: 4 additions & 0 deletions clients/client-appsync/src/commands/DeleteFunctionCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ export interface DeleteFunctionCommandOutput extends DeleteFunctionResponse, __M
* @see {@link DeleteFunctionCommandOutput} for command's `response` shape.
* @see {@link AppSyncClientResolvedConfig | config} for AppSyncClient's `config` shape.
*
* @throws {@link BadRequestException} (client fault)
* <p>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.</p>
*
* @throws {@link ConcurrentModificationException} (client fault)
* <p>Another modification is in progress at this time and it must complete before you can make your
* change.</p>
Expand Down
1 change: 1 addition & 0 deletions clients/client-appsync/src/commands/GetApiCacheCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export interface GetApiCacheCommandOutput extends GetApiCacheResponse, __Metadat
* // atRestEncryptionEnabled: true || false,
* // 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",
* // status: "AVAILABLE" || "CREATING" || "DELETING" || "MODIFYING" || "FAILED",
* // healthMetricsConfig: "ENABLED" || "DISABLED",
* // },
* // };
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ export interface GetDataSourceCommandOutput extends GetDataSourceResponse, __Met
* // eventBridgeConfig: { // EventBridgeDataSourceConfig
* // eventBusArn: "STRING_VALUE", // required
* // },
* // metricsConfig: "ENABLED" || "DISABLED",
* // },
* // };
*
Expand Down
5 changes: 5 additions & 0 deletions clients/client-appsync/src/commands/GetGraphqlApiCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,11 @@ export interface GetGraphqlApiCommandOutput extends GetGraphqlApiResponse, __Met
* // introspectionConfig: "ENABLED" || "DISABLED",
* // queryDepthLimit: Number("int"),
* // resolverCountLimit: Number("int"),
* // enhancedMetricsConfig: { // EnhancedMetricsConfig
* // resolverLevelMetricsBehavior: "FULL_REQUEST_RESOLVER_METRICS" || "PER_RESOLVER_METRICS", // required
* // dataSourceLevelMetricsBehavior: "FULL_REQUEST_DATA_SOURCE_METRICS" || "PER_DATA_SOURCE_METRICS", // required
* // operationLevelMetricsConfig: "ENABLED" || "DISABLED", // required
* // },
* // },
* // };
*
Expand Down
1 change: 1 addition & 0 deletions clients/client-appsync/src/commands/GetResolverCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ export interface GetResolverCommandOutput extends GetResolverResponse, __Metadat
* // runtimeVersion: "STRING_VALUE", // required
* // },
* // code: "STRING_VALUE",
* // metricsConfig: "ENABLED" || "DISABLED",
* // },
* // };
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ export interface ListDataSourcesCommandOutput extends ListDataSourcesResponse, _
* // eventBridgeConfig: { // EventBridgeDataSourceConfig
* // eventBusArn: "STRING_VALUE", // required
* // },
* // metricsConfig: "ENABLED" || "DISABLED",
* // },
* // ],
* // nextToken: "STRING_VALUE",
Expand Down
5 changes: 5 additions & 0 deletions clients/client-appsync/src/commands/ListGraphqlApisCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,11 @@ export interface ListGraphqlApisCommandOutput extends ListGraphqlApisResponse, _
* // introspectionConfig: "ENABLED" || "DISABLED",
* // queryDepthLimit: Number("int"),
* // resolverCountLimit: Number("int"),
* // enhancedMetricsConfig: { // EnhancedMetricsConfig
* // resolverLevelMetricsBehavior: "FULL_REQUEST_RESOLVER_METRICS" || "PER_RESOLVER_METRICS", // required
* // dataSourceLevelMetricsBehavior: "FULL_REQUEST_DATA_SOURCE_METRICS" || "PER_DATA_SOURCE_METRICS", // required
* // operationLevelMetricsConfig: "ENABLED" || "DISABLED", // required
* // },
* // },
* // ],
* // nextToken: "STRING_VALUE",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ export interface ListResolversByFunctionCommandOutput extends ListResolversByFun
* // runtimeVersion: "STRING_VALUE", // required
* // },
* // code: "STRING_VALUE",
* // metricsConfig: "ENABLED" || "DISABLED",
* // },
* // ],
* // nextToken: "STRING_VALUE",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ export interface ListResolversCommandOutput extends ListResolversResponse, __Met
* // runtimeVersion: "STRING_VALUE", // required
* // },
* // code: "STRING_VALUE",
* // metricsConfig: "ENABLED" || "DISABLED",
* // },
* // ],
* // nextToken: "STRING_VALUE",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export interface PutGraphqlApiEnvironmentVariablesCommandOutput
* </ul>
* <p>You can create a list of environmental variables by adding it to the <code>environmentVariables</code>
* payload as a list in the format <code>\{"key1":"value1","key2":"value2", …\}</code>. Note that each call of the
* <code>PutGraphqlApiEnvironmentVariables</code> action will result in the overwriting of the existing
* <code>PutGraphqlApiEnvironmentVariables</code> action will result in the overwriting of the existing
* environmental variable list of that API. This means the existing environmental variables will be lost. To avoid
* this, you must include all existing and new environmental variables in the list each time you call this
* action.</p>
Expand Down
2 changes: 2 additions & 0 deletions clients/client-appsync/src/commands/UpdateApiCacheCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export interface UpdateApiCacheCommandOutput extends UpdateApiCacheResponse, __M
* ttl: Number("long"), // required
* apiCachingBehavior: "FULL_REQUEST_CACHING" || "PER_RESOLVER_CACHING", // required
* 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
* healthMetricsConfig: "ENABLED" || "DISABLED",
* };
* const command = new UpdateApiCacheCommand(input);
* const response = await client.send(command);
Expand All @@ -51,6 +52,7 @@ export interface UpdateApiCacheCommandOutput extends UpdateApiCacheResponse, __M
* // atRestEncryptionEnabled: true || false,
* // 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",
* // status: "AVAILABLE" || "CREATING" || "DELETING" || "MODIFYING" || "FAILED",
* // healthMetricsConfig: "ENABLED" || "DISABLED",
* // },
* // };
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ export interface UpdateDataSourceCommandOutput extends UpdateDataSourceResponse,
* eventBridgeConfig: { // EventBridgeDataSourceConfig
* eventBusArn: "STRING_VALUE", // required
* },
* metricsConfig: "ENABLED" || "DISABLED",
* };
* const command = new UpdateDataSourceCommand(input);
* const response = await client.send(command);
Expand Down Expand Up @@ -141,6 +142,7 @@ export interface UpdateDataSourceCommandOutput extends UpdateDataSourceResponse,
* // eventBridgeConfig: { // EventBridgeDataSourceConfig
* // eventBusArn: "STRING_VALUE", // required
* // },
* // metricsConfig: "ENABLED" || "DISABLED",
* // },
* // };
*
Expand Down
4 changes: 4 additions & 0 deletions clients/client-appsync/src/commands/UpdateFunctionCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ export interface UpdateFunctionCommandOutput extends UpdateFunctionResponse, __M
* @see {@link UpdateFunctionCommandOutput} for command's `response` shape.
* @see {@link AppSyncClientResolvedConfig | config} for AppSyncClient's `config` shape.
*
* @throws {@link BadRequestException} (client fault)
* <p>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.</p>
*
* @throws {@link ConcurrentModificationException} (client fault)
* <p>Another modification is in progress at this time and it must complete before you can make your
* change.</p>
Expand Down
10 changes: 10 additions & 0 deletions clients/client-appsync/src/commands/UpdateGraphqlApiCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,11 @@ export interface UpdateGraphqlApiCommandOutput extends UpdateGraphqlApiResponse,
* introspectionConfig: "ENABLED" || "DISABLED",
* queryDepthLimit: Number("int"),
* resolverCountLimit: Number("int"),
* enhancedMetricsConfig: { // EnhancedMetricsConfig
* resolverLevelMetricsBehavior: "FULL_REQUEST_RESOLVER_METRICS" || "PER_RESOLVER_METRICS", // required
* dataSourceLevelMetricsBehavior: "FULL_REQUEST_DATA_SOURCE_METRICS" || "PER_DATA_SOURCE_METRICS", // required
* operationLevelMetricsConfig: "ENABLED" || "DISABLED", // required
* },
* };
* const command = new UpdateGraphqlApiCommand(input);
* const response = await client.send(command);
Expand Down Expand Up @@ -159,6 +164,11 @@ export interface UpdateGraphqlApiCommandOutput extends UpdateGraphqlApiResponse,
* // introspectionConfig: "ENABLED" || "DISABLED",
* // queryDepthLimit: Number("int"),
* // resolverCountLimit: Number("int"),
* // enhancedMetricsConfig: { // EnhancedMetricsConfig
* // resolverLevelMetricsBehavior: "FULL_REQUEST_RESOLVER_METRICS" || "PER_RESOLVER_METRICS", // required
* // dataSourceLevelMetricsBehavior: "FULL_REQUEST_DATA_SOURCE_METRICS" || "PER_DATA_SOURCE_METRICS", // required
* // operationLevelMetricsConfig: "ENABLED" || "DISABLED", // required
* // },
* // },
* // };
*
Expand Down
2 changes: 2 additions & 0 deletions clients/client-appsync/src/commands/UpdateResolverCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ export interface UpdateResolverCommandOutput extends UpdateResolverResponse, __M
* runtimeVersion: "STRING_VALUE", // required
* },
* code: "STRING_VALUE",
* metricsConfig: "ENABLED" || "DISABLED",
* };
* const command = new UpdateResolverCommand(input);
* const response = await client.send(command);
Expand Down Expand Up @@ -103,6 +104,7 @@ export interface UpdateResolverCommandOutput extends UpdateResolverResponse, __M
* // runtimeVersion: "STRING_VALUE", // required
* // },
* // code: "STRING_VALUE",
* // metricsConfig: "ENABLED" || "DISABLED",
* // },
* // };
*
Expand Down
Loading

0 comments on commit 06af293

Please sign in to comment.