# 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__ = ['DbSchemaArgs', 'DbSchema']

@pulumi.input_type
class DbSchemaArgs:
    def __init__(__self__, *,
                 identifier: pulumi.Input[_builtins.str],
                 org_id: pulumi.Input[_builtins.str],
                 project_id: pulumi.Input[_builtins.str],
                 changelog_script: Optional[pulumi.Input['DbSchemaChangelogScriptArgs']] = None,
                 description: Optional[pulumi.Input[_builtins.str]] = None,
                 migration_type: Optional[pulumi.Input[_builtins.str]] = None,
                 name: Optional[pulumi.Input[_builtins.str]] = None,
                 schema_source: Optional[pulumi.Input['DbSchemaSchemaSourceArgs']] = None,
                 service: Optional[pulumi.Input[_builtins.str]] = None,
                 tags: Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]] = None,
                 type: Optional[pulumi.Input[_builtins.str]] = None):
        """
        The set of arguments for constructing a DbSchema resource.
        :param pulumi.Input[_builtins.str] identifier: Unique identifier of the resource.
        :param pulumi.Input[_builtins.str] org_id: Unique identifier of the organization.
        :param pulumi.Input[_builtins.str] project_id: Unique identifier of the project.
        :param pulumi.Input['DbSchemaChangelogScriptArgs'] changelog_script: Configuration to clone changeSets using script
        :param pulumi.Input[_builtins.str] description: Description of the resource.
        :param pulumi.Input[_builtins.str] migration_type: DB Migration tool type. Valid values are: Liquibase, Flyway
        :param pulumi.Input[_builtins.str] name: Name of the resource.
        :param pulumi.Input['DbSchemaSchemaSourceArgs'] schema_source: Provides a connector and path at which to find the database schema representation
        :param pulumi.Input[_builtins.str] service: The service associated with schema
        :param pulumi.Input[Sequence[pulumi.Input[_builtins.str]]] tags: Tags to associate with the resource.
        :param pulumi.Input[_builtins.str] type: Type of the database schema. Valid values are: SCRIPT, REPOSITORY
        """
        pulumi.set(__self__, "identifier", identifier)
        pulumi.set(__self__, "org_id", org_id)
        pulumi.set(__self__, "project_id", project_id)
        if changelog_script is not None:
            pulumi.set(__self__, "changelog_script", changelog_script)
        if description is not None:
            pulumi.set(__self__, "description", description)
        if migration_type is not None:
            pulumi.set(__self__, "migration_type", migration_type)
        if name is not None:
            pulumi.set(__self__, "name", name)
        if schema_source is not None:
            pulumi.set(__self__, "schema_source", schema_source)
        if service is not None:
            pulumi.set(__self__, "service", service)
        if tags is not None:
            pulumi.set(__self__, "tags", tags)
        if type is not None:
            pulumi.set(__self__, "type", type)

    @_builtins.property
    @pulumi.getter
    def identifier(self) -> pulumi.Input[_builtins.str]:
        """
        Unique identifier of the resource.
        """
        return pulumi.get(self, "identifier")

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

    @_builtins.property
    @pulumi.getter(name="orgId")
    def org_id(self) -> pulumi.Input[_builtins.str]:
        """
        Unique identifier of the organization.
        """
        return pulumi.get(self, "org_id")

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

    @_builtins.property
    @pulumi.getter(name="projectId")
    def project_id(self) -> pulumi.Input[_builtins.str]:
        """
        Unique identifier of the project.
        """
        return pulumi.get(self, "project_id")

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

    @_builtins.property
    @pulumi.getter(name="changelogScript")
    def changelog_script(self) -> Optional[pulumi.Input['DbSchemaChangelogScriptArgs']]:
        """
        Configuration to clone changeSets using script
        """
        return pulumi.get(self, "changelog_script")

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

    @_builtins.property
    @pulumi.getter
    def description(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        Description of the resource.
        """
        return pulumi.get(self, "description")

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

    @_builtins.property
    @pulumi.getter(name="migrationType")
    def migration_type(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        DB Migration tool type. Valid values are: Liquibase, Flyway
        """
        return pulumi.get(self, "migration_type")

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

    @_builtins.property
    @pulumi.getter
    def name(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        Name of the resource.
        """
        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="schemaSource")
    def schema_source(self) -> Optional[pulumi.Input['DbSchemaSchemaSourceArgs']]:
        """
        Provides a connector and path at which to find the database schema representation
        """
        return pulumi.get(self, "schema_source")

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

    @_builtins.property
    @pulumi.getter
    def service(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        The service associated with schema
        """
        return pulumi.get(self, "service")

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

    @_builtins.property
    @pulumi.getter
    def tags(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]]:
        """
        Tags to associate with the resource.
        """
        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
    def type(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        Type of the database schema. Valid values are: SCRIPT, REPOSITORY
        """
        return pulumi.get(self, "type")

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


@pulumi.input_type
class _DbSchemaState:
    def __init__(__self__, *,
                 changelog_script: Optional[pulumi.Input['DbSchemaChangelogScriptArgs']] = None,
                 description: Optional[pulumi.Input[_builtins.str]] = None,
                 identifier: Optional[pulumi.Input[_builtins.str]] = None,
                 migration_type: Optional[pulumi.Input[_builtins.str]] = None,
                 name: Optional[pulumi.Input[_builtins.str]] = None,
                 org_id: Optional[pulumi.Input[_builtins.str]] = None,
                 project_id: Optional[pulumi.Input[_builtins.str]] = None,
                 schema_source: Optional[pulumi.Input['DbSchemaSchemaSourceArgs']] = None,
                 service: Optional[pulumi.Input[_builtins.str]] = None,
                 tags: Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]] = None,
                 type: Optional[pulumi.Input[_builtins.str]] = None):
        """
        Input properties used for looking up and filtering DbSchema resources.
        :param pulumi.Input['DbSchemaChangelogScriptArgs'] changelog_script: Configuration to clone changeSets using script
        :param pulumi.Input[_builtins.str] description: Description of the resource.
        :param pulumi.Input[_builtins.str] identifier: Unique identifier of the resource.
        :param pulumi.Input[_builtins.str] migration_type: DB Migration tool type. Valid values are: Liquibase, Flyway
        :param pulumi.Input[_builtins.str] name: Name of the resource.
        :param pulumi.Input[_builtins.str] org_id: Unique identifier of the organization.
        :param pulumi.Input[_builtins.str] project_id: Unique identifier of the project.
        :param pulumi.Input['DbSchemaSchemaSourceArgs'] schema_source: Provides a connector and path at which to find the database schema representation
        :param pulumi.Input[_builtins.str] service: The service associated with schema
        :param pulumi.Input[Sequence[pulumi.Input[_builtins.str]]] tags: Tags to associate with the resource.
        :param pulumi.Input[_builtins.str] type: Type of the database schema. Valid values are: SCRIPT, REPOSITORY
        """
        if changelog_script is not None:
            pulumi.set(__self__, "changelog_script", changelog_script)
        if description is not None:
            pulumi.set(__self__, "description", description)
        if identifier is not None:
            pulumi.set(__self__, "identifier", identifier)
        if migration_type is not None:
            pulumi.set(__self__, "migration_type", migration_type)
        if name is not None:
            pulumi.set(__self__, "name", name)
        if org_id is not None:
            pulumi.set(__self__, "org_id", org_id)
        if project_id is not None:
            pulumi.set(__self__, "project_id", project_id)
        if schema_source is not None:
            pulumi.set(__self__, "schema_source", schema_source)
        if service is not None:
            pulumi.set(__self__, "service", service)
        if tags is not None:
            pulumi.set(__self__, "tags", tags)
        if type is not None:
            pulumi.set(__self__, "type", type)

    @_builtins.property
    @pulumi.getter(name="changelogScript")
    def changelog_script(self) -> Optional[pulumi.Input['DbSchemaChangelogScriptArgs']]:
        """
        Configuration to clone changeSets using script
        """
        return pulumi.get(self, "changelog_script")

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

    @_builtins.property
    @pulumi.getter
    def description(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        Description of the resource.
        """
        return pulumi.get(self, "description")

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

    @_builtins.property
    @pulumi.getter
    def identifier(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        Unique identifier of the resource.
        """
        return pulumi.get(self, "identifier")

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

    @_builtins.property
    @pulumi.getter(name="migrationType")
    def migration_type(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        DB Migration tool type. Valid values are: Liquibase, Flyway
        """
        return pulumi.get(self, "migration_type")

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

    @_builtins.property
    @pulumi.getter
    def name(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        Name of the resource.
        """
        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="orgId")
    def org_id(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        Unique identifier of the organization.
        """
        return pulumi.get(self, "org_id")

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

    @_builtins.property
    @pulumi.getter(name="projectId")
    def project_id(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        Unique identifier of the project.
        """
        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="schemaSource")
    def schema_source(self) -> Optional[pulumi.Input['DbSchemaSchemaSourceArgs']]:
        """
        Provides a connector and path at which to find the database schema representation
        """
        return pulumi.get(self, "schema_source")

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

    @_builtins.property
    @pulumi.getter
    def service(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        The service associated with schema
        """
        return pulumi.get(self, "service")

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

    @_builtins.property
    @pulumi.getter
    def tags(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]]:
        """
        Tags to associate with the resource.
        """
        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
    def type(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        Type of the database schema. Valid values are: SCRIPT, REPOSITORY
        """
        return pulumi.get(self, "type")

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


@pulumi.type_token("harness:platform/dbSchema:DbSchema")
class DbSchema(pulumi.CustomResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 changelog_script: Optional[pulumi.Input[Union['DbSchemaChangelogScriptArgs', 'DbSchemaChangelogScriptArgsDict']]] = None,
                 description: Optional[pulumi.Input[_builtins.str]] = None,
                 identifier: Optional[pulumi.Input[_builtins.str]] = None,
                 migration_type: Optional[pulumi.Input[_builtins.str]] = None,
                 name: Optional[pulumi.Input[_builtins.str]] = None,
                 org_id: Optional[pulumi.Input[_builtins.str]] = None,
                 project_id: Optional[pulumi.Input[_builtins.str]] = None,
                 schema_source: Optional[pulumi.Input[Union['DbSchemaSchemaSourceArgs', 'DbSchemaSchemaSourceArgsDict']]] = None,
                 service: Optional[pulumi.Input[_builtins.str]] = None,
                 tags: Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]] = None,
                 type: Optional[pulumi.Input[_builtins.str]] = None,
                 __props__=None):
        """
        Resource for creating a Harness DBDevOps Schema.

        ## Example Usage

        ```python
        import pulumi
        import pulumi_harness as harness

        default_type_test = harness.platform.DbSchema("default_type_test",
            identifier="identifier",
            org_id="org_id",
            project_id="project_id",
            name="name",
            service="service1",
            tags=[
                "foo:bar",
                "bar:foo",
            ],
            schema_source={
                "connector": "gitConnector",
                "repo": "TestRepo",
                "location": "db/example-changelog.yaml",
                "archive_path": "path/to/archive.zip",
            })
        liquibase_repository_test = harness.platform.DbSchema("liquibase_repository_test",
            identifier="identifier",
            org_id="org_id",
            project_id="project_id",
            name="name",
            service="service1",
            type="Repository",
            migration_type="Liquibase",
            tags=[
                "foo:bar",
                "bar:foo",
            ],
            schema_source={
                "connector": "gitConnector",
                "repo": "TestRepo",
                "location": "db/example-changelog.yaml",
                "archive_path": "path/to/archive.zip",
            })
        liquibase_script_test = harness.platform.DbSchema("liquibase_script_test",
            identifier="identifier",
            org_id="org_id",
            project_id="project_id",
            name="name",
            migration_type="Liquibase",
            service="service1",
            type="Script",
            tags=[
                "foo:bar",
                "bar:foo",
            ],
            changelog_script={
                "image": "plugins/image",
                "command": "echo \\\\\\"hello dbops\\\\\\"",
                "shell": "sh/bash",
                "location": "db/example-changelog.yaml",
            })
        flyway_repository_test = harness.platform.DbSchema("flyway_repository_test",
            identifier="identifier",
            org_id="org_id",
            project_id="project_id",
            name="name",
            service="service1",
            type="Repository",
            migration_type="Flyway",
            tags=[
                "foo:bar",
                "bar:foo",
            ],
            schema_source={
                "connector": "gitConnector",
                "repo": "TestRepo",
                "location": "db/flyway/migrations",
                "toml": "db/flyway.toml",
                "archive_path": "path/to/archive.zip",
            })
        flyway_script_test = harness.platform.DbSchema("flyway_script_test",
            identifier="identifier",
            org_id="org_id",
            project_id="project_id",
            name="name",
            migration_type="Flyway",
            service="service1",
            type="Script",
            tags=[
                "foo:bar",
                "bar:foo",
            ],
            changelog_script={
                "image": "plugins/image",
                "command": "echo \\\\\\"hello dbops\\\\\\"",
                "shell": "sh/bash",
                "location": "db/flyway/migrations",
                "toml": "db/flyway.toml",
            })
        ```

        ## Import

        The `pulumi import` command can be used, for example:

        Import project level db schema

        ```sh
        $ pulumi import harness:platform/dbSchema:DbSchema example <org_id>/<project_id>/<db_schema_id>
        ```

        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[Union['DbSchemaChangelogScriptArgs', 'DbSchemaChangelogScriptArgsDict']] changelog_script: Configuration to clone changeSets using script
        :param pulumi.Input[_builtins.str] description: Description of the resource.
        :param pulumi.Input[_builtins.str] identifier: Unique identifier of the resource.
        :param pulumi.Input[_builtins.str] migration_type: DB Migration tool type. Valid values are: Liquibase, Flyway
        :param pulumi.Input[_builtins.str] name: Name of the resource.
        :param pulumi.Input[_builtins.str] org_id: Unique identifier of the organization.
        :param pulumi.Input[_builtins.str] project_id: Unique identifier of the project.
        :param pulumi.Input[Union['DbSchemaSchemaSourceArgs', 'DbSchemaSchemaSourceArgsDict']] schema_source: Provides a connector and path at which to find the database schema representation
        :param pulumi.Input[_builtins.str] service: The service associated with schema
        :param pulumi.Input[Sequence[pulumi.Input[_builtins.str]]] tags: Tags to associate with the resource.
        :param pulumi.Input[_builtins.str] type: Type of the database schema. Valid values are: SCRIPT, REPOSITORY
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: DbSchemaArgs,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        Resource for creating a Harness DBDevOps Schema.

        ## Example Usage

        ```python
        import pulumi
        import pulumi_harness as harness

        default_type_test = harness.platform.DbSchema("default_type_test",
            identifier="identifier",
            org_id="org_id",
            project_id="project_id",
            name="name",
            service="service1",
            tags=[
                "foo:bar",
                "bar:foo",
            ],
            schema_source={
                "connector": "gitConnector",
                "repo": "TestRepo",
                "location": "db/example-changelog.yaml",
                "archive_path": "path/to/archive.zip",
            })
        liquibase_repository_test = harness.platform.DbSchema("liquibase_repository_test",
            identifier="identifier",
            org_id="org_id",
            project_id="project_id",
            name="name",
            service="service1",
            type="Repository",
            migration_type="Liquibase",
            tags=[
                "foo:bar",
                "bar:foo",
            ],
            schema_source={
                "connector": "gitConnector",
                "repo": "TestRepo",
                "location": "db/example-changelog.yaml",
                "archive_path": "path/to/archive.zip",
            })
        liquibase_script_test = harness.platform.DbSchema("liquibase_script_test",
            identifier="identifier",
            org_id="org_id",
            project_id="project_id",
            name="name",
            migration_type="Liquibase",
            service="service1",
            type="Script",
            tags=[
                "foo:bar",
                "bar:foo",
            ],
            changelog_script={
                "image": "plugins/image",
                "command": "echo \\\\\\"hello dbops\\\\\\"",
                "shell": "sh/bash",
                "location": "db/example-changelog.yaml",
            })
        flyway_repository_test = harness.platform.DbSchema("flyway_repository_test",
            identifier="identifier",
            org_id="org_id",
            project_id="project_id",
            name="name",
            service="service1",
            type="Repository",
            migration_type="Flyway",
            tags=[
                "foo:bar",
                "bar:foo",
            ],
            schema_source={
                "connector": "gitConnector",
                "repo": "TestRepo",
                "location": "db/flyway/migrations",
                "toml": "db/flyway.toml",
                "archive_path": "path/to/archive.zip",
            })
        flyway_script_test = harness.platform.DbSchema("flyway_script_test",
            identifier="identifier",
            org_id="org_id",
            project_id="project_id",
            name="name",
            migration_type="Flyway",
            service="service1",
            type="Script",
            tags=[
                "foo:bar",
                "bar:foo",
            ],
            changelog_script={
                "image": "plugins/image",
                "command": "echo \\\\\\"hello dbops\\\\\\"",
                "shell": "sh/bash",
                "location": "db/flyway/migrations",
                "toml": "db/flyway.toml",
            })
        ```

        ## Import

        The `pulumi import` command can be used, for example:

        Import project level db schema

        ```sh
        $ pulumi import harness:platform/dbSchema:DbSchema example <org_id>/<project_id>/<db_schema_id>
        ```

        :param str resource_name: The name of the resource.
        :param DbSchemaArgs 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(DbSchemaArgs, 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,
                 changelog_script: Optional[pulumi.Input[Union['DbSchemaChangelogScriptArgs', 'DbSchemaChangelogScriptArgsDict']]] = None,
                 description: Optional[pulumi.Input[_builtins.str]] = None,
                 identifier: Optional[pulumi.Input[_builtins.str]] = None,
                 migration_type: Optional[pulumi.Input[_builtins.str]] = None,
                 name: Optional[pulumi.Input[_builtins.str]] = None,
                 org_id: Optional[pulumi.Input[_builtins.str]] = None,
                 project_id: Optional[pulumi.Input[_builtins.str]] = None,
                 schema_source: Optional[pulumi.Input[Union['DbSchemaSchemaSourceArgs', 'DbSchemaSchemaSourceArgsDict']]] = None,
                 service: Optional[pulumi.Input[_builtins.str]] = None,
                 tags: Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]] = None,
                 type: Optional[pulumi.Input[_builtins.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__ = DbSchemaArgs.__new__(DbSchemaArgs)

            __props__.__dict__["changelog_script"] = changelog_script
            __props__.__dict__["description"] = description
            if identifier is None and not opts.urn:
                raise TypeError("Missing required property 'identifier'")
            __props__.__dict__["identifier"] = identifier
            __props__.__dict__["migration_type"] = migration_type
            __props__.__dict__["name"] = name
            if org_id is None and not opts.urn:
                raise TypeError("Missing required property 'org_id'")
            __props__.__dict__["org_id"] = org_id
            if project_id is None and not opts.urn:
                raise TypeError("Missing required property 'project_id'")
            __props__.__dict__["project_id"] = project_id
            __props__.__dict__["schema_source"] = schema_source
            __props__.__dict__["service"] = service
            __props__.__dict__["tags"] = tags
            __props__.__dict__["type"] = type
        super(DbSchema, __self__).__init__(
            'harness:platform/dbSchema:DbSchema',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            changelog_script: Optional[pulumi.Input[Union['DbSchemaChangelogScriptArgs', 'DbSchemaChangelogScriptArgsDict']]] = None,
            description: Optional[pulumi.Input[_builtins.str]] = None,
            identifier: Optional[pulumi.Input[_builtins.str]] = None,
            migration_type: Optional[pulumi.Input[_builtins.str]] = None,
            name: Optional[pulumi.Input[_builtins.str]] = None,
            org_id: Optional[pulumi.Input[_builtins.str]] = None,
            project_id: Optional[pulumi.Input[_builtins.str]] = None,
            schema_source: Optional[pulumi.Input[Union['DbSchemaSchemaSourceArgs', 'DbSchemaSchemaSourceArgsDict']]] = None,
            service: Optional[pulumi.Input[_builtins.str]] = None,
            tags: Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]] = None,
            type: Optional[pulumi.Input[_builtins.str]] = None) -> 'DbSchema':
        """
        Get an existing DbSchema 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[Union['DbSchemaChangelogScriptArgs', 'DbSchemaChangelogScriptArgsDict']] changelog_script: Configuration to clone changeSets using script
        :param pulumi.Input[_builtins.str] description: Description of the resource.
        :param pulumi.Input[_builtins.str] identifier: Unique identifier of the resource.
        :param pulumi.Input[_builtins.str] migration_type: DB Migration tool type. Valid values are: Liquibase, Flyway
        :param pulumi.Input[_builtins.str] name: Name of the resource.
        :param pulumi.Input[_builtins.str] org_id: Unique identifier of the organization.
        :param pulumi.Input[_builtins.str] project_id: Unique identifier of the project.
        :param pulumi.Input[Union['DbSchemaSchemaSourceArgs', 'DbSchemaSchemaSourceArgsDict']] schema_source: Provides a connector and path at which to find the database schema representation
        :param pulumi.Input[_builtins.str] service: The service associated with schema
        :param pulumi.Input[Sequence[pulumi.Input[_builtins.str]]] tags: Tags to associate with the resource.
        :param pulumi.Input[_builtins.str] type: Type of the database schema. Valid values are: SCRIPT, REPOSITORY
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = _DbSchemaState.__new__(_DbSchemaState)

        __props__.__dict__["changelog_script"] = changelog_script
        __props__.__dict__["description"] = description
        __props__.__dict__["identifier"] = identifier
        __props__.__dict__["migration_type"] = migration_type
        __props__.__dict__["name"] = name
        __props__.__dict__["org_id"] = org_id
        __props__.__dict__["project_id"] = project_id
        __props__.__dict__["schema_source"] = schema_source
        __props__.__dict__["service"] = service
        __props__.__dict__["tags"] = tags
        __props__.__dict__["type"] = type
        return DbSchema(resource_name, opts=opts, __props__=__props__)

    @_builtins.property
    @pulumi.getter(name="changelogScript")
    def changelog_script(self) -> pulumi.Output[Optional['outputs.DbSchemaChangelogScript']]:
        """
        Configuration to clone changeSets using script
        """
        return pulumi.get(self, "changelog_script")

    @_builtins.property
    @pulumi.getter
    def description(self) -> pulumi.Output[Optional[_builtins.str]]:
        """
        Description of the resource.
        """
        return pulumi.get(self, "description")

    @_builtins.property
    @pulumi.getter
    def identifier(self) -> pulumi.Output[_builtins.str]:
        """
        Unique identifier of the resource.
        """
        return pulumi.get(self, "identifier")

    @_builtins.property
    @pulumi.getter(name="migrationType")
    def migration_type(self) -> pulumi.Output[Optional[_builtins.str]]:
        """
        DB Migration tool type. Valid values are: Liquibase, Flyway
        """
        return pulumi.get(self, "migration_type")

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

    @_builtins.property
    @pulumi.getter(name="orgId")
    def org_id(self) -> pulumi.Output[_builtins.str]:
        """
        Unique identifier of the organization.
        """
        return pulumi.get(self, "org_id")

    @_builtins.property
    @pulumi.getter(name="projectId")
    def project_id(self) -> pulumi.Output[_builtins.str]:
        """
        Unique identifier of the project.
        """
        return pulumi.get(self, "project_id")

    @_builtins.property
    @pulumi.getter(name="schemaSource")
    def schema_source(self) -> pulumi.Output[Optional['outputs.DbSchemaSchemaSource']]:
        """
        Provides a connector and path at which to find the database schema representation
        """
        return pulumi.get(self, "schema_source")

    @_builtins.property
    @pulumi.getter
    def service(self) -> pulumi.Output[Optional[_builtins.str]]:
        """
        The service associated with schema
        """
        return pulumi.get(self, "service")

    @_builtins.property
    @pulumi.getter
    def tags(self) -> pulumi.Output[Optional[Sequence[_builtins.str]]]:
        """
        Tags to associate with the resource.
        """
        return pulumi.get(self, "tags")

    @_builtins.property
    @pulumi.getter
    def type(self) -> pulumi.Output[Optional[_builtins.str]]:
        """
        Type of the database schema. Valid values are: SCRIPT, REPOSITORY
        """
        return pulumi.get(self, "type")

