1. Registry
  2. Packages
  3. AWS Cloud Control
  4. API Docs
  5. appsync
  6. ApiCache

We recommend new projects start with resources from the AWS provider.

Viewing docs for AWS Cloud Control v1.85.0
published on Monday, Nov 2, 2026 by Pulumi
aws-native logo aws-native logo AWS Cloud Control

We recommend new projects start with resources from the AWS provider.

Viewing docs for AWS Cloud Control v1.85.0
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:

    ApiCachingBehavior string
    Caching behavior, such as FULL_REQUEST_CACHING, PER_RESOLVER_CACHING, or OPERATION_LEVEL_CACHING
    ApiId 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
    AtRestEncryptionEnabled bool
    At-rest encryption flag for cache. You cannot update this setting after creation.
    HealthMetricsConfig string
    Controls how cache health metrics will be emitted to CloudWatch. Cache health metrics include NetworkBandwidthOutAllowanceExceeded and EngineCPUUtilization
    TransitEncryptionEnabled bool
    Transit encryption flag when connecting to cache. You cannot update this setting after creation.
    ApiCachingBehavior string
    Caching behavior, such as FULL_REQUEST_CACHING, PER_RESOLVER_CACHING, or OPERATION_LEVEL_CACHING
    ApiId 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
    AtRestEncryptionEnabled bool
    At-rest encryption flag for cache. You cannot update this setting after creation.
    HealthMetricsConfig string
    Controls how cache health metrics will be emitted to CloudWatch. Cache health metrics include NetworkBandwidthOutAllowanceExceeded and EngineCPUUtilization
    TransitEncryptionEnabled bool
    Transit encryption flag when connecting to cache. You cannot update this setting after creation.
    api_caching_behavior string
    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_encryption_enabled bool
    At-rest encryption flag for cache. You cannot update this setting after creation.
    health_metrics_config string
    Controls how cache health metrics will be emitted to CloudWatch. Cache health metrics include NetworkBandwidthOutAllowanceExceeded and EngineCPUUtilization
    transit_encryption_enabled bool
    Transit encryption flag when connecting to cache. You cannot update this setting after creation.
    apiCachingBehavior String
    Caching behavior, such as FULL_REQUEST_CACHING, PER_RESOLVER_CACHING, or OPERATION_LEVEL_CACHING
    apiId 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
    atRestEncryptionEnabled Boolean
    At-rest encryption flag for cache. You cannot update this setting after creation.
    healthMetricsConfig String
    Controls how cache health metrics will be emitted to CloudWatch. Cache health metrics include NetworkBandwidthOutAllowanceExceeded and EngineCPUUtilization
    transitEncryptionEnabled Boolean
    Transit encryption flag when connecting to cache. You cannot update this setting after creation.
    apiCachingBehavior string
    Caching behavior, such as FULL_REQUEST_CACHING, PER_RESOLVER_CACHING, or OPERATION_LEVEL_CACHING
    apiId 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
    atRestEncryptionEnabled boolean
    At-rest encryption flag for cache. You cannot update this setting after creation.
    healthMetricsConfig string
    Controls how cache health metrics will be emitted to CloudWatch. Cache health metrics include NetworkBandwidthOutAllowanceExceeded and EngineCPUUtilization
    transitEncryptionEnabled boolean
    Transit encryption flag when connecting to cache. You cannot update this setting after creation.
    api_caching_behavior str
    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_encryption_enabled bool
    At-rest encryption flag for cache. You cannot update this setting after creation.
    health_metrics_config str
    Controls how cache health metrics will be emitted to CloudWatch. Cache health metrics include NetworkBandwidthOutAllowanceExceeded and EngineCPUUtilization
    transit_encryption_enabled bool
    Transit encryption flag when connecting to cache. You cannot update this setting after creation.
    apiCachingBehavior String
    Caching behavior, such as FULL_REQUEST_CACHING, PER_RESOLVER_CACHING, or OPERATION_LEVEL_CACHING
    apiId 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
    atRestEncryptionEnabled Boolean
    At-rest encryption flag for cache. You cannot update this setting after creation.
    healthMetricsConfig String
    Controls how cache health metrics will be emitted to CloudWatch. Cache health metrics include NetworkBandwidthOutAllowanceExceeded and EngineCPUUtilization
    transitEncryptionEnabled Boolean
    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:

    AwsId string
    The CloudFormation primary identifier for an ApiCache. Mirrors ApiId once the resource exists; populated by the handler. Customers should reference the ApiCache by ApiId.
    Id string
    The provider-assigned unique ID for this managed resource.
    AwsId string
    The CloudFormation primary identifier for an ApiCache. Mirrors ApiId once the resource exists; populated by the handler. Customers should reference the ApiCache by ApiId.
    Id string
    The provider-assigned unique ID for this managed resource.
    aws_id string
    The CloudFormation primary identifier for an ApiCache. Mirrors ApiId once the resource exists; populated by the handler. Customers should reference the ApiCache by ApiId.
    id string
    The provider-assigned unique ID for this managed resource.
    awsId String
    The CloudFormation primary identifier for an ApiCache. Mirrors ApiId once the resource exists; populated by the handler. Customers should reference the ApiCache by ApiId.
    id String
    The provider-assigned unique ID for this managed resource.
    awsId string
    The CloudFormation primary identifier for an ApiCache. Mirrors ApiId once the resource exists; populated by the handler. Customers should reference the ApiCache by ApiId.
    id string
    The provider-assigned unique ID for this managed resource.
    aws_id str
    The CloudFormation primary identifier for an ApiCache. Mirrors ApiId once the resource exists; populated by the handler. Customers should reference the ApiCache by ApiId.
    id str
    The provider-assigned unique ID for this managed resource.
    awsId String
    The CloudFormation primary identifier for an ApiCache. Mirrors ApiId once the resource exists; populated by the handler. Customers should reference the ApiCache by ApiId.
    id String
    The provider-assigned unique ID for this managed resource.

    Package Details

    Repository
    AWS Native pulumi/pulumi-aws-native
    License
    Apache-2.0
    aws-native logo aws-native logo AWS Cloud Control

    We recommend new projects start with resources from the AWS provider.

    Viewing docs for AWS Cloud Control v1.85.0
    published on Monday, Nov 2, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial