# 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

__all__ = [
    'GetDeploymentResult',
    'AwaitableGetDeploymentResult',
    'get_deployment',
    'get_deployment_output',
]

@pulumi.output_type
class GetDeploymentResult:
    """
    A collection of values returned by getDeployment.
    """
    def __init__(__self__, blueprint_content=None, blueprint_id=None, blueprint_version=None, catalog_item_id=None, catalog_item_version=None, created_at=None, created_by=None, description=None, expand_last_request=None, expand_project=None, expand_resources=None, expenses=None, id=None, inputs=None, last_requests=None, last_updated_at=None, last_updated_by=None, lease_expire_at=None, name=None, org_id=None, owner=None, project_id=None, projects=None, resources=None, status=None):
        if blueprint_content and not isinstance(blueprint_content, str):
            raise TypeError("Expected argument 'blueprint_content' to be a str")
        pulumi.set(__self__, "blueprint_content", blueprint_content)
        if blueprint_id and not isinstance(blueprint_id, str):
            raise TypeError("Expected argument 'blueprint_id' to be a str")
        pulumi.set(__self__, "blueprint_id", blueprint_id)
        if blueprint_version and not isinstance(blueprint_version, str):
            raise TypeError("Expected argument 'blueprint_version' to be a str")
        pulumi.set(__self__, "blueprint_version", blueprint_version)
        if catalog_item_id and not isinstance(catalog_item_id, str):
            raise TypeError("Expected argument 'catalog_item_id' to be a str")
        pulumi.set(__self__, "catalog_item_id", catalog_item_id)
        if catalog_item_version and not isinstance(catalog_item_version, str):
            raise TypeError("Expected argument 'catalog_item_version' to be a str")
        pulumi.set(__self__, "catalog_item_version", catalog_item_version)
        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 created_by and not isinstance(created_by, str):
            raise TypeError("Expected argument 'created_by' to be a str")
        pulumi.set(__self__, "created_by", created_by)
        if description and not isinstance(description, str):
            raise TypeError("Expected argument 'description' to be a str")
        pulumi.set(__self__, "description", description)
        if expand_last_request and not isinstance(expand_last_request, bool):
            raise TypeError("Expected argument 'expand_last_request' to be a bool")
        pulumi.set(__self__, "expand_last_request", expand_last_request)
        if expand_project and not isinstance(expand_project, bool):
            raise TypeError("Expected argument 'expand_project' to be a bool")
        pulumi.set(__self__, "expand_project", expand_project)
        if expand_resources and not isinstance(expand_resources, bool):
            raise TypeError("Expected argument 'expand_resources' to be a bool")
        pulumi.set(__self__, "expand_resources", expand_resources)
        if expenses and not isinstance(expenses, list):
            raise TypeError("Expected argument 'expenses' to be a list")
        pulumi.set(__self__, "expenses", expenses)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if inputs and not isinstance(inputs, dict):
            raise TypeError("Expected argument 'inputs' to be a dict")
        pulumi.set(__self__, "inputs", inputs)
        if last_requests and not isinstance(last_requests, list):
            raise TypeError("Expected argument 'last_requests' to be a list")
        pulumi.set(__self__, "last_requests", last_requests)
        if last_updated_at and not isinstance(last_updated_at, str):
            raise TypeError("Expected argument 'last_updated_at' to be a str")
        pulumi.set(__self__, "last_updated_at", last_updated_at)
        if last_updated_by and not isinstance(last_updated_by, str):
            raise TypeError("Expected argument 'last_updated_by' to be a str")
        pulumi.set(__self__, "last_updated_by", last_updated_by)
        if lease_expire_at and not isinstance(lease_expire_at, str):
            raise TypeError("Expected argument 'lease_expire_at' to be a str")
        pulumi.set(__self__, "lease_expire_at", lease_expire_at)
        if name and not isinstance(name, str):
            raise TypeError("Expected argument 'name' to be a str")
        pulumi.set(__self__, "name", name)
        if org_id and not isinstance(org_id, str):
            raise TypeError("Expected argument 'org_id' to be a str")
        pulumi.set(__self__, "org_id", org_id)
        if owner and not isinstance(owner, str):
            raise TypeError("Expected argument 'owner' to be a str")
        pulumi.set(__self__, "owner", owner)
        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 projects and not isinstance(projects, list):
            raise TypeError("Expected argument 'projects' to be a list")
        pulumi.set(__self__, "projects", projects)
        if resources and not isinstance(resources, list):
            raise TypeError("Expected argument 'resources' to be a list")
        pulumi.set(__self__, "resources", resources)
        if status and not isinstance(status, str):
            raise TypeError("Expected argument 'status' to be a str")
        pulumi.set(__self__, "status", status)

    @property
    @pulumi.getter(name="blueprintContent")
    def blueprint_content(self) -> str:
        """
        vRA Cloud template content. Conflicts with `blueprint_id` and `catalog_item_id`.
        """
        return pulumi.get(self, "blueprint_content")

    @property
    @pulumi.getter(name="blueprintId")
    def blueprint_id(self) -> str:
        """
        Identifier of the requested blueprint in the form ‘UUID:version’.
        """
        return pulumi.get(self, "blueprint_id")

    @property
    @pulumi.getter(name="blueprintVersion")
    def blueprint_version(self) -> str:
        """
        The version of the vRA cloud template to request the deployment. Used only when `blueprint_id` is provided.
        """
        return pulumi.get(self, "blueprint_version")

    @property
    @pulumi.getter(name="catalogItemId")
    def catalog_item_id(self) -> str:
        """
        Identifier of the requested catalog item in the form ‘UUID:version’.
        """
        return pulumi.get(self, "catalog_item_id")

    @property
    @pulumi.getter(name="catalogItemVersion")
    def catalog_item_version(self) -> str:
        """
        The version of the vRA catalog item to request the deployment. Used only when `catalog_item_id` is provided.
        """
        return pulumi.get(self, "catalog_item_version")

    @property
    @pulumi.getter(name="createdAt")
    def created_at(self) -> str:
        """
        Creation time (e.g. date format ‘2019-07-13T23:16:49.310Z’).
        """
        return pulumi.get(self, "created_at")

    @property
    @pulumi.getter(name="createdBy")
    def created_by(self) -> str:
        """
        The user the entity was created by.
        """
        return pulumi.get(self, "created_by")

    @property
    @pulumi.getter
    def description(self) -> str:
        """
        A description of the resource.
        """
        return pulumi.get(self, "description")

    @property
    @pulumi.getter(name="expandLastRequest")
    def expand_last_request(self) -> Optional[bool]:
        return pulumi.get(self, "expand_last_request")

    @property
    @pulumi.getter(name="expandProject")
    def expand_project(self) -> Optional[bool]:
        return pulumi.get(self, "expand_project")

    @property
    @pulumi.getter(name="expandResources")
    def expand_resources(self) -> Optional[bool]:
        return pulumi.get(self, "expand_resources")

    @property
    @pulumi.getter
    def expenses(self) -> Sequence['outputs.GetDeploymentExpenseResult']:
        """
        Expense incurred for this resource.
        """
        return pulumi.get(self, "expenses")

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

    @property
    @pulumi.getter
    def inputs(self) -> Mapping[str, str]:
        """
        List of request inputs.
        """
        return pulumi.get(self, "inputs")

    @property
    @pulumi.getter(name="lastRequests")
    def last_requests(self) -> Sequence['outputs.GetDeploymentLastRequestResult']:
        """
        Represents deployment requests.
        """
        return pulumi.get(self, "last_requests")

    @property
    @pulumi.getter(name="lastUpdatedAt")
    def last_updated_at(self) -> str:
        """
        Time at which the deployment was last updated.
        """
        return pulumi.get(self, "last_updated_at")

    @property
    @pulumi.getter(name="lastUpdatedBy")
    def last_updated_by(self) -> str:
        """
        The user that last updated the deployment.
        """
        return pulumi.get(self, "last_updated_by")

    @property
    @pulumi.getter(name="leaseExpireAt")
    def lease_expire_at(self) -> str:
        """
        Time at which the deployment lease expires.
        """
        return pulumi.get(self, "lease_expire_at")

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

    @property
    @pulumi.getter(name="orgId")
    def org_id(self) -> str:
        """
        The ID of the organization this deployment belongs to.
        """
        return pulumi.get(self, "org_id")

    @property
    @pulumi.getter
    def owner(self) -> Optional[str]:
        """
        The user this deployment belongs to.
        """
        return pulumi.get(self, "owner")

    @property
    @pulumi.getter(name="projectId")
    def project_id(self) -> str:
        """
        The id of the project this deployment belongs to.
        """
        return pulumi.get(self, "project_id")

    @property
    @pulumi.getter
    def projects(self) -> Sequence['outputs.GetDeploymentProjectResult']:
        """
        The project this entity belongs to.
        """
        return pulumi.get(self, "projects")

    @property
    @pulumi.getter
    def resources(self) -> Sequence['outputs.GetDeploymentResourceResult']:
        """
        Expanded resources for the deployment. Content of this property will not be maintained backward compatible.
        """
        return pulumi.get(self, "resources")

    @property
    @pulumi.getter
    def status(self) -> str:
        """
        Deployment status. Supported values are: `CREATE_SUCCESSFUL`, `CREATE_INPROGRESS`, `CREATE_FAILED`, `UPDATE_SUCCESSFUL`, `UPDATE_INPROGRESS`, `UPDATE_FAILED`, `DELETE_SUCCESSFUL`, `DELETE_INPROGRESS`, `DELETE_FAILED`, `ACTION_SUCCESSFUL`, `ACTION_INPROGRESS`, `ACTION_FAILED`.
        """
        return pulumi.get(self, "status")


class AwaitableGetDeploymentResult(GetDeploymentResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetDeploymentResult(
            blueprint_content=self.blueprint_content,
            blueprint_id=self.blueprint_id,
            blueprint_version=self.blueprint_version,
            catalog_item_id=self.catalog_item_id,
            catalog_item_version=self.catalog_item_version,
            created_at=self.created_at,
            created_by=self.created_by,
            description=self.description,
            expand_last_request=self.expand_last_request,
            expand_project=self.expand_project,
            expand_resources=self.expand_resources,
            expenses=self.expenses,
            id=self.id,
            inputs=self.inputs,
            last_requests=self.last_requests,
            last_updated_at=self.last_updated_at,
            last_updated_by=self.last_updated_by,
            lease_expire_at=self.lease_expire_at,
            name=self.name,
            org_id=self.org_id,
            owner=self.owner,
            project_id=self.project_id,
            projects=self.projects,
            resources=self.resources,
            status=self.status)


def get_deployment(blueprint_content: Optional[str] = None,
                   blueprint_id: Optional[str] = None,
                   blueprint_version: Optional[str] = None,
                   catalog_item_id: Optional[str] = None,
                   catalog_item_version: Optional[str] = None,
                   created_at: Optional[str] = None,
                   created_by: Optional[str] = None,
                   description: Optional[str] = None,
                   expand_last_request: Optional[bool] = None,
                   expand_project: Optional[bool] = None,
                   expand_resources: Optional[bool] = None,
                   id: Optional[str] = None,
                   inputs: Optional[Mapping[str, str]] = None,
                   last_updated_at: Optional[str] = None,
                   last_updated_by: Optional[str] = None,
                   lease_expire_at: Optional[str] = None,
                   name: Optional[str] = None,
                   owner: Optional[str] = None,
                   project_id: Optional[str] = None,
                   status: Optional[str] = None,
                   opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetDeploymentResult:
    """
    This data source provides information about a deployment in vRA.

    ## Example Usage
    ### S

    This is an example of how to get a vRA deployment by its name.

    ```python
    import pulumi
    import pulumi_vra as vra

    this = vra.deployment.get_deployment(name=var["deployment_name"])
    ```

    This is an example of how to get a vRA cloud template by its id.

    ```python
    import pulumi
    import pulumi_vra as vra

    this = vra.deployment.get_deployment(id=var["deployment_id"])
    ```


    :param str blueprint_content: vRA Cloud template content. Conflicts with `blueprint_id` and `catalog_item_id`.
    :param str blueprint_id: Identifier of the requested blueprint in the form ‘UUID:version’.
    :param str blueprint_version: The version of the vRA cloud template to request the deployment. Used only when `blueprint_id` is provided.
    :param str catalog_item_id: Identifier of the requested catalog item in the form ‘UUID:version’.
    :param str catalog_item_version: The version of the vRA catalog item to request the deployment. Used only when `catalog_item_id` is provided.
    :param str created_at: Creation time (e.g. date format ‘2019-07-13T23:16:49.310Z’).
    :param str created_by: The user the entity was created by.
    :param str description: A description of the resource.
    :param bool expand_last_request: Flag to indicate whether to expand last request on the deployment.
    :param bool expand_project: Flag to indicate whether to expand project information.
    :param bool expand_resources: Flag to indicate whether to expand resources in the deployment.
    :param str id: The id of the deployment. One of `id` or `name` must be provided.
    :param Mapping[str, str] inputs: List of request inputs.
    :param str last_updated_at: Time at which the deployment was last updated.
    :param str last_updated_by: The user that last updated the deployment.
    :param str lease_expire_at: Time at which the deployment lease expires.
    :param str name: Name of the deployment. One of `id` or `name` must be provided.
    :param str owner: The user this deployment belongs to.
    :param str project_id: The id of the project this deployment belongs to.
    :param str status: Deployment status. Supported values are: `CREATE_SUCCESSFUL`, `CREATE_INPROGRESS`, `CREATE_FAILED`, `UPDATE_SUCCESSFUL`, `UPDATE_INPROGRESS`, `UPDATE_FAILED`, `DELETE_SUCCESSFUL`, `DELETE_INPROGRESS`, `DELETE_FAILED`, `ACTION_SUCCESSFUL`, `ACTION_INPROGRESS`, `ACTION_FAILED`.
    """
    __args__ = dict()
    __args__['blueprintContent'] = blueprint_content
    __args__['blueprintId'] = blueprint_id
    __args__['blueprintVersion'] = blueprint_version
    __args__['catalogItemId'] = catalog_item_id
    __args__['catalogItemVersion'] = catalog_item_version
    __args__['createdAt'] = created_at
    __args__['createdBy'] = created_by
    __args__['description'] = description
    __args__['expandLastRequest'] = expand_last_request
    __args__['expandProject'] = expand_project
    __args__['expandResources'] = expand_resources
    __args__['id'] = id
    __args__['inputs'] = inputs
    __args__['lastUpdatedAt'] = last_updated_at
    __args__['lastUpdatedBy'] = last_updated_by
    __args__['leaseExpireAt'] = lease_expire_at
    __args__['name'] = name
    __args__['owner'] = owner
    __args__['projectId'] = project_id
    __args__['status'] = status
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('vra:deployment/getDeployment:getDeployment', __args__, opts=opts, typ=GetDeploymentResult).value

    return AwaitableGetDeploymentResult(
        blueprint_content=__ret__.blueprint_content,
        blueprint_id=__ret__.blueprint_id,
        blueprint_version=__ret__.blueprint_version,
        catalog_item_id=__ret__.catalog_item_id,
        catalog_item_version=__ret__.catalog_item_version,
        created_at=__ret__.created_at,
        created_by=__ret__.created_by,
        description=__ret__.description,
        expand_last_request=__ret__.expand_last_request,
        expand_project=__ret__.expand_project,
        expand_resources=__ret__.expand_resources,
        expenses=__ret__.expenses,
        id=__ret__.id,
        inputs=__ret__.inputs,
        last_requests=__ret__.last_requests,
        last_updated_at=__ret__.last_updated_at,
        last_updated_by=__ret__.last_updated_by,
        lease_expire_at=__ret__.lease_expire_at,
        name=__ret__.name,
        org_id=__ret__.org_id,
        owner=__ret__.owner,
        project_id=__ret__.project_id,
        projects=__ret__.projects,
        resources=__ret__.resources,
        status=__ret__.status)


@_utilities.lift_output_func(get_deployment)
def get_deployment_output(blueprint_content: Optional[pulumi.Input[Optional[str]]] = None,
                          blueprint_id: Optional[pulumi.Input[Optional[str]]] = None,
                          blueprint_version: Optional[pulumi.Input[Optional[str]]] = None,
                          catalog_item_id: Optional[pulumi.Input[Optional[str]]] = None,
                          catalog_item_version: Optional[pulumi.Input[Optional[str]]] = None,
                          created_at: Optional[pulumi.Input[Optional[str]]] = None,
                          created_by: Optional[pulumi.Input[Optional[str]]] = None,
                          description: Optional[pulumi.Input[Optional[str]]] = None,
                          expand_last_request: Optional[pulumi.Input[Optional[bool]]] = None,
                          expand_project: Optional[pulumi.Input[Optional[bool]]] = None,
                          expand_resources: Optional[pulumi.Input[Optional[bool]]] = None,
                          id: Optional[pulumi.Input[Optional[str]]] = None,
                          inputs: Optional[pulumi.Input[Optional[Mapping[str, str]]]] = None,
                          last_updated_at: Optional[pulumi.Input[Optional[str]]] = None,
                          last_updated_by: Optional[pulumi.Input[Optional[str]]] = None,
                          lease_expire_at: Optional[pulumi.Input[Optional[str]]] = None,
                          name: Optional[pulumi.Input[Optional[str]]] = None,
                          owner: Optional[pulumi.Input[Optional[str]]] = None,
                          project_id: Optional[pulumi.Input[Optional[str]]] = None,
                          status: Optional[pulumi.Input[Optional[str]]] = None,
                          opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetDeploymentResult]:
    """
    This data source provides information about a deployment in vRA.

    ## Example Usage
    ### S

    This is an example of how to get a vRA deployment by its name.

    ```python
    import pulumi
    import pulumi_vra as vra

    this = vra.deployment.get_deployment(name=var["deployment_name"])
    ```

    This is an example of how to get a vRA cloud template by its id.

    ```python
    import pulumi
    import pulumi_vra as vra

    this = vra.deployment.get_deployment(id=var["deployment_id"])
    ```


    :param str blueprint_content: vRA Cloud template content. Conflicts with `blueprint_id` and `catalog_item_id`.
    :param str blueprint_id: Identifier of the requested blueprint in the form ‘UUID:version’.
    :param str blueprint_version: The version of the vRA cloud template to request the deployment. Used only when `blueprint_id` is provided.
    :param str catalog_item_id: Identifier of the requested catalog item in the form ‘UUID:version’.
    :param str catalog_item_version: The version of the vRA catalog item to request the deployment. Used only when `catalog_item_id` is provided.
    :param str created_at: Creation time (e.g. date format ‘2019-07-13T23:16:49.310Z’).
    :param str created_by: The user the entity was created by.
    :param str description: A description of the resource.
    :param bool expand_last_request: Flag to indicate whether to expand last request on the deployment.
    :param bool expand_project: Flag to indicate whether to expand project information.
    :param bool expand_resources: Flag to indicate whether to expand resources in the deployment.
    :param str id: The id of the deployment. One of `id` or `name` must be provided.
    :param Mapping[str, str] inputs: List of request inputs.
    :param str last_updated_at: Time at which the deployment was last updated.
    :param str last_updated_by: The user that last updated the deployment.
    :param str lease_expire_at: Time at which the deployment lease expires.
    :param str name: Name of the deployment. One of `id` or `name` must be provided.
    :param str owner: The user this deployment belongs to.
    :param str project_id: The id of the project this deployment belongs to.
    :param str status: Deployment status. Supported values are: `CREATE_SUCCESSFUL`, `CREATE_INPROGRESS`, `CREATE_FAILED`, `UPDATE_SUCCESSFUL`, `UPDATE_INPROGRESS`, `UPDATE_FAILED`, `DELETE_SUCCESSFUL`, `DELETE_INPROGRESS`, `DELETE_FAILED`, `ACTION_SUCCESSFUL`, `ACTION_INPROGRESS`, `ACTION_FAILED`.
    """
    ...
