Skip to content

CreateApiCacheRequest

Source code in docs_src/capo_appsync/types/create_api_cache_request.py
class CreateApiCacheRequest(TypedDict, closed=True):
    api_id: "capo_appsync.types.string.String"
    """<p>The GraphQL API ID.</p>"""
    ttl: "capo_appsync.types.long.Long"
    """<p>TTL in seconds for cache entries.</p> <p>Valid values are 1–3,600 seconds.</p>"""
    transit_encryption_enabled: "capo_appsync.types.boolean.Boolean"
    """<p>Transit encryption flag when connecting to cache. You cannot update this setting after creation.</p>"""
    at_rest_encryption_enabled: "capo_appsync.types.boolean.Boolean"
    """<p>At-rest encryption flag for cache. You cannot update this setting after creation.</p>"""
    api_caching_behavior: "capo_appsync.types.api_caching_behavior.ApiCachingBehavior"
    """<p>Caching behavior.</p> <ul> <li> <p> <b>FULL_REQUEST_CACHING</b>: All requests from the same user are cached. Individual resolvers are automatically cached. All API calls will try to return responses from the cache.</p> </li> <li> <p> <b>PER_RESOLVER_CACHING</b>: Individual resolvers that you specify are cached.</p> </li> <li> <p> <b>OPERATION_LEVEL_CACHING</b>: Full requests are cached together and returned without executing resolvers.</p> </li> </ul>"""
    type: "capo_appsync.types.api_cache_type.ApiCacheType"
    """<p>The cache instance type. Valid values are </p> <ul> <li> <p> <code>SMALL</code> </p> </li> <li> <p> <code>MEDIUM</code> </p> </li> <li> <p> <code>LARGE</code> </p> </li> <li> <p> <code>XLARGE</code> </p> </li> <li> <p> <code>LARGE_2X</code> </p> </li> <li> <p> <code>LARGE_4X</code> </p> </li> <li> <p> <code>LARGE_8X</code> (not available in all regions)</p> </li> <li> <p> <code>LARGE_12X</code> </p> </li> </ul> <p>Historically, instance types were identified by an EC2-style value. As of July 2020, this is deprecated, and the generic identifiers above should be used.</p> <p>The following legacy instance types are available, but their use is discouraged:</p> <ul> <li> <p> <b>T2_SMALL</b>: A t2.small instance type.</p> </li> <li> <p> <b>T2_MEDIUM</b>: A t2.medium instance type.</p> </li> <li> <p> <b>R4_LARGE</b>: A r4.large instance type.</p> </li> <li> <p> <b>R4_XLARGE</b>: A r4.xlarge instance type.</p> </li> <li> <p> <b>R4_2XLARGE</b>: A r4.2xlarge instance type.</p> </li> <li> <p> <b>R4_4XLARGE</b>: A r4.4xlarge instance type.</p> </li> <li> <p> <b>R4_8XLARGE</b>: A r4.8xlarge instance type.</p> </li> </ul>"""
    health_metrics_config: NotRequired[
        "capo_appsync.types.cache_health_metrics_config.CacheHealthMetricsConfig"
    ]
    """<p>Controls how cache health metrics will be emitted to CloudWatch. Cache health metrics include:</p> <ul> <li> <p>NetworkBandwidthOutAllowanceExceeded: The network packets dropped because the throughput exceeded the aggregated bandwidth limit. This is useful for diagnosing bottlenecks in a cache configuration.</p> </li> <li> <p>EngineCPUUtilization: The CPU utilization (percentage) allocated to the Redis process. This is useful for diagnosing bottlenecks in a cache configuration.</p> </li> </ul> <p>Metrics will be recorded by API ID. You can set the value to <code>ENABLED</code> or <code>DISABLED</code>.</p>"""

api_caching_behavior instance-attribute

api_caching_behavior: ApiCachingBehavior

Caching behavior.

  • FULL_REQUEST_CACHING: All requests from the same user are cached. Individual resolvers are automatically cached. All API calls will try to return responses from the cache.

  • PER_RESOLVER_CACHING: Individual resolvers that you specify are cached.

  • OPERATION_LEVEL_CACHING: Full requests are cached together and returned without executing resolvers.

api_id instance-attribute

api_id: String

The GraphQL API ID.

at_rest_encryption_enabled instance-attribute

at_rest_encryption_enabled: Boolean

At-rest encryption flag for cache. You cannot update this setting after creation.

health_metrics_config instance-attribute

health_metrics_config: NotRequired[CacheHealthMetricsConfig]

Controls how cache health metrics will be emitted to CloudWatch. Cache health metrics include:

  • NetworkBandwidthOutAllowanceExceeded: The network packets dropped because the throughput exceeded the aggregated bandwidth limit. This is useful for diagnosing bottlenecks in a cache configuration.

  • EngineCPUUtilization: The CPU utilization (percentage) allocated to the Redis process. This is useful for diagnosing bottlenecks in a cache configuration.

Metrics will be recorded by API ID. You can set the value to ENABLED or DISABLED.

transit_encryption_enabled instance-attribute

transit_encryption_enabled: Boolean

Transit encryption flag when connecting to cache. You cannot update this setting after creation.

ttl instance-attribute

ttl: Long

TTL in seconds for cache entries.

Valid values are 1–3,600 seconds.

type instance-attribute

The cache instance type. Valid values are

  • SMALL

  • MEDIUM

  • LARGE

  • XLARGE

  • LARGE_2X

  • LARGE_4X

  • LARGE_8X (not available in all regions)

  • LARGE_12X

Historically, instance types were identified by an EC2-style value. As of July 2020, this is deprecated, and the generic identifiers above should be used.

The following legacy instance types are available, but their use is discouraged:

  • T2_SMALL: A t2.small instance type.

  • T2_MEDIUM: A t2.medium instance type.

  • R4_LARGE: A r4.large instance type.

  • R4_XLARGE: A r4.xlarge instance type.

  • R4_2XLARGE: A r4.2xlarge instance type.

  • R4_4XLARGE: A r4.4xlarge instance type.

  • R4_8XLARGE: A r4.8xlarge instance type.