1. Packages
  2. Ucloud Provider
  3. API Docs
  4. AntiDdosAllowedDomain
ucloud 1.39.1 published on Monday, Apr 14, 2025 by ucloud

ucloud.AntiDdosAllowedDomain

Explore with Pulumi AI

Provides an Anti-DDoS instance allowed domain resource.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as ucloud from "@pulumi/ucloud";

const fooAntiDdosInstance = new ucloud.AntiDdosInstance("fooAntiDdosInstance", {
    area: "EastChina",
    bandwidth: 50,
    baseDefenceValue: 30,
    dataCenter: "Zaozhuang",
    maxDefenceValue: 30,
});
const fooAntiDdosAllowedDomain = new ucloud.AntiDdosAllowedDomain("fooAntiDdosAllowedDomain", {
    comment: "test-acc-comment",
    domain: "ucloud.cn",
    instanceId: fooAntiDdosInstance.antiDdosInstanceId,
});
Copy
import pulumi
import pulumi_ucloud as ucloud

foo_anti_ddos_instance = ucloud.AntiDdosInstance("fooAntiDdosInstance",
    area="EastChina",
    bandwidth=50,
    base_defence_value=30,
    data_center="Zaozhuang",
    max_defence_value=30)
foo_anti_ddos_allowed_domain = ucloud.AntiDdosAllowedDomain("fooAntiDdosAllowedDomain",
    comment="test-acc-comment",
    domain="ucloud.cn",
    instance_id=foo_anti_ddos_instance.anti_ddos_instance_id)
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ucloud/ucloud"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		fooAntiDdosInstance, err := ucloud.NewAntiDdosInstance(ctx, "fooAntiDdosInstance", &ucloud.AntiDdosInstanceArgs{
			Area:             pulumi.String("EastChina"),
			Bandwidth:        pulumi.Float64(50),
			BaseDefenceValue: pulumi.Float64(30),
			DataCenter:       pulumi.String("Zaozhuang"),
			MaxDefenceValue:  pulumi.Float64(30),
		})
		if err != nil {
			return err
		}
		_, err = ucloud.NewAntiDdosAllowedDomain(ctx, "fooAntiDdosAllowedDomain", &ucloud.AntiDdosAllowedDomainArgs{
			Comment:    pulumi.String("test-acc-comment"),
			Domain:     pulumi.String("ucloud.cn"),
			InstanceId: fooAntiDdosInstance.AntiDdosInstanceId,
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ucloud = Pulumi.Ucloud;

return await Deployment.RunAsync(() => 
{
    var fooAntiDdosInstance = new Ucloud.AntiDdosInstance("fooAntiDdosInstance", new()
    {
        Area = "EastChina",
        Bandwidth = 50,
        BaseDefenceValue = 30,
        DataCenter = "Zaozhuang",
        MaxDefenceValue = 30,
    });

    var fooAntiDdosAllowedDomain = new Ucloud.AntiDdosAllowedDomain("fooAntiDdosAllowedDomain", new()
    {
        Comment = "test-acc-comment",
        Domain = "ucloud.cn",
        InstanceId = fooAntiDdosInstance.AntiDdosInstanceId,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ucloud.AntiDdosInstance;
import com.pulumi.ucloud.AntiDdosInstanceArgs;
import com.pulumi.ucloud.AntiDdosAllowedDomain;
import com.pulumi.ucloud.AntiDdosAllowedDomainArgs;
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 fooAntiDdosInstance = new AntiDdosInstance("fooAntiDdosInstance", AntiDdosInstanceArgs.builder()
            .area("EastChina")
            .bandwidth(50)
            .baseDefenceValue(30)
            .dataCenter("Zaozhuang")
            .maxDefenceValue(30)
            .build());

        var fooAntiDdosAllowedDomain = new AntiDdosAllowedDomain("fooAntiDdosAllowedDomain", AntiDdosAllowedDomainArgs.builder()
            .comment("test-acc-comment")
            .domain("ucloud.cn")
            .instanceId(fooAntiDdosInstance.antiDdosInstanceId())
            .build());

    }
}
Copy
resources:
  fooAntiDdosInstance:
    type: ucloud:AntiDdosInstance
    properties:
      area: EastChina
      bandwidth: 50
      baseDefenceValue: 30
      dataCenter: Zaozhuang
      maxDefenceValue: 30
  fooAntiDdosAllowedDomain:
    type: ucloud:AntiDdosAllowedDomain
    properties:
      comment: test-acc-comment
      domain: ucloud.cn
      instanceId: ${fooAntiDdosInstance.antiDdosInstanceId}
Copy

Create AntiDdosAllowedDomain Resource

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

Constructor syntax

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

@overload
def AntiDdosAllowedDomain(resource_name: str,
                          opts: Optional[ResourceOptions] = None,
                          domain: Optional[str] = None,
                          instance_id: Optional[str] = None,
                          anti_ddos_allowed_domain_id: Optional[str] = None,
                          comment: Optional[str] = None)
func NewAntiDdosAllowedDomain(ctx *Context, name string, args AntiDdosAllowedDomainArgs, opts ...ResourceOption) (*AntiDdosAllowedDomain, error)
public AntiDdosAllowedDomain(string name, AntiDdosAllowedDomainArgs args, CustomResourceOptions? opts = null)
public AntiDdosAllowedDomain(String name, AntiDdosAllowedDomainArgs args)
public AntiDdosAllowedDomain(String name, AntiDdosAllowedDomainArgs args, CustomResourceOptions options)
type: ucloud:AntiDdosAllowedDomain
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. AntiDdosAllowedDomainArgs
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. AntiDdosAllowedDomainArgs
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. AntiDdosAllowedDomainArgs
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. AntiDdosAllowedDomainArgs
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. AntiDdosAllowedDomainArgs
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 antiDdosAllowedDomainResource = new Ucloud.AntiDdosAllowedDomain("antiDdosAllowedDomainResource", new()
{
    Domain = "string",
    InstanceId = "string",
    AntiDdosAllowedDomainId = "string",
    Comment = "string",
});
Copy
example, err := ucloud.NewAntiDdosAllowedDomain(ctx, "antiDdosAllowedDomainResource", &ucloud.AntiDdosAllowedDomainArgs{
Domain: pulumi.String("string"),
InstanceId: pulumi.String("string"),
AntiDdosAllowedDomainId: pulumi.String("string"),
Comment: pulumi.String("string"),
})
Copy
var antiDdosAllowedDomainResource = new AntiDdosAllowedDomain("antiDdosAllowedDomainResource", AntiDdosAllowedDomainArgs.builder()
    .domain("string")
    .instanceId("string")
    .antiDdosAllowedDomainId("string")
    .comment("string")
    .build());
Copy
anti_ddos_allowed_domain_resource = ucloud.AntiDdosAllowedDomain("antiDdosAllowedDomainResource",
    domain="string",
    instance_id="string",
    anti_ddos_allowed_domain_id="string",
    comment="string")
Copy
const antiDdosAllowedDomainResource = new ucloud.AntiDdosAllowedDomain("antiDdosAllowedDomainResource", {
    domain: "string",
    instanceId: "string",
    antiDdosAllowedDomainId: "string",
    comment: "string",
});
Copy
type: ucloud:AntiDdosAllowedDomain
properties:
    antiDdosAllowedDomainId: string
    comment: string
    domain: string
    instanceId: string
Copy

AntiDdosAllowedDomain 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 AntiDdosAllowedDomain resource accepts the following input properties:

Domain This property is required. string
For domain like api.ucloud.cn the value should be ucloud.cn.
InstanceId This property is required. string
ID of ucloud_anti_ddos_instance.
AntiDdosAllowedDomainId string
The ID of the resource ucloud_anti_ddos_allowed_domain, the format is <instance_id>/<domain>.
Comment string
Comment of the domain.
Domain This property is required. string
For domain like api.ucloud.cn the value should be ucloud.cn.
InstanceId This property is required. string
ID of ucloud_anti_ddos_instance.
AntiDdosAllowedDomainId string
The ID of the resource ucloud_anti_ddos_allowed_domain, the format is <instance_id>/<domain>.
Comment string
Comment of the domain.
domain This property is required. String
For domain like api.ucloud.cn the value should be ucloud.cn.
instanceId This property is required. String
ID of ucloud_anti_ddos_instance.
antiDdosAllowedDomainId String
The ID of the resource ucloud_anti_ddos_allowed_domain, the format is <instance_id>/<domain>.
comment String
Comment of the domain.
domain This property is required. string
For domain like api.ucloud.cn the value should be ucloud.cn.
instanceId This property is required. string
ID of ucloud_anti_ddos_instance.
antiDdosAllowedDomainId string
The ID of the resource ucloud_anti_ddos_allowed_domain, the format is <instance_id>/<domain>.
comment string
Comment of the domain.
domain This property is required. str
For domain like api.ucloud.cn the value should be ucloud.cn.
instance_id This property is required. str
ID of ucloud_anti_ddos_instance.
anti_ddos_allowed_domain_id str
The ID of the resource ucloud_anti_ddos_allowed_domain, the format is <instance_id>/<domain>.
comment str
Comment of the domain.
domain This property is required. String
For domain like api.ucloud.cn the value should be ucloud.cn.
instanceId This property is required. String
ID of ucloud_anti_ddos_instance.
antiDdosAllowedDomainId String
The ID of the resource ucloud_anti_ddos_allowed_domain, the format is <instance_id>/<domain>.
comment String
Comment of the domain.

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
Status string
The status of ucloud_anti_ddos_instance. Possible values are Adding, Success, Deleting, Failure and Deleted.
Id string
The provider-assigned unique ID for this managed resource.
Status string
The status of ucloud_anti_ddos_instance. Possible values are Adding, Success, Deleting, Failure and Deleted.
id String
The provider-assigned unique ID for this managed resource.
status String
The status of ucloud_anti_ddos_instance. Possible values are Adding, Success, Deleting, Failure and Deleted.
id string
The provider-assigned unique ID for this managed resource.
status string
The status of ucloud_anti_ddos_instance. Possible values are Adding, Success, Deleting, Failure and Deleted.
id str
The provider-assigned unique ID for this managed resource.
status str
The status of ucloud_anti_ddos_instance. Possible values are Adding, Success, Deleting, Failure and Deleted.
id String
The provider-assigned unique ID for this managed resource.
status String
The status of ucloud_anti_ddos_instance. Possible values are Adding, Success, Deleting, Failure and Deleted.

Look up Existing AntiDdosAllowedDomain Resource

Get an existing AntiDdosAllowedDomain 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?: AntiDdosAllowedDomainState, opts?: CustomResourceOptions): AntiDdosAllowedDomain
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        anti_ddos_allowed_domain_id: Optional[str] = None,
        comment: Optional[str] = None,
        domain: Optional[str] = None,
        instance_id: Optional[str] = None,
        status: Optional[str] = None) -> AntiDdosAllowedDomain
func GetAntiDdosAllowedDomain(ctx *Context, name string, id IDInput, state *AntiDdosAllowedDomainState, opts ...ResourceOption) (*AntiDdosAllowedDomain, error)
public static AntiDdosAllowedDomain Get(string name, Input<string> id, AntiDdosAllowedDomainState? state, CustomResourceOptions? opts = null)
public static AntiDdosAllowedDomain get(String name, Output<String> id, AntiDdosAllowedDomainState state, CustomResourceOptions options)
resources:  _:    type: ucloud:AntiDdosAllowedDomain    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:
AntiDdosAllowedDomainId string
The ID of the resource ucloud_anti_ddos_allowed_domain, the format is <instance_id>/<domain>.
Comment string
Comment of the domain.
Domain string
For domain like api.ucloud.cn the value should be ucloud.cn.
InstanceId string
ID of ucloud_anti_ddos_instance.
Status string
The status of ucloud_anti_ddos_instance. Possible values are Adding, Success, Deleting, Failure and Deleted.
AntiDdosAllowedDomainId string
The ID of the resource ucloud_anti_ddos_allowed_domain, the format is <instance_id>/<domain>.
Comment string
Comment of the domain.
Domain string
For domain like api.ucloud.cn the value should be ucloud.cn.
InstanceId string
ID of ucloud_anti_ddos_instance.
Status string
The status of ucloud_anti_ddos_instance. Possible values are Adding, Success, Deleting, Failure and Deleted.
antiDdosAllowedDomainId String
The ID of the resource ucloud_anti_ddos_allowed_domain, the format is <instance_id>/<domain>.
comment String
Comment of the domain.
domain String
For domain like api.ucloud.cn the value should be ucloud.cn.
instanceId String
ID of ucloud_anti_ddos_instance.
status String
The status of ucloud_anti_ddos_instance. Possible values are Adding, Success, Deleting, Failure and Deleted.
antiDdosAllowedDomainId string
The ID of the resource ucloud_anti_ddos_allowed_domain, the format is <instance_id>/<domain>.
comment string
Comment of the domain.
domain string
For domain like api.ucloud.cn the value should be ucloud.cn.
instanceId string
ID of ucloud_anti_ddos_instance.
status string
The status of ucloud_anti_ddos_instance. Possible values are Adding, Success, Deleting, Failure and Deleted.
anti_ddos_allowed_domain_id str
The ID of the resource ucloud_anti_ddos_allowed_domain, the format is <instance_id>/<domain>.
comment str
Comment of the domain.
domain str
For domain like api.ucloud.cn the value should be ucloud.cn.
instance_id str
ID of ucloud_anti_ddos_instance.
status str
The status of ucloud_anti_ddos_instance. Possible values are Adding, Success, Deleting, Failure and Deleted.
antiDdosAllowedDomainId String
The ID of the resource ucloud_anti_ddos_allowed_domain, the format is <instance_id>/<domain>.
comment String
Comment of the domain.
domain String
For domain like api.ucloud.cn the value should be ucloud.cn.
instanceId String
ID of ucloud_anti_ddos_instance.
status String
The status of ucloud_anti_ddos_instance. Possible values are Adding, Success, Deleting, Failure and Deleted.

Import

Anti-DDoS instance allowed domain can be imported using the <instance_id>/<domain>, e.g.

$ pulumi import ucloud:index/antiDdosAllowedDomain:AntiDdosAllowedDomain example usecure_ghp-xxx/ucloud.cn
Copy

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

Package Details

Repository
ucloud ucloud/terraform-provider-ucloud
License
Notes
This Pulumi package is based on the ucloud Terraform Provider.