Skip to content

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-1d

    Constraint: 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:mi

    The 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: 8182

    Type: 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 StorageEncrypted parameter is true, and you do not specify a value for the KmsKeyId parameter, 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 MonitoringRoleArn is specified, then you must also set MonitoringInterval to 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 MonitoringInterval is set to a value other than 0, then you must supply a MonitoringRoleArn value.

  • 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:

Source code in docs_src/capo_neptune/_services/neptune.py
def create_db_instance(
    self,
    *,
    config_overrides: Optional[NeptuneClientConfig] = None,
    db_name: Optional["capo_neptune.types.string.String"] = None,
    db_instance_identifier: Optional["capo_neptune.types.string.String"] = None,
    allocated_storage: Optional[
        "capo_neptune.types.integer_optional.IntegerOptional"
    ] = None,
    db_instance_class: Optional["capo_neptune.types.string.String"] = None,
    engine: Optional["capo_neptune.types.string.String"] = None,
    master_username: Optional["capo_neptune.types.string.String"] = None,
    master_user_password: Optional["capo_neptune.types.string.String"] = None,
    db_security_groups: Optional[
        "capo_neptune.types.db_security_group_name_list.DBSecurityGroupNameList"
    ] = None,
    vpc_security_group_ids: Optional[
        "capo_neptune.types.vpc_security_group_id_list.VpcSecurityGroupIdList"
    ] = None,
    availability_zone: Optional["capo_neptune.types.string.String"] = None,
    db_subnet_group_name: Optional["capo_neptune.types.string.String"] = None,
    preferred_maintenance_window: Optional[
        "capo_neptune.types.string.String"
    ] = None,
    db_parameter_group_name: Optional["capo_neptune.types.string.String"] = None,
    backup_retention_period: Optional[
        "capo_neptune.types.integer_optional.IntegerOptional"
    ] = None,
    preferred_backup_window: Optional["capo_neptune.types.string.String"] = None,
    port: Optional["capo_neptune.types.integer_optional.IntegerOptional"] = None,
    multi_az: Optional[
        "capo_neptune.types.boolean_optional.BooleanOptional"
    ] = None,
    engine_version: Optional["capo_neptune.types.string.String"] = None,
    auto_minor_version_upgrade: Optional[
        "capo_neptune.types.boolean_optional.BooleanOptional"
    ] = None,
    license_model: Optional["capo_neptune.types.string.String"] = None,
    iops: Optional["capo_neptune.types.integer_optional.IntegerOptional"] = None,
    option_group_name: Optional["capo_neptune.types.string.String"] = None,
    character_set_name: Optional["capo_neptune.types.string.String"] = None,
    publicly_accessible: Optional[
        "capo_neptune.types.boolean_optional.BooleanOptional"
    ] = None,
    tags: Optional["capo_neptune.types.tag_list.TagList"] = None,
    db_cluster_identifier: Optional["capo_neptune.types.string.String"] = None,
    storage_type: Optional["capo_neptune.types.string.String"] = None,
    tde_credential_arn: Optional["capo_neptune.types.string.String"] = None,
    tde_credential_password: Optional[
        "capo_neptune.types.sensitive_string.SensitiveString"
    ] = None,
    storage_encrypted: Optional[
        "capo_neptune.types.boolean_optional.BooleanOptional"
    ] = None,
    kms_key_id: Optional["capo_neptune.types.string.String"] = None,
    domain: Optional["capo_neptune.types.string.String"] = None,
    copy_tags_to_snapshot: Optional[
        "capo_neptune.types.boolean_optional.BooleanOptional"
    ] = None,
    monitoring_interval: Optional[
        "capo_neptune.types.integer_optional.IntegerOptional"
    ] = None,
    monitoring_role_arn: Optional["capo_neptune.types.string.String"] = None,
    domain_iam_role_name: Optional["capo_neptune.types.string.String"] = None,
    promotion_tier: Optional[
        "capo_neptune.types.integer_optional.IntegerOptional"
    ] = None,
    timezone: Optional["capo_neptune.types.string.String"] = None,
    enable_iam_database_authentication: Optional[
        "capo_neptune.types.boolean_optional.BooleanOptional"
    ] = None,
    enable_performance_insights: Optional[
        "capo_neptune.types.boolean_optional.BooleanOptional"
    ] = None,
    performance_insights_kms_key_id: Optional[
        "capo_neptune.types.string.String"
    ] = None,
    enable_cloudwatch_logs_exports: Optional[
        "capo_neptune.types.log_type_list.LogTypeList"
    ] = None,
    deletion_protection: Optional[
        "capo_neptune.types.boolean_optional.BooleanOptional"
    ] = None,
) -> "capo_neptune.types.create_db_instance_result.CreateDBInstanceResult":
    """<p>Creates a new DB instance.</p>

    Args:
        db_name: <p>Not supported.</p>
        db_instance_identifier: <p>The DB instance identifier. This parameter is stored as a lowercase string.</p> <p>Constraints:</p> <ul> <li> <p>Must contain from 1 to 63 letters, numbers, or hyphens.</p> </li> <li> <p>First character must be a letter.</p> </li> <li> <p>Cannot end with a hyphen or contain two consecutive hyphens.</p> </li> </ul> <p>Example: <code>mydbinstance</code> </p>
        allocated_storage: <p>Not supported by Neptune.</p>
        db_instance_class: <p>The compute and memory capacity of the DB instance, for example, <code>db.m4.large</code>. Not all DB instance classes are available in all Amazon Regions.</p>
        engine: <p>The name of the database engine to be used for this instance.</p> <p>Valid Values: <code>neptune</code> </p>
        master_username: <p>Not supported by Neptune.</p>
        master_user_password: <p>Not supported by Neptune.</p>
        db_security_groups: <p>A list of DB security groups to associate with this DB instance.</p> <p>Default: The default DB security group for the database engine.</p>
        vpc_security_group_ids: <p>A list of EC2 VPC security groups to associate with this DB instance.</p> <p>Not applicable. The associated list of EC2 VPC security groups is managed by the DB cluster. For more information, see <a>CreateDBCluster</a>.</p> <p>Default: The default EC2 VPC security group for the DB subnet group's VPC.</p>
        availability_zone: <p> The EC2 Availability Zone that the DB instance is created in</p> <p>Default: A random, system-chosen Availability Zone in the endpoint's Amazon Region.</p> <p> Example: <code>us-east-1d</code> </p> <p> Constraint: The AvailabilityZone parameter can't be specified if the MultiAZ parameter is set to <code>true</code>. The specified Availability Zone must be in the same Amazon Region as the current endpoint.</p>
        db_subnet_group_name: <p>A DB subnet group to associate with this DB instance.</p> <p>If there is no DB subnet group, then it is a non-VPC DB instance.</p>
        preferred_maintenance_window: <p>The time range each week during which system maintenance can occur, in Universal Coordinated Time (UTC).</p> <p> Format: <code>ddd:hh24:mi-ddd:hh24:mi</code> </p> <p>The 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.</p> <p>Valid Days: Mon, Tue, Wed, Thu, Fri, Sat, Sun.</p> <p>Constraints: Minimum 30-minute window.</p>
        db_parameter_group_name: <p>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.</p> <p>Constraints:</p> <ul> <li> <p>Must be 1 to 255 letters, numbers, or hyphens.</p> </li> <li> <p>First character must be a letter</p> </li> <li> <p>Cannot end with a hyphen or contain two consecutive hyphens</p> </li> </ul>
        backup_retention_period: <p>The number of days for which automated backups are retained.</p> <p>Not applicable. The retention period for automated backups is managed by the DB cluster. For more information, see <a>CreateDBCluster</a>.</p> <p>Default: 1</p> <p>Constraints:</p> <ul> <li> <p>Must be a value from 0 to 35</p> </li> <li> <p>Cannot be set to 0 if the DB instance is a source to Read Replicas</p> </li> </ul>
        preferred_backup_window: <p> The daily time range during which automated backups are created.</p> <p>Not applicable. The daily time range for creating automated backups is managed by the DB cluster. For more information, see <a>CreateDBCluster</a>.</p>
        port: <p>The port number on which the database accepts connections.</p> <p>Not applicable. The port is managed by the DB cluster. For more information, see <a>CreateDBCluster</a>.</p> <p> Default: <code>8182</code> </p> <p>Type: Integer</p>
        multi_az: <p>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.</p>
        engine_version: <p>The version number of the database engine to use. Currently, setting this parameter has no effect.</p>
        auto_minor_version_upgrade: <p>Indicates that minor engine upgrades are applied automatically to the DB instance during the maintenance window.</p> <p>Default: <code>true</code> </p>
        license_model: <p>License model information for this DB instance.</p> <p> Valid values: <code>license-included</code> | <code>bring-your-own-license</code> | <code>general-public-license</code> </p>
        iops: <p>The amount of Provisioned IOPS (input/output operations per second) to be initially allocated for the DB instance.</p>
        option_group_name: <p> <i>(Not supported by Neptune)</i> </p>
        character_set_name: <p> <i>(Not supported by Neptune)</i> </p>
        publicly_accessible: <p>Indicates whether the DB instance is publicly accessible.</p> <p>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.</p> <p>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.</p>
        tags: <p>The tags to assign to the new instance.</p>
        db_cluster_identifier: <p>The identifier of the DB cluster that the instance will belong to.</p> <p>For information on creating a DB cluster, see <a>CreateDBCluster</a>.</p> <p>Type: String</p>
        storage_type: <p>Not applicable. In Neptune the storage type is managed at the DB Cluster level.</p>
        tde_credential_arn: <p>The ARN from the key store with which to associate the instance for TDE encryption.</p>
        tde_credential_password: <p>The password for the given ARN from the key store in order to access the device.</p>
        storage_encrypted: <p>Specifies whether the DB instance is encrypted.</p> <p>Not applicable. The encryption for DB instances is managed by the DB cluster. For more information, see <a>CreateDBCluster</a>.</p> <p>Default: false</p>
        kms_key_id: <p>The Amazon KMS key identifier for an encrypted DB instance.</p> <p>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.</p> <p>Not applicable. The KMS key identifier is managed by the DB cluster. For more information, see <a>CreateDBCluster</a>.</p> <p>If the <code>StorageEncrypted</code> parameter is true, and you do not specify a value for the <code>KmsKeyId</code> parameter, 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.</p>
        domain: <p>Specify the Active Directory Domain to create the instance in.</p>
        copy_tags_to_snapshot: <p>True to copy all tags from the DB instance to snapshots of the DB instance, and otherwise false. The default is false.</p>
        monitoring_interval: <p>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.</p> <p>If <code>MonitoringRoleArn</code> is specified, then you must also set <code>MonitoringInterval</code> to a value other than 0.</p> <p>Valid Values: <code>0, 1, 5, 10, 15, 30, 60</code> </p>
        monitoring_role_arn: <p>The ARN for the IAM role that permits Neptune to send enhanced monitoring metrics to Amazon CloudWatch Logs. For example, <code>arn:aws:iam:123456789012:role/emaccess</code>.</p> <p>If <code>MonitoringInterval</code> is set to a value other than 0, then you must supply a <code>MonitoringRoleArn</code> value.</p>
        domain_iam_role_name: <p>Specify the name of the IAM role to be used when making API calls to the Directory Service.</p>
        promotion_tier: <p>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. </p> <p>Default: 1</p> <p>Valid Values: 0 - 15</p>
        timezone: <p>The time zone of the DB instance.</p>
        enable_iam_database_authentication: <p>Not supported by Neptune (ignored).</p>
        enable_performance_insights: <p> <i>(Not supported by Neptune)</i> </p>
        performance_insights_kms_key_id: <p> <i>(Not supported by Neptune)</i> </p>
        enable_cloudwatch_logs_exports: <p>The list of log types that need to be enabled for exporting to CloudWatch Logs.</p>
        deletion_protection: <p>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 <a href="https://docs.aws.amazon.com/neptune/latest/userguide/manage-console-instances-delete.html">Deleting a DB Instance</a>.</p> <p>DB instances in a DB cluster can be deleted even when deletion protection is enabled in their parent DB cluster.</p>

    Raises:
        capo_neptune.errors.authorization_not_found_fault.AuthorizationNotFoundFault: <p>Specified CIDRIP or EC2 security group is not authorized for the specified DB security group.</p> <p>Neptune may not also be authorized via IAM to perform necessary actions on your behalf.</p>
        capo_neptune.errors.db_cluster_not_found_fault.DBClusterNotFoundFault: <p> <i>DBClusterIdentifier</i> does not refer to an existing DB cluster.</p>
        capo_neptune.errors.db_instance_already_exists_fault.DBInstanceAlreadyExistsFault: <p>User already has a DB instance with the given identifier.</p>
        capo_neptune.errors.db_parameter_group_not_found_fault.DBParameterGroupNotFoundFault: <p> <i>DBParameterGroupName</i> does not refer to an existing DB parameter group.</p>
        capo_neptune.errors.db_security_group_not_found_fault.DBSecurityGroupNotFoundFault: <p> <i>DBSecurityGroupName</i> does not refer to an existing DB security group.</p>
        capo_neptune.errors.db_subnet_group_does_not_cover_enough_a_zs.DBSubnetGroupDoesNotCoverEnoughAZs: <p>Subnets in the DB subnet group should cover at least two Availability Zones unless there is only one Availability Zone.</p>
        capo_neptune.errors.db_subnet_group_not_found_fault.DBSubnetGroupNotFoundFault: <p> <i>DBSubnetGroupName</i> does not refer to an existing DB subnet group.</p>
        capo_neptune.errors.domain_not_found_fault.DomainNotFoundFault: <p> <i>Domain</i> does not refer to an existing Active Directory Domain.</p>
        capo_neptune.errors.instance_quota_exceeded_fault.InstanceQuotaExceededFault: <p>Request would result in user exceeding the allowed number of DB instances.</p>
        capo_neptune.errors.insufficient_db_instance_capacity_fault.InsufficientDBInstanceCapacityFault: <p>Specified DB instance class is not available in the specified Availability Zone.</p>
        capo_neptune.errors.invalid_db_cluster_state_fault.InvalidDBClusterStateFault: <p>The DB cluster is not in a valid state.</p>
        capo_neptune.errors.invalid_subnet.InvalidSubnet: <p>The requested subnet is invalid, or multiple subnets were requested that are not all in a common VPC.</p>
        capo_neptune.errors.invalid_vpc_network_state_fault.InvalidVPCNetworkStateFault: <p>DB subnet group does not cover all Availability Zones after it is created because users' change.</p>
        capo_neptune.errors.kms_key_not_accessible_fault.KMSKeyNotAccessibleFault: <p>Error accessing KMS key.</p>
        capo_neptune.errors.option_group_not_found_fault.OptionGroupNotFoundFault: <p>The designated option group could not be found.</p>
        capo_neptune.errors.provisioned_iops_not_available_in_az_fault.ProvisionedIopsNotAvailableInAZFault: <p>Provisioned IOPS not available in the specified Availability Zone.</p>
        capo_neptune.errors.storage_quota_exceeded_fault.StorageQuotaExceededFault: <p>Request would result in user exceeding the allowed amount of storage available across all DB instances.</p>
        capo_neptune.errors.storage_type_not_supported_fault.StorageTypeNotSupportedFault: <p> <i>StorageType</i> specified cannot be associated with the DB Instance.</p>
        capo_neptune.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_neptune.types.create_db_instance_message.CreateDBInstanceMessage]",
    ) -> OperationResponse[
        "capo_neptune.types.create_db_instance_result.CreateDBInstanceResult"
    ]:
        import capo_neptune._operations.amazon_rd_sv19.create_db_instance

        output, http_response = (
            capo_neptune._operations.amazon_rd_sv19.create_db_instance.create_db_instance(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_neptune.types.create_db_instance_message.CreateDBInstanceMessage",
    ) -> dict[str, Any]:
        import capo_neptune.types.create_db_instance_message

        return capo_neptune.types.create_db_instance_message.redact_sensitive(
            input_
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("CreateDBInstance", redact_input=_redact_input),
    )
    input_: capo_neptune.types.create_db_instance_message.CreateDBInstanceMessage = {}
    if db_name is not None:
        input_["db_name"] = db_name
    if db_instance_identifier is not None:
        input_["db_instance_identifier"] = db_instance_identifier
    if allocated_storage is not None:
        input_["allocated_storage"] = allocated_storage
    if db_instance_class is not None:
        input_["db_instance_class"] = db_instance_class
    if engine is not None:
        input_["engine"] = engine
    if master_username is not None:
        input_["master_username"] = master_username
    if master_user_password is not None:
        input_["master_user_password"] = master_user_password
    if db_security_groups is not None:
        input_["db_security_groups"] = db_security_groups
    if vpc_security_group_ids is not None:
        input_["vpc_security_group_ids"] = vpc_security_group_ids
    if availability_zone is not None:
        input_["availability_zone"] = availability_zone
    if db_subnet_group_name is not None:
        input_["db_subnet_group_name"] = db_subnet_group_name
    if preferred_maintenance_window is not None:
        input_["preferred_maintenance_window"] = preferred_maintenance_window
    if db_parameter_group_name is not None:
        input_["db_parameter_group_name"] = db_parameter_group_name
    if backup_retention_period is not None:
        input_["backup_retention_period"] = backup_retention_period
    if preferred_backup_window is not None:
        input_["preferred_backup_window"] = preferred_backup_window
    if port is not None:
        input_["port"] = port
    if multi_az is not None:
        input_["multi_az"] = multi_az
    if engine_version is not None:
        input_["engine_version"] = engine_version
    if auto_minor_version_upgrade is not None:
        input_["auto_minor_version_upgrade"] = auto_minor_version_upgrade
    if license_model is not None:
        input_["license_model"] = license_model
    if iops is not None:
        input_["iops"] = iops
    if option_group_name is not None:
        input_["option_group_name"] = option_group_name
    if character_set_name is not None:
        input_["character_set_name"] = character_set_name
    if publicly_accessible is not None:
        input_["publicly_accessible"] = publicly_accessible
    if tags is not None:
        input_["tags"] = tags
    if db_cluster_identifier is not None:
        input_["db_cluster_identifier"] = db_cluster_identifier
    if storage_type is not None:
        input_["storage_type"] = storage_type
    if tde_credential_arn is not None:
        input_["tde_credential_arn"] = tde_credential_arn
    if tde_credential_password is not None:
        input_["tde_credential_password"] = tde_credential_password
    if storage_encrypted is not None:
        input_["storage_encrypted"] = storage_encrypted
    if kms_key_id is not None:
        input_["kms_key_id"] = kms_key_id
    if domain is not None:
        input_["domain"] = domain
    if copy_tags_to_snapshot is not None:
        input_["copy_tags_to_snapshot"] = copy_tags_to_snapshot
    if monitoring_interval is not None:
        input_["monitoring_interval"] = monitoring_interval
    if monitoring_role_arn is not None:
        input_["monitoring_role_arn"] = monitoring_role_arn
    if domain_iam_role_name is not None:
        input_["domain_iam_role_name"] = domain_iam_role_name
    if promotion_tier is not None:
        input_["promotion_tier"] = promotion_tier
    if timezone is not None:
        input_["timezone"] = timezone
    if enable_iam_database_authentication is not None:
        input_["enable_iam_database_authentication"] = (
            enable_iam_database_authentication
        )
    if enable_performance_insights is not None:
        input_["enable_performance_insights"] = enable_performance_insights
    if performance_insights_kms_key_id is not None:
        input_["performance_insights_kms_key_id"] = performance_insights_kms_key_id
    if enable_cloudwatch_logs_exports is not None:
        input_["enable_cloudwatch_logs_exports"] = enable_cloudwatch_logs_exports
    if deletion_protection is not None:
        input_["deletion_protection"] = deletion_protection

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output