1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. esa
  5. OriginClientCertificate
Alibaba Cloud v3.85.0 published on Tuesday, Sep 9, 2025 by Pulumi

alicloud.esa.OriginClientCertificate

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.85.0 published on Tuesday, Sep 9, 2025 by Pulumi

    Provides a ESA Origin Client Certificate resource.

    For information about ESA Origin Client Certificate and how to use it, see What is Origin Client Certificate.

    NOTE: Available since v1.255.0.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const _default = alicloud.esa.getSites({
        planSubscribeType: "enterpriseplan",
    });
    const resourceSiteOriginClientCertificateExample = new alicloud.esa.Site("resource_Site_OriginClientCertificate_example", {
        siteName: "chenxin0116.site",
        instanceId: _default.then(_default => _default.sites?.[0]?.instanceId),
        coverage: "overseas",
        accessType: "NS",
    });
    const defaultOriginClientCertificate = new alicloud.esa.OriginClientCertificate("default", {
        siteId: resourceSiteOriginClientCertificateExample.id,
        privateKey: `-----BEGIN RSA PRIVATE KEY-----
    MIICXAIBAAKBgQC+7dgpkQifIqzOU6KNkFRjZtMZOoN7/ihNf/BrYcPhLQSkcPOf
    UsTP/qvH0u965GnYFiAoK3uWGQo9aCBuoawRFKNBa9ZpJVyVbamBWTBQ/Fxsforq
    9jJNR7OWA3fxvDxgwyEkv0qsnh1zaOkjyUlxFYwDiFxZ1/RHAj/SABCubQIDAQAB
    AoGADiobBUprN1MdOtldj98LQ6yXMKH0qzg5yTYaofzIyWXLmF+A02sSitO77sEp
    Xxae+5b4n8JKEuKcrd2RumNoHmN47iLQ0M2eodjUQ96kzm5Esq6nln62/NF5KLuK
    JDw63nTsg6K0O+gQZv4SYjZAL3cswSmeQmvmcoNgArfcaoECQQDgYy6S91ZIUsLx
    6BB3tW+x7APYnvKysYbcKUEP8AutZSo4hdMfPQkOD0LwP5dWsrNippDWjNDiPZmt
    VKuZDoDdAkEA2dPxy1eQeJsRYTZmTWIuh3UY9xlL3G9skcSOM4LbFidroHWW9UDJ
    JDSSEMH2+/4quYTdPr28cj7RCjqL0brC0QJABXDCL1QJ5oUDLwRWaeCfTawQR89K
    ySRexbXGWxGR5uleBbLQ9J/xOUMLd3HDRJnemZS6TElrwyCFOlukMXjVjQJBALr5
    QC0opmu/vzVQepOl2QaQrrM7VXCLfAfLTbxNcD0d7TY4eTFfQMgBD/euZpB65LWF
    pFs8hcsSvGApTObjhmECQEydB1zzjU6kH171XlXCtRFnbORu2IB7rMsDP2CBPHyR
    tYBjBNVHIUGcmrMVFX4LeMuvvmUyzwfgLmLchHxbDP8=
    -----END RSA PRIVATE KEY-----
    `,
        hostnames: [
            "www.example1.com",
            "www.example2.com",
            "www.example3.com",
        ],
        originClientCertificateName: "exampleCertificate",
        certificate: `-----BEGIN CERTIFICATE-----
    MIICQTCCAaoCCQCFfdyqahygLzANBgkqhkiG9w0BAQUFADBlMQswCQYDVQQGEwJj
    bjEQMA4GA1UECAwHYmVpamluZzEQMA4GA1UEBwwHYmVpamluZzERMA8GA1UECgwI
    YWxpY2xvdWQxEDAOBgNVBAsMB2FsaWJhYmExDTALBgNVBAMMBHRlc3QwHhcNMjAw
    ODA2MTAwMDAyWhcNMzAwODA0MTAwMDAyWjBlMQswCQYDVQQGEwJjbjEQMA4GA1UE
    CAwHYmVpamluZzEQMA4GA1UEBwwHYmVpamluZzERMA8GA1UECgwIYWxpY2xvdWQx
    EDAOBgNVBAsMB2FsaWJhYmExDTALBgNVBAMMBHRlc3QwgZ8wDQYJKoZIhvcNAQEB
    BQADgY0AMIGJAoGBAL7t2CmRCJ8irM5Too2QVGNm0xk6g3v+KE1/8Gthw+EtBKRw
    859SxM/+q8fS73rkadgWICgre5YZCj1oIG6hrBEUo0Fr1mklXJVtqYFZMFD8XGx+
    iur2Mk1Hs5YDd/G8PGDDISS/SqyeHXNo6SPJSXEVjAOIXFnX9EcCP9IAEK5tAgMB
    AAEwDQYJKoZIhvcNAQEFBQADgYEAavYdM9s5jLFP9/ZPCrsRuRsjSJpe5y9VZL+1
    +Ebbw16V0xMYaqODyFH1meLRW/A4xUs15Ny2vLYOW15Mriif7Sixty3HUedBFa4l
    y6/gQ+mBEeZYzMaTTFgyzEZDMsfZxwV9GKfhOzAmK3jZ2LDpHIhnlJN4WwVf0lME
    pCPDN7g=
    -----END CERTIFICATE-----
    `,
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    default = alicloud.esa.get_sites(plan_subscribe_type="enterpriseplan")
    resource_site_origin_client_certificate_example = alicloud.esa.Site("resource_Site_OriginClientCertificate_example",
        site_name="chenxin0116.site",
        instance_id=default.sites[0].instance_id,
        coverage="overseas",
        access_type="NS")
    default_origin_client_certificate = alicloud.esa.OriginClientCertificate("default",
        site_id=resource_site_origin_client_certificate_example.id,
        private_key="""-----BEGIN RSA PRIVATE KEY-----
    MIICXAIBAAKBgQC+7dgpkQifIqzOU6KNkFRjZtMZOoN7/ihNf/BrYcPhLQSkcPOf
    UsTP/qvH0u965GnYFiAoK3uWGQo9aCBuoawRFKNBa9ZpJVyVbamBWTBQ/Fxsforq
    9jJNR7OWA3fxvDxgwyEkv0qsnh1zaOkjyUlxFYwDiFxZ1/RHAj/SABCubQIDAQAB
    AoGADiobBUprN1MdOtldj98LQ6yXMKH0qzg5yTYaofzIyWXLmF+A02sSitO77sEp
    Xxae+5b4n8JKEuKcrd2RumNoHmN47iLQ0M2eodjUQ96kzm5Esq6nln62/NF5KLuK
    JDw63nTsg6K0O+gQZv4SYjZAL3cswSmeQmvmcoNgArfcaoECQQDgYy6S91ZIUsLx
    6BB3tW+x7APYnvKysYbcKUEP8AutZSo4hdMfPQkOD0LwP5dWsrNippDWjNDiPZmt
    VKuZDoDdAkEA2dPxy1eQeJsRYTZmTWIuh3UY9xlL3G9skcSOM4LbFidroHWW9UDJ
    JDSSEMH2+/4quYTdPr28cj7RCjqL0brC0QJABXDCL1QJ5oUDLwRWaeCfTawQR89K
    ySRexbXGWxGR5uleBbLQ9J/xOUMLd3HDRJnemZS6TElrwyCFOlukMXjVjQJBALr5
    QC0opmu/vzVQepOl2QaQrrM7VXCLfAfLTbxNcD0d7TY4eTFfQMgBD/euZpB65LWF
    pFs8hcsSvGApTObjhmECQEydB1zzjU6kH171XlXCtRFnbORu2IB7rMsDP2CBPHyR
    tYBjBNVHIUGcmrMVFX4LeMuvvmUyzwfgLmLchHxbDP8=
    -----END RSA PRIVATE KEY-----
    """,
        hostnames=[
            "www.example1.com",
            "www.example2.com",
            "www.example3.com",
        ],
        origin_client_certificate_name="exampleCertificate",
        certificate="""-----BEGIN CERTIFICATE-----
    MIICQTCCAaoCCQCFfdyqahygLzANBgkqhkiG9w0BAQUFADBlMQswCQYDVQQGEwJj
    bjEQMA4GA1UECAwHYmVpamluZzEQMA4GA1UEBwwHYmVpamluZzERMA8GA1UECgwI
    YWxpY2xvdWQxEDAOBgNVBAsMB2FsaWJhYmExDTALBgNVBAMMBHRlc3QwHhcNMjAw
    ODA2MTAwMDAyWhcNMzAwODA0MTAwMDAyWjBlMQswCQYDVQQGEwJjbjEQMA4GA1UE
    CAwHYmVpamluZzEQMA4GA1UEBwwHYmVpamluZzERMA8GA1UECgwIYWxpY2xvdWQx
    EDAOBgNVBAsMB2FsaWJhYmExDTALBgNVBAMMBHRlc3QwgZ8wDQYJKoZIhvcNAQEB
    BQADgY0AMIGJAoGBAL7t2CmRCJ8irM5Too2QVGNm0xk6g3v+KE1/8Gthw+EtBKRw
    859SxM/+q8fS73rkadgWICgre5YZCj1oIG6hrBEUo0Fr1mklXJVtqYFZMFD8XGx+
    iur2Mk1Hs5YDd/G8PGDDISS/SqyeHXNo6SPJSXEVjAOIXFnX9EcCP9IAEK5tAgMB
    AAEwDQYJKoZIhvcNAQEFBQADgYEAavYdM9s5jLFP9/ZPCrsRuRsjSJpe5y9VZL+1
    +Ebbw16V0xMYaqODyFH1meLRW/A4xUs15Ny2vLYOW15Mriif7Sixty3HUedBFa4l
    y6/gQ+mBEeZYzMaTTFgyzEZDMsfZxwV9GKfhOzAmK3jZ2LDpHIhnlJN4WwVf0lME
    pCPDN7g=
    -----END CERTIFICATE-----
    """)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/esa"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_default, err := esa.GetSites(ctx, &esa.GetSitesArgs{
    			PlanSubscribeType: pulumi.StringRef("enterpriseplan"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		resourceSiteOriginClientCertificateExample, err := esa.NewSite(ctx, "resource_Site_OriginClientCertificate_example", &esa.SiteArgs{
    			SiteName:   pulumi.String("chenxin0116.site"),
    			InstanceId: pulumi.String(_default.Sites[0].InstanceId),
    			Coverage:   pulumi.String("overseas"),
    			AccessType: pulumi.String("NS"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = esa.NewOriginClientCertificate(ctx, "default", &esa.OriginClientCertificateArgs{
    			SiteId: resourceSiteOriginClientCertificateExample.ID(),
    			PrivateKey: pulumi.String(`-----BEGIN RSA PRIVATE KEY-----
    MIICXAIBAAKBgQC+7dgpkQifIqzOU6KNkFRjZtMZOoN7/ihNf/BrYcPhLQSkcPOf
    UsTP/qvH0u965GnYFiAoK3uWGQo9aCBuoawRFKNBa9ZpJVyVbamBWTBQ/Fxsforq
    9jJNR7OWA3fxvDxgwyEkv0qsnh1zaOkjyUlxFYwDiFxZ1/RHAj/SABCubQIDAQAB
    AoGADiobBUprN1MdOtldj98LQ6yXMKH0qzg5yTYaofzIyWXLmF+A02sSitO77sEp
    Xxae+5b4n8JKEuKcrd2RumNoHmN47iLQ0M2eodjUQ96kzm5Esq6nln62/NF5KLuK
    JDw63nTsg6K0O+gQZv4SYjZAL3cswSmeQmvmcoNgArfcaoECQQDgYy6S91ZIUsLx
    6BB3tW+x7APYnvKysYbcKUEP8AutZSo4hdMfPQkOD0LwP5dWsrNippDWjNDiPZmt
    VKuZDoDdAkEA2dPxy1eQeJsRYTZmTWIuh3UY9xlL3G9skcSOM4LbFidroHWW9UDJ
    JDSSEMH2+/4quYTdPr28cj7RCjqL0brC0QJABXDCL1QJ5oUDLwRWaeCfTawQR89K
    ySRexbXGWxGR5uleBbLQ9J/xOUMLd3HDRJnemZS6TElrwyCFOlukMXjVjQJBALr5
    QC0opmu/vzVQepOl2QaQrrM7VXCLfAfLTbxNcD0d7TY4eTFfQMgBD/euZpB65LWF
    pFs8hcsSvGApTObjhmECQEydB1zzjU6kH171XlXCtRFnbORu2IB7rMsDP2CBPHyR
    tYBjBNVHIUGcmrMVFX4LeMuvvmUyzwfgLmLchHxbDP8=
    -----END RSA PRIVATE KEY-----
    `),
    			Hostnames: pulumi.StringArray{
    				pulumi.String("www.example1.com"),
    				pulumi.String("www.example2.com"),
    				pulumi.String("www.example3.com"),
    			},
    			OriginClientCertificateName: pulumi.String("exampleCertificate"),
    			Certificate: pulumi.String(`-----BEGIN CERTIFICATE-----
    MIICQTCCAaoCCQCFfdyqahygLzANBgkqhkiG9w0BAQUFADBlMQswCQYDVQQGEwJj
    bjEQMA4GA1UECAwHYmVpamluZzEQMA4GA1UEBwwHYmVpamluZzERMA8GA1UECgwI
    YWxpY2xvdWQxEDAOBgNVBAsMB2FsaWJhYmExDTALBgNVBAMMBHRlc3QwHhcNMjAw
    ODA2MTAwMDAyWhcNMzAwODA0MTAwMDAyWjBlMQswCQYDVQQGEwJjbjEQMA4GA1UE
    CAwHYmVpamluZzEQMA4GA1UEBwwHYmVpamluZzERMA8GA1UECgwIYWxpY2xvdWQx
    EDAOBgNVBAsMB2FsaWJhYmExDTALBgNVBAMMBHRlc3QwgZ8wDQYJKoZIhvcNAQEB
    BQADgY0AMIGJAoGBAL7t2CmRCJ8irM5Too2QVGNm0xk6g3v+KE1/8Gthw+EtBKRw
    859SxM/+q8fS73rkadgWICgre5YZCj1oIG6hrBEUo0Fr1mklXJVtqYFZMFD8XGx+
    iur2Mk1Hs5YDd/G8PGDDISS/SqyeHXNo6SPJSXEVjAOIXFnX9EcCP9IAEK5tAgMB
    AAEwDQYJKoZIhvcNAQEFBQADgYEAavYdM9s5jLFP9/ZPCrsRuRsjSJpe5y9VZL+1
    +Ebbw16V0xMYaqODyFH1meLRW/A4xUs15Ny2vLYOW15Mriif7Sixty3HUedBFa4l
    y6/gQ+mBEeZYzMaTTFgyzEZDMsfZxwV9GKfhOzAmK3jZ2LDpHIhnlJN4WwVf0lME
    pCPDN7g=
    -----END CERTIFICATE-----
    `),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var @default = AliCloud.Esa.GetSites.Invoke(new()
        {
            PlanSubscribeType = "enterpriseplan",
        });
    
        var resourceSiteOriginClientCertificateExample = new AliCloud.Esa.Site("resource_Site_OriginClientCertificate_example", new()
        {
            SiteName = "chenxin0116.site",
            InstanceId = @default.Apply(@default => @default.Apply(getSitesResult => getSitesResult.Sites[0]?.InstanceId)),
            Coverage = "overseas",
            AccessType = "NS",
        });
    
        var defaultOriginClientCertificate = new AliCloud.Esa.OriginClientCertificate("default", new()
        {
            SiteId = resourceSiteOriginClientCertificateExample.Id,
            PrivateKey = @"-----BEGIN RSA PRIVATE KEY-----
    MIICXAIBAAKBgQC+7dgpkQifIqzOU6KNkFRjZtMZOoN7/ihNf/BrYcPhLQSkcPOf
    UsTP/qvH0u965GnYFiAoK3uWGQo9aCBuoawRFKNBa9ZpJVyVbamBWTBQ/Fxsforq
    9jJNR7OWA3fxvDxgwyEkv0qsnh1zaOkjyUlxFYwDiFxZ1/RHAj/SABCubQIDAQAB
    AoGADiobBUprN1MdOtldj98LQ6yXMKH0qzg5yTYaofzIyWXLmF+A02sSitO77sEp
    Xxae+5b4n8JKEuKcrd2RumNoHmN47iLQ0M2eodjUQ96kzm5Esq6nln62/NF5KLuK
    JDw63nTsg6K0O+gQZv4SYjZAL3cswSmeQmvmcoNgArfcaoECQQDgYy6S91ZIUsLx
    6BB3tW+x7APYnvKysYbcKUEP8AutZSo4hdMfPQkOD0LwP5dWsrNippDWjNDiPZmt
    VKuZDoDdAkEA2dPxy1eQeJsRYTZmTWIuh3UY9xlL3G9skcSOM4LbFidroHWW9UDJ
    JDSSEMH2+/4quYTdPr28cj7RCjqL0brC0QJABXDCL1QJ5oUDLwRWaeCfTawQR89K
    ySRexbXGWxGR5uleBbLQ9J/xOUMLd3HDRJnemZS6TElrwyCFOlukMXjVjQJBALr5
    QC0opmu/vzVQepOl2QaQrrM7VXCLfAfLTbxNcD0d7TY4eTFfQMgBD/euZpB65LWF
    pFs8hcsSvGApTObjhmECQEydB1zzjU6kH171XlXCtRFnbORu2IB7rMsDP2CBPHyR
    tYBjBNVHIUGcmrMVFX4LeMuvvmUyzwfgLmLchHxbDP8=
    -----END RSA PRIVATE KEY-----
    ",
            Hostnames = new[]
            {
                "www.example1.com",
                "www.example2.com",
                "www.example3.com",
            },
            OriginClientCertificateName = "exampleCertificate",
            Certificate = @"-----BEGIN CERTIFICATE-----
    MIICQTCCAaoCCQCFfdyqahygLzANBgkqhkiG9w0BAQUFADBlMQswCQYDVQQGEwJj
    bjEQMA4GA1UECAwHYmVpamluZzEQMA4GA1UEBwwHYmVpamluZzERMA8GA1UECgwI
    YWxpY2xvdWQxEDAOBgNVBAsMB2FsaWJhYmExDTALBgNVBAMMBHRlc3QwHhcNMjAw
    ODA2MTAwMDAyWhcNMzAwODA0MTAwMDAyWjBlMQswCQYDVQQGEwJjbjEQMA4GA1UE
    CAwHYmVpamluZzEQMA4GA1UEBwwHYmVpamluZzERMA8GA1UECgwIYWxpY2xvdWQx
    EDAOBgNVBAsMB2FsaWJhYmExDTALBgNVBAMMBHRlc3QwgZ8wDQYJKoZIhvcNAQEB
    BQADgY0AMIGJAoGBAL7t2CmRCJ8irM5Too2QVGNm0xk6g3v+KE1/8Gthw+EtBKRw
    859SxM/+q8fS73rkadgWICgre5YZCj1oIG6hrBEUo0Fr1mklXJVtqYFZMFD8XGx+
    iur2Mk1Hs5YDd/G8PGDDISS/SqyeHXNo6SPJSXEVjAOIXFnX9EcCP9IAEK5tAgMB
    AAEwDQYJKoZIhvcNAQEFBQADgYEAavYdM9s5jLFP9/ZPCrsRuRsjSJpe5y9VZL+1
    +Ebbw16V0xMYaqODyFH1meLRW/A4xUs15Ny2vLYOW15Mriif7Sixty3HUedBFa4l
    y6/gQ+mBEeZYzMaTTFgyzEZDMsfZxwV9GKfhOzAmK3jZ2LDpHIhnlJN4WwVf0lME
    pCPDN7g=
    -----END CERTIFICATE-----
    ",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.esa.EsaFunctions;
    import com.pulumi.alicloud.esa.inputs.GetSitesArgs;
    import com.pulumi.alicloud.esa.Site;
    import com.pulumi.alicloud.esa.SiteArgs;
    import com.pulumi.alicloud.esa.OriginClientCertificate;
    import com.pulumi.alicloud.esa.OriginClientCertificateArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var default = EsaFunctions.getSites(GetSitesArgs.builder()
                .planSubscribeType("enterpriseplan")
                .build());
    
            var resourceSiteOriginClientCertificateExample = new Site("resourceSiteOriginClientCertificateExample", SiteArgs.builder()
                .siteName("chenxin0116.site")
                .instanceId(default_.sites()[0].instanceId())
                .coverage("overseas")
                .accessType("NS")
                .build());
    
            var defaultOriginClientCertificate = new OriginClientCertificate("defaultOriginClientCertificate", OriginClientCertificateArgs.builder()
                .siteId(resourceSiteOriginClientCertificateExample.id())
                .privateKey("""
    -----BEGIN RSA PRIVATE KEY-----
    MIICXAIBAAKBgQC+7dgpkQifIqzOU6KNkFRjZtMZOoN7/ihNf/BrYcPhLQSkcPOf
    UsTP/qvH0u965GnYFiAoK3uWGQo9aCBuoawRFKNBa9ZpJVyVbamBWTBQ/Fxsforq
    9jJNR7OWA3fxvDxgwyEkv0qsnh1zaOkjyUlxFYwDiFxZ1/RHAj/SABCubQIDAQAB
    AoGADiobBUprN1MdOtldj98LQ6yXMKH0qzg5yTYaofzIyWXLmF+A02sSitO77sEp
    Xxae+5b4n8JKEuKcrd2RumNoHmN47iLQ0M2eodjUQ96kzm5Esq6nln62/NF5KLuK
    JDw63nTsg6K0O+gQZv4SYjZAL3cswSmeQmvmcoNgArfcaoECQQDgYy6S91ZIUsLx
    6BB3tW+x7APYnvKysYbcKUEP8AutZSo4hdMfPQkOD0LwP5dWsrNippDWjNDiPZmt
    VKuZDoDdAkEA2dPxy1eQeJsRYTZmTWIuh3UY9xlL3G9skcSOM4LbFidroHWW9UDJ
    JDSSEMH2+/4quYTdPr28cj7RCjqL0brC0QJABXDCL1QJ5oUDLwRWaeCfTawQR89K
    ySRexbXGWxGR5uleBbLQ9J/xOUMLd3HDRJnemZS6TElrwyCFOlukMXjVjQJBALr5
    QC0opmu/vzVQepOl2QaQrrM7VXCLfAfLTbxNcD0d7TY4eTFfQMgBD/euZpB65LWF
    pFs8hcsSvGApTObjhmECQEydB1zzjU6kH171XlXCtRFnbORu2IB7rMsDP2CBPHyR
    tYBjBNVHIUGcmrMVFX4LeMuvvmUyzwfgLmLchHxbDP8=
    -----END RSA PRIVATE KEY-----
                """)
                .hostnames(            
                    "www.example1.com",
                    "www.example2.com",
                    "www.example3.com")
                .originClientCertificateName("exampleCertificate")
                .certificate("""
    -----BEGIN CERTIFICATE-----
    MIICQTCCAaoCCQCFfdyqahygLzANBgkqhkiG9w0BAQUFADBlMQswCQYDVQQGEwJj
    bjEQMA4GA1UECAwHYmVpamluZzEQMA4GA1UEBwwHYmVpamluZzERMA8GA1UECgwI
    YWxpY2xvdWQxEDAOBgNVBAsMB2FsaWJhYmExDTALBgNVBAMMBHRlc3QwHhcNMjAw
    ODA2MTAwMDAyWhcNMzAwODA0MTAwMDAyWjBlMQswCQYDVQQGEwJjbjEQMA4GA1UE
    CAwHYmVpamluZzEQMA4GA1UEBwwHYmVpamluZzERMA8GA1UECgwIYWxpY2xvdWQx
    EDAOBgNVBAsMB2FsaWJhYmExDTALBgNVBAMMBHRlc3QwgZ8wDQYJKoZIhvcNAQEB
    BQADgY0AMIGJAoGBAL7t2CmRCJ8irM5Too2QVGNm0xk6g3v+KE1/8Gthw+EtBKRw
    859SxM/+q8fS73rkadgWICgre5YZCj1oIG6hrBEUo0Fr1mklXJVtqYFZMFD8XGx+
    iur2Mk1Hs5YDd/G8PGDDISS/SqyeHXNo6SPJSXEVjAOIXFnX9EcCP9IAEK5tAgMB
    AAEwDQYJKoZIhvcNAQEFBQADgYEAavYdM9s5jLFP9/ZPCrsRuRsjSJpe5y9VZL+1
    +Ebbw16V0xMYaqODyFH1meLRW/A4xUs15Ny2vLYOW15Mriif7Sixty3HUedBFa4l
    y6/gQ+mBEeZYzMaTTFgyzEZDMsfZxwV9GKfhOzAmK3jZ2LDpHIhnlJN4WwVf0lME
    pCPDN7g=
    -----END CERTIFICATE-----
                """)
                .build());
    
        }
    }
    
    resources:
      resourceSiteOriginClientCertificateExample:
        type: alicloud:esa:Site
        name: resource_Site_OriginClientCertificate_example
        properties:
          siteName: chenxin0116.site
          instanceId: ${default.sites[0].instanceId}
          coverage: overseas
          accessType: NS
      defaultOriginClientCertificate:
        type: alicloud:esa:OriginClientCertificate
        name: default
        properties:
          siteId: ${resourceSiteOriginClientCertificateExample.id}
          privateKey: |
            -----BEGIN RSA PRIVATE KEY-----
            MIICXAIBAAKBgQC+7dgpkQifIqzOU6KNkFRjZtMZOoN7/ihNf/BrYcPhLQSkcPOf
            UsTP/qvH0u965GnYFiAoK3uWGQo9aCBuoawRFKNBa9ZpJVyVbamBWTBQ/Fxsforq
            9jJNR7OWA3fxvDxgwyEkv0qsnh1zaOkjyUlxFYwDiFxZ1/RHAj/SABCubQIDAQAB
            AoGADiobBUprN1MdOtldj98LQ6yXMKH0qzg5yTYaofzIyWXLmF+A02sSitO77sEp
            Xxae+5b4n8JKEuKcrd2RumNoHmN47iLQ0M2eodjUQ96kzm5Esq6nln62/NF5KLuK
            JDw63nTsg6K0O+gQZv4SYjZAL3cswSmeQmvmcoNgArfcaoECQQDgYy6S91ZIUsLx
            6BB3tW+x7APYnvKysYbcKUEP8AutZSo4hdMfPQkOD0LwP5dWsrNippDWjNDiPZmt
            VKuZDoDdAkEA2dPxy1eQeJsRYTZmTWIuh3UY9xlL3G9skcSOM4LbFidroHWW9UDJ
            JDSSEMH2+/4quYTdPr28cj7RCjqL0brC0QJABXDCL1QJ5oUDLwRWaeCfTawQR89K
            ySRexbXGWxGR5uleBbLQ9J/xOUMLd3HDRJnemZS6TElrwyCFOlukMXjVjQJBALr5
            QC0opmu/vzVQepOl2QaQrrM7VXCLfAfLTbxNcD0d7TY4eTFfQMgBD/euZpB65LWF
            pFs8hcsSvGApTObjhmECQEydB1zzjU6kH171XlXCtRFnbORu2IB7rMsDP2CBPHyR
            tYBjBNVHIUGcmrMVFX4LeMuvvmUyzwfgLmLchHxbDP8=
            -----END RSA PRIVATE KEY-----        
          hostnames:
            - www.example1.com
            - www.example2.com
            - www.example3.com
          originClientCertificateName: exampleCertificate
          certificate: |
            -----BEGIN CERTIFICATE-----
            MIICQTCCAaoCCQCFfdyqahygLzANBgkqhkiG9w0BAQUFADBlMQswCQYDVQQGEwJj
            bjEQMA4GA1UECAwHYmVpamluZzEQMA4GA1UEBwwHYmVpamluZzERMA8GA1UECgwI
            YWxpY2xvdWQxEDAOBgNVBAsMB2FsaWJhYmExDTALBgNVBAMMBHRlc3QwHhcNMjAw
            ODA2MTAwMDAyWhcNMzAwODA0MTAwMDAyWjBlMQswCQYDVQQGEwJjbjEQMA4GA1UE
            CAwHYmVpamluZzEQMA4GA1UEBwwHYmVpamluZzERMA8GA1UECgwIYWxpY2xvdWQx
            EDAOBgNVBAsMB2FsaWJhYmExDTALBgNVBAMMBHRlc3QwgZ8wDQYJKoZIhvcNAQEB
            BQADgY0AMIGJAoGBAL7t2CmRCJ8irM5Too2QVGNm0xk6g3v+KE1/8Gthw+EtBKRw
            859SxM/+q8fS73rkadgWICgre5YZCj1oIG6hrBEUo0Fr1mklXJVtqYFZMFD8XGx+
            iur2Mk1Hs5YDd/G8PGDDISS/SqyeHXNo6SPJSXEVjAOIXFnX9EcCP9IAEK5tAgMB
            AAEwDQYJKoZIhvcNAQEFBQADgYEAavYdM9s5jLFP9/ZPCrsRuRsjSJpe5y9VZL+1
            +Ebbw16V0xMYaqODyFH1meLRW/A4xUs15Ny2vLYOW15Mriif7Sixty3HUedBFa4l
            y6/gQ+mBEeZYzMaTTFgyzEZDMsfZxwV9GKfhOzAmK3jZ2LDpHIhnlJN4WwVf0lME
            pCPDN7g=
            -----END CERTIFICATE-----        
    variables:
      default:
        fn::invoke:
          function: alicloud:esa:getSites
          arguments:
            planSubscribeType: enterpriseplan
    

    Create OriginClientCertificate Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new OriginClientCertificate(name: string, args: OriginClientCertificateArgs, opts?: CustomResourceOptions);
    @overload
    def OriginClientCertificate(resource_name: str,
                                args: OriginClientCertificateArgs,
                                opts: Optional[ResourceOptions] = None)
    
    @overload
    def OriginClientCertificate(resource_name: str,
                                opts: Optional[ResourceOptions] = None,
                                certificate: Optional[str] = None,
                                private_key: Optional[str] = None,
                                site_id: Optional[int] = None,
                                hostnames: Optional[Sequence[str]] = None,
                                origin_client_certificate_name: Optional[str] = None)
    func NewOriginClientCertificate(ctx *Context, name string, args OriginClientCertificateArgs, opts ...ResourceOption) (*OriginClientCertificate, error)
    public OriginClientCertificate(string name, OriginClientCertificateArgs args, CustomResourceOptions? opts = null)
    public OriginClientCertificate(String name, OriginClientCertificateArgs args)
    public OriginClientCertificate(String name, OriginClientCertificateArgs args, CustomResourceOptions options)
    
    type: alicloud:esa:OriginClientCertificate
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args OriginClientCertificateArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args OriginClientCertificateArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args OriginClientCertificateArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args OriginClientCertificateArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args OriginClientCertificateArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var originClientCertificateResource = new AliCloud.Esa.OriginClientCertificate("originClientCertificateResource", new()
    {
        Certificate = "string",
        PrivateKey = "string",
        SiteId = 0,
        Hostnames = new[]
        {
            "string",
        },
        OriginClientCertificateName = "string",
    });
    
    example, err := esa.NewOriginClientCertificate(ctx, "originClientCertificateResource", &esa.OriginClientCertificateArgs{
    	Certificate: pulumi.String("string"),
    	PrivateKey:  pulumi.String("string"),
    	SiteId:      pulumi.Int(0),
    	Hostnames: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	OriginClientCertificateName: pulumi.String("string"),
    })
    
    var originClientCertificateResource = new OriginClientCertificate("originClientCertificateResource", OriginClientCertificateArgs.builder()
        .certificate("string")
        .privateKey("string")
        .siteId(0)
        .hostnames("string")
        .originClientCertificateName("string")
        .build());
    
    origin_client_certificate_resource = alicloud.esa.OriginClientCertificate("originClientCertificateResource",
        certificate="string",
        private_key="string",
        site_id=0,
        hostnames=["string"],
        origin_client_certificate_name="string")
    
    const originClientCertificateResource = new alicloud.esa.OriginClientCertificate("originClientCertificateResource", {
        certificate: "string",
        privateKey: "string",
        siteId: 0,
        hostnames: ["string"],
        originClientCertificateName: "string",
    });
    
    type: alicloud:esa:OriginClientCertificate
    properties:
        certificate: string
        hostnames:
            - string
        originClientCertificateName: string
        privateKey: string
        siteId: 0
    

    OriginClientCertificate Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The OriginClientCertificate resource accepts the following input properties:

    Certificate string
    The certificate content.
    PrivateKey string
    The private key of the certificate.
    SiteId int
    Site ID.
    Hostnames List<string>
    The domain names to associate.
    OriginClientCertificateName string
    The certificate name.
    Certificate string
    The certificate content.
    PrivateKey string
    The private key of the certificate.
    SiteId int
    Site ID.
    Hostnames []string
    The domain names to associate.
    OriginClientCertificateName string
    The certificate name.
    certificate String
    The certificate content.
    privateKey String
    The private key of the certificate.
    siteId Integer
    Site ID.
    hostnames List<String>
    The domain names to associate.
    originClientCertificateName String
    The certificate name.
    certificate string
    The certificate content.
    privateKey string
    The private key of the certificate.
    siteId number
    Site ID.
    hostnames string[]
    The domain names to associate.
    originClientCertificateName string
    The certificate name.
    certificate str
    The certificate content.
    private_key str
    The private key of the certificate.
    site_id int
    Site ID.
    hostnames Sequence[str]
    The domain names to associate.
    origin_client_certificate_name str
    The certificate name.
    certificate String
    The certificate content.
    privateKey String
    The private key of the certificate.
    siteId Number
    Site ID.
    hostnames List<String>
    The domain names to associate.
    originClientCertificateName String
    The certificate name.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the OriginClientCertificate resource produces the following output properties:

    CreateTime string
    The time when the certificate was created.
    Id string
    The provider-assigned unique ID for this managed resource.
    OriginClientCertificateId string
    The certificate ID.
    Status string
    The status of the certificate.
    CreateTime string
    The time when the certificate was created.
    Id string
    The provider-assigned unique ID for this managed resource.
    OriginClientCertificateId string
    The certificate ID.
    Status string
    The status of the certificate.
    createTime String
    The time when the certificate was created.
    id String
    The provider-assigned unique ID for this managed resource.
    originClientCertificateId String
    The certificate ID.
    status String
    The status of the certificate.
    createTime string
    The time when the certificate was created.
    id string
    The provider-assigned unique ID for this managed resource.
    originClientCertificateId string
    The certificate ID.
    status string
    The status of the certificate.
    create_time str
    The time when the certificate was created.
    id str
    The provider-assigned unique ID for this managed resource.
    origin_client_certificate_id str
    The certificate ID.
    status str
    The status of the certificate.
    createTime String
    The time when the certificate was created.
    id String
    The provider-assigned unique ID for this managed resource.
    originClientCertificateId String
    The certificate ID.
    status String
    The status of the certificate.

    Look up Existing OriginClientCertificate Resource

    Get an existing OriginClientCertificate resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: OriginClientCertificateState, opts?: CustomResourceOptions): OriginClientCertificate
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            certificate: Optional[str] = None,
            create_time: Optional[str] = None,
            hostnames: Optional[Sequence[str]] = None,
            origin_client_certificate_id: Optional[str] = None,
            origin_client_certificate_name: Optional[str] = None,
            private_key: Optional[str] = None,
            site_id: Optional[int] = None,
            status: Optional[str] = None) -> OriginClientCertificate
    func GetOriginClientCertificate(ctx *Context, name string, id IDInput, state *OriginClientCertificateState, opts ...ResourceOption) (*OriginClientCertificate, error)
    public static OriginClientCertificate Get(string name, Input<string> id, OriginClientCertificateState? state, CustomResourceOptions? opts = null)
    public static OriginClientCertificate get(String name, Output<String> id, OriginClientCertificateState state, CustomResourceOptions options)
    resources:  _:    type: alicloud:esa:OriginClientCertificate    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Certificate string
    The certificate content.
    CreateTime string
    The time when the certificate was created.
    Hostnames List<string>
    The domain names to associate.
    OriginClientCertificateId string
    The certificate ID.
    OriginClientCertificateName string
    The certificate name.
    PrivateKey string
    The private key of the certificate.
    SiteId int
    Site ID.
    Status string
    The status of the certificate.
    Certificate string
    The certificate content.
    CreateTime string
    The time when the certificate was created.
    Hostnames []string
    The domain names to associate.
    OriginClientCertificateId string
    The certificate ID.
    OriginClientCertificateName string
    The certificate name.
    PrivateKey string
    The private key of the certificate.
    SiteId int
    Site ID.
    Status string
    The status of the certificate.
    certificate String
    The certificate content.
    createTime String
    The time when the certificate was created.
    hostnames List<String>
    The domain names to associate.
    originClientCertificateId String
    The certificate ID.
    originClientCertificateName String
    The certificate name.
    privateKey String
    The private key of the certificate.
    siteId Integer
    Site ID.
    status String
    The status of the certificate.
    certificate string
    The certificate content.
    createTime string
    The time when the certificate was created.
    hostnames string[]
    The domain names to associate.
    originClientCertificateId string
    The certificate ID.
    originClientCertificateName string
    The certificate name.
    privateKey string
    The private key of the certificate.
    siteId number
    Site ID.
    status string
    The status of the certificate.
    certificate str
    The certificate content.
    create_time str
    The time when the certificate was created.
    hostnames Sequence[str]
    The domain names to associate.
    origin_client_certificate_id str
    The certificate ID.
    origin_client_certificate_name str
    The certificate name.
    private_key str
    The private key of the certificate.
    site_id int
    Site ID.
    status str
    The status of the certificate.
    certificate String
    The certificate content.
    createTime String
    The time when the certificate was created.
    hostnames List<String>
    The domain names to associate.
    originClientCertificateId String
    The certificate ID.
    originClientCertificateName String
    The certificate name.
    privateKey String
    The private key of the certificate.
    siteId Number
    Site ID.
    status String
    The status of the certificate.

    Import

    ESA Origin Client Certificate can be imported using the id, e.g.

    $ pulumi import alicloud:esa/originClientCertificate:OriginClientCertificate example <site_id>:<origin_client_certificate_id>
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.85.0 published on Tuesday, Sep 9, 2025 by Pulumi