Skip to main content

serverless_caches

Creates, updates, deletes or gets a serverless_cach resource or lists serverless_caches in a region

Overview

Nameserverless_caches
TypeResource
DescriptionThe AWS::ElastiCache::ServerlessCache resource creates an Amazon ElastiCache Serverless Cache.
Idawscc.elasticache.serverless_caches

Fields

NameDatatypeDescription
serverless_cache_namestringThe name of the Serverless Cache. This value must be unique.
descriptionstringThe description of the Serverless Cache.
enginestringThe engine name of the Serverless Cache.
major_engine_versionstringThe major engine version of the Serverless Cache.
full_engine_versionstringThe full engine version of the Serverless Cache.
cache_usage_limitsobjectThe cache capacity limit of the Serverless Cache.
kms_key_idstringThe ID of the KMS key used to encrypt the cluster.
security_group_idsarrayOne or more Amazon VPC security groups associated with this Serverless Cache.
snapshot_arns_to_restorearrayThe ARN's of snapshot to restore Serverless Cache.
tagsarrayAn array of key-value pairs to apply to this Serverless Cache.
user_group_idstringThe ID of the user group.
subnet_idsarrayThe subnet id's of the Serverless Cache.
snapshot_retention_limitintegerThe snapshot retention limit of the Serverless Cache.
daily_snapshot_timestringThe daily time range (in UTC) during which the service takes automatic snapshot of the Serverless Cache.
create_timestringThe creation time of the Serverless Cache.
statusstringThe status of the Serverless Cache.
endpointobjectThe address and the port.
arnstringThe ARN of the Serverless Cache.
final_snapshot_namestringThe final snapshot name which is taken before Serverless Cache is deleted.
regionstringAWS region.

For more information, see AWS::ElastiCache::ServerlessCache.

Methods

NameResourceAccessible byRequired Params
create_resourceserverless_cachesINSERTServerlessCacheName, Engine, region
delete_resourceserverless_cachesDELETEIdentifier, region
update_resourceserverless_cachesUPDATEIdentifier, PatchDocument, region
list_resourcesserverless_caches_list_onlySELECTregion
get_resourceserverless_cachesSELECTIdentifier, region

SELECT examples

Gets all properties from an individual serverless_cach.

SELECT
region,
serverless_cache_name,
description,
engine,
major_engine_version,
full_engine_version,
cache_usage_limits,
kms_key_id,
security_group_ids,
snapshot_arns_to_restore,
tags,
user_group_id,
subnet_ids,
snapshot_retention_limit,
daily_snapshot_time,
create_time,
status,
endpoint,
reader_endpoint,
arn,
final_snapshot_name
FROM awscc.elasticache.serverless_caches
WHERE
region = '{{ region }}' AND
Identifier = '{{ serverless_cache_name }}';

INSERT example

Use the following StackQL query and manifest file to create a new serverless_cach resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.elasticache.serverless_caches (
ServerlessCacheName,
Engine,
region
)
SELECT
'{{ serverless_cache_name }}',
'{{ engine }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

UPDATE example

Use the following StackQL query and manifest file to update a serverless_cach resource, using stack-deploy.

/*+ update */
UPDATE awscc.elasticache.serverless_caches
SET PatchDocument = string('{{ {
"Description": description,
"Engine": engine,
"MajorEngineVersion": major_engine_version,
"CacheUsageLimits": cache_usage_limits,
"SecurityGroupIds": security_group_ids,
"Tags": tags,
"UserGroupId": user_group_id,
"SnapshotRetentionLimit": snapshot_retention_limit,
"DailySnapshotTime": daily_snapshot_time,
"FinalSnapshotName": final_snapshot_name
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ serverless_cache_name }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.elasticache.serverless_caches
WHERE
Identifier = '{{ serverless_cache_name }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

Additional Parameters

Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:

ParameterDescription
ClientToken
A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.
A client token is valid for 36 hours once used.
After that, a resource request with the same client token is treated as a new request.
If you do not specify a client token, one is generated for inclusion in the request.
RoleArn
The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.
If you do not specify a role, a temporary session is created using your AWS user credentials.
TypeVersionId
For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used.

Permissions

To operate on the serverless_caches resource, the following permissions are required:

elasticache:CreateServerlessCache,
elasticache:DescribeServerlessCaches,
elasticache:AddTagsToResource,
elasticache:ListTagsForResource,
ec2:CreateTags,
ec2:CreateVpcEndpoint,
kms:CreateGrant,
kms:DescribeKey