1. Packages
  2. Volcengine
  3. API Docs
  4. cdn
  5. CdnCertificate
Volcengine v0.0.26 published on Friday, Sep 13, 2024 by Volcengine

volcengine.cdn.CdnCertificate

Explore with Pulumi AI

volcengine logo
Volcengine v0.0.26 published on Friday, Sep 13, 2024 by Volcengine

    Provides a resource to manage cdn certificate

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Volcengine = Pulumi.Volcengine;
    
    return await Deployment.RunAsync(() => 
    {
        var foo = new Volcengine.Cdn.CdnCertificate("foo", new()
        {
            Certificate = "",
            Desc = "tftest",
            PrivateKey = "",
            Source = "cdn_cert_hosting",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/cdn"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := cdn.NewCdnCertificate(ctx, "foo", &cdn.CdnCertificateArgs{
    			Certificate: pulumi.String(""),
    			Desc:        pulumi.String("tftest"),
    			PrivateKey:  pulumi.String(""),
    			Source:      pulumi.String("cdn_cert_hosting"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.volcengine.cdn.CdnCertificate;
    import com.pulumi.volcengine.cdn.CdnCertificateArgs;
    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) {
            var foo = new CdnCertificate("foo", CdnCertificateArgs.builder()        
                .certificate("")
                .desc("tftest")
                .privateKey("")
                .source("cdn_cert_hosting")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_volcengine as volcengine
    
    foo = volcengine.cdn.CdnCertificate("foo",
        certificate="",
        desc="tftest",
        private_key="",
        source="cdn_cert_hosting")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as volcengine from "@volcengine/pulumi";
    
    const foo = new volcengine.cdn.CdnCertificate("foo", {
        certificate: "",
        desc: "tftest",
        privateKey: "",
        source: "cdn_cert_hosting",
    });
    
    resources:
      foo:
        type: volcengine:cdn:CdnCertificate
        properties:
          certificate:
          desc: tftest
          privateKey:
          source: cdn_cert_hosting
    

    Create CdnCertificate Resource

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

    Constructor syntax

    new CdnCertificate(name: string, args: CdnCertificateArgs, opts?: CustomResourceOptions);
    @overload
    def CdnCertificate(resource_name: str,
                       args: CdnCertificateArgs,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def CdnCertificate(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       certificate: Optional[str] = None,
                       desc: Optional[str] = None,
                       private_key: Optional[str] = None,
                       source: Optional[str] = None)
    func NewCdnCertificate(ctx *Context, name string, args CdnCertificateArgs, opts ...ResourceOption) (*CdnCertificate, error)
    public CdnCertificate(string name, CdnCertificateArgs args, CustomResourceOptions? opts = null)
    public CdnCertificate(String name, CdnCertificateArgs args)
    public CdnCertificate(String name, CdnCertificateArgs args, CustomResourceOptions options)
    
    type: volcengine:cdn:CdnCertificate
    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 CdnCertificateArgs
    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 CdnCertificateArgs
    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 CdnCertificateArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args CdnCertificateArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args CdnCertificateArgs
    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 cdnCertificateResource = new Volcengine.Cdn.CdnCertificate("cdnCertificateResource", new()
    {
        Certificate = "string",
        Desc = "string",
        PrivateKey = "string",
        Source = "string",
    });
    
    example, err := cdn.NewCdnCertificate(ctx, "cdnCertificateResource", &cdn.CdnCertificateArgs{
    	Certificate: pulumi.String("string"),
    	Desc:        pulumi.String("string"),
    	PrivateKey:  pulumi.String("string"),
    	Source:      pulumi.String("string"),
    })
    
    var cdnCertificateResource = new CdnCertificate("cdnCertificateResource", CdnCertificateArgs.builder()
        .certificate("string")
        .desc("string")
        .privateKey("string")
        .source("string")
        .build());
    
    cdn_certificate_resource = volcengine.cdn.CdnCertificate("cdnCertificateResource",
        certificate="string",
        desc="string",
        private_key="string",
        source="string")
    
    const cdnCertificateResource = new volcengine.cdn.CdnCertificate("cdnCertificateResource", {
        certificate: "string",
        desc: "string",
        privateKey: "string",
        source: "string",
    });
    
    type: volcengine:cdn:CdnCertificate
    properties:
        certificate: string
        desc: string
        privateKey: string
        source: string
    

    CdnCertificate Resource Properties

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

    Inputs

    The CdnCertificate resource accepts the following input properties:

    Certificate string
    Content of the specified certificate public key file. Line breaks in the content should be replaced with \r\n. The file extension for the certificate public key is .crt or .pem. The public key must include the complete certificate chain. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
    Desc string
    Note on the certificate.
    PrivateKey string
    The content of the specified certificate private key file. Replace line breaks in the content with \r\n. The file extension for the certificate private key is .key or .pem. The private key must be unencrypted. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
    Source string
    Specify the location for storing the certificate. The parameter can take the following values: volc_cert_center: indicates that the certificate will be stored in the certificate center.cdn_cert_hosting: indicates that the certificate will be hosted on the content delivery network.
    Certificate string
    Content of the specified certificate public key file. Line breaks in the content should be replaced with \r\n. The file extension for the certificate public key is .crt or .pem. The public key must include the complete certificate chain. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
    Desc string
    Note on the certificate.
    PrivateKey string
    The content of the specified certificate private key file. Replace line breaks in the content with \r\n. The file extension for the certificate private key is .key or .pem. The private key must be unencrypted. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
    Source string
    Specify the location for storing the certificate. The parameter can take the following values: volc_cert_center: indicates that the certificate will be stored in the certificate center.cdn_cert_hosting: indicates that the certificate will be hosted on the content delivery network.
    certificate String
    Content of the specified certificate public key file. Line breaks in the content should be replaced with \r\n. The file extension for the certificate public key is .crt or .pem. The public key must include the complete certificate chain. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
    desc String
    Note on the certificate.
    privateKey String
    The content of the specified certificate private key file. Replace line breaks in the content with \r\n. The file extension for the certificate private key is .key or .pem. The private key must be unencrypted. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
    source String
    Specify the location for storing the certificate. The parameter can take the following values: volc_cert_center: indicates that the certificate will be stored in the certificate center.cdn_cert_hosting: indicates that the certificate will be hosted on the content delivery network.
    certificate string
    Content of the specified certificate public key file. Line breaks in the content should be replaced with \r\n. The file extension for the certificate public key is .crt or .pem. The public key must include the complete certificate chain. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
    desc string
    Note on the certificate.
    privateKey string
    The content of the specified certificate private key file. Replace line breaks in the content with \r\n. The file extension for the certificate private key is .key or .pem. The private key must be unencrypted. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
    source string
    Specify the location for storing the certificate. The parameter can take the following values: volc_cert_center: indicates that the certificate will be stored in the certificate center.cdn_cert_hosting: indicates that the certificate will be hosted on the content delivery network.
    certificate str
    Content of the specified certificate public key file. Line breaks in the content should be replaced with \r\n. The file extension for the certificate public key is .crt or .pem. The public key must include the complete certificate chain. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
    desc str
    Note on the certificate.
    private_key str
    The content of the specified certificate private key file. Replace line breaks in the content with \r\n. The file extension for the certificate private key is .key or .pem. The private key must be unencrypted. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
    source str
    Specify the location for storing the certificate. The parameter can take the following values: volc_cert_center: indicates that the certificate will be stored in the certificate center.cdn_cert_hosting: indicates that the certificate will be hosted on the content delivery network.
    certificate String
    Content of the specified certificate public key file. Line breaks in the content should be replaced with \r\n. The file extension for the certificate public key is .crt or .pem. The public key must include the complete certificate chain. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
    desc String
    Note on the certificate.
    privateKey String
    The content of the specified certificate private key file. Replace line breaks in the content with \r\n. The file extension for the certificate private key is .key or .pem. The private key must be unencrypted. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
    source String
    Specify the location for storing the certificate. The parameter can take the following values: volc_cert_center: indicates that the certificate will be stored in the certificate center.cdn_cert_hosting: indicates that the certificate will be hosted on the content delivery network.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing CdnCertificate Resource

    Get an existing CdnCertificate 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?: CdnCertificateState, opts?: CustomResourceOptions): CdnCertificate
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            certificate: Optional[str] = None,
            desc: Optional[str] = None,
            private_key: Optional[str] = None,
            source: Optional[str] = None) -> CdnCertificate
    func GetCdnCertificate(ctx *Context, name string, id IDInput, state *CdnCertificateState, opts ...ResourceOption) (*CdnCertificate, error)
    public static CdnCertificate Get(string name, Input<string> id, CdnCertificateState? state, CustomResourceOptions? opts = null)
    public static CdnCertificate get(String name, Output<String> id, CdnCertificateState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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
    Content of the specified certificate public key file. Line breaks in the content should be replaced with \r\n. The file extension for the certificate public key is .crt or .pem. The public key must include the complete certificate chain. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
    Desc string
    Note on the certificate.
    PrivateKey string
    The content of the specified certificate private key file. Replace line breaks in the content with \r\n. The file extension for the certificate private key is .key or .pem. The private key must be unencrypted. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
    Source string
    Specify the location for storing the certificate. The parameter can take the following values: volc_cert_center: indicates that the certificate will be stored in the certificate center.cdn_cert_hosting: indicates that the certificate will be hosted on the content delivery network.
    Certificate string
    Content of the specified certificate public key file. Line breaks in the content should be replaced with \r\n. The file extension for the certificate public key is .crt or .pem. The public key must include the complete certificate chain. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
    Desc string
    Note on the certificate.
    PrivateKey string
    The content of the specified certificate private key file. Replace line breaks in the content with \r\n. The file extension for the certificate private key is .key or .pem. The private key must be unencrypted. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
    Source string
    Specify the location for storing the certificate. The parameter can take the following values: volc_cert_center: indicates that the certificate will be stored in the certificate center.cdn_cert_hosting: indicates that the certificate will be hosted on the content delivery network.
    certificate String
    Content of the specified certificate public key file. Line breaks in the content should be replaced with \r\n. The file extension for the certificate public key is .crt or .pem. The public key must include the complete certificate chain. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
    desc String
    Note on the certificate.
    privateKey String
    The content of the specified certificate private key file. Replace line breaks in the content with \r\n. The file extension for the certificate private key is .key or .pem. The private key must be unencrypted. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
    source String
    Specify the location for storing the certificate. The parameter can take the following values: volc_cert_center: indicates that the certificate will be stored in the certificate center.cdn_cert_hosting: indicates that the certificate will be hosted on the content delivery network.
    certificate string
    Content of the specified certificate public key file. Line breaks in the content should be replaced with \r\n. The file extension for the certificate public key is .crt or .pem. The public key must include the complete certificate chain. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
    desc string
    Note on the certificate.
    privateKey string
    The content of the specified certificate private key file. Replace line breaks in the content with \r\n. The file extension for the certificate private key is .key or .pem. The private key must be unencrypted. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
    source string
    Specify the location for storing the certificate. The parameter can take the following values: volc_cert_center: indicates that the certificate will be stored in the certificate center.cdn_cert_hosting: indicates that the certificate will be hosted on the content delivery network.
    certificate str
    Content of the specified certificate public key file. Line breaks in the content should be replaced with \r\n. The file extension for the certificate public key is .crt or .pem. The public key must include the complete certificate chain. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
    desc str
    Note on the certificate.
    private_key str
    The content of the specified certificate private key file. Replace line breaks in the content with \r\n. The file extension for the certificate private key is .key or .pem. The private key must be unencrypted. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
    source str
    Specify the location for storing the certificate. The parameter can take the following values: volc_cert_center: indicates that the certificate will be stored in the certificate center.cdn_cert_hosting: indicates that the certificate will be hosted on the content delivery network.
    certificate String
    Content of the specified certificate public key file. Line breaks in the content should be replaced with \r\n. The file extension for the certificate public key is .crt or .pem. The public key must include the complete certificate chain. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
    desc String
    Note on the certificate.
    privateKey String
    The content of the specified certificate private key file. Replace line breaks in the content with \r\n. The file extension for the certificate private key is .key or .pem. The private key must be unencrypted. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
    source String
    Specify the location for storing the certificate. The parameter can take the following values: volc_cert_center: indicates that the certificate will be stored in the certificate center.cdn_cert_hosting: indicates that the certificate will be hosted on the content delivery network.

    Import

    CdnCertificate can be imported using the id, e.g.

     $ pulumi import volcengine:cdn/cdnCertificate:CdnCertificate default resource_id
    

    You can delete the certificate hosted on the content delivery network. You can configure the HTTPS module to associate the certificate and domain name through the domain_config field of volcengine_cdn_domain. If the certificate to be deleted is already associated with a domain name, the deletion will fail. To remove the association between the domain name and the certificate, you can disable the HTTPS function for the domain name in the Content Delivery Network console.

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

    Package Details

    Repository
    volcengine volcengine/pulumi-volcengine
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the volcengine Terraform Provider.
    volcengine logo
    Volcengine v0.0.26 published on Friday, Sep 13, 2024 by Volcengine