amazonka-ec2-2.0: Amazon Elastic Compute Cloud SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.EC2.DeleteSecurityGroup

Description

Deletes a security group.

If you attempt to delete a security group that is associated with an instance, or is referenced by another security group, the operation fails with InvalidGroup.InUse in EC2-Classic or DependencyViolation in EC2-VPC.

We are retiring EC2-Classic. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide.

Synopsis

Creating a Request

data DeleteSecurityGroup Source #

See: newDeleteSecurityGroup smart constructor.

Constructors

DeleteSecurityGroup' 

Fields

  • dryRun :: Maybe Bool

    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.

  • groupId :: Maybe Text

    The ID of the security group. Required for a nondefault VPC.

  • groupName :: Maybe Text
    EC2-Classic, default VPC
    The name of the security group. You can specify either the security group name or the security group ID. For security groups in a nondefault VPC, you must specify the security group ID.

Instances

Instances details
ToHeaders DeleteSecurityGroup Source # 
Instance details

Defined in Amazonka.EC2.DeleteSecurityGroup

ToPath DeleteSecurityGroup Source # 
Instance details

Defined in Amazonka.EC2.DeleteSecurityGroup

ToQuery DeleteSecurityGroup Source # 
Instance details

Defined in Amazonka.EC2.DeleteSecurityGroup

AWSRequest DeleteSecurityGroup Source # 
Instance details

Defined in Amazonka.EC2.DeleteSecurityGroup

Associated Types

type AWSResponse DeleteSecurityGroup #

Generic DeleteSecurityGroup Source # 
Instance details

Defined in Amazonka.EC2.DeleteSecurityGroup

Associated Types

type Rep DeleteSecurityGroup :: Type -> Type #

Read DeleteSecurityGroup Source # 
Instance details

Defined in Amazonka.EC2.DeleteSecurityGroup

Show DeleteSecurityGroup Source # 
Instance details

Defined in Amazonka.EC2.DeleteSecurityGroup

NFData DeleteSecurityGroup Source # 
Instance details

Defined in Amazonka.EC2.DeleteSecurityGroup

Methods

rnf :: DeleteSecurityGroup -> () #

Eq DeleteSecurityGroup Source # 
Instance details

Defined in Amazonka.EC2.DeleteSecurityGroup

Hashable DeleteSecurityGroup Source # 
Instance details

Defined in Amazonka.EC2.DeleteSecurityGroup

type AWSResponse DeleteSecurityGroup Source # 
Instance details

Defined in Amazonka.EC2.DeleteSecurityGroup

type Rep DeleteSecurityGroup Source # 
Instance details

Defined in Amazonka.EC2.DeleteSecurityGroup

type Rep DeleteSecurityGroup = D1 ('MetaData "DeleteSecurityGroup" "Amazonka.EC2.DeleteSecurityGroup" "amazonka-ec2-2.0-48L9RAJvmvzAdBkRegqWCL" 'False) (C1 ('MetaCons "DeleteSecurityGroup'" 'PrefixI 'True) (S1 ('MetaSel ('Just "dryRun") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: (S1 ('MetaSel ('Just "groupId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "groupName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)))))

newDeleteSecurityGroup :: DeleteSecurityGroup Source #

Create a value of DeleteSecurityGroup with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:dryRun:DeleteSecurityGroup', deleteSecurityGroup_dryRun - 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.

DeleteSecurityGroup, deleteSecurityGroup_groupId - The ID of the security group. Required for a nondefault VPC.

DeleteSecurityGroup, deleteSecurityGroup_groupName - [EC2-Classic, default VPC] The name of the security group. You can specify either the security group name or the security group ID. For security groups in a nondefault VPC, you must specify the security group ID.

Request Lenses

deleteSecurityGroup_dryRun :: Lens' DeleteSecurityGroup (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.

deleteSecurityGroup_groupId :: Lens' DeleteSecurityGroup (Maybe Text) Source #

The ID of the security group. Required for a nondefault VPC.

deleteSecurityGroup_groupName :: Lens' DeleteSecurityGroup (Maybe Text) Source #

EC2-Classic, default VPC
The name of the security group. You can specify either the security group name or the security group ID. For security groups in a nondefault VPC, you must specify the security group ID.

Destructuring the Response

data DeleteSecurityGroupResponse Source #

See: newDeleteSecurityGroupResponse smart constructor.

Instances

Instances details
Generic DeleteSecurityGroupResponse Source # 
Instance details

Defined in Amazonka.EC2.DeleteSecurityGroup

Associated Types

type Rep DeleteSecurityGroupResponse :: Type -> Type #

Read DeleteSecurityGroupResponse Source # 
Instance details

Defined in Amazonka.EC2.DeleteSecurityGroup

Show DeleteSecurityGroupResponse Source # 
Instance details

Defined in Amazonka.EC2.DeleteSecurityGroup

NFData DeleteSecurityGroupResponse Source # 
Instance details

Defined in Amazonka.EC2.DeleteSecurityGroup

Eq DeleteSecurityGroupResponse Source # 
Instance details

Defined in Amazonka.EC2.DeleteSecurityGroup

type Rep DeleteSecurityGroupResponse Source # 
Instance details

Defined in Amazonka.EC2.DeleteSecurityGroup

type Rep DeleteSecurityGroupResponse = D1 ('MetaData "DeleteSecurityGroupResponse" "Amazonka.EC2.DeleteSecurityGroup" "amazonka-ec2-2.0-48L9RAJvmvzAdBkRegqWCL" 'False) (C1 ('MetaCons "DeleteSecurityGroupResponse'" 'PrefixI 'False) (U1 :: Type -> Type))

newDeleteSecurityGroupResponse :: DeleteSecurityGroupResponse Source #

Create a value of DeleteSecurityGroupResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.