Skip to content

Commit 4a66449

Browse files
author
awstools
committed
feat(client-appsync): Add support for operation level caching
1 parent e0bd8ae commit 4a66449

File tree

7 files changed

+55
-34
lines changed

7 files changed

+55
-34
lines changed

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export interface CreateApiCacheCommandOutput extends CreateApiCacheResponse, __M
4040
* ttl: Number("long"), // required
4141
* transitEncryptionEnabled: true || false,
4242
* atRestEncryptionEnabled: true || false,
43-
* apiCachingBehavior: "FULL_REQUEST_CACHING" || "PER_RESOLVER_CACHING", // required
43+
* apiCachingBehavior: "FULL_REQUEST_CACHING" || "PER_RESOLVER_CACHING" || "OPERATION_LEVEL_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
4545
* healthMetricsConfig: "ENABLED" || "DISABLED",
4646
* };
@@ -49,7 +49,7 @@ export interface CreateApiCacheCommandOutput extends CreateApiCacheResponse, __M
4949
* // { // CreateApiCacheResponse
5050
* // apiCache: { // ApiCache
5151
* // ttl: Number("long"),
52-
* // apiCachingBehavior: "FULL_REQUEST_CACHING" || "PER_RESOLVER_CACHING",
52+
* // apiCachingBehavior: "FULL_REQUEST_CACHING" || "PER_RESOLVER_CACHING" || "OPERATION_LEVEL_CACHING",
5353
* // transitEncryptionEnabled: true || false,
5454
* // atRestEncryptionEnabled: true || false,
5555
* // 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",

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

+3-4
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,9 @@ export interface CreateChannelNamespaceCommandOutput extends CreateChannelNamesp
9696
* make your change.</p>
9797
*
9898
* @throws {@link ConflictException} (client fault)
99-
* <p>A conflict with a previous successful update is detected. This typically
100-
* occurs when the previous update did not have time to propagate before the next update was
101-
* made. A retry (with appropriate backoff logic) is the recommended response to this
102-
* exception.</p>
99+
* <p>A conflict with a previous successful update is detected. This typically occurs when the
100+
* previous update did not have time to propagate before the next update was made. A retry
101+
* (with appropriate backoff logic) is the recommended response to this exception.</p>
103102
*
104103
* @throws {@link InternalFailureException} (server fault)
105104
* <p>An internal AppSync error occurred. Try your request again.</p>

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export interface GetApiCacheCommandOutput extends GetApiCacheResponse, __Metadat
4343
* // { // GetApiCacheResponse
4444
* // apiCache: { // ApiCache
4545
* // ttl: Number("long"),
46-
* // apiCachingBehavior: "FULL_REQUEST_CACHING" || "PER_RESOLVER_CACHING",
46+
* // apiCachingBehavior: "FULL_REQUEST_CACHING" || "PER_RESOLVER_CACHING" || "OPERATION_LEVEL_CACHING",
4747
* // transitEncryptionEnabled: true || false,
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",

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

+1-2
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ export interface ListChannelNamespacesCommandOutput extends ListChannelNamespace
3131
* <p>Lists the channel namespaces for a specified <code>Api</code>.</p>
3232
* <p>
3333
* <code>ListChannelNamespaces</code> returns only high level details for the channel
34-
* namespace. To retrieve code handlers, use
35-
* <code>GetChannelNamespace</code>.</p>
34+
* namespace. To retrieve code handlers, use <code>GetChannelNamespace</code>.</p>
3635
* @example
3736
* Use a bare-bones client and the command you need to make an API call.
3837
* ```javascript

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export interface UpdateApiCacheCommandOutput extends UpdateApiCacheResponse, __M
3838
* const input = { // UpdateApiCacheRequest
3939
* apiId: "STRING_VALUE", // required
4040
* ttl: Number("long"), // required
41-
* apiCachingBehavior: "FULL_REQUEST_CACHING" || "PER_RESOLVER_CACHING", // required
41+
* apiCachingBehavior: "FULL_REQUEST_CACHING" || "PER_RESOLVER_CACHING" || "OPERATION_LEVEL_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
4343
* healthMetricsConfig: "ENABLED" || "DISABLED",
4444
* };
@@ -47,7 +47,7 @@ export interface UpdateApiCacheCommandOutput extends UpdateApiCacheResponse, __M
4747
* // { // UpdateApiCacheResponse
4848
* // apiCache: { // ApiCache
4949
* // ttl: Number("long"),
50-
* // apiCachingBehavior: "FULL_REQUEST_CACHING" || "PER_RESOLVER_CACHING",
50+
* // apiCachingBehavior: "FULL_REQUEST_CACHING" || "PER_RESOLVER_CACHING" || "OPERATION_LEVEL_CACHING",
5151
* // transitEncryptionEnabled: true || false,
5252
* // atRestEncryptionEnabled: true || false,
5353
* // 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",

clients/client-appsync/src/models/models_0.ts

+32-15
Original file line numberDiff line numberDiff line change
@@ -316,9 +316,8 @@ export interface EventConfig {
316316
}
317317

318318
/**
319-
* <p>Describes an AppSync API. You can use <code>Api</code> for an AppSync
320-
* API with your preferred configuration, such as an Event API that provides real-time message
321-
* publishing and message subscriptions over WebSockets.</p>
319+
* <p>Describes an AppSync API. You can use <code>Api</code> for an AppSync API with your preferred configuration, such as an Event API that provides
320+
* real-time message publishing and message subscriptions over WebSockets.</p>
322321
* @public
323322
*/
324323
export interface Api {
@@ -456,6 +455,7 @@ export interface ApiAssociation {
456455
*/
457456
export const ApiCachingBehavior = {
458457
FULL_REQUEST_CACHING: "FULL_REQUEST_CACHING",
458+
OPERATION_LEVEL_CACHING: "OPERATION_LEVEL_CACHING",
459459
PER_RESOLVER_CACHING: "PER_RESOLVER_CACHING",
460460
} as const;
461461

@@ -539,14 +539,19 @@ export interface ApiCache {
539539
* <ul>
540540
* <li>
541541
* <p>
542-
* <b>FULL_REQUEST_CACHING</b>: All requests are fully
543-
* cached.</p>
542+
* <b>FULL_REQUEST_CACHING</b>: All requests from the
543+
* same user are cached. Individual resolvers are automatically cached. All API calls
544+
* will try to return responses from the cache.</p>
544545
* </li>
545546
* <li>
546547
* <p>
547548
* <b>PER_RESOLVER_CACHING</b>: Individual resolvers
548549
* that you specify are cached.</p>
549550
* </li>
551+
* <li>
552+
* <p>
553+
* <b>OPERATION_LEVEL_CACHING</b>: Full requests are cached together and returned without executing resolvers.</p>
554+
* </li>
550555
* </ul>
551556
* @public
552557
*/
@@ -1515,14 +1520,19 @@ export interface CreateApiCacheRequest {
15151520
* <ul>
15161521
* <li>
15171522
* <p>
1518-
* <b>FULL_REQUEST_CACHING</b>: All requests are fully
1519-
* cached.</p>
1523+
* <b>FULL_REQUEST_CACHING</b>: All requests from the
1524+
* same user are cached. Individual resolvers are automatically cached. All API calls
1525+
* will try to return responses from the cache.</p>
15201526
* </li>
15211527
* <li>
15221528
* <p>
15231529
* <b>PER_RESOLVER_CACHING</b>: Individual resolvers
15241530
* that you specify are cached.</p>
15251531
* </li>
1532+
* <li>
1533+
* <p>
1534+
* <b>OPERATION_LEVEL_CACHING</b>: Full requests are cached together and returned without executing resolvers.</p>
1535+
* </li>
15261536
* </ul>
15271537
* @public
15281538
*/
@@ -1678,10 +1688,9 @@ export interface CreateApiKeyResponse {
16781688
}
16791689

16801690
/**
1681-
* <p>A conflict with a previous successful update is detected. This typically
1682-
* occurs when the previous update did not have time to propagate before the next update was
1683-
* made. A retry (with appropriate backoff logic) is the recommended response to this
1684-
* exception.</p>
1691+
* <p>A conflict with a previous successful update is detected. This typically occurs when the
1692+
* previous update did not have time to propagate before the next update was made. A retry
1693+
* (with appropriate backoff logic) is the recommended response to this exception.</p>
16851694
* @public
16861695
*/
16871696
export class ConflictException extends __BaseException {
@@ -1748,7 +1757,9 @@ export interface CreateChannelNamespaceRequest {
17481757
}
17491758

17501759
/**
1751-
* <p>Describes a channel namespace associated with an <code>Api</code>. The <code>ChannelNamespace</code> contains the definitions for code handlers for the <code>Api</code>.</p>
1760+
* <p>Describes a channel namespace associated with an <code>Api</code>. The
1761+
* <code>ChannelNamespace</code> contains the definitions for code handlers for the
1762+
* <code>Api</code>.</p>
17521763
* @public
17531764
*/
17541765
export interface ChannelNamespace {
@@ -2226,7 +2237,8 @@ export interface DataSource {
22262237
* </li>
22272238
* <li>
22282239
* <p>
2229-
* <b>AMAZON_BEDROCK_RUNTIME</b>: The data source is the Amazon Bedrock runtime.</p>
2240+
* <b>AMAZON_BEDROCK_RUNTIME</b>: The data source is the
2241+
* Amazon Bedrock runtime.</p>
22302242
* </li>
22312243
* <li>
22322244
* <p>
@@ -5666,14 +5678,19 @@ export interface UpdateApiCacheRequest {
56665678
* <ul>
56675679
* <li>
56685680
* <p>
5669-
* <b>FULL_REQUEST_CACHING</b>: All requests are fully
5670-
* cached.</p>
5681+
* <b>FULL_REQUEST_CACHING</b>: All requests from the
5682+
* same user are cached. Individual resolvers are automatically cached. All API calls
5683+
* will try to return responses from the cache.</p>
56715684
* </li>
56725685
* <li>
56735686
* <p>
56745687
* <b>PER_RESOLVER_CACHING</b>: Individual resolvers
56755688
* that you specify are cached.</p>
56765689
* </li>
5690+
* <li>
5691+
* <p>
5692+
* <b>OPERATION_LEVEL_CACHING</b>: Full requests are cached together and returned without executing resolvers.</p>
5693+
* </li>
56775694
* </ul>
56785695
* @public
56795696
*/

0 commit comments

Comments
 (0)