<filename>sdk/dotnet/Edas/ApplicationDeployment.cs// *** 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;

namespace Pulumi.AliCloud.Edas
{
    /// <summary>
    /// Deploys applications on EDAS.
    /// 
    /// &gt; **NOTE:** Available in 1.82.0+
    /// 
    /// ## Example Usage
    /// 
    /// Basic Usage
    /// 
    /// ```csharp
    /// using System.Collections.Generic;
    /// using Pulumi;
    /// using AliCloud = Pulumi.AliCloud;
    /// 
    /// return await Deployment.RunAsync(() =&gt; 
    /// {
    ///     var @default = new AliCloud.Edas.ApplicationDeployment("default", new()
    ///     {
    ///         AppId = @var.App_id,
    ///         GroupId = @var.Group_id,
    ///         PackageVersion = @var.Package_version,
    ///         WarUrl = @var.War_url,
    ///     });
    /// 
    /// });
    /// ```
    /// </summary>
    [AliCloudResourceType("alicloud:edas/applicationDeployment:ApplicationDeployment")]
    public partial class ApplicationDeployment : global::Pulumi.CustomResource
    {
        /// <summary>
        /// The ID of the application that you want to deploy.
        /// </summary>
        [Output("appId")]
        public Output<string> AppId { get; private set; } = null!;

        /// <summary>
        /// The ID of the instance group where the application is going to be deployed. Set this parameter to all if you want to deploy the application to all groups.
        /// </summary>
        [Output("groupId")]
        public Output<string> GroupId { get; private set; } = null!;

        /// <summary>
        /// Last package version deployed.
        /// </summary>
        [Output("lastPackageVersion")]
        public Output<string> LastPackageVersion { get; private set; } = null!;

        /// <summary>
        /// The version of the application that you want to deploy. It must be unique for every application. The length cannot exceed 64 characters. We recommended you to use a timestamp.
        /// </summary>
        [Output("packageVersion")]
        public Output<string?> PackageVersion { get; private set; } = null!;

        /// <summary>
        /// The address to store the uploaded web application (WAR) package for application deployment. This parameter is required when the deployType parameter is set as url.
        /// </summary>
        [Output("warUrl")]
        public Output<string> WarUrl { get; private set; } = null!;


        /// <summary>
        /// Create a ApplicationDeployment resource with the given unique name, arguments, and options.
        /// </summary>
        ///
        /// <param name="name">The unique name of the resource</param>
        /// <param name="args">The arguments used to populate this resource's properties</param>
        /// <param name="options">A bag of options that control this resource's behavior</param>
        public ApplicationDeployment(string name, ApplicationDeploymentArgs args, CustomResourceOptions? options = null)
            : base("alicloud:edas/applicationDeployment:ApplicationDeployment", name, args ?? new ApplicationDeploymentArgs(), MakeResourceOptions(options, ""))
        {
        }

        private ApplicationDeployment(string name, Input<string> id, ApplicationDeploymentState? state = null, CustomResourceOptions? options = null)
            : base("alicloud:edas/applicationDeployment:ApplicationDeployment", name, state, MakeResourceOptions(options, id))
        {
        }

        private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input<string>? id)
        {
            var defaultOptions = new CustomResourceOptions
            {
                Version = Utilities.Version,
                PluginDownloadURL = "github://api.github.com/rhysmdnz/pulumi-alicloud",
            };
            var merged = CustomResourceOptions.Merge(defaultOptions, options);
            // Override the ID if one was specified for consistency with other language SDKs.
            merged.Id = id ?? merged.Id;
            return merged;
        }
        /// <summary>
        /// Get an existing ApplicationDeployment resource's state with the given name, ID, and optional extra
        /// properties used to qualify the lookup.
        /// </summary>
        ///
        /// <param name="name">The unique name of the resulting resource.</param>
        /// <param name="id">The unique provider ID of the resource to lookup.</param>
        /// <param name="state">Any extra arguments used during the lookup.</param>
        /// <param name="options">A bag of options that control this resource's behavior</param>
        public static ApplicationDeployment Get(string name, Input<string> id, ApplicationDeploymentState? state = null, CustomResourceOptions? options = null)
        {
            return new ApplicationDeployment(name, id, state, options);
        }
    }

    public sealed class ApplicationDeploymentArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// The ID of the application that you want to deploy.
        /// </summary>
        [Input("appId", required: true)]
        public Input<string> AppId { get; set; } = null!;

        /// <summary>
        /// The ID of the instance group where the application is going to be deployed. Set this parameter to all if you want to deploy the application to all groups.
        /// </summary>
        [Input("groupId", required: true)]
        public Input<string> GroupId { get; set; } = null!;

        /// <summary>
        /// The version of the application that you want to deploy. It must be unique for every application. The length cannot exceed 64 characters. We recommended you to use a timestamp.
        /// </summary>
        [Input("packageVersion")]
        public Input<string>? PackageVersion { get; set; }

        /// <summary>
        /// The address to store the uploaded web application (WAR) package for application deployment. This parameter is required when the deployType parameter is set as url.
        /// </summary>
        [Input("warUrl", required: true)]
        public Input<string> WarUrl { get; set; } = null!;

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

    public sealed class ApplicationDeploymentState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// The ID of the application that you want to deploy.
        /// </summary>
        [Input("appId")]
        public Input<string>? AppId { get; set; }

        /// <summary>
        /// The ID of the instance group where the application is going to be deployed. Set this parameter to all if you want to deploy the application to all groups.
        /// </summary>
        [Input("groupId")]
        public Input<string>? GroupId { get; set; }

        /// <summary>
        /// Last package version deployed.
        /// </summary>
        [Input("lastPackageVersion")]
        public Input<string>? LastPackageVersion { get; set; }

        /// <summary>
        /// The version of the application that you want to deploy. It must be unique for every application. The length cannot exceed 64 characters. We recommended you to use a timestamp.
        /// </summary>
        [Input("packageVersion")]
        public Input<string>? PackageVersion { get; set; }

        /// <summary>
        /// The address to store the uploaded web application (WAR) package for application deployment. This parameter is required when the deployType parameter is set as url.
        /// </summary>
        [Input("warUrl")]
        public Input<string>? WarUrl { get; set; }

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