create_db_instance
¶
create_db_instance(
*,
config_overrides: Optional[NeptuneClientConfig] = None,
db_name: Optional[String] = None,
db_instance_identifier: Optional[String] = None,
allocated_storage: Optional[IntegerOptional] = None,
db_instance_class: Optional[String] = None,
engine: Optional[String] = None,
master_username: Optional[String] = None,
master_user_password: Optional[String] = None,
db_security_groups: Optional[DBSecurityGroupNameList] = None,
vpc_security_group_ids: Optional[VpcSecurityGroupIdList] = None,
availability_zone: Optional[String] = None,
db_subnet_group_name: Optional[String] = None,
preferred_maintenance_window: Optional[String] = None,
db_parameter_group_name: Optional[String] = None,
backup_retention_period: Optional[IntegerOptional] = None,
preferred_backup_window: Optional[String] = None,
port: Optional[IntegerOptional] = None,
multi_az: Optional[BooleanOptional] = None,
engine_version: Optional[String] = None,
auto_minor_version_upgrade: Optional[BooleanOptional] = None,
license_model: Optional[String] = None,
iops: Optional[IntegerOptional] = None,
option_group_name: Optional[String] = None,
character_set_name: Optional[String] = None,
publicly_accessible: Optional[BooleanOptional] = None,
tags: Optional[TagList] = None,
db_cluster_identifier: Optional[String] = None,
storage_type: Optional[String] = None,
tde_credential_arn: Optional[String] = None,
tde_credential_password: Optional[SensitiveString] = None,
storage_encrypted: Optional[BooleanOptional] = None,
kms_key_id: Optional[String] = None,
domain: Optional[String] = None,
copy_tags_to_snapshot: Optional[BooleanOptional] = None,
monitoring_interval: Optional[IntegerOptional] = None,
monitoring_role_arn: Optional[String] = None,
domain_iam_role_name: Optional[String] = None,
promotion_tier: Optional[IntegerOptional] = None,
timezone: Optional[String] = None,
enable_iam_database_authentication: Optional[BooleanOptional] = None,
enable_performance_insights: Optional[BooleanOptional] = None,
performance_insights_kms_key_id: Optional[String] = None,
enable_cloudwatch_logs_exports: Optional[LogTypeList] = None,
deletion_protection: Optional[BooleanOptional] = None,
) -> CreateDBInstanceResult
Creates a new DB instance.
Parameters:
-
db_name(Optional[String], default:None) –Not supported.
-
db_instance_identifier(Optional[String], default:None) –The DB instance identifier. This parameter is stored as a lowercase string.
Constraints:
-
Must contain from 1 to 63 letters, numbers, or hyphens.
-
First character must be a letter.
-
Cannot end with a hyphen or contain two consecutive hyphens.
Example:
mydbinstance -
-
allocated_storage(Optional[IntegerOptional], default:None) –Not supported by Neptune.
-
db_instance_class(Optional[String], default:None) –The compute and memory capacity of the DB instance, for example,
db.m4.large. Not all DB instance classes are available in all Amazon Regions. -
engine(Optional[String], default:None) –The name of the database engine to be used for this instance.
Valid Values:
neptune -
master_username(Optional[String], default:None) –Not supported by Neptune.
-
master_user_password(Optional[String], default:None) –Not supported by Neptune.
-
db_security_groups(Optional[DBSecurityGroupNameList], default:None) –A list of DB security groups to associate with this DB instance.
Default: The default DB security group for the database engine.
-
vpc_security_group_ids(Optional[VpcSecurityGroupIdList], default:None) –A list of EC2 VPC security groups to associate with this DB instance.
Not applicable. The associated list of EC2 VPC security groups is managed by the DB cluster. For more information, see CreateDBCluster.
Default: The default EC2 VPC security group for the DB subnet group's VPC.
-
availability_zone(Optional[String], default:None) –The EC2 Availability Zone that the DB instance is created in
Default: A random, system-chosen Availability Zone in the endpoint's Amazon Region.
Example:
us-east-1dConstraint: The AvailabilityZone parameter can't be specified if the MultiAZ parameter is set to
true. The specified Availability Zone must be in the same Amazon Region as the current endpoint. -
db_subnet_group_name(Optional[String], default:None) –A DB subnet group to associate with this DB instance.
If there is no DB subnet group, then it is a non-VPC DB instance.
-
preferred_maintenance_window(Optional[String], default:None) –The time range each week during which system maintenance can occur, in Universal Coordinated Time (UTC).
Format:
ddd:hh24:mi-ddd:hh24:miThe default is a 30-minute window selected at random from an 8-hour block of time for each Amazon Region, occurring on a random day of the week.
Valid Days: Mon, Tue, Wed, Thu, Fri, Sat, Sun.
Constraints: Minimum 30-minute window.
-
db_parameter_group_name(Optional[String], default:None) –The name of the DB parameter group to associate with this DB instance. If this argument is omitted, the default DBParameterGroup for the specified engine is used.
Constraints:
-
Must be 1 to 255 letters, numbers, or hyphens.
-
First character must be a letter
-
Cannot end with a hyphen or contain two consecutive hyphens
-
-
backup_retention_period(Optional[IntegerOptional], default:None) –The number of days for which automated backups are retained.
Not applicable. The retention period for automated backups is managed by the DB cluster. For more information, see CreateDBCluster.
Default: 1
Constraints:
-
Must be a value from 0 to 35
-
Cannot be set to 0 if the DB instance is a source to Read Replicas
-
-
preferred_backup_window(Optional[String], default:None) –The daily time range during which automated backups are created.
Not applicable. The daily time range for creating automated backups is managed by the DB cluster. For more information, see CreateDBCluster.
-
port(Optional[IntegerOptional], default:None) –The port number on which the database accepts connections.
Not applicable. The port is managed by the DB cluster. For more information, see CreateDBCluster.
Default:
8182Type: Integer
-
multi_az(Optional[BooleanOptional], default:None) –Specifies if the DB instance is a Multi-AZ deployment. You can't set the AvailabilityZone parameter if the MultiAZ parameter is set to true.
-
engine_version(Optional[String], default:None) –The version number of the database engine to use. Currently, setting this parameter has no effect.
-
auto_minor_version_upgrade(Optional[BooleanOptional], default:None) –Indicates that minor engine upgrades are applied automatically to the DB instance during the maintenance window.
Default:
true -
license_model(Optional[String], default:None) –License model information for this DB instance.
Valid values:
license-included|bring-your-own-license|general-public-license -
iops(Optional[IntegerOptional], default:None) –The amount of Provisioned IOPS (input/output operations per second) to be initially allocated for the DB instance.
-
option_group_name(Optional[String], default:None) –(Not supported by Neptune)
-
character_set_name(Optional[String], default:None) –(Not supported by Neptune)
-
publicly_accessible(Optional[BooleanOptional], default:None) –Indicates whether the DB instance is publicly accessible.
When the DB instance is publicly accessible and you connect from outside of the DB instance's virtual private cloud (VPC), its Domain Name System (DNS) endpoint resolves to the public IP address. When you connect from within the same VPC as the DB instance, the endpoint resolves to the private IP address. Access to the DB instance is ultimately controlled by the security group it uses. That public access isn't permitted if the security group assigned to the DB cluster doesn't permit it.
When the DB instance isn't publicly accessible, it is an internal DB instance with a DNS name that resolves to a private IP address.
-
tags(Optional[TagList], default:None) –The tags to assign to the new instance.
-
db_cluster_identifier(Optional[String], default:None) –The identifier of the DB cluster that the instance will belong to.
For information on creating a DB cluster, see CreateDBCluster.
Type: String
-
storage_type(Optional[String], default:None) –Not applicable. In Neptune the storage type is managed at the DB Cluster level.
-
tde_credential_arn(Optional[String], default:None) –The ARN from the key store with which to associate the instance for TDE encryption.
-
tde_credential_password(Optional[SensitiveString], default:None) –The password for the given ARN from the key store in order to access the device.
-
storage_encrypted(Optional[BooleanOptional], default:None) –Specifies whether the DB instance is encrypted.
Not applicable. The encryption for DB instances is managed by the DB cluster. For more information, see CreateDBCluster.
Default: false
-
kms_key_id(Optional[String], default:None) –The Amazon KMS key identifier for an encrypted DB instance.
The KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption key. If you are creating a DB instance with the same Amazon account that owns the KMS encryption key used to encrypt the new DB instance, then you can use the KMS key alias instead of the ARN for the KMS encryption key.
Not applicable. The KMS key identifier is managed by the DB cluster. For more information, see CreateDBCluster.
If the
StorageEncryptedparameter is true, and you do not specify a value for theKmsKeyIdparameter, then Amazon Neptune will use your default encryption key. Amazon KMS creates the default encryption key for your Amazon account. Your Amazon account has a different default encryption key for each Amazon Region. -
domain(Optional[String], default:None) –Specify the Active Directory Domain to create the instance in.
-
copy_tags_to_snapshot(Optional[BooleanOptional], default:None) –True to copy all tags from the DB instance to snapshots of the DB instance, and otherwise false. The default is false.
-
monitoring_interval(Optional[IntegerOptional], default:None) –The interval, in seconds, between points when Enhanced Monitoring metrics are collected for the DB instance. To disable collecting Enhanced Monitoring metrics, specify 0. The default is 0.
If
MonitoringRoleArnis specified, then you must also setMonitoringIntervalto a value other than 0.Valid Values:
0, 1, 5, 10, 15, 30, 60 -
monitoring_role_arn(Optional[String], default:None) –The ARN for the IAM role that permits Neptune to send enhanced monitoring metrics to Amazon CloudWatch Logs. For example,
arn:aws:iam:123456789012:role/emaccess.If
MonitoringIntervalis set to a value other than 0, then you must supply aMonitoringRoleArnvalue. -
domain_iam_role_name(Optional[String], default:None) –Specify the name of the IAM role to be used when making API calls to the Directory Service.
-
promotion_tier(Optional[IntegerOptional], default:None) –A value that specifies the order in which an Read Replica is promoted to the primary instance after a failure of the existing primary instance.
Default: 1
Valid Values: 0 - 15
-
timezone(Optional[String], default:None) –The time zone of the DB instance.
-
enable_iam_database_authentication(Optional[BooleanOptional], default:None) –Not supported by Neptune (ignored).
-
enable_performance_insights(Optional[BooleanOptional], default:None) –(Not supported by Neptune)
-
performance_insights_kms_key_id(Optional[String], default:None) –(Not supported by Neptune)
-
enable_cloudwatch_logs_exports(Optional[LogTypeList], default:None) –The list of log types that need to be enabled for exporting to CloudWatch Logs.
-
deletion_protection(Optional[BooleanOptional], default:None) –A value that indicates whether the DB instance has deletion protection enabled. The database can't be deleted when deletion protection is enabled. By default, deletion protection is disabled. See Deleting a DB Instance.
DB instances in a DB cluster can be deleted even when deletion protection is enabled in their parent DB cluster.
Raises:
-
AuthorizationNotFoundFault–Specified CIDRIP or EC2 security group is not authorized for the specified DB security group.
Neptune may not also be authorized via IAM to perform necessary actions on your behalf.
-
DBClusterNotFoundFault–DBClusterIdentifier does not refer to an existing DB cluster.
-
DBInstanceAlreadyExistsFault–User already has a DB instance with the given identifier.
-
DBParameterGroupNotFoundFault–DBParameterGroupName does not refer to an existing DB parameter group.
-
DBSecurityGroupNotFoundFault–DBSecurityGroupName does not refer to an existing DB security group.
-
DBSubnetGroupDoesNotCoverEnoughAZs–Subnets in the DB subnet group should cover at least two Availability Zones unless there is only one Availability Zone.
-
DBSubnetGroupNotFoundFault–DBSubnetGroupName does not refer to an existing DB subnet group.
-
DomainNotFoundFault–Domain does not refer to an existing Active Directory Domain.
-
InstanceQuotaExceededFault–Request would result in user exceeding the allowed number of DB instances.
-
InsufficientDBInstanceCapacityFault–Specified DB instance class is not available in the specified Availability Zone.
-
InvalidDBClusterStateFault–The DB cluster is not in a valid state.
-
InvalidSubnet–The requested subnet is invalid, or multiple subnets were requested that are not all in a common VPC.
-
InvalidVPCNetworkStateFault–DB subnet group does not cover all Availability Zones after it is created because users' change.
-
KMSKeyNotAccessibleFault–Error accessing KMS key.
-
OptionGroupNotFoundFault–The designated option group could not be found.
-
ProvisionedIopsNotAvailableInAZFault–Provisioned IOPS not available in the specified Availability Zone.
-
StorageQuotaExceededFault–Request would result in user exceeding the allowed amount of storage available across all DB instances.
-
StorageTypeNotSupportedFault–StorageType specified cannot be associated with the DB Instance.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_neptune/_services/neptune.py
1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 | |