create_cache_subnet_group
async
¶
create_cache_subnet_group(
*,
config_overrides: Optional[AsyncElastiCacheClientConfig] = None,
cache_subnet_group_name: Optional[String] = None,
cache_subnet_group_description: Optional[String] = None,
subnet_ids: Optional[SubnetIdentifierList] = None,
tags: Optional[TagList] = None,
) -> CreateCacheSubnetGroupResult
Creates a new cache subnet group.
Use this parameter only when you are creating a cluster in an Amazon Virtual Private Cloud (Amazon VPC).
Parameters:
-
cache_subnet_group_name(Optional[String], default:None) –A name for the cache subnet group. This value is stored as a lowercase string.
Constraints: Must contain no more than 255 alphanumeric characters or hyphens.
Example:
mysubnetgroup -
cache_subnet_group_description(Optional[String], default:None) –A description for the cache subnet group.
-
subnet_ids(Optional[SubnetIdentifierList], default:None) –A list of VPC subnet IDs for the cache subnet group.
-
tags(Optional[TagList], default:None) –A list of tags to be added to this resource. A tag is a key-value pair. A tag key must be accompanied by a tag value, although null is accepted.
Raises:
-
CacheSubnetGroupAlreadyExistsFault–The requested cache subnet group name is already in use by an existing cache subnet group.
-
CacheSubnetGroupQuotaExceededFault–The request cannot be processed because it would exceed the allowed number of cache subnet groups.
-
CacheSubnetQuotaExceededFault–The request cannot be processed because it would exceed the allowed number of subnets in a cache subnet group.
-
InvalidSubnet–An invalid subnet identifier was specified.
-
SubnetNotAllowedFault–At least one subnet ID does not match the other subnet IDs. This mismatch typically occurs when a user sets one subnet ID to a regional Availability Zone and a different one to an outpost. Or when a user sets the subnet ID to an Outpost when not subscribed on this service.
-
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.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
CreateCacheSubnet Creates a new cache subnet group.
>>> await client.create_cache_subnet_group(cache_subnet_group_name='my-sn-grp2', cache_subnet_group_description='Sample subnet group', subnet_ids=['subnet-6f28c982', 'subnet-bcd382f3', 'subnet-845b3e7c0'])
Source code in docs_src/capo_elasticache/_services/async_elasti_cache.py
1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 | |