revoke_db_security_group_ingress
async
¶
revoke_db_security_group_ingress(
*,
config_overrides: Optional[AsyncRDSClientConfig] = None,
db_security_group_name: Optional[String] = None,
cidrip: Optional[String] = None,
ec2_security_group_name: Optional[String] = None,
ec2_security_group_id: Optional[String] = None,
ec2_security_group_owner_id: Optional[String] = None,
) -> RevokeDBSecurityGroupIngressResult
Revokes ingress from a DBSecurityGroup for previously authorized IP ranges or EC2 or VPC security groups. Required parameters for this API are one of CIDRIP, EC2SecurityGroupId for VPC, or (EC2SecurityGroupOwnerId and either EC2SecurityGroupName or EC2SecurityGroupId).
EC2-Classic was retired on August 15, 2022. If you haven't migrated from EC2-Classic to a VPC, we recommend that you migrate as soon as possible. For more information, see Migrate from EC2-Classic to a VPC in the Amazon EC2 User Guide, the blog EC2-Classic Networking is Retiring – Here’s How to Prepare, and Moving a DB instance not in a VPC into a VPC in the Amazon RDS User Guide.
Parameters:
-
db_security_group_name(Optional[String], default:None) –The name of the DB security group to revoke ingress from.
-
cidrip(Optional[String], default:None) –The IP range to revoke access from. Must be a valid CIDR range. If
CIDRIPis specified,EC2SecurityGroupName,EC2SecurityGroupIdandEC2SecurityGroupOwnerIdcan't be provided. -
ec2_security_group_name(Optional[String], default:None) –The name of the EC2 security group to revoke access from. For VPC DB security groups,
EC2SecurityGroupIdmust be provided. Otherwise, EC2SecurityGroupOwnerId and eitherEC2SecurityGroupNameorEC2SecurityGroupIdmust be provided. -
ec2_security_group_id(Optional[String], default:None) –The id of the EC2 security group to revoke access from. For VPC DB security groups,
EC2SecurityGroupIdmust be provided. Otherwise, EC2SecurityGroupOwnerId and eitherEC2SecurityGroupNameorEC2SecurityGroupIdmust be provided. -
ec2_security_group_owner_id(Optional[String], default:None) –The Amazon Web Services account number of the owner of the EC2 security group specified in the
EC2SecurityGroupNameparameter. The Amazon Web Services access key ID isn't an acceptable value. For VPC DB security groups,EC2SecurityGroupIdmust be provided. Otherwise, EC2SecurityGroupOwnerId and eitherEC2SecurityGroupNameorEC2SecurityGroupIdmust be provided.
Raises:
-
AuthorizationNotFoundFault–The specified CIDR IP range or Amazon EC2 security group might not be authorized for the specified DB security group.
Or, RDS might not be authorized to perform necessary actions using IAM on your behalf.
-
DBSecurityGroupNotFoundFault–DBSecurityGroupNamedoesn't refer to an existing DB security group. -
InvalidDBSecurityGroupStateFault–The state of the DB security group doesn't allow deletion.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
To revoke ingress for a DB security group This example revokes ingress for the specified CIDR block associated with the specified DB security group.
>>> await client.revoke_db_security_group_ingress(db_security_group_name='mydbsecuritygroup', cidrip='203.0.113.5/32')
Source code in docs_src/capo_rds/_services/async_rds.py
15704 15705 15706 15707 15708 15709 15710 15711 15712 15713 15714 15715 15716 15717 15718 15719 15720 15721 15722 15723 15724 15725 15726 15727 15728 15729 15730 15731 15732 15733 15734 15735 15736 15737 15738 15739 15740 15741 15742 15743 15744 15745 15746 15747 15748 15749 15750 15751 15752 15753 15754 15755 15756 15757 15758 15759 15760 15761 15762 15763 15764 15765 15766 15767 15768 15769 15770 15771 15772 | |