DomainResource

class DomainResource : KotlinCustomResource

Provides a Ddos Coo Domain Resource resource. For information about Ddos Coo Domain Resource and how to use it, see What is Domain Resource.

NOTE: Available since v1.123.0.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const config = new pulumi.Config();
const name = config.get("name") || "tf-example";
const domain = config.get("domain") || "tf-example.alibaba.com";
const _default = new alicloud.ddos.DdosCooInstance("default", {
name: name,
bandwidth: "30",
baseBandwidth: "30",
serviceBandwidth: "100",
portCount: "50",
domainCount: "50",
period: 1,
productType: "ddoscoo",
});
const defaultDomainResource = new alicloud.ddos.DomainResource("default", {
domain: domain,
rsType: 0,
instanceIds: [_default.id],
realServers: ["177.167.32.11"],
httpsExt: "{\"Http2\":1,\"Http2https\":0,\"Https2http\":0}",
proxyTypes: [{
proxyPorts: [443],
proxyType: "https",
}],
});
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "tf-example"
domain = config.get("domain")
if domain is None:
domain = "tf-example.alibaba.com"
default = alicloud.ddos.DdosCooInstance("default",
name=name,
bandwidth="30",
base_bandwidth="30",
service_bandwidth="100",
port_count="50",
domain_count="50",
period=1,
product_type="ddoscoo")
default_domain_resource = alicloud.ddos.DomainResource("default",
domain=domain,
rs_type=0,
instance_ids=[default.id],
real_servers=["177.167.32.11"],
https_ext="{\"Http2\":1,\"Http2https\":0,\"Https2http\":0}",
proxy_types=[{
"proxy_ports": [443],
"proxy_type": "https",
}])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var name = config.Get("name") ?? "tf-example";
var domain = config.Get("domain") ?? "tf-example.alibaba.com";
var @default = new AliCloud.Ddos.DdosCooInstance("default", new()
{
Name = name,
Bandwidth = "30",
BaseBandwidth = "30",
ServiceBandwidth = "100",
PortCount = "50",
DomainCount = "50",
Period = 1,
ProductType = "ddoscoo",
});
var defaultDomainResource = new AliCloud.Ddos.DomainResource("default", new()
{
Domain = domain,
RsType = 0,
InstanceIds = new[]
{
@default.Id,
},
RealServers = new[]
{
"177.167.32.11",
},
HttpsExt = "{\"Http2\":1,\"Http2https\":0,\"Https2http\":0}",
ProxyTypes = new[]
{
new AliCloud.Ddos.Inputs.DomainResourceProxyTypeArgs
{
ProxyPorts = new[]
{
443,
},
ProxyType = "https",
},
},
});
});
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ddos"
"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, "")
name := "tf-example"
if param := cfg.Get("name"); param != "" {
name = param
}
domain := "tf-example.alibaba.com"
if param := cfg.Get("domain"); param != "" {
domain = param
}
_default, err := ddos.NewDdosCooInstance(ctx, "default", &ddos.DdosCooInstanceArgs{
Name: pulumi.String(name),
Bandwidth: pulumi.String("30"),
BaseBandwidth: pulumi.String("30"),
ServiceBandwidth: pulumi.String("100"),
PortCount: pulumi.String("50"),
DomainCount: pulumi.String("50"),
Period: pulumi.Int(1),
ProductType: pulumi.String("ddoscoo"),
})
if err != nil {
return err
}
_, err = ddos.NewDomainResource(ctx, "default", &ddos.DomainResourceArgs{
Domain: pulumi.String(domain),
RsType: pulumi.Int(0),
InstanceIds: pulumi.StringArray{
_default.ID(),
},
RealServers: pulumi.StringArray{
pulumi.String("177.167.32.11"),
},
HttpsExt: pulumi.String("{\"Http2\":1,\"Http2https\":0,\"Https2http\":0}"),
ProxyTypes: ddos.DomainResourceProxyTypeArray{
&ddos.DomainResourceProxyTypeArgs{
ProxyPorts: pulumi.IntArray{
pulumi.Int(443),
},
ProxyType: pulumi.String("https"),
},
},
})
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.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 default_ = new DdosCooInstance("default", DdosCooInstanceArgs.builder()
.name(name)
.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(default_.id())
.realServers("177.167.32.11")
.httpsExt("{\"Http2\":1,\"Http2https\":0,\"Https2http\":0}")
.proxyTypes(DomainResourceProxyTypeArgs.builder()
.proxyPorts(443)
.proxyType("https")
.build())
.build());
}
}
configuration:
name:
type: string
default: tf-example
domain:
type: string
default: tf-example.alibaba.com
resources:
default:
type: alicloud:ddos:DdosCooInstance
properties:
name: ${name}
bandwidth: '30'
baseBandwidth: '30'
serviceBandwidth: '100'
portCount: '50'
domainCount: '50'
period: '1'
productType: ddoscoo
defaultDomainResource:
type: alicloud:ddos:DomainResource
name: default
properties:
domain: ${domain}
rsType: 0
instanceIds:
- ${default.id}
realServers:
- 177.167.32.11
httpsExt: '{"Http2":1,"Http2https":0,"Https2http":0}'
proxyTypes:
- proxyPorts:
- 443
proxyType: https

Import

Ddos Coo Domain Resource can be imported using the id, e.g.

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

Properties

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

The private key of the certificate that you want to associate. This parameter must be used together with the CertName and Cert parameters.

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

The name of the certificate.

Link copied to clipboard
val certName: Output<String>

The public key of the certificate that you want to associate. This parameter must be used together with the CertName and Key parameters.

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

The region of the certificate. cn-hangzhou and ap-southeast-1 are supported. The default value is cn-hangzhou.

Link copied to clipboard
val cname: Output<String>

The CNAME address to query.

Link copied to clipboard
val domain: Output<String>

The domain name for which you want to configure the Static Page Caching policy.

Link copied to clipboard
val httpsExt: Output<String>

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

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val instanceIds: Output<List<String>>

InstanceIds

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

The globally unique ID of the certificate. The value is in the "Certificate ID-cn-hangzhou" format. For example, if the ID of the certificate is 123, the value of the CertIdentifier parameter is 123-cn-hangzhou.

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

Specifies whether to enable the OCSP feature. 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>>

Server address information of the source station.

Link copied to clipboard
val rsType: Output<Int>

The address type of the origin server. Valid values:

Link copied to clipboard
val urn: Output<String>