// *** 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 TencentCloudIAC.PulumiPackage.Tencentcloud.Tem
{
    /// <summary>
    /// Provides a resource to create a tem application_service
    /// 
    /// ## Example Usage
    /// 
    /// ```csharp
    /// using Pulumi;
    /// using Tencentcloud = TencentCloudIAC.PulumiPackage.Tencentcloud;
    /// 
    /// class MyStack : Stack
    /// {
    ///     public MyStack()
    ///     {
    ///         var applicationService = new Tencentcloud.Tem.ApplicationService("applicationService", new Tencentcloud.Tem.ApplicationServiceArgs
    ///         {
    ///             ApplicationId = "app-jrl3346j",
    ///             EnvironmentId = "en-dpxyydl5",
    ///             Service = new Tencentcloud.Tem.Inputs.ApplicationServiceServiceArgs
    ///             {
    ///                 PortMappingItemLists = 
    ///                 {
    ///                     new Tencentcloud.Tem.Inputs.ApplicationServiceServicePortMappingItemListArgs
    ///                     {
    ///                         Port = 80,
    ///                         Protocol = "TCP",
    ///                         TargetPort = 80,
    ///                     },
    ///                 },
    ///                 ServiceName = "test0-1",
    ///                 Type = "CLUSTER",
    ///             },
    ///         });
    ///     }
    /// 
    /// }
    /// ```
    /// 
    /// ## Import
    /// 
    /// tem application_service can be imported using the environmentId#applicationId#serviceName, e.g.
    /// 
    /// ```sh
    ///  $ pulumi import tencentcloud:Tem/applicationService:ApplicationService application_service en-dpxyydl5#app-jrl3346j#test0-1
    /// ```
    /// </summary>
    [TencentcloudResourceType("tencentcloud:Tem/applicationService:ApplicationService")]
    public partial class ApplicationService : Pulumi.CustomResource
    {
        /// <summary>
        /// application ID.
        /// </summary>
        [Output("applicationId")]
        public Output<string> ApplicationId { get; private set; } = null!;

        /// <summary>
        /// environment ID.
        /// </summary>
        [Output("environmentId")]
        public Output<string> EnvironmentId { get; private set; } = null!;

        /// <summary>
        /// service detail list.
        /// </summary>
        [Output("service")]
        public Output<Outputs.ApplicationServiceService?> Service { get; private set; } = null!;


        /// <summary>
        /// Create a ApplicationService 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 ApplicationService(string name, ApplicationServiceArgs args, CustomResourceOptions? options = null)
            : base("tencentcloud:Tem/applicationService:ApplicationService", name, args ?? new ApplicationServiceArgs(), MakeResourceOptions(options, ""))
        {
        }

        private ApplicationService(string name, Input<string> id, ApplicationServiceState? state = null, CustomResourceOptions? options = null)
            : base("tencentcloud:Tem/applicationService:ApplicationService", 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/tencentcloudstack",
            };
            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 ApplicationService 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 ApplicationService Get(string name, Input<string> id, ApplicationServiceState? state = null, CustomResourceOptions? options = null)
        {
            return new ApplicationService(name, id, state, options);
        }
    }

    public sealed class ApplicationServiceArgs : Pulumi.ResourceArgs
    {
        /// <summary>
        /// application ID.
        /// </summary>
        [Input("applicationId", required: true)]
        public Input<string> ApplicationId { get; set; } = null!;

        /// <summary>
        /// environment ID.
        /// </summary>
        [Input("environmentId", required: true)]
        public Input<string> EnvironmentId { get; set; } = null!;

        /// <summary>
        /// service detail list.
        /// </summary>
        [Input("service")]
        public Input<Inputs.ApplicationServiceServiceArgs>? Service { get; set; }

        public ApplicationServiceArgs()
        {
        }
    }

    public sealed class ApplicationServiceState : Pulumi.ResourceArgs
    {
        /// <summary>
        /// application ID.
        /// </summary>
        [Input("applicationId")]
        public Input<string>? ApplicationId { get; set; }

        /// <summary>
        /// environment ID.
        /// </summary>
        [Input("environmentId")]
        public Input<string>? EnvironmentId { get; set; }

        /// <summary>
        /// service detail list.
        /// </summary>
        [Input("service")]
        public Input<Inputs.ApplicationServiceServiceGetArgs>? Service { get; set; }

        public ApplicationServiceState()
        {
        }
    }
}
