DomainArgs

data class DomainArgs(val certId: Output<String>? = null, val certName: Output<String>? = null, val certRegion: Output<String>? = null, val certType: Output<String>? = null, val checkUrl: Output<String>? = null, val domainName: Output<String>? = null, val env: Output<String>? = null, val functionType: Output<String>? = null, val resourceGroupId: Output<String>? = null, val scene: Output<String>? = null, val scope: Output<String>? = null, val sources: Output<List<DomainSourceArgs>>? = null, val sslPri: Output<String>? = null, val sslProtocol: Output<String>? = null, val sslPub: Output<String>? = null, val status: Output<String>? = null, val tags: Output<Map<String, String>>? = null, val topLevelDomain: Output<String>? = null) : ConvertibleToJava<DomainArgs>

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>

Constructors

Link copied to clipboard
constructor(certId: Output<String>? = null, certName: Output<String>? = null, certRegion: Output<String>? = null, certType: Output<String>? = null, checkUrl: Output<String>? = null, domainName: Output<String>? = null, env: Output<String>? = null, functionType: Output<String>? = null, resourceGroupId: Output<String>? = null, scene: Output<String>? = null, scope: Output<String>? = null, sources: Output<List<DomainSourceArgs>>? = null, sslPri: Output<String>? = null, sslProtocol: Output<String>? = null, sslPub: Output<String>? = null, status: Output<String>? = null, tags: Output<Map<String, String>>? = null, topLevelDomain: Output<String>? = null)

Properties

Link copied to clipboard
val certId: Output<String>? = null

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>? = null

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>? = null

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>? = null

The certificate type.

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

The URL that is used for health checks.

Link copied to clipboard
val domainName: Output<String>? = null

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>? = null

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>? = null

Computing service type. Valid values:

Link copied to clipboard
val resourceGroupId: Output<String>? = null

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>? = null

The Acceleration scen. Supported:

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

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

Link copied to clipboard
val sources: Output<List<DomainSourceArgs>>? = null

Source See sources below.

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

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

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

Specifies whether to enable the SSL certificate. Valid values:

Link copied to clipboard
val sslPub: Output<String>? = null

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>? = null

The status of the domain name. Valid values:

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

The tag of the resource

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

The top-level domain.

Functions

Link copied to clipboard
open override fun toJava(): DomainArgs