/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the ec2-2016-11-15.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.EC2.Model
{
///
/// Container for the parameters to the CreateSecurityGroup operation.
/// Creates a security group.
///
///
///
/// A security group acts as a virtual firewall for your instance to control inbound and
/// outbound traffic. For more information, see Amazon
/// EC2 security groups in the Amazon Elastic Compute Cloud User Guide and
/// Security
/// groups for your VPC in the Amazon Virtual Private Cloud User Guide.
///
///
///
/// When you create a security group, you specify a friendly name of your choice. You
/// can't have two security groups for the same VPC with the same name.
///
///
///
/// You have a default security group for use in your VPC. If you don't specify a security
/// group when you launch an instance, the instance is launched into the appropriate default
/// security group. A default security group includes a default rule that grants instances
/// unrestricted network access to each other.
///
///
///
/// You can add or remove rules from your security groups using AuthorizeSecurityGroupIngress,
/// AuthorizeSecurityGroupEgress, RevokeSecurityGroupIngress, and RevokeSecurityGroupEgress.
///
///
///
/// For more information about VPC security group limits, see Amazon
/// VPC Limits.
///
///
public partial class CreateSecurityGroupRequest : AmazonEC2Request
{
private string _description;
private string _groupName;
private List _tagSpecifications = new List();
private string _vpcId;
///
/// Empty constructor used to set properties independently even when a simple constructor is available
///
public CreateSecurityGroupRequest() { }
///
/// Instantiates CreateSecurityGroupRequest with the parameterized properties
///
/// The name of the security group. Constraints: Up to 255 characters in length. Cannot start with sg-
. Valid characters: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*
/// A description for the security group. Constraints: Up to 255 characters in length Valid characters: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*
public CreateSecurityGroupRequest(string groupName, string description)
{
_groupName = groupName;
_description = description;
}
///
/// Gets and sets the property Description.
///
/// A description for the security group.
///
///
///
/// Constraints: Up to 255 characters in length
///
///
///
/// Valid characters: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*
///
///
[AWSProperty(Required=true)]
public string Description
{
get { return this._description; }
set { this._description = value; }
}
// Check to see if Description property is set
internal bool IsSetDescription()
{
return this._description != null;
}
///
/// Gets and sets the property GroupName.
///
/// The name of the security group.
///
///
///
/// Constraints: Up to 255 characters in length. Cannot start with sg-
.
///
///
///
/// Valid characters: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*
///
///
[AWSProperty(Required=true)]
public string GroupName
{
get { return this._groupName; }
set { this._groupName = value; }
}
// Check to see if GroupName property is set
internal bool IsSetGroupName()
{
return this._groupName != null;
}
///
/// Gets and sets the property TagSpecifications.
///
/// The tags to assign to the security group.
///
///
public List TagSpecifications
{
get { return this._tagSpecifications; }
set { this._tagSpecifications = value; }
}
// Check to see if TagSpecifications property is set
internal bool IsSetTagSpecifications()
{
return this._tagSpecifications != null && this._tagSpecifications.Count > 0;
}
///
/// Gets and sets the property VpcId.
///
/// The ID of the VPC. Required for a nondefault VPC.
///
///
public string VpcId
{
get { return this._vpcId; }
set { this._vpcId = value; }
}
// Check to see if VpcId property is set
internal bool IsSetVpcId()
{
return this._vpcId != null;
}
}
}