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.

Container for the parameters to the CreateCacheSecurityGroup operation. 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.

Inheritance Hierarchy

System.Object
  Amazon.Runtime.AmazonWebServiceRequest
    Amazon.ElastiCache.AmazonElastiCacheRequest
      Amazon.ElastiCache.Model.CreateCacheSecurityGroupRequest

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

Syntax

C#
public class CreateCacheSecurityGroupRequest : AmazonElastiCacheRequest
         IAmazonWebServiceRequest

The CreateCacheSecurityGroupRequest type exposes the following members

Constructors

NameDescription
Public Method CreateCacheSecurityGroupRequest()

Empty constructor used to set properties independently even when a simple constructor is available

Public Method CreateCacheSecurityGroupRequest(string, string)

Instantiates CreateCacheSecurityGroupRequest with the parameterized properties

Properties

NameTypeDescription
Public Property CacheSecurityGroupName System.String

Gets and sets the property CacheSecurityGroupName.

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

Public Property Description System.String

Gets and sets the property Description.

A description for the cache security group.

Public Property Tags System.Collections.Generic.List<Amazon.ElastiCache.Model.Tag>

Gets and sets the property Tags.

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.

Examples

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

CreateCacheSecurityGroup


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


            

Version Information

.NET Core App:
Supported in: 3.1

.NET Standard:
Supported in: 2.0

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