AWS SDK Version 3 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

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.


For .NET Core and PCL this operation is only available in asynchronous form. Please refer to CreateCacheSecurityGroupAsync.

Namespace: Amazon.ElastiCache
Assembly: AWSSDK.ElastiCache.dll
Version: 3.x.y.z


public virtual CreateCacheSecurityGroupResponse CreateCacheSecurityGroup(
         CreateCacheSecurityGroupRequest request
Type: Amazon.ElastiCache.Model.CreateCacheSecurityGroupRequest

Container for the necessary parameters to execute the CreateCacheSecurityGroup service method.

Return Value
The response from the CreateCacheSecurityGroup service method, as returned by ElastiCache.


CacheSecurityGroupAlreadyExistsException A cache security group with the specified name already exists.
CacheSecurityGroupQuotaExceededException 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.


Creates an ElastiCache security group. ElastiCache security groups are only for clusters not running in an AWS VPC.


var response = client.CreateCacheSecurityGroup(new CreateCacheSecurityGroupRequest 
    CacheSecurityGroupName = "my-cache-sec-grp",
    Description = "Example ElastiCache security group."


Version Information

.NET Framework:
Supported in: 4.5, 4.0, 3.5

Portable Class Library:
Supported in: Windows Store Apps
Supported in: Windows Phone 8.1
Supported in: Xamarin Android
Supported in: Xamarin iOS (Unified)
Supported in: Xamarin.Forms

See Also