<filename>sdk/dotnet/Tencentcloud/Tcm/ClusterAttachment.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;
using Pulumi;

namespace TencentCloudIAC.PulumiPackage.Tencentcloud.Tcm
{
    /// <summary>
    /// Provides a resource to create a tcm cluster_attachment
    /// 
    /// ## Example Usage
    /// 
    /// ```csharp
    /// using Pulumi;
    /// using Tencentcloud = TencentCloudIAC.PulumiPackage.Tencentcloud;
    /// 
    /// class MyStack : Stack
    /// {
    ///     public MyStack()
    ///     {
    ///         var clusterAttachment = new Tencentcloud.Tcm.ClusterAttachment("clusterAttachment", new Tencentcloud.Tcm.ClusterAttachmentArgs
    ///         {
    ///             ClusterLists = 
    ///             {
    ///                 new Tencentcloud.Tcm.Inputs.ClusterAttachmentClusterListArgs
    ///                 {
    ///                     ClusterId = "cls-rc5uy6dy",
    ///                     Region = "ap-guangzhou",
    ///                     Role = "REMOTE",
    ///                     SubnetId = "subnet-lkyb3ayc",
    ///                     Type = "TKE",
    ///                     VpcId = "vpc-a1jycmbx",
    ///                 },
    ///             },
    ///             MeshId = "mesh-b9q6vf9l",
    ///         });
    ///     }
    /// 
    /// }
    /// ```
    /// 
    /// ## Import
    /// 
    /// tcm cluster_attachment can be imported using the mesh_id#cluster_id, e.g.
    /// 
    /// ```sh
    ///  $ pulumi import tencentcloud:Tcm/clusterAttachment:ClusterAttachment cluster_attachment mesh-b9q6vf9l#cls-rc5uy6dy
    /// ```
    /// </summary>
    [TencentcloudResourceType("tencentcloud:Tcm/clusterAttachment:ClusterAttachment")]
    public partial class ClusterAttachment : Pulumi.CustomResource
    {
        /// <summary>
        /// Cluster list.
        /// </summary>
        [Output("clusterLists")]
        public Output<ImmutableArray<Outputs.ClusterAttachmentClusterList>> ClusterLists { get; private set; } = null!;

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


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

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

    public sealed class ClusterAttachmentArgs : Pulumi.ResourceArgs
    {
        [Input("clusterLists")]
        private InputList<Inputs.ClusterAttachmentClusterListArgs>? _clusterLists;

        /// <summary>
        /// Cluster list.
        /// </summary>
        public InputList<Inputs.ClusterAttachmentClusterListArgs> ClusterLists
        {
            get => _clusterLists ?? (_clusterLists = new InputList<Inputs.ClusterAttachmentClusterListArgs>());
            set => _clusterLists = value;
        }

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

        public ClusterAttachmentArgs()
        {
        }
    }

    public sealed class ClusterAttachmentState : Pulumi.ResourceArgs
    {
        [Input("clusterLists")]
        private InputList<Inputs.ClusterAttachmentClusterListGetArgs>? _clusterLists;

        /// <summary>
        /// Cluster list.
        /// </summary>
        public InputList<Inputs.ClusterAttachmentClusterListGetArgs> ClusterLists
        {
            get => _clusterLists ?? (_clusterLists = new InputList<Inputs.ClusterAttachmentClusterListGetArgs>());
            set => _clusterLists = value;
        }

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

        public ClusterAttachmentState()
        {
        }
    }
}
