1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. dcdn
  5. Domain
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

alicloud.dcdn.Domain

Explore with Pulumi AI

Provides a DCDN Domain resource.

Full station accelerated domain name.

For information about DCDN Domain and how to use it, see What is Domain.

NOTE: Available since v1.94.0.

NOTE: Field force_set, security_token has been removed from provider version 1.227.1.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
import * as random from "@pulumi/random";

const config = new pulumi.Config();
const domainName = config.get("domainName") || "tf-example.com";
const _default = new random.index.Integer("default", {
    min: 10000,
    max: 99999,
});
const example = new alicloud.dcdn.Domain("example", {
    domainName: `${domainName}-${_default.result}`,
    scope: "overseas",
    sources: [{
        content: "1.1.1.1",
        port: 80,
        priority: "20",
        type: "ipaddr",
        weight: "10",
    }],
});
Copy
import pulumi
import pulumi_alicloud as alicloud
import pulumi_random as random

config = pulumi.Config()
domain_name = config.get("domainName")
if domain_name is None:
    domain_name = "tf-example.com"
default = random.index.Integer("default",
    min=10000,
    max=99999)
example = alicloud.dcdn.Domain("example",
    domain_name=f"{domain_name}-{default['result']}",
    scope="overseas",
    sources=[{
        "content": "1.1.1.1",
        "port": 80,
        "priority": "20",
        "type": "ipaddr",
        "weight": "10",
    }])
Copy
package main

import (
	"fmt"

	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/dcdn"
	"github.com/pulumi/pulumi-random/sdk/v4/go/random"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		cfg := config.New(ctx, "")
		domainName := "tf-example.com"
		if param := cfg.Get("domainName"); param != "" {
			domainName = param
		}
		_default, err := random.NewInteger(ctx, "default", &random.IntegerArgs{
			Min: 10000,
			Max: 99999,
		})
		if err != nil {
			return err
		}
		_, err = dcdn.NewDomain(ctx, "example", &dcdn.DomainArgs{
			DomainName: pulumi.Sprintf("%v-%v", domainName, _default.Result),
			Scope:      pulumi.String("overseas"),
			Sources: dcdn.DomainSourceArray{
				&dcdn.DomainSourceArgs{
					Content:  pulumi.String("1.1.1.1"),
					Port:     pulumi.Int(80),
					Priority: pulumi.String("20"),
					Type:     pulumi.String("ipaddr"),
					Weight:   pulumi.String("10"),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
using Random = Pulumi.Random;

return await Deployment.RunAsync(() => 
{
    var config = new Config();
    var domainName = config.Get("domainName") ?? "tf-example.com";
    var @default = new Random.Index.Integer("default", new()
    {
        Min = 10000,
        Max = 99999,
    });

    var example = new AliCloud.Dcdn.Domain("example", new()
    {
        DomainName = $"{domainName}-{@default.Result}",
        Scope = "overseas",
        Sources = new[]
        {
            new AliCloud.Dcdn.Inputs.DomainSourceArgs
            {
                Content = "1.1.1.1",
                Port = 80,
                Priority = "20",
                Type = "ipaddr",
                Weight = "10",
            },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.random.integer;
import com.pulumi.random.IntegerArgs;
import com.pulumi.alicloud.dcdn.Domain;
import com.pulumi.alicloud.dcdn.DomainArgs;
import com.pulumi.alicloud.dcdn.inputs.DomainSourceArgs;
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 config = ctx.config();
        final var domainName = config.get("domainName").orElse("tf-example.com");
        var default_ = new Integer("default", IntegerArgs.builder()
            .min(10000)
            .max(99999)
            .build());

        var example = new Domain("example", DomainArgs.builder()
            .domainName(String.format("%s-%s", domainName,default_.result()))
            .scope("overseas")
            .sources(DomainSourceArgs.builder()
                .content("1.1.1.1")
                .port("80")
                .priority("20")
                .type("ipaddr")
                .weight("10")
                .build())
            .build());

    }
}
Copy
configuration:
  domainName:
    type: string
    default: tf-example.com
resources:
  default:
    type: random:integer
    properties:
      min: 10000
      max: 99999
  example:
    type: alicloud:dcdn:Domain
    properties:
      domainName: ${domainName}-${default.result}
      scope: overseas
      sources:
        - content: 1.1.1.1
          port: '80'
          priority: '20'
          type: ipaddr
          weight: '10'
Copy

Create Domain Resource

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

Constructor syntax

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

@overload
def Domain(resource_name: str,
           opts: Optional[ResourceOptions] = None,
           domain_name: Optional[str] = None,
           resource_group_id: Optional[str] = None,
           scope: Optional[str] = None,
           cert_type: Optional[str] = None,
           check_url: Optional[str] = None,
           cert_name: Optional[str] = None,
           env: Optional[str] = None,
           function_type: Optional[str] = None,
           cert_id: Optional[str] = None,
           cert_region: Optional[str] = None,
           sources: Optional[Sequence[DomainSourceArgs]] = None,
           scene: Optional[str] = None,
           ssl_pri: Optional[str] = None,
           ssl_protocol: Optional[str] = None,
           ssl_pub: Optional[str] = None,
           status: Optional[str] = None,
           tags: Optional[Mapping[str, str]] = None,
           top_level_domain: Optional[str] = None)
func NewDomain(ctx *Context, name string, args DomainArgs, opts ...ResourceOption) (*Domain, error)
public Domain(string name, DomainArgs args, CustomResourceOptions? opts = null)
public Domain(String name, DomainArgs args)
public Domain(String name, DomainArgs args, CustomResourceOptions options)
type: alicloud:dcdn:Domain
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. DomainArgs
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. DomainArgs
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. DomainArgs
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. DomainArgs
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. DomainArgs
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 alicloudDomainResource = new AliCloud.Dcdn.Domain("alicloudDomainResource", new()
{
    DomainName = "string",
    ResourceGroupId = "string",
    Scope = "string",
    CertType = "string",
    CheckUrl = "string",
    CertName = "string",
    Env = "string",
    FunctionType = "string",
    CertId = "string",
    CertRegion = "string",
    Sources = new[]
    {
        new AliCloud.Dcdn.Inputs.DomainSourceArgs
        {
            Content = "string",
            Port = 0,
            Priority = "string",
            Type = "string",
            Weight = "string",
        },
    },
    Scene = "string",
    SslPri = "string",
    SslProtocol = "string",
    SslPub = "string",
    Status = "string",
    Tags = 
    {
        { "string", "string" },
    },
    TopLevelDomain = "string",
});
Copy
example, err := dcdn.NewDomain(ctx, "alicloudDomainResource", &dcdn.DomainArgs{
	DomainName:      pulumi.String("string"),
	ResourceGroupId: pulumi.String("string"),
	Scope:           pulumi.String("string"),
	CertType:        pulumi.String("string"),
	CheckUrl:        pulumi.String("string"),
	CertName:        pulumi.String("string"),
	Env:             pulumi.String("string"),
	FunctionType:    pulumi.String("string"),
	CertId:          pulumi.String("string"),
	CertRegion:      pulumi.String("string"),
	Sources: dcdn.DomainSourceArray{
		&dcdn.DomainSourceArgs{
			Content:  pulumi.String("string"),
			Port:     pulumi.Int(0),
			Priority: pulumi.String("string"),
			Type:     pulumi.String("string"),
			Weight:   pulumi.String("string"),
		},
	},
	Scene:       pulumi.String("string"),
	SslPri:      pulumi.String("string"),
	SslProtocol: pulumi.String("string"),
	SslPub:      pulumi.String("string"),
	Status:      pulumi.String("string"),
	Tags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	TopLevelDomain: pulumi.String("string"),
})
Copy
var alicloudDomainResource = new Domain("alicloudDomainResource", DomainArgs.builder()
    .domainName("string")
    .resourceGroupId("string")
    .scope("string")
    .certType("string")
    .checkUrl("string")
    .certName("string")
    .env("string")
    .functionType("string")
    .certId("string")
    .certRegion("string")
    .sources(DomainSourceArgs.builder()
        .content("string")
        .port(0)
        .priority("string")
        .type("string")
        .weight("string")
        .build())
    .scene("string")
    .sslPri("string")
    .sslProtocol("string")
    .sslPub("string")
    .status("string")
    .tags(Map.of("string", "string"))
    .topLevelDomain("string")
    .build());
Copy
alicloud_domain_resource = alicloud.dcdn.Domain("alicloudDomainResource",
    domain_name="string",
    resource_group_id="string",
    scope="string",
    cert_type="string",
    check_url="string",
    cert_name="string",
    env="string",
    function_type="string",
    cert_id="string",
    cert_region="string",
    sources=[{
        "content": "string",
        "port": 0,
        "priority": "string",
        "type": "string",
        "weight": "string",
    }],
    scene="string",
    ssl_pri="string",
    ssl_protocol="string",
    ssl_pub="string",
    status="string",
    tags={
        "string": "string",
    },
    top_level_domain="string")
Copy
const alicloudDomainResource = new alicloud.dcdn.Domain("alicloudDomainResource", {
    domainName: "string",
    resourceGroupId: "string",
    scope: "string",
    certType: "string",
    checkUrl: "string",
    certName: "string",
    env: "string",
    functionType: "string",
    certId: "string",
    certRegion: "string",
    sources: [{
        content: "string",
        port: 0,
        priority: "string",
        type: "string",
        weight: "string",
    }],
    scene: "string",
    sslPri: "string",
    sslProtocol: "string",
    sslPub: "string",
    status: "string",
    tags: {
        string: "string",
    },
    topLevelDomain: "string",
});
Copy
type: alicloud:dcdn:Domain
properties:
    certId: string
    certName: string
    certRegion: string
    certType: string
    checkUrl: string
    domainName: string
    env: string
    functionType: string
    resourceGroupId: string
    scene: string
    scope: string
    sources:
        - content: string
          port: 0
          priority: string
          type: string
          weight: string
    sslPri: string
    sslProtocol: string
    sslPub: string
    status: string
    tags:
        string: string
    topLevelDomain: string
Copy

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

DomainName
This property is required.
Changes to this property will trigger replacement.
string
The accelerated domain name. You can specify multiple domain names and separate them with commas (,). You can specify up to 500 domain names in each request. The query results of multiple domain names are aggregated. If you do not specify this parameter, data of all accelerated domain names under your account is queried.
CertId string
The certificate ID. This parameter is required and valid only when CertType is set to cas. If you specify this parameter, an existing certificate is used.
CertName string
The name of the new certificate. You can specify only one certificate name. This parameter is optional and valid only when CertType is set to upload.
CertRegion string
The region of the SSL certificate. This parameter takes effect only when CertType is set to cas. Default value: cn-hangzhou. Valid values: cn-hangzhou and ap-southeast-1.
CertType string
The certificate type.
CheckUrl string
The URL that is used for health checks.
Env string
Specifies whether the certificate is issued in canary releases. If you set this parameter to staging, the certificate is issued in canary releases. If you do not specify this parameter or set this parameter to other values, the certificate is officially issued.
FunctionType Changes to this property will trigger replacement. string
Computing service type. Valid values:
ResourceGroupId string
The ID of the resource group. If you do not specify a value for this parameter, the system automatically assigns the ID of the default resource group.
Scene Changes to this property will trigger replacement. string
The Acceleration scen. Supported:
Scope string
The region where the acceleration service is deployed. Valid values:
Sources List<Pulumi.AliCloud.Dcdn.Inputs.DomainSource>
Source See sources below.
SslPri string
The private key. Specify the private key only if you want to enable the SSL certificate.
SslProtocol string
Specifies whether to enable the SSL certificate. Valid values:
SslPub string
The content of the SSL certificate. Specify the content of the SSL certificate only if you want to enable the SSL certificate.
Status string
The status of the domain name. Valid values:
Tags Dictionary<string, string>
The tag of the resource
TopLevelDomain string
The top-level domain.
DomainName
This property is required.
Changes to this property will trigger replacement.
string
The accelerated domain name. You can specify multiple domain names and separate them with commas (,). You can specify up to 500 domain names in each request. The query results of multiple domain names are aggregated. If you do not specify this parameter, data of all accelerated domain names under your account is queried.
CertId string
The certificate ID. This parameter is required and valid only when CertType is set to cas. If you specify this parameter, an existing certificate is used.
CertName string
The name of the new certificate. You can specify only one certificate name. This parameter is optional and valid only when CertType is set to upload.
CertRegion string
The region of the SSL certificate. This parameter takes effect only when CertType is set to cas. Default value: cn-hangzhou. Valid values: cn-hangzhou and ap-southeast-1.
CertType string
The certificate type.
CheckUrl string
The URL that is used for health checks.
Env string
Specifies whether the certificate is issued in canary releases. If you set this parameter to staging, the certificate is issued in canary releases. If you do not specify this parameter or set this parameter to other values, the certificate is officially issued.
FunctionType Changes to this property will trigger replacement. string
Computing service type. Valid values:
ResourceGroupId string
The ID of the resource group. If you do not specify a value for this parameter, the system automatically assigns the ID of the default resource group.
Scene Changes to this property will trigger replacement. string
The Acceleration scen. Supported:
Scope string
The region where the acceleration service is deployed. Valid values:
Sources []DomainSourceArgs
Source See sources below.
SslPri string
The private key. Specify the private key only if you want to enable the SSL certificate.
SslProtocol string
Specifies whether to enable the SSL certificate. Valid values:
SslPub string
The content of the SSL certificate. Specify the content of the SSL certificate only if you want to enable the SSL certificate.
Status string
The status of the domain name. Valid values:
Tags map[string]string
The tag of the resource
TopLevelDomain string
The top-level domain.
domainName
This property is required.
Changes to this property will trigger replacement.
String
The accelerated domain name. You can specify multiple domain names and separate them with commas (,). You can specify up to 500 domain names in each request. The query results of multiple domain names are aggregated. If you do not specify this parameter, data of all accelerated domain names under your account is queried.
certId String
The certificate ID. This parameter is required and valid only when CertType is set to cas. If you specify this parameter, an existing certificate is used.
certName String
The name of the new certificate. You can specify only one certificate name. This parameter is optional and valid only when CertType is set to upload.
certRegion String
The region of the SSL certificate. This parameter takes effect only when CertType is set to cas. Default value: cn-hangzhou. Valid values: cn-hangzhou and ap-southeast-1.
certType String
The certificate type.
checkUrl String
The URL that is used for health checks.
env String
Specifies whether the certificate is issued in canary releases. If you set this parameter to staging, the certificate is issued in canary releases. If you do not specify this parameter or set this parameter to other values, the certificate is officially issued.
functionType Changes to this property will trigger replacement. String
Computing service type. Valid values:
resourceGroupId String
The ID of the resource group. If you do not specify a value for this parameter, the system automatically assigns the ID of the default resource group.
scene Changes to this property will trigger replacement. String
The Acceleration scen. Supported:
scope String
The region where the acceleration service is deployed. Valid values:
sources List<DomainSource>
Source See sources below.
sslPri String
The private key. Specify the private key only if you want to enable the SSL certificate.
sslProtocol String
Specifies whether to enable the SSL certificate. Valid values:
sslPub String
The content of the SSL certificate. Specify the content of the SSL certificate only if you want to enable the SSL certificate.
status String
The status of the domain name. Valid values:
tags Map<String,String>
The tag of the resource
topLevelDomain String
The top-level domain.
domainName
This property is required.
Changes to this property will trigger replacement.
string
The accelerated domain name. You can specify multiple domain names and separate them with commas (,). You can specify up to 500 domain names in each request. The query results of multiple domain names are aggregated. If you do not specify this parameter, data of all accelerated domain names under your account is queried.
certId string
The certificate ID. This parameter is required and valid only when CertType is set to cas. If you specify this parameter, an existing certificate is used.
certName string
The name of the new certificate. You can specify only one certificate name. This parameter is optional and valid only when CertType is set to upload.
certRegion string
The region of the SSL certificate. This parameter takes effect only when CertType is set to cas. Default value: cn-hangzhou. Valid values: cn-hangzhou and ap-southeast-1.
certType string
The certificate type.
checkUrl string
The URL that is used for health checks.
env string
Specifies whether the certificate is issued in canary releases. If you set this parameter to staging, the certificate is issued in canary releases. If you do not specify this parameter or set this parameter to other values, the certificate is officially issued.
functionType Changes to this property will trigger replacement. string
Computing service type. Valid values:
resourceGroupId string
The ID of the resource group. If you do not specify a value for this parameter, the system automatically assigns the ID of the default resource group.
scene Changes to this property will trigger replacement. string
The Acceleration scen. Supported:
scope string
The region where the acceleration service is deployed. Valid values:
sources DomainSource[]
Source See sources below.
sslPri string
The private key. Specify the private key only if you want to enable the SSL certificate.
sslProtocol string
Specifies whether to enable the SSL certificate. Valid values:
sslPub string
The content of the SSL certificate. Specify the content of the SSL certificate only if you want to enable the SSL certificate.
status string
The status of the domain name. Valid values:
tags {[key: string]: string}
The tag of the resource
topLevelDomain string
The top-level domain.
domain_name
This property is required.
Changes to this property will trigger replacement.
str
The accelerated domain name. You can specify multiple domain names and separate them with commas (,). You can specify up to 500 domain names in each request. The query results of multiple domain names are aggregated. If you do not specify this parameter, data of all accelerated domain names under your account is queried.
cert_id str
The certificate ID. This parameter is required and valid only when CertType is set to cas. If you specify this parameter, an existing certificate is used.
cert_name str
The name of the new certificate. You can specify only one certificate name. This parameter is optional and valid only when CertType is set to upload.
cert_region str
The region of the SSL certificate. This parameter takes effect only when CertType is set to cas. Default value: cn-hangzhou. Valid values: cn-hangzhou and ap-southeast-1.
cert_type str
The certificate type.
check_url str
The URL that is used for health checks.
env str
Specifies whether the certificate is issued in canary releases. If you set this parameter to staging, the certificate is issued in canary releases. If you do not specify this parameter or set this parameter to other values, the certificate is officially issued.
function_type Changes to this property will trigger replacement. str
Computing service type. Valid values:
resource_group_id str
The ID of the resource group. If you do not specify a value for this parameter, the system automatically assigns the ID of the default resource group.
scene Changes to this property will trigger replacement. str
The Acceleration scen. Supported:
scope str
The region where the acceleration service is deployed. Valid values:
sources Sequence[DomainSourceArgs]
Source See sources below.
ssl_pri str
The private key. Specify the private key only if you want to enable the SSL certificate.
ssl_protocol str
Specifies whether to enable the SSL certificate. Valid values:
ssl_pub str
The content of the SSL certificate. Specify the content of the SSL certificate only if you want to enable the SSL certificate.
status str
The status of the domain name. Valid values:
tags Mapping[str, str]
The tag of the resource
top_level_domain str
The top-level domain.
domainName
This property is required.
Changes to this property will trigger replacement.
String
The accelerated domain name. You can specify multiple domain names and separate them with commas (,). You can specify up to 500 domain names in each request. The query results of multiple domain names are aggregated. If you do not specify this parameter, data of all accelerated domain names under your account is queried.
certId String
The certificate ID. This parameter is required and valid only when CertType is set to cas. If you specify this parameter, an existing certificate is used.
certName String
The name of the new certificate. You can specify only one certificate name. This parameter is optional and valid only when CertType is set to upload.
certRegion String
The region of the SSL certificate. This parameter takes effect only when CertType is set to cas. Default value: cn-hangzhou. Valid values: cn-hangzhou and ap-southeast-1.
certType String
The certificate type.
checkUrl String
The URL that is used for health checks.
env String
Specifies whether the certificate is issued in canary releases. If you set this parameter to staging, the certificate is issued in canary releases. If you do not specify this parameter or set this parameter to other values, the certificate is officially issued.
functionType Changes to this property will trigger replacement. String
Computing service type. Valid values:
resourceGroupId String
The ID of the resource group. If you do not specify a value for this parameter, the system automatically assigns the ID of the default resource group.
scene Changes to this property will trigger replacement. String
The Acceleration scen. Supported:
scope String
The region where the acceleration service is deployed. Valid values:
sources List<Property Map>
Source See sources below.
sslPri String
The private key. Specify the private key only if you want to enable the SSL certificate.
sslProtocol String
Specifies whether to enable the SSL certificate. Valid values:
sslPub String
The content of the SSL certificate. Specify the content of the SSL certificate only if you want to enable the SSL certificate.
status String
The status of the domain name. Valid values:
tags Map<String>
The tag of the resource
topLevelDomain String
The top-level domain.

Outputs

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

Cname string
The CNAME domain name corresponding to the accelerated domain name.
CreateTime string
The time when the accelerated domain name was created.
Id string
The provider-assigned unique ID for this managed resource.
Cname string
The CNAME domain name corresponding to the accelerated domain name.
CreateTime string
The time when the accelerated domain name was created.
Id string
The provider-assigned unique ID for this managed resource.
cname String
The CNAME domain name corresponding to the accelerated domain name.
createTime String
The time when the accelerated domain name was created.
id String
The provider-assigned unique ID for this managed resource.
cname string
The CNAME domain name corresponding to the accelerated domain name.
createTime string
The time when the accelerated domain name was created.
id string
The provider-assigned unique ID for this managed resource.
cname str
The CNAME domain name corresponding to the accelerated domain name.
create_time str
The time when the accelerated domain name was created.
id str
The provider-assigned unique ID for this managed resource.
cname String
The CNAME domain name corresponding to the accelerated domain name.
createTime String
The time when the accelerated domain name was created.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing Domain Resource

Get an existing Domain 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?: DomainState, opts?: CustomResourceOptions): Domain
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        cert_id: Optional[str] = None,
        cert_name: Optional[str] = None,
        cert_region: Optional[str] = None,
        cert_type: Optional[str] = None,
        check_url: Optional[str] = None,
        cname: Optional[str] = None,
        create_time: Optional[str] = None,
        domain_name: Optional[str] = None,
        env: Optional[str] = None,
        function_type: Optional[str] = None,
        resource_group_id: Optional[str] = None,
        scene: Optional[str] = None,
        scope: Optional[str] = None,
        sources: Optional[Sequence[DomainSourceArgs]] = None,
        ssl_pri: Optional[str] = None,
        ssl_protocol: Optional[str] = None,
        ssl_pub: Optional[str] = None,
        status: Optional[str] = None,
        tags: Optional[Mapping[str, str]] = None,
        top_level_domain: Optional[str] = None) -> Domain
func GetDomain(ctx *Context, name string, id IDInput, state *DomainState, opts ...ResourceOption) (*Domain, error)
public static Domain Get(string name, Input<string> id, DomainState? state, CustomResourceOptions? opts = null)
public static Domain get(String name, Output<String> id, DomainState state, CustomResourceOptions options)
resources:  _:    type: alicloud:dcdn:Domain    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:
CertId string
The certificate ID. This parameter is required and valid only when CertType is set to cas. If you specify this parameter, an existing certificate is used.
CertName string
The name of the new certificate. You can specify only one certificate name. This parameter is optional and valid only when CertType is set to upload.
CertRegion string
The region of the SSL certificate. This parameter takes effect only when CertType is set to cas. Default value: cn-hangzhou. Valid values: cn-hangzhou and ap-southeast-1.
CertType string
The certificate type.
CheckUrl string
The URL that is used for health checks.
Cname string
The CNAME domain name corresponding to the accelerated domain name.
CreateTime string
The time when the accelerated domain name was created.
DomainName Changes to this property will trigger replacement. string
The accelerated domain name. You can specify multiple domain names and separate them with commas (,). You can specify up to 500 domain names in each request. The query results of multiple domain names are aggregated. If you do not specify this parameter, data of all accelerated domain names under your account is queried.
Env string
Specifies whether the certificate is issued in canary releases. If you set this parameter to staging, the certificate is issued in canary releases. If you do not specify this parameter or set this parameter to other values, the certificate is officially issued.
FunctionType Changes to this property will trigger replacement. string
Computing service type. Valid values:
ResourceGroupId string
The ID of the resource group. If you do not specify a value for this parameter, the system automatically assigns the ID of the default resource group.
Scene Changes to this property will trigger replacement. string
The Acceleration scen. Supported:
Scope string
The region where the acceleration service is deployed. Valid values:
Sources List<Pulumi.AliCloud.Dcdn.Inputs.DomainSource>
Source See sources below.
SslPri string
The private key. Specify the private key only if you want to enable the SSL certificate.
SslProtocol string
Specifies whether to enable the SSL certificate. Valid values:
SslPub string
The content of the SSL certificate. Specify the content of the SSL certificate only if you want to enable the SSL certificate.
Status string
The status of the domain name. Valid values:
Tags Dictionary<string, string>
The tag of the resource
TopLevelDomain string
The top-level domain.
CertId string
The certificate ID. This parameter is required and valid only when CertType is set to cas. If you specify this parameter, an existing certificate is used.
CertName string
The name of the new certificate. You can specify only one certificate name. This parameter is optional and valid only when CertType is set to upload.
CertRegion string
The region of the SSL certificate. This parameter takes effect only when CertType is set to cas. Default value: cn-hangzhou. Valid values: cn-hangzhou and ap-southeast-1.
CertType string
The certificate type.
CheckUrl string
The URL that is used for health checks.
Cname string
The CNAME domain name corresponding to the accelerated domain name.
CreateTime string
The time when the accelerated domain name was created.
DomainName Changes to this property will trigger replacement. string
The accelerated domain name. You can specify multiple domain names and separate them with commas (,). You can specify up to 500 domain names in each request. The query results of multiple domain names are aggregated. If you do not specify this parameter, data of all accelerated domain names under your account is queried.
Env string
Specifies whether the certificate is issued in canary releases. If you set this parameter to staging, the certificate is issued in canary releases. If you do not specify this parameter or set this parameter to other values, the certificate is officially issued.
FunctionType Changes to this property will trigger replacement. string
Computing service type. Valid values:
ResourceGroupId string
The ID of the resource group. If you do not specify a value for this parameter, the system automatically assigns the ID of the default resource group.
Scene Changes to this property will trigger replacement. string
The Acceleration scen. Supported:
Scope string
The region where the acceleration service is deployed. Valid values:
Sources []DomainSourceArgs
Source See sources below.
SslPri string
The private key. Specify the private key only if you want to enable the SSL certificate.
SslProtocol string
Specifies whether to enable the SSL certificate. Valid values:
SslPub string
The content of the SSL certificate. Specify the content of the SSL certificate only if you want to enable the SSL certificate.
Status string
The status of the domain name. Valid values:
Tags map[string]string
The tag of the resource
TopLevelDomain string
The top-level domain.
certId String
The certificate ID. This parameter is required and valid only when CertType is set to cas. If you specify this parameter, an existing certificate is used.
certName String
The name of the new certificate. You can specify only one certificate name. This parameter is optional and valid only when CertType is set to upload.
certRegion String
The region of the SSL certificate. This parameter takes effect only when CertType is set to cas. Default value: cn-hangzhou. Valid values: cn-hangzhou and ap-southeast-1.
certType String
The certificate type.
checkUrl String
The URL that is used for health checks.
cname String
The CNAME domain name corresponding to the accelerated domain name.
createTime String
The time when the accelerated domain name was created.
domainName Changes to this property will trigger replacement. String
The accelerated domain name. You can specify multiple domain names and separate them with commas (,). You can specify up to 500 domain names in each request. The query results of multiple domain names are aggregated. If you do not specify this parameter, data of all accelerated domain names under your account is queried.
env String
Specifies whether the certificate is issued in canary releases. If you set this parameter to staging, the certificate is issued in canary releases. If you do not specify this parameter or set this parameter to other values, the certificate is officially issued.
functionType Changes to this property will trigger replacement. String
Computing service type. Valid values:
resourceGroupId String
The ID of the resource group. If you do not specify a value for this parameter, the system automatically assigns the ID of the default resource group.
scene Changes to this property will trigger replacement. String
The Acceleration scen. Supported:
scope String
The region where the acceleration service is deployed. Valid values:
sources List<DomainSource>
Source See sources below.
sslPri String
The private key. Specify the private key only if you want to enable the SSL certificate.
sslProtocol String
Specifies whether to enable the SSL certificate. Valid values:
sslPub String
The content of the SSL certificate. Specify the content of the SSL certificate only if you want to enable the SSL certificate.
status String
The status of the domain name. Valid values:
tags Map<String,String>
The tag of the resource
topLevelDomain String
The top-level domain.
certId string
The certificate ID. This parameter is required and valid only when CertType is set to cas. If you specify this parameter, an existing certificate is used.
certName string
The name of the new certificate. You can specify only one certificate name. This parameter is optional and valid only when CertType is set to upload.
certRegion string
The region of the SSL certificate. This parameter takes effect only when CertType is set to cas. Default value: cn-hangzhou. Valid values: cn-hangzhou and ap-southeast-1.
certType string
The certificate type.
checkUrl string
The URL that is used for health checks.
cname string
The CNAME domain name corresponding to the accelerated domain name.
createTime string
The time when the accelerated domain name was created.
domainName Changes to this property will trigger replacement. string
The accelerated domain name. You can specify multiple domain names and separate them with commas (,). You can specify up to 500 domain names in each request. The query results of multiple domain names are aggregated. If you do not specify this parameter, data of all accelerated domain names under your account is queried.
env string
Specifies whether the certificate is issued in canary releases. If you set this parameter to staging, the certificate is issued in canary releases. If you do not specify this parameter or set this parameter to other values, the certificate is officially issued.
functionType Changes to this property will trigger replacement. string
Computing service type. Valid values:
resourceGroupId string
The ID of the resource group. If you do not specify a value for this parameter, the system automatically assigns the ID of the default resource group.
scene Changes to this property will trigger replacement. string
The Acceleration scen. Supported:
scope string
The region where the acceleration service is deployed. Valid values:
sources DomainSource[]
Source See sources below.
sslPri string
The private key. Specify the private key only if you want to enable the SSL certificate.
sslProtocol string
Specifies whether to enable the SSL certificate. Valid values:
sslPub string
The content of the SSL certificate. Specify the content of the SSL certificate only if you want to enable the SSL certificate.
status string
The status of the domain name. Valid values:
tags {[key: string]: string}
The tag of the resource
topLevelDomain string
The top-level domain.
cert_id str
The certificate ID. This parameter is required and valid only when CertType is set to cas. If you specify this parameter, an existing certificate is used.
cert_name str
The name of the new certificate. You can specify only one certificate name. This parameter is optional and valid only when CertType is set to upload.
cert_region str
The region of the SSL certificate. This parameter takes effect only when CertType is set to cas. Default value: cn-hangzhou. Valid values: cn-hangzhou and ap-southeast-1.
cert_type str
The certificate type.
check_url str
The URL that is used for health checks.
cname str
The CNAME domain name corresponding to the accelerated domain name.
create_time str
The time when the accelerated domain name was created.
domain_name Changes to this property will trigger replacement. str
The accelerated domain name. You can specify multiple domain names and separate them with commas (,). You can specify up to 500 domain names in each request. The query results of multiple domain names are aggregated. If you do not specify this parameter, data of all accelerated domain names under your account is queried.
env str
Specifies whether the certificate is issued in canary releases. If you set this parameter to staging, the certificate is issued in canary releases. If you do not specify this parameter or set this parameter to other values, the certificate is officially issued.
function_type Changes to this property will trigger replacement. str
Computing service type. Valid values:
resource_group_id str
The ID of the resource group. If you do not specify a value for this parameter, the system automatically assigns the ID of the default resource group.
scene Changes to this property will trigger replacement. str
The Acceleration scen. Supported:
scope str
The region where the acceleration service is deployed. Valid values:
sources Sequence[DomainSourceArgs]
Source See sources below.
ssl_pri str
The private key. Specify the private key only if you want to enable the SSL certificate.
ssl_protocol str
Specifies whether to enable the SSL certificate. Valid values:
ssl_pub str
The content of the SSL certificate. Specify the content of the SSL certificate only if you want to enable the SSL certificate.
status str
The status of the domain name. Valid values:
tags Mapping[str, str]
The tag of the resource
top_level_domain str
The top-level domain.
certId String
The certificate ID. This parameter is required and valid only when CertType is set to cas. If you specify this parameter, an existing certificate is used.
certName String
The name of the new certificate. You can specify only one certificate name. This parameter is optional and valid only when CertType is set to upload.
certRegion String
The region of the SSL certificate. This parameter takes effect only when CertType is set to cas. Default value: cn-hangzhou. Valid values: cn-hangzhou and ap-southeast-1.
certType String
The certificate type.
checkUrl String
The URL that is used for health checks.
cname String
The CNAME domain name corresponding to the accelerated domain name.
createTime String
The time when the accelerated domain name was created.
domainName Changes to this property will trigger replacement. String
The accelerated domain name. You can specify multiple domain names and separate them with commas (,). You can specify up to 500 domain names in each request. The query results of multiple domain names are aggregated. If you do not specify this parameter, data of all accelerated domain names under your account is queried.
env String
Specifies whether the certificate is issued in canary releases. If you set this parameter to staging, the certificate is issued in canary releases. If you do not specify this parameter or set this parameter to other values, the certificate is officially issued.
functionType Changes to this property will trigger replacement. String
Computing service type. Valid values:
resourceGroupId String
The ID of the resource group. If you do not specify a value for this parameter, the system automatically assigns the ID of the default resource group.
scene Changes to this property will trigger replacement. String
The Acceleration scen. Supported:
scope String
The region where the acceleration service is deployed. Valid values:
sources List<Property Map>
Source See sources below.
sslPri String
The private key. Specify the private key only if you want to enable the SSL certificate.
sslProtocol String
Specifies whether to enable the SSL certificate. Valid values:
sslPub String
The content of the SSL certificate. Specify the content of the SSL certificate only if you want to enable the SSL certificate.
status String
The status of the domain name. Valid values:
tags Map<String>
The tag of the resource
topLevelDomain String
The top-level domain.

Supporting Types

DomainSource
, DomainSourceArgs

Content string
The address of the source station.
Port int
The port number. Valid values: 443 and 80. Default to 80.
Priority string
The priority of the origin if multiple origins are specified. Default to 20.
Type string
The type of the origin. Valid values:
Weight string
The weight of the origin if multiple origins are specified. Default to 10.
Content string
The address of the source station.
Port int
The port number. Valid values: 443 and 80. Default to 80.
Priority string
The priority of the origin if multiple origins are specified. Default to 20.
Type string
The type of the origin. Valid values:
Weight string
The weight of the origin if multiple origins are specified. Default to 10.
content String
The address of the source station.
port Integer
The port number. Valid values: 443 and 80. Default to 80.
priority String
The priority of the origin if multiple origins are specified. Default to 20.
type String
The type of the origin. Valid values:
weight String
The weight of the origin if multiple origins are specified. Default to 10.
content string
The address of the source station.
port number
The port number. Valid values: 443 and 80. Default to 80.
priority string
The priority of the origin if multiple origins are specified. Default to 20.
type string
The type of the origin. Valid values:
weight string
The weight of the origin if multiple origins are specified. Default to 10.
content str
The address of the source station.
port int
The port number. Valid values: 443 and 80. Default to 80.
priority str
The priority of the origin if multiple origins are specified. Default to 20.
type str
The type of the origin. Valid values:
weight str
The weight of the origin if multiple origins are specified. Default to 10.
content String
The address of the source station.
port Number
The port number. Valid values: 443 and 80. Default to 80.
priority String
The priority of the origin if multiple origins are specified. Default to 20.
type String
The type of the origin. Valid values:
weight String
The weight of the origin if multiple origins are specified. Default to 10.

Import

DCDN Domain can be imported using the id, e.g.

$ pulumi import alicloud:dcdn/domain:Domain example <id>
Copy

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.