Copyright | (c) 2013-2023 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
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
- data RevokeSecurityGroupIngress = RevokeSecurityGroupIngress' {}
- newRevokeSecurityGroupIngress :: RevokeSecurityGroupIngress
- revokeSecurityGroupIngress_cidrIp :: Lens' RevokeSecurityGroupIngress (Maybe Text)
- revokeSecurityGroupIngress_dryRun :: Lens' RevokeSecurityGroupIngress (Maybe Bool)
- revokeSecurityGroupIngress_fromPort :: Lens' RevokeSecurityGroupIngress (Maybe Int)
- revokeSecurityGroupIngress_groupId :: Lens' RevokeSecurityGroupIngress (Maybe Text)
- revokeSecurityGroupIngress_groupName :: Lens' RevokeSecurityGroupIngress (Maybe Text)
- revokeSecurityGroupIngress_ipPermissions :: Lens' RevokeSecurityGroupIngress (Maybe [IpPermission])
- revokeSecurityGroupIngress_ipProtocol :: Lens' RevokeSecurityGroupIngress (Maybe Text)
- revokeSecurityGroupIngress_securityGroupRuleIds :: Lens' RevokeSecurityGroupIngress (Maybe [Text])
- revokeSecurityGroupIngress_sourceSecurityGroupName :: Lens' RevokeSecurityGroupIngress (Maybe Text)
- revokeSecurityGroupIngress_sourceSecurityGroupOwnerId :: Lens' RevokeSecurityGroupIngress (Maybe Text)
- revokeSecurityGroupIngress_toPort :: Lens' RevokeSecurityGroupIngress (Maybe Int)
- data RevokeSecurityGroupIngressResponse = RevokeSecurityGroupIngressResponse' {}
- newRevokeSecurityGroupIngressResponse :: Int -> RevokeSecurityGroupIngressResponse
- revokeSecurityGroupIngressResponse_return :: Lens' RevokeSecurityGroupIngressResponse (Maybe Bool)
- revokeSecurityGroupIngressResponse_unknownIpPermissions :: Lens' RevokeSecurityGroupIngressResponse (Maybe [IpPermission])
- revokeSecurityGroupIngressResponse_httpStatus :: Lens' RevokeSecurityGroupIngressResponse Int
Creating a Request
data RevokeSecurityGroupIngress Source #
See: newRevokeSecurityGroupIngress
smart constructor.
RevokeSecurityGroupIngress' | |
|
Instances
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_securityGroupRuleIds :: Lens' RevokeSecurityGroupIngress (Maybe [Text]) Source #
The IDs of the security group rules.
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 #
See: newRevokeSecurityGroupIngressResponse
smart constructor.
RevokeSecurityGroupIngressResponse' | |
|
Instances
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.
revokeSecurityGroupIngressResponse_httpStatus :: Lens' RevokeSecurityGroupIngressResponse Int Source #
The response's http status code.