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 cache clusters.

Cache security groups are only used when you are creating a cache cluster outside of an Amazon Virtual Private Cloud (Amazon VPC). If you are creating a cache cluster inside of a VPC, use a cache subnet group instead. For more information, see CreateCacheSubnetGroup.

Note:

For 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

Syntax

C#
public virtual CreateCacheSecurityGroupResponse CreateCacheSecurityGroup(
         CreateCacheSecurityGroupRequest request
)
Parameters
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.

Exceptions

ExceptionCondition
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.

Examples

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

CreateCacheSecurityGroup


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