We recommend new projects start with resources from the AWS provider.
published on Monday, Nov 2, 2026 by Pulumi
We recommend new projects start with resources from the AWS provider.
published on Monday, Nov 2, 2026 by Pulumi
Resource Type definition for AWS::AppSync::ApiCache
Example Usage
Example
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AwsNative = Pulumi.AwsNative;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var graphQlApiId = config.Require("graphQlApiId");
var apiCache = new AwsNative.AppSync.ApiCache("apiCache", new()
{
ApiId = graphQlApiId,
Type = "SMALL",
ApiCachingBehavior = "FULL_REQUEST_CACHING",
Ttl = 1200,
TransitEncryptionEnabled = true,
AtRestEncryptionEnabled = true,
});
});
package main
import (
"github.com/pulumi/pulumi-aws-native/sdk/go/aws/appsync"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
graphQlApiId := cfg.Require("graphQlApiId")
_, err := appsync.NewApiCache(ctx, "apiCache", &appsync.ApiCacheArgs{
ApiId: pulumi.String(graphQlApiId),
Type: pulumi.String("SMALL"),
ApiCachingBehavior: pulumi.String("FULL_REQUEST_CACHING"),
Ttl: pulumi.Int(1200),
TransitEncryptionEnabled: pulumi.Bool(true),
AtRestEncryptionEnabled: pulumi.Bool(true),
})
if err != nil {
return err
}
return nil
})
}
Example coming soon!
Example coming soon!
import * as pulumi from "@pulumi/pulumi";
import * as aws_native from "@pulumi/aws-native";
const config = new pulumi.Config();
const graphQlApiId = config.require("graphQlApiId");
const apiCache = new aws_native.appsync.ApiCache("apiCache", {
apiId: graphQlApiId,
type: "SMALL",
apiCachingBehavior: "FULL_REQUEST_CACHING",
ttl: 1200,
transitEncryptionEnabled: true,
atRestEncryptionEnabled: true,
});
import pulumi
import pulumi_aws_native as aws_native
config = pulumi.Config()
graph_ql_api_id = config.require("graphQlApiId")
api_cache = aws_native.appsync.ApiCache("apiCache",
api_id=graph_ql_api_id,
type="SMALL",
api_caching_behavior="FULL_REQUEST_CACHING",
ttl=1200,
transit_encryption_enabled=True,
at_rest_encryption_enabled=True)
Example coming soon!
Example
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AwsNative = Pulumi.AwsNative;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var graphQlApiId = config.Require("graphQlApiId");
var apiCache = new AwsNative.AppSync.ApiCache("apiCache", new()
{
ApiId = graphQlApiId,
Type = "SMALL",
ApiCachingBehavior = "FULL_REQUEST_CACHING",
Ttl = 1200,
TransitEncryptionEnabled = true,
AtRestEncryptionEnabled = true,
});
});
package main
import (
"github.com/pulumi/pulumi-aws-native/sdk/go/aws/appsync"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
graphQlApiId := cfg.Require("graphQlApiId")
_, err := appsync.NewApiCache(ctx, "apiCache", &appsync.ApiCacheArgs{
ApiId: pulumi.String(graphQlApiId),
Type: pulumi.String("SMALL"),
ApiCachingBehavior: pulumi.String("FULL_REQUEST_CACHING"),
Ttl: pulumi.Int(1200),
TransitEncryptionEnabled: pulumi.Bool(true),
AtRestEncryptionEnabled: pulumi.Bool(true),
})
if err != nil {
return err
}
return nil
})
}
Example coming soon!
Example coming soon!
import * as pulumi from "@pulumi/pulumi";
import * as aws_native from "@pulumi/aws-native";
const config = new pulumi.Config();
const graphQlApiId = config.require("graphQlApiId");
const apiCache = new aws_native.appsync.ApiCache("apiCache", {
apiId: graphQlApiId,
type: "SMALL",
apiCachingBehavior: "FULL_REQUEST_CACHING",
ttl: 1200,
transitEncryptionEnabled: true,
atRestEncryptionEnabled: true,
});
import pulumi
import pulumi_aws_native as aws_native
config = pulumi.Config()
graph_ql_api_id = config.require("graphQlApiId")
api_cache = aws_native.appsync.ApiCache("apiCache",
api_id=graph_ql_api_id,
type="SMALL",
api_caching_behavior="FULL_REQUEST_CACHING",
ttl=1200,
transit_encryption_enabled=True,
at_rest_encryption_enabled=True)
Example coming soon!
Create ApiCache Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ApiCache(name: string, args: ApiCacheArgs, opts?: CustomResourceOptions);@overload
def ApiCache(resource_name: str,
args: ApiCacheArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ApiCache(resource_name: str,
opts: Optional[ResourceOptions] = None,
api_caching_behavior: Optional[str] = None,
api_id: Optional[str] = None,
ttl: Optional[int] = None,
type: Optional[str] = None,
at_rest_encryption_enabled: Optional[bool] = None,
health_metrics_config: Optional[str] = None,
transit_encryption_enabled: Optional[bool] = None)func NewApiCache(ctx *Context, name string, args ApiCacheArgs, opts ...ResourceOption) (*ApiCache, error)public ApiCache(string name, ApiCacheArgs args, CustomResourceOptions? opts = null)
public ApiCache(String name, ApiCacheArgs args)
public ApiCache(String name, ApiCacheArgs args, CustomResourceOptions options)
type: aws-native:appsync:ApiCache
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "aws-native_appsync_api_cache" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args ApiCacheArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ApiCacheArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ApiCacheArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ApiCacheArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ApiCacheArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
ApiCache Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The ApiCache resource accepts the following input properties:
- Api
Caching stringBehavior - Caching behavior, such as FULL_REQUEST_CACHING, PER_RESOLVER_CACHING, or OPERATION_LEVEL_CACHING
- Api
Id string - Unique AWS AppSync GraphQL API identifier.
- Ttl int
- TTL in seconds for cache entries. Valid values are 1-3600.
- Type string
- The cache instance type, such as SMALL, LARGE and LARGE_4X
- At
Rest boolEncryption Enabled - At-rest encryption flag for cache. You cannot update this setting after creation.
- Health
Metrics stringConfig - Controls how cache health metrics will be emitted to CloudWatch. Cache health metrics include NetworkBandwidthOutAllowanceExceeded and EngineCPUUtilization
- Transit
Encryption boolEnabled - Transit encryption flag when connecting to cache. You cannot update this setting after creation.
- Api
Caching stringBehavior - Caching behavior, such as FULL_REQUEST_CACHING, PER_RESOLVER_CACHING, or OPERATION_LEVEL_CACHING
- Api
Id string - Unique AWS AppSync GraphQL API identifier.
- Ttl int
- TTL in seconds for cache entries. Valid values are 1-3600.
- Type string
- The cache instance type, such as SMALL, LARGE and LARGE_4X
- At
Rest boolEncryption Enabled - At-rest encryption flag for cache. You cannot update this setting after creation.
- Health
Metrics stringConfig - Controls how cache health metrics will be emitted to CloudWatch. Cache health metrics include NetworkBandwidthOutAllowanceExceeded and EngineCPUUtilization
- Transit
Encryption boolEnabled - Transit encryption flag when connecting to cache. You cannot update this setting after creation.
- api_
caching_ stringbehavior - Caching behavior, such as FULL_REQUEST_CACHING, PER_RESOLVER_CACHING, or OPERATION_LEVEL_CACHING
- api_
id string - Unique AWS AppSync GraphQL API identifier.
- ttl number
- TTL in seconds for cache entries. Valid values are 1-3600.
- type string
- The cache instance type, such as SMALL, LARGE and LARGE_4X
- at_
rest_ boolencryption_ enabled - At-rest encryption flag for cache. You cannot update this setting after creation.
- health_
metrics_ stringconfig - Controls how cache health metrics will be emitted to CloudWatch. Cache health metrics include NetworkBandwidthOutAllowanceExceeded and EngineCPUUtilization
- transit_
encryption_ boolenabled - Transit encryption flag when connecting to cache. You cannot update this setting after creation.
- api
Caching StringBehavior - Caching behavior, such as FULL_REQUEST_CACHING, PER_RESOLVER_CACHING, or OPERATION_LEVEL_CACHING
- api
Id String - Unique AWS AppSync GraphQL API identifier.
- ttl Integer
- TTL in seconds for cache entries. Valid values are 1-3600.
- type String
- The cache instance type, such as SMALL, LARGE and LARGE_4X
- at
Rest BooleanEncryption Enabled - At-rest encryption flag for cache. You cannot update this setting after creation.
- health
Metrics StringConfig - Controls how cache health metrics will be emitted to CloudWatch. Cache health metrics include NetworkBandwidthOutAllowanceExceeded and EngineCPUUtilization
- transit
Encryption BooleanEnabled - Transit encryption flag when connecting to cache. You cannot update this setting after creation.
- api
Caching stringBehavior - Caching behavior, such as FULL_REQUEST_CACHING, PER_RESOLVER_CACHING, or OPERATION_LEVEL_CACHING
- api
Id string - Unique AWS AppSync GraphQL API identifier.
- ttl number
- TTL in seconds for cache entries. Valid values are 1-3600.
- type string
- The cache instance type, such as SMALL, LARGE and LARGE_4X
- at
Rest booleanEncryption Enabled - At-rest encryption flag for cache. You cannot update this setting after creation.
- health
Metrics stringConfig - Controls how cache health metrics will be emitted to CloudWatch. Cache health metrics include NetworkBandwidthOutAllowanceExceeded and EngineCPUUtilization
- transit
Encryption booleanEnabled - Transit encryption flag when connecting to cache. You cannot update this setting after creation.
- api_
caching_ strbehavior - Caching behavior, such as FULL_REQUEST_CACHING, PER_RESOLVER_CACHING, or OPERATION_LEVEL_CACHING
- api_
id str - Unique AWS AppSync GraphQL API identifier.
- ttl int
- TTL in seconds for cache entries. Valid values are 1-3600.
- type str
- The cache instance type, such as SMALL, LARGE and LARGE_4X
- at_
rest_ boolencryption_ enabled - At-rest encryption flag for cache. You cannot update this setting after creation.
- health_
metrics_ strconfig - Controls how cache health metrics will be emitted to CloudWatch. Cache health metrics include NetworkBandwidthOutAllowanceExceeded and EngineCPUUtilization
- transit_
encryption_ boolenabled - Transit encryption flag when connecting to cache. You cannot update this setting after creation.
- api
Caching StringBehavior - Caching behavior, such as FULL_REQUEST_CACHING, PER_RESOLVER_CACHING, or OPERATION_LEVEL_CACHING
- api
Id String - Unique AWS AppSync GraphQL API identifier.
- ttl Number
- TTL in seconds for cache entries. Valid values are 1-3600.
- type String
- The cache instance type, such as SMALL, LARGE and LARGE_4X
- at
Rest BooleanEncryption Enabled - At-rest encryption flag for cache. You cannot update this setting after creation.
- health
Metrics StringConfig - Controls how cache health metrics will be emitted to CloudWatch. Cache health metrics include NetworkBandwidthOutAllowanceExceeded and EngineCPUUtilization
- transit
Encryption BooleanEnabled - Transit encryption flag when connecting to cache. You cannot update this setting after creation.
Outputs
All input properties are implicitly available as output properties. Additionally, the ApiCache resource produces the following output properties:
Package Details
- Repository
- AWS Native pulumi/pulumi-aws-native
- License
- Apache-2.0
We recommend new projects start with resources from the AWS provider.
published on Monday, Nov 2, 2026 by Pulumi