<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;
using Pulumi;

namespace zscaler.PulumiPackage.Zpa.EnrollmentCertificate
{
    public static class GetEnrollmentCert
    {
        /// <summary>
        /// Use the **zpa_enrollment_cert** data source to get information about all configured enrollment certificate details created in the Zscaler Private Access cloud. This data source is required when creating provisioning key resources.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using Zpa = Pulumi.Zpa;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var root = Zpa.EnrollmentCertificate.GetEnrollmentCert.Invoke(new()
        ///     {
        ///         Name = "Root",
        ///     });
        /// 
        ///     var client = Zpa.EnrollmentCertificate.GetEnrollmentCert.Invoke(new()
        ///     {
        ///         Name = "Client",
        ///     });
        /// 
        ///     var connector = Zpa.EnrollmentCertificate.GetEnrollmentCert.Invoke(new()
        ///     {
        ///         Name = "Connector",
        ///     });
        /// 
        ///     var serviceEdge = Zpa.EnrollmentCertificate.GetEnrollmentCert.Invoke(new()
        ///     {
        ///         Name = "Service Edge",
        ///     });
        /// 
        ///     var isolationClient = Zpa.EnrollmentCertificate.GetEnrollmentCert.Invoke(new()
        ///     {
        ///         Name = "Isolation Client",
        ///     });
        /// 
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetEnrollmentCertResult> InvokeAsync(GetEnrollmentCertArgs? args = null, InvokeOptions? options = null)
            => global::Pulumi.Deployment.Instance.InvokeAsync<GetEnrollmentCertResult>("zpa:EnrollmentCertificate/getEnrollmentCert:getEnrollmentCert", args ?? new GetEnrollmentCertArgs(), options.WithDefaults());

        /// <summary>
        /// Use the **zpa_enrollment_cert** data source to get information about all configured enrollment certificate details created in the Zscaler Private Access cloud. This data source is required when creating provisioning key resources.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using Zpa = Pulumi.Zpa;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var root = Zpa.EnrollmentCertificate.GetEnrollmentCert.Invoke(new()
        ///     {
        ///         Name = "Root",
        ///     });
        /// 
        ///     var client = Zpa.EnrollmentCertificate.GetEnrollmentCert.Invoke(new()
        ///     {
        ///         Name = "Client",
        ///     });
        /// 
        ///     var connector = Zpa.EnrollmentCertificate.GetEnrollmentCert.Invoke(new()
        ///     {
        ///         Name = "Connector",
        ///     });
        /// 
        ///     var serviceEdge = Zpa.EnrollmentCertificate.GetEnrollmentCert.Invoke(new()
        ///     {
        ///         Name = "Service Edge",
        ///     });
        /// 
        ///     var isolationClient = Zpa.EnrollmentCertificate.GetEnrollmentCert.Invoke(new()
        ///     {
        ///         Name = "Isolation Client",
        ///     });
        /// 
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetEnrollmentCertResult> Invoke(GetEnrollmentCertInvokeArgs? args = null, InvokeOptions? options = null)
            => global::Pulumi.Deployment.Instance.Invoke<GetEnrollmentCertResult>("zpa:EnrollmentCertificate/getEnrollmentCert:getEnrollmentCert", args ?? new GetEnrollmentCertInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetEnrollmentCertArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// The id of the enrollment certificate to be exported.
        /// </summary>
        [Input("id")]
        public string? Id { get; set; }

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

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

    public sealed class GetEnrollmentCertInvokeArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// The id of the enrollment certificate to be exported.
        /// </summary>
        [Input("id")]
        public Input<string>? Id { get; set; }

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

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


    [OutputType]
    public sealed class GetEnrollmentCertResult
    {
        /// <summary>
        /// (bool)
        /// </summary>
        public readonly bool AllowSigning;
        /// <summary>
        /// (string) The certificate text is in PEM format.
        /// </summary>
        public readonly string Certificate;
        /// <summary>
        /// (string) Returned values are:
        /// </summary>
        public readonly string ClientCertType;
        /// <summary>
        /// (string)
        /// </summary>
        public readonly string Cname;
        /// <summary>
        /// (string)
        /// </summary>
        public readonly string CreationTime;
        /// <summary>
        /// (string)
        /// </summary>
        public readonly string Csr;
        /// <summary>
        /// (string)
        /// </summary>
        public readonly string Description;
        public readonly string? Id;
        /// <summary>
        /// (string)
        /// </summary>
        public readonly string IssuedBy;
        /// <summary>
        /// (string)
        /// </summary>
        public readonly string IssuedTo;
        /// <summary>
        /// (string)
        /// </summary>
        public readonly string ModifiedBy;
        /// <summary>
        /// (string)
        /// </summary>
        public readonly string ModifiedTime;
        public readonly string? Name;
        /// <summary>
        /// (string)
        /// </summary>
        public readonly string ParentCertId;
        /// <summary>
        /// (string)
        /// </summary>
        public readonly string ParentCertName;
        public readonly string PrivateKey;
        public readonly bool PrivateKeyPresent;
        /// <summary>
        /// (string)
        /// </summary>
        public readonly string SerialNo;
        /// <summary>
        /// (string)
        /// </summary>
        public readonly string ValidFromInEpochSec;
        public readonly string ValidToInEpochSec;
        public readonly string ZrsaEncryptedPrivateKey;
        public readonly string ZrsaEncryptedSessionKey;

        [OutputConstructor]
        private GetEnrollmentCertResult(
            bool allowSigning,

            string certificate,

            string clientCertType,

            string cname,

            string creationTime,

            string csr,

            string description,

            string? id,

            string issuedBy,

            string issuedTo,

            string modifiedBy,

            string modifiedTime,

            string? name,

            string parentCertId,

            string parentCertName,

            string privateKey,

            bool privateKeyPresent,

            string serialNo,

            string validFromInEpochSec,

            string validToInEpochSec,

            string zrsaEncryptedPrivateKey,

            string zrsaEncryptedSessionKey)
        {
            AllowSigning = allowSigning;
            Certificate = certificate;
            ClientCertType = clientCertType;
            Cname = cname;
            CreationTime = creationTime;
            Csr = csr;
            Description = description;
            Id = id;
            IssuedBy = issuedBy;
            IssuedTo = issuedTo;
            ModifiedBy = modifiedBy;
            ModifiedTime = modifiedTime;
            Name = name;
            ParentCertId = parentCertId;
            ParentCertName = parentCertName;
            PrivateKey = privateKey;
            PrivateKeyPresent = privateKeyPresent;
            SerialNo = serialNo;
            ValidFromInEpochSec = validFromInEpochSec;
            ValidToInEpochSec = validToInEpochSec;
            ZrsaEncryptedPrivateKey = zrsaEncryptedPrivateKey;
            ZrsaEncryptedSessionKey = zrsaEncryptedSessionKey;
        }
    }
}
