// *** 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.Oos
{
    /// <summary>
    /// Provides a OOS Application Group resource.
    /// 
    /// For information about OOS Application Group and how to use it, see [What is Application Group](https://www.alibabacloud.com/help/en/doc-detail/120556.html).
    /// 
    /// &gt; **NOTE:** Available in v1.146.0+.
    /// 
    /// ## Example Usage
    /// 
    /// Basic Usage
    /// 
    /// ```csharp
    /// using System.Collections.Generic;
    /// using Pulumi;
    /// using AliCloud = Pulumi.AliCloud;
    /// 
    /// return await Deployment.RunAsync(() =&gt; 
    /// {
    ///     var defaultResourceGroups = AliCloud.ResourceManager.GetResourceGroups.Invoke();
    /// 
    ///     var defaultApplication = new AliCloud.Oos.Application("defaultApplication", new()
    ///     {
    ///         ResourceGroupId = defaultResourceGroups.Apply(getResourceGroupsResult =&gt; getResourceGroupsResult.Groups[0]?.Id),
    ///         ApplicationName = "example_value",
    ///         Description = "example_value",
    ///         Tags = 
    ///         {
    ///             { "Created", "TF" },
    ///         },
    ///     });
    /// 
    ///     var defaultApplicationGroup = new AliCloud.Oos.ApplicationGroup("defaultApplicationGroup", new()
    ///     {
    ///         ApplicationGroupName = @var.Name,
    ///         ApplicationName = defaultApplication.Id,
    ///         DeployRegionId = "example_value",
    ///         Description = "example_value",
    ///         ImportTagKey = "example_value",
    ///         ImportTagValue = "example_value",
    ///     });
    /// 
    /// });
    /// ```
    /// 
    /// ## Import
    /// 
    /// OOS Application Group can be imported using the id, e.g.
    /// 
    /// ```sh
    ///  $ pulumi import alicloud:oos/applicationGroup:ApplicationGroup example &lt;application_name&gt;:&lt;application_group_name&gt;
    /// ```
    /// </summary>
    [AliCloudResourceType("alicloud:oos/applicationGroup:ApplicationGroup")]
    public partial class ApplicationGroup : global::Pulumi.CustomResource
    {
        /// <summary>
        /// The name of the Application group.
        /// </summary>
        [Output("applicationGroupName")]
        public Output<string> ApplicationGroupName { get; private set; } = null!;

        /// <summary>
        /// The name of the Application.
        /// </summary>
        [Output("applicationName")]
        public Output<string> ApplicationName { get; private set; } = null!;

        /// <summary>
        /// The region ID of the deployment.
        /// </summary>
        [Output("deployRegionId")]
        public Output<string> DeployRegionId { get; private set; } = null!;

        /// <summary>
        /// Application group description information.
        /// </summary>
        [Output("description")]
        public Output<string?> Description { get; private set; } = null!;

        /// <summary>
        /// The tag key must be passed in at the same time as the tag value (import_tag_value) or none, not just one. If both `import_tag_key` and `import_tag_value` are left empty, the default is app-{ApplicationName} (application name).
        /// </summary>
        [Output("importTagKey")]
        public Output<string> ImportTagKey { get; private set; } = null!;

        /// <summary>
        /// The tag value must be passed in at the same time as the tag key (import_tag_key) or none, not just one. If both `import_tag_key` and `import_tag_value` are left empty, the default is application group name.
        /// .
        /// </summary>
        [Output("importTagValue")]
        public Output<string> ImportTagValue { get; private set; } = null!;


        /// <summary>
        /// Create a ApplicationGroup 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 ApplicationGroup(string name, ApplicationGroupArgs args, CustomResourceOptions? options = null)
            : base("alicloud:oos/applicationGroup:ApplicationGroup", name, args ?? new ApplicationGroupArgs(), MakeResourceOptions(options, ""))
        {
        }

        private ApplicationGroup(string name, Input<string> id, ApplicationGroupState? state = null, CustomResourceOptions? options = null)
            : base("alicloud:oos/applicationGroup:ApplicationGroup", 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 ApplicationGroup 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 ApplicationGroup Get(string name, Input<string> id, ApplicationGroupState? state = null, CustomResourceOptions? options = null)
        {
            return new ApplicationGroup(name, id, state, options);
        }
    }

    public sealed class ApplicationGroupArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// The name of the Application group.
        /// </summary>
        [Input("applicationGroupName", required: true)]
        public Input<string> ApplicationGroupName { get; set; } = null!;

        /// <summary>
        /// The name of the Application.
        /// </summary>
        [Input("applicationName", required: true)]
        public Input<string> ApplicationName { get; set; } = null!;

        /// <summary>
        /// The region ID of the deployment.
        /// </summary>
        [Input("deployRegionId", required: true)]
        public Input<string> DeployRegionId { get; set; } = null!;

        /// <summary>
        /// Application group description information.
        /// </summary>
        [Input("description")]
        public Input<string>? Description { get; set; }

        /// <summary>
        /// The tag key must be passed in at the same time as the tag value (import_tag_value) or none, not just one. If both `import_tag_key` and `import_tag_value` are left empty, the default is app-{ApplicationName} (application name).
        /// </summary>
        [Input("importTagKey")]
        public Input<string>? ImportTagKey { get; set; }

        /// <summary>
        /// The tag value must be passed in at the same time as the tag key (import_tag_key) or none, not just one. If both `import_tag_key` and `import_tag_value` are left empty, the default is application group name.
        /// .
        /// </summary>
        [Input("importTagValue")]
        public Input<string>? ImportTagValue { get; set; }

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

    public sealed class ApplicationGroupState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// The name of the Application group.
        /// </summary>
        [Input("applicationGroupName")]
        public Input<string>? ApplicationGroupName { get; set; }

        /// <summary>
        /// The name of the Application.
        /// </summary>
        [Input("applicationName")]
        public Input<string>? ApplicationName { get; set; }

        /// <summary>
        /// The region ID of the deployment.
        /// </summary>
        [Input("deployRegionId")]
        public Input<string>? DeployRegionId { get; set; }

        /// <summary>
        /// Application group description information.
        /// </summary>
        [Input("description")]
        public Input<string>? Description { get; set; }

        /// <summary>
        /// The tag key must be passed in at the same time as the tag value (import_tag_value) or none, not just one. If both `import_tag_key` and `import_tag_value` are left empty, the default is app-{ApplicationName} (application name).
        /// </summary>
        [Input("importTagKey")]
        public Input<string>? ImportTagKey { get; set; }

        /// <summary>
        /// The tag value must be passed in at the same time as the tag key (import_tag_key) or none, not just one. If both `import_tag_key` and `import_tag_value` are left empty, the default is application group name.
        /// .
        /// </summary>
        [Input("importTagValue")]
        public Input<string>? ImportTagValue { get; set; }

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