serverless_caches
Creates, updates, deletes, gets or lists a serverless_caches resource.
Overview
| Name | serverless_caches |
| Type | Resource |
| Id | aws.elasticache.serverless_caches |
Fields
The following fields are returned by SELECT queries:
- describe_serverless_caches
| Name | Datatype | Description |
|---|---|---|
arn | string | The Amazon Resource Name (ARN) of the serverless cache. |
cache_usage_limits | string | The cache usage limit for the serverless cache. |
create_time | string | When the serverless cache was created. |
daily_snapshot_time | string | The daily time that a cache snapshot will be created. Default is NULL, i.e. snapshots will not be created at a specific time on a daily basis. Available for Valkey, Redis OSS and Serverless Memcached only. |
description | string | A description of the serverless cache. |
endpoint | string | Represents the information required for client programs to connect to a cache node. This value is read-only. |
engine | string | The engine the serverless cache is compatible with. |
full_engine_version | string | The name and version number of the engine the serverless cache is compatible with. |
kms_key_id | string | The ID of the Amazon Web Services Key Management Service (KMS) key that is used to encrypt data at rest in the serverless cache. |
major_engine_version | string | The version number of the engine the serverless cache is compatible with. |
network_type | string | The type of IP address protocol 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. |
reader_endpoint | string | Represents the information required for client programs to connect to a cache node. This value is read-only. |
security_group_ids | string | The IDs of the EC2 security groups associated with the serverless cache. |
serverless_cache_name | string | The unique identifier of the serverless cache. |
snapshot_retention_limit | integer | 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. |
status | string | The current status of the serverless cache. The allowed values are CREATING, AVAILABLE, DELETING, CREATE-FAILED and MODIFYING. |
storage_encryption_type | string | Indicates the type of encryption for data stored at rest in the serverless cache. Serverless caches are always encrypted at rest. The value is sse-elasticache if an ElastiCache service-managed key is used, or sse-kms if a customer-managed KMS key is used. |
subnet_ids | string | If no subnet IDs are given and your VPC is in us-west-1, then ElastiCache will select 2 default subnets across AZs in your VPC. For all other Regions, if no subnet IDs are given then ElastiCache will select 3 default subnets across AZs in your default VPC. |
user_group_id | string | The identifier of the user group associated with the serverless cache. Available for Valkey and Redis OSS only. Default is NULL. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_serverless_caches | select | region | ServerlessCacheName, MaxResults, NextToken | Returns information about a specific serverless cache. If no identifier is specified, then the API returns information on all the serverless caches belonging to this Amazon Web Services account. |
create_serverless_cache | insert | ServerlessCacheName, region | Description, Engine, MajorEngineVersion, CacheUsageLimits, KmsKeyId, SecurityGroupIds, SnapshotArnsToRestore, Tags, UserGroupId, SubnetIds, SnapshotRetentionLimit, DailySnapshotTime, NetworkType | Creates a serverless cache. |
modify_serverless_cache | update | ServerlessCacheName, region | Description, CacheUsageLimits, RemoveUserGroup, UserGroupId, SecurityGroupIds, SnapshotRetentionLimit, DailySnapshotTime, Engine, MajorEngineVersion | This API modifies the attributes of a serverless cache. |
delete_serverless_cache | delete | ServerlessCacheName, region | FinalSnapshotName | Deletes a specified existing serverless cache. CreateServerlessCacheSnapshot permission is required to create a final snapshot. Without this permission, the API call will fail with an Access Denied exception. |
copy_serverless_cache_snapshot | exec | SourceServerlessCacheSnapshotName, TargetServerlessCacheSnapshotName, region | KmsKeyId, Tags | Creates a copy of an existing serverless cache’s snapshot. Available for Valkey, Redis OSS and Serverless Memcached only. |
export_serverless_cache_snapshot | exec | ServerlessCacheSnapshotName, S3BucketName, region | Provides the functionality to export the serverless cache snapshot data to Amazon S3. Available for Valkey and Redis OSS only. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
S3BucketName | string | Name of the Amazon S3 bucket to export the snapshot to. The Amazon S3 bucket must also be in same region as the snapshot. Available for Valkey and Redis OSS only. |
ServerlessCacheName | string | The identifier of the serverless cache to be deleted. |
ServerlessCacheSnapshotName | string | The identifier of the serverless cache snapshot to be exported to S3. Available for Valkey and Redis OSS only. |
SourceServerlessCacheSnapshotName | string | The identifier of the existing serverless cache’s snapshot to be copied. Available for Valkey, Redis OSS and Serverless Memcached only. |
TargetServerlessCacheSnapshotName | string | The identifier for the snapshot to be created. Available for Valkey, Redis OSS and Serverless Memcached only. This value is stored as a lowercase string. |
region | string | AWS region (default: us-east-1) |
CacheUsageLimits | object | Modify the cache usage limit for the serverless cache. |
DailySnapshotTime | string | The daily time during which Elasticache begins taking a daily snapshot of the serverless cache. Available for Valkey, Redis OSS and Serverless Memcached only. The default is NULL, i.e. the existing snapshot time configured for the cluster is not removed. |
Description | string | User provided description for the serverless cache. Default = NULL, i.e. the existing description is not removed/modified. The description has a maximum length of 255 characters. |
Engine | string | Modifies the engine listed in a serverless cache request. The options are valkey, memcached or redis. |
FinalSnapshotName | string | Name of the final snapshot to be taken before the serverless cache is deleted. Available for Valkey, Redis OSS and Serverless Memcached only. Default: NULL, i.e. a final snapshot is not taken. |
KmsKeyId | string | The identifier of the KMS key used to encrypt the target snapshot. Available for Valkey, Redis OSS and Serverless Memcached only. |
MajorEngineVersion | string | Modifies the engine vesion listed in a serverless cache request. |
MaxResults | integer | The maximum number of records in the response. If more records exist than the specified max-records value, the next token is included in the response so that remaining results can be retrieved. The default is 50. |
NetworkType | string | 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. |
NextToken | string | An optional marker returned from a prior request to support pagination of results from this operation. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by MaxResults. |
RemoveUserGroup | boolean | The identifier of the UserGroup to be removed from association with the Valkey and Redis OSS serverless cache. Available for Valkey and Redis OSS only. Default is NULL. |
SecurityGroupIds | array | The new list of VPC security groups to be associated with the serverless cache. Populating this list means the current VPC security groups will be removed. This security group is used to authorize traffic access for the VPC end-point (private-link). Default = NULL - the existing list of VPC security groups is not removed. |
ServerlessCacheName | string | The identifier for the serverless cache. If this parameter is specified, only information about that specific serverless cache is returned. Default: NULL |
SnapshotArnsToRestore | array | The ARN(s) of the snapshot that the new serverless cache will be created from. Available for Valkey, Redis OSS and Serverless Memcached only. |
SnapshotRetentionLimit | integer | The number of days for which Elasticache retains automatic snapshots before deleting them. Available for Valkey, Redis OSS and Serverless Memcached only. Default = NULL, i.e. the existing snapshot-retention-limit will not be removed or modified. The maximum value allowed is 35 days. |
SubnetIds | array | 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. |
Tags | array | A list of tags to be added to the target snapshot resource. A tag is a key-value pair. Available for Valkey, Redis OSS and Serverless Memcached only. Default: NULL |
UserGroupId | string | The identifier of the UserGroup to be associated with the serverless cache. Available for Valkey and Redis OSS only. Default is NULL - the existing UserGroup is not removed. |
SELECT examples
- describe_serverless_caches
Returns information about a specific serverless cache. If no identifier is specified, then the API returns information on all the serverless caches belonging to this Amazon Web Services account.
SELECT
arn,
cache_usage_limits,
create_time,
daily_snapshot_time,
description,
endpoint,
engine,
full_engine_version,
kms_key_id,
major_engine_version,
network_type,
reader_endpoint,
security_group_ids,
serverless_cache_name,
snapshot_retention_limit,
status,
storage_encryption_type,
subnet_ids,
user_group_id
FROM aws.elasticache.serverless_caches
WHERE region = '{{ region }}' -- required
AND ServerlessCacheName = '{{ ServerlessCacheName }}'
AND MaxResults = '{{ MaxResults }}'
AND NextToken = '{{ NextToken }}'
;
INSERT examples
- create_serverless_cache
- Manifest
Creates a serverless cache.
INSERT INTO aws.elasticache.serverless_caches (
ServerlessCacheName,
region,
Description,
Engine,
MajorEngineVersion,
CacheUsageLimits,
KmsKeyId,
SecurityGroupIds,
SnapshotArnsToRestore,
Tags,
UserGroupId,
SubnetIds,
SnapshotRetentionLimit,
DailySnapshotTime,
NetworkType
)
SELECT
'{{ ServerlessCacheName }}',
'{{ region }}',
'{{ Description }}',
'{{ Engine }}',
'{{ MajorEngineVersion }}',
'{{ CacheUsageLimits }}',
'{{ KmsKeyId }}',
'{{ SecurityGroupIds }}',
'{{ SnapshotArnsToRestore }}',
'{{ Tags }}',
'{{ UserGroupId }}',
'{{ SubnetIds }}',
'{{ SnapshotRetentionLimit }}',
'{{ DailySnapshotTime }}',
'{{ NetworkType }}'
RETURNING
arn,
cache_usage_limits,
create_time,
daily_snapshot_time,
description,
endpoint,
engine,
full_engine_version,
kms_key_id,
major_engine_version,
network_type,
reader_endpoint,
security_group_ids,
serverless_cache_name,
snapshot_retention_limit,
status,
storage_encryption_type,
subnet_ids,
user_group_id
;
# Description fields are for documentation purposes
- name: serverless_caches
props:
- name: ServerlessCacheName
value: "{{ ServerlessCacheName }}"
description: Required parameter for the serverless_caches resource.
- name: region
value: "{{ region }}"
description: Required parameter for the serverless_caches resource.
- name: Description
value: "{{ Description }}"
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.
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.
- name: Engine
value: "{{ Engine }}"
description: The name of the cache engine to be used for creating the serverless cache.
description: The name of the cache engine to be used for creating the serverless cache.
- name: MajorEngineVersion
value: "{{ MajorEngineVersion }}"
description: The version of the cache engine that will be used to create the serverless cache.
description: The version of the cache engine that will be used to create the serverless cache.
- name: CacheUsageLimits
value: "{{ CacheUsageLimits }}"
description: Sets the cache usage limits for storage and ElastiCache Processing Units for the cache.
description: Sets the cache usage limits for storage and ElastiCache Processing Units for the cache.
- name: KmsKeyId
value: "{{ KmsKeyId }}"
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.
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.
- name: SecurityGroupIds
value: "{{ SecurityGroupIds }}"
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.
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.
- name: SnapshotArnsToRestore
value: "{{ SnapshotArnsToRestore }}"
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.
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.
- name: Tags
value: "{{ Tags }}"
description: The list of tags (key, value) pairs to be added to the serverless cache resource. Default is NULL.
description: The list of tags (key, value) pairs to be added to the serverless cache resource. Default is NULL.
- name: UserGroupId
value: "{{ UserGroupId }}"
description: The identifier of the UserGroup to be associated with the serverless cache. Available for Valkey and Redis OSS only. Default is NULL.
description: The identifier of the UserGroup to be associated with the serverless cache. Available for Valkey and Redis OSS only. Default is NULL.
- name: SubnetIds
value: "{{ SubnetIds }}"
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.
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.
- name: SnapshotRetentionLimit
value: {{ SnapshotRetentionLimit }}
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.
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.
- name: DailySnapshotTime
value: "{{ DailySnapshotTime }}"
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.
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.
- name: NetworkType
value: "{{ NetworkType }}"
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.
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.
UPDATE examples
- modify_serverless_cache
This API modifies the attributes of a serverless cache.
UPDATE aws.elasticache.serverless_caches
SET
-- No updatable properties
WHERE
ServerlessCacheName = '{{ ServerlessCacheName }}' --required
AND region = '{{ region }}' --required
AND Description = '{{ Description}}'
AND CacheUsageLimits = '{{ CacheUsageLimits}}'
AND RemoveUserGroup = {{ RemoveUserGroup}}
AND UserGroupId = '{{ UserGroupId}}'
AND SecurityGroupIds = '{{ SecurityGroupIds}}'
AND SnapshotRetentionLimit = '{{ SnapshotRetentionLimit}}'
AND DailySnapshotTime = '{{ DailySnapshotTime}}'
AND Engine = '{{ Engine}}'
AND MajorEngineVersion = '{{ MajorEngineVersion}}'
RETURNING
arn,
cache_usage_limits,
create_time,
daily_snapshot_time,
description,
endpoint,
engine,
full_engine_version,
kms_key_id,
major_engine_version,
network_type,
reader_endpoint,
security_group_ids,
serverless_cache_name,
snapshot_retention_limit,
status,
storage_encryption_type,
subnet_ids,
user_group_id;
DELETE examples
- delete_serverless_cache
Deletes a specified existing serverless cache. CreateServerlessCacheSnapshot permission is required to create a final snapshot. Without this permission, the API call will fail with an Access Denied exception.
DELETE FROM aws.elasticache.serverless_caches
WHERE ServerlessCacheName = '{{ ServerlessCacheName }}' --required
AND region = '{{ region }}' --required
AND FinalSnapshotName = '{{ FinalSnapshotName }}'
;
Lifecycle Methods
- copy_serverless_cache_snapshot
- export_serverless_cache_snapshot
Creates a copy of an existing serverless cache’s snapshot. Available for Valkey, Redis OSS and Serverless Memcached only.
EXEC aws.elasticache.serverless_caches.copy_serverless_cache_snapshot
@SourceServerlessCacheSnapshotName='{{ SourceServerlessCacheSnapshotName }}' --required,
@TargetServerlessCacheSnapshotName='{{ TargetServerlessCacheSnapshotName }}' --required,
@region='{{ region }}' --required,
@KmsKeyId='{{ KmsKeyId }}',
@Tags='{{ Tags }}'
;
Provides the functionality to export the serverless cache snapshot data to Amazon S3. Available for Valkey and Redis OSS only.
EXEC aws.elasticache.serverless_caches.export_serverless_cache_snapshot
@ServerlessCacheSnapshotName='{{ ServerlessCacheSnapshotName }}' --required,
@S3BucketName='{{ S3BucketName }}' --required,
@region='{{ region }}' --required
;