# coding=utf-8
# *** WARNING: this file was generated by pulumi-language-python. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import builtins as _builtins
import warnings
import sys
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
if sys.version_info >= (3, 11):
    from typing import NotRequired, TypedDict, TypeAlias
else:
    from typing_extensions import NotRequired, TypedDict, TypeAlias
from . import _utilities
from . import outputs
from ._inputs import *

__all__ = ['DatabaseInstanceArgs', 'DatabaseInstance']

@pulumi.input_type
class DatabaseInstanceArgs:
    def __init__(__self__, *,
                 node_type: pulumi.Input[_builtins.str],
                 backup_same_region: Optional[pulumi.Input[_builtins.bool]] = None,
                 backup_schedule_frequency: Optional[pulumi.Input[_builtins.int]] = None,
                 backup_schedule_retention: Optional[pulumi.Input[_builtins.int]] = None,
                 disable_backup: Optional[pulumi.Input[_builtins.bool]] = None,
                 encryption_at_rest: Optional[pulumi.Input[_builtins.bool]] = None,
                 engine: Optional[pulumi.Input[_builtins.str]] = None,
                 init_settings: Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]] = None,
                 is_ha_cluster: Optional[pulumi.Input[_builtins.bool]] = None,
                 load_balancer: Optional[pulumi.Input['DatabaseInstanceLoadBalancerArgs']] = None,
                 logs_policy: Optional[pulumi.Input['DatabaseInstanceLogsPolicyArgs']] = None,
                 name: Optional[pulumi.Input[_builtins.str]] = None,
                 password: Optional[pulumi.Input[_builtins.str]] = None,
                 password_wo: Optional[pulumi.Input[_builtins.str]] = None,
                 password_wo_version: Optional[pulumi.Input[_builtins.int]] = None,
                 private_ips: Optional[pulumi.Input[Sequence[pulumi.Input['DatabaseInstancePrivateIpArgs']]]] = None,
                 private_network: Optional[pulumi.Input['DatabaseInstancePrivateNetworkArgs']] = None,
                 project_id: Optional[pulumi.Input[_builtins.str]] = None,
                 region: Optional[pulumi.Input[_builtins.str]] = None,
                 settings: Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]] = None,
                 snapshot_id: Optional[pulumi.Input[_builtins.str]] = None,
                 tags: Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]] = None,
                 user_name: Optional[pulumi.Input[_builtins.str]] = None,
                 volume_size_in_gb: Optional[pulumi.Input[_builtins.int]] = None,
                 volume_type: Optional[pulumi.Input[_builtins.str]] = None):
        """
        The set of arguments for constructing a DatabaseInstance resource.
        :param pulumi.Input[_builtins.str] node_type: The type of Database Instance you want to create (e.g. `db-dev-s`).
               
               > **Important** Updates to `node_type` will upgrade the Database Instance to the desired `node_type` without any
               interruption.
               
               > **Important** Once your Database Instance reaches `disk_full` status, if you are using `lssd` storage, you should upgrade the `node_type`, and if you are using `bssd` storage, you should increase the volume size before making any other changes to your Database Instance.
        :param pulumi.Input[_builtins.bool] backup_same_region: Boolean to store logical backups in the same region as the database instance
        :param pulumi.Input[_builtins.int] backup_schedule_frequency: Backup schedule frequency in hours
        :param pulumi.Input[_builtins.int] backup_schedule_retention: Backup schedule retention in days
        :param pulumi.Input[_builtins.bool] disable_backup: Disable automated backup for the database instance
        :param pulumi.Input[_builtins.bool] encryption_at_rest: Enable or disable encryption at rest for the Database Instance.
        :param pulumi.Input[_builtins.str] engine: Database's engine version name (e.g., 'PostgreSQL-16', 'MySQL-8'). Changing this value triggers a blue/green upgrade using MajorUpgradeWorkflow with automatic endpoint migration
        :param pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]] init_settings: Map of engine settings to be set at database initialisation.
        :param pulumi.Input[_builtins.bool] is_ha_cluster: Enable or disable high availability for the Database Instance.
               
               > **Important** Updates to `is_ha_cluster` will recreate the Database Instance.
        :param pulumi.Input['DatabaseInstanceLoadBalancerArgs'] load_balancer: List of Load Balancer endpoints of the Database Instance.
        :param pulumi.Input['DatabaseInstanceLogsPolicyArgs'] logs_policy: Logs policy configuration
        :param pulumi.Input[_builtins.str] name: The name of the Database Instance.
        :param pulumi.Input[_builtins.str] password: Password for the first user of the Database Instance. Only one of `password` or `password_wo` should be specified.
        :param pulumi.Input[_builtins.str] password_wo: **NOTE:** This field is write-only and its value will not be updated in state as part of read operations.
        :param pulumi.Input[_builtins.int] password_wo_version: The version of the write-only password. To update the `password_wo`, you must also update the `password_wo_version`.
        :param pulumi.Input[Sequence[pulumi.Input['DatabaseInstancePrivateIpArgs']]] private_ips: The private IPv4 address associated with the resource.
        :param pulumi.Input['DatabaseInstancePrivateNetworkArgs'] private_network: List of Private Networks endpoints of the Database Instance.
        :param pulumi.Input[_builtins.str] project_id: `project_id`) The ID of the project the Database
               Instance is associated with.
        :param pulumi.Input[_builtins.str] region: `region`) The region
               in which the Database Instance should be created.
        :param pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]] settings: Map of engine settings to be set on a running instance.
        :param pulumi.Input[_builtins.str] snapshot_id: The ID of an existing snapshot to restore or create the Database Instance from. Conflicts with the `engine` parameter and backup settings.
        :param pulumi.Input[Sequence[pulumi.Input[_builtins.str]]] tags: The tags associated with the Database Instance.
        :param pulumi.Input[_builtins.str] user_name: Identifier for the first user of the Database Instance.
               
               > **Important** Updates to `user_name` will recreate the Database Instance.
        :param pulumi.Input[_builtins.int] volume_size_in_gb: Volume size (in GB). Cannot be used when `volume_type` is set to `lssd`.
               
               > **Important** Once your Database Instance reaches `disk_full` status, you should increase the volume size before making any other change to your Database Instance.
        :param pulumi.Input[_builtins.str] volume_type: Type of volume where data are stored (`lssd`, `sbs_5k` or `sbs_15k`).
        """
        pulumi.set(__self__, "node_type", node_type)
        if backup_same_region is not None:
            pulumi.set(__self__, "backup_same_region", backup_same_region)
        if backup_schedule_frequency is not None:
            pulumi.set(__self__, "backup_schedule_frequency", backup_schedule_frequency)
        if backup_schedule_retention is not None:
            pulumi.set(__self__, "backup_schedule_retention", backup_schedule_retention)
        if disable_backup is not None:
            pulumi.set(__self__, "disable_backup", disable_backup)
        if encryption_at_rest is not None:
            pulumi.set(__self__, "encryption_at_rest", encryption_at_rest)
        if engine is not None:
            pulumi.set(__self__, "engine", engine)
        if init_settings is not None:
            pulumi.set(__self__, "init_settings", init_settings)
        if is_ha_cluster is not None:
            pulumi.set(__self__, "is_ha_cluster", is_ha_cluster)
        if load_balancer is not None:
            pulumi.set(__self__, "load_balancer", load_balancer)
        if logs_policy is not None:
            pulumi.set(__self__, "logs_policy", logs_policy)
        if name is not None:
            pulumi.set(__self__, "name", name)
        if password is not None:
            pulumi.set(__self__, "password", password)
        if password_wo is not None:
            pulumi.set(__self__, "password_wo", password_wo)
        if password_wo_version is not None:
            pulumi.set(__self__, "password_wo_version", password_wo_version)
        if private_ips is not None:
            pulumi.set(__self__, "private_ips", private_ips)
        if private_network is not None:
            pulumi.set(__self__, "private_network", private_network)
        if project_id is not None:
            pulumi.set(__self__, "project_id", project_id)
        if region is not None:
            pulumi.set(__self__, "region", region)
        if settings is not None:
            pulumi.set(__self__, "settings", settings)
        if snapshot_id is not None:
            pulumi.set(__self__, "snapshot_id", snapshot_id)
        if tags is not None:
            pulumi.set(__self__, "tags", tags)
        if user_name is not None:
            pulumi.set(__self__, "user_name", user_name)
        if volume_size_in_gb is not None:
            pulumi.set(__self__, "volume_size_in_gb", volume_size_in_gb)
        if volume_type is not None:
            pulumi.set(__self__, "volume_type", volume_type)

    @_builtins.property
    @pulumi.getter(name="nodeType")
    def node_type(self) -> pulumi.Input[_builtins.str]:
        """
        The type of Database Instance you want to create (e.g. `db-dev-s`).

        > **Important** Updates to `node_type` will upgrade the Database Instance to the desired `node_type` without any
        interruption.

        > **Important** Once your Database Instance reaches `disk_full` status, if you are using `lssd` storage, you should upgrade the `node_type`, and if you are using `bssd` storage, you should increase the volume size before making any other changes to your Database Instance.
        """
        return pulumi.get(self, "node_type")

    @node_type.setter
    def node_type(self, value: pulumi.Input[_builtins.str]):
        pulumi.set(self, "node_type", value)

    @_builtins.property
    @pulumi.getter(name="backupSameRegion")
    def backup_same_region(self) -> Optional[pulumi.Input[_builtins.bool]]:
        """
        Boolean to store logical backups in the same region as the database instance
        """
        return pulumi.get(self, "backup_same_region")

    @backup_same_region.setter
    def backup_same_region(self, value: Optional[pulumi.Input[_builtins.bool]]):
        pulumi.set(self, "backup_same_region", value)

    @_builtins.property
    @pulumi.getter(name="backupScheduleFrequency")
    def backup_schedule_frequency(self) -> Optional[pulumi.Input[_builtins.int]]:
        """
        Backup schedule frequency in hours
        """
        return pulumi.get(self, "backup_schedule_frequency")

    @backup_schedule_frequency.setter
    def backup_schedule_frequency(self, value: Optional[pulumi.Input[_builtins.int]]):
        pulumi.set(self, "backup_schedule_frequency", value)

    @_builtins.property
    @pulumi.getter(name="backupScheduleRetention")
    def backup_schedule_retention(self) -> Optional[pulumi.Input[_builtins.int]]:
        """
        Backup schedule retention in days
        """
        return pulumi.get(self, "backup_schedule_retention")

    @backup_schedule_retention.setter
    def backup_schedule_retention(self, value: Optional[pulumi.Input[_builtins.int]]):
        pulumi.set(self, "backup_schedule_retention", value)

    @_builtins.property
    @pulumi.getter(name="disableBackup")
    def disable_backup(self) -> Optional[pulumi.Input[_builtins.bool]]:
        """
        Disable automated backup for the database instance
        """
        return pulumi.get(self, "disable_backup")

    @disable_backup.setter
    def disable_backup(self, value: Optional[pulumi.Input[_builtins.bool]]):
        pulumi.set(self, "disable_backup", value)

    @_builtins.property
    @pulumi.getter(name="encryptionAtRest")
    def encryption_at_rest(self) -> Optional[pulumi.Input[_builtins.bool]]:
        """
        Enable or disable encryption at rest for the Database Instance.
        """
        return pulumi.get(self, "encryption_at_rest")

    @encryption_at_rest.setter
    def encryption_at_rest(self, value: Optional[pulumi.Input[_builtins.bool]]):
        pulumi.set(self, "encryption_at_rest", value)

    @_builtins.property
    @pulumi.getter
    def engine(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        Database's engine version name (e.g., 'PostgreSQL-16', 'MySQL-8'). Changing this value triggers a blue/green upgrade using MajorUpgradeWorkflow with automatic endpoint migration
        """
        return pulumi.get(self, "engine")

    @engine.setter
    def engine(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "engine", value)

    @_builtins.property
    @pulumi.getter(name="initSettings")
    def init_settings(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]]:
        """
        Map of engine settings to be set at database initialisation.
        """
        return pulumi.get(self, "init_settings")

    @init_settings.setter
    def init_settings(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]]):
        pulumi.set(self, "init_settings", value)

    @_builtins.property
    @pulumi.getter(name="isHaCluster")
    def is_ha_cluster(self) -> Optional[pulumi.Input[_builtins.bool]]:
        """
        Enable or disable high availability for the Database Instance.

        > **Important** Updates to `is_ha_cluster` will recreate the Database Instance.
        """
        return pulumi.get(self, "is_ha_cluster")

    @is_ha_cluster.setter
    def is_ha_cluster(self, value: Optional[pulumi.Input[_builtins.bool]]):
        pulumi.set(self, "is_ha_cluster", value)

    @_builtins.property
    @pulumi.getter(name="loadBalancer")
    def load_balancer(self) -> Optional[pulumi.Input['DatabaseInstanceLoadBalancerArgs']]:
        """
        List of Load Balancer endpoints of the Database Instance.
        """
        return pulumi.get(self, "load_balancer")

    @load_balancer.setter
    def load_balancer(self, value: Optional[pulumi.Input['DatabaseInstanceLoadBalancerArgs']]):
        pulumi.set(self, "load_balancer", value)

    @_builtins.property
    @pulumi.getter(name="logsPolicy")
    def logs_policy(self) -> Optional[pulumi.Input['DatabaseInstanceLogsPolicyArgs']]:
        """
        Logs policy configuration
        """
        return pulumi.get(self, "logs_policy")

    @logs_policy.setter
    def logs_policy(self, value: Optional[pulumi.Input['DatabaseInstanceLogsPolicyArgs']]):
        pulumi.set(self, "logs_policy", value)

    @_builtins.property
    @pulumi.getter
    def name(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        The name of the Database Instance.
        """
        return pulumi.get(self, "name")

    @name.setter
    def name(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "name", value)

    @_builtins.property
    @pulumi.getter
    def password(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        Password for the first user of the Database Instance. Only one of `password` or `password_wo` should be specified.
        """
        return pulumi.get(self, "password")

    @password.setter
    def password(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "password", value)

    @_builtins.property
    @pulumi.getter(name="passwordWo")
    def password_wo(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        **NOTE:** This field is write-only and its value will not be updated in state as part of read operations.
        """
        return pulumi.get(self, "password_wo")

    @password_wo.setter
    def password_wo(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "password_wo", value)

    @_builtins.property
    @pulumi.getter(name="passwordWoVersion")
    def password_wo_version(self) -> Optional[pulumi.Input[_builtins.int]]:
        """
        The version of the write-only password. To update the `password_wo`, you must also update the `password_wo_version`.
        """
        return pulumi.get(self, "password_wo_version")

    @password_wo_version.setter
    def password_wo_version(self, value: Optional[pulumi.Input[_builtins.int]]):
        pulumi.set(self, "password_wo_version", value)

    @_builtins.property
    @pulumi.getter(name="privateIps")
    def private_ips(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['DatabaseInstancePrivateIpArgs']]]]:
        """
        The private IPv4 address associated with the resource.
        """
        return pulumi.get(self, "private_ips")

    @private_ips.setter
    def private_ips(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['DatabaseInstancePrivateIpArgs']]]]):
        pulumi.set(self, "private_ips", value)

    @_builtins.property
    @pulumi.getter(name="privateNetwork")
    def private_network(self) -> Optional[pulumi.Input['DatabaseInstancePrivateNetworkArgs']]:
        """
        List of Private Networks endpoints of the Database Instance.
        """
        return pulumi.get(self, "private_network")

    @private_network.setter
    def private_network(self, value: Optional[pulumi.Input['DatabaseInstancePrivateNetworkArgs']]):
        pulumi.set(self, "private_network", value)

    @_builtins.property
    @pulumi.getter(name="projectId")
    def project_id(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        `project_id`) The ID of the project the Database
        Instance is associated with.
        """
        return pulumi.get(self, "project_id")

    @project_id.setter
    def project_id(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "project_id", value)

    @_builtins.property
    @pulumi.getter
    def region(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        `region`) The region
        in which the Database Instance should be created.
        """
        return pulumi.get(self, "region")

    @region.setter
    def region(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "region", value)

    @_builtins.property
    @pulumi.getter
    def settings(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]]:
        """
        Map of engine settings to be set on a running instance.
        """
        return pulumi.get(self, "settings")

    @settings.setter
    def settings(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]]):
        pulumi.set(self, "settings", value)

    @_builtins.property
    @pulumi.getter(name="snapshotId")
    def snapshot_id(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        The ID of an existing snapshot to restore or create the Database Instance from. Conflicts with the `engine` parameter and backup settings.
        """
        return pulumi.get(self, "snapshot_id")

    @snapshot_id.setter
    def snapshot_id(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "snapshot_id", value)

    @_builtins.property
    @pulumi.getter
    def tags(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]]:
        """
        The tags associated with the Database Instance.
        """
        return pulumi.get(self, "tags")

    @tags.setter
    def tags(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]]):
        pulumi.set(self, "tags", value)

    @_builtins.property
    @pulumi.getter(name="userName")
    def user_name(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        Identifier for the first user of the Database Instance.

        > **Important** Updates to `user_name` will recreate the Database Instance.
        """
        return pulumi.get(self, "user_name")

    @user_name.setter
    def user_name(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "user_name", value)

    @_builtins.property
    @pulumi.getter(name="volumeSizeInGb")
    def volume_size_in_gb(self) -> Optional[pulumi.Input[_builtins.int]]:
        """
        Volume size (in GB). Cannot be used when `volume_type` is set to `lssd`.

        > **Important** Once your Database Instance reaches `disk_full` status, you should increase the volume size before making any other change to your Database Instance.
        """
        return pulumi.get(self, "volume_size_in_gb")

    @volume_size_in_gb.setter
    def volume_size_in_gb(self, value: Optional[pulumi.Input[_builtins.int]]):
        pulumi.set(self, "volume_size_in_gb", value)

    @_builtins.property
    @pulumi.getter(name="volumeType")
    def volume_type(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        Type of volume where data are stored (`lssd`, `sbs_5k` or `sbs_15k`).
        """
        return pulumi.get(self, "volume_type")

    @volume_type.setter
    def volume_type(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "volume_type", value)


@pulumi.input_type
class _DatabaseInstanceState:
    def __init__(__self__, *,
                 backup_same_region: Optional[pulumi.Input[_builtins.bool]] = None,
                 backup_schedule_frequency: Optional[pulumi.Input[_builtins.int]] = None,
                 backup_schedule_retention: Optional[pulumi.Input[_builtins.int]] = None,
                 certificate: Optional[pulumi.Input[_builtins.str]] = None,
                 disable_backup: Optional[pulumi.Input[_builtins.bool]] = None,
                 encryption_at_rest: Optional[pulumi.Input[_builtins.bool]] = None,
                 endpoint_ip: Optional[pulumi.Input[_builtins.str]] = None,
                 endpoint_port: Optional[pulumi.Input[_builtins.int]] = None,
                 engine: Optional[pulumi.Input[_builtins.str]] = None,
                 init_settings: Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]] = None,
                 is_ha_cluster: Optional[pulumi.Input[_builtins.bool]] = None,
                 load_balancer: Optional[pulumi.Input['DatabaseInstanceLoadBalancerArgs']] = None,
                 logs_policy: Optional[pulumi.Input['DatabaseInstanceLogsPolicyArgs']] = None,
                 name: Optional[pulumi.Input[_builtins.str]] = None,
                 node_type: Optional[pulumi.Input[_builtins.str]] = None,
                 organization_id: Optional[pulumi.Input[_builtins.str]] = None,
                 password: Optional[pulumi.Input[_builtins.str]] = None,
                 password_wo: Optional[pulumi.Input[_builtins.str]] = None,
                 password_wo_version: Optional[pulumi.Input[_builtins.int]] = None,
                 private_ips: Optional[pulumi.Input[Sequence[pulumi.Input['DatabaseInstancePrivateIpArgs']]]] = None,
                 private_network: Optional[pulumi.Input['DatabaseInstancePrivateNetworkArgs']] = None,
                 project_id: Optional[pulumi.Input[_builtins.str]] = None,
                 read_replicas: Optional[pulumi.Input[Sequence[pulumi.Input['DatabaseInstanceReadReplicaArgs']]]] = None,
                 region: Optional[pulumi.Input[_builtins.str]] = None,
                 settings: Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]] = None,
                 snapshot_id: Optional[pulumi.Input[_builtins.str]] = None,
                 tags: Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]] = None,
                 upgradable_versions: Optional[pulumi.Input[Sequence[pulumi.Input['DatabaseInstanceUpgradableVersionArgs']]]] = None,
                 user_name: Optional[pulumi.Input[_builtins.str]] = None,
                 volume_size_in_gb: Optional[pulumi.Input[_builtins.int]] = None,
                 volume_type: Optional[pulumi.Input[_builtins.str]] = None):
        """
        Input properties used for looking up and filtering DatabaseInstance resources.
        :param pulumi.Input[_builtins.bool] backup_same_region: Boolean to store logical backups in the same region as the database instance
        :param pulumi.Input[_builtins.int] backup_schedule_frequency: Backup schedule frequency in hours
        :param pulumi.Input[_builtins.int] backup_schedule_retention: Backup schedule retention in days
        :param pulumi.Input[_builtins.str] certificate: Certificate of the Database Instance.
        :param pulumi.Input[_builtins.bool] disable_backup: Disable automated backup for the database instance
        :param pulumi.Input[_builtins.bool] encryption_at_rest: Enable or disable encryption at rest for the Database Instance.
        :param pulumi.Input[_builtins.str] endpoint_ip: (Deprecated) The IP of the Database Instance. Please use the private_network or the load_balancer attribute.
        :param pulumi.Input[_builtins.int] endpoint_port: (Deprecated) The port of the Database Instance. Please use the private_network or the load_balancer attribute.
        :param pulumi.Input[_builtins.str] engine: Database's engine version name (e.g., 'PostgreSQL-16', 'MySQL-8'). Changing this value triggers a blue/green upgrade using MajorUpgradeWorkflow with automatic endpoint migration
        :param pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]] init_settings: Map of engine settings to be set at database initialisation.
        :param pulumi.Input[_builtins.bool] is_ha_cluster: Enable or disable high availability for the Database Instance.
               
               > **Important** Updates to `is_ha_cluster` will recreate the Database Instance.
        :param pulumi.Input['DatabaseInstanceLoadBalancerArgs'] load_balancer: List of Load Balancer endpoints of the Database Instance.
        :param pulumi.Input['DatabaseInstanceLogsPolicyArgs'] logs_policy: Logs policy configuration
        :param pulumi.Input[_builtins.str] name: The name of the Database Instance.
        :param pulumi.Input[_builtins.str] node_type: The type of Database Instance you want to create (e.g. `db-dev-s`).
               
               > **Important** Updates to `node_type` will upgrade the Database Instance to the desired `node_type` without any
               interruption.
               
               > **Important** Once your Database Instance reaches `disk_full` status, if you are using `lssd` storage, you should upgrade the `node_type`, and if you are using `bssd` storage, you should increase the volume size before making any other changes to your Database Instance.
        :param pulumi.Input[_builtins.str] organization_id: The organization ID the Database Instance is associated with.
        :param pulumi.Input[_builtins.str] password: Password for the first user of the Database Instance. Only one of `password` or `password_wo` should be specified.
        :param pulumi.Input[_builtins.str] password_wo: **NOTE:** This field is write-only and its value will not be updated in state as part of read operations.
        :param pulumi.Input[_builtins.int] password_wo_version: The version of the write-only password. To update the `password_wo`, you must also update the `password_wo_version`.
        :param pulumi.Input[Sequence[pulumi.Input['DatabaseInstancePrivateIpArgs']]] private_ips: The private IPv4 address associated with the resource.
        :param pulumi.Input['DatabaseInstancePrivateNetworkArgs'] private_network: List of Private Networks endpoints of the Database Instance.
        :param pulumi.Input[_builtins.str] project_id: `project_id`) The ID of the project the Database
               Instance is associated with.
        :param pulumi.Input[Sequence[pulumi.Input['DatabaseInstanceReadReplicaArgs']]] read_replicas: List of read replicas of the Database Instance.
        :param pulumi.Input[_builtins.str] region: `region`) The region
               in which the Database Instance should be created.
        :param pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]] settings: Map of engine settings to be set on a running instance.
        :param pulumi.Input[_builtins.str] snapshot_id: The ID of an existing snapshot to restore or create the Database Instance from. Conflicts with the `engine` parameter and backup settings.
        :param pulumi.Input[Sequence[pulumi.Input[_builtins.str]]] tags: The tags associated with the Database Instance.
        :param pulumi.Input[Sequence[pulumi.Input['DatabaseInstanceUpgradableVersionArgs']]] upgradable_versions: List of available engine versions for upgrade. Each version contains:
        :param pulumi.Input[_builtins.str] user_name: Identifier for the first user of the Database Instance.
               
               > **Important** Updates to `user_name` will recreate the Database Instance.
        :param pulumi.Input[_builtins.int] volume_size_in_gb: Volume size (in GB). Cannot be used when `volume_type` is set to `lssd`.
               
               > **Important** Once your Database Instance reaches `disk_full` status, you should increase the volume size before making any other change to your Database Instance.
        :param pulumi.Input[_builtins.str] volume_type: Type of volume where data are stored (`lssd`, `sbs_5k` or `sbs_15k`).
        """
        if backup_same_region is not None:
            pulumi.set(__self__, "backup_same_region", backup_same_region)
        if backup_schedule_frequency is not None:
            pulumi.set(__self__, "backup_schedule_frequency", backup_schedule_frequency)
        if backup_schedule_retention is not None:
            pulumi.set(__self__, "backup_schedule_retention", backup_schedule_retention)
        if certificate is not None:
            pulumi.set(__self__, "certificate", certificate)
        if disable_backup is not None:
            pulumi.set(__self__, "disable_backup", disable_backup)
        if encryption_at_rest is not None:
            pulumi.set(__self__, "encryption_at_rest", encryption_at_rest)
        if endpoint_ip is not None:
            warnings.warn("""Please use the private_network or the load_balancer attribute""", DeprecationWarning)
            pulumi.log.warn("""endpoint_ip is deprecated: Please use the private_network or the load_balancer attribute""")
        if endpoint_ip is not None:
            pulumi.set(__self__, "endpoint_ip", endpoint_ip)
        if endpoint_port is not None:
            warnings.warn("""Please use the private_network or the load_balancer attribute""", DeprecationWarning)
            pulumi.log.warn("""endpoint_port is deprecated: Please use the private_network or the load_balancer attribute""")
        if endpoint_port is not None:
            pulumi.set(__self__, "endpoint_port", endpoint_port)
        if engine is not None:
            pulumi.set(__self__, "engine", engine)
        if init_settings is not None:
            pulumi.set(__self__, "init_settings", init_settings)
        if is_ha_cluster is not None:
            pulumi.set(__self__, "is_ha_cluster", is_ha_cluster)
        if load_balancer is not None:
            pulumi.set(__self__, "load_balancer", load_balancer)
        if logs_policy is not None:
            pulumi.set(__self__, "logs_policy", logs_policy)
        if name is not None:
            pulumi.set(__self__, "name", name)
        if node_type is not None:
            pulumi.set(__self__, "node_type", node_type)
        if organization_id is not None:
            pulumi.set(__self__, "organization_id", organization_id)
        if password is not None:
            pulumi.set(__self__, "password", password)
        if password_wo is not None:
            pulumi.set(__self__, "password_wo", password_wo)
        if password_wo_version is not None:
            pulumi.set(__self__, "password_wo_version", password_wo_version)
        if private_ips is not None:
            pulumi.set(__self__, "private_ips", private_ips)
        if private_network is not None:
            pulumi.set(__self__, "private_network", private_network)
        if project_id is not None:
            pulumi.set(__self__, "project_id", project_id)
        if read_replicas is not None:
            pulumi.set(__self__, "read_replicas", read_replicas)
        if region is not None:
            pulumi.set(__self__, "region", region)
        if settings is not None:
            pulumi.set(__self__, "settings", settings)
        if snapshot_id is not None:
            pulumi.set(__self__, "snapshot_id", snapshot_id)
        if tags is not None:
            pulumi.set(__self__, "tags", tags)
        if upgradable_versions is not None:
            pulumi.set(__self__, "upgradable_versions", upgradable_versions)
        if user_name is not None:
            pulumi.set(__self__, "user_name", user_name)
        if volume_size_in_gb is not None:
            pulumi.set(__self__, "volume_size_in_gb", volume_size_in_gb)
        if volume_type is not None:
            pulumi.set(__self__, "volume_type", volume_type)

    @_builtins.property
    @pulumi.getter(name="backupSameRegion")
    def backup_same_region(self) -> Optional[pulumi.Input[_builtins.bool]]:
        """
        Boolean to store logical backups in the same region as the database instance
        """
        return pulumi.get(self, "backup_same_region")

    @backup_same_region.setter
    def backup_same_region(self, value: Optional[pulumi.Input[_builtins.bool]]):
        pulumi.set(self, "backup_same_region", value)

    @_builtins.property
    @pulumi.getter(name="backupScheduleFrequency")
    def backup_schedule_frequency(self) -> Optional[pulumi.Input[_builtins.int]]:
        """
        Backup schedule frequency in hours
        """
        return pulumi.get(self, "backup_schedule_frequency")

    @backup_schedule_frequency.setter
    def backup_schedule_frequency(self, value: Optional[pulumi.Input[_builtins.int]]):
        pulumi.set(self, "backup_schedule_frequency", value)

    @_builtins.property
    @pulumi.getter(name="backupScheduleRetention")
    def backup_schedule_retention(self) -> Optional[pulumi.Input[_builtins.int]]:
        """
        Backup schedule retention in days
        """
        return pulumi.get(self, "backup_schedule_retention")

    @backup_schedule_retention.setter
    def backup_schedule_retention(self, value: Optional[pulumi.Input[_builtins.int]]):
        pulumi.set(self, "backup_schedule_retention", value)

    @_builtins.property
    @pulumi.getter
    def certificate(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        Certificate of the Database Instance.
        """
        return pulumi.get(self, "certificate")

    @certificate.setter
    def certificate(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "certificate", value)

    @_builtins.property
    @pulumi.getter(name="disableBackup")
    def disable_backup(self) -> Optional[pulumi.Input[_builtins.bool]]:
        """
        Disable automated backup for the database instance
        """
        return pulumi.get(self, "disable_backup")

    @disable_backup.setter
    def disable_backup(self, value: Optional[pulumi.Input[_builtins.bool]]):
        pulumi.set(self, "disable_backup", value)

    @_builtins.property
    @pulumi.getter(name="encryptionAtRest")
    def encryption_at_rest(self) -> Optional[pulumi.Input[_builtins.bool]]:
        """
        Enable or disable encryption at rest for the Database Instance.
        """
        return pulumi.get(self, "encryption_at_rest")

    @encryption_at_rest.setter
    def encryption_at_rest(self, value: Optional[pulumi.Input[_builtins.bool]]):
        pulumi.set(self, "encryption_at_rest", value)

    @_builtins.property
    @pulumi.getter(name="endpointIp")
    @_utilities.deprecated("""Please use the private_network or the load_balancer attribute""")
    def endpoint_ip(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        (Deprecated) The IP of the Database Instance. Please use the private_network or the load_balancer attribute.
        """
        return pulumi.get(self, "endpoint_ip")

    @endpoint_ip.setter
    def endpoint_ip(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "endpoint_ip", value)

    @_builtins.property
    @pulumi.getter(name="endpointPort")
    @_utilities.deprecated("""Please use the private_network or the load_balancer attribute""")
    def endpoint_port(self) -> Optional[pulumi.Input[_builtins.int]]:
        """
        (Deprecated) The port of the Database Instance. Please use the private_network or the load_balancer attribute.
        """
        return pulumi.get(self, "endpoint_port")

    @endpoint_port.setter
    def endpoint_port(self, value: Optional[pulumi.Input[_builtins.int]]):
        pulumi.set(self, "endpoint_port", value)

    @_builtins.property
    @pulumi.getter
    def engine(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        Database's engine version name (e.g., 'PostgreSQL-16', 'MySQL-8'). Changing this value triggers a blue/green upgrade using MajorUpgradeWorkflow with automatic endpoint migration
        """
        return pulumi.get(self, "engine")

    @engine.setter
    def engine(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "engine", value)

    @_builtins.property
    @pulumi.getter(name="initSettings")
    def init_settings(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]]:
        """
        Map of engine settings to be set at database initialisation.
        """
        return pulumi.get(self, "init_settings")

    @init_settings.setter
    def init_settings(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]]):
        pulumi.set(self, "init_settings", value)

    @_builtins.property
    @pulumi.getter(name="isHaCluster")
    def is_ha_cluster(self) -> Optional[pulumi.Input[_builtins.bool]]:
        """
        Enable or disable high availability for the Database Instance.

        > **Important** Updates to `is_ha_cluster` will recreate the Database Instance.
        """
        return pulumi.get(self, "is_ha_cluster")

    @is_ha_cluster.setter
    def is_ha_cluster(self, value: Optional[pulumi.Input[_builtins.bool]]):
        pulumi.set(self, "is_ha_cluster", value)

    @_builtins.property
    @pulumi.getter(name="loadBalancer")
    def load_balancer(self) -> Optional[pulumi.Input['DatabaseInstanceLoadBalancerArgs']]:
        """
        List of Load Balancer endpoints of the Database Instance.
        """
        return pulumi.get(self, "load_balancer")

    @load_balancer.setter
    def load_balancer(self, value: Optional[pulumi.Input['DatabaseInstanceLoadBalancerArgs']]):
        pulumi.set(self, "load_balancer", value)

    @_builtins.property
    @pulumi.getter(name="logsPolicy")
    def logs_policy(self) -> Optional[pulumi.Input['DatabaseInstanceLogsPolicyArgs']]:
        """
        Logs policy configuration
        """
        return pulumi.get(self, "logs_policy")

    @logs_policy.setter
    def logs_policy(self, value: Optional[pulumi.Input['DatabaseInstanceLogsPolicyArgs']]):
        pulumi.set(self, "logs_policy", value)

    @_builtins.property
    @pulumi.getter
    def name(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        The name of the Database Instance.
        """
        return pulumi.get(self, "name")

    @name.setter
    def name(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "name", value)

    @_builtins.property
    @pulumi.getter(name="nodeType")
    def node_type(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        The type of Database Instance you want to create (e.g. `db-dev-s`).

        > **Important** Updates to `node_type` will upgrade the Database Instance to the desired `node_type` without any
        interruption.

        > **Important** Once your Database Instance reaches `disk_full` status, if you are using `lssd` storage, you should upgrade the `node_type`, and if you are using `bssd` storage, you should increase the volume size before making any other changes to your Database Instance.
        """
        return pulumi.get(self, "node_type")

    @node_type.setter
    def node_type(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "node_type", value)

    @_builtins.property
    @pulumi.getter(name="organizationId")
    def organization_id(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        The organization ID the Database Instance is associated with.
        """
        return pulumi.get(self, "organization_id")

    @organization_id.setter
    def organization_id(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "organization_id", value)

    @_builtins.property
    @pulumi.getter
    def password(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        Password for the first user of the Database Instance. Only one of `password` or `password_wo` should be specified.
        """
        return pulumi.get(self, "password")

    @password.setter
    def password(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "password", value)

    @_builtins.property
    @pulumi.getter(name="passwordWo")
    def password_wo(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        **NOTE:** This field is write-only and its value will not be updated in state as part of read operations.
        """
        return pulumi.get(self, "password_wo")

    @password_wo.setter
    def password_wo(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "password_wo", value)

    @_builtins.property
    @pulumi.getter(name="passwordWoVersion")
    def password_wo_version(self) -> Optional[pulumi.Input[_builtins.int]]:
        """
        The version of the write-only password. To update the `password_wo`, you must also update the `password_wo_version`.
        """
        return pulumi.get(self, "password_wo_version")

    @password_wo_version.setter
    def password_wo_version(self, value: Optional[pulumi.Input[_builtins.int]]):
        pulumi.set(self, "password_wo_version", value)

    @_builtins.property
    @pulumi.getter(name="privateIps")
    def private_ips(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['DatabaseInstancePrivateIpArgs']]]]:
        """
        The private IPv4 address associated with the resource.
        """
        return pulumi.get(self, "private_ips")

    @private_ips.setter
    def private_ips(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['DatabaseInstancePrivateIpArgs']]]]):
        pulumi.set(self, "private_ips", value)

    @_builtins.property
    @pulumi.getter(name="privateNetwork")
    def private_network(self) -> Optional[pulumi.Input['DatabaseInstancePrivateNetworkArgs']]:
        """
        List of Private Networks endpoints of the Database Instance.
        """
        return pulumi.get(self, "private_network")

    @private_network.setter
    def private_network(self, value: Optional[pulumi.Input['DatabaseInstancePrivateNetworkArgs']]):
        pulumi.set(self, "private_network", value)

    @_builtins.property
    @pulumi.getter(name="projectId")
    def project_id(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        `project_id`) The ID of the project the Database
        Instance is associated with.
        """
        return pulumi.get(self, "project_id")

    @project_id.setter
    def project_id(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "project_id", value)

    @_builtins.property
    @pulumi.getter(name="readReplicas")
    def read_replicas(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['DatabaseInstanceReadReplicaArgs']]]]:
        """
        List of read replicas of the Database Instance.
        """
        return pulumi.get(self, "read_replicas")

    @read_replicas.setter
    def read_replicas(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['DatabaseInstanceReadReplicaArgs']]]]):
        pulumi.set(self, "read_replicas", value)

    @_builtins.property
    @pulumi.getter
    def region(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        `region`) The region
        in which the Database Instance should be created.
        """
        return pulumi.get(self, "region")

    @region.setter
    def region(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "region", value)

    @_builtins.property
    @pulumi.getter
    def settings(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]]:
        """
        Map of engine settings to be set on a running instance.
        """
        return pulumi.get(self, "settings")

    @settings.setter
    def settings(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]]):
        pulumi.set(self, "settings", value)

    @_builtins.property
    @pulumi.getter(name="snapshotId")
    def snapshot_id(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        The ID of an existing snapshot to restore or create the Database Instance from. Conflicts with the `engine` parameter and backup settings.
        """
        return pulumi.get(self, "snapshot_id")

    @snapshot_id.setter
    def snapshot_id(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "snapshot_id", value)

    @_builtins.property
    @pulumi.getter
    def tags(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]]:
        """
        The tags associated with the Database Instance.
        """
        return pulumi.get(self, "tags")

    @tags.setter
    def tags(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]]):
        pulumi.set(self, "tags", value)

    @_builtins.property
    @pulumi.getter(name="upgradableVersions")
    def upgradable_versions(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['DatabaseInstanceUpgradableVersionArgs']]]]:
        """
        List of available engine versions for upgrade. Each version contains:
        """
        return pulumi.get(self, "upgradable_versions")

    @upgradable_versions.setter
    def upgradable_versions(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['DatabaseInstanceUpgradableVersionArgs']]]]):
        pulumi.set(self, "upgradable_versions", value)

    @_builtins.property
    @pulumi.getter(name="userName")
    def user_name(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        Identifier for the first user of the Database Instance.

        > **Important** Updates to `user_name` will recreate the Database Instance.
        """
        return pulumi.get(self, "user_name")

    @user_name.setter
    def user_name(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "user_name", value)

    @_builtins.property
    @pulumi.getter(name="volumeSizeInGb")
    def volume_size_in_gb(self) -> Optional[pulumi.Input[_builtins.int]]:
        """
        Volume size (in GB). Cannot be used when `volume_type` is set to `lssd`.

        > **Important** Once your Database Instance reaches `disk_full` status, you should increase the volume size before making any other change to your Database Instance.
        """
        return pulumi.get(self, "volume_size_in_gb")

    @volume_size_in_gb.setter
    def volume_size_in_gb(self, value: Optional[pulumi.Input[_builtins.int]]):
        pulumi.set(self, "volume_size_in_gb", value)

    @_builtins.property
    @pulumi.getter(name="volumeType")
    def volume_type(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        Type of volume where data are stored (`lssd`, `sbs_5k` or `sbs_15k`).
        """
        return pulumi.get(self, "volume_type")

    @volume_type.setter
    def volume_type(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "volume_type", value)


warnings.warn("""scaleway.index/databaseinstance.DatabaseInstance has been deprecated in favor of scaleway.databases/instance.Instance""", DeprecationWarning)


@pulumi.type_token("scaleway:index/databaseInstance:DatabaseInstance")
class DatabaseInstance(pulumi.CustomResource):
    warnings.warn("""scaleway.index/databaseinstance.DatabaseInstance has been deprecated in favor of scaleway.databases/instance.Instance""", DeprecationWarning)

    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 backup_same_region: Optional[pulumi.Input[_builtins.bool]] = None,
                 backup_schedule_frequency: Optional[pulumi.Input[_builtins.int]] = None,
                 backup_schedule_retention: Optional[pulumi.Input[_builtins.int]] = None,
                 disable_backup: Optional[pulumi.Input[_builtins.bool]] = None,
                 encryption_at_rest: Optional[pulumi.Input[_builtins.bool]] = None,
                 engine: Optional[pulumi.Input[_builtins.str]] = None,
                 init_settings: Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]] = None,
                 is_ha_cluster: Optional[pulumi.Input[_builtins.bool]] = None,
                 load_balancer: Optional[pulumi.Input[Union['DatabaseInstanceLoadBalancerArgs', 'DatabaseInstanceLoadBalancerArgsDict']]] = None,
                 logs_policy: Optional[pulumi.Input[Union['DatabaseInstanceLogsPolicyArgs', 'DatabaseInstanceLogsPolicyArgsDict']]] = None,
                 name: Optional[pulumi.Input[_builtins.str]] = None,
                 node_type: Optional[pulumi.Input[_builtins.str]] = None,
                 password: Optional[pulumi.Input[_builtins.str]] = None,
                 password_wo: Optional[pulumi.Input[_builtins.str]] = None,
                 password_wo_version: Optional[pulumi.Input[_builtins.int]] = None,
                 private_ips: Optional[pulumi.Input[Sequence[pulumi.Input[Union['DatabaseInstancePrivateIpArgs', 'DatabaseInstancePrivateIpArgsDict']]]]] = None,
                 private_network: Optional[pulumi.Input[Union['DatabaseInstancePrivateNetworkArgs', 'DatabaseInstancePrivateNetworkArgsDict']]] = None,
                 project_id: Optional[pulumi.Input[_builtins.str]] = None,
                 region: Optional[pulumi.Input[_builtins.str]] = None,
                 settings: Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]] = None,
                 snapshot_id: Optional[pulumi.Input[_builtins.str]] = None,
                 tags: Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]] = None,
                 user_name: Optional[pulumi.Input[_builtins.str]] = None,
                 volume_size_in_gb: Optional[pulumi.Input[_builtins.int]] = None,
                 volume_type: Optional[pulumi.Input[_builtins.str]] = None,
                 __props__=None):
        """
        ## Example Usage

        ```python
        import pulumi
        import pulumiverse_scaleway as scaleway

        ### Example Basic
        main = scaleway.databases.Instance("main",
            name="test-rdb",
            node_type="DB-DEV-S",
            engine="PostgreSQL-15",
            is_ha_cluster=True,
            disable_backup=True,
            user_name="my_initial_user",
            password="thiZ_is_v&ry_s3cret",
            encryption_at_rest=True)
        ```

        ```python
        import pulumi
        import pulumiverse_scaleway as scaleway

        ### Example Engine Upgrade
        # Initial creation with PostgreSQL 14
        main = scaleway.databases.Instance("main",
            name="my-database",
            node_type="DB-DEV-S",
            engine="PostgreSQL-14",
            is_ha_cluster=False,
            disable_backup=True,
            user_name="my_user",
            password="thiZ_is_v&ry_s3cret")
        pulumi.export("upgradableVersions", main.upgradable_versions)
        ```

        ## Import

        Database Instance can be imported using the `{region}/{id}`, e.g.

        bash

        ```sh
        $ pulumi import scaleway:index/databaseInstance:DatabaseInstance rdb01 fr-par/11111111-1111-1111-1111-111111111111
        ```

        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[_builtins.bool] backup_same_region: Boolean to store logical backups in the same region as the database instance
        :param pulumi.Input[_builtins.int] backup_schedule_frequency: Backup schedule frequency in hours
        :param pulumi.Input[_builtins.int] backup_schedule_retention: Backup schedule retention in days
        :param pulumi.Input[_builtins.bool] disable_backup: Disable automated backup for the database instance
        :param pulumi.Input[_builtins.bool] encryption_at_rest: Enable or disable encryption at rest for the Database Instance.
        :param pulumi.Input[_builtins.str] engine: Database's engine version name (e.g., 'PostgreSQL-16', 'MySQL-8'). Changing this value triggers a blue/green upgrade using MajorUpgradeWorkflow with automatic endpoint migration
        :param pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]] init_settings: Map of engine settings to be set at database initialisation.
        :param pulumi.Input[_builtins.bool] is_ha_cluster: Enable or disable high availability for the Database Instance.
               
               > **Important** Updates to `is_ha_cluster` will recreate the Database Instance.
        :param pulumi.Input[Union['DatabaseInstanceLoadBalancerArgs', 'DatabaseInstanceLoadBalancerArgsDict']] load_balancer: List of Load Balancer endpoints of the Database Instance.
        :param pulumi.Input[Union['DatabaseInstanceLogsPolicyArgs', 'DatabaseInstanceLogsPolicyArgsDict']] logs_policy: Logs policy configuration
        :param pulumi.Input[_builtins.str] name: The name of the Database Instance.
        :param pulumi.Input[_builtins.str] node_type: The type of Database Instance you want to create (e.g. `db-dev-s`).
               
               > **Important** Updates to `node_type` will upgrade the Database Instance to the desired `node_type` without any
               interruption.
               
               > **Important** Once your Database Instance reaches `disk_full` status, if you are using `lssd` storage, you should upgrade the `node_type`, and if you are using `bssd` storage, you should increase the volume size before making any other changes to your Database Instance.
        :param pulumi.Input[_builtins.str] password: Password for the first user of the Database Instance. Only one of `password` or `password_wo` should be specified.
        :param pulumi.Input[_builtins.str] password_wo: **NOTE:** This field is write-only and its value will not be updated in state as part of read operations.
        :param pulumi.Input[_builtins.int] password_wo_version: The version of the write-only password. To update the `password_wo`, you must also update the `password_wo_version`.
        :param pulumi.Input[Sequence[pulumi.Input[Union['DatabaseInstancePrivateIpArgs', 'DatabaseInstancePrivateIpArgsDict']]]] private_ips: The private IPv4 address associated with the resource.
        :param pulumi.Input[Union['DatabaseInstancePrivateNetworkArgs', 'DatabaseInstancePrivateNetworkArgsDict']] private_network: List of Private Networks endpoints of the Database Instance.
        :param pulumi.Input[_builtins.str] project_id: `project_id`) The ID of the project the Database
               Instance is associated with.
        :param pulumi.Input[_builtins.str] region: `region`) The region
               in which the Database Instance should be created.
        :param pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]] settings: Map of engine settings to be set on a running instance.
        :param pulumi.Input[_builtins.str] snapshot_id: The ID of an existing snapshot to restore or create the Database Instance from. Conflicts with the `engine` parameter and backup settings.
        :param pulumi.Input[Sequence[pulumi.Input[_builtins.str]]] tags: The tags associated with the Database Instance.
        :param pulumi.Input[_builtins.str] user_name: Identifier for the first user of the Database Instance.
               
               > **Important** Updates to `user_name` will recreate the Database Instance.
        :param pulumi.Input[_builtins.int] volume_size_in_gb: Volume size (in GB). Cannot be used when `volume_type` is set to `lssd`.
               
               > **Important** Once your Database Instance reaches `disk_full` status, you should increase the volume size before making any other change to your Database Instance.
        :param pulumi.Input[_builtins.str] volume_type: Type of volume where data are stored (`lssd`, `sbs_5k` or `sbs_15k`).
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: DatabaseInstanceArgs,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        ## Example Usage

        ```python
        import pulumi
        import pulumiverse_scaleway as scaleway

        ### Example Basic
        main = scaleway.databases.Instance("main",
            name="test-rdb",
            node_type="DB-DEV-S",
            engine="PostgreSQL-15",
            is_ha_cluster=True,
            disable_backup=True,
            user_name="my_initial_user",
            password="thiZ_is_v&ry_s3cret",
            encryption_at_rest=True)
        ```

        ```python
        import pulumi
        import pulumiverse_scaleway as scaleway

        ### Example Engine Upgrade
        # Initial creation with PostgreSQL 14
        main = scaleway.databases.Instance("main",
            name="my-database",
            node_type="DB-DEV-S",
            engine="PostgreSQL-14",
            is_ha_cluster=False,
            disable_backup=True,
            user_name="my_user",
            password="thiZ_is_v&ry_s3cret")
        pulumi.export("upgradableVersions", main.upgradable_versions)
        ```

        ## Import

        Database Instance can be imported using the `{region}/{id}`, e.g.

        bash

        ```sh
        $ pulumi import scaleway:index/databaseInstance:DatabaseInstance rdb01 fr-par/11111111-1111-1111-1111-111111111111
        ```

        :param str resource_name: The name of the resource.
        :param DatabaseInstanceArgs args: The arguments to use to populate this resource's properties.
        :param pulumi.ResourceOptions opts: Options for the resource.
        """
        ...
    def __init__(__self__, resource_name: str, *args, **kwargs):
        resource_args, opts = _utilities.get_resource_args_opts(DatabaseInstanceArgs, pulumi.ResourceOptions, *args, **kwargs)
        if resource_args is not None:
            __self__._internal_init(resource_name, opts, **resource_args.__dict__)
        else:
            __self__._internal_init(resource_name, *args, **kwargs)

    def _internal_init(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 backup_same_region: Optional[pulumi.Input[_builtins.bool]] = None,
                 backup_schedule_frequency: Optional[pulumi.Input[_builtins.int]] = None,
                 backup_schedule_retention: Optional[pulumi.Input[_builtins.int]] = None,
                 disable_backup: Optional[pulumi.Input[_builtins.bool]] = None,
                 encryption_at_rest: Optional[pulumi.Input[_builtins.bool]] = None,
                 engine: Optional[pulumi.Input[_builtins.str]] = None,
                 init_settings: Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]] = None,
                 is_ha_cluster: Optional[pulumi.Input[_builtins.bool]] = None,
                 load_balancer: Optional[pulumi.Input[Union['DatabaseInstanceLoadBalancerArgs', 'DatabaseInstanceLoadBalancerArgsDict']]] = None,
                 logs_policy: Optional[pulumi.Input[Union['DatabaseInstanceLogsPolicyArgs', 'DatabaseInstanceLogsPolicyArgsDict']]] = None,
                 name: Optional[pulumi.Input[_builtins.str]] = None,
                 node_type: Optional[pulumi.Input[_builtins.str]] = None,
                 password: Optional[pulumi.Input[_builtins.str]] = None,
                 password_wo: Optional[pulumi.Input[_builtins.str]] = None,
                 password_wo_version: Optional[pulumi.Input[_builtins.int]] = None,
                 private_ips: Optional[pulumi.Input[Sequence[pulumi.Input[Union['DatabaseInstancePrivateIpArgs', 'DatabaseInstancePrivateIpArgsDict']]]]] = None,
                 private_network: Optional[pulumi.Input[Union['DatabaseInstancePrivateNetworkArgs', 'DatabaseInstancePrivateNetworkArgsDict']]] = None,
                 project_id: Optional[pulumi.Input[_builtins.str]] = None,
                 region: Optional[pulumi.Input[_builtins.str]] = None,
                 settings: Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]] = None,
                 snapshot_id: Optional[pulumi.Input[_builtins.str]] = None,
                 tags: Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]] = None,
                 user_name: Optional[pulumi.Input[_builtins.str]] = None,
                 volume_size_in_gb: Optional[pulumi.Input[_builtins.int]] = None,
                 volume_type: Optional[pulumi.Input[_builtins.str]] = None,
                 __props__=None):
        pulumi.log.warn("""DatabaseInstance is deprecated: scaleway.index/databaseinstance.DatabaseInstance has been deprecated in favor of scaleway.databases/instance.Instance""")
        opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
        if not isinstance(opts, pulumi.ResourceOptions):
            raise TypeError('Expected resource options to be a ResourceOptions instance')
        if opts.id is None:
            if __props__ is not None:
                raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
            __props__ = DatabaseInstanceArgs.__new__(DatabaseInstanceArgs)

            __props__.__dict__["backup_same_region"] = backup_same_region
            __props__.__dict__["backup_schedule_frequency"] = backup_schedule_frequency
            __props__.__dict__["backup_schedule_retention"] = backup_schedule_retention
            __props__.__dict__["disable_backup"] = disable_backup
            __props__.__dict__["encryption_at_rest"] = encryption_at_rest
            __props__.__dict__["engine"] = engine
            __props__.__dict__["init_settings"] = init_settings
            __props__.__dict__["is_ha_cluster"] = is_ha_cluster
            __props__.__dict__["load_balancer"] = load_balancer
            __props__.__dict__["logs_policy"] = logs_policy
            __props__.__dict__["name"] = name
            if node_type is None and not opts.urn:
                raise TypeError("Missing required property 'node_type'")
            __props__.__dict__["node_type"] = node_type
            __props__.__dict__["password"] = None if password is None else pulumi.Output.secret(password)
            __props__.__dict__["password_wo"] = None if password_wo is None else pulumi.Output.secret(password_wo)
            __props__.__dict__["password_wo_version"] = password_wo_version
            __props__.__dict__["private_ips"] = private_ips
            __props__.__dict__["private_network"] = private_network
            __props__.__dict__["project_id"] = project_id
            __props__.__dict__["region"] = region
            __props__.__dict__["settings"] = settings
            __props__.__dict__["snapshot_id"] = snapshot_id
            __props__.__dict__["tags"] = tags
            __props__.__dict__["user_name"] = user_name
            __props__.__dict__["volume_size_in_gb"] = volume_size_in_gb
            __props__.__dict__["volume_type"] = volume_type
            __props__.__dict__["certificate"] = None
            __props__.__dict__["endpoint_ip"] = None
            __props__.__dict__["endpoint_port"] = None
            __props__.__dict__["organization_id"] = None
            __props__.__dict__["read_replicas"] = None
            __props__.__dict__["upgradable_versions"] = None
        secret_opts = pulumi.ResourceOptions(additional_secret_outputs=["password", "passwordWo"])
        opts = pulumi.ResourceOptions.merge(opts, secret_opts)
        super(DatabaseInstance, __self__).__init__(
            'scaleway:index/databaseInstance:DatabaseInstance',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            backup_same_region: Optional[pulumi.Input[_builtins.bool]] = None,
            backup_schedule_frequency: Optional[pulumi.Input[_builtins.int]] = None,
            backup_schedule_retention: Optional[pulumi.Input[_builtins.int]] = None,
            certificate: Optional[pulumi.Input[_builtins.str]] = None,
            disable_backup: Optional[pulumi.Input[_builtins.bool]] = None,
            encryption_at_rest: Optional[pulumi.Input[_builtins.bool]] = None,
            endpoint_ip: Optional[pulumi.Input[_builtins.str]] = None,
            endpoint_port: Optional[pulumi.Input[_builtins.int]] = None,
            engine: Optional[pulumi.Input[_builtins.str]] = None,
            init_settings: Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]] = None,
            is_ha_cluster: Optional[pulumi.Input[_builtins.bool]] = None,
            load_balancer: Optional[pulumi.Input[Union['DatabaseInstanceLoadBalancerArgs', 'DatabaseInstanceLoadBalancerArgsDict']]] = None,
            logs_policy: Optional[pulumi.Input[Union['DatabaseInstanceLogsPolicyArgs', 'DatabaseInstanceLogsPolicyArgsDict']]] = None,
            name: Optional[pulumi.Input[_builtins.str]] = None,
            node_type: Optional[pulumi.Input[_builtins.str]] = None,
            organization_id: Optional[pulumi.Input[_builtins.str]] = None,
            password: Optional[pulumi.Input[_builtins.str]] = None,
            password_wo: Optional[pulumi.Input[_builtins.str]] = None,
            password_wo_version: Optional[pulumi.Input[_builtins.int]] = None,
            private_ips: Optional[pulumi.Input[Sequence[pulumi.Input[Union['DatabaseInstancePrivateIpArgs', 'DatabaseInstancePrivateIpArgsDict']]]]] = None,
            private_network: Optional[pulumi.Input[Union['DatabaseInstancePrivateNetworkArgs', 'DatabaseInstancePrivateNetworkArgsDict']]] = None,
            project_id: Optional[pulumi.Input[_builtins.str]] = None,
            read_replicas: Optional[pulumi.Input[Sequence[pulumi.Input[Union['DatabaseInstanceReadReplicaArgs', 'DatabaseInstanceReadReplicaArgsDict']]]]] = None,
            region: Optional[pulumi.Input[_builtins.str]] = None,
            settings: Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]] = None,
            snapshot_id: Optional[pulumi.Input[_builtins.str]] = None,
            tags: Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]] = None,
            upgradable_versions: Optional[pulumi.Input[Sequence[pulumi.Input[Union['DatabaseInstanceUpgradableVersionArgs', 'DatabaseInstanceUpgradableVersionArgsDict']]]]] = None,
            user_name: Optional[pulumi.Input[_builtins.str]] = None,
            volume_size_in_gb: Optional[pulumi.Input[_builtins.int]] = None,
            volume_type: Optional[pulumi.Input[_builtins.str]] = None) -> 'DatabaseInstance':
        """
        Get an existing DatabaseInstance resource's state with the given name, id, and optional extra
        properties used to qualify the lookup.

        :param str resource_name: The unique name of the resulting resource.
        :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[_builtins.bool] backup_same_region: Boolean to store logical backups in the same region as the database instance
        :param pulumi.Input[_builtins.int] backup_schedule_frequency: Backup schedule frequency in hours
        :param pulumi.Input[_builtins.int] backup_schedule_retention: Backup schedule retention in days
        :param pulumi.Input[_builtins.str] certificate: Certificate of the Database Instance.
        :param pulumi.Input[_builtins.bool] disable_backup: Disable automated backup for the database instance
        :param pulumi.Input[_builtins.bool] encryption_at_rest: Enable or disable encryption at rest for the Database Instance.
        :param pulumi.Input[_builtins.str] endpoint_ip: (Deprecated) The IP of the Database Instance. Please use the private_network or the load_balancer attribute.
        :param pulumi.Input[_builtins.int] endpoint_port: (Deprecated) The port of the Database Instance. Please use the private_network or the load_balancer attribute.
        :param pulumi.Input[_builtins.str] engine: Database's engine version name (e.g., 'PostgreSQL-16', 'MySQL-8'). Changing this value triggers a blue/green upgrade using MajorUpgradeWorkflow with automatic endpoint migration
        :param pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]] init_settings: Map of engine settings to be set at database initialisation.
        :param pulumi.Input[_builtins.bool] is_ha_cluster: Enable or disable high availability for the Database Instance.
               
               > **Important** Updates to `is_ha_cluster` will recreate the Database Instance.
        :param pulumi.Input[Union['DatabaseInstanceLoadBalancerArgs', 'DatabaseInstanceLoadBalancerArgsDict']] load_balancer: List of Load Balancer endpoints of the Database Instance.
        :param pulumi.Input[Union['DatabaseInstanceLogsPolicyArgs', 'DatabaseInstanceLogsPolicyArgsDict']] logs_policy: Logs policy configuration
        :param pulumi.Input[_builtins.str] name: The name of the Database Instance.
        :param pulumi.Input[_builtins.str] node_type: The type of Database Instance you want to create (e.g. `db-dev-s`).
               
               > **Important** Updates to `node_type` will upgrade the Database Instance to the desired `node_type` without any
               interruption.
               
               > **Important** Once your Database Instance reaches `disk_full` status, if you are using `lssd` storage, you should upgrade the `node_type`, and if you are using `bssd` storage, you should increase the volume size before making any other changes to your Database Instance.
        :param pulumi.Input[_builtins.str] organization_id: The organization ID the Database Instance is associated with.
        :param pulumi.Input[_builtins.str] password: Password for the first user of the Database Instance. Only one of `password` or `password_wo` should be specified.
        :param pulumi.Input[_builtins.str] password_wo: **NOTE:** This field is write-only and its value will not be updated in state as part of read operations.
        :param pulumi.Input[_builtins.int] password_wo_version: The version of the write-only password. To update the `password_wo`, you must also update the `password_wo_version`.
        :param pulumi.Input[Sequence[pulumi.Input[Union['DatabaseInstancePrivateIpArgs', 'DatabaseInstancePrivateIpArgsDict']]]] private_ips: The private IPv4 address associated with the resource.
        :param pulumi.Input[Union['DatabaseInstancePrivateNetworkArgs', 'DatabaseInstancePrivateNetworkArgsDict']] private_network: List of Private Networks endpoints of the Database Instance.
        :param pulumi.Input[_builtins.str] project_id: `project_id`) The ID of the project the Database
               Instance is associated with.
        :param pulumi.Input[Sequence[pulumi.Input[Union['DatabaseInstanceReadReplicaArgs', 'DatabaseInstanceReadReplicaArgsDict']]]] read_replicas: List of read replicas of the Database Instance.
        :param pulumi.Input[_builtins.str] region: `region`) The region
               in which the Database Instance should be created.
        :param pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]] settings: Map of engine settings to be set on a running instance.
        :param pulumi.Input[_builtins.str] snapshot_id: The ID of an existing snapshot to restore or create the Database Instance from. Conflicts with the `engine` parameter and backup settings.
        :param pulumi.Input[Sequence[pulumi.Input[_builtins.str]]] tags: The tags associated with the Database Instance.
        :param pulumi.Input[Sequence[pulumi.Input[Union['DatabaseInstanceUpgradableVersionArgs', 'DatabaseInstanceUpgradableVersionArgsDict']]]] upgradable_versions: List of available engine versions for upgrade. Each version contains:
        :param pulumi.Input[_builtins.str] user_name: Identifier for the first user of the Database Instance.
               
               > **Important** Updates to `user_name` will recreate the Database Instance.
        :param pulumi.Input[_builtins.int] volume_size_in_gb: Volume size (in GB). Cannot be used when `volume_type` is set to `lssd`.
               
               > **Important** Once your Database Instance reaches `disk_full` status, you should increase the volume size before making any other change to your Database Instance.
        :param pulumi.Input[_builtins.str] volume_type: Type of volume where data are stored (`lssd`, `sbs_5k` or `sbs_15k`).
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = _DatabaseInstanceState.__new__(_DatabaseInstanceState)

        __props__.__dict__["backup_same_region"] = backup_same_region
        __props__.__dict__["backup_schedule_frequency"] = backup_schedule_frequency
        __props__.__dict__["backup_schedule_retention"] = backup_schedule_retention
        __props__.__dict__["certificate"] = certificate
        __props__.__dict__["disable_backup"] = disable_backup
        __props__.__dict__["encryption_at_rest"] = encryption_at_rest
        __props__.__dict__["endpoint_ip"] = endpoint_ip
        __props__.__dict__["endpoint_port"] = endpoint_port
        __props__.__dict__["engine"] = engine
        __props__.__dict__["init_settings"] = init_settings
        __props__.__dict__["is_ha_cluster"] = is_ha_cluster
        __props__.__dict__["load_balancer"] = load_balancer
        __props__.__dict__["logs_policy"] = logs_policy
        __props__.__dict__["name"] = name
        __props__.__dict__["node_type"] = node_type
        __props__.__dict__["organization_id"] = organization_id
        __props__.__dict__["password"] = password
        __props__.__dict__["password_wo"] = password_wo
        __props__.__dict__["password_wo_version"] = password_wo_version
        __props__.__dict__["private_ips"] = private_ips
        __props__.__dict__["private_network"] = private_network
        __props__.__dict__["project_id"] = project_id
        __props__.__dict__["read_replicas"] = read_replicas
        __props__.__dict__["region"] = region
        __props__.__dict__["settings"] = settings
        __props__.__dict__["snapshot_id"] = snapshot_id
        __props__.__dict__["tags"] = tags
        __props__.__dict__["upgradable_versions"] = upgradable_versions
        __props__.__dict__["user_name"] = user_name
        __props__.__dict__["volume_size_in_gb"] = volume_size_in_gb
        __props__.__dict__["volume_type"] = volume_type
        return DatabaseInstance(resource_name, opts=opts, __props__=__props__)

    @_builtins.property
    @pulumi.getter(name="backupSameRegion")
    def backup_same_region(self) -> pulumi.Output[_builtins.bool]:
        """
        Boolean to store logical backups in the same region as the database instance
        """
        return pulumi.get(self, "backup_same_region")

    @_builtins.property
    @pulumi.getter(name="backupScheduleFrequency")
    def backup_schedule_frequency(self) -> pulumi.Output[_builtins.int]:
        """
        Backup schedule frequency in hours
        """
        return pulumi.get(self, "backup_schedule_frequency")

    @_builtins.property
    @pulumi.getter(name="backupScheduleRetention")
    def backup_schedule_retention(self) -> pulumi.Output[_builtins.int]:
        """
        Backup schedule retention in days
        """
        return pulumi.get(self, "backup_schedule_retention")

    @_builtins.property
    @pulumi.getter
    def certificate(self) -> pulumi.Output[_builtins.str]:
        """
        Certificate of the Database Instance.
        """
        return pulumi.get(self, "certificate")

    @_builtins.property
    @pulumi.getter(name="disableBackup")
    def disable_backup(self) -> pulumi.Output[Optional[_builtins.bool]]:
        """
        Disable automated backup for the database instance
        """
        return pulumi.get(self, "disable_backup")

    @_builtins.property
    @pulumi.getter(name="encryptionAtRest")
    def encryption_at_rest(self) -> pulumi.Output[Optional[_builtins.bool]]:
        """
        Enable or disable encryption at rest for the Database Instance.
        """
        return pulumi.get(self, "encryption_at_rest")

    @_builtins.property
    @pulumi.getter(name="endpointIp")
    @_utilities.deprecated("""Please use the private_network or the load_balancer attribute""")
    def endpoint_ip(self) -> pulumi.Output[_builtins.str]:
        """
        (Deprecated) The IP of the Database Instance. Please use the private_network or the load_balancer attribute.
        """
        return pulumi.get(self, "endpoint_ip")

    @_builtins.property
    @pulumi.getter(name="endpointPort")
    @_utilities.deprecated("""Please use the private_network or the load_balancer attribute""")
    def endpoint_port(self) -> pulumi.Output[_builtins.int]:
        """
        (Deprecated) The port of the Database Instance. Please use the private_network or the load_balancer attribute.
        """
        return pulumi.get(self, "endpoint_port")

    @_builtins.property
    @pulumi.getter
    def engine(self) -> pulumi.Output[_builtins.str]:
        """
        Database's engine version name (e.g., 'PostgreSQL-16', 'MySQL-8'). Changing this value triggers a blue/green upgrade using MajorUpgradeWorkflow with automatic endpoint migration
        """
        return pulumi.get(self, "engine")

    @_builtins.property
    @pulumi.getter(name="initSettings")
    def init_settings(self) -> pulumi.Output[Optional[Mapping[str, _builtins.str]]]:
        """
        Map of engine settings to be set at database initialisation.
        """
        return pulumi.get(self, "init_settings")

    @_builtins.property
    @pulumi.getter(name="isHaCluster")
    def is_ha_cluster(self) -> pulumi.Output[Optional[_builtins.bool]]:
        """
        Enable or disable high availability for the Database Instance.

        > **Important** Updates to `is_ha_cluster` will recreate the Database Instance.
        """
        return pulumi.get(self, "is_ha_cluster")

    @_builtins.property
    @pulumi.getter(name="loadBalancer")
    def load_balancer(self) -> pulumi.Output['outputs.DatabaseInstanceLoadBalancer']:
        """
        List of Load Balancer endpoints of the Database Instance.
        """
        return pulumi.get(self, "load_balancer")

    @_builtins.property
    @pulumi.getter(name="logsPolicy")
    def logs_policy(self) -> pulumi.Output['outputs.DatabaseInstanceLogsPolicy']:
        """
        Logs policy configuration
        """
        return pulumi.get(self, "logs_policy")

    @_builtins.property
    @pulumi.getter
    def name(self) -> pulumi.Output[_builtins.str]:
        """
        The name of the Database Instance.
        """
        return pulumi.get(self, "name")

    @_builtins.property
    @pulumi.getter(name="nodeType")
    def node_type(self) -> pulumi.Output[_builtins.str]:
        """
        The type of Database Instance you want to create (e.g. `db-dev-s`).

        > **Important** Updates to `node_type` will upgrade the Database Instance to the desired `node_type` without any
        interruption.

        > **Important** Once your Database Instance reaches `disk_full` status, if you are using `lssd` storage, you should upgrade the `node_type`, and if you are using `bssd` storage, you should increase the volume size before making any other changes to your Database Instance.
        """
        return pulumi.get(self, "node_type")

    @_builtins.property
    @pulumi.getter(name="organizationId")
    def organization_id(self) -> pulumi.Output[_builtins.str]:
        """
        The organization ID the Database Instance is associated with.
        """
        return pulumi.get(self, "organization_id")

    @_builtins.property
    @pulumi.getter
    def password(self) -> pulumi.Output[Optional[_builtins.str]]:
        """
        Password for the first user of the Database Instance. Only one of `password` or `password_wo` should be specified.
        """
        return pulumi.get(self, "password")

    @_builtins.property
    @pulumi.getter(name="passwordWo")
    def password_wo(self) -> pulumi.Output[Optional[_builtins.str]]:
        """
        **NOTE:** This field is write-only and its value will not be updated in state as part of read operations.
        """
        return pulumi.get(self, "password_wo")

    @_builtins.property
    @pulumi.getter(name="passwordWoVersion")
    def password_wo_version(self) -> pulumi.Output[Optional[_builtins.int]]:
        """
        The version of the write-only password. To update the `password_wo`, you must also update the `password_wo_version`.
        """
        return pulumi.get(self, "password_wo_version")

    @_builtins.property
    @pulumi.getter(name="privateIps")
    def private_ips(self) -> pulumi.Output[Sequence['outputs.DatabaseInstancePrivateIp']]:
        """
        The private IPv4 address associated with the resource.
        """
        return pulumi.get(self, "private_ips")

    @_builtins.property
    @pulumi.getter(name="privateNetwork")
    def private_network(self) -> pulumi.Output[Optional['outputs.DatabaseInstancePrivateNetwork']]:
        """
        List of Private Networks endpoints of the Database Instance.
        """
        return pulumi.get(self, "private_network")

    @_builtins.property
    @pulumi.getter(name="projectId")
    def project_id(self) -> pulumi.Output[_builtins.str]:
        """
        `project_id`) The ID of the project the Database
        Instance is associated with.
        """
        return pulumi.get(self, "project_id")

    @_builtins.property
    @pulumi.getter(name="readReplicas")
    def read_replicas(self) -> pulumi.Output[Sequence['outputs.DatabaseInstanceReadReplica']]:
        """
        List of read replicas of the Database Instance.
        """
        return pulumi.get(self, "read_replicas")

    @_builtins.property
    @pulumi.getter
    def region(self) -> pulumi.Output[Optional[_builtins.str]]:
        """
        `region`) The region
        in which the Database Instance should be created.
        """
        return pulumi.get(self, "region")

    @_builtins.property
    @pulumi.getter
    def settings(self) -> pulumi.Output[Mapping[str, _builtins.str]]:
        """
        Map of engine settings to be set on a running instance.
        """
        return pulumi.get(self, "settings")

    @_builtins.property
    @pulumi.getter(name="snapshotId")
    def snapshot_id(self) -> pulumi.Output[Optional[_builtins.str]]:
        """
        The ID of an existing snapshot to restore or create the Database Instance from. Conflicts with the `engine` parameter and backup settings.
        """
        return pulumi.get(self, "snapshot_id")

    @_builtins.property
    @pulumi.getter
    def tags(self) -> pulumi.Output[Optional[Sequence[_builtins.str]]]:
        """
        The tags associated with the Database Instance.
        """
        return pulumi.get(self, "tags")

    @_builtins.property
    @pulumi.getter(name="upgradableVersions")
    def upgradable_versions(self) -> pulumi.Output[Sequence['outputs.DatabaseInstanceUpgradableVersion']]:
        """
        List of available engine versions for upgrade. Each version contains:
        """
        return pulumi.get(self, "upgradable_versions")

    @_builtins.property
    @pulumi.getter(name="userName")
    def user_name(self) -> pulumi.Output[_builtins.str]:
        """
        Identifier for the first user of the Database Instance.

        > **Important** Updates to `user_name` will recreate the Database Instance.
        """
        return pulumi.get(self, "user_name")

    @_builtins.property
    @pulumi.getter(name="volumeSizeInGb")
    def volume_size_in_gb(self) -> pulumi.Output[_builtins.int]:
        """
        Volume size (in GB). Cannot be used when `volume_type` is set to `lssd`.

        > **Important** Once your Database Instance reaches `disk_full` status, you should increase the volume size before making any other change to your Database Instance.
        """
        return pulumi.get(self, "volume_size_in_gb")

    @_builtins.property
    @pulumi.getter(name="volumeType")
    def volume_type(self) -> pulumi.Output[Optional[_builtins.str]]:
        """
        Type of volume where data are stored (`lssd`, `sbs_5k` or `sbs_15k`).
        """
        return pulumi.get(self, "volume_type")

