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
3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 | |