// *** 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.Tcm
{
    /// <summary>
    /// Provides a resource to create a tcm tracing_config
    /// 
    /// &gt; **NOTE:** If you use the config attribute tracing in tencentcloud_tcm_mesh, do not use tencentcloud.Tcm.TracingConfig
    /// 
    /// ## Example Usage
    /// 
    /// ```csharp
    /// using Pulumi;
    /// using Tencentcloud = TencentCloudIAC.PulumiPackage.Tencentcloud;
    /// 
    /// class MyStack : Stack
    /// {
    ///     public MyStack()
    ///     {
    ///         var tracingConfig = new Tencentcloud.Tcm.TracingConfig("tracingConfig", new Tencentcloud.Tcm.TracingConfigArgs
    ///         {
    ///             Apm = new Tencentcloud.Tcm.Inputs.TracingConfigApmArgs
    ///             {
    ///                 Enable = true,
    ///                 InstanceId = "apm-xxx",
    ///                 Region = "ap-guangzhou",
    ///             },
    ///             Enable = true,
    ///             MeshId = "mesh-xxxxxxxx",
    ///             Sampling = "",
    ///             Zipkin = new Tencentcloud.Tcm.Inputs.TracingConfigZipkinArgs
    ///             {
    ///                 Address = "10.10.10.10:9411",
    ///             },
    ///         });
    ///         var deleteConfig = new Tencentcloud.Tcm.TracingConfig("deleteConfig", new Tencentcloud.Tcm.TracingConfigArgs
    ///         {
    ///             Apm = new Tencentcloud.Tcm.Inputs.TracingConfigApmArgs
    ///             {
    ///                 Enable = false,
    ///             },
    ///             Enable = true,
    ///             MeshId = "mesh-rofjmxxx",
    ///             Sampling = 0,
    ///             Zipkin = new Tencentcloud.Tcm.Inputs.TracingConfigZipkinArgs
    ///             {
    ///                 Address = "",
    ///             },
    ///         });
    ///     }
    /// 
    /// }
    /// ```
    /// 
    /// ## Import
    /// 
    /// tcm tracing_config can be imported using the mesh_id, e.g.
    /// 
    /// ```sh
    ///  $ pulumi import tencentcloud:Tcm/tracingConfig:TracingConfig tracing_config mesh-rofjmxxx
    /// ```
    /// </summary>
    [TencentcloudResourceType("tencentcloud:Tcm/tracingConfig:TracingConfig")]
    public partial class TracingConfig : Pulumi.CustomResource
    {
        /// <summary>
        /// APM config.
        /// </summary>
        [Output("apm")]
        public Output<Outputs.TracingConfigApm?> Apm { get; private set; } = null!;

        /// <summary>
        /// Whether enable tracing.
        /// </summary>
        [Output("enable")]
        public Output<bool?> Enable { get; private set; } = null!;

        /// <summary>
        /// Mesh ID.
        /// </summary>
        [Output("meshId")]
        public Output<string> MeshId { get; private set; } = null!;

        /// <summary>
        /// Tracing sampling, 0.0-1.0.
        /// </summary>
        [Output("sampling")]
        public Output<double?> Sampling { get; private set; } = null!;

        /// <summary>
        /// Third party zipkin config.
        /// </summary>
        [Output("zipkin")]
        public Output<Outputs.TracingConfigZipkin?> Zipkin { get; private set; } = null!;


        /// <summary>
        /// Create a TracingConfig 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 TracingConfig(string name, TracingConfigArgs args, CustomResourceOptions? options = null)
            : base("tencentcloud:Tcm/tracingConfig:TracingConfig", name, args ?? new TracingConfigArgs(), MakeResourceOptions(options, ""))
        {
        }

        private TracingConfig(string name, Input<string> id, TracingConfigState? state = null, CustomResourceOptions? options = null)
            : base("tencentcloud:Tcm/tracingConfig:TracingConfig", 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 TracingConfig 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 TracingConfig Get(string name, Input<string> id, TracingConfigState? state = null, CustomResourceOptions? options = null)
        {
            return new TracingConfig(name, id, state, options);
        }
    }

    public sealed class TracingConfigArgs : Pulumi.ResourceArgs
    {
        /// <summary>
        /// APM config.
        /// </summary>
        [Input("apm")]
        public Input<Inputs.TracingConfigApmArgs>? Apm { get; set; }

        /// <summary>
        /// Whether enable tracing.
        /// </summary>
        [Input("enable")]
        public Input<bool>? Enable { get; set; }

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

        /// <summary>
        /// Tracing sampling, 0.0-1.0.
        /// </summary>
        [Input("sampling")]
        public Input<double>? Sampling { get; set; }

        /// <summary>
        /// Third party zipkin config.
        /// </summary>
        [Input("zipkin")]
        public Input<Inputs.TracingConfigZipkinArgs>? Zipkin { get; set; }

        public TracingConfigArgs()
        {
        }
    }

    public sealed class TracingConfigState : Pulumi.ResourceArgs
    {
        /// <summary>
        /// APM config.
        /// </summary>
        [Input("apm")]
        public Input<Inputs.TracingConfigApmGetArgs>? Apm { get; set; }

        /// <summary>
        /// Whether enable tracing.
        /// </summary>
        [Input("enable")]
        public Input<bool>? Enable { get; set; }

        /// <summary>
        /// Mesh ID.
        /// </summary>
        [Input("meshId")]
        public Input<string>? MeshId { get; set; }

        /// <summary>
        /// Tracing sampling, 0.0-1.0.
        /// </summary>
        [Input("sampling")]
        public Input<double>? Sampling { get; set; }

        /// <summary>
        /// Third party zipkin config.
        /// </summary>
        [Input("zipkin")]
        public Input<Inputs.TracingConfigZipkinGetArgs>? Zipkin { get; set; }

        public TracingConfigState()
        {
        }
    }
}
