modify_db_subnet_group
¶
modify_db_subnet_group(
*,
config_overrides: Optional[RDSClientConfig] = 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.
>>> 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/rds.py
12275 12276 12277 12278 12279 12280 12281 12282 12283 12284 12285 12286 12287 12288 12289 12290 12291 12292 12293 12294 12295 12296 12297 12298 12299 12300 12301 12302 12303 12304 12305 12306 12307 12308 12309 12310 12311 12312 12313 12314 12315 12316 12317 12318 12319 12320 12321 12322 12323 12324 12325 12326 12327 12328 12329 12330 12331 12332 12333 12334 12335 12336 12337 12338 12339 | |