1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. ddos
  5. DomainResource
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

alicloud.ddos.DomainResource

Explore with Pulumi AI

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

});
Copy
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());

    }
}
Copy
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
Copy

Create DomainResource Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new DomainResource(name: string, args: DomainResourceArgs, opts?: CustomResourceOptions);
@overload
def DomainResource(resource_name: str,
                   args: DomainResourceArgs,
                   opts: Optional[ResourceOptions] = None)

@overload
def DomainResource(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   domain: Optional[str] = None,
                   instance_ids: Optional[Sequence[str]] = None,
                   proxy_types: Optional[Sequence[DomainResourceProxyTypeArgs]] = None,
                   real_servers: Optional[Sequence[str]] = None,
                   rs_type: Optional[int] = None,
                   cert: Optional[str] = None,
                   cert_identifier: Optional[str] = None,
                   cert_name: Optional[str] = None,
                   cert_region: Optional[str] = None,
                   https_ext: Optional[str] = None,
                   key: Optional[str] = None,
                   ocsp_enabled: Optional[bool] = None)
func NewDomainResource(ctx *Context, name string, args DomainResourceArgs, opts ...ResourceOption) (*DomainResource, error)
public DomainResource(string name, DomainResourceArgs args, CustomResourceOptions? opts = null)
public DomainResource(String name, DomainResourceArgs args)
public DomainResource(String name, DomainResourceArgs args, CustomResourceOptions options)
type: alicloud:ddos:DomainResource
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. DomainResourceArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. DomainResourceArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. DomainResourceArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. DomainResourceArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. DomainResourceArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var domainResourceResource = new AliCloud.Ddos.DomainResource("domainResourceResource", new()
{
    Domain = "string",
    InstanceIds = new[]
    {
        "string",
    },
    ProxyTypes = new[]
    {
        new AliCloud.Ddos.Inputs.DomainResourceProxyTypeArgs
        {
            ProxyPorts = new[]
            {
                0,
            },
            ProxyType = "string",
        },
    },
    RealServers = new[]
    {
        "string",
    },
    RsType = 0,
    Cert = "string",
    CertIdentifier = "string",
    CertName = "string",
    CertRegion = "string",
    HttpsExt = "string",
    Key = "string",
    OcspEnabled = false,
});
Copy
example, err := ddos.NewDomainResource(ctx, "domainResourceResource", &ddos.DomainResourceArgs{
	Domain: pulumi.String("string"),
	InstanceIds: pulumi.StringArray{
		pulumi.String("string"),
	},
	ProxyTypes: ddos.DomainResourceProxyTypeArray{
		&ddos.DomainResourceProxyTypeArgs{
			ProxyPorts: pulumi.IntArray{
				pulumi.Int(0),
			},
			ProxyType: pulumi.String("string"),
		},
	},
	RealServers: pulumi.StringArray{
		pulumi.String("string"),
	},
	RsType:         pulumi.Int(0),
	Cert:           pulumi.String("string"),
	CertIdentifier: pulumi.String("string"),
	CertName:       pulumi.String("string"),
	CertRegion:     pulumi.String("string"),
	HttpsExt:       pulumi.String("string"),
	Key:            pulumi.String("string"),
	OcspEnabled:    pulumi.Bool(false),
})
Copy
var domainResourceResource = new DomainResource("domainResourceResource", DomainResourceArgs.builder()
    .domain("string")
    .instanceIds("string")
    .proxyTypes(DomainResourceProxyTypeArgs.builder()
        .proxyPorts(0)
        .proxyType("string")
        .build())
    .realServers("string")
    .rsType(0)
    .cert("string")
    .certIdentifier("string")
    .certName("string")
    .certRegion("string")
    .httpsExt("string")
    .key("string")
    .ocspEnabled(false)
    .build());
Copy
domain_resource_resource = alicloud.ddos.DomainResource("domainResourceResource",
    domain="string",
    instance_ids=["string"],
    proxy_types=[{
        "proxy_ports": [0],
        "proxy_type": "string",
    }],
    real_servers=["string"],
    rs_type=0,
    cert="string",
    cert_identifier="string",
    cert_name="string",
    cert_region="string",
    https_ext="string",
    key="string",
    ocsp_enabled=False)
Copy
const domainResourceResource = new alicloud.ddos.DomainResource("domainResourceResource", {
    domain: "string",
    instanceIds: ["string"],
    proxyTypes: [{
        proxyPorts: [0],
        proxyType: "string",
    }],
    realServers: ["string"],
    rsType: 0,
    cert: "string",
    certIdentifier: "string",
    certName: "string",
    certRegion: "string",
    httpsExt: "string",
    key: "string",
    ocspEnabled: false,
});
Copy
type: alicloud:ddos:DomainResource
properties:
    cert: string
    certIdentifier: string
    certName: string
    certRegion: string
    domain: string
    httpsExt: string
    instanceIds:
        - string
    key: string
    ocspEnabled: false
    proxyTypes:
        - proxyPorts:
            - 0
          proxyType: string
    realServers:
        - string
    rsType: 0
Copy

DomainResource Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The DomainResource resource accepts the following input properties:

Domain
This property is required.
Changes to this property will trigger replacement.
string

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

NOTE: You can call the DescribeDomains operation to query all the domain names that are added to Anti-DDoS Pro or Anti-DDoS Premium.

InstanceIds This property is required. List<string>
InstanceIds
ProxyTypes This property is required. List<Pulumi.AliCloud.Ddos.Inputs.DomainResourceProxyType>
Protocol type and port number information. See proxy_types below.
RealServers This property is required. List<string>
Server address information of the source station.
RsType This property is required. int
The address type of the origin server. Valid values:
Cert string

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

NOTE: If you specify a value for the CertName, Cert, and Key parameters, you do not need to specify a value for the CertId parameter.

CertIdentifier string

The name of the certificate.

NOTE: You can specify the name of the certificate that you want to associate.

CertName string

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

NOTE: If you specify a value for the CertName, Cert, and Key parameters, you do not need to specify a value for the CertId parameter.

CertRegion string
The region of the certificate. cn-hangzhou and ap-southeast-1 are supported. The default value is cn-hangzhou.
HttpsExt 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:

  • Http2https: specifies whether to turn on Enforce HTTPS Routing. This field is optional and must be an integer. Valid values: 0 and 1. The value 0 indicates that Enforce HTTPS Routing is turned off. The value 1 indicates that Enforce HTTPS Routing is turned on. The default value is 0.

If your website supports both HTTP and HTTPS, this feature meets your business requirements. If you enable this feature, all HTTP requests to access the website are redirected to HTTPS requests on the standard port 443.

  • Https2http: specifies whether to turn on Enable HTTP. This field is optional and must be an integer. Valid values: 0 and 1. The value 0 indicates that Enable HTTP is turned off. The value 1 indicates that Enable HTTP is turned on. The default value is 0.

If your website does not support HTTPS, this feature meets your business requirements If this feature is enabled, all HTTPS requests are redirected to HTTP requests and forwarded to origin servers. This feature can redirect WebSockets requests to WebSocket requests. Requests are redirected over the standard port 80.

  • Http2: specifies whether to turn on Enable HTTP/2. This field is optional. Data type: integer. Valid values: 0 and 1. The value 0 indicates that Enable HTTP/2 is turned off. The value 1 indicates that Enable HTTP/2 is turned on. The default value is 0.

After you turn on the switch, HTTP/2 is used.

Key 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.

NOTE: You can specify only one of this parameter and the CertId parameter.

OcspEnabled bool
Specifies whether to enable the OCSP feature. Valid values:
Domain
This property is required.
Changes to this property will trigger replacement.
string

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

NOTE: You can call the DescribeDomains operation to query all the domain names that are added to Anti-DDoS Pro or Anti-DDoS Premium.

InstanceIds This property is required. []string
InstanceIds
ProxyTypes This property is required. []DomainResourceProxyTypeArgs
Protocol type and port number information. See proxy_types below.
RealServers This property is required. []string
Server address information of the source station.
RsType This property is required. int
The address type of the origin server. Valid values:
Cert string

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

NOTE: If you specify a value for the CertName, Cert, and Key parameters, you do not need to specify a value for the CertId parameter.

CertIdentifier string

The name of the certificate.

NOTE: You can specify the name of the certificate that you want to associate.

CertName string

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

NOTE: If you specify a value for the CertName, Cert, and Key parameters, you do not need to specify a value for the CertId parameter.

CertRegion string
The region of the certificate. cn-hangzhou and ap-southeast-1 are supported. The default value is cn-hangzhou.
HttpsExt 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:

  • Http2https: specifies whether to turn on Enforce HTTPS Routing. This field is optional and must be an integer. Valid values: 0 and 1. The value 0 indicates that Enforce HTTPS Routing is turned off. The value 1 indicates that Enforce HTTPS Routing is turned on. The default value is 0.

If your website supports both HTTP and HTTPS, this feature meets your business requirements. If you enable this feature, all HTTP requests to access the website are redirected to HTTPS requests on the standard port 443.

  • Https2http: specifies whether to turn on Enable HTTP. This field is optional and must be an integer. Valid values: 0 and 1. The value 0 indicates that Enable HTTP is turned off. The value 1 indicates that Enable HTTP is turned on. The default value is 0.

If your website does not support HTTPS, this feature meets your business requirements If this feature is enabled, all HTTPS requests are redirected to HTTP requests and forwarded to origin servers. This feature can redirect WebSockets requests to WebSocket requests. Requests are redirected over the standard port 80.

  • Http2: specifies whether to turn on Enable HTTP/2. This field is optional. Data type: integer. Valid values: 0 and 1. The value 0 indicates that Enable HTTP/2 is turned off. The value 1 indicates that Enable HTTP/2 is turned on. The default value is 0.

After you turn on the switch, HTTP/2 is used.

Key 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.

NOTE: You can specify only one of this parameter and the CertId parameter.

OcspEnabled bool
Specifies whether to enable the OCSP feature. Valid values:
domain
This property is required.
Changes to this property will trigger replacement.
String

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

NOTE: You can call the DescribeDomains operation to query all the domain names that are added to Anti-DDoS Pro or Anti-DDoS Premium.

instanceIds This property is required. List<String>
InstanceIds
proxyTypes This property is required. List<DomainResourceProxyType>
Protocol type and port number information. See proxy_types below.
realServers This property is required. List<String>
Server address information of the source station.
rsType This property is required. Integer
The address type of the origin server. Valid values:
cert String

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

NOTE: If you specify a value for the CertName, Cert, and Key parameters, you do not need to specify a value for the CertId parameter.

certIdentifier String

The name of the certificate.

NOTE: You can specify the name of the certificate that you want to associate.

certName String

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

NOTE: If you specify a value for the CertName, Cert, and Key parameters, you do not need to specify a value for the CertId parameter.

certRegion String
The region of the certificate. cn-hangzhou and ap-southeast-1 are supported. The default value is cn-hangzhou.
httpsExt 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:

  • Http2https: specifies whether to turn on Enforce HTTPS Routing. This field is optional and must be an integer. Valid values: 0 and 1. The value 0 indicates that Enforce HTTPS Routing is turned off. The value 1 indicates that Enforce HTTPS Routing is turned on. The default value is 0.

If your website supports both HTTP and HTTPS, this feature meets your business requirements. If you enable this feature, all HTTP requests to access the website are redirected to HTTPS requests on the standard port 443.

  • Https2http: specifies whether to turn on Enable HTTP. This field is optional and must be an integer. Valid values: 0 and 1. The value 0 indicates that Enable HTTP is turned off. The value 1 indicates that Enable HTTP is turned on. The default value is 0.

If your website does not support HTTPS, this feature meets your business requirements If this feature is enabled, all HTTPS requests are redirected to HTTP requests and forwarded to origin servers. This feature can redirect WebSockets requests to WebSocket requests. Requests are redirected over the standard port 80.

  • Http2: specifies whether to turn on Enable HTTP/2. This field is optional. Data type: integer. Valid values: 0 and 1. The value 0 indicates that Enable HTTP/2 is turned off. The value 1 indicates that Enable HTTP/2 is turned on. The default value is 0.

After you turn on the switch, HTTP/2 is used.

key 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.

NOTE: You can specify only one of this parameter and the CertId parameter.

ocspEnabled Boolean
Specifies whether to enable the OCSP feature. Valid values:
domain
This property is required.
Changes to this property will trigger replacement.
string

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

NOTE: You can call the DescribeDomains operation to query all the domain names that are added to Anti-DDoS Pro or Anti-DDoS Premium.

instanceIds This property is required. string[]
InstanceIds
proxyTypes This property is required. DomainResourceProxyType[]
Protocol type and port number information. See proxy_types below.
realServers This property is required. string[]
Server address information of the source station.
rsType This property is required. number
The address type of the origin server. Valid values:
cert string

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

NOTE: If you specify a value for the CertName, Cert, and Key parameters, you do not need to specify a value for the CertId parameter.

certIdentifier string

The name of the certificate.

NOTE: You can specify the name of the certificate that you want to associate.

certName string

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

NOTE: If you specify a value for the CertName, Cert, and Key parameters, you do not need to specify a value for the CertId parameter.

certRegion string
The region of the certificate. cn-hangzhou and ap-southeast-1 are supported. The default value is cn-hangzhou.
httpsExt 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:

  • Http2https: specifies whether to turn on Enforce HTTPS Routing. This field is optional and must be an integer. Valid values: 0 and 1. The value 0 indicates that Enforce HTTPS Routing is turned off. The value 1 indicates that Enforce HTTPS Routing is turned on. The default value is 0.

If your website supports both HTTP and HTTPS, this feature meets your business requirements. If you enable this feature, all HTTP requests to access the website are redirected to HTTPS requests on the standard port 443.

  • Https2http: specifies whether to turn on Enable HTTP. This field is optional and must be an integer. Valid values: 0 and 1. The value 0 indicates that Enable HTTP is turned off. The value 1 indicates that Enable HTTP is turned on. The default value is 0.

If your website does not support HTTPS, this feature meets your business requirements If this feature is enabled, all HTTPS requests are redirected to HTTP requests and forwarded to origin servers. This feature can redirect WebSockets requests to WebSocket requests. Requests are redirected over the standard port 80.

  • Http2: specifies whether to turn on Enable HTTP/2. This field is optional. Data type: integer. Valid values: 0 and 1. The value 0 indicates that Enable HTTP/2 is turned off. The value 1 indicates that Enable HTTP/2 is turned on. The default value is 0.

After you turn on the switch, HTTP/2 is used.

key 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.

NOTE: You can specify only one of this parameter and the CertId parameter.

ocspEnabled boolean
Specifies whether to enable the OCSP feature. Valid values:
domain
This property is required.
Changes to this property will trigger replacement.
str

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

NOTE: You can call the DescribeDomains operation to query all the domain names that are added to Anti-DDoS Pro or Anti-DDoS Premium.

instance_ids This property is required. Sequence[str]
InstanceIds
proxy_types This property is required. Sequence[DomainResourceProxyTypeArgs]
Protocol type and port number information. See proxy_types below.
real_servers This property is required. Sequence[str]
Server address information of the source station.
rs_type This property is required. int
The address type of the origin server. Valid values:
cert str

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

NOTE: If you specify a value for the CertName, Cert, and Key parameters, you do not need to specify a value for the CertId parameter.

cert_identifier str

The name of the certificate.

NOTE: You can specify the name of the certificate that you want to associate.

cert_name str

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

NOTE: If you specify a value for the CertName, Cert, and Key parameters, you do not need to specify a value for the CertId parameter.

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

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:

  • Http2https: specifies whether to turn on Enforce HTTPS Routing. This field is optional and must be an integer. Valid values: 0 and 1. The value 0 indicates that Enforce HTTPS Routing is turned off. The value 1 indicates that Enforce HTTPS Routing is turned on. The default value is 0.

If your website supports both HTTP and HTTPS, this feature meets your business requirements. If you enable this feature, all HTTP requests to access the website are redirected to HTTPS requests on the standard port 443.

  • Https2http: specifies whether to turn on Enable HTTP. This field is optional and must be an integer. Valid values: 0 and 1. The value 0 indicates that Enable HTTP is turned off. The value 1 indicates that Enable HTTP is turned on. The default value is 0.

If your website does not support HTTPS, this feature meets your business requirements If this feature is enabled, all HTTPS requests are redirected to HTTP requests and forwarded to origin servers. This feature can redirect WebSockets requests to WebSocket requests. Requests are redirected over the standard port 80.

  • Http2: specifies whether to turn on Enable HTTP/2. This field is optional. Data type: integer. Valid values: 0 and 1. The value 0 indicates that Enable HTTP/2 is turned off. The value 1 indicates that Enable HTTP/2 is turned on. The default value is 0.

After you turn on the switch, HTTP/2 is used.

key str

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.

NOTE: You can specify only one of this parameter and the CertId parameter.

ocsp_enabled bool
Specifies whether to enable the OCSP feature. Valid values:
domain
This property is required.
Changes to this property will trigger replacement.
String

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

NOTE: You can call the DescribeDomains operation to query all the domain names that are added to Anti-DDoS Pro or Anti-DDoS Premium.

instanceIds This property is required. List<String>
InstanceIds
proxyTypes This property is required. List<Property Map>
Protocol type and port number information. See proxy_types below.
realServers This property is required. List<String>
Server address information of the source station.
rsType This property is required. Number
The address type of the origin server. Valid values:
cert String

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

NOTE: If you specify a value for the CertName, Cert, and Key parameters, you do not need to specify a value for the CertId parameter.

certIdentifier String

The name of the certificate.

NOTE: You can specify the name of the certificate that you want to associate.

certName String

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

NOTE: If you specify a value for the CertName, Cert, and Key parameters, you do not need to specify a value for the CertId parameter.

certRegion String
The region of the certificate. cn-hangzhou and ap-southeast-1 are supported. The default value is cn-hangzhou.
httpsExt 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:

  • Http2https: specifies whether to turn on Enforce HTTPS Routing. This field is optional and must be an integer. Valid values: 0 and 1. The value 0 indicates that Enforce HTTPS Routing is turned off. The value 1 indicates that Enforce HTTPS Routing is turned on. The default value is 0.

If your website supports both HTTP and HTTPS, this feature meets your business requirements. If you enable this feature, all HTTP requests to access the website are redirected to HTTPS requests on the standard port 443.

  • Https2http: specifies whether to turn on Enable HTTP. This field is optional and must be an integer. Valid values: 0 and 1. The value 0 indicates that Enable HTTP is turned off. The value 1 indicates that Enable HTTP is turned on. The default value is 0.

If your website does not support HTTPS, this feature meets your business requirements If this feature is enabled, all HTTPS requests are redirected to HTTP requests and forwarded to origin servers. This feature can redirect WebSockets requests to WebSocket requests. Requests are redirected over the standard port 80.

  • Http2: specifies whether to turn on Enable HTTP/2. This field is optional. Data type: integer. Valid values: 0 and 1. The value 0 indicates that Enable HTTP/2 is turned off. The value 1 indicates that Enable HTTP/2 is turned on. The default value is 0.

After you turn on the switch, HTTP/2 is used.

key 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.

NOTE: You can specify only one of this parameter and the CertId parameter.

ocspEnabled Boolean
Specifies whether to enable the OCSP feature. Valid values:

Outputs

All input properties are implicitly available as output properties. Additionally, the DomainResource resource produces the following output properties:

Cname string
The CNAME address to query.
Id string
The provider-assigned unique ID for this managed resource.
Cname string
The CNAME address to query.
Id string
The provider-assigned unique ID for this managed resource.
cname String
The CNAME address to query.
id String
The provider-assigned unique ID for this managed resource.
cname string
The CNAME address to query.
id string
The provider-assigned unique ID for this managed resource.
cname str
The CNAME address to query.
id str
The provider-assigned unique ID for this managed resource.
cname String
The CNAME address to query.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing DomainResource Resource

Get an existing DomainResource resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: DomainResourceState, opts?: CustomResourceOptions): DomainResource
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        cert: Optional[str] = None,
        cert_identifier: Optional[str] = None,
        cert_name: Optional[str] = None,
        cert_region: Optional[str] = None,
        cname: Optional[str] = None,
        domain: Optional[str] = None,
        https_ext: Optional[str] = None,
        instance_ids: Optional[Sequence[str]] = None,
        key: Optional[str] = None,
        ocsp_enabled: Optional[bool] = None,
        proxy_types: Optional[Sequence[DomainResourceProxyTypeArgs]] = None,
        real_servers: Optional[Sequence[str]] = None,
        rs_type: Optional[int] = None) -> DomainResource
func GetDomainResource(ctx *Context, name string, id IDInput, state *DomainResourceState, opts ...ResourceOption) (*DomainResource, error)
public static DomainResource Get(string name, Input<string> id, DomainResourceState? state, CustomResourceOptions? opts = null)
public static DomainResource get(String name, Output<String> id, DomainResourceState state, CustomResourceOptions options)
resources:  _:    type: alicloud:ddos:DomainResource    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
Cert string

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

NOTE: If you specify a value for the CertName, Cert, and Key parameters, you do not need to specify a value for the CertId parameter.

CertIdentifier string

The name of the certificate.

NOTE: You can specify the name of the certificate that you want to associate.

CertName string

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

NOTE: If you specify a value for the CertName, Cert, and Key parameters, you do not need to specify a value for the CertId parameter.

CertRegion string
The region of the certificate. cn-hangzhou and ap-southeast-1 are supported. The default value is cn-hangzhou.
Cname string
The CNAME address to query.
Domain Changes to this property will trigger replacement. string

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

NOTE: You can call the DescribeDomains operation to query all the domain names that are added to Anti-DDoS Pro or Anti-DDoS Premium.

HttpsExt 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:

  • Http2https: specifies whether to turn on Enforce HTTPS Routing. This field is optional and must be an integer. Valid values: 0 and 1. The value 0 indicates that Enforce HTTPS Routing is turned off. The value 1 indicates that Enforce HTTPS Routing is turned on. The default value is 0.

If your website supports both HTTP and HTTPS, this feature meets your business requirements. If you enable this feature, all HTTP requests to access the website are redirected to HTTPS requests on the standard port 443.

  • Https2http: specifies whether to turn on Enable HTTP. This field is optional and must be an integer. Valid values: 0 and 1. The value 0 indicates that Enable HTTP is turned off. The value 1 indicates that Enable HTTP is turned on. The default value is 0.

If your website does not support HTTPS, this feature meets your business requirements If this feature is enabled, all HTTPS requests are redirected to HTTP requests and forwarded to origin servers. This feature can redirect WebSockets requests to WebSocket requests. Requests are redirected over the standard port 80.

  • Http2: specifies whether to turn on Enable HTTP/2. This field is optional. Data type: integer. Valid values: 0 and 1. The value 0 indicates that Enable HTTP/2 is turned off. The value 1 indicates that Enable HTTP/2 is turned on. The default value is 0.

After you turn on the switch, HTTP/2 is used.

InstanceIds List<string>
InstanceIds
Key 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.

NOTE: You can specify only one of this parameter and the CertId parameter.

OcspEnabled bool
Specifies whether to enable the OCSP feature. Valid values:
ProxyTypes List<Pulumi.AliCloud.Ddos.Inputs.DomainResourceProxyType>
Protocol type and port number information. See proxy_types below.
RealServers List<string>
Server address information of the source station.
RsType int
The address type of the origin server. Valid values:
Cert string

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

NOTE: If you specify a value for the CertName, Cert, and Key parameters, you do not need to specify a value for the CertId parameter.

CertIdentifier string

The name of the certificate.

NOTE: You can specify the name of the certificate that you want to associate.

CertName string

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

NOTE: If you specify a value for the CertName, Cert, and Key parameters, you do not need to specify a value for the CertId parameter.

CertRegion string
The region of the certificate. cn-hangzhou and ap-southeast-1 are supported. The default value is cn-hangzhou.
Cname string
The CNAME address to query.
Domain Changes to this property will trigger replacement. string

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

NOTE: You can call the DescribeDomains operation to query all the domain names that are added to Anti-DDoS Pro or Anti-DDoS Premium.

HttpsExt 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:

  • Http2https: specifies whether to turn on Enforce HTTPS Routing. This field is optional and must be an integer. Valid values: 0 and 1. The value 0 indicates that Enforce HTTPS Routing is turned off. The value 1 indicates that Enforce HTTPS Routing is turned on. The default value is 0.

If your website supports both HTTP and HTTPS, this feature meets your business requirements. If you enable this feature, all HTTP requests to access the website are redirected to HTTPS requests on the standard port 443.

  • Https2http: specifies whether to turn on Enable HTTP. This field is optional and must be an integer. Valid values: 0 and 1. The value 0 indicates that Enable HTTP is turned off. The value 1 indicates that Enable HTTP is turned on. The default value is 0.

If your website does not support HTTPS, this feature meets your business requirements If this feature is enabled, all HTTPS requests are redirected to HTTP requests and forwarded to origin servers. This feature can redirect WebSockets requests to WebSocket requests. Requests are redirected over the standard port 80.

  • Http2: specifies whether to turn on Enable HTTP/2. This field is optional. Data type: integer. Valid values: 0 and 1. The value 0 indicates that Enable HTTP/2 is turned off. The value 1 indicates that Enable HTTP/2 is turned on. The default value is 0.

After you turn on the switch, HTTP/2 is used.

InstanceIds []string
InstanceIds
Key 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.

NOTE: You can specify only one of this parameter and the CertId parameter.

OcspEnabled bool
Specifies whether to enable the OCSP feature. Valid values:
ProxyTypes []DomainResourceProxyTypeArgs
Protocol type and port number information. See proxy_types below.
RealServers []string
Server address information of the source station.
RsType int
The address type of the origin server. Valid values:
cert String

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

NOTE: If you specify a value for the CertName, Cert, and Key parameters, you do not need to specify a value for the CertId parameter.

certIdentifier String

The name of the certificate.

NOTE: You can specify the name of the certificate that you want to associate.

certName String

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

NOTE: If you specify a value for the CertName, Cert, and Key parameters, you do not need to specify a value for the CertId parameter.

certRegion String
The region of the certificate. cn-hangzhou and ap-southeast-1 are supported. The default value is cn-hangzhou.
cname String
The CNAME address to query.
domain Changes to this property will trigger replacement. String

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

NOTE: You can call the DescribeDomains operation to query all the domain names that are added to Anti-DDoS Pro or Anti-DDoS Premium.

httpsExt 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:

  • Http2https: specifies whether to turn on Enforce HTTPS Routing. This field is optional and must be an integer. Valid values: 0 and 1. The value 0 indicates that Enforce HTTPS Routing is turned off. The value 1 indicates that Enforce HTTPS Routing is turned on. The default value is 0.

If your website supports both HTTP and HTTPS, this feature meets your business requirements. If you enable this feature, all HTTP requests to access the website are redirected to HTTPS requests on the standard port 443.

  • Https2http: specifies whether to turn on Enable HTTP. This field is optional and must be an integer. Valid values: 0 and 1. The value 0 indicates that Enable HTTP is turned off. The value 1 indicates that Enable HTTP is turned on. The default value is 0.

If your website does not support HTTPS, this feature meets your business requirements If this feature is enabled, all HTTPS requests are redirected to HTTP requests and forwarded to origin servers. This feature can redirect WebSockets requests to WebSocket requests. Requests are redirected over the standard port 80.

  • Http2: specifies whether to turn on Enable HTTP/2. This field is optional. Data type: integer. Valid values: 0 and 1. The value 0 indicates that Enable HTTP/2 is turned off. The value 1 indicates that Enable HTTP/2 is turned on. The default value is 0.

After you turn on the switch, HTTP/2 is used.

instanceIds List<String>
InstanceIds
key 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.

NOTE: You can specify only one of this parameter and the CertId parameter.

ocspEnabled Boolean
Specifies whether to enable the OCSP feature. Valid values:
proxyTypes List<DomainResourceProxyType>
Protocol type and port number information. See proxy_types below.
realServers List<String>
Server address information of the source station.
rsType Integer
The address type of the origin server. Valid values:
cert string

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

NOTE: If you specify a value for the CertName, Cert, and Key parameters, you do not need to specify a value for the CertId parameter.

certIdentifier string

The name of the certificate.

NOTE: You can specify the name of the certificate that you want to associate.

certName string

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

NOTE: If you specify a value for the CertName, Cert, and Key parameters, you do not need to specify a value for the CertId parameter.

certRegion string
The region of the certificate. cn-hangzhou and ap-southeast-1 are supported. The default value is cn-hangzhou.
cname string
The CNAME address to query.
domain Changes to this property will trigger replacement. string

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

NOTE: You can call the DescribeDomains operation to query all the domain names that are added to Anti-DDoS Pro or Anti-DDoS Premium.

httpsExt 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:

  • Http2https: specifies whether to turn on Enforce HTTPS Routing. This field is optional and must be an integer. Valid values: 0 and 1. The value 0 indicates that Enforce HTTPS Routing is turned off. The value 1 indicates that Enforce HTTPS Routing is turned on. The default value is 0.

If your website supports both HTTP and HTTPS, this feature meets your business requirements. If you enable this feature, all HTTP requests to access the website are redirected to HTTPS requests on the standard port 443.

  • Https2http: specifies whether to turn on Enable HTTP. This field is optional and must be an integer. Valid values: 0 and 1. The value 0 indicates that Enable HTTP is turned off. The value 1 indicates that Enable HTTP is turned on. The default value is 0.

If your website does not support HTTPS, this feature meets your business requirements If this feature is enabled, all HTTPS requests are redirected to HTTP requests and forwarded to origin servers. This feature can redirect WebSockets requests to WebSocket requests. Requests are redirected over the standard port 80.

  • Http2: specifies whether to turn on Enable HTTP/2. This field is optional. Data type: integer. Valid values: 0 and 1. The value 0 indicates that Enable HTTP/2 is turned off. The value 1 indicates that Enable HTTP/2 is turned on. The default value is 0.

After you turn on the switch, HTTP/2 is used.

instanceIds string[]
InstanceIds
key 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.

NOTE: You can specify only one of this parameter and the CertId parameter.

ocspEnabled boolean
Specifies whether to enable the OCSP feature. Valid values:
proxyTypes DomainResourceProxyType[]
Protocol type and port number information. See proxy_types below.
realServers string[]
Server address information of the source station.
rsType number
The address type of the origin server. Valid values:
cert str

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

NOTE: If you specify a value for the CertName, Cert, and Key parameters, you do not need to specify a value for the CertId parameter.

cert_identifier str

The name of the certificate.

NOTE: You can specify the name of the certificate that you want to associate.

cert_name str

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

NOTE: If you specify a value for the CertName, Cert, and Key parameters, you do not need to specify a value for the CertId parameter.

cert_region str
The region of the certificate. cn-hangzhou and ap-southeast-1 are supported. The default value is cn-hangzhou.
cname str
The CNAME address to query.
domain Changes to this property will trigger replacement. str

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

NOTE: You can call the DescribeDomains operation to query all the domain names that are added to Anti-DDoS Pro or Anti-DDoS Premium.

https_ext str

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:

  • Http2https: specifies whether to turn on Enforce HTTPS Routing. This field is optional and must be an integer. Valid values: 0 and 1. The value 0 indicates that Enforce HTTPS Routing is turned off. The value 1 indicates that Enforce HTTPS Routing is turned on. The default value is 0.

If your website supports both HTTP and HTTPS, this feature meets your business requirements. If you enable this feature, all HTTP requests to access the website are redirected to HTTPS requests on the standard port 443.

  • Https2http: specifies whether to turn on Enable HTTP. This field is optional and must be an integer. Valid values: 0 and 1. The value 0 indicates that Enable HTTP is turned off. The value 1 indicates that Enable HTTP is turned on. The default value is 0.

If your website does not support HTTPS, this feature meets your business requirements If this feature is enabled, all HTTPS requests are redirected to HTTP requests and forwarded to origin servers. This feature can redirect WebSockets requests to WebSocket requests. Requests are redirected over the standard port 80.

  • Http2: specifies whether to turn on Enable HTTP/2. This field is optional. Data type: integer. Valid values: 0 and 1. The value 0 indicates that Enable HTTP/2 is turned off. The value 1 indicates that Enable HTTP/2 is turned on. The default value is 0.

After you turn on the switch, HTTP/2 is used.

instance_ids Sequence[str]
InstanceIds
key str

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.

NOTE: You can specify only one of this parameter and the CertId parameter.

ocsp_enabled bool
Specifies whether to enable the OCSP feature. Valid values:
proxy_types Sequence[DomainResourceProxyTypeArgs]
Protocol type and port number information. See proxy_types below.
real_servers Sequence[str]
Server address information of the source station.
rs_type int
The address type of the origin server. Valid values:
cert String

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

NOTE: If you specify a value for the CertName, Cert, and Key parameters, you do not need to specify a value for the CertId parameter.

certIdentifier String

The name of the certificate.

NOTE: You can specify the name of the certificate that you want to associate.

certName String

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

NOTE: If you specify a value for the CertName, Cert, and Key parameters, you do not need to specify a value for the CertId parameter.

certRegion String
The region of the certificate. cn-hangzhou and ap-southeast-1 are supported. The default value is cn-hangzhou.
cname String
The CNAME address to query.
domain Changes to this property will trigger replacement. String

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

NOTE: You can call the DescribeDomains operation to query all the domain names that are added to Anti-DDoS Pro or Anti-DDoS Premium.

httpsExt 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:

  • Http2https: specifies whether to turn on Enforce HTTPS Routing. This field is optional and must be an integer. Valid values: 0 and 1. The value 0 indicates that Enforce HTTPS Routing is turned off. The value 1 indicates that Enforce HTTPS Routing is turned on. The default value is 0.

If your website supports both HTTP and HTTPS, this feature meets your business requirements. If you enable this feature, all HTTP requests to access the website are redirected to HTTPS requests on the standard port 443.

  • Https2http: specifies whether to turn on Enable HTTP. This field is optional and must be an integer. Valid values: 0 and 1. The value 0 indicates that Enable HTTP is turned off. The value 1 indicates that Enable HTTP is turned on. The default value is 0.

If your website does not support HTTPS, this feature meets your business requirements If this feature is enabled, all HTTPS requests are redirected to HTTP requests and forwarded to origin servers. This feature can redirect WebSockets requests to WebSocket requests. Requests are redirected over the standard port 80.

  • Http2: specifies whether to turn on Enable HTTP/2. This field is optional. Data type: integer. Valid values: 0 and 1. The value 0 indicates that Enable HTTP/2 is turned off. The value 1 indicates that Enable HTTP/2 is turned on. The default value is 0.

After you turn on the switch, HTTP/2 is used.

instanceIds List<String>
InstanceIds
key 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.

NOTE: You can specify only one of this parameter and the CertId parameter.

ocspEnabled Boolean
Specifies whether to enable the OCSP feature. Valid values:
proxyTypes List<Property Map>
Protocol type and port number information. See proxy_types below.
realServers List<String>
Server address information of the source station.
rsType Number
The address type of the origin server. Valid values:

Supporting Types

DomainResourceProxyType
, DomainResourceProxyTypeArgs

ProxyPorts This property is required. List<int>
The port numbers.
ProxyType string
The type of the protocol. Valid values:
ProxyPorts This property is required. []int
The port numbers.
ProxyType string
The type of the protocol. Valid values:
proxyPorts This property is required. List<Integer>
The port numbers.
proxyType String
The type of the protocol. Valid values:
proxyPorts This property is required. number[]
The port numbers.
proxyType string
The type of the protocol. Valid values:
proxy_ports This property is required. Sequence[int]
The port numbers.
proxy_type str
The type of the protocol. Valid values:
proxyPorts This property is required. List<Number>
The port numbers.
proxyType String
The type of the protocol. Valid values:

Import

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

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

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.