// *** 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 luxifer.Scaleway
{
    [ScalewayResourceType("scaleway:index/lbCertificate:LbCertificate")]
    public partial class LbCertificate : global::Pulumi.CustomResource
    {
        /// <summary>
        /// Main domain of the certificate. A new certificate will be created if this field is changed.
        /// </summary>
        [Output("commonName")]
        public Output<string> CommonName { get; private set; } = null!;

        /// <summary>
        /// Configuration block for custom certificate chain. Only one of `letsencrypt` and `custom_certificate` should be specified.
        /// </summary>
        [Output("customCertificate")]
        public Output<Outputs.LbCertificateCustomCertificate?> CustomCertificate { get; private set; } = null!;

        /// <summary>
        /// The identifier (SHA-1) of the certificate
        /// </summary>
        [Output("fingerprint")]
        public Output<string> Fingerprint { get; private set; } = null!;

        /// <summary>
        /// The load-balancer ID this certificate is attached to.
        /// </summary>
        [Output("lbId")]
        public Output<string> LbId { get; private set; } = null!;

        /// <summary>
        /// Configuration block for Let's Encrypt configuration. Only one of `letsencrypt` and `custom_certificate` should be specified.
        /// </summary>
        [Output("letsencrypt")]
        public Output<Outputs.LbCertificateLetsencrypt?> Letsencrypt { get; private set; } = null!;

        /// <summary>
        /// The name of the certificate backend.
        /// </summary>
        [Output("name")]
        public Output<string> Name { get; private set; } = null!;

        /// <summary>
        /// The not valid after validity bound timestamp
        /// </summary>
        [Output("notValidAfter")]
        public Output<string> NotValidAfter { get; private set; } = null!;

        /// <summary>
        /// The not valid before validity bound timestamp
        /// </summary>
        [Output("notValidBefore")]
        public Output<string> NotValidBefore { get; private set; } = null!;

        /// <summary>
        /// Certificate status
        /// </summary>
        [Output("status")]
        public Output<string> Status { get; private set; } = null!;

        /// <summary>
        /// Array of alternative domain names.  A new certificate will be created if this field is changed.
        /// </summary>
        [Output("subjectAlternativeNames")]
        public Output<ImmutableArray<string>> SubjectAlternativeNames { get; private set; } = null!;


        /// <summary>
        /// Create a LbCertificate 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 LbCertificate(string name, LbCertificateArgs args, CustomResourceOptions? options = null)
            : base("scaleway:index/lbCertificate:LbCertificate", name, args ?? new LbCertificateArgs(), MakeResourceOptions(options, ""))
        {
        }

        private LbCertificate(string name, Input<string> id, LbCertificateState? state = null, CustomResourceOptions? options = null)
            : base("scaleway:index/lbCertificate:LbCertificate", 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/luxifer/pulumi-scaleway",
            };
            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 LbCertificate 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 LbCertificate Get(string name, Input<string> id, LbCertificateState? state = null, CustomResourceOptions? options = null)
        {
            return new LbCertificate(name, id, state, options);
        }
    }

    public sealed class LbCertificateArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Configuration block for custom certificate chain. Only one of `letsencrypt` and `custom_certificate` should be specified.
        /// </summary>
        [Input("customCertificate")]
        public Input<Inputs.LbCertificateCustomCertificateArgs>? CustomCertificate { get; set; }

        /// <summary>
        /// The load-balancer ID this certificate is attached to.
        /// </summary>
        [Input("lbId", required: true)]
        public Input<string> LbId { get; set; } = null!;

        /// <summary>
        /// Configuration block for Let's Encrypt configuration. Only one of `letsencrypt` and `custom_certificate` should be specified.
        /// </summary>
        [Input("letsencrypt")]
        public Input<Inputs.LbCertificateLetsencryptArgs>? Letsencrypt { get; set; }

        /// <summary>
        /// The name of the certificate backend.
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

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

    public sealed class LbCertificateState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Main domain of the certificate. A new certificate will be created if this field is changed.
        /// </summary>
        [Input("commonName")]
        public Input<string>? CommonName { get; set; }

        /// <summary>
        /// Configuration block for custom certificate chain. Only one of `letsencrypt` and `custom_certificate` should be specified.
        /// </summary>
        [Input("customCertificate")]
        public Input<Inputs.LbCertificateCustomCertificateGetArgs>? CustomCertificate { get; set; }

        /// <summary>
        /// The identifier (SHA-1) of the certificate
        /// </summary>
        [Input("fingerprint")]
        public Input<string>? Fingerprint { get; set; }

        /// <summary>
        /// The load-balancer ID this certificate is attached to.
        /// </summary>
        [Input("lbId")]
        public Input<string>? LbId { get; set; }

        /// <summary>
        /// Configuration block for Let's Encrypt configuration. Only one of `letsencrypt` and `custom_certificate` should be specified.
        /// </summary>
        [Input("letsencrypt")]
        public Input<Inputs.LbCertificateLetsencryptGetArgs>? Letsencrypt { get; set; }

        /// <summary>
        /// The name of the certificate backend.
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        /// <summary>
        /// The not valid after validity bound timestamp
        /// </summary>
        [Input("notValidAfter")]
        public Input<string>? NotValidAfter { get; set; }

        /// <summary>
        /// The not valid before validity bound timestamp
        /// </summary>
        [Input("notValidBefore")]
        public Input<string>? NotValidBefore { get; set; }

        /// <summary>
        /// Certificate status
        /// </summary>
        [Input("status")]
        public Input<string>? Status { get; set; }

        [Input("subjectAlternativeNames")]
        private InputList<string>? _subjectAlternativeNames;

        /// <summary>
        /// Array of alternative domain names.  A new certificate will be created if this field is changed.
        /// </summary>
        public InputList<string> SubjectAlternativeNames
        {
            get => _subjectAlternativeNames ?? (_subjectAlternativeNames = new InputList<string>());
            set => _subjectAlternativeNames = value;
        }

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