create_serverless_cache
async
¶
create_serverless_cache(
*,
config_overrides: Optional[AsyncElastiCacheClientConfig] = None,
serverless_cache_name: Optional[String] = None,
description: Optional[String] = None,
engine: Optional[String] = None,
major_engine_version: Optional[String] = None,
cache_usage_limits: Optional[CacheUsageLimits] = None,
kms_key_id: Optional[String] = None,
security_group_ids: Optional[SecurityGroupIdsList] = None,
snapshot_arns_to_restore: Optional[SnapshotArnsList] = None,
tags: Optional[TagList] = None,
user_group_id: Optional[String] = None,
subnet_ids: Optional[SubnetIdsList] = None,
snapshot_retention_limit: Optional[IntegerOptional] = None,
daily_snapshot_time: Optional[String] = None,
network_type: Optional[NetworkType] = None,
connection_type: Optional[ConnectionType] = None,
integrations: Optional[IntegrationRequestList] = None,
) -> CreateServerlessCacheResponse
Creates a serverless cache.
Parameters:
-
serverless_cache_name(Optional[String], default:None) –User-provided identifier for the serverless cache. This parameter is stored as a lowercase string.
-
description(Optional[String], default:None) –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(Optional[String], default:None) –The name of the cache engine to be used for creating the serverless cache.
-
major_engine_version(Optional[String], default:None) –The version of the cache engine that will be used to create the serverless cache.
-
cache_usage_limits(Optional[CacheUsageLimits], default:None) –Sets the cache usage limits for storage and ElastiCache Processing Units for the cache.
-
kms_key_id(Optional[String], default:None) –ARN of the customer managed key for encrypting the data at rest. If no KMS key is provided, a default service key is used.
-
security_group_ids(Optional[SecurityGroupIdsList], default:None) –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.
-
snapshot_arns_to_restore(Optional[SnapshotArnsList], default:None) –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(Optional[TagList], default:None) –The list of tags (key, value) pairs to be added to the serverless cache resource. Default is NULL.
-
user_group_id(Optional[String], default:None) –The identifier of the UserGroup to be associated with the serverless cache. Available for Valkey and Redis OSS only. Default is NULL.
-
subnet_ids(Optional[SubnetIdsList], default:None) –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.
-
snapshot_retention_limit(Optional[IntegerOptional], default:None) –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.
-
daily_snapshot_time(Optional[String], default:None) –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.
-
network_type(Optional[NetworkType], default:None) –The IP protocol version used by the serverless cache. Must be either
ipv4|ipv6|dual_stack.ipv6is only supported with IPv6-only subnets. If not specified, defaults toipv4, unless all provided subnets are IPv6-only, in which case it defaults toipv6. -
connection_type(Optional[ConnectionType], default:None) –The connection type for the serverless cache. Must be either
vpc|public. Usevpcto access the cache through a VPC endpoint, orpublicto access the cache over the internet. If not specified, defaults tovpc. This value cannot be changed after the serverless cache is created. Setting this topublicrequires Valkey 9 or above. -
integrations(Optional[IntegrationRequestList], default:None) –Which serverless cache integrations to enable. Valid values are:
-
dynamodb– DynamoDB integration.
DynamoDB integration requires the Valkey engine with a major engine version of 9 or above. If not specified, no integrations are enabled.
-
Raises:
-
InvalidCredentialsException–You must enter valid credentials.
-
InvalidParameterCombinationException–Two or more incompatible parameters were specified.
-
InvalidParameterValueException–The value for a parameter is invalid.
-
InvalidServerlessCacheStateFault–The account for these credentials is not currently active.
-
InvalidUserGroupStateFault–The user group is not in an active state.
-
ServerlessCacheAlreadyExistsFault–A serverless cache with this name already exists.
-
ServerlessCacheNotFoundFault–The serverless cache was not found or does not exist.
-
ServerlessCacheQuotaForCustomerExceededFault–The number of serverless caches exceeds the customer quota.
-
ServiceLinkedRoleNotFoundFault–The specified service linked role (SLR) was not found.
-
TagQuotaPerResourceExceeded–The request cannot be processed because it would cause the resource to have more than the allowed number of tags. The maximum number of tags permitted on a resource is 50.
-
UserGroupNotFoundFault–The user group was not found or does not exist
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_elasticache/_services/async_elasti_cache.py
1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 | |