revoke_db_security_group_ingress
¶
revoke_db_security_group_ingress(
*,
config_overrides: Optional[RDSClientConfig] = 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.
>>> 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/rds.py
15057 15058 15059 15060 15061 15062 15063 15064 15065 15066 15067 15068 15069 15070 15071 15072 15073 15074 15075 15076 15077 15078 15079 15080 15081 15082 15083 15084 15085 15086 15087 15088 15089 15090 15091 15092 15093 15094 15095 15096 15097 15098 15099 15100 15101 15102 15103 15104 15105 15106 15107 15108 15109 15110 15111 15112 15113 15114 15115 15116 15117 15118 15119 15120 15121 15122 15123 15124 | |