1. Packages
  2. Volcengine
  3. API Docs
  4. cdn
  5. CdnDomain
Volcengine v0.0.27 published on Tuesday, Dec 10, 2024 by Volcengine

volcengine.cdn.CdnDomain

Explore with Pulumi AI

Provides a resource to manage cdn domain

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@volcengine/pulumi";

const fooCdnCertificate = new volcengine.cdn.CdnCertificate("fooCdnCertificate", {
    certificate: "",
    privateKey: "",
    desc: "tftest",
    source: "cdn_cert_hosting",
});
const fooCdnDomain = new volcengine.cdn.CdnDomain("fooCdnDomain", {
    domain: "tftest.byte-test.com",
    serviceType: "web",
    tags: [
        {
            key: "tfkey1",
            value: "tfvalue1",
        },
        {
            key: "tfkey2",
            value: "tfvalue2",
        },
    ],
    domainConfig: pulumi.jsonStringify({
        OriginProtocol: "https",
        Origin: [{
            OriginAction: {
                OriginLines: [{
                    Address: "1.1.1.1",
                    HttpPort: "80",
                    HttpsPort: "443",
                    InstanceType: "ip",
                    OriginType: "primary",
                    PrivateBucketAccess: false,
                    Weight: "2",
                }],
            },
        }],
        HTTPS: {
            CertInfo: {
                CertId: fooCdnCertificate.id,
            },
            DisableHttp: false,
            HTTP2: true,
            Switch: true,
            Ocsp: false,
            TlsVersion: [
                "tlsv1.1",
                "tlsv1.2",
            ],
        },
    }),
});
Copy
import pulumi
import json
import pulumi_volcengine as volcengine

foo_cdn_certificate = volcengine.cdn.CdnCertificate("fooCdnCertificate",
    certificate="",
    private_key="",
    desc="tftest",
    source="cdn_cert_hosting")
foo_cdn_domain = volcengine.cdn.CdnDomain("fooCdnDomain",
    domain="tftest.byte-test.com",
    service_type="web",
    tags=[
        volcengine.cdn.CdnDomainTagArgs(
            key="tfkey1",
            value="tfvalue1",
        ),
        volcengine.cdn.CdnDomainTagArgs(
            key="tfkey2",
            value="tfvalue2",
        ),
    ],
    domain_config=pulumi.Output.json_dumps({
        "OriginProtocol": "https",
        "Origin": [{
            "OriginAction": {
                "OriginLines": [{
                    "Address": "1.1.1.1",
                    "HttpPort": "80",
                    "HttpsPort": "443",
                    "InstanceType": "ip",
                    "OriginType": "primary",
                    "PrivateBucketAccess": False,
                    "Weight": "2",
                }],
            },
        }],
        "HTTPS": {
            "CertInfo": {
                "CertId": foo_cdn_certificate.id,
            },
            "DisableHttp": False,
            "HTTP2": True,
            "Switch": True,
            "Ocsp": False,
            "TlsVersion": [
                "tlsv1.1",
                "tlsv1.2",
            ],
        },
    }))
Copy
package main

import (
	"encoding/json"

	"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 {
		fooCdnCertificate, err := cdn.NewCdnCertificate(ctx, "fooCdnCertificate", &cdn.CdnCertificateArgs{
			Certificate: pulumi.String(""),
			PrivateKey:  pulumi.String(""),
			Desc:        pulumi.String("tftest"),
			Source:      pulumi.String("cdn_cert_hosting"),
		})
		if err != nil {
			return err
		}
		_, err = cdn.NewCdnDomain(ctx, "fooCdnDomain", &cdn.CdnDomainArgs{
			Domain:      pulumi.String("tftest.byte-test.com"),
			ServiceType: pulumi.String("web"),
			Tags: cdn.CdnDomainTagArray{
				&cdn.CdnDomainTagArgs{
					Key:   pulumi.String("tfkey1"),
					Value: pulumi.String("tfvalue1"),
				},
				&cdn.CdnDomainTagArgs{
					Key:   pulumi.String("tfkey2"),
					Value: pulumi.String("tfvalue2"),
				},
			},
			DomainConfig: fooCdnCertificate.ID().ApplyT(func(id string) (pulumi.String, error) {
				var _zero pulumi.String
				tmpJSON0, err := json.Marshal(map[string]interface{}{
					"OriginProtocol": "https",
					"Origin": []map[string]interface{}{
						map[string]interface{}{
							"OriginAction": map[string]interface{}{
								"OriginLines": []map[string]interface{}{
									map[string]interface{}{
										"Address":             "1.1.1.1",
										"HttpPort":            "80",
										"HttpsPort":           "443",
										"InstanceType":        "ip",
										"OriginType":          "primary",
										"PrivateBucketAccess": false,
										"Weight":              "2",
									},
								},
							},
						},
					},
					"HTTPS": map[string]interface{}{
						"CertInfo": map[string]interface{}{
							"CertId": id,
						},
						"DisableHttp": false,
						"HTTP2":       true,
						"Switch":      true,
						"Ocsp":        false,
						"TlsVersion": []string{
							"tlsv1.1",
							"tlsv1.2",
						},
					},
				})
				if err != nil {
					return _zero, err
				}
				json0 := string(tmpJSON0)
				return pulumi.String(json0), nil
			}).(pulumi.StringOutput),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using Pulumi;
using Volcengine = Pulumi.Volcengine;

return await Deployment.RunAsync(() => 
{
    var fooCdnCertificate = new Volcengine.Cdn.CdnCertificate("fooCdnCertificate", new()
    {
        Certificate = "",
        PrivateKey = "",
        Desc = "tftest",
        Source = "cdn_cert_hosting",
    });

    var fooCdnDomain = new Volcengine.Cdn.CdnDomain("fooCdnDomain", new()
    {
        Domain = "tftest.byte-test.com",
        ServiceType = "web",
        Tags = new[]
        {
            new Volcengine.Cdn.Inputs.CdnDomainTagArgs
            {
                Key = "tfkey1",
                Value = "tfvalue1",
            },
            new Volcengine.Cdn.Inputs.CdnDomainTagArgs
            {
                Key = "tfkey2",
                Value = "tfvalue2",
            },
        },
        DomainConfig = Output.JsonSerialize(Output.Create(new Dictionary<string, object?>
        {
            ["OriginProtocol"] = "https",
            ["Origin"] = new[]
            {
                new Dictionary<string, object?>
                {
                    ["OriginAction"] = new Dictionary<string, object?>
                    {
                        ["OriginLines"] = new[]
                        {
                            new Dictionary<string, object?>
                            {
                                ["Address"] = "1.1.1.1",
                                ["HttpPort"] = "80",
                                ["HttpsPort"] = "443",
                                ["InstanceType"] = "ip",
                                ["OriginType"] = "primary",
                                ["PrivateBucketAccess"] = false,
                                ["Weight"] = "2",
                            },
                        },
                    },
                },
            },
            ["HTTPS"] = new Dictionary<string, object?>
            {
                ["CertInfo"] = new Dictionary<string, object?>
                {
                    ["CertId"] = fooCdnCertificate.Id,
                },
                ["DisableHttp"] = false,
                ["HTTP2"] = true,
                ["Switch"] = true,
                ["Ocsp"] = false,
                ["TlsVersion"] = new[]
                {
                    "tlsv1.1",
                    "tlsv1.2",
                },
            },
        })),
    });

});
Copy
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 com.pulumi.volcengine.cdn.CdnDomain;
import com.pulumi.volcengine.cdn.CdnDomainArgs;
import com.pulumi.volcengine.cdn.inputs.CdnDomainTagArgs;
import static com.pulumi.codegen.internal.Serialization.*;
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 fooCdnCertificate = new CdnCertificate("fooCdnCertificate", CdnCertificateArgs.builder()        
            .certificate("")
            .privateKey("")
            .desc("tftest")
            .source("cdn_cert_hosting")
            .build());

        var fooCdnDomain = new CdnDomain("fooCdnDomain", CdnDomainArgs.builder()        
            .domain("tftest.byte-test.com")
            .serviceType("web")
            .tags(            
                CdnDomainTagArgs.builder()
                    .key("tfkey1")
                    .value("tfvalue1")
                    .build(),
                CdnDomainTagArgs.builder()
                    .key("tfkey2")
                    .value("tfvalue2")
                    .build())
            .domainConfig(fooCdnCertificate.id().applyValue(id -> serializeJson(
                jsonObject(
                    jsonProperty("OriginProtocol", "https"),
                    jsonProperty("Origin", jsonArray(jsonObject(
                        jsonProperty("OriginAction", jsonObject(
                            jsonProperty("OriginLines", jsonArray(jsonObject(
                                jsonProperty("Address", "1.1.1.1"),
                                jsonProperty("HttpPort", "80"),
                                jsonProperty("HttpsPort", "443"),
                                jsonProperty("InstanceType", "ip"),
                                jsonProperty("OriginType", "primary"),
                                jsonProperty("PrivateBucketAccess", false),
                                jsonProperty("Weight", "2")
                            )))
                        ))
                    ))),
                    jsonProperty("HTTPS", jsonObject(
                        jsonProperty("CertInfo", jsonObject(
                            jsonProperty("CertId", id)
                        )),
                        jsonProperty("DisableHttp", false),
                        jsonProperty("HTTP2", true),
                        jsonProperty("Switch", true),
                        jsonProperty("Ocsp", false),
                        jsonProperty("TlsVersion", jsonArray(
                            "tlsv1.1", 
                            "tlsv1.2"
                        ))
                    ))
                ))))
            .build());

    }
}
Copy
resources:
  fooCdnCertificate:
    type: volcengine:cdn:CdnCertificate
    properties:
      certificate:
      privateKey:
      desc: tftest
      source: cdn_cert_hosting
  fooCdnDomain:
    type: volcengine:cdn:CdnDomain
    properties:
      domain: tftest.byte-test.com
      serviceType: web
      tags:
        - key: tfkey1
          value: tfvalue1
        - key: tfkey2
          value: tfvalue2
      domainConfig:
        fn::toJSON:
          OriginProtocol: https
          Origin:
            - OriginAction:
                OriginLines:
                  - Address: 1.1.1.1
                    HttpPort: '80'
                    HttpsPort: '443'
                    InstanceType: ip
                    OriginType: primary
                    PrivateBucketAccess: false
                    Weight: '2'
          HTTPS:
            CertInfo:
              CertId: ${fooCdnCertificate.id}
            DisableHttp: false
            HTTP2: true
            Switch: true
            Ocsp: false
            TlsVersion:
              - tlsv1.1
              - tlsv1.2
Copy

Create CdnDomain Resource

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

Constructor syntax

new CdnDomain(name: string, args: CdnDomainArgs, opts?: CustomResourceOptions);
@overload
def CdnDomain(resource_name: str,
              args: CdnDomainArgs,
              opts: Optional[ResourceOptions] = None)

@overload
def CdnDomain(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              domain: Optional[str] = None,
              domain_config: Optional[str] = None,
              service_type: Optional[str] = None,
              project: Optional[str] = None,
              service_region: Optional[str] = None,
              shared_cname: Optional[CdnDomainSharedCnameArgs] = None,
              tags: Optional[Sequence[CdnDomainTagArgs]] = None)
func NewCdnDomain(ctx *Context, name string, args CdnDomainArgs, opts ...ResourceOption) (*CdnDomain, error)
public CdnDomain(string name, CdnDomainArgs args, CustomResourceOptions? opts = null)
public CdnDomain(String name, CdnDomainArgs args)
public CdnDomain(String name, CdnDomainArgs args, CustomResourceOptions options)
type: volcengine:cdn:CdnDomain
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. CdnDomainArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. CdnDomainArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. CdnDomainArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. CdnDomainArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. CdnDomainArgs
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 cdnDomainResource = new Volcengine.Cdn.CdnDomain("cdnDomainResource", new()
{
    Domain = "string",
    DomainConfig = "string",
    ServiceType = "string",
    Project = "string",
    ServiceRegion = "string",
    SharedCname = new Volcengine.Cdn.Inputs.CdnDomainSharedCnameArgs
    {
        Cname = "string",
        Switch = false,
    },
    Tags = new[]
    {
        new Volcengine.Cdn.Inputs.CdnDomainTagArgs
        {
            Key = "string",
            Value = "string",
        },
    },
});
Copy
example, err := cdn.NewCdnDomain(ctx, "cdnDomainResource", &cdn.CdnDomainArgs{
	Domain:        pulumi.String("string"),
	DomainConfig:  pulumi.String("string"),
	ServiceType:   pulumi.String("string"),
	Project:       pulumi.String("string"),
	ServiceRegion: pulumi.String("string"),
	SharedCname: &cdn.CdnDomainSharedCnameArgs{
		Cname:  pulumi.String("string"),
		Switch: pulumi.Bool(false),
	},
	Tags: cdn.CdnDomainTagArray{
		&cdn.CdnDomainTagArgs{
			Key:   pulumi.String("string"),
			Value: pulumi.String("string"),
		},
	},
})
Copy
var cdnDomainResource = new CdnDomain("cdnDomainResource", CdnDomainArgs.builder()
    .domain("string")
    .domainConfig("string")
    .serviceType("string")
    .project("string")
    .serviceRegion("string")
    .sharedCname(CdnDomainSharedCnameArgs.builder()
        .cname("string")
        .switch_(false)
        .build())
    .tags(CdnDomainTagArgs.builder()
        .key("string")
        .value("string")
        .build())
    .build());
Copy
cdn_domain_resource = volcengine.cdn.CdnDomain("cdnDomainResource",
    domain="string",
    domain_config="string",
    service_type="string",
    project="string",
    service_region="string",
    shared_cname={
        "cname": "string",
        "switch": False,
    },
    tags=[{
        "key": "string",
        "value": "string",
    }])
Copy
const cdnDomainResource = new volcengine.cdn.CdnDomain("cdnDomainResource", {
    domain: "string",
    domainConfig: "string",
    serviceType: "string",
    project: "string",
    serviceRegion: "string",
    sharedCname: {
        cname: "string",
        "switch": false,
    },
    tags: [{
        key: "string",
        value: "string",
    }],
});
Copy
type: volcengine:cdn:CdnDomain
properties:
    domain: string
    domainConfig: string
    project: string
    serviceRegion: string
    serviceType: string
    sharedCname:
        cname: string
        switch: false
    tags:
        - key: string
          value: string
Copy

CdnDomain 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 CdnDomain resource accepts the following input properties:

Domain
This property is required.
Changes to this property will trigger replacement.
string
You need to add a domain. The main account can add up to 200 accelerated domains.
DomainConfig This property is required. string
Accelerate domain configuration. Please convert the configuration module structure into json and pass it into a string. You must specify the Origin module. The OriginProtocol parameter, OriginHost parameter, and other domain configuration modules are optional.
ServiceType
This property is required.
Changes to this property will trigger replacement.
string
The business type of the domain name is indicated by this parameter. The possible values are: download: for file downloads. web: for web pages. video: for audio and video on demand.
Project Changes to this property will trigger replacement. string
The project to which this domain name belongs. Default is default.
ServiceRegion Changes to this property will trigger replacement. string
Indicates the acceleration area. The parameter can take the following values: chinese_mainland: Indicates mainland China. global: Indicates global. outside_chinese_mainland: Indicates global (excluding mainland China).
SharedCname Changes to this property will trigger replacement. CdnDomainSharedCname
Configuration for sharing CNAME.
Tags List<CdnDomainTag>
Indicate the tags you have set for this domain name. You can set up to 10 tags.
Domain
This property is required.
Changes to this property will trigger replacement.
string
You need to add a domain. The main account can add up to 200 accelerated domains.
DomainConfig This property is required. string
Accelerate domain configuration. Please convert the configuration module structure into json and pass it into a string. You must specify the Origin module. The OriginProtocol parameter, OriginHost parameter, and other domain configuration modules are optional.
ServiceType
This property is required.
Changes to this property will trigger replacement.
string
The business type of the domain name is indicated by this parameter. The possible values are: download: for file downloads. web: for web pages. video: for audio and video on demand.
Project Changes to this property will trigger replacement. string
The project to which this domain name belongs. Default is default.
ServiceRegion Changes to this property will trigger replacement. string
Indicates the acceleration area. The parameter can take the following values: chinese_mainland: Indicates mainland China. global: Indicates global. outside_chinese_mainland: Indicates global (excluding mainland China).
SharedCname Changes to this property will trigger replacement. CdnDomainSharedCnameArgs
Configuration for sharing CNAME.
Tags []CdnDomainTagArgs
Indicate the tags you have set for this domain name. You can set up to 10 tags.
domain
This property is required.
Changes to this property will trigger replacement.
String
You need to add a domain. The main account can add up to 200 accelerated domains.
domainConfig This property is required. String
Accelerate domain configuration. Please convert the configuration module structure into json and pass it into a string. You must specify the Origin module. The OriginProtocol parameter, OriginHost parameter, and other domain configuration modules are optional.
serviceType
This property is required.
Changes to this property will trigger replacement.
String
The business type of the domain name is indicated by this parameter. The possible values are: download: for file downloads. web: for web pages. video: for audio and video on demand.
project Changes to this property will trigger replacement. String
The project to which this domain name belongs. Default is default.
serviceRegion Changes to this property will trigger replacement. String
Indicates the acceleration area. The parameter can take the following values: chinese_mainland: Indicates mainland China. global: Indicates global. outside_chinese_mainland: Indicates global (excluding mainland China).
sharedCname Changes to this property will trigger replacement. CdnDomainSharedCname
Configuration for sharing CNAME.
tags List<CdnDomainTag>
Indicate the tags you have set for this domain name. You can set up to 10 tags.
domain
This property is required.
Changes to this property will trigger replacement.
string
You need to add a domain. The main account can add up to 200 accelerated domains.
domainConfig This property is required. string
Accelerate domain configuration. Please convert the configuration module structure into json and pass it into a string. You must specify the Origin module. The OriginProtocol parameter, OriginHost parameter, and other domain configuration modules are optional.
serviceType
This property is required.
Changes to this property will trigger replacement.
string
The business type of the domain name is indicated by this parameter. The possible values are: download: for file downloads. web: for web pages. video: for audio and video on demand.
project Changes to this property will trigger replacement. string
The project to which this domain name belongs. Default is default.
serviceRegion Changes to this property will trigger replacement. string
Indicates the acceleration area. The parameter can take the following values: chinese_mainland: Indicates mainland China. global: Indicates global. outside_chinese_mainland: Indicates global (excluding mainland China).
sharedCname Changes to this property will trigger replacement. CdnDomainSharedCname
Configuration for sharing CNAME.
tags CdnDomainTag[]
Indicate the tags you have set for this domain name. You can set up to 10 tags.
domain
This property is required.
Changes to this property will trigger replacement.
str
You need to add a domain. The main account can add up to 200 accelerated domains.
domain_config This property is required. str
Accelerate domain configuration. Please convert the configuration module structure into json and pass it into a string. You must specify the Origin module. The OriginProtocol parameter, OriginHost parameter, and other domain configuration modules are optional.
service_type
This property is required.
Changes to this property will trigger replacement.
str
The business type of the domain name is indicated by this parameter. The possible values are: download: for file downloads. web: for web pages. video: for audio and video on demand.
project Changes to this property will trigger replacement. str
The project to which this domain name belongs. Default is default.
service_region Changes to this property will trigger replacement. str
Indicates the acceleration area. The parameter can take the following values: chinese_mainland: Indicates mainland China. global: Indicates global. outside_chinese_mainland: Indicates global (excluding mainland China).
shared_cname Changes to this property will trigger replacement. CdnDomainSharedCnameArgs
Configuration for sharing CNAME.
tags Sequence[CdnDomainTagArgs]
Indicate the tags you have set for this domain name. You can set up to 10 tags.
domain
This property is required.
Changes to this property will trigger replacement.
String
You need to add a domain. The main account can add up to 200 accelerated domains.
domainConfig This property is required. String
Accelerate domain configuration. Please convert the configuration module structure into json and pass it into a string. You must specify the Origin module. The OriginProtocol parameter, OriginHost parameter, and other domain configuration modules are optional.
serviceType
This property is required.
Changes to this property will trigger replacement.
String
The business type of the domain name is indicated by this parameter. The possible values are: download: for file downloads. web: for web pages. video: for audio and video on demand.
project Changes to this property will trigger replacement. String
The project to which this domain name belongs. Default is default.
serviceRegion Changes to this property will trigger replacement. String
Indicates the acceleration area. The parameter can take the following values: chinese_mainland: Indicates mainland China. global: Indicates global. outside_chinese_mainland: Indicates global (excluding mainland China).
sharedCname Changes to this property will trigger replacement. Property Map
Configuration for sharing CNAME.
tags List<Property Map>
Indicate the tags you have set for this domain name. You can set up to 10 tags.

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
Status string
The status of the domain.
Id string
The provider-assigned unique ID for this managed resource.
Status string
The status of the domain.
id String
The provider-assigned unique ID for this managed resource.
status String
The status of the domain.
id string
The provider-assigned unique ID for this managed resource.
status string
The status of the domain.
id str
The provider-assigned unique ID for this managed resource.
status str
The status of the domain.
id String
The provider-assigned unique ID for this managed resource.
status String
The status of the domain.

Look up Existing CdnDomain Resource

Get an existing CdnDomain 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?: CdnDomainState, opts?: CustomResourceOptions): CdnDomain
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        domain: Optional[str] = None,
        domain_config: Optional[str] = None,
        project: Optional[str] = None,
        service_region: Optional[str] = None,
        service_type: Optional[str] = None,
        shared_cname: Optional[CdnDomainSharedCnameArgs] = None,
        status: Optional[str] = None,
        tags: Optional[Sequence[CdnDomainTagArgs]] = None) -> CdnDomain
func GetCdnDomain(ctx *Context, name string, id IDInput, state *CdnDomainState, opts ...ResourceOption) (*CdnDomain, error)
public static CdnDomain Get(string name, Input<string> id, CdnDomainState? state, CustomResourceOptions? opts = null)
public static CdnDomain get(String name, Output<String> id, CdnDomainState state, CustomResourceOptions options)
resources:  _:    type: volcengine:cdn:CdnDomain    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
Domain Changes to this property will trigger replacement. string
You need to add a domain. The main account can add up to 200 accelerated domains.
DomainConfig string
Accelerate domain configuration. Please convert the configuration module structure into json and pass it into a string. You must specify the Origin module. The OriginProtocol parameter, OriginHost parameter, and other domain configuration modules are optional.
Project Changes to this property will trigger replacement. string
The project to which this domain name belongs. Default is default.
ServiceRegion Changes to this property will trigger replacement. string
Indicates the acceleration area. The parameter can take the following values: chinese_mainland: Indicates mainland China. global: Indicates global. outside_chinese_mainland: Indicates global (excluding mainland China).
ServiceType Changes to this property will trigger replacement. string
The business type of the domain name is indicated by this parameter. The possible values are: download: for file downloads. web: for web pages. video: for audio and video on demand.
SharedCname Changes to this property will trigger replacement. CdnDomainSharedCname
Configuration for sharing CNAME.
Status string
The status of the domain.
Tags List<CdnDomainTag>
Indicate the tags you have set for this domain name. You can set up to 10 tags.
Domain Changes to this property will trigger replacement. string
You need to add a domain. The main account can add up to 200 accelerated domains.
DomainConfig string
Accelerate domain configuration. Please convert the configuration module structure into json and pass it into a string. You must specify the Origin module. The OriginProtocol parameter, OriginHost parameter, and other domain configuration modules are optional.
Project Changes to this property will trigger replacement. string
The project to which this domain name belongs. Default is default.
ServiceRegion Changes to this property will trigger replacement. string
Indicates the acceleration area. The parameter can take the following values: chinese_mainland: Indicates mainland China. global: Indicates global. outside_chinese_mainland: Indicates global (excluding mainland China).
ServiceType Changes to this property will trigger replacement. string
The business type of the domain name is indicated by this parameter. The possible values are: download: for file downloads. web: for web pages. video: for audio and video on demand.
SharedCname Changes to this property will trigger replacement. CdnDomainSharedCnameArgs
Configuration for sharing CNAME.
Status string
The status of the domain.
Tags []CdnDomainTagArgs
Indicate the tags you have set for this domain name. You can set up to 10 tags.
domain Changes to this property will trigger replacement. String
You need to add a domain. The main account can add up to 200 accelerated domains.
domainConfig String
Accelerate domain configuration. Please convert the configuration module structure into json and pass it into a string. You must specify the Origin module. The OriginProtocol parameter, OriginHost parameter, and other domain configuration modules are optional.
project Changes to this property will trigger replacement. String
The project to which this domain name belongs. Default is default.
serviceRegion Changes to this property will trigger replacement. String
Indicates the acceleration area. The parameter can take the following values: chinese_mainland: Indicates mainland China. global: Indicates global. outside_chinese_mainland: Indicates global (excluding mainland China).
serviceType Changes to this property will trigger replacement. String
The business type of the domain name is indicated by this parameter. The possible values are: download: for file downloads. web: for web pages. video: for audio and video on demand.
sharedCname Changes to this property will trigger replacement. CdnDomainSharedCname
Configuration for sharing CNAME.
status String
The status of the domain.
tags List<CdnDomainTag>
Indicate the tags you have set for this domain name. You can set up to 10 tags.
domain Changes to this property will trigger replacement. string
You need to add a domain. The main account can add up to 200 accelerated domains.
domainConfig string
Accelerate domain configuration. Please convert the configuration module structure into json and pass it into a string. You must specify the Origin module. The OriginProtocol parameter, OriginHost parameter, and other domain configuration modules are optional.
project Changes to this property will trigger replacement. string
The project to which this domain name belongs. Default is default.
serviceRegion Changes to this property will trigger replacement. string
Indicates the acceleration area. The parameter can take the following values: chinese_mainland: Indicates mainland China. global: Indicates global. outside_chinese_mainland: Indicates global (excluding mainland China).
serviceType Changes to this property will trigger replacement. string
The business type of the domain name is indicated by this parameter. The possible values are: download: for file downloads. web: for web pages. video: for audio and video on demand.
sharedCname Changes to this property will trigger replacement. CdnDomainSharedCname
Configuration for sharing CNAME.
status string
The status of the domain.
tags CdnDomainTag[]
Indicate the tags you have set for this domain name. You can set up to 10 tags.
domain Changes to this property will trigger replacement. str
You need to add a domain. The main account can add up to 200 accelerated domains.
domain_config str
Accelerate domain configuration. Please convert the configuration module structure into json and pass it into a string. You must specify the Origin module. The OriginProtocol parameter, OriginHost parameter, and other domain configuration modules are optional.
project Changes to this property will trigger replacement. str
The project to which this domain name belongs. Default is default.
service_region Changes to this property will trigger replacement. str
Indicates the acceleration area. The parameter can take the following values: chinese_mainland: Indicates mainland China. global: Indicates global. outside_chinese_mainland: Indicates global (excluding mainland China).
service_type Changes to this property will trigger replacement. str
The business type of the domain name is indicated by this parameter. The possible values are: download: for file downloads. web: for web pages. video: for audio and video on demand.
shared_cname Changes to this property will trigger replacement. CdnDomainSharedCnameArgs
Configuration for sharing CNAME.
status str
The status of the domain.
tags Sequence[CdnDomainTagArgs]
Indicate the tags you have set for this domain name. You can set up to 10 tags.
domain Changes to this property will trigger replacement. String
You need to add a domain. The main account can add up to 200 accelerated domains.
domainConfig String
Accelerate domain configuration. Please convert the configuration module structure into json and pass it into a string. You must specify the Origin module. The OriginProtocol parameter, OriginHost parameter, and other domain configuration modules are optional.
project Changes to this property will trigger replacement. String
The project to which this domain name belongs. Default is default.
serviceRegion Changes to this property will trigger replacement. String
Indicates the acceleration area. The parameter can take the following values: chinese_mainland: Indicates mainland China. global: Indicates global. outside_chinese_mainland: Indicates global (excluding mainland China).
serviceType Changes to this property will trigger replacement. String
The business type of the domain name is indicated by this parameter. The possible values are: download: for file downloads. web: for web pages. video: for audio and video on demand.
sharedCname Changes to this property will trigger replacement. Property Map
Configuration for sharing CNAME.
status String
The status of the domain.
tags List<Property Map>
Indicate the tags you have set for this domain name. You can set up to 10 tags.

Supporting Types

CdnDomainSharedCname
, CdnDomainSharedCnameArgs

Cname
This property is required.
Changes to this property will trigger replacement.
string
Assign a CNAME to the accelerated domain.
Switch
This property is required.
Changes to this property will trigger replacement.
bool
Specify whether to enable shared CNAME.
Cname
This property is required.
Changes to this property will trigger replacement.
string
Assign a CNAME to the accelerated domain.
Switch
This property is required.
Changes to this property will trigger replacement.
bool
Specify whether to enable shared CNAME.
cname
This property is required.
Changes to this property will trigger replacement.
String
Assign a CNAME to the accelerated domain.
switch_
This property is required.
Changes to this property will trigger replacement.
Boolean
Specify whether to enable shared CNAME.
cname
This property is required.
Changes to this property will trigger replacement.
string
Assign a CNAME to the accelerated domain.
switch
This property is required.
Changes to this property will trigger replacement.
boolean
Specify whether to enable shared CNAME.
cname
This property is required.
Changes to this property will trigger replacement.
str
Assign a CNAME to the accelerated domain.
switch
This property is required.
Changes to this property will trigger replacement.
bool
Specify whether to enable shared CNAME.
cname
This property is required.
Changes to this property will trigger replacement.
String
Assign a CNAME to the accelerated domain.
switch
This property is required.
Changes to this property will trigger replacement.
Boolean
Specify whether to enable shared CNAME.

CdnDomainTag
, CdnDomainTagArgs

Key This property is required. string
The key of the tag.
Value This property is required. string
The value of the tag.
Key This property is required. string
The key of the tag.
Value This property is required. string
The value of the tag.
key This property is required. String
The key of the tag.
value This property is required. String
The value of the tag.
key This property is required. string
The key of the tag.
value This property is required. string
The value of the tag.
key This property is required. str
The key of the tag.
value This property is required. str
The value of the tag.
key This property is required. String
The key of the tag.
value This property is required. String
The value of the tag.

Import

CdnDomain can be imported using the domain, e.g.

$ pulumi import volcengine:cdn/cdnDomain:CdnDomain default www.volcengine.com
Copy

Please note that when you execute destroy, we will first take the domain name offline and then delete it.

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.