{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-elasticache/json-schema/amazon-elasticache-create-serverless-cache-request-schema.json",
  "title": "CreateServerlessCacheRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-elasticache-serverless-cache-api-openapi.yml#/components/schemas/CreateServerlessCacheRequest",
  "type": "object",
  "properties": {
    "ServerlessCacheName": {
      "type": "string",
      "description": "User-provided identifier for the serverless cache. This parameter is stored as a lowercase string."
    },
    "Description": {
      "type": "string",
      "description": "User-provided description for the serverless cache. The default is NULL, i.e. if no description is provided then an empty string will be returned. The maximum length is 255 characters."
    },
    "Engine": {
      "type": "string",
      "description": "The name of the cache engine to be used for creating the serverless cache."
    },
    "MajorEngineVersion": {
      "type": "string",
      "description": "The version of the cache engine that will be used to create the serverless cache."
    },
    "CacheUsageLimits": {
      "$ref": "#/$defs/CacheUsageLimits"
    },
    "KmsKeyId": {
      "type": "string",
      "description": "ARN of the customer managed key for encrypting the data at rest. If no KMS key is provided, a default service key is used."
    },
    "SecurityGroupIds": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "A list of the one or more VPC security groups to be associated with the serverless cache. The security group will authorize traffic access for the VPC end-point (private-link). If no other information is given this will be the VPC’s Default Security Group that is associated with the cluster VPC end-point."
    },
    "SnapshotArnsToRestore": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "The ARN(s) of the snapshot that the new serverless cache will be created from. Available for Valkey, Redis OSS and Serverless Memcached only."
    },
    "Tags": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Tag"
      },
      "description": "The list of tags (key, value) pairs to be added to the serverless cache resource. Default is NULL."
    },
    "UserGroupId": {
      "type": "string",
      "description": "The identifier of the UserGroup to be associated with the serverless cache. Available for Valkey and Redis OSS only. Default is NULL."
    },
    "SubnetIds": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "A list of the identifiers of the subnets where the VPC endpoint for the serverless cache will be deployed. All the subnetIds must belong to the same VPC."
    },
    "SnapshotRetentionLimit": {
      "type": "integer",
      "description": "The number of days for which ElastiCache retains automatic snapshots before deleting them. Available for Valkey, Redis OSS and Serverless Memcached only. The maximum value allowed is 35 days."
    },
    "DailySnapshotTime": {
      "type": "string",
      "description": "The daily time that snapshots will be created from the new serverless cache. By default this number is populated with 0, i.e. no snapshots will be created on an automatic daily basis. Available for Valkey, Redis OSS and Serverless Memcached only."
    },
    "NetworkType": {
      "type": "string",
      "enum": [
        "ipv4",
        "ipv6",
        "dual_stack"
      ],
      "description": "The IP protocol version used by the serverless cache. Must be either ipv4 | ipv6 | dual_stack. ipv6 is only supported with IPv6-only subnets. If not specified, defaults to ipv4, unless all provided subnets are IPv6-only, in which case it defaults to ipv6."
    },
    "ConnectionType": {
      "type": "string",
      "enum": [
        "vpc",
        "public"
      ],
      "description": "The connection type for the serverless cache. Must be either vpc | public. Use vpc to access the cache through a VPC endpoint, or public to access the cache over the internet. If not specified, defaults to vpc. This value cannot be changed after the serverless cache is created. Setting this to public requires Valkey 9 or above."
    }
  },
  "required": [
    "ServerlessCacheName",
    "Engine"
  ],
  "$defs": {
    "CacheUsageLimits": {
      "type": "object",
      "properties": {
        "DataStorage": {
          "$ref": "#/$defs/DataStorage"
        },
        "ECPUPerSecond": {
          "$ref": "#/$defs/ECPUPerSecond"
        }
      }
    },
    "DataStorage": {
      "type": "object",
      "properties": {
        "Maximum": {
          "type": "integer",
          "description": "The upper limit for data storage the cache is set to use."
        },
        "Minimum": {
          "type": "integer",
          "description": "The lower limit for data storage the cache is set to use."
        },
        "Unit": {
          "type": "string",
          "enum": [
            "GB"
          ],
          "description": "The unit that the storage is measured in, in GB."
        }
      },
      "required": [
        "Unit"
      ]
    },
    "ECPUPerSecond": {
      "type": "object",
      "properties": {
        "Maximum": {
          "type": "integer",
          "description": "The configuration for the maximum number of ECPUs the cache can consume per second."
        },
        "Minimum": {
          "type": "integer",
          "description": "The configuration for the minimum number of ECPUs the cache should be able consume per second."
        }
      }
    },
    "Tag": {
      "type": "object",
      "properties": {
        "Key": {
          "type": "string",
          "description": "The key for the tag. May not be null."
        },
        "Value": {
          "type": "string",
          "description": "The tag's value. May be null."
        }
      }
    }
  }
}