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
15218 15219 15220 15221 15222 15223 15224 15225 15226 15227 15228 15229 15230 15231 15232 15233 15234 15235 15236 15237 15238 15239 15240 15241 15242 15243 15244 15245 15246 15247 15248 15249 15250 15251 15252 15253 15254 15255 15256 15257 15258 15259 15260 15261 15262 15263 15264 15265 15266 15267 15268 15269 15270 15271 15272 15273 15274 15275 15276 15277 15278 15279 15280 15281 15282 15283 15284 15285 15286 | |