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 = '{{ region }}' 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 = '{{ region }}';
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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ 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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
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 }}'
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:
| Parameter | Description |
|---|---|
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:
- 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