# 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
import copy
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

__all__ = [
    'WorkflowWorkflowV2Result',
    'AwaitableWorkflowWorkflowV2Result',
    'workflow_workflow_v2',
    'workflow_workflow_v2_output',
]

@pulumi.output_type
class WorkflowWorkflowV2Result:
    """
    A collection of values returned by WorkflowWorkflowV2.
    """
    def __init__(__self__, created_at=None, definition=None, id=None, input=None, name=None, namespace=None, project_id=None, region=None, scope=None, tags=None):
        if created_at and not isinstance(created_at, str):
            raise TypeError("Expected argument 'created_at' to be a str")
        pulumi.set(__self__, "created_at", created_at)
        if definition and not isinstance(definition, str):
            raise TypeError("Expected argument 'definition' to be a str")
        pulumi.set(__self__, "definition", definition)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if input and not isinstance(input, str):
            raise TypeError("Expected argument 'input' to be a str")
        pulumi.set(__self__, "input", input)
        if name and not isinstance(name, str):
            raise TypeError("Expected argument 'name' to be a str")
        pulumi.set(__self__, "name", name)
        if namespace and not isinstance(namespace, str):
            raise TypeError("Expected argument 'namespace' to be a str")
        pulumi.set(__self__, "namespace", namespace)
        if project_id and not isinstance(project_id, str):
            raise TypeError("Expected argument 'project_id' to be a str")
        pulumi.set(__self__, "project_id", project_id)
        if region and not isinstance(region, str):
            raise TypeError("Expected argument 'region' to be a str")
        pulumi.set(__self__, "region", region)
        if scope and not isinstance(scope, str):
            raise TypeError("Expected argument 'scope' to be a str")
        pulumi.set(__self__, "scope", scope)
        if tags and not isinstance(tags, list):
            raise TypeError("Expected argument 'tags' to be a list")
        pulumi.set(__self__, "tags", tags)

    @property
    @pulumi.getter(name="createdAt")
    def created_at(self) -> builtins.str:
        """
        The date the workflow was created.
        """
        return pulumi.get(self, "created_at")

    @property
    @pulumi.getter
    def definition(self) -> builtins.str:
        """
        The workflow definition in Mistral v2 DSL.
        """
        return pulumi.get(self, "definition")

    @property
    @pulumi.getter
    def id(self) -> builtins.str:
        """
        The provider-assigned unique ID for this managed resource.
        """
        return pulumi.get(self, "id")

    @property
    @pulumi.getter
    def input(self) -> builtins.str:
        """
        A set of input parameters required for workflow execution.
        """
        return pulumi.get(self, "input")

    @property
    @pulumi.getter
    def name(self) -> builtins.str:
        """
        See Argument Reference above.
        """
        return pulumi.get(self, "name")

    @property
    @pulumi.getter
    def namespace(self) -> builtins.str:
        """
        See Argument Reference above.
        """
        return pulumi.get(self, "namespace")

    @property
    @pulumi.getter(name="projectId")
    def project_id(self) -> builtins.str:
        """
        See Argument Reference above.
        """
        return pulumi.get(self, "project_id")

    @property
    @pulumi.getter
    def region(self) -> builtins.str:
        """
        See Argument Reference above.
        """
        return pulumi.get(self, "region")

    @property
    @pulumi.getter
    def scope(self) -> builtins.str:
        """
        Scope (private or public).
        """
        return pulumi.get(self, "scope")

    @property
    @pulumi.getter
    def tags(self) -> Sequence[builtins.str]:
        """
        A set of string tags for the workflow.
        """
        return pulumi.get(self, "tags")


class AwaitableWorkflowWorkflowV2Result(WorkflowWorkflowV2Result):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return WorkflowWorkflowV2Result(
            created_at=self.created_at,
            definition=self.definition,
            id=self.id,
            input=self.input,
            name=self.name,
            namespace=self.namespace,
            project_id=self.project_id,
            region=self.region,
            scope=self.scope,
            tags=self.tags)


def workflow_workflow_v2(name: Optional[builtins.str] = None,
                         namespace: Optional[builtins.str] = None,
                         project_id: Optional[builtins.str] = None,
                         region: Optional[builtins.str] = None,
                         opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableWorkflowWorkflowV2Result:
    """
    Use this data source to get the ID of an available workflow.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_openstack as openstack

    workflow1 = openstack.workflow_workflow_v2(name="workflow_1")
    ```


    :param builtins.str name: The name of the workflow.
    :param builtins.str namespace: The namespace of the workflow.
    :param builtins.str project_id: The id of the project to retrieve the workflow.
           Requires admin privileges.
    :param builtins.str region: The region in which to obtain the V2 Workflow client.
    """
    __args__ = dict()
    __args__['name'] = name
    __args__['namespace'] = namespace
    __args__['projectId'] = project_id
    __args__['region'] = region
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('openstack:index/workflowWorkflowV2:WorkflowWorkflowV2', __args__, opts=opts, typ=WorkflowWorkflowV2Result).value

    return AwaitableWorkflowWorkflowV2Result(
        created_at=pulumi.get(__ret__, 'created_at'),
        definition=pulumi.get(__ret__, 'definition'),
        id=pulumi.get(__ret__, 'id'),
        input=pulumi.get(__ret__, 'input'),
        name=pulumi.get(__ret__, 'name'),
        namespace=pulumi.get(__ret__, 'namespace'),
        project_id=pulumi.get(__ret__, 'project_id'),
        region=pulumi.get(__ret__, 'region'),
        scope=pulumi.get(__ret__, 'scope'),
        tags=pulumi.get(__ret__, 'tags'))
def workflow_workflow_v2_output(name: Optional[pulumi.Input[Optional[builtins.str]]] = None,
                                namespace: Optional[pulumi.Input[Optional[builtins.str]]] = None,
                                project_id: Optional[pulumi.Input[Optional[builtins.str]]] = None,
                                region: Optional[pulumi.Input[Optional[builtins.str]]] = None,
                                opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[WorkflowWorkflowV2Result]:
    """
    Use this data source to get the ID of an available workflow.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_openstack as openstack

    workflow1 = openstack.workflow_workflow_v2(name="workflow_1")
    ```


    :param builtins.str name: The name of the workflow.
    :param builtins.str namespace: The namespace of the workflow.
    :param builtins.str project_id: The id of the project to retrieve the workflow.
           Requires admin privileges.
    :param builtins.str region: The region in which to obtain the V2 Workflow client.
    """
    __args__ = dict()
    __args__['name'] = name
    __args__['namespace'] = namespace
    __args__['projectId'] = project_id
    __args__['region'] = region
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('openstack:index/workflowWorkflowV2:WorkflowWorkflowV2', __args__, opts=opts, typ=WorkflowWorkflowV2Result)
    return __ret__.apply(lambda __response__: WorkflowWorkflowV2Result(
        created_at=pulumi.get(__response__, 'created_at'),
        definition=pulumi.get(__response__, 'definition'),
        id=pulumi.get(__response__, 'id'),
        input=pulumi.get(__response__, 'input'),
        name=pulumi.get(__response__, 'name'),
        namespace=pulumi.get(__response__, 'namespace'),
        project_id=pulumi.get(__response__, 'project_id'),
        region=pulumi.get(__response__, 'region'),
        scope=pulumi.get(__response__, 'scope'),
        tags=pulumi.get(__response__, 'tags')))
