create_db_subnet_group
¶
create_db_subnet_group(
*,
config_overrides: Optional[DocDBClientConfig] = None,
db_subnet_group_name: Optional[String] = None,
db_subnet_group_description: Optional[String] = None,
subnet_ids: Optional[SubnetIdentifierList] = None,
tags: Optional[TagList] = None,
) -> CreateDBSubnetGroupResult
Creates a new subnet group. subnet groups must contain at least one subnet in at least two Availability Zones in the Amazon Web Services Region.
Parameters:
-
db_subnet_group_name(Optional[String], default:None) –The name for the subnet group. This value is stored as a lowercase string.
Constraints: Must contain no more than 255 letters, numbers, periods, underscores, spaces, or hyphens. Must not be default.
Example:
mySubnetgroup -
db_subnet_group_description(Optional[String], default:None) –The description for the subnet group.
-
subnet_ids(Optional[SubnetIdentifierList], default:None) –The Amazon EC2 subnet IDs for the subnet group.
-
tags(Optional[TagList], default:None) –The tags to be assigned to the subnet group.
Raises:
-
DBSubnetGroupAlreadyExistsFault–DBSubnetGroupNameis already being used by an existing subnet group. -
DBSubnetGroupDoesNotCoverEnoughAZs–Subnets in the subnet group should cover at least two Availability Zones unless there is only one Availability Zone.
-
DBSubnetGroupQuotaExceededFault–The request would cause you to exceed the allowed number of subnet groups.
-
DBSubnetQuotaExceededFault–The request would cause you to exceed the allowed number of subnets in a subnet group.
-
InvalidSubnet–The requested subnet is not valid, or multiple subnets were requested that are not all in a common virtual private cloud (VPC).
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_docdb/_services/doc_db.py
1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 | |