<reponame>pulumiverse/pulumi-vra// *** 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! ***

using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;
using Pulumi;

namespace Pulumiverse.Vra.Deployment
{
    public static class GetDeployment
    {
        /// <summary>
        /// This data source provides information about a deployment in vRA.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// ### S
        /// 
        /// This is an example of how to get a vRA deployment by its name.
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using Vra = Pulumi.Vra;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var @this = Vra.Deployment.GetDeployment.Invoke(new()
        ///     {
        ///         Name = @var.Deployment_name,
        ///     });
        /// 
        /// });
        /// ```
        /// 
        /// This is an example of how to get a vRA cloud template by its id.
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using Vra = Pulumi.Vra;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var @this = Vra.Deployment.GetDeployment.Invoke(new()
        ///     {
        ///         Id = @var.Deployment_id,
        ///     });
        /// 
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetDeploymentResult> InvokeAsync(GetDeploymentArgs? args = null, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.InvokeAsync<GetDeploymentResult>("vra:deployment/getDeployment:getDeployment", args ?? new GetDeploymentArgs(), options.WithDefaults());

        /// <summary>
        /// This data source provides information about a deployment in vRA.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// ### S
        /// 
        /// This is an example of how to get a vRA deployment by its name.
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using Vra = Pulumi.Vra;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var @this = Vra.Deployment.GetDeployment.Invoke(new()
        ///     {
        ///         Name = @var.Deployment_name,
        ///     });
        /// 
        /// });
        /// ```
        /// 
        /// This is an example of how to get a vRA cloud template by its id.
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using Vra = Pulumi.Vra;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var @this = Vra.Deployment.GetDeployment.Invoke(new()
        ///     {
        ///         Id = @var.Deployment_id,
        ///     });
        /// 
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetDeploymentResult> Invoke(GetDeploymentInvokeArgs? args = null, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.Invoke<GetDeploymentResult>("vra:deployment/getDeployment:getDeployment", args ?? new GetDeploymentInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetDeploymentArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// vRA Cloud template content. Conflicts with `blueprint_id` and `catalog_item_id`.
        /// </summary>
        [Input("blueprintContent")]
        public string? BlueprintContent { get; set; }

        /// <summary>
        /// Identifier of the requested blueprint in the form ‘UUID:version’.
        /// </summary>
        [Input("blueprintId")]
        public string? BlueprintId { get; set; }

        /// <summary>
        /// The version of the vRA cloud template to request the deployment. Used only when `blueprint_id` is provided.
        /// </summary>
        [Input("blueprintVersion")]
        public string? BlueprintVersion { get; set; }

        /// <summary>
        /// Identifier of the requested catalog item in the form ‘UUID:version’.
        /// </summary>
        [Input("catalogItemId")]
        public string? CatalogItemId { get; set; }

        /// <summary>
        /// The version of the vRA catalog item to request the deployment. Used only when `catalog_item_id` is provided.
        /// </summary>
        [Input("catalogItemVersion")]
        public string? CatalogItemVersion { get; set; }

        /// <summary>
        /// Creation time (e.g. date format ‘2019-07-13T23:16:49.310Z’).
        /// </summary>
        [Input("createdAt")]
        public string? CreatedAt { get; set; }

        /// <summary>
        /// The user the entity was created by.
        /// </summary>
        [Input("createdBy")]
        public string? CreatedBy { get; set; }

        /// <summary>
        /// A description of the resource.
        /// </summary>
        [Input("description")]
        public string? Description { get; set; }

        /// <summary>
        /// Flag to indicate whether to expand last request on the deployment.
        /// </summary>
        [Input("expandLastRequest")]
        public bool? ExpandLastRequest { get; set; }

        /// <summary>
        /// Flag to indicate whether to expand project information.
        /// </summary>
        [Input("expandProject")]
        public bool? ExpandProject { get; set; }

        /// <summary>
        /// Flag to indicate whether to expand resources in the deployment.
        /// </summary>
        [Input("expandResources")]
        public bool? ExpandResources { get; set; }

        /// <summary>
        /// The id of the deployment. One of `id` or `name` must be provided.
        /// </summary>
        [Input("id")]
        public string? Id { get; set; }

        [Input("inputs")]
        private Dictionary<string, string>? _inputs;

        /// <summary>
        /// List of request inputs.
        /// </summary>
        public Dictionary<string, string> Inputs
        {
            get => _inputs ?? (_inputs = new Dictionary<string, string>());
            set => _inputs = value;
        }

        /// <summary>
        /// Time at which the deployment was last updated.
        /// </summary>
        [Input("lastUpdatedAt")]
        public string? LastUpdatedAt { get; set; }

        /// <summary>
        /// The user that last updated the deployment.
        /// </summary>
        [Input("lastUpdatedBy")]
        public string? LastUpdatedBy { get; set; }

        /// <summary>
        /// Time at which the deployment lease expires.
        /// </summary>
        [Input("leaseExpireAt")]
        public string? LeaseExpireAt { get; set; }

        /// <summary>
        /// Name of the deployment. One of `id` or `name` must be provided.
        /// </summary>
        [Input("name")]
        public string? Name { get; set; }

        /// <summary>
        /// The user this deployment belongs to.
        /// </summary>
        [Input("owner")]
        public string? Owner { get; set; }

        /// <summary>
        /// The id of the project this deployment belongs to.
        /// </summary>
        [Input("projectId")]
        public string? ProjectId { get; set; }

        /// <summary>
        /// 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`.
        /// </summary>
        [Input("status")]
        public string? Status { get; set; }

        public GetDeploymentArgs()
        {
        }
        public static new GetDeploymentArgs Empty => new GetDeploymentArgs();
    }

    public sealed class GetDeploymentInvokeArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// vRA Cloud template content. Conflicts with `blueprint_id` and `catalog_item_id`.
        /// </summary>
        [Input("blueprintContent")]
        public Input<string>? BlueprintContent { get; set; }

        /// <summary>
        /// Identifier of the requested blueprint in the form ‘UUID:version’.
        /// </summary>
        [Input("blueprintId")]
        public Input<string>? BlueprintId { get; set; }

        /// <summary>
        /// The version of the vRA cloud template to request the deployment. Used only when `blueprint_id` is provided.
        /// </summary>
        [Input("blueprintVersion")]
        public Input<string>? BlueprintVersion { get; set; }

        /// <summary>
        /// Identifier of the requested catalog item in the form ‘UUID:version’.
        /// </summary>
        [Input("catalogItemId")]
        public Input<string>? CatalogItemId { get; set; }

        /// <summary>
        /// The version of the vRA catalog item to request the deployment. Used only when `catalog_item_id` is provided.
        /// </summary>
        [Input("catalogItemVersion")]
        public Input<string>? CatalogItemVersion { get; set; }

        /// <summary>
        /// Creation time (e.g. date format ‘2019-07-13T23:16:49.310Z’).
        /// </summary>
        [Input("createdAt")]
        public Input<string>? CreatedAt { get; set; }

        /// <summary>
        /// The user the entity was created by.
        /// </summary>
        [Input("createdBy")]
        public Input<string>? CreatedBy { get; set; }

        /// <summary>
        /// A description of the resource.
        /// </summary>
        [Input("description")]
        public Input<string>? Description { get; set; }

        /// <summary>
        /// Flag to indicate whether to expand last request on the deployment.
        /// </summary>
        [Input("expandLastRequest")]
        public Input<bool>? ExpandLastRequest { get; set; }

        /// <summary>
        /// Flag to indicate whether to expand project information.
        /// </summary>
        [Input("expandProject")]
        public Input<bool>? ExpandProject { get; set; }

        /// <summary>
        /// Flag to indicate whether to expand resources in the deployment.
        /// </summary>
        [Input("expandResources")]
        public Input<bool>? ExpandResources { get; set; }

        /// <summary>
        /// The id of the deployment. One of `id` or `name` must be provided.
        /// </summary>
        [Input("id")]
        public Input<string>? Id { get; set; }

        [Input("inputs")]
        private InputMap<string>? _inputs;

        /// <summary>
        /// List of request inputs.
        /// </summary>
        public InputMap<string> Inputs
        {
            get => _inputs ?? (_inputs = new InputMap<string>());
            set => _inputs = value;
        }

        /// <summary>
        /// Time at which the deployment was last updated.
        /// </summary>
        [Input("lastUpdatedAt")]
        public Input<string>? LastUpdatedAt { get; set; }

        /// <summary>
        /// The user that last updated the deployment.
        /// </summary>
        [Input("lastUpdatedBy")]
        public Input<string>? LastUpdatedBy { get; set; }

        /// <summary>
        /// Time at which the deployment lease expires.
        /// </summary>
        [Input("leaseExpireAt")]
        public Input<string>? LeaseExpireAt { get; set; }

        /// <summary>
        /// Name of the deployment. One of `id` or `name` must be provided.
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        /// <summary>
        /// The user this deployment belongs to.
        /// </summary>
        [Input("owner")]
        public Input<string>? Owner { get; set; }

        /// <summary>
        /// The id of the project this deployment belongs to.
        /// </summary>
        [Input("projectId")]
        public Input<string>? ProjectId { get; set; }

        /// <summary>
        /// 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`.
        /// </summary>
        [Input("status")]
        public Input<string>? Status { get; set; }

        public GetDeploymentInvokeArgs()
        {
        }
        public static new GetDeploymentInvokeArgs Empty => new GetDeploymentInvokeArgs();
    }


    [OutputType]
    public sealed class GetDeploymentResult
    {
        /// <summary>
        /// vRA Cloud template content. Conflicts with `blueprint_id` and `catalog_item_id`.
        /// </summary>
        public readonly string BlueprintContent;
        /// <summary>
        /// Identifier of the requested blueprint in the form ‘UUID:version’.
        /// </summary>
        public readonly string BlueprintId;
        /// <summary>
        /// The version of the vRA cloud template to request the deployment. Used only when `blueprint_id` is provided.
        /// </summary>
        public readonly string BlueprintVersion;
        /// <summary>
        /// Identifier of the requested catalog item in the form ‘UUID:version’.
        /// </summary>
        public readonly string CatalogItemId;
        /// <summary>
        /// The version of the vRA catalog item to request the deployment. Used only when `catalog_item_id` is provided.
        /// </summary>
        public readonly string CatalogItemVersion;
        /// <summary>
        /// Creation time (e.g. date format ‘2019-07-13T23:16:49.310Z’).
        /// </summary>
        public readonly string CreatedAt;
        /// <summary>
        /// The user the entity was created by.
        /// </summary>
        public readonly string CreatedBy;
        /// <summary>
        /// A description of the resource.
        /// </summary>
        public readonly string Description;
        public readonly bool? ExpandLastRequest;
        public readonly bool? ExpandProject;
        public readonly bool? ExpandResources;
        /// <summary>
        /// Expense incurred for this resource.
        /// </summary>
        public readonly ImmutableArray<Outputs.GetDeploymentExpenseResult> Expenses;
        /// <summary>
        /// Unique identifier of the resource.
        /// </summary>
        public readonly string Id;
        /// <summary>
        /// List of request inputs.
        /// </summary>
        public readonly ImmutableDictionary<string, string> Inputs;
        /// <summary>
        /// Represents deployment requests.
        /// </summary>
        public readonly ImmutableArray<Outputs.GetDeploymentLastRequestResult> LastRequests;
        /// <summary>
        /// Time at which the deployment was last updated.
        /// </summary>
        public readonly string LastUpdatedAt;
        /// <summary>
        /// The user that last updated the deployment.
        /// </summary>
        public readonly string LastUpdatedBy;
        /// <summary>
        /// Time at which the deployment lease expires.
        /// </summary>
        public readonly string LeaseExpireAt;
        /// <summary>
        /// Name of the resource.
        /// </summary>
        public readonly string Name;
        /// <summary>
        /// The ID of the organization this deployment belongs to.
        /// </summary>
        public readonly string OrgId;
        /// <summary>
        /// The user this deployment belongs to.
        /// </summary>
        public readonly string? Owner;
        /// <summary>
        /// The id of the project this deployment belongs to.
        /// </summary>
        public readonly string ProjectId;
        /// <summary>
        /// The project this entity belongs to.
        /// </summary>
        public readonly ImmutableArray<Outputs.GetDeploymentProjectResult> Projects;
        /// <summary>
        /// Expanded resources for the deployment. Content of this property will not be maintained backward compatible.
        /// </summary>
        public readonly ImmutableArray<Outputs.GetDeploymentResourceResult> Resources;
        /// <summary>
        /// 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`.
        /// </summary>
        public readonly string Status;

        [OutputConstructor]
        private GetDeploymentResult(
            string blueprintContent,

            string blueprintId,

            string blueprintVersion,

            string catalogItemId,

            string catalogItemVersion,

            string createdAt,

            string createdBy,

            string description,

            bool? expandLastRequest,

            bool? expandProject,

            bool? expandResources,

            ImmutableArray<Outputs.GetDeploymentExpenseResult> expenses,

            string id,

            ImmutableDictionary<string, string> inputs,

            ImmutableArray<Outputs.GetDeploymentLastRequestResult> lastRequests,

            string lastUpdatedAt,

            string lastUpdatedBy,

            string leaseExpireAt,

            string name,

            string orgId,

            string? owner,

            string projectId,

            ImmutableArray<Outputs.GetDeploymentProjectResult> projects,

            ImmutableArray<Outputs.GetDeploymentResourceResult> resources,

            string status)
        {
            BlueprintContent = blueprintContent;
            BlueprintId = blueprintId;
            BlueprintVersion = blueprintVersion;
            CatalogItemId = catalogItemId;
            CatalogItemVersion = catalogItemVersion;
            CreatedAt = createdAt;
            CreatedBy = createdBy;
            Description = description;
            ExpandLastRequest = expandLastRequest;
            ExpandProject = expandProject;
            ExpandResources = expandResources;
            Expenses = expenses;
            Id = id;
            Inputs = inputs;
            LastRequests = lastRequests;
            LastUpdatedAt = lastUpdatedAt;
            LastUpdatedBy = lastUpdatedBy;
            LeaseExpireAt = leaseExpireAt;
            Name = name;
            OrgId = orgId;
            Owner = owner;
            ProjectId = projectId;
            Projects = projects;
            Resources = resources;
            Status = status;
        }
    }
}
