revoke_security_group_egress
async
¶
revoke_security_group_egress(
*,
config_overrides: Optional[AsyncEC2ClientConfig] = None,
security_group_rule_ids: Optional[SecurityGroupRuleIdList] = None,
dry_run: Optional[Boolean] = None,
group_id: Optional[SecurityGroupId] = None,
source_security_group_name: Optional[String] = None,
source_security_group_owner_id: Optional[String] = None,
ip_protocol: Optional[String] = None,
from_port: Optional[Integer] = None,
to_port: Optional[Integer] = None,
cidr_ip: Optional[String] = None,
ip_permissions: Optional[IpPermissionList] = None,
) -> RevokeSecurityGroupEgressResult
Removes the specified outbound (egress) rules from the specified 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 destination (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.
For a 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.
Parameters:
-
security_group_rule_ids(Optional[SecurityGroupRuleIdList], default:None) –The IDs of the security group rules.
-
dry_run(Optional[Boolean], default:None) –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 isUnauthorizedOperation. -
group_id(Optional[SecurityGroupId], default:None) –The ID of the security group.
-
source_security_group_name(Optional[String], default:None) –Not supported. Use a set of IP permissions to specify a destination security group.
-
source_security_group_owner_id(Optional[String], default:None) –Not supported. Use a set of IP permissions to specify a destination security group.
-
ip_protocol(Optional[String], default:None) –Not supported. Use a set of IP permissions to specify the protocol name or number.
-
from_port(Optional[Integer], default:None) –Not supported. Use a set of IP permissions to specify the port.
-
to_port(Optional[Integer], default:None) –Not supported. Use a set of IP permissions to specify the port.
-
cidr_ip(Optional[String], default:None) –Not supported. Use a set of IP permissions to specify the CIDR.
-
ip_permissions(Optional[IpPermissionList], default:None) –The sets of IP permissions. You can't specify a destination security group and a CIDR IP address range in the same set of permissions.
Raises:
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_ec2/_services/async_ec2.py
59309 59310 59311 59312 59313 59314 59315 59316 59317 59318 59319 59320 59321 59322 59323 59324 59325 59326 59327 59328 59329 59330 59331 59332 59333 59334 59335 59336 59337 59338 59339 59340 59341 59342 59343 59344 59345 59346 59347 59348 59349 59350 59351 59352 59353 59354 59355 59356 59357 59358 59359 59360 59361 59362 59363 59364 59365 59366 59367 59368 59369 59370 59371 59372 59373 59374 59375 59376 59377 59378 59379 59380 59381 59382 59383 59384 59385 59386 59387 59388 59389 59390 59391 59392 | |