<filename>sdk/dotnet/Slb/ServerCertificate.cs<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.Slb
{
    /// <summary>
    /// A Load Balancer Server Certificate is an ssl Certificate used by the listener of the protocol https.
    /// 
    /// For information about slb and how to use it, see [What is Server Load Balancer](https://www.alibabacloud.com/help/doc-detail/27539.htm).
    /// 
    /// For information about Server Certificate and how to use it, see [Configure Server Certificate](https://www.alibabacloud.com/help/doc-detail/85968.htm).
    /// 
    /// ## Example Usage
    /// 
    /// * using server_certificate/private content as string example
    /// 
    /// ```csharp
    /// using System.Collections.Generic;
    /// using Pulumi;
    /// using AliCloud = Pulumi.AliCloud;
    /// 
    /// return await Deployment.RunAsync(() =&gt; 
    /// {
    ///     // create a server certificate
    ///     var foo = new AliCloud.Slb.ServerCertificate("foo", new()
    ///     {
    ///         PrivateKey = @"-----BEGIN RSA PRIVATE KEY-----
    /// MIICXAIBAAKBgQDO0knDrlNdiys******ErVpjsckAaOW/JDG5PCSwkaMxk=
    /// -----END RSA PRIVATE KEY-----
    /// ",
    ///         Certificate = @"-----BEGIN CERTIFICATE-----
    /// MIIDRjCCAq+gAwIBAgI+OuMs******XTtI90EAxEG/bJJyOm5LqoiA=
    /// -----END CERTIFICATE-----
    /// ",
    ///     });
    /// 
    /// });
    /// ```
    /// 
    /// * using server_certificate/private file example
    /// 
    /// ```csharp
    /// using System.Collections.Generic;
    /// using System.IO;
    /// using Pulumi;
    /// using AliCloud = Pulumi.AliCloud;
    /// 
    /// return await Deployment.RunAsync(() =&gt; 
    /// {
    ///     // create a server certificate
    ///     var foo = new AliCloud.Slb.ServerCertificate("foo", new()
    ///     {
    ///         Certificate = File.ReadAllText($"{path.Module}/server_certificate.pem"),
    ///         PrivateKey = File.ReadAllText($"{path.Module}/private_key.pem"),
    ///     });
    /// 
    /// });
    /// ```
    /// 
    /// ## Import
    /// 
    /// Server Load balancer Server Certificate can be imported using the id, e.g.
    /// 
    /// ```sh
    ///  $ pulumi import alicloud:slb/serverCertificate:ServerCertificate example abc123456
    /// ```
    /// </summary>
    [AliCloudResourceType("alicloud:slb/serverCertificate:ServerCertificate")]
    public partial class ServerCertificate : global::Pulumi.CustomResource
    {
        [Output("alicloudCertifacteId")]
        public Output<string?> AlicloudCertifacteId { get; private set; } = null!;

        [Output("alicloudCertifacteName")]
        public Output<string?> AlicloudCertifacteName { get; private set; } = null!;

        /// <summary>
        /// an id of server certificate ssued/proxied by alibaba cloud. but it is not supported on the international site of alibaba cloud now.
        /// </summary>
        [Output("alicloudCertificateId")]
        public Output<string?> AlicloudCertificateId { get; private set; } = null!;

        /// <summary>
        /// the name of the certificate specified by `alicloud_certificate_id`.but it is not supported on the international site of alibaba cloud now.
        /// </summary>
        [Output("alicloudCertificateName")]
        public Output<string?> AlicloudCertificateName { get; private set; } = null!;

        /// <summary>
        /// the region of the certificate specified by `alicloud_certificate_id`. but it is not supported on the international site of alibaba cloud now.
        /// </summary>
        [Output("alicloudCertificateRegionId")]
        public Output<string?> AlicloudCertificateRegionId { get; private set; } = null!;

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

        /// <summary>
        /// the content of privat key of the ssl certificate specified by `server_certificate`. where `alicloud_certificate_id` is null, it is required, otherwise it is ignored.
        /// </summary>
        [Output("privateKey")]
        public Output<string?> PrivateKey { get; private set; } = null!;

        /// <summary>
        /// The Id of resource group which the slb server certificate belongs.
        /// </summary>
        [Output("resourceGroupId")]
        public Output<string> ResourceGroupId { get; private set; } = null!;

        /// <summary>
        /// the content of the ssl certificate. where `alicloud_certificate_id` is null, it is required, otherwise it is ignored.
        /// </summary>
        [Output("serverCertificate")]
        public Output<string?> Certificate { get; private set; } = null!;

        /// <summary>
        /// A mapping of tags to assign to the resource.
        /// </summary>
        [Output("tags")]
        public Output<ImmutableDictionary<string, object>?> Tags { get; private set; } = null!;


        /// <summary>
        /// Create a ServerCertificate 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 ServerCertificate(string name, ServerCertificateArgs? args = null, CustomResourceOptions? options = null)
            : base("alicloud:slb/serverCertificate:ServerCertificate", name, args ?? new ServerCertificateArgs(), MakeResourceOptions(options, ""))
        {
        }

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

    public sealed class ServerCertificateArgs : global::Pulumi.ResourceArgs
    {
        [Input("alicloudCertifacteId")]
        public Input<string>? AlicloudCertifacteId { get; set; }

        [Input("alicloudCertifacteName")]
        public Input<string>? AlicloudCertifacteName { get; set; }

        /// <summary>
        /// an id of server certificate ssued/proxied by alibaba cloud. but it is not supported on the international site of alibaba cloud now.
        /// </summary>
        [Input("alicloudCertificateId")]
        public Input<string>? AlicloudCertificateId { get; set; }

        /// <summary>
        /// the name of the certificate specified by `alicloud_certificate_id`.but it is not supported on the international site of alibaba cloud now.
        /// </summary>
        [Input("alicloudCertificateName")]
        public Input<string>? AlicloudCertificateName { get; set; }

        /// <summary>
        /// the region of the certificate specified by `alicloud_certificate_id`. but it is not supported on the international site of alibaba cloud now.
        /// </summary>
        [Input("alicloudCertificateRegionId")]
        public Input<string>? AlicloudCertificateRegionId { get; set; }

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

        /// <summary>
        /// the content of privat key of the ssl certificate specified by `server_certificate`. where `alicloud_certificate_id` is null, it is required, otherwise it is ignored.
        /// </summary>
        [Input("privateKey")]
        public Input<string>? PrivateKey { get; set; }

        /// <summary>
        /// The Id of resource group which the slb server certificate belongs.
        /// </summary>
        [Input("resourceGroupId")]
        public Input<string>? ResourceGroupId { get; set; }

        /// <summary>
        /// the content of the ssl certificate. where `alicloud_certificate_id` is null, it is required, otherwise it is ignored.
        /// </summary>
        [Input("serverCertificate")]
        public Input<string>? Certificate { get; set; }

        [Input("tags")]
        private InputMap<object>? _tags;

        /// <summary>
        /// A mapping of tags to assign to the resource.
        /// </summary>
        public InputMap<object> Tags
        {
            get => _tags ?? (_tags = new InputMap<object>());
            set => _tags = value;
        }

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

    public sealed class ServerCertificateState : global::Pulumi.ResourceArgs
    {
        [Input("alicloudCertifacteId")]
        public Input<string>? AlicloudCertifacteId { get; set; }

        [Input("alicloudCertifacteName")]
        public Input<string>? AlicloudCertifacteName { get; set; }

        /// <summary>
        /// an id of server certificate ssued/proxied by alibaba cloud. but it is not supported on the international site of alibaba cloud now.
        /// </summary>
        [Input("alicloudCertificateId")]
        public Input<string>? AlicloudCertificateId { get; set; }

        /// <summary>
        /// the name of the certificate specified by `alicloud_certificate_id`.but it is not supported on the international site of alibaba cloud now.
        /// </summary>
        [Input("alicloudCertificateName")]
        public Input<string>? AlicloudCertificateName { get; set; }

        /// <summary>
        /// the region of the certificate specified by `alicloud_certificate_id`. but it is not supported on the international site of alibaba cloud now.
        /// </summary>
        [Input("alicloudCertificateRegionId")]
        public Input<string>? AlicloudCertificateRegionId { get; set; }

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

        /// <summary>
        /// the content of privat key of the ssl certificate specified by `server_certificate`. where `alicloud_certificate_id` is null, it is required, otherwise it is ignored.
        /// </summary>
        [Input("privateKey")]
        public Input<string>? PrivateKey { get; set; }

        /// <summary>
        /// The Id of resource group which the slb server certificate belongs.
        /// </summary>
        [Input("resourceGroupId")]
        public Input<string>? ResourceGroupId { get; set; }

        /// <summary>
        /// the content of the ssl certificate. where `alicloud_certificate_id` is null, it is required, otherwise it is ignored.
        /// </summary>
        [Input("serverCertificate")]
        public Input<string>? Certificate { get; set; }

        [Input("tags")]
        private InputMap<object>? _tags;

        /// <summary>
        /// A mapping of tags to assign to the resource.
        /// </summary>
        public InputMap<object> Tags
        {
            get => _tags ?? (_tags = new InputMap<object>());
            set => _tags = value;
        }

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