modify_db_subnet_group
async
¶
modify_db_subnet_group(
*,
config_overrides: Optional[AsyncRDSClientConfig] = None,
db_subnet_group_name: Optional[String] = None,
db_subnet_group_description: Optional[String] = None,
subnet_ids: Optional[SubnetIdentifierList] = None,
) -> ModifyDBSubnetGroupResult
Modifies an existing DB subnet group. DB subnet groups must contain at least one subnet in at least two AZs in the Amazon Web Services Region.
Parameters:
-
db_subnet_group_name(Optional[String], default:None) –The name for the DB subnet group. This value is stored as a lowercase string. You can't modify the default subnet group.
Constraints: Must match the name of an existing DBSubnetGroup. Must not be default.
Example:
mydbsubnetgroup -
db_subnet_group_description(Optional[String], default:None) –The description for the DB subnet group.
-
subnet_ids(Optional[SubnetIdentifierList], default:None) –The EC2 subnet IDs for the DB subnet group.
Raises:
-
DBSubnetGroupDoesNotCoverEnoughAZs–Subnets in the DB subnet group should cover at least two Availability Zones unless there is only one Availability Zone.
-
DBSubnetGroupNotFoundFault–DBSubnetGroupNamedoesn't refer to an existing DB subnet group. -
DBSubnetQuotaExceededFault–The request would result in the user exceeding the allowed number of subnets in a DB subnet groups.
-
InvalidDBSubnetGroupStateFault–The DB subnet group cannot be deleted because it's in use.
-
InvalidSubnet–The requested subnet is invalid, or multiple subnets were requested that are not all in a common VPC.
-
SubnetAlreadyInUse–The DB subnet is already in use in the Availability Zone.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
To modify a DB subnet group The following example adds a subnet with the ID subnet-08e41f9e230222222 to the DB subnet group named mysubnetgroup. To keep the existing subnets in the subnet group, include their IDs as values in the --subnet-ids option. Make sure to have subnets with at least two different Availability Zones in the DB subnet group.
>>> await client.modify_db_subnet_group(db_subnet_group_name='mysubnetgroup', db_subnet_group_description='', subnet_ids=['subnet-0a1dc4e1a6f123456', 'subnet-070dd7ecb3aaaaaaa', 'subnet-00f5b198bc0abcdef', 'subnet-08e41f9e230222222'])
Source code in docs_src/capo_rds/_services/async_rds.py
11959 11960 11961 11962 11963 11964 11965 11966 11967 11968 11969 11970 11971 11972 11973 11974 11975 11976 11977 11978 11979 11980 11981 11982 11983 11984 11985 11986 11987 11988 11989 11990 11991 11992 11993 11994 11995 11996 11997 11998 11999 12000 12001 12002 12003 12004 12005 12006 12007 12008 12009 12010 12011 12012 12013 12014 12015 12016 12017 12018 12019 12020 12021 12022 12023 12024 | |