// *** 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.Css
{
    /// <summary>
    /// Provides a resource to create a css play_domain_cert_attachment.
    /// This resource is used for binding the play domain and specified certification together.
    /// 
    /// ## Example Usage
    /// 
    /// ```csharp
    /// using Pulumi;
    /// using Tencentcloud = Pulumi.Tencentcloud;
    /// using Tencentcloud = TencentCloudIAC.PulumiPackage.Tencentcloud;
    /// 
    /// class MyStack : Stack
    /// {
    ///     public MyStack()
    ///     {
    ///         var foo = Output.Create(Tencentcloud.Ssl.GetCertificates.InvokeAsync(new Tencentcloud.Ssl.GetCertificatesArgs
    ///         {
    ///             Name = "your_ssl_cert",
    ///         }));
    ///         var playDomainCertAttachment = new Tencentcloud.Css.PlayDomainCertAttachment("playDomainCertAttachment", new Tencentcloud.Css.PlayDomainCertAttachmentArgs
    ///         {
    ///             CloudCertId = foo.Apply(foo =&gt; foo.Certificates?[0]?.Id),
    ///             DomainInfo = new Tencentcloud.Css.Inputs.PlayDomainCertAttachmentDomainInfoArgs
    ///             {
    ///                 DomainName = "your_domain_name",
    ///                 Status = 1,
    ///             },
    ///         });
    ///     }
    /// 
    /// }
    /// ```
    /// 
    /// ## Import
    /// 
    /// css play_domain_cert_attachment can be imported using the id, e.g.
    /// 
    /// ```sh
    ///  $ pulumi import tencentcloud:Css/playDomainCertAttachment:PlayDomainCertAttachment play_domain_cert_attachment domainName#cloudCertId
    /// ```
    /// </summary>
    [TencentcloudResourceType("tencentcloud:Css/playDomainCertAttachment:PlayDomainCertAttachment")]
    public partial class PlayDomainCertAttachment : Pulumi.CustomResource
    {
        /// <summary>
        /// certificate expiration time.
        /// </summary>
        [Output("certExpireTime")]
        public Output<string> CertExpireTime { get; private set; } = null!;

        /// <summary>
        /// certificate ID.
        /// </summary>
        [Output("certId")]
        public Output<int> CertId { get; private set; } = null!;

        /// <summary>
        /// certificate type. 0: Self-owned certificate, 1: Tencent Cloud ssl managed certificate.
        /// </summary>
        [Output("certType")]
        public Output<int> CertType { get; private set; } = null!;

        /// <summary>
        /// certificate remarks. Synonymous with CertName.
        /// </summary>
        [Output("certificateAlias")]
        public Output<string> CertificateAlias { get; private set; } = null!;

        /// <summary>
        /// Tencent cloud ssl certificate Id. Refer to `tencentcloud.Ssl.Certificate` to create or obtain the resource ID.
        /// </summary>
        [Output("cloudCertId")]
        public Output<string?> CloudCertId { get; private set; } = null!;

        /// <summary>
        /// The playback domains to bind and whether to enable HTTPS for them. If `CloudCertId` is unspecified, and a domain is already bound with a certificate, this API will only update the HTTPS configuration of the domain.
        /// </summary>
        [Output("domainInfo")]
        public Output<Outputs.PlayDomainCertAttachmentDomainInfo> DomainInfo { get; private set; } = null!;

        /// <summary>
        /// The time when the rule was last updated.
        /// </summary>
        [Output("updateTime")]
        public Output<string> UpdateTime { get; private set; } = null!;


        /// <summary>
        /// Create a PlayDomainCertAttachment 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 PlayDomainCertAttachment(string name, PlayDomainCertAttachmentArgs args, CustomResourceOptions? options = null)
            : base("tencentcloud:Css/playDomainCertAttachment:PlayDomainCertAttachment", name, args ?? new PlayDomainCertAttachmentArgs(), MakeResourceOptions(options, ""))
        {
        }

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

    public sealed class PlayDomainCertAttachmentArgs : Pulumi.ResourceArgs
    {
        /// <summary>
        /// Tencent cloud ssl certificate Id. Refer to `tencentcloud.Ssl.Certificate` to create or obtain the resource ID.
        /// </summary>
        [Input("cloudCertId")]
        public Input<string>? CloudCertId { get; set; }

        /// <summary>
        /// The playback domains to bind and whether to enable HTTPS for them. If `CloudCertId` is unspecified, and a domain is already bound with a certificate, this API will only update the HTTPS configuration of the domain.
        /// </summary>
        [Input("domainInfo", required: true)]
        public Input<Inputs.PlayDomainCertAttachmentDomainInfoArgs> DomainInfo { get; set; } = null!;

        public PlayDomainCertAttachmentArgs()
        {
        }
    }

    public sealed class PlayDomainCertAttachmentState : Pulumi.ResourceArgs
    {
        /// <summary>
        /// certificate expiration time.
        /// </summary>
        [Input("certExpireTime")]
        public Input<string>? CertExpireTime { get; set; }

        /// <summary>
        /// certificate ID.
        /// </summary>
        [Input("certId")]
        public Input<int>? CertId { get; set; }

        /// <summary>
        /// certificate type. 0: Self-owned certificate, 1: Tencent Cloud ssl managed certificate.
        /// </summary>
        [Input("certType")]
        public Input<int>? CertType { get; set; }

        /// <summary>
        /// certificate remarks. Synonymous with CertName.
        /// </summary>
        [Input("certificateAlias")]
        public Input<string>? CertificateAlias { get; set; }

        /// <summary>
        /// Tencent cloud ssl certificate Id. Refer to `tencentcloud.Ssl.Certificate` to create or obtain the resource ID.
        /// </summary>
        [Input("cloudCertId")]
        public Input<string>? CloudCertId { get; set; }

        /// <summary>
        /// The playback domains to bind and whether to enable HTTPS for them. If `CloudCertId` is unspecified, and a domain is already bound with a certificate, this API will only update the HTTPS configuration of the domain.
        /// </summary>
        [Input("domainInfo")]
        public Input<Inputs.PlayDomainCertAttachmentDomainInfoGetArgs>? DomainInfo { get; set; }

        /// <summary>
        /// The time when the rule was last updated.
        /// </summary>
        [Input("updateTime")]
        public Input<string>? UpdateTime { get; set; }

        public PlayDomainCertAttachmentState()
        {
        }
    }
}
