text: # 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 warnings
  import pulumi
  import pulumi.runtime
  from typing import Any, Mapping, Optional, Sequence, Union, overload
  from .. import _utilities
  from . import outputs
  
  __all__ = [
      'GetDatabaseResult',
      'AwaitableGetDatabaseResult',
      'get_database',
  ]
  
  @pulumi.output_type
  class GetDatabaseResult:
      """
      A collection of values returned by getDatabase.
      """
      def __init__(__self__, character_set=None, compartment_id=None, connection_strings=None, database=None, database_id=None, database_software_image_id=None, db_backup_config=None, db_home_id=None, db_name=None, db_system_id=None, db_unique_name=None, db_version=None, db_workload=None, defined_tags=None, freeform_tags=None, id=None, kms_key_id=None, kms_key_migration=None, kms_key_rotation=None, kms_key_version_id=None, last_backup_timestamp=None, lifecycle_details=None, ncharacter_set=None, pdb_name=None, source=None, source_database_point_in_time_recovery_timestamp=None, state=None, time_created=None, vm_cluster_id=None):
          if character_set and not isinstance(character_set, str):
              raise TypeError("Expected argument 'character_set' to be a str")
          pulumi.set(__self__, "character_set", character_set)
          if compartment_id and not isinstance(compartment_id, str):
              raise TypeError("Expected argument 'compartment_id' to be a str")
          pulumi.set(__self__, "compartment_id", compartment_id)
          if connection_strings and not isinstance(connection_strings, dict):
              raise TypeError("Expected argument 'connection_strings' to be a dict")
          pulumi.set(__self__, "connection_strings", connection_strings)
          if database and not isinstance(database, dict):
              raise TypeError("Expected argument 'database' to be a dict")
          pulumi.set(__self__, "database", database)
          if database_id and not isinstance(database_id, str):
              raise TypeError("Expected argument 'database_id' to be a str")
          pulumi.set(__self__, "database_id", database_id)
          if database_software_image_id and not isinstance(database_software_image_id, str):
              raise TypeError("Expected argument 'database_software_image_id' to be a str")
          pulumi.set(__self__, "database_software_image_id", database_software_image_id)
          if db_backup_config and not isinstance(db_backup_config, dict):
              raise TypeError("Expected argument 'db_backup_config' to be a dict")
          pulumi.set(__self__, "db_backup_config", db_backup_config)
          if db_home_id and not isinstance(db_home_id, str):
              raise TypeError("Expected argument 'db_home_id' to be a str")
          pulumi.set(__self__, "db_home_id", db_home_id)
          if db_name and not isinstance(db_name, str):
              raise TypeError("Expected argument 'db_name' to be a str")
          pulumi.set(__self__, "db_name", db_name)
          if db_system_id and not isinstance(db_system_id, str):
              raise TypeError("Expected argument 'db_system_id' to be a str")
          pulumi.set(__self__, "db_system_id", db_system_id)
          if db_unique_name and not isinstance(db_unique_name, str):
              raise TypeError("Expected argument 'db_unique_name' to be a str")
          pulumi.set(__self__, "db_unique_name", db_unique_name)
          if db_version and not isinstance(db_version, str):
              raise TypeError("Expected argument 'db_version' to be a str")
          pulumi.set(__self__, "db_version", db_version)
          if db_workload and not isinstance(db_workload, str):
              raise TypeError("Expected argument 'db_workload' to be a str")
          pulumi.set(__self__, "db_workload", db_workload)
          if defined_tags and not isinstance(defined_tags, dict):
              raise TypeError("Expected argument 'defined_tags' to be a dict")
          pulumi.set(__self__, "defined_tags", defined_tags)
          if freeform_tags and not isinstance(freeform_tags, dict):
              raise TypeError("Expected argument 'freeform_tags' to be a dict")
          pulumi.set(__self__, "freeform_tags", freeform_tags)
          if id and not isinstance(id, str):
              raise TypeError("Expected argument 'id' to be a str")
          pulumi.set(__self__, "id", id)
          if kms_key_id and not isinstance(kms_key_id, str):
              raise TypeError("Expected argument 'kms_key_id' to be a str")
          pulumi.set(__self__, "kms_key_id", kms_key_id)
          if kms_key_migration and not isinstance(kms_key_migration, bool):
              raise TypeError("Expected argument 'kms_key_migration' to be a bool")
          pulumi.set(__self__, "kms_key_migration", kms_key_migration)
          if kms_key_rotation and not isinstance(kms_key_rotation, int):
              raise TypeError("Expected argument 'kms_key_rotation' to be a int")
          pulumi.set(__self__, "kms_key_rotation", kms_key_rotation)
          if kms_key_version_id and not isinstance(kms_key_version_id, str):
              raise TypeError("Expected argument 'kms_key_version_id' to be a str")
          pulumi.set(__self__, "kms_key_version_id", kms_key_version_id)
          if last_backup_timestamp and not isinstance(last_backup_timestamp, str):
              raise TypeError("Expected argument 'last_backup_timestamp' to be a str")
          pulumi.set(__self__, "last_backup_timestamp", last_backup_timestamp)
          if lifecycle_details and not isinstance(lifecycle_details, str):
              raise TypeError("Expected argument 'lifecycle_details' to be a str")
          pulumi.set(__self__, "lifecycle_details", lifecycle_details)
          if ncharacter_set and not isinstance(ncharacter_set, str):
              raise TypeError("Expected argument 'ncharacter_set' to be a str")
          pulumi.set(__self__, "ncharacter_set", ncharacter_set)
          if pdb_name and not isinstance(pdb_name, str):
              raise TypeError("Expected argument 'pdb_name' to be a str")
          pulumi.set(__self__, "pdb_name", pdb_name)
          if source and not isinstance(source, str):
              raise TypeError("Expected argument 'source' to be a str")
          pulumi.set(__self__, "source", source)
          if source_database_point_in_time_recovery_timestamp and not isinstance(source_database_point_in_time_recovery_timestamp, str):
              raise TypeError("Expected argument 'source_database_point_in_time_recovery_timestamp' to be a str")
          pulumi.set(__self__, "source_database_point_in_time_recovery_timestamp", source_database_point_in_time_recovery_timestamp)
          if state and not isinstance(state, str):
              raise TypeError("Expected argument 'state' to be a str")
          pulumi.set(__self__, "state", state)
          if time_created and not isinstance(time_created, str):
              raise TypeError("Expected argument 'time_created' to be a str")
          pulumi.set(__self__, "time_created", time_created)
          if vm_cluster_id and not isinstance(vm_cluster_id, str):
              raise TypeError("Expected argument 'vm_cluster_id' to be a str")
          pulumi.set(__self__, "vm_cluster_id", vm_cluster_id)
  
      @property
      @pulumi.getter(name="characterSet")
      def character_set(self) -> str:
          """
          The character set for the database.
          """
          return pulumi.get(self, "character_set")
  
      @property
      @pulumi.getter(name="compartmentId")
      def compartment_id(self) -> str:
          """
          The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment.
          """
          return pulumi.get(self, "compartment_id")
  
      @property
      @pulumi.getter(name="connectionStrings")
      def connection_strings(self) -> 'outputs.GetDatabaseConnectionStringsResult':
          """
          The Connection strings used to connect to the Oracle Database.
          """
          return pulumi.get(self, "connection_strings")
  
      @property
      @pulumi.getter
      def database(self) -> 'outputs.GetDatabaseDatabaseResult':
          return pulumi.get(self, "database")
  
      @property
      @pulumi.getter(name="databaseId")
      def database_id(self) -> str:
          return pulumi.get(self, "database_id")
  
      @property
      @pulumi.getter(name="databaseSoftwareImageId")
      def database_software_image_id(self) -> str:
          """
          The database software image [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm)
          """
          return pulumi.get(self, "database_software_image_id")
  
      @property
      @pulumi.getter(name="dbBackupConfig")
      def db_backup_config(self) -> 'outputs.GetDatabaseDbBackupConfigResult':
          """
          Backup Options To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, talk to an administrator. If you're an administrator who needs to write policies to give users access, see [Getting Started with Policies](https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/policygetstarted.htm).
          """
          return pulumi.get(self, "db_backup_config")
  
      @property
      @pulumi.getter(name="dbHomeId")
      def db_home_id(self) -> str:
          """
          The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Database Home.
          """
          return pulumi.get(self, "db_home_id")
  
      @property
      @pulumi.getter(name="dbName")
      def db_name(self) -> str:
          """
          The database name.
          """
          return pulumi.get(self, "db_name")
  
      @property
      @pulumi.getter(name="dbSystemId")
      def db_system_id(self) -> str:
          """
          The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the DB system.
          """
          return pulumi.get(self, "db_system_id")
  
      @property
      @pulumi.getter(name="dbUniqueName")
      def db_unique_name(self) -> str:
          """
          A system-generated name for the database to ensure uniqueness within an Oracle Data Guard group (a primary database and its standby databases). The unique name cannot be changed.
          """
          return pulumi.get(self, "db_unique_name")
  
      @property
      @pulumi.getter(name="dbVersion")
      def db_version(self) -> str:
          return pulumi.get(self, "db_version")
  
      @property
      @pulumi.getter(name="dbWorkload")
      def db_workload(self) -> str:
          """
          The database workload type.
          """
          return pulumi.get(self, "db_workload")
  
      @property
      @pulumi.getter(name="definedTags")
      def defined_tags(self) -> Mapping[str, Any]:
          """
          Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm).
          """
          return pulumi.get(self, "defined_tags")
  
      @property
      @pulumi.getter(name="freeformTags")
      def freeform_tags(self) -> Mapping[str, Any]:
          """
          Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm).  Example: `{"Department": "Finance"}`
          """
          return pulumi.get(self, "freeform_tags")
  
      @property
      @pulumi.getter
      def id(self) -> str:
          """
          The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database.
          """
          return pulumi.get(self, "id")
  
      @property
      @pulumi.getter(name="kmsKeyId")
      def kms_key_id(self) -> str:
          """
          The OCID of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations.
          """
          return pulumi.get(self, "kms_key_id")
  
      @property
      @pulumi.getter(name="kmsKeyMigration")
      def kms_key_migration(self) -> bool:
          return pulumi.get(self, "kms_key_migration")
  
      @property
      @pulumi.getter(name="kmsKeyRotation")
      def kms_key_rotation(self) -> int:
          return pulumi.get(self, "kms_key_rotation")
  
      @property
      @pulumi.getter(name="kmsKeyVersionId")
      def kms_key_version_id(self) -> str:
          return pulumi.get(self, "kms_key_version_id")
  
      @property
      @pulumi.getter(name="lastBackupTimestamp")
      def last_backup_timestamp(self) -> str:
          """
          The date and time when the latest database backup was created.
          """
          return pulumi.get(self, "last_backup_timestamp")
  
      @property
      @pulumi.getter(name="lifecycleDetails")
      def lifecycle_details(self) -> str:
          """
          Additional information about the current lifecycle state.
          """
          return pulumi.get(self, "lifecycle_details")
  
      @property
      @pulumi.getter(name="ncharacterSet")
      def ncharacter_set(self) -> str:
          """
          The national character set for the database.
          """
          return pulumi.get(self, "ncharacter_set")
  
      @property
      @pulumi.getter(name="pdbName")
      def pdb_name(self) -> str:
          """
          The name of the pluggable database. The name must begin with an alphabetic character and can contain a maximum of thirty alphanumeric characters. Special characters are not permitted. Pluggable database should not be same as database name.
          """
          return pulumi.get(self, "pdb_name")
  
      @property
      @pulumi.getter
      def source(self) -> str:
          return pulumi.get(self, "source")
  
      @property
      @pulumi.getter(name="sourceDatabasePointInTimeRecoveryTimestamp")
      def source_database_point_in_time_recovery_timestamp(self) -> str:
          """
          Point in time recovery timeStamp of the source database at which cloned database system is cloned from the source database system, as described in [RFC 3339](https://tools.ietf.org/rfc/rfc3339)
          """
          return pulumi.get(self, "source_database_point_in_time_recovery_timestamp")
  
      @property
      @pulumi.getter
      def state(self) -> str:
          """
          The current state of the database.
          """
          return pulumi.get(self, "state")
  
      @property
      @pulumi.getter(name="timeCreated")
      def time_created(self) -> str:
          """
          The date and time the database was created.
          """
          return pulumi.get(self, "time_created")
  
      @property
      @pulumi.getter(name="vmClusterId")
      def vm_cluster_id(self) -> str:
          """
          The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VM cluster.
          """
          return pulumi.get(self, "vm_cluster_id")
  
  
  class AwaitableGetDatabaseResult(GetDatabaseResult):
      # pylint: disable=using-constant-test
      def __await__(self):
          if False:
              yield self
          return GetDatabaseResult(
              character_set=self.character_set,
              compartment_id=self.compartment_id,
              connection_strings=self.connection_strings,
              database=self.database,
              database_id=self.database_id,
              database_software_image_id=self.database_software_image_id,
              db_backup_config=self.db_backup_config,
              db_home_id=self.db_home_id,
              db_name=self.db_name,
              db_system_id=self.db_system_id,
              db_unique_name=self.db_unique_name,
              db_version=self.db_version,
              db_workload=self.db_workload,
              defined_tags=self.defined_tags,
              freeform_tags=self.freeform_tags,
              id=self.id,
              kms_key_id=self.kms_key_id,
              kms_key_migration=self.kms_key_migration,
              kms_key_rotation=self.kms_key_rotation,
              kms_key_version_id=self.kms_key_version_id,
              last_backup_timestamp=self.last_backup_timestamp,
              lifecycle_details=self.lifecycle_details,
              ncharacter_set=self.ncharacter_set,
              pdb_name=self.pdb_name,
              source=self.source,
              source_database_point_in_time_recovery_timestamp=self.source_database_point_in_time_recovery_timestamp,
              state=self.state,
              time_created=self.time_created,
              vm_cluster_id=self.vm_cluster_id)
  
  
  def get_database(database_id: Optional[str] = None,
                   opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetDatabaseResult:
      """
      This data source provides details about a specific Database resource in Oracle Cloud Infrastructure Database service.
  
      Gets information about the specified database.
  
      ## Example Usage
  
      ```python
      import pulumi
      import pulumi_oci as oci
  
      test_database = oci.database.get_database(database_id=var["database_id"])
      ```
  
  
      :param str database_id: The database [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm).
      """
      __args__ = dict()
      __args__['databaseId'] = database_id
      if opts is None:
          opts = pulumi.InvokeOptions()
      if opts.version is None:
          opts.version = _utilities.get_version()
      __ret__ = pulumi.runtime.invoke('oci:database/getDatabase:getDatabase', __args__, opts=opts, typ=GetDatabaseResult).value
  
      return AwaitableGetDatabaseResult(
          character_set=__ret__.character_set,
          compartment_id=__ret__.compartment_id,
          connection_strings=__ret__.connection_strings,
          database=__ret__.database,
          database_id=__ret__.database_id,
          database_software_image_id=__ret__.database_software_image_id,
          db_backup_config=__ret__.db_backup_config,
          db_home_id=__ret__.db_home_id,
          db_name=__ret__.db_name,
          db_system_id=__ret__.db_system_id,
          db_unique_name=__ret__.db_unique_name,
          db_version=__ret__.db_version,
          db_workload=__ret__.db_workload,
          defined_tags=__ret__.defined_tags,
          freeform_tags=__ret__.freeform_tags,
          id=__ret__.id,
          kms_key_id=__ret__.kms_key_id,
          kms_key_migration=__ret__.kms_key_migration,
          kms_key_rotation=__ret__.kms_key_rotation,
          kms_key_version_id=__ret__.kms_key_version_id,
          last_backup_timestamp=__ret__.last_backup_timestamp,
          lifecycle_details=__ret__.lifecycle_details,
          ncharacter_set=__ret__.ncharacter_set,
          pdb_name=__ret__.pdb_name,
          source=__ret__.source,
          source_database_point_in_time_recovery_timestamp=__ret__.source_database_point_in_time_recovery_timestamp,
          state=__ret__.state,
          time_created=__ret__.time_created,
          vm_cluster_id=__ret__.vm_cluster_id)
  