DomainResourceArgs

data class DomainResourceArgs(val domain: Output<String>? = null, val httpsExt: Output<String>? = null, val instanceIds: Output<List<String>>? = null, val ocspEnabled: Output<Boolean>? = null, val proxyTypes: Output<List<DomainResourceProxyTypeArgs>>? = null, val realServers: Output<List<String>>? = null, val rsType: Output<Int>? = null) : ConvertibleToJava<DomainResourceArgs>

Provides a Anti-DDoS Pro Domain Resource resource. For information about Anti-DDoS Pro Domain Resource and how to use it, see What is Domain Resource.

NOTE: Available since v1.123.0.

Example Usage

Basic Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.ddos.DdosCooInstance;
import com.pulumi.alicloud.ddos.DdosCooInstanceArgs;
import com.pulumi.alicloud.ddos.DomainResource;
import com.pulumi.alicloud.ddos.DomainResourceArgs;
import com.pulumi.alicloud.ddos.inputs.DomainResourceProxyTypeArgs;
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 name = config.get("name").orElse("tf-example");
final var domain = config.get("domain").orElse("tf-example.alibaba.com");
var defaultDdosCooInstance = new DdosCooInstance("defaultDdosCooInstance", DdosCooInstanceArgs.builder()
.bandwidth("30")
.baseBandwidth("30")
.serviceBandwidth("100")
.portCount("50")
.domainCount("50")
.period("1")
.productType("ddoscoo")
.build());
var defaultDomainResource = new DomainResource("defaultDomainResource", DomainResourceArgs.builder()
.domain(domain)
.rsType(0)
.instanceIds(defaultDdosCooInstance.id())
.realServers("177.167.32.11")
.httpsExt("{\"Http2\":1,\"Http2https\":0,\"Https2http\":0}")
.proxyTypes(DomainResourceProxyTypeArgs.builder()
.proxyPorts(443)
.proxyType("https")
.build())
.build());
}
}

Import

Anti-DDoS Pro Domain Resource can be imported using the id, e.g.

$ pulumi import alicloud:ddos/domainResource:DomainResource example <domain>

Constructors

Link copied to clipboard
fun DomainResourceArgs(domain: Output<String>? = null, httpsExt: Output<String>? = null, instanceIds: Output<List<String>>? = null, ocspEnabled: Output<Boolean>? = null, proxyTypes: Output<List<DomainResourceProxyTypeArgs>>? = null, realServers: Output<List<String>>? = null, rsType: Output<Int>? = null)

Functions

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

Properties

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

The domain name of the website that you want to add to the instance.

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

The advanced HTTPS settings. This parameter takes effect only when the value of ProxyType includes https. This parameter is a string that contains a JSON struct. The JSON struct includes the following fields:

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

A list of instance ID that you want to associate. If this parameter is empty, only the domain name of the website is added but no instance is associated with the website.

Link copied to clipboard
val ocspEnabled: Output<Boolean>? = null

Specifies whether to enable the OCSP feature. Default value: false. Valid values:

Link copied to clipboard

Protocol type and port number information. See proxy_types below.

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

the IP address. This field is required and must be a string array.

Link copied to clipboard
val rsType: Output<Int>? = null

The address type of the origin server. Use the domain name of the origin server if you deploy proxies, such as Web Application Firewall (WAF), between the origin server and the Anti-DDoS Pro or Anti-DDoS Premium instance. If you use the domain name, you must enter the address of the proxy, such as the CNAME of WAF. Valid values: