DomainResource

class DomainResource : KotlinCustomResource

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>

Properties

Link copied to clipboard
val cname: Output<String>

(Available since v1.207.2) The CNAME assigned to the domain name.

Link copied to clipboard
val domain: Output<String>

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

Link copied to clipboard
val httpsExt: Output<String>

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 id: Output<String>
Link copied to clipboard
val instanceIds: Output<List<String>>

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

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 pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val realServers: Output<List<String>>

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

Link copied to clipboard
val rsType: Output<Int>

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:

Link copied to clipboard
val urn: Output<String>