serverless_caches
Creates, updates, deletes or gets a serverless_cach resource or lists serverless_caches in a region
Overview
| Name | serverless_caches |
| Type | Resource |
| Description | The AWS::ElastiCache::ServerlessCache resource creates an Amazon ElastiCache Serverless Cache. |
| Id | awscc.elasticache.serverless_caches |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
serverless_cache_name | string | The name of the Serverless Cache. This value must be unique. |
description | string | The description of the Serverless Cache. |
engine | string | The engine name of the Serverless Cache. |
major_engine_version | string | The major engine version of the Serverless Cache. |
full_engine_version | string | The full engine version of the Serverless Cache. |
cache_usage_limits | object | The cache capacity limit of the Serverless Cache. |
kms_key_id | string | The ID of the KMS key used to encrypt the cluster. |
security_group_ids | array | One or more Amazon VPC security groups associated with this Serverless Cache. |
snapshot_arns_to_restore | array | The ARN's of snapshot to restore Serverless Cache. |
tags | array | An array of key-value pairs to apply to this Serverless Cache. |
user_group_id | string | The ID of the user group. |
subnet_ids | array | The subnet id's of the Serverless Cache. |
snapshot_retention_limit | integer | The snapshot retention limit of the Serverless Cache. |
daily_snapshot_time | string | The daily time range (in UTC) during which the service takes automatic snapshot of the Serverless Cache. |
create_time | string | The creation time of the Serverless Cache. |
status | string | The status of the Serverless Cache. |
endpoint | object | The address and the port. |
arn | string | The ARN of the Serverless Cache. |
final_snapshot_name | string | The final snapshot name which is taken before Serverless Cache is deleted. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
serverless_cache_name | string | The name of the Serverless Cache. This value must be unique. |
region | string | AWS region. |
For more information, see AWS::ElastiCache::ServerlessCache.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | serverless_caches | INSERT | ServerlessCacheName, Engine, region |
delete_resource | serverless_caches | DELETE | Identifier, region |
update_resource | serverless_caches | UPDATE | Identifier, PatchDocument, region |
list_resources | serverless_caches_list_only | SELECT | region |
get_resource | serverless_caches | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
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 = 'us-east-1' AND
Identifier = '{{ serverless_cache_name }}';
Lists all serverless_caches in a region.
SELECT
region,
serverless_cache_name
FROM awscc.elasticache.serverless_caches_list_only
WHERE
region = 'us-east-1';
INSERT example
Use the following StackQL query and manifest file to create a new serverless_cach resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.elasticache.serverless_caches (
ServerlessCacheName,
Engine,
region
)
SELECT
'{{ serverless_cache_name }}',
'{{ engine }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.elasticache.serverless_caches (
ServerlessCacheName,
Description,
Engine,
MajorEngineVersion,
CacheUsageLimits,
KmsKeyId,
SecurityGroupIds,
SnapshotArnsToRestore,
Tags,
UserGroupId,
SubnetIds,
SnapshotRetentionLimit,
DailySnapshotTime,
Endpoint,
ReaderEndpoint,
FinalSnapshotName,
region
)
SELECT
'{{ serverless_cache_name }}',
'{{ description }}',
'{{ engine }}',
'{{ major_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 }}',
'{{ endpoint }}',
'{{ reader_endpoint }}',
'{{ final_snapshot_name }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: serverless_cach
props:
- name: serverless_cache_name
value: '{{ serverless_cache_name }}'
- name: description
value: '{{ description }}'
- name: engine
value: '{{ engine }}'
- name: major_engine_version
value: '{{ major_engine_version }}'
- name: cache_usage_limits
value:
data_storage:
minimum: '{{ minimum }}'
maximum: '{{ maximum }}'
unit: '{{ unit }}'
e_cp_uper_second:
minimum: '{{ minimum }}'
maximum: '{{ maximum }}'
- name: kms_key_id
value: '{{ kms_key_id }}'
- name: security_group_ids
value:
- '{{ security_group_ids[0] }}'
- name: snapshot_arns_to_restore
value:
- '{{ snapshot_arns_to_restore[0] }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
- name: user_group_id
value: '{{ user_group_id }}'
- name: subnet_ids
value:
- '{{ subnet_ids[0] }}'
- name: snapshot_retention_limit
value: '{{ snapshot_retention_limit }}'
- name: daily_snapshot_time
value: '{{ daily_snapshot_time }}'
- name: endpoint
value:
address: '{{ address }}'
port: '{{ port }}'
- name: reader_endpoint
value: null
- name: final_snapshot_name
value: '{{ final_snapshot_name }}'
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 }}';
DELETE example
/*+ delete */
DELETE FROM awscc.elasticache.serverless_caches
WHERE
Identifier = '{{ serverless_cache_name }}' AND
region = 'us-east-1';
Permissions
To operate on the serverless_caches resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
elasticache:CreateServerlessCache,
elasticache:DescribeServerlessCaches,
elasticache:AddTagsToResource,
elasticache:ListTagsForResource,
ec2:CreateTags,
ec2:CreateVpcEndpoint,
kms:CreateGrant,
kms:DescribeKey
elasticache:DescribeServerlessCaches,
elasticache:ListTagsForResource
elasticache:ModifyServerlessCache,
elasticache:DescribeServerlessCaches,
elasticache:AddTagsToResource,
elasticache:ListTagsForResource,
elasticache:RemoveTagsFromResource
elasticache:DeleteServerlessCache,
elasticache:DescribeServerlessCaches,
elasticache:ListTagsForResource
elasticache:DescribeServerlessCaches,
elasticache:ListTagsForResource