create_db_security_group
async
¶
create_db_security_group(
*,
config_overrides: Optional[AsyncRDSClientConfig] = None,
db_security_group_name: Optional[String] = None,
db_security_group_description: Optional[String] = None,
tags: Optional[TagList] = None,
) -> CreateDBSecurityGroupResult
Creates a new DB security group. DB security groups control access to a DB instance.
A DB security group controls access to EC2-Classic DB instances that are not in a VPC.
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 for the DB security group. This value is stored as a lowercase string.
Constraints:
-
Must be 1 to 255 letters, numbers, or hyphens.
-
First character must be a letter
-
Can't end with a hyphen or contain two consecutive hyphens
-
Must not be "Default"
Example:
mysecuritygroup -
-
db_security_group_description(Optional[String], default:None) –The description for the DB security group.
-
tags(Optional[TagList], default:None) –Tags to assign to the DB security group.
Raises:
-
DBSecurityGroupAlreadyExistsFault–A DB security group with the name specified in
DBSecurityGroupNamealready exists. -
DBSecurityGroupNotSupportedFault–A DB security group isn't allowed for this action.
-
DBSecurityGroupQuotaExceededFault–The request would result in the user exceeding the allowed number of DB security groups.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
To create a DB security group. This example creates a DB security group.
>>> await client.create_db_security_group(db_security_group_name='mydbsecuritygroup', db_security_group_description='My DB security group')
Source code in docs_src/capo_rds/_services/async_rds.py
3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 | |