create_cache_security_group
¶
create_cache_security_group(
*,
config_overrides: Optional[ElastiCacheClientConfig] = 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.
>>> 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/elasti_cache.py
1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 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 | |