Domain

class Domain : KotlinCustomResource

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",
}],
});
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",
}])
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",
},
},
});
});
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
})
}
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());
}
}
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'

Import

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

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

Properties

Link copied to clipboard
val certId: Output<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.

Link copied to clipboard
val certName: Output<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.

Link copied to clipboard
val certRegion: Output<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.

Link copied to clipboard
val certType: Output<String>

The certificate type.

Link copied to clipboard
val checkUrl: Output<String>?

The URL that is used for health checks.

Link copied to clipboard
val cname: Output<String>

The CNAME domain name corresponding to the accelerated domain name.

Link copied to clipboard
val createTime: Output<String>

The time when the accelerated domain name was created.

Link copied to clipboard
val domainName: Output<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.

Link copied to clipboard
val env: Output<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.

Link copied to clipboard
val functionType: Output<String>?

Computing service type. Valid values:

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val resourceGroupId: Output<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.

Link copied to clipboard
val scene: Output<String>?

The Acceleration scen. Supported:

Link copied to clipboard
val scope: Output<String>?

The region where the acceleration service is deployed. Valid values:

Link copied to clipboard
val sources: Output<List<DomainSource>>?

Source See sources below.

Link copied to clipboard
val sslPri: Output<String>?

The private key. Specify the private key only if you want to enable the SSL certificate.

Link copied to clipboard
val sslProtocol: Output<String>?

Specifies whether to enable the SSL certificate. Valid values:

Link copied to clipboard
val sslPub: Output<String>

The content of the SSL certificate. Specify the content of the SSL certificate only if you want to enable the SSL certificate.

Link copied to clipboard
val status: Output<String>

The status of the domain name. Valid values:

Link copied to clipboard
val tags: Output<Map<String, String>>?

The tag of the resource

Link copied to clipboard
val topLevelDomain: Output<String>?

The top-level domain.

Link copied to clipboard
val urn: Output<String>