revoke_security_group_egress
¶
revoke_security_group_egress(
*,
config_overrides: Optional[EC2ClientConfig] = 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/ec2.py
58489 58490 58491 58492 58493 58494 58495 58496 58497 58498 58499 58500 58501 58502 58503 58504 58505 58506 58507 58508 58509 58510 58511 58512 58513 58514 58515 58516 58517 58518 58519 58520 58521 58522 58523 58524 58525 58526 58527 58528 58529 58530 58531 58532 58533 58534 58535 58536 58537 58538 58539 58540 58541 58542 58543 58544 58545 58546 58547 58548 58549 58550 58551 58552 58553 58554 58555 58556 58557 58558 58559 58560 58561 58562 58563 58564 58565 58566 58567 58568 58569 58570 58571 | |