amazonka-ec2-1.4.1: Amazon Elastic Compute Cloud SDK.

Copyright(c) 2013-2016 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Network.AWS.EC2.CreateSecurityGroup

Contents

Description

Creates a security group.

A security group is for use with instances either in the EC2-Classic platform or in a specific VPC. 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.

EC2-Classic: You can have up to 500 security groups.

EC2-VPC: You can create up to 500 security groups per VPC.

When you create a security group, you specify a friendly name of your choice. You can have a security group for use in EC2-Classic with the same name as a security group for use in a VPC. However, you can't have two security groups for use in EC2-Classic with the same name or two security groups for use in a VPC with the same name.

You have a default security group for use in EC2-Classic and 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.

Synopsis

Creating a Request

createSecurityGroup Source #

Creates a value of CreateSecurityGroup with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

data CreateSecurityGroup Source #

Contains the parameters for CreateSecurityGroup.

See: createSecurityGroup smart constructor.

Instances

Eq CreateSecurityGroup Source # 
Data CreateSecurityGroup Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CreateSecurityGroup -> c CreateSecurityGroup #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CreateSecurityGroup #

toConstr :: CreateSecurityGroup -> Constr #

dataTypeOf :: CreateSecurityGroup -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c CreateSecurityGroup) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CreateSecurityGroup) #

gmapT :: (forall b. Data b => b -> b) -> CreateSecurityGroup -> CreateSecurityGroup #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CreateSecurityGroup -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CreateSecurityGroup -> r #

gmapQ :: (forall d. Data d => d -> u) -> CreateSecurityGroup -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> CreateSecurityGroup -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CreateSecurityGroup -> m CreateSecurityGroup #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CreateSecurityGroup -> m CreateSecurityGroup #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CreateSecurityGroup -> m CreateSecurityGroup #

Read CreateSecurityGroup Source # 
Show CreateSecurityGroup Source # 
Generic CreateSecurityGroup Source # 
Hashable CreateSecurityGroup Source # 
NFData CreateSecurityGroup Source # 

Methods

rnf :: CreateSecurityGroup -> () #

AWSRequest CreateSecurityGroup Source # 
ToQuery CreateSecurityGroup Source # 
ToPath CreateSecurityGroup Source # 
ToHeaders CreateSecurityGroup Source # 
type Rep CreateSecurityGroup Source # 
type Rep CreateSecurityGroup = D1 (MetaData "CreateSecurityGroup" "Network.AWS.EC2.CreateSecurityGroup" "amazonka-ec2-1.4.1-5DlWz6no0BoLQhxZVyzMyd" False) (C1 (MetaCons "CreateSecurityGroup'" PrefixI True) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_csgVPCId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) (S1 (MetaSel (Just Symbol "_csgDryRun") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Bool)))) ((:*:) (S1 (MetaSel (Just Symbol "_csgGroupName") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text)) (S1 (MetaSel (Just Symbol "_csgDescription") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text)))))
type Rs CreateSecurityGroup Source # 

Request Lenses

csgVPCId :: Lens' CreateSecurityGroup (Maybe Text) Source #

EC2-VPC
The ID of the VPC. Required for EC2-VPC.

csgDryRun :: Lens' CreateSecurityGroup (Maybe Bool) Source #

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

csgGroupName :: Lens' CreateSecurityGroup Text Source #

The name of the security group.

Constraints: Up to 255 characters in length

Constraints for EC2-Classic: ASCII characters

Constraints for EC2-VPC: a-z, A-Z, 0-9, spaces, and ._-:/()#,'[]+=&amp;;{}!$*

csgDescription :: Lens' CreateSecurityGroup Text Source #

A description for the security group. This is informational only.

Constraints: Up to 255 characters in length

Constraints for EC2-Classic: ASCII characters

Constraints for EC2-VPC: a-z, A-Z, 0-9, spaces, and ._-:/()#,'[]+=&amp;;{}!$*

Destructuring the Response

createSecurityGroupResponse Source #

Creates a value of CreateSecurityGroupResponse with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

data CreateSecurityGroupResponse Source #

Contains the output of CreateSecurityGroup.

See: createSecurityGroupResponse smart constructor.

Instances

Eq CreateSecurityGroupResponse Source # 
Data CreateSecurityGroupResponse Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CreateSecurityGroupResponse -> c CreateSecurityGroupResponse #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CreateSecurityGroupResponse #

toConstr :: CreateSecurityGroupResponse -> Constr #

dataTypeOf :: CreateSecurityGroupResponse -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c CreateSecurityGroupResponse) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CreateSecurityGroupResponse) #

gmapT :: (forall b. Data b => b -> b) -> CreateSecurityGroupResponse -> CreateSecurityGroupResponse #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CreateSecurityGroupResponse -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CreateSecurityGroupResponse -> r #

gmapQ :: (forall d. Data d => d -> u) -> CreateSecurityGroupResponse -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> CreateSecurityGroupResponse -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CreateSecurityGroupResponse -> m CreateSecurityGroupResponse #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CreateSecurityGroupResponse -> m CreateSecurityGroupResponse #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CreateSecurityGroupResponse -> m CreateSecurityGroupResponse #

Read CreateSecurityGroupResponse Source # 
Show CreateSecurityGroupResponse Source # 
Generic CreateSecurityGroupResponse Source # 
NFData CreateSecurityGroupResponse Source # 
type Rep CreateSecurityGroupResponse Source # 
type Rep CreateSecurityGroupResponse = D1 (MetaData "CreateSecurityGroupResponse" "Network.AWS.EC2.CreateSecurityGroup" "amazonka-ec2-1.4.1-5DlWz6no0BoLQhxZVyzMyd" False) (C1 (MetaCons "CreateSecurityGroupResponse'" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_csgrsResponseStatus") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Int)) (S1 (MetaSel (Just Symbol "_csgrsGroupId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text))))

Response Lenses

csgrsGroupId :: Lens' CreateSecurityGroupResponse Text Source #

The ID of the security group.