Resource: awsAppsyncApiCache
Provides an AppSync API Cache.
Example Usage
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
const awsAppsyncGraphqlApiExample = new aws.appsyncGraphqlApi.AppsyncGraphqlApi(
this,
"example",
{
authenticationType: "API_KEY",
name: "example",
}
);
const awsAppsyncApiCacheExample = new aws.appsyncApiCache.AppsyncApiCache(
this,
"example_1",
{
apiCachingBehavior: "FULL_REQUEST_CACHING",
apiId: awsAppsyncGraphqlApiExample.id,
ttl: 900,
type: "LARGE",
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
awsAppsyncApiCacheExample.overrideLogicalId("example");
Argument Reference
The following arguments are supported:
apiId
- (Required) GraphQL API ID.apiCachingBehavior
- (Required) Caching behavior. Valid values areFULL_REQUEST_CACHING
andPER_RESOLVER_CACHING
.type
- (Required) Cache instance type. Valid values aresmall
,medium
,large
,xlarge
,LARGE_2X
,LARGE_4X
,LARGE_8X
,LARGE_12X
,T2_SMALL
,T2_MEDIUM
,R4_LARGE
,R4_XLARGE
,R4_2XLARGE
,R4_4XLARGE
,R4_8XLARGE
.ttl
- (Required) TTL in seconds for cache entries.atRestEncryptionEnabled
- (Optional) At-rest encryption flag for cache. You cannot update this setting after creation.transitEncryptionEnabled
- (Optional) Transit encryption flag when connecting to cache. You cannot update this setting after creation.
Attributes Reference
In addition to all arguments above, the following attributes are exported:
id
- AppSync API ID.
Import
awsAppsyncApiCache
can be imported using the AppSync API ID, e.g.,