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,
});
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)
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
})
}
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,
});
});
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());
}
}
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}
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 string
- The unique name of the resource.
- args AntiDdosAllowedDomainArgs
- 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 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 string
- The unique name of the resource.
- args AntiDdosAllowedDomainArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AntiDdosAllowedDomainArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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",
});
example, err := ucloud.NewAntiDdosAllowedDomain(ctx, "antiDdosAllowedDomainResource", &ucloud.AntiDdosAllowedDomainArgs{
Domain: pulumi.String("string"),
InstanceId: pulumi.String("string"),
AntiDdosAllowedDomainId: pulumi.String("string"),
Comment: pulumi.String("string"),
})
var antiDdosAllowedDomainResource = new AntiDdosAllowedDomain("antiDdosAllowedDomainResource", AntiDdosAllowedDomainArgs.builder()
.domain("string")
.instanceId("string")
.antiDdosAllowedDomainId("string")
.comment("string")
.build());
anti_ddos_allowed_domain_resource = ucloud.AntiDdosAllowedDomain("antiDdosAllowedDomainResource",
domain="string",
instance_id="string",
anti_ddos_allowed_domain_id="string",
comment="string")
const antiDdosAllowedDomainResource = new ucloud.AntiDdosAllowedDomain("antiDdosAllowedDomainResource", {
domain: "string",
instanceId: "string",
antiDdosAllowedDomainId: "string",
comment: "string",
});
type: ucloud:AntiDdosAllowedDomain
properties:
antiDdosAllowedDomainId: string
comment: string
domain: string
instanceId: string
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 string
- For domain like
api.ucloud.cn
the value should beucloud.cn
. - Instance
Id string - ID of ucloud_anti_ddos_instance.
- Anti
Ddos stringAllowed Domain Id - 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 beucloud.cn
. - Instance
Id string - ID of ucloud_anti_ddos_instance.
- Anti
Ddos stringAllowed Domain Id - 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 beucloud.cn
. - instance
Id String - ID of ucloud_anti_ddos_instance.
- anti
Ddos StringAllowed Domain Id - 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 beucloud.cn
. - instance
Id string - ID of ucloud_anti_ddos_instance.
- anti
Ddos stringAllowed Domain Id - The ID of the resource ucloud_anti_ddos_allowed_domain, the format is
<instance_id>/<domain>
. - comment string
- Comment of the domain.
- domain str
- For domain like
api.ucloud.cn
the value should beucloud.cn
. - instance_
id str - ID of ucloud_anti_ddos_instance.
- anti_
ddos_ strallowed_ domain_ id - The ID of the resource ucloud_anti_ddos_allowed_domain, the format is
<instance_id>/<domain>
. - comment str
- Comment of the domain.
- domain String
- For domain like
api.ucloud.cn
the value should beucloud.cn
. - instance
Id String - ID of ucloud_anti_ddos_instance.
- anti
Ddos StringAllowed Domain Id - 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:
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
- 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.
- Anti
Ddos stringAllowed Domain Id - 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 beucloud.cn
. - Instance
Id string - ID of ucloud_anti_ddos_instance.
- Status string
- The status of ucloud_anti_ddos_instance. Possible values are
Adding
,Success
,Deleting
,Failure
andDeleted
.
- Anti
Ddos stringAllowed Domain Id - 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 beucloud.cn
. - Instance
Id string - ID of ucloud_anti_ddos_instance.
- Status string
- The status of ucloud_anti_ddos_instance. Possible values are
Adding
,Success
,Deleting
,Failure
andDeleted
.
- anti
Ddos StringAllowed Domain Id - 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 beucloud.cn
. - instance
Id String - ID of ucloud_anti_ddos_instance.
- status String
- The status of ucloud_anti_ddos_instance. Possible values are
Adding
,Success
,Deleting
,Failure
andDeleted
.
- anti
Ddos stringAllowed Domain Id - 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 beucloud.cn
. - instance
Id string - ID of ucloud_anti_ddos_instance.
- status string
- The status of ucloud_anti_ddos_instance. Possible values are
Adding
,Success
,Deleting
,Failure
andDeleted
.
- anti_
ddos_ strallowed_ domain_ id - 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 beucloud.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
andDeleted
.
- anti
Ddos StringAllowed Domain Id - 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 beucloud.cn
. - instance
Id String - ID of ucloud_anti_ddos_instance.
- status String
- The status of ucloud_anti_ddos_instance. Possible values are
Adding
,Success
,Deleting
,Failure
andDeleted
.
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
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.