Skip to content

modify_db_instance

modify_db_instance(
    *,
    config_overrides: Optional[NeptuneClientConfig] = None,
    db_instance_identifier: Optional[String] = None,
    allocated_storage: Optional[IntegerOptional] = None,
    db_instance_class: Optional[String] = None,
    db_subnet_group_name: Optional[String] = None,
    db_security_groups: Optional[DBSecurityGroupNameList] = None,
    vpc_security_group_ids: Optional[VpcSecurityGroupIdList] = None,
    apply_immediately: Optional[Boolean] = None,
    master_user_password: Optional[String] = None,
    db_parameter_group_name: Optional[String] = None,
    backup_retention_period: Optional[IntegerOptional] = None,
    preferred_backup_window: Optional[String] = None,
    preferred_maintenance_window: Optional[String] = None,
    multi_az: Optional[BooleanOptional] = None,
    engine_version: Optional[String] = None,
    allow_major_version_upgrade: Optional[Boolean] = None,
    auto_minor_version_upgrade: Optional[BooleanOptional] = None,
    license_model: Optional[String] = None,
    iops: Optional[IntegerOptional] = None,
    option_group_name: Optional[String] = None,
    new_db_instance_identifier: Optional[String] = None,
    storage_type: Optional[String] = None,
    tde_credential_arn: Optional[String] = None,
    tde_credential_password: Optional[SensitiveString] = None,
    ca_certificate_identifier: Optional[String] = None,
    domain: Optional[String] = None,
    copy_tags_to_snapshot: Optional[BooleanOptional] = None,
    monitoring_interval: Optional[IntegerOptional] = None,
    db_port_number: Optional[IntegerOptional] = None,
    publicly_accessible: Optional[BooleanOptional] = None,
    monitoring_role_arn: Optional[String] = None,
    domain_iam_role_name: Optional[String] = None,
    promotion_tier: Optional[IntegerOptional] = None,
    enable_iam_database_authentication: Optional[BooleanOptional] = None,
    enable_performance_insights: Optional[BooleanOptional] = None,
    performance_insights_kms_key_id: Optional[String] = None,
    cloudwatch_logs_export_configuration: Optional[
        CloudwatchLogsExportConfiguration
    ] = None,
    deletion_protection: Optional[BooleanOptional] = None,
) -> ModifyDBInstanceResult

Modifies settings for a DB instance. You can change one or more database configuration parameters by specifying these parameters and the new values in the request. To learn what modifications you can make to your DB instance, call DescribeValidDBInstanceModifications before you call ModifyDBInstance.

Parameters:

  • db_instance_identifier (Optional[String], default: None ) –

    The DB instance identifier. This value is stored as a lowercase string.

    Constraints:

    • Must match the identifier of an existing DBInstance.

  • allocated_storage (Optional[IntegerOptional], default: None ) –

    Not supported by Neptune.

  • db_instance_class (Optional[String], default: None ) –

    The new compute and memory capacity of the DB instance, for example, db.m4.large. Not all DB instance classes are available in all Amazon Regions.

    If you modify the DB instance class, an outage occurs during the change. The change is applied during the next maintenance window, unless ApplyImmediately is specified as true for this request.

    Default: Uses existing setting

  • db_subnet_group_name (Optional[String], default: None ) –

    The new DB subnet group for the DB instance. You can use this parameter to move your DB instance to a different VPC.

    Changing the subnet group causes an outage during the change. The change is applied during the next maintenance window, unless you specify true for the ApplyImmediately parameter.

    Constraints: If supplied, must match the name of an existing DBSubnetGroup.

    Example: mySubnetGroup

  • db_security_groups (Optional[DBSecurityGroupNameList], default: None ) –

    A list of DB security groups to authorize on this DB instance. Changing this setting doesn't result in an outage and the change is asynchronously applied as soon as possible.

    Constraints:

    • If supplied, must match existing DBSecurityGroups.

  • vpc_security_group_ids (Optional[VpcSecurityGroupIdList], default: None ) –

    A list of EC2 VPC security groups to authorize on this DB instance. This change is asynchronously applied as soon as possible.

    Not applicable. The associated list of EC2 VPC security groups is managed by the DB cluster. For more information, see ModifyDBCluster.

    Constraints:

    • If supplied, must match existing VpcSecurityGroupIds.

  • apply_immediately (Optional[Boolean], default: None ) –

    Specifies whether the modifications in this request and any pending modifications are asynchronously applied as soon as possible, regardless of the PreferredMaintenanceWindow setting for the DB instance.

    If this parameter is set to false, changes to the DB instance are applied during the next maintenance window. Some parameter changes can cause an outage and are applied on the next call to RebootDBInstance, or the next failure reboot.

    Default: false

  • master_user_password (Optional[String], default: None ) –

    Not supported by Neptune.

  • db_parameter_group_name (Optional[String], default: None ) –

    The name of the DB parameter group to apply to the DB instance. Changing this setting doesn't result in an outage. The parameter group name itself is changed immediately, but the actual parameter changes are not applied until you reboot the instance without failover. The db instance will NOT be rebooted automatically and the parameter changes will NOT be applied during the next maintenance window.

    Default: Uses existing setting

    Constraints: The DB parameter group must be in the same DB parameter group family as this DB instance.

  • backup_retention_period (Optional[IntegerOptional], default: None ) –

    Not applicable. The retention period for automated backups is managed by the DB cluster. For more information, see ModifyDBCluster.

    Default: Uses existing setting

  • preferred_backup_window (Optional[String], default: None ) –

    The daily time range during which automated backups are created if automated backups are enabled.

    Not applicable. The daily time range for creating automated backups is managed by the DB cluster. For more information, see ModifyDBCluster.

    Constraints:

    • Must be in the format hh24:mi-hh24:mi

    • Must be in Universal Time Coordinated (UTC)

    • Must not conflict with the preferred maintenance window

    • Must be at least 30 minutes

  • preferred_maintenance_window (Optional[String], default: None ) –

    The weekly time range (in UTC) during which system maintenance can occur, which might result in an outage. Changing this parameter doesn't result in an outage, except in the following situation, and the change is asynchronously applied as soon as possible. If there are pending actions that cause a reboot, and the maintenance window is changed to include the current time, then changing this parameter will cause a reboot of the DB instance. If moving this window to the current time, there must be at least 30 minutes between the current time and end of the window to ensure pending changes are applied.

    Default: Uses existing setting

    Format: ddd:hh24:mi-ddd:hh24:mi

    Valid Days: Mon | Tue | Wed | Thu | Fri | Sat | Sun

    Constraints: Must be at least 30 minutes

  • multi_az (Optional[BooleanOptional], default: None ) –

    Specifies if the DB instance is a Multi-AZ deployment. Changing this parameter doesn't result in an outage and the change is applied during the next maintenance window unless the ApplyImmediately parameter is set to true for this request.

  • engine_version (Optional[String], default: None ) –

    The version number of the database engine to upgrade to. Currently, setting this parameter has no effect. To upgrade your database engine to the most recent release, use the ApplyPendingMaintenanceAction API.

  • allow_major_version_upgrade (Optional[Boolean], default: None ) –

    Indicates that major version upgrades are allowed. Changing this parameter doesn't result in an outage and the change is asynchronously applied as soon as possible.

  • auto_minor_version_upgrade (Optional[BooleanOptional], default: None ) –

    Indicates that minor version upgrades are applied automatically to the DB instance during the maintenance window. Changing this parameter doesn't result in an outage except in the following case and the change is asynchronously applied as soon as possible. An outage will result if this parameter is set to true during the maintenance window, and a newer minor version is available, and Neptune has enabled auto patching for that engine version.

  • license_model (Optional[String], default: None ) –

    Not supported by Neptune.

  • iops (Optional[IntegerOptional], default: None ) –

    The new Provisioned IOPS (I/O operations per second) value for the instance.

    Changing this setting doesn't result in an outage and the change is applied during the next maintenance window unless the ApplyImmediately parameter is set to true for this request.

    Default: Uses existing setting

  • option_group_name (Optional[String], default: None ) –

    (Not supported by Neptune)

  • new_db_instance_identifier (Optional[String], default: None ) –

    The new DB instance identifier for the DB instance when renaming a DB instance. When you change the DB instance identifier, an instance reboot will occur immediately if you set Apply Immediately to true, or will occur during the next maintenance window if Apply Immediately to false. This value is stored as a lowercase string.

    Constraints:

    • Must contain from 1 to 63 letters, numbers, or hyphens.

    • The first character must be a letter.

    • Cannot end with a hyphen or contain two consecutive hyphens.

    Example: mydbinstance

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

  • ca_certificate_identifier (Optional[String], default: None ) –

    Indicates the certificate that needs to be associated with the instance.

  • domain (Optional[String], default: None ) –

    Not supported.

  • 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

  • db_port_number (Optional[IntegerOptional], default: None ) –

    The port number on which the database accepts connections.

    The value of the DBPortNumber parameter must not match any of the port values specified for options in the option group for the DB instance.

    Your database will restart when you change the DBPortNumber value regardless of the value of the ApplyImmediately parameter.

    Default: 8182

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

  • 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 ) –

    Not supported

  • promotion_tier (Optional[IntegerOptional], default: None ) –

    A value that specifies the order in which a Read Replica is promoted to the primary instance after a failure of the existing primary instance.

    Default: 1

    Valid Values: 0 - 15

  • enable_iam_database_authentication (Optional[BooleanOptional], default: None ) –

    True to enable mapping of Amazon Identity and Access Management (IAM) accounts to database accounts, and otherwise false.

    You can enable IAM database authentication for the following database engines

    Not applicable. Mapping Amazon IAM accounts to database accounts is managed by the DB cluster. For more information, see ModifyDBCluster.

    Default: false

  • enable_performance_insights (Optional[BooleanOptional], default: None ) –

    (Not supported by Neptune)

  • performance_insights_kms_key_id (Optional[String], default: None ) –

    (Not supported by Neptune)

  • cloudwatch_logs_export_configuration (Optional[CloudwatchLogsExportConfiguration], default: None ) –

    The configuration setting for the log types to be enabled for export to CloudWatch Logs for a specific DB instance or DB cluster.

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

Raises:

Source code in docs_src/capo_neptune/_services/neptune.py
def modify_db_instance(
    self,
    *,
    config_overrides: Optional[NeptuneClientConfig] = 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,
    db_subnet_group_name: 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,
    apply_immediately: Optional["capo_neptune.types.boolean.Boolean"] = None,
    master_user_password: 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,
    preferred_maintenance_window: Optional[
        "capo_neptune.types.string.String"
    ] = None,
    multi_az: Optional[
        "capo_neptune.types.boolean_optional.BooleanOptional"
    ] = None,
    engine_version: Optional["capo_neptune.types.string.String"] = None,
    allow_major_version_upgrade: Optional[
        "capo_neptune.types.boolean.Boolean"
    ] = 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,
    new_db_instance_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,
    ca_certificate_identifier: 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,
    db_port_number: Optional[
        "capo_neptune.types.integer_optional.IntegerOptional"
    ] = None,
    publicly_accessible: Optional[
        "capo_neptune.types.boolean_optional.BooleanOptional"
    ] = 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,
    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,
    cloudwatch_logs_export_configuration: Optional[
        "capo_neptune.types.cloudwatch_logs_export_configuration.CloudwatchLogsExportConfiguration"
    ] = None,
    deletion_protection: Optional[
        "capo_neptune.types.boolean_optional.BooleanOptional"
    ] = None,
) -> "capo_neptune.types.modify_db_instance_result.ModifyDBInstanceResult":
    """<p>Modifies settings for a DB instance. You can change one or more database configuration parameters by specifying these parameters and the new values in the request. To learn what modifications you can make to your DB instance, call <a>DescribeValidDBInstanceModifications</a> before you call <a>ModifyDBInstance</a>.</p>

    Args:
        db_instance_identifier: <p>The DB instance identifier. This value is stored as a lowercase string.</p> <p>Constraints:</p> <ul> <li> <p>Must match the identifier of an existing DBInstance.</p> </li> </ul>
        allocated_storage: <p>Not supported by Neptune.</p>
        db_instance_class: <p>The new 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> <p>If you modify the DB instance class, an outage occurs during the change. The change is applied during the next maintenance window, unless <code>ApplyImmediately</code> is specified as <code>true</code> for this request.</p> <p>Default: Uses existing setting</p>
        db_subnet_group_name: <p>The new DB subnet group for the DB instance. You can use this parameter to move your DB instance to a different VPC.</p> <p>Changing the subnet group causes an outage during the change. The change is applied during the next maintenance window, unless you specify <code>true</code> for the <code>ApplyImmediately</code> parameter.</p> <p>Constraints: If supplied, must match the name of an existing DBSubnetGroup.</p> <p>Example: <code>mySubnetGroup</code> </p>
        db_security_groups: <p>A list of DB security groups to authorize on this DB instance. Changing this setting doesn't result in an outage and the change is asynchronously applied as soon as possible.</p> <p>Constraints:</p> <ul> <li> <p>If supplied, must match existing DBSecurityGroups.</p> </li> </ul>
        vpc_security_group_ids: <p>A list of EC2 VPC security groups to authorize on this DB instance. This change is asynchronously applied as soon as possible.</p> <p>Not applicable. The associated list of EC2 VPC security groups is managed by the DB cluster. For more information, see <a>ModifyDBCluster</a>.</p> <p>Constraints:</p> <ul> <li> <p>If supplied, must match existing VpcSecurityGroupIds.</p> </li> </ul>
        apply_immediately: <p>Specifies whether the modifications in this request and any pending modifications are asynchronously applied as soon as possible, regardless of the <code>PreferredMaintenanceWindow</code> setting for the DB instance.</p> <p> If this parameter is set to <code>false</code>, changes to the DB instance are applied during the next maintenance window. Some parameter changes can cause an outage and are applied on the next call to <a>RebootDBInstance</a>, or the next failure reboot.</p> <p>Default: <code>false</code> </p>
        master_user_password: <p>Not supported by Neptune.</p>
        db_parameter_group_name: <p>The name of the DB parameter group to apply to the DB instance. Changing this setting doesn't result in an outage. The parameter group name itself is changed immediately, but the actual parameter changes are not applied until you reboot the instance without failover. The db instance will NOT be rebooted automatically and the parameter changes will NOT be applied during the next maintenance window.</p> <p>Default: Uses existing setting</p> <p>Constraints: The DB parameter group must be in the same DB parameter group family as this DB instance.</p>
        backup_retention_period: <p>Not applicable. The retention period for automated backups is managed by the DB cluster. For more information, see <a>ModifyDBCluster</a>.</p> <p>Default: Uses existing setting</p>
        preferred_backup_window: <p> The daily time range during which automated backups are created if automated backups are enabled.</p> <p>Not applicable. The daily time range for creating automated backups is managed by the DB cluster. For more information, see <a>ModifyDBCluster</a>.</p> <p>Constraints:</p> <ul> <li> <p>Must be in the format hh24:mi-hh24:mi</p> </li> <li> <p>Must be in Universal Time Coordinated (UTC)</p> </li> <li> <p>Must not conflict with the preferred maintenance window</p> </li> <li> <p>Must be at least 30 minutes</p> </li> </ul>
        preferred_maintenance_window: <p>The weekly time range (in UTC) during which system maintenance can occur, which might result in an outage. Changing this parameter doesn't result in an outage, except in the following situation, and the change is asynchronously applied as soon as possible. If there are pending actions that cause a reboot, and the maintenance window is changed to include the current time, then changing this parameter will cause a reboot of the DB instance. If moving this window to the current time, there must be at least 30 minutes between the current time and end of the window to ensure pending changes are applied.</p> <p>Default: Uses existing setting</p> <p>Format: ddd:hh24:mi-ddd:hh24:mi</p> <p>Valid Days: Mon | Tue | Wed | Thu | Fri | Sat | Sun</p> <p>Constraints: Must be at least 30 minutes</p>
        multi_az: <p>Specifies if the DB instance is a Multi-AZ deployment. Changing this parameter doesn't result in an outage and the change is applied during the next maintenance window unless the <code>ApplyImmediately</code> parameter is set to <code>true</code> for this request.</p>
        engine_version: <p>The version number of the database engine to upgrade to. Currently, setting this parameter has no effect. To upgrade your database engine to the most recent release, use the <a>ApplyPendingMaintenanceAction</a> API.</p>
        allow_major_version_upgrade: <p>Indicates that major version upgrades are allowed. Changing this parameter doesn't result in an outage and the change is asynchronously applied as soon as possible.</p>
        auto_minor_version_upgrade: <p> Indicates that minor version upgrades are applied automatically to the DB instance during the maintenance window. Changing this parameter doesn't result in an outage except in the following case and the change is asynchronously applied as soon as possible. An outage will result if this parameter is set to <code>true</code> during the maintenance window, and a newer minor version is available, and Neptune has enabled auto patching for that engine version.</p>
        license_model: <p>Not supported by Neptune.</p>
        iops: <p>The new Provisioned IOPS (I/O operations per second) value for the instance.</p> <p>Changing this setting doesn't result in an outage and the change is applied during the next maintenance window unless the <code>ApplyImmediately</code> parameter is set to <code>true</code> for this request.</p> <p>Default: Uses existing setting</p>
        option_group_name: <p> <i>(Not supported by Neptune)</i> </p>
        new_db_instance_identifier: <p> The new DB instance identifier for the DB instance when renaming a DB instance. When you change the DB instance identifier, an instance reboot will occur immediately if you set <code>Apply Immediately</code> to true, or will occur during the next maintenance window if <code>Apply Immediately</code> to false. This value 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>The 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>
        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>
        ca_certificate_identifier: <p>Indicates the certificate that needs to be associated with the instance.</p>
        domain: <p>Not supported.</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>
        db_port_number: <p>The port number on which the database accepts connections.</p> <p>The value of the <code>DBPortNumber</code> parameter must not match any of the port values specified for options in the option group for the DB instance.</p> <p>Your database will restart when you change the <code>DBPortNumber</code> value regardless of the value of the <code>ApplyImmediately</code> parameter.</p> <p> Default: <code>8182</code> </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>
        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>Not supported</p>
        promotion_tier: <p>A value that specifies the order in which a 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>
        enable_iam_database_authentication: <p>True to enable mapping of Amazon Identity and Access Management (IAM) accounts to database accounts, and otherwise false.</p> <p>You can enable IAM database authentication for the following database engines</p> <p>Not applicable. Mapping Amazon IAM accounts to database accounts is managed by the DB cluster. For more information, see <a>ModifyDBCluster</a>.</p> <p>Default: <code>false</code> </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>
        cloudwatch_logs_export_configuration: <p>The configuration setting for the log types to be enabled for export to CloudWatch Logs for a specific DB instance or DB cluster.</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>

    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.certificate_not_found_fault.CertificateNotFoundFault: <p> <i>CertificateIdentifier</i> does not refer to an existing certificate.</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_instance_not_found_fault.DBInstanceNotFoundFault: <p> <i>DBInstanceIdentifier</i> does not refer to an existing DB instance.</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_upgrade_dependency_failure_fault.DBUpgradeDependencyFailureFault: <p>The DB upgrade failed because a resource the DB depends on could not be modified.</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.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_instance_state_fault.InvalidDBInstanceStateFault: <p>The specified DB instance is not in the <i>available</i> state.</p>
        capo_neptune.errors.invalid_db_security_group_state_fault.InvalidDBSecurityGroupStateFault: <p>The state of the DB security group does not allow deletion.</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.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.modify_db_instance_message.ModifyDBInstanceMessage]",
    ) -> OperationResponse[
        "capo_neptune.types.modify_db_instance_result.ModifyDBInstanceResult"
    ]:
        import capo_neptune._operations.amazon_rd_sv19.modify_db_instance

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

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

        return capo_neptune.types.modify_db_instance_message.redact_sensitive(
            input_
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("ModifyDBInstance", redact_input=_redact_input),
    )
    input_: capo_neptune.types.modify_db_instance_message.ModifyDBInstanceMessage = {}
    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 db_subnet_group_name is not None:
        input_["db_subnet_group_name"] = db_subnet_group_name
    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 apply_immediately is not None:
        input_["apply_immediately"] = apply_immediately
    if master_user_password is not None:
        input_["master_user_password"] = master_user_password
    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 preferred_maintenance_window is not None:
        input_["preferred_maintenance_window"] = preferred_maintenance_window
    if multi_az is not None:
        input_["multi_az"] = multi_az
    if engine_version is not None:
        input_["engine_version"] = engine_version
    if allow_major_version_upgrade is not None:
        input_["allow_major_version_upgrade"] = allow_major_version_upgrade
    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 new_db_instance_identifier is not None:
        input_["new_db_instance_identifier"] = new_db_instance_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 ca_certificate_identifier is not None:
        input_["ca_certificate_identifier"] = ca_certificate_identifier
    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 db_port_number is not None:
        input_["db_port_number"] = db_port_number
    if publicly_accessible is not None:
        input_["publicly_accessible"] = publicly_accessible
    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 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 cloudwatch_logs_export_configuration is not None:
        input_["cloudwatch_logs_export_configuration"] = (
            cloudwatch_logs_export_configuration
        )
    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