alicloud logo
Alibaba Cloud v3.34.0, Mar 17 23

alicloud.ddos.DomainResource

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 in v1.123.0+.

Example Usage

Basic Usage

using System.Collections.Generic;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    var example = new AliCloud.Ddos.DomainResource("example", new()
    {
        Domain = "tftestacc1234.abc",
        HttpsExt = "{\"Http2\":1,\"Http2https\":0,\"Https2http\":0}",
        InstanceIds = new[]
        {
            "ddoscoo-cn-6ja1rl4j****",
        },
        ProxyTypes = new[]
        {
            new AliCloud.Ddos.Inputs.DomainResourceProxyTypeArgs
            {
                ProxyPorts = new[]
                {
                    443,
                },
                ProxyType = "https",
            },
        },
        RealServers = new[]
        {
            "177.167.32.11",
        },
        RsType = 0,
    });

});
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ddos"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ddos.NewDomainResource(ctx, "example", &ddos.DomainResourceArgs{
			Domain:   pulumi.String("tftestacc1234.abc"),
			HttpsExt: pulumi.String("{\"Http2\":1,\"Http2https\":0,\"Https2http\":0}"),
			InstanceIds: pulumi.StringArray{
				pulumi.String("ddoscoo-cn-6ja1rl4j****"),
			},
			ProxyTypes: ddos.DomainResourceProxyTypeArray{
				&ddos.DomainResourceProxyTypeArgs{
					ProxyPorts: pulumi.IntArray{
						pulumi.Int(443),
					},
					ProxyType: pulumi.String("https"),
				},
			},
			RealServers: pulumi.StringArray{
				pulumi.String("177.167.32.11"),
			},
			RsType: pulumi.Int(0),
		})
		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.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) {
        var example = new DomainResource("example", DomainResourceArgs.builder()        
            .domain("tftestacc1234.abc")
            .httpsExt("{\"Http2\":1,\"Http2https\":0,\"Https2http\":0}")
            .instanceIds("ddoscoo-cn-6ja1rl4j****")
            .proxyTypes(DomainResourceProxyTypeArgs.builder()
                .proxyPorts(443)
                .proxyType("https")
                .build())
            .realServers("177.167.32.11")
            .rsType(0)
            .build());

    }
}
import pulumi
import pulumi_alicloud as alicloud

example = alicloud.ddos.DomainResource("example",
    domain="tftestacc1234.abc",
    https_ext="{\"Http2\":1,\"Http2https\":0,\"Https2http\":0}",
    instance_ids=["ddoscoo-cn-6ja1rl4j****"],
    proxy_types=[alicloud.ddos.DomainResourceProxyTypeArgs(
        proxy_ports=[443],
        proxy_type="https",
    )],
    real_servers=["177.167.32.11"],
    rs_type=0)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const example = new alicloud.ddos.DomainResource("example", {
    domain: "tftestacc1234.abc",
    httpsExt: "{\"Http2\":1,\"Http2https\":0,\"Https2http\":0}",
    instanceIds: ["ddoscoo-cn-6ja1rl4j****"],
    proxyTypes: [{
        proxyPorts: [443],
        proxyType: "https",
    }],
    realServers: ["177.167.32.11"],
    rsType: 0,
});
resources:
  example:
    type: alicloud:ddos:DomainResource
    properties:
      domain: tftestacc1234.abc
      httpsExt: '{"Http2":1,"Http2https":0,"Https2http":0}'
      instanceIds:
        - ddoscoo-cn-6ja1rl4j****
      proxyTypes:
        - proxyPorts:
            - 443
          proxyType: https
      realServers:
        - 177.167.32.11
      rsType: 0

Create DomainResource Resource

new DomainResource(name: string, args: DomainResourceArgs, opts?: CustomResourceOptions);
@overload
def DomainResource(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   domain: Optional[str] = None,
                   https_ext: 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)
@overload
def DomainResource(resource_name: str,
                   args: DomainResourceArgs,
                   opts: Optional[ResourceOptions] = 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.

name string
The unique name of the resource.
args DomainResourceArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args 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 string
The unique name of the resource.
args DomainResourceArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args DomainResourceArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args DomainResourceArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

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

The DomainResource resource accepts the following input properties:

Domain string

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

InstanceIds List<string>
ProxyTypes List<Pulumi.AliCloud.Ddos.Inputs.DomainResourceProxyTypeArgs>

Protocol type and port number information.

RealServers List<string>

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

RsType int

The address type of the origin server. Valid values: 0: IP address. 1: domain name. 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.

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

Domain string

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

InstanceIds []string
ProxyTypes []DomainResourceProxyTypeArgs

Protocol type and port number information.

RealServers []string

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

RsType int

The address type of the origin server. Valid values: 0: IP address. 1: domain name. 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.

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

domain String

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

instanceIds List<String>
proxyTypes List<DomainResourceProxyTypeArgs>

Protocol type and port number information.

realServers List<String>

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

rsType Integer

The address type of the origin server. Valid values: 0: IP address. 1: domain name. 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.

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

domain string

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

instanceIds string[]
proxyTypes DomainResourceProxyTypeArgs[]

Protocol type and port number information.

realServers string[]

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

rsType number

The address type of the origin server. Valid values: 0: IP address. 1: domain name. 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.

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

domain str

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

instance_ids Sequence[str]
proxy_types Sequence[DomainResourceProxyTypeArgs]

Protocol type and port number information.

real_servers Sequence[str]

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

rs_type int

The address type of the origin server. Valid values: 0: IP address. 1: domain name. 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.

https_ext str

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:

domain String

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

instanceIds List<String>
proxyTypes List<Property Map>

Protocol type and port number information.

realServers List<String>

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

rsType Number

The address type of the origin server. Valid values: 0: IP address. 1: domain name. 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.

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

Outputs

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

Id string

The provider-assigned unique ID for this managed resource.

Id string

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

id string

The provider-assigned unique ID for this managed resource.

id str

The provider-assigned unique ID for this managed resource.

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,
        domain: Optional[str] = None,
        https_ext: 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) -> 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)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
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
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
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
The unique name of the resulting resource.
id
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
The unique name of the resulting resource.
id
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:
Domain string

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

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

InstanceIds List<string>
ProxyTypes List<Pulumi.AliCloud.Ddos.Inputs.DomainResourceProxyTypeArgs>

Protocol type and port number information.

RealServers List<string>

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

RsType int

The address type of the origin server. Valid values: 0: IP address. 1: domain name. 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.

Domain string

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

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

InstanceIds []string
ProxyTypes []DomainResourceProxyTypeArgs

Protocol type and port number information.

RealServers []string

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

RsType int

The address type of the origin server. Valid values: 0: IP address. 1: domain name. 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.

domain String

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

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

instanceIds List<String>
proxyTypes List<DomainResourceProxyTypeArgs>

Protocol type and port number information.

realServers List<String>

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

rsType Integer

The address type of the origin server. Valid values: 0: IP address. 1: domain name. 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.

domain string

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

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

instanceIds string[]
proxyTypes DomainResourceProxyTypeArgs[]

Protocol type and port number information.

realServers string[]

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

rsType number

The address type of the origin server. Valid values: 0: IP address. 1: domain name. 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.

domain str

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

https_ext str

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:

instance_ids Sequence[str]
proxy_types Sequence[DomainResourceProxyTypeArgs]

Protocol type and port number information.

real_servers Sequence[str]

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

rs_type int

The address type of the origin server. Valid values: 0: IP address. 1: domain name. 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.

domain String

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

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

instanceIds List<String>
proxyTypes List<Property Map>

Protocol type and port number information.

realServers List<String>

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

rsType Number

The address type of the origin server. Valid values: 0: IP address. 1: domain name. 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.

Supporting Types

DomainResourceProxyType

ProxyPorts List<int>

the port number. This field is required and must be an integer.

ProxyType string

the protocol type. This field is required and must be a string. Valid values: http, https, websocket, and websockets.

ProxyPorts []int

the port number. This field is required and must be an integer.

ProxyType string

the protocol type. This field is required and must be a string. Valid values: http, https, websocket, and websockets.

proxyPorts List<Integer>

the port number. This field is required and must be an integer.

proxyType String

the protocol type. This field is required and must be a string. Valid values: http, https, websocket, and websockets.

proxyPorts number[]

the port number. This field is required and must be an integer.

proxyType string

the protocol type. This field is required and must be a string. Valid values: http, https, websocket, and websockets.

proxy_ports Sequence[int]

the port number. This field is required and must be an integer.

proxy_type str

the protocol type. This field is required and must be a string. Valid values: http, https, websocket, and websockets.

proxyPorts List<Number>

the port number. This field is required and must be an integer.

proxyType String

the protocol type. This field is required and must be a string. Valid values: http, https, websocket, and websockets.

Import

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

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

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.