# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from . import _utilities
from . import outputs
from ._inputs import *

__all__ = ['DatabaseArgs', 'Database']

@pulumi.input_type
class DatabaseArgs:
    def __init__(__self__, *,
                 plan: pulumi.Input[str],
                 type: pulumi.Input[str],
                 zone: pulumi.Input[str],
                 kafka: Optional[pulumi.Input['DatabaseKafkaArgs']] = None,
                 maintenance_dow: Optional[pulumi.Input[str]] = None,
                 maintenance_time: Optional[pulumi.Input[str]] = None,
                 mysql: Optional[pulumi.Input['DatabaseMysqlArgs']] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 opensearch: Optional[pulumi.Input['DatabaseOpensearchArgs']] = None,
                 pg: Optional[pulumi.Input['DatabasePgArgs']] = None,
                 redis: Optional[pulumi.Input['DatabaseRedisArgs']] = None,
                 termination_protection: Optional[pulumi.Input[bool]] = None):
        """
        The set of arguments for constructing a Database resource.
        :param pulumi.Input[str] plan: The plan of the database service (use the [Exoscale CLI][cli] - `exo dbaas type show <TYPE>` - for reference).
        :param pulumi.Input[str] type: The type of the database service (`kafka`, `mysql`, `opensearch`, `pg`, `redis`).
        :param pulumi.Input[str] zone: The Exoscale [Zone][zone] name.
        :param pulumi.Input['DatabaseKafkaArgs'] kafka: *kafka* database service type specific arguments. Structure is documented below.
        :param pulumi.Input[str] maintenance_dow: The day of week to perform the automated database service maintenance (`never`, `monday`, `tuesday`, `wednesday`, `thursday`, `friday`, `saturday`, `sunday`).
        :param pulumi.Input[str] maintenance_time: The time of day to perform the automated database service maintenance (`HH:MM:SS`)
        :param pulumi.Input['DatabaseMysqlArgs'] mysql: *mysql* database service type specific arguments. Structure is documented below.
        :param pulumi.Input[str] name: The name of the database service.
        :param pulumi.Input['DatabaseOpensearchArgs'] opensearch: *opensearch* database service type specific arguments. Structure is documented below.
        :param pulumi.Input['DatabasePgArgs'] pg: *pg* database service type specific arguments. Structure is documented below.
        :param pulumi.Input['DatabaseRedisArgs'] redis: *redis* database service type specific arguments. Structure is documented below.
        :param pulumi.Input[bool] termination_protection: The database service protection boolean flag against termination/power-off.
        """
        pulumi.set(__self__, "plan", plan)
        pulumi.set(__self__, "type", type)
        pulumi.set(__self__, "zone", zone)
        if kafka is not None:
            pulumi.set(__self__, "kafka", kafka)
        if maintenance_dow is not None:
            pulumi.set(__self__, "maintenance_dow", maintenance_dow)
        if maintenance_time is not None:
            pulumi.set(__self__, "maintenance_time", maintenance_time)
        if mysql is not None:
            pulumi.set(__self__, "mysql", mysql)
        if name is not None:
            pulumi.set(__self__, "name", name)
        if opensearch is not None:
            pulumi.set(__self__, "opensearch", opensearch)
        if pg is not None:
            pulumi.set(__self__, "pg", pg)
        if redis is not None:
            pulumi.set(__self__, "redis", redis)
        if termination_protection is not None:
            pulumi.set(__self__, "termination_protection", termination_protection)

    @property
    @pulumi.getter
    def plan(self) -> pulumi.Input[str]:
        """
        The plan of the database service (use the [Exoscale CLI][cli] - `exo dbaas type show <TYPE>` - for reference).
        """
        return pulumi.get(self, "plan")

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

    @property
    @pulumi.getter
    def type(self) -> pulumi.Input[str]:
        """
        The type of the database service (`kafka`, `mysql`, `opensearch`, `pg`, `redis`).
        """
        return pulumi.get(self, "type")

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

    @property
    @pulumi.getter
    def zone(self) -> pulumi.Input[str]:
        """
        The Exoscale [Zone][zone] name.
        """
        return pulumi.get(self, "zone")

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

    @property
    @pulumi.getter
    def kafka(self) -> Optional[pulumi.Input['DatabaseKafkaArgs']]:
        """
        *kafka* database service type specific arguments. Structure is documented below.
        """
        return pulumi.get(self, "kafka")

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

    @property
    @pulumi.getter(name="maintenanceDow")
    def maintenance_dow(self) -> Optional[pulumi.Input[str]]:
        """
        The day of week to perform the automated database service maintenance (`never`, `monday`, `tuesday`, `wednesday`, `thursday`, `friday`, `saturday`, `sunday`).
        """
        return pulumi.get(self, "maintenance_dow")

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

    @property
    @pulumi.getter(name="maintenanceTime")
    def maintenance_time(self) -> Optional[pulumi.Input[str]]:
        """
        The time of day to perform the automated database service maintenance (`HH:MM:SS`)
        """
        return pulumi.get(self, "maintenance_time")

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

    @property
    @pulumi.getter
    def mysql(self) -> Optional[pulumi.Input['DatabaseMysqlArgs']]:
        """
        *mysql* database service type specific arguments. Structure is documented below.
        """
        return pulumi.get(self, "mysql")

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

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

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

    @property
    @pulumi.getter
    def opensearch(self) -> Optional[pulumi.Input['DatabaseOpensearchArgs']]:
        """
        *opensearch* database service type specific arguments. Structure is documented below.
        """
        return pulumi.get(self, "opensearch")

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

    @property
    @pulumi.getter
    def pg(self) -> Optional[pulumi.Input['DatabasePgArgs']]:
        """
        *pg* database service type specific arguments. Structure is documented below.
        """
        return pulumi.get(self, "pg")

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

    @property
    @pulumi.getter
    def redis(self) -> Optional[pulumi.Input['DatabaseRedisArgs']]:
        """
        *redis* database service type specific arguments. Structure is documented below.
        """
        return pulumi.get(self, "redis")

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

    @property
    @pulumi.getter(name="terminationProtection")
    def termination_protection(self) -> Optional[pulumi.Input[bool]]:
        """
        The database service protection boolean flag against termination/power-off.
        """
        return pulumi.get(self, "termination_protection")

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


@pulumi.input_type
class _DatabaseState:
    def __init__(__self__, *,
                 ca_certificate: Optional[pulumi.Input[str]] = None,
                 created_at: Optional[pulumi.Input[str]] = None,
                 disk_size: Optional[pulumi.Input[int]] = None,
                 kafka: Optional[pulumi.Input['DatabaseKafkaArgs']] = None,
                 maintenance_dow: Optional[pulumi.Input[str]] = None,
                 maintenance_time: Optional[pulumi.Input[str]] = None,
                 mysql: Optional[pulumi.Input['DatabaseMysqlArgs']] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 node_cpus: Optional[pulumi.Input[int]] = None,
                 node_memory: Optional[pulumi.Input[int]] = None,
                 nodes: Optional[pulumi.Input[int]] = None,
                 opensearch: Optional[pulumi.Input['DatabaseOpensearchArgs']] = None,
                 pg: Optional[pulumi.Input['DatabasePgArgs']] = None,
                 plan: Optional[pulumi.Input[str]] = None,
                 redis: Optional[pulumi.Input['DatabaseRedisArgs']] = None,
                 state: Optional[pulumi.Input[str]] = None,
                 termination_protection: Optional[pulumi.Input[bool]] = None,
                 type: Optional[pulumi.Input[str]] = None,
                 updated_at: Optional[pulumi.Input[str]] = None,
                 uri: Optional[pulumi.Input[str]] = None,
                 zone: Optional[pulumi.Input[str]] = None):
        """
        Input properties used for looking up and filtering Database resources.
        :param pulumi.Input[str] ca_certificate: CA Certificate required to reach a DBaaS service through a TLS-protected connection.
        :param pulumi.Input[str] created_at: The creation date of the database service.
        :param pulumi.Input[int] disk_size: The disk size of the database service.
        :param pulumi.Input['DatabaseKafkaArgs'] kafka: *kafka* database service type specific arguments. Structure is documented below.
        :param pulumi.Input[str] maintenance_dow: The day of week to perform the automated database service maintenance (`never`, `monday`, `tuesday`, `wednesday`, `thursday`, `friday`, `saturday`, `sunday`).
        :param pulumi.Input[str] maintenance_time: The time of day to perform the automated database service maintenance (`HH:MM:SS`)
        :param pulumi.Input['DatabaseMysqlArgs'] mysql: *mysql* database service type specific arguments. Structure is documented below.
        :param pulumi.Input[str] name: The name of the database service.
        :param pulumi.Input[int] node_cpus: The number of CPUs of the database service.
        :param pulumi.Input[int] node_memory: The amount of memory of the database service.
        :param pulumi.Input[int] nodes: The number of nodes of the database service.
        :param pulumi.Input['DatabaseOpensearchArgs'] opensearch: *opensearch* database service type specific arguments. Structure is documented below.
        :param pulumi.Input['DatabasePgArgs'] pg: *pg* database service type specific arguments. Structure is documented below.
        :param pulumi.Input[str] plan: The plan of the database service (use the [Exoscale CLI][cli] - `exo dbaas type show <TYPE>` - for reference).
        :param pulumi.Input['DatabaseRedisArgs'] redis: *redis* database service type specific arguments. Structure is documented below.
        :param pulumi.Input[str] state: The current state of the database service.
        :param pulumi.Input[bool] termination_protection: The database service protection boolean flag against termination/power-off.
        :param pulumi.Input[str] type: The type of the database service (`kafka`, `mysql`, `opensearch`, `pg`, `redis`).
        :param pulumi.Input[str] updated_at: The date of the latest database service update.
        :param pulumi.Input[str] uri: The database service connection URI.
        :param pulumi.Input[str] zone: The Exoscale [Zone][zone] name.
        """
        if ca_certificate is not None:
            pulumi.set(__self__, "ca_certificate", ca_certificate)
        if created_at is not None:
            pulumi.set(__self__, "created_at", created_at)
        if disk_size is not None:
            pulumi.set(__self__, "disk_size", disk_size)
        if kafka is not None:
            pulumi.set(__self__, "kafka", kafka)
        if maintenance_dow is not None:
            pulumi.set(__self__, "maintenance_dow", maintenance_dow)
        if maintenance_time is not None:
            pulumi.set(__self__, "maintenance_time", maintenance_time)
        if mysql is not None:
            pulumi.set(__self__, "mysql", mysql)
        if name is not None:
            pulumi.set(__self__, "name", name)
        if node_cpus is not None:
            pulumi.set(__self__, "node_cpus", node_cpus)
        if node_memory is not None:
            pulumi.set(__self__, "node_memory", node_memory)
        if nodes is not None:
            pulumi.set(__self__, "nodes", nodes)
        if opensearch is not None:
            pulumi.set(__self__, "opensearch", opensearch)
        if pg is not None:
            pulumi.set(__self__, "pg", pg)
        if plan is not None:
            pulumi.set(__self__, "plan", plan)
        if redis is not None:
            pulumi.set(__self__, "redis", redis)
        if state is not None:
            pulumi.set(__self__, "state", state)
        if termination_protection is not None:
            pulumi.set(__self__, "termination_protection", termination_protection)
        if type is not None:
            pulumi.set(__self__, "type", type)
        if updated_at is not None:
            pulumi.set(__self__, "updated_at", updated_at)
        if uri is not None:
            pulumi.set(__self__, "uri", uri)
        if zone is not None:
            pulumi.set(__self__, "zone", zone)

    @property
    @pulumi.getter(name="caCertificate")
    def ca_certificate(self) -> Optional[pulumi.Input[str]]:
        """
        CA Certificate required to reach a DBaaS service through a TLS-protected connection.
        """
        return pulumi.get(self, "ca_certificate")

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

    @property
    @pulumi.getter(name="createdAt")
    def created_at(self) -> Optional[pulumi.Input[str]]:
        """
        The creation date of the database service.
        """
        return pulumi.get(self, "created_at")

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

    @property
    @pulumi.getter(name="diskSize")
    def disk_size(self) -> Optional[pulumi.Input[int]]:
        """
        The disk size of the database service.
        """
        return pulumi.get(self, "disk_size")

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

    @property
    @pulumi.getter
    def kafka(self) -> Optional[pulumi.Input['DatabaseKafkaArgs']]:
        """
        *kafka* database service type specific arguments. Structure is documented below.
        """
        return pulumi.get(self, "kafka")

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

    @property
    @pulumi.getter(name="maintenanceDow")
    def maintenance_dow(self) -> Optional[pulumi.Input[str]]:
        """
        The day of week to perform the automated database service maintenance (`never`, `monday`, `tuesday`, `wednesday`, `thursday`, `friday`, `saturday`, `sunday`).
        """
        return pulumi.get(self, "maintenance_dow")

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

    @property
    @pulumi.getter(name="maintenanceTime")
    def maintenance_time(self) -> Optional[pulumi.Input[str]]:
        """
        The time of day to perform the automated database service maintenance (`HH:MM:SS`)
        """
        return pulumi.get(self, "maintenance_time")

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

    @property
    @pulumi.getter
    def mysql(self) -> Optional[pulumi.Input['DatabaseMysqlArgs']]:
        """
        *mysql* database service type specific arguments. Structure is documented below.
        """
        return pulumi.get(self, "mysql")

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

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

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

    @property
    @pulumi.getter(name="nodeCpus")
    def node_cpus(self) -> Optional[pulumi.Input[int]]:
        """
        The number of CPUs of the database service.
        """
        return pulumi.get(self, "node_cpus")

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

    @property
    @pulumi.getter(name="nodeMemory")
    def node_memory(self) -> Optional[pulumi.Input[int]]:
        """
        The amount of memory of the database service.
        """
        return pulumi.get(self, "node_memory")

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

    @property
    @pulumi.getter
    def nodes(self) -> Optional[pulumi.Input[int]]:
        """
        The number of nodes of the database service.
        """
        return pulumi.get(self, "nodes")

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

    @property
    @pulumi.getter
    def opensearch(self) -> Optional[pulumi.Input['DatabaseOpensearchArgs']]:
        """
        *opensearch* database service type specific arguments. Structure is documented below.
        """
        return pulumi.get(self, "opensearch")

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

    @property
    @pulumi.getter
    def pg(self) -> Optional[pulumi.Input['DatabasePgArgs']]:
        """
        *pg* database service type specific arguments. Structure is documented below.
        """
        return pulumi.get(self, "pg")

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

    @property
    @pulumi.getter
    def plan(self) -> Optional[pulumi.Input[str]]:
        """
        The plan of the database service (use the [Exoscale CLI][cli] - `exo dbaas type show <TYPE>` - for reference).
        """
        return pulumi.get(self, "plan")

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

    @property
    @pulumi.getter
    def redis(self) -> Optional[pulumi.Input['DatabaseRedisArgs']]:
        """
        *redis* database service type specific arguments. Structure is documented below.
        """
        return pulumi.get(self, "redis")

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

    @property
    @pulumi.getter
    def state(self) -> Optional[pulumi.Input[str]]:
        """
        The current state of the database service.
        """
        return pulumi.get(self, "state")

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

    @property
    @pulumi.getter(name="terminationProtection")
    def termination_protection(self) -> Optional[pulumi.Input[bool]]:
        """
        The database service protection boolean flag against termination/power-off.
        """
        return pulumi.get(self, "termination_protection")

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

    @property
    @pulumi.getter
    def type(self) -> Optional[pulumi.Input[str]]:
        """
        The type of the database service (`kafka`, `mysql`, `opensearch`, `pg`, `redis`).
        """
        return pulumi.get(self, "type")

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

    @property
    @pulumi.getter(name="updatedAt")
    def updated_at(self) -> Optional[pulumi.Input[str]]:
        """
        The date of the latest database service update.
        """
        return pulumi.get(self, "updated_at")

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

    @property
    @pulumi.getter
    def uri(self) -> Optional[pulumi.Input[str]]:
        """
        The database service connection URI.
        """
        return pulumi.get(self, "uri")

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

    @property
    @pulumi.getter
    def zone(self) -> Optional[pulumi.Input[str]]:
        """
        The Exoscale [Zone][zone] name.
        """
        return pulumi.get(self, "zone")

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


class Database(pulumi.CustomResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 kafka: Optional[pulumi.Input[pulumi.InputType['DatabaseKafkaArgs']]] = None,
                 maintenance_dow: Optional[pulumi.Input[str]] = None,
                 maintenance_time: Optional[pulumi.Input[str]] = None,
                 mysql: Optional[pulumi.Input[pulumi.InputType['DatabaseMysqlArgs']]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 opensearch: Optional[pulumi.Input[pulumi.InputType['DatabaseOpensearchArgs']]] = None,
                 pg: Optional[pulumi.Input[pulumi.InputType['DatabasePgArgs']]] = None,
                 plan: Optional[pulumi.Input[str]] = None,
                 redis: Optional[pulumi.Input[pulumi.InputType['DatabaseRedisArgs']]] = None,
                 termination_protection: Optional[pulumi.Input[bool]] = None,
                 type: Optional[pulumi.Input[str]] = None,
                 zone: Optional[pulumi.Input[str]] = None,
                 __props__=None):
        """
        ## Import

        An existing database service may be imported by `<name>@<zone>`console

        ```sh
         $ pulumi import exoscale:index/database:Database \\
        ```

         exoscale_database.my_database \\

         my-database@ch-gva-2

        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[pulumi.InputType['DatabaseKafkaArgs']] kafka: *kafka* database service type specific arguments. Structure is documented below.
        :param pulumi.Input[str] maintenance_dow: The day of week to perform the automated database service maintenance (`never`, `monday`, `tuesday`, `wednesday`, `thursday`, `friday`, `saturday`, `sunday`).
        :param pulumi.Input[str] maintenance_time: The time of day to perform the automated database service maintenance (`HH:MM:SS`)
        :param pulumi.Input[pulumi.InputType['DatabaseMysqlArgs']] mysql: *mysql* database service type specific arguments. Structure is documented below.
        :param pulumi.Input[str] name: The name of the database service.
        :param pulumi.Input[pulumi.InputType['DatabaseOpensearchArgs']] opensearch: *opensearch* database service type specific arguments. Structure is documented below.
        :param pulumi.Input[pulumi.InputType['DatabasePgArgs']] pg: *pg* database service type specific arguments. Structure is documented below.
        :param pulumi.Input[str] plan: The plan of the database service (use the [Exoscale CLI][cli] - `exo dbaas type show <TYPE>` - for reference).
        :param pulumi.Input[pulumi.InputType['DatabaseRedisArgs']] redis: *redis* database service type specific arguments. Structure is documented below.
        :param pulumi.Input[bool] termination_protection: The database service protection boolean flag against termination/power-off.
        :param pulumi.Input[str] type: The type of the database service (`kafka`, `mysql`, `opensearch`, `pg`, `redis`).
        :param pulumi.Input[str] zone: The Exoscale [Zone][zone] name.
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: DatabaseArgs,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        ## Import

        An existing database service may be imported by `<name>@<zone>`console

        ```sh
         $ pulumi import exoscale:index/database:Database \\
        ```

         exoscale_database.my_database \\

         my-database@ch-gva-2

        :param str resource_name: The name of the resource.
        :param DatabaseArgs 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(DatabaseArgs, 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,
                 kafka: Optional[pulumi.Input[pulumi.InputType['DatabaseKafkaArgs']]] = None,
                 maintenance_dow: Optional[pulumi.Input[str]] = None,
                 maintenance_time: Optional[pulumi.Input[str]] = None,
                 mysql: Optional[pulumi.Input[pulumi.InputType['DatabaseMysqlArgs']]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 opensearch: Optional[pulumi.Input[pulumi.InputType['DatabaseOpensearchArgs']]] = None,
                 pg: Optional[pulumi.Input[pulumi.InputType['DatabasePgArgs']]] = None,
                 plan: Optional[pulumi.Input[str]] = None,
                 redis: Optional[pulumi.Input[pulumi.InputType['DatabaseRedisArgs']]] = None,
                 termination_protection: Optional[pulumi.Input[bool]] = None,
                 type: Optional[pulumi.Input[str]] = None,
                 zone: Optional[pulumi.Input[str]] = None,
                 __props__=None):
        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__ = DatabaseArgs.__new__(DatabaseArgs)

            __props__.__dict__["kafka"] = kafka
            __props__.__dict__["maintenance_dow"] = maintenance_dow
            __props__.__dict__["maintenance_time"] = maintenance_time
            __props__.__dict__["mysql"] = mysql
            __props__.__dict__["name"] = name
            __props__.__dict__["opensearch"] = opensearch
            __props__.__dict__["pg"] = pg
            if plan is None and not opts.urn:
                raise TypeError("Missing required property 'plan'")
            __props__.__dict__["plan"] = plan
            __props__.__dict__["redis"] = redis
            __props__.__dict__["termination_protection"] = termination_protection
            if type is None and not opts.urn:
                raise TypeError("Missing required property 'type'")
            __props__.__dict__["type"] = type
            if zone is None and not opts.urn:
                raise TypeError("Missing required property 'zone'")
            __props__.__dict__["zone"] = zone
            __props__.__dict__["ca_certificate"] = None
            __props__.__dict__["created_at"] = None
            __props__.__dict__["disk_size"] = None
            __props__.__dict__["node_cpus"] = None
            __props__.__dict__["node_memory"] = None
            __props__.__dict__["nodes"] = None
            __props__.__dict__["state"] = None
            __props__.__dict__["updated_at"] = None
            __props__.__dict__["uri"] = None
        secret_opts = pulumi.ResourceOptions(additional_secret_outputs=["uri"])
        opts = pulumi.ResourceOptions.merge(opts, secret_opts)
        super(Database, __self__).__init__(
            'exoscale:index/database:Database',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            ca_certificate: Optional[pulumi.Input[str]] = None,
            created_at: Optional[pulumi.Input[str]] = None,
            disk_size: Optional[pulumi.Input[int]] = None,
            kafka: Optional[pulumi.Input[pulumi.InputType['DatabaseKafkaArgs']]] = None,
            maintenance_dow: Optional[pulumi.Input[str]] = None,
            maintenance_time: Optional[pulumi.Input[str]] = None,
            mysql: Optional[pulumi.Input[pulumi.InputType['DatabaseMysqlArgs']]] = None,
            name: Optional[pulumi.Input[str]] = None,
            node_cpus: Optional[pulumi.Input[int]] = None,
            node_memory: Optional[pulumi.Input[int]] = None,
            nodes: Optional[pulumi.Input[int]] = None,
            opensearch: Optional[pulumi.Input[pulumi.InputType['DatabaseOpensearchArgs']]] = None,
            pg: Optional[pulumi.Input[pulumi.InputType['DatabasePgArgs']]] = None,
            plan: Optional[pulumi.Input[str]] = None,
            redis: Optional[pulumi.Input[pulumi.InputType['DatabaseRedisArgs']]] = None,
            state: Optional[pulumi.Input[str]] = None,
            termination_protection: Optional[pulumi.Input[bool]] = None,
            type: Optional[pulumi.Input[str]] = None,
            updated_at: Optional[pulumi.Input[str]] = None,
            uri: Optional[pulumi.Input[str]] = None,
            zone: Optional[pulumi.Input[str]] = None) -> 'Database':
        """
        Get an existing Database 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[str] ca_certificate: CA Certificate required to reach a DBaaS service through a TLS-protected connection.
        :param pulumi.Input[str] created_at: The creation date of the database service.
        :param pulumi.Input[int] disk_size: The disk size of the database service.
        :param pulumi.Input[pulumi.InputType['DatabaseKafkaArgs']] kafka: *kafka* database service type specific arguments. Structure is documented below.
        :param pulumi.Input[str] maintenance_dow: The day of week to perform the automated database service maintenance (`never`, `monday`, `tuesday`, `wednesday`, `thursday`, `friday`, `saturday`, `sunday`).
        :param pulumi.Input[str] maintenance_time: The time of day to perform the automated database service maintenance (`HH:MM:SS`)
        :param pulumi.Input[pulumi.InputType['DatabaseMysqlArgs']] mysql: *mysql* database service type specific arguments. Structure is documented below.
        :param pulumi.Input[str] name: The name of the database service.
        :param pulumi.Input[int] node_cpus: The number of CPUs of the database service.
        :param pulumi.Input[int] node_memory: The amount of memory of the database service.
        :param pulumi.Input[int] nodes: The number of nodes of the database service.
        :param pulumi.Input[pulumi.InputType['DatabaseOpensearchArgs']] opensearch: *opensearch* database service type specific arguments. Structure is documented below.
        :param pulumi.Input[pulumi.InputType['DatabasePgArgs']] pg: *pg* database service type specific arguments. Structure is documented below.
        :param pulumi.Input[str] plan: The plan of the database service (use the [Exoscale CLI][cli] - `exo dbaas type show <TYPE>` - for reference).
        :param pulumi.Input[pulumi.InputType['DatabaseRedisArgs']] redis: *redis* database service type specific arguments. Structure is documented below.
        :param pulumi.Input[str] state: The current state of the database service.
        :param pulumi.Input[bool] termination_protection: The database service protection boolean flag against termination/power-off.
        :param pulumi.Input[str] type: The type of the database service (`kafka`, `mysql`, `opensearch`, `pg`, `redis`).
        :param pulumi.Input[str] updated_at: The date of the latest database service update.
        :param pulumi.Input[str] uri: The database service connection URI.
        :param pulumi.Input[str] zone: The Exoscale [Zone][zone] name.
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = _DatabaseState.__new__(_DatabaseState)

        __props__.__dict__["ca_certificate"] = ca_certificate
        __props__.__dict__["created_at"] = created_at
        __props__.__dict__["disk_size"] = disk_size
        __props__.__dict__["kafka"] = kafka
        __props__.__dict__["maintenance_dow"] = maintenance_dow
        __props__.__dict__["maintenance_time"] = maintenance_time
        __props__.__dict__["mysql"] = mysql
        __props__.__dict__["name"] = name
        __props__.__dict__["node_cpus"] = node_cpus
        __props__.__dict__["node_memory"] = node_memory
        __props__.__dict__["nodes"] = nodes
        __props__.__dict__["opensearch"] = opensearch
        __props__.__dict__["pg"] = pg
        __props__.__dict__["plan"] = plan
        __props__.__dict__["redis"] = redis
        __props__.__dict__["state"] = state
        __props__.__dict__["termination_protection"] = termination_protection
        __props__.__dict__["type"] = type
        __props__.__dict__["updated_at"] = updated_at
        __props__.__dict__["uri"] = uri
        __props__.__dict__["zone"] = zone
        return Database(resource_name, opts=opts, __props__=__props__)

    @property
    @pulumi.getter(name="caCertificate")
    def ca_certificate(self) -> pulumi.Output[str]:
        """
        CA Certificate required to reach a DBaaS service through a TLS-protected connection.
        """
        return pulumi.get(self, "ca_certificate")

    @property
    @pulumi.getter(name="createdAt")
    def created_at(self) -> pulumi.Output[str]:
        """
        The creation date of the database service.
        """
        return pulumi.get(self, "created_at")

    @property
    @pulumi.getter(name="diskSize")
    def disk_size(self) -> pulumi.Output[int]:
        """
        The disk size of the database service.
        """
        return pulumi.get(self, "disk_size")

    @property
    @pulumi.getter
    def kafka(self) -> pulumi.Output[Optional['outputs.DatabaseKafka']]:
        """
        *kafka* database service type specific arguments. Structure is documented below.
        """
        return pulumi.get(self, "kafka")

    @property
    @pulumi.getter(name="maintenanceDow")
    def maintenance_dow(self) -> pulumi.Output[str]:
        """
        The day of week to perform the automated database service maintenance (`never`, `monday`, `tuesday`, `wednesday`, `thursday`, `friday`, `saturday`, `sunday`).
        """
        return pulumi.get(self, "maintenance_dow")

    @property
    @pulumi.getter(name="maintenanceTime")
    def maintenance_time(self) -> pulumi.Output[str]:
        """
        The time of day to perform the automated database service maintenance (`HH:MM:SS`)
        """
        return pulumi.get(self, "maintenance_time")

    @property
    @pulumi.getter
    def mysql(self) -> pulumi.Output[Optional['outputs.DatabaseMysql']]:
        """
        *mysql* database service type specific arguments. Structure is documented below.
        """
        return pulumi.get(self, "mysql")

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

    @property
    @pulumi.getter(name="nodeCpus")
    def node_cpus(self) -> pulumi.Output[int]:
        """
        The number of CPUs of the database service.
        """
        return pulumi.get(self, "node_cpus")

    @property
    @pulumi.getter(name="nodeMemory")
    def node_memory(self) -> pulumi.Output[int]:
        """
        The amount of memory of the database service.
        """
        return pulumi.get(self, "node_memory")

    @property
    @pulumi.getter
    def nodes(self) -> pulumi.Output[int]:
        """
        The number of nodes of the database service.
        """
        return pulumi.get(self, "nodes")

    @property
    @pulumi.getter
    def opensearch(self) -> pulumi.Output[Optional['outputs.DatabaseOpensearch']]:
        """
        *opensearch* database service type specific arguments. Structure is documented below.
        """
        return pulumi.get(self, "opensearch")

    @property
    @pulumi.getter
    def pg(self) -> pulumi.Output[Optional['outputs.DatabasePg']]:
        """
        *pg* database service type specific arguments. Structure is documented below.
        """
        return pulumi.get(self, "pg")

    @property
    @pulumi.getter
    def plan(self) -> pulumi.Output[str]:
        """
        The plan of the database service (use the [Exoscale CLI][cli] - `exo dbaas type show <TYPE>` - for reference).
        """
        return pulumi.get(self, "plan")

    @property
    @pulumi.getter
    def redis(self) -> pulumi.Output[Optional['outputs.DatabaseRedis']]:
        """
        *redis* database service type specific arguments. Structure is documented below.
        """
        return pulumi.get(self, "redis")

    @property
    @pulumi.getter
    def state(self) -> pulumi.Output[str]:
        """
        The current state of the database service.
        """
        return pulumi.get(self, "state")

    @property
    @pulumi.getter(name="terminationProtection")
    def termination_protection(self) -> pulumi.Output[Optional[bool]]:
        """
        The database service protection boolean flag against termination/power-off.
        """
        return pulumi.get(self, "termination_protection")

    @property
    @pulumi.getter
    def type(self) -> pulumi.Output[str]:
        """
        The type of the database service (`kafka`, `mysql`, `opensearch`, `pg`, `redis`).
        """
        return pulumi.get(self, "type")

    @property
    @pulumi.getter(name="updatedAt")
    def updated_at(self) -> pulumi.Output[str]:
        """
        The date of the latest database service update.
        """
        return pulumi.get(self, "updated_at")

    @property
    @pulumi.getter
    def uri(self) -> pulumi.Output[str]:
        """
        The database service connection URI.
        """
        return pulumi.get(self, "uri")

    @property
    @pulumi.getter
    def zone(self) -> pulumi.Output[str]:
        """
        The Exoscale [Zone][zone] name.
        """
        return pulumi.get(self, "zone")

