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

Description

Removes the specified inbound (ingress) rules from a security group.

You can specify rules using either rule IDs or security group rule properties. If you use rule properties, the values that you specify (for example, ports) must match the existing rule's values exactly. Each rule has a protocol, from and to ports, and source (CIDR range, security group, or prefix list). For the TCP and UDP protocols, you must also specify the destination port or range of ports. For the ICMP protocol, you must also specify the ICMP type and code. If the security group rule has a description, you do not need to specify the description to revoke the rule.

EC2-Classic, default VPC
If the values you specify do not match the existing rule's values, no error is returned, and the output describes the security group rules that were not revoked.

Amazon Web Services recommends that you describe the security group to verify that the rules were removed.

Rule changes are propagated to instances within the security group as quickly as possible. However, a small delay might occur.

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 RevokeSecurityGroupIngress Source #

See: newRevokeSecurityGroupIngress smart constructor.

Constructors

RevokeSecurityGroupIngress' 

Fields

  • cidrIp :: Maybe Text

    The CIDR IP address range. You can't specify this parameter when specifying a source security group.

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

  • fromPort :: Maybe Int

    The start of port range for the TCP and UDP protocols, or an ICMP type number. For the ICMP type number, use -1 to specify all ICMP types.

  • groupId :: Maybe Text

    The ID of the security group. You must specify either the security group ID or the security group name in the request. For security groups in a nondefault VPC, you must specify the security group ID.

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

    The sets of IP permissions. You can't specify a source security group and a CIDR IP address range in the same set of permissions.

  • ipProtocol :: Maybe Text

    The IP protocol name (tcp, udp, icmp) or number (see Protocol Numbers). Use -1 to specify all.

  • securityGroupRuleIds :: Maybe [Text]

    The IDs of the security group rules.

  • sourceSecurityGroupName :: Maybe Text
    EC2-Classic, default VPC
    The name of the source security group. You can't specify this parameter in combination with the following parameters: the CIDR IP address range, the start of the port range, the IP protocol, and the end of the port range. For EC2-VPC, the source security group must be in the same VPC. To revoke a specific rule for an IP protocol and port range, use a set of IP permissions instead.
  • sourceSecurityGroupOwnerId :: Maybe Text
    EC2-Classic
    The Amazon Web Services account ID of the source security group, if the source security group is in a different account. You can't specify this parameter in combination with the following parameters: the CIDR IP address range, the IP protocol, the start of the port range, and the end of the port range. To revoke a specific rule for an IP protocol and port range, use a set of IP permissions instead.
  • toPort :: Maybe Int

    The end of port range for the TCP and UDP protocols, or an ICMP code number. For the ICMP code number, use -1 to specify all ICMP codes for the ICMP type.

Instances

Instances details
ToHeaders RevokeSecurityGroupIngress Source # 
Instance details

Defined in Amazonka.EC2.RevokeSecurityGroupIngress

ToPath RevokeSecurityGroupIngress Source # 
Instance details

Defined in Amazonka.EC2.RevokeSecurityGroupIngress

ToQuery RevokeSecurityGroupIngress Source # 
Instance details

Defined in Amazonka.EC2.RevokeSecurityGroupIngress

AWSRequest RevokeSecurityGroupIngress Source # 
Instance details

Defined in Amazonka.EC2.RevokeSecurityGroupIngress

Generic RevokeSecurityGroupIngress Source # 
Instance details

Defined in Amazonka.EC2.RevokeSecurityGroupIngress

Associated Types

type Rep RevokeSecurityGroupIngress :: Type -> Type #

Read RevokeSecurityGroupIngress Source # 
Instance details

Defined in Amazonka.EC2.RevokeSecurityGroupIngress

Show RevokeSecurityGroupIngress Source # 
Instance details

Defined in Amazonka.EC2.RevokeSecurityGroupIngress

NFData RevokeSecurityGroupIngress Source # 
Instance details

Defined in Amazonka.EC2.RevokeSecurityGroupIngress

Eq RevokeSecurityGroupIngress Source # 
Instance details

Defined in Amazonka.EC2.RevokeSecurityGroupIngress

Hashable RevokeSecurityGroupIngress Source # 
Instance details

Defined in Amazonka.EC2.RevokeSecurityGroupIngress

type AWSResponse RevokeSecurityGroupIngress Source # 
Instance details

Defined in Amazonka.EC2.RevokeSecurityGroupIngress

type Rep RevokeSecurityGroupIngress Source # 
Instance details

Defined in Amazonka.EC2.RevokeSecurityGroupIngress

type Rep RevokeSecurityGroupIngress = D1 ('MetaData "RevokeSecurityGroupIngress" "Amazonka.EC2.RevokeSecurityGroupIngress" "amazonka-ec2-2.0-48L9RAJvmvzAdBkRegqWCL" 'False) (C1 ('MetaCons "RevokeSecurityGroupIngress'" 'PrefixI 'True) (((S1 ('MetaSel ('Just "cidrIp") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "dryRun") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool))) :*: (S1 ('MetaSel ('Just "fromPort") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Int)) :*: (S1 ('MetaSel ('Just "groupId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "groupName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))))) :*: ((S1 ('MetaSel ('Just "ipPermissions") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [IpPermission])) :*: (S1 ('MetaSel ('Just "ipProtocol") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "securityGroupRuleIds") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Text])))) :*: (S1 ('MetaSel ('Just "sourceSecurityGroupName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "sourceSecurityGroupOwnerId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "toPort") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Int)))))))

newRevokeSecurityGroupIngress :: RevokeSecurityGroupIngress Source #

Create a value of RevokeSecurityGroupIngress 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:

RevokeSecurityGroupIngress, revokeSecurityGroupIngress_cidrIp - The CIDR IP address range. You can't specify this parameter when specifying a source security group.

$sel:dryRun:RevokeSecurityGroupIngress', revokeSecurityGroupIngress_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.

RevokeSecurityGroupIngress, revokeSecurityGroupIngress_fromPort - The start of port range for the TCP and UDP protocols, or an ICMP type number. For the ICMP type number, use -1 to specify all ICMP types.

RevokeSecurityGroupIngress, revokeSecurityGroupIngress_groupId - The ID of the security group. You must specify either the security group ID or the security group name in the request. For security groups in a nondefault VPC, you must specify the security group ID.

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

RevokeSecurityGroupIngress, revokeSecurityGroupIngress_ipPermissions - The sets of IP permissions. You can't specify a source security group and a CIDR IP address range in the same set of permissions.

RevokeSecurityGroupIngress, revokeSecurityGroupIngress_ipProtocol - The IP protocol name (tcp, udp, icmp) or number (see Protocol Numbers). Use -1 to specify all.

$sel:securityGroupRuleIds:RevokeSecurityGroupIngress', revokeSecurityGroupIngress_securityGroupRuleIds - The IDs of the security group rules.

$sel:sourceSecurityGroupName:RevokeSecurityGroupIngress', revokeSecurityGroupIngress_sourceSecurityGroupName - [EC2-Classic, default VPC] The name of the source security group. You can't specify this parameter in combination with the following parameters: the CIDR IP address range, the start of the port range, the IP protocol, and the end of the port range. For EC2-VPC, the source security group must be in the same VPC. To revoke a specific rule for an IP protocol and port range, use a set of IP permissions instead.

$sel:sourceSecurityGroupOwnerId:RevokeSecurityGroupIngress', revokeSecurityGroupIngress_sourceSecurityGroupOwnerId - [EC2-Classic] The Amazon Web Services account ID of the source security group, if the source security group is in a different account. You can't specify this parameter in combination with the following parameters: the CIDR IP address range, the IP protocol, the start of the port range, and the end of the port range. To revoke a specific rule for an IP protocol and port range, use a set of IP permissions instead.

RevokeSecurityGroupIngress, revokeSecurityGroupIngress_toPort - The end of port range for the TCP and UDP protocols, or an ICMP code number. For the ICMP code number, use -1 to specify all ICMP codes for the ICMP type.

Request Lenses

revokeSecurityGroupIngress_cidrIp :: Lens' RevokeSecurityGroupIngress (Maybe Text) Source #

The CIDR IP address range. You can't specify this parameter when specifying a source security group.

revokeSecurityGroupIngress_dryRun :: Lens' RevokeSecurityGroupIngress (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.

revokeSecurityGroupIngress_fromPort :: Lens' RevokeSecurityGroupIngress (Maybe Int) Source #

The start of port range for the TCP and UDP protocols, or an ICMP type number. For the ICMP type number, use -1 to specify all ICMP types.

revokeSecurityGroupIngress_groupId :: Lens' RevokeSecurityGroupIngress (Maybe Text) Source #

The ID of the security group. You must specify either the security group ID or the security group name in the request. For security groups in a nondefault VPC, you must specify the security group ID.

revokeSecurityGroupIngress_groupName :: Lens' RevokeSecurityGroupIngress (Maybe Text) Source #

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

revokeSecurityGroupIngress_ipPermissions :: Lens' RevokeSecurityGroupIngress (Maybe [IpPermission]) Source #

The sets of IP permissions. You can't specify a source security group and a CIDR IP address range in the same set of permissions.

revokeSecurityGroupIngress_ipProtocol :: Lens' RevokeSecurityGroupIngress (Maybe Text) Source #

The IP protocol name (tcp, udp, icmp) or number (see Protocol Numbers). Use -1 to specify all.

revokeSecurityGroupIngress_sourceSecurityGroupName :: Lens' RevokeSecurityGroupIngress (Maybe Text) Source #

EC2-Classic, default VPC
The name of the source security group. You can't specify this parameter in combination with the following parameters: the CIDR IP address range, the start of the port range, the IP protocol, and the end of the port range. For EC2-VPC, the source security group must be in the same VPC. To revoke a specific rule for an IP protocol and port range, use a set of IP permissions instead.

revokeSecurityGroupIngress_sourceSecurityGroupOwnerId :: Lens' RevokeSecurityGroupIngress (Maybe Text) Source #

EC2-Classic
The Amazon Web Services account ID of the source security group, if the source security group is in a different account. You can't specify this parameter in combination with the following parameters: the CIDR IP address range, the IP protocol, the start of the port range, and the end of the port range. To revoke a specific rule for an IP protocol and port range, use a set of IP permissions instead.

revokeSecurityGroupIngress_toPort :: Lens' RevokeSecurityGroupIngress (Maybe Int) Source #

The end of port range for the TCP and UDP protocols, or an ICMP code number. For the ICMP code number, use -1 to specify all ICMP codes for the ICMP type.

Destructuring the Response

data RevokeSecurityGroupIngressResponse Source #

Constructors

RevokeSecurityGroupIngressResponse' 

Fields

Instances

Instances details
Generic RevokeSecurityGroupIngressResponse Source # 
Instance details

Defined in Amazonka.EC2.RevokeSecurityGroupIngress

Associated Types

type Rep RevokeSecurityGroupIngressResponse :: Type -> Type #

Read RevokeSecurityGroupIngressResponse Source # 
Instance details

Defined in Amazonka.EC2.RevokeSecurityGroupIngress

Show RevokeSecurityGroupIngressResponse Source # 
Instance details

Defined in Amazonka.EC2.RevokeSecurityGroupIngress

NFData RevokeSecurityGroupIngressResponse Source # 
Instance details

Defined in Amazonka.EC2.RevokeSecurityGroupIngress

Eq RevokeSecurityGroupIngressResponse Source # 
Instance details

Defined in Amazonka.EC2.RevokeSecurityGroupIngress

type Rep RevokeSecurityGroupIngressResponse Source # 
Instance details

Defined in Amazonka.EC2.RevokeSecurityGroupIngress

type Rep RevokeSecurityGroupIngressResponse = D1 ('MetaData "RevokeSecurityGroupIngressResponse" "Amazonka.EC2.RevokeSecurityGroupIngress" "amazonka-ec2-2.0-48L9RAJvmvzAdBkRegqWCL" 'False) (C1 ('MetaCons "RevokeSecurityGroupIngressResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "return'") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: (S1 ('MetaSel ('Just "unknownIpPermissions") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [IpPermission])) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))))

newRevokeSecurityGroupIngressResponse Source #

Create a value of RevokeSecurityGroupIngressResponse 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:return':RevokeSecurityGroupIngressResponse', revokeSecurityGroupIngressResponse_return - Returns true if the request succeeds; otherwise, returns an error.

$sel:unknownIpPermissions:RevokeSecurityGroupIngressResponse', revokeSecurityGroupIngressResponse_unknownIpPermissions - The inbound rules that were unknown to the service. In some cases, unknownIpPermissionSet might be in a different format from the request parameter.

$sel:httpStatus:RevokeSecurityGroupIngressResponse', revokeSecurityGroupIngressResponse_httpStatus - The response's http status code.

Response Lenses

revokeSecurityGroupIngressResponse_return :: Lens' RevokeSecurityGroupIngressResponse (Maybe Bool) Source #

Returns true if the request succeeds; otherwise, returns an error.

revokeSecurityGroupIngressResponse_unknownIpPermissions :: Lens' RevokeSecurityGroupIngressResponse (Maybe [IpPermission]) Source #

The inbound rules that were unknown to the service. In some cases, unknownIpPermissionSet might be in a different format from the request parameter.