create_cache_security_group
async
¶
create_cache_security_group(
*,
config_overrides: Optional[AsyncElastiCacheClientConfig] = None,
cache_security_group_name: Optional[String] = None,
description: Optional[String] = None,
tags: Optional[TagList] = None,
) -> CreateCacheSecurityGroupResult
Creates a new cache security group. Use a cache security group to control access to one or more clusters.
Cache security groups are only used when you are creating a cluster outside of an Amazon Virtual Private Cloud (Amazon VPC). If you are creating a cluster inside of a VPC, use a cache subnet group instead. For more information, see CreateCacheSubnetGroup.
Parameters:
-
cache_security_group_name(Optional[String], default:None) –A name for the cache security group. This value is stored as a lowercase string.
Constraints: Must contain no more than 255 alphanumeric characters. Cannot be the word "Default".
Example:
mysecuritygroup -
description(Optional[String], default:None) –A description for the cache security 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:
-
CacheSecurityGroupAlreadyExistsFault–A cache security group with the specified name already exists.
-
CacheSecurityGroupQuotaExceededFault–The request cannot be processed because it would exceed the allowed number of cache security groups.
-
InvalidParameterCombinationException–Two or more incompatible parameters were specified.
-
InvalidParameterValueException–The value for a parameter is invalid.
-
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:
CreateCacheSecurityGroup Creates an ElastiCache security group. ElastiCache security groups are only for clusters not running in an AWS VPC.
>>> await client.create_cache_security_group(cache_security_group_name='my-cache-sec-grp', description='Example ElastiCache security group.')
Source code in docs_src/capo_elasticache/_services/async_elasti_cache.py
1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 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 | |