<gh_stars>0// *** 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.Scdn
{
    /// <summary>
    /// Provides a SCDN Domain resource.
    /// 
    /// For information about SCDN Domain and how to use it, see [What is Domain](https://help.aliyun.com/document_detail/63672.html).
    /// 
    /// &gt; **NOTE:** Available in v1.131.0+.
    /// 
    /// ## Example Usage
    /// 
    /// Basic Usage
    /// 
    /// ```csharp
    /// using System.Collections.Generic;
    /// using Pulumi;
    /// using AliCloud = Pulumi.AliCloud;
    /// 
    /// return await Deployment.RunAsync(() =&gt; 
    /// {
    ///     var example = new AliCloud.Scdn.Domain("example", new()
    ///     {
    ///         DomainName = "my-Domain",
    ///         Sources = new[]
    ///         {
    ///             new AliCloud.Scdn.Inputs.DomainSourceArgs
    ///             {
    ///                 Content = "xxx.aliyuncs.com",
    ///                 Enabled = "online",
    ///                 Port = 80,
    ///                 Priority = "20",
    ///                 Type = "oss",
    ///             },
    ///         },
    ///     });
    /// 
    /// });
    /// ```
    /// 
    /// ## Import
    /// 
    /// SCDN Domain can be imported using the id, e.g.
    /// 
    /// ```sh
    ///  $ pulumi import alicloud:scdn/domain:Domain example &lt;domain_name&gt;
    /// ```
    /// </summary>
    [AliCloudResourceType("alicloud:scdn/domain:Domain")]
    public partial class Domain : global::Pulumi.CustomResource
    {
        /// <summary>
        /// Attribute perm has been deprecated and suggest removing it from your template.
        /// </summary>
        [Output("bizName")]
        public Output<string?> BizName { get; private set; } = null!;

        /// <summary>
        /// Certificate Information. See the following `Block cert_infos`.
        /// </summary>
        [Output("certInfos")]
        public Output<ImmutableArray<Outputs.DomainCertInfo>> CertInfos { get; private set; } = null!;

        /// <summary>
        /// The health check url.
        /// </summary>
        [Output("checkUrl")]
        public Output<string?> CheckUrl { get; private set; } = null!;

        /// <summary>
        /// The name of domain.
        /// </summary>
        [Output("domainName")]
        public Output<string> DomainName { get; private set; } = null!;

        /// <summary>
        /// Whether to set certificate forcibly.
        /// </summary>
        [Output("forceSet")]
        public Output<string?> ForceSet { get; private set; } = null!;

        /// <summary>
        /// The resource group id.
        /// </summary>
        [Output("resourceGroupId")]
        public Output<string> ResourceGroupId { get; private set; } = null!;

        /// <summary>
        /// the Origin Server Information. See the following `Block sources`.
        /// </summary>
        [Output("sources")]
        public Output<ImmutableArray<Outputs.DomainSource>> Sources { get; private set; } = null!;

        /// <summary>
        /// The status of the resource. Valid values: `offline`, `online`.
        /// </summary>
        [Output("status")]
        public Output<string> Status { get; private set; } = null!;


        /// <summary>
        /// Create a Domain 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 Domain(string name, DomainArgs args, CustomResourceOptions? options = null)
            : base("alicloud:scdn/domain:Domain", name, args ?? new DomainArgs(), MakeResourceOptions(options, ""))
        {
        }

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

    public sealed class DomainArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Attribute perm has been deprecated and suggest removing it from your template.
        /// </summary>
        [Input("bizName")]
        public Input<string>? BizName { get; set; }

        [Input("certInfos")]
        private InputList<Inputs.DomainCertInfoArgs>? _certInfos;

        /// <summary>
        /// Certificate Information. See the following `Block cert_infos`.
        /// </summary>
        public InputList<Inputs.DomainCertInfoArgs> CertInfos
        {
            get => _certInfos ?? (_certInfos = new InputList<Inputs.DomainCertInfoArgs>());
            set => _certInfos = value;
        }

        /// <summary>
        /// The health check url.
        /// </summary>
        [Input("checkUrl")]
        public Input<string>? CheckUrl { get; set; }

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

        /// <summary>
        /// Whether to set certificate forcibly.
        /// </summary>
        [Input("forceSet")]
        public Input<string>? ForceSet { get; set; }

        /// <summary>
        /// The resource group id.
        /// </summary>
        [Input("resourceGroupId")]
        public Input<string>? ResourceGroupId { get; set; }

        [Input("sources", required: true)]
        private InputList<Inputs.DomainSourceArgs>? _sources;

        /// <summary>
        /// the Origin Server Information. See the following `Block sources`.
        /// </summary>
        public InputList<Inputs.DomainSourceArgs> Sources
        {
            get => _sources ?? (_sources = new InputList<Inputs.DomainSourceArgs>());
            set => _sources = value;
        }

        /// <summary>
        /// The status of the resource. Valid values: `offline`, `online`.
        /// </summary>
        [Input("status")]
        public Input<string>? Status { get; set; }

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

    public sealed class DomainState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Attribute perm has been deprecated and suggest removing it from your template.
        /// </summary>
        [Input("bizName")]
        public Input<string>? BizName { get; set; }

        [Input("certInfos")]
        private InputList<Inputs.DomainCertInfoGetArgs>? _certInfos;

        /// <summary>
        /// Certificate Information. See the following `Block cert_infos`.
        /// </summary>
        public InputList<Inputs.DomainCertInfoGetArgs> CertInfos
        {
            get => _certInfos ?? (_certInfos = new InputList<Inputs.DomainCertInfoGetArgs>());
            set => _certInfos = value;
        }

        /// <summary>
        /// The health check url.
        /// </summary>
        [Input("checkUrl")]
        public Input<string>? CheckUrl { get; set; }

        /// <summary>
        /// The name of domain.
        /// </summary>
        [Input("domainName")]
        public Input<string>? DomainName { get; set; }

        /// <summary>
        /// Whether to set certificate forcibly.
        /// </summary>
        [Input("forceSet")]
        public Input<string>? ForceSet { get; set; }

        /// <summary>
        /// The resource group id.
        /// </summary>
        [Input("resourceGroupId")]
        public Input<string>? ResourceGroupId { get; set; }

        [Input("sources")]
        private InputList<Inputs.DomainSourceGetArgs>? _sources;

        /// <summary>
        /// the Origin Server Information. See the following `Block sources`.
        /// </summary>
        public InputList<Inputs.DomainSourceGetArgs> Sources
        {
            get => _sources ?? (_sources = new InputList<Inputs.DomainSourceGetArgs>());
            set => _sources = value;
        }

        /// <summary>
        /// The status of the resource. Valid values: `offline`, `online`.
        /// </summary>
        [Input("status")]
        public Input<string>? Status { get; set; }

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