alicloud.esa.ClientCaCertificate
Explore with Pulumi AI
Provides a ESA Client Ca Certificate resource.
For information about ESA Client Ca Certificate and how to use it, see What is Client Ca Certificate.
NOTE: Available since v1.244.0.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const _default = alicloud.esa.getSites({
    planSubscribeType: "enterpriseplan",
    siteName: "gositecdn.cn",
});
const defaultClientCaCertificate = new alicloud.esa.ClientCaCertificate("default", {
    certificate: `-----BEGIN CERTIFICATE-----
****-----END CERTIFICATE-----`,
    clientCaCertName: "example",
    siteId: _default.then(_default => _default.sites?.[0]?.id),
});
import pulumi
import pulumi_alicloud as alicloud
default = alicloud.esa.get_sites(plan_subscribe_type="enterpriseplan",
    site_name="gositecdn.cn")
default_client_ca_certificate = alicloud.esa.ClientCaCertificate("default",
    certificate="""-----BEGIN CERTIFICATE-----
****-----END CERTIFICATE-----""",
    client_ca_cert_name="example",
    site_id=default.sites[0].id)
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"),
			SiteName:          pulumi.StringRef("gositecdn.cn"),
		}, nil)
		if err != nil {
			return err
		}
		_, err = esa.NewClientCaCertificate(ctx, "default", &esa.ClientCaCertificateArgs{
			Certificate:      pulumi.String("-----BEGIN CERTIFICATE-----\n****-----END CERTIFICATE-----"),
			ClientCaCertName: pulumi.String("example"),
			SiteId:           pulumi.Int(_default.Sites[0].Id),
		})
		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",
        SiteName = "gositecdn.cn",
    });
    var defaultClientCaCertificate = new AliCloud.Esa.ClientCaCertificate("default", new()
    {
        Certificate = @"-----BEGIN CERTIFICATE-----
****-----END CERTIFICATE-----",
        ClientCaCertName = "example",
        SiteId = @default.Apply(@default => @default.Apply(getSitesResult => getSitesResult.Sites[0]?.Id)),
    });
});
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.ClientCaCertificate;
import com.pulumi.alicloud.esa.ClientCaCertificateArgs;
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")
            .siteName("gositecdn.cn")
            .build());
        var defaultClientCaCertificate = new ClientCaCertificate("defaultClientCaCertificate", ClientCaCertificateArgs.builder()
            .certificate("""
-----BEGIN CERTIFICATE-----
****-----END CERTIFICATE-----            """)
            .clientCaCertName("example")
            .siteId(default_.sites()[0].id())
            .build());
    }
}
resources:
  defaultClientCaCertificate:
    type: alicloud:esa:ClientCaCertificate
    name: default
    properties:
      certificate: |-
        -----BEGIN CERTIFICATE-----
        ****-----END CERTIFICATE-----        
      clientCaCertName: example
      siteId: ${default.sites[0].id}
variables:
  default:
    fn::invoke:
      function: alicloud:esa:getSites
      arguments:
        planSubscribeType: enterpriseplan
        siteName: gositecdn.cn
Create ClientCaCertificate Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ClientCaCertificate(name: string, args: ClientCaCertificateArgs, opts?: CustomResourceOptions);@overload
def ClientCaCertificate(resource_name: str,
                        args: ClientCaCertificateArgs,
                        opts: Optional[ResourceOptions] = None)
@overload
def ClientCaCertificate(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        certificate: Optional[str] = None,
                        site_id: Optional[int] = None,
                        client_ca_cert_name: Optional[str] = None)func NewClientCaCertificate(ctx *Context, name string, args ClientCaCertificateArgs, opts ...ResourceOption) (*ClientCaCertificate, error)public ClientCaCertificate(string name, ClientCaCertificateArgs args, CustomResourceOptions? opts = null)
public ClientCaCertificate(String name, ClientCaCertificateArgs args)
public ClientCaCertificate(String name, ClientCaCertificateArgs args, CustomResourceOptions options)
type: alicloud:esa:ClientCaCertificate
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 ClientCaCertificateArgs
- 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 ClientCaCertificateArgs
- 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 ClientCaCertificateArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ClientCaCertificateArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ClientCaCertificateArgs
- 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 clientCaCertificateResource = new AliCloud.Esa.ClientCaCertificate("clientCaCertificateResource", new()
{
    Certificate = "string",
    SiteId = 0,
    ClientCaCertName = "string",
});
example, err := esa.NewClientCaCertificate(ctx, "clientCaCertificateResource", &esa.ClientCaCertificateArgs{
	Certificate:      pulumi.String("string"),
	SiteId:           pulumi.Int(0),
	ClientCaCertName: pulumi.String("string"),
})
var clientCaCertificateResource = new ClientCaCertificate("clientCaCertificateResource", ClientCaCertificateArgs.builder()
    .certificate("string")
    .siteId(0)
    .clientCaCertName("string")
    .build());
client_ca_certificate_resource = alicloud.esa.ClientCaCertificate("clientCaCertificateResource",
    certificate="string",
    site_id=0,
    client_ca_cert_name="string")
const clientCaCertificateResource = new alicloud.esa.ClientCaCertificate("clientCaCertificateResource", {
    certificate: "string",
    siteId: 0,
    clientCaCertName: "string",
});
type: alicloud:esa:ClientCaCertificate
properties:
    certificate: string
    clientCaCertName: string
    siteId: 0
ClientCaCertificate 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 ClientCaCertificate resource accepts the following input properties:
- Certificate string
- Certificate content.
- SiteId int
- Site Id
- ClientCa stringCert Name 
- The certificate name.
- Certificate string
- Certificate content.
- SiteId int
- Site Id
- ClientCa stringCert Name 
- The certificate name.
- certificate String
- Certificate content.
- siteId Integer
- Site Id
- clientCa StringCert Name 
- The certificate name.
- certificate string
- Certificate content.
- siteId number
- Site Id
- clientCa stringCert Name 
- The certificate name.
- certificate str
- Certificate content.
- site_id int
- Site Id
- client_ca_ strcert_ name 
- The certificate name.
- certificate String
- Certificate content.
- siteId Number
- Site Id
- clientCa StringCert Name 
- The certificate name.
Outputs
All input properties are implicitly available as output properties. Additionally, the ClientCaCertificate resource produces the following output properties:
- ClientCa stringCert Id 
- ClientCaCertificate Id
- CreateTime string
- Creation time.
- Id string
- The provider-assigned unique ID for this managed resource.
- Status string
- Certificate status.
- ClientCa stringCert Id 
- ClientCaCertificate Id
- CreateTime string
- Creation time.
- Id string
- The provider-assigned unique ID for this managed resource.
- Status string
- Certificate status.
- clientCa StringCert Id 
- ClientCaCertificate Id
- createTime String
- Creation time.
- id String
- The provider-assigned unique ID for this managed resource.
- status String
- Certificate status.
- clientCa stringCert Id 
- ClientCaCertificate Id
- createTime string
- Creation time.
- id string
- The provider-assigned unique ID for this managed resource.
- status string
- Certificate status.
- client_ca_ strcert_ id 
- ClientCaCertificate Id
- create_time str
- Creation time.
- id str
- The provider-assigned unique ID for this managed resource.
- status str
- Certificate status.
- clientCa StringCert Id 
- ClientCaCertificate Id
- createTime String
- Creation time.
- id String
- The provider-assigned unique ID for this managed resource.
- status String
- Certificate status.
Look up Existing ClientCaCertificate Resource
Get an existing ClientCaCertificate 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?: ClientCaCertificateState, opts?: CustomResourceOptions): ClientCaCertificate@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        certificate: Optional[str] = None,
        client_ca_cert_id: Optional[str] = None,
        client_ca_cert_name: Optional[str] = None,
        create_time: Optional[str] = None,
        site_id: Optional[int] = None,
        status: Optional[str] = None) -> ClientCaCertificatefunc GetClientCaCertificate(ctx *Context, name string, id IDInput, state *ClientCaCertificateState, opts ...ResourceOption) (*ClientCaCertificate, error)public static ClientCaCertificate Get(string name, Input<string> id, ClientCaCertificateState? state, CustomResourceOptions? opts = null)public static ClientCaCertificate get(String name, Output<String> id, ClientCaCertificateState state, CustomResourceOptions options)resources:  _:    type: alicloud:esa:ClientCaCertificate    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.
- Certificate string
- Certificate content.
- ClientCa stringCert Id 
- ClientCaCertificate Id
- ClientCa stringCert Name 
- The certificate name.
- CreateTime string
- Creation time.
- SiteId int
- Site Id
- Status string
- Certificate status.
- Certificate string
- Certificate content.
- ClientCa stringCert Id 
- ClientCaCertificate Id
- ClientCa stringCert Name 
- The certificate name.
- CreateTime string
- Creation time.
- SiteId int
- Site Id
- Status string
- Certificate status.
- certificate String
- Certificate content.
- clientCa StringCert Id 
- ClientCaCertificate Id
- clientCa StringCert Name 
- The certificate name.
- createTime String
- Creation time.
- siteId Integer
- Site Id
- status String
- Certificate status.
- certificate string
- Certificate content.
- clientCa stringCert Id 
- ClientCaCertificate Id
- clientCa stringCert Name 
- The certificate name.
- createTime string
- Creation time.
- siteId number
- Site Id
- status string
- Certificate status.
- certificate str
- Certificate content.
- client_ca_ strcert_ id 
- ClientCaCertificate Id
- client_ca_ strcert_ name 
- The certificate name.
- create_time str
- Creation time.
- site_id int
- Site Id
- status str
- Certificate status.
- certificate String
- Certificate content.
- clientCa StringCert Id 
- ClientCaCertificate Id
- clientCa StringCert Name 
- The certificate name.
- createTime String
- Creation time.
- siteId Number
- Site Id
- status String
- Certificate status.
Import
ESA Client Ca Certificate can be imported using the id, e.g.
$ pulumi import alicloud:esa/clientCaCertificate:ClientCaCertificate example <site_id>:<client_ca_cert_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 alicloudTerraform Provider.