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
11824 11825 11826 11827 11828 11829 11830 11831 11832 11833 11834 11835 11836 11837 11838 11839 11840 11841 11842 11843 11844 11845 11846 11847 11848 11849 11850 11851 11852 11853 11854 11855 11856 11857 11858 11859 11860 11861 11862 11863 11864 11865 11866 11867 11868 11869 11870 11871 11872 11873 11874 11875 11876 11877 11878 11879 11880 11881 11882 11883 11884 11885 11886 11887 11888 | |