alicloud logo
Alibaba Cloud v3.34.0, Mar 17 23

alicloud.ddos.BasicDefenseThreshold

Provides a Ddos Basic defense threshold resource.

For information about Ddos Basic Antiddos and how to use it, see What is Defense Threshold.

NOTE: Available in v1.168.0+.

Example Usage

Basic Usage

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

return await Deployment.RunAsync(() => 
{
    var @default = new AliCloud.Ecs.EipAddress("default", new()
    {
        AddressName = @var.Name,
        Isp = "BGP",
        InternetChargeType = "PayByBandwidth",
        PaymentType = "PayAsYouGo",
    });

    var example = new AliCloud.Ddos.BasicDefenseThreshold("example", new()
    {
        InstanceId = @default.Id,
        DdosType = "defense",
        InstanceType = "eip",
        Bps = 390,
        Pps = 90000,
    });

});
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ecs.NewEipAddress(ctx, "default", &ecs.EipAddressArgs{
			AddressName:        pulumi.Any(_var.Name),
			Isp:                pulumi.String("BGP"),
			InternetChargeType: pulumi.String("PayByBandwidth"),
			PaymentType:        pulumi.String("PayAsYouGo"),
		})
		if err != nil {
			return err
		}
		_, err = ddos.NewBasicDefenseThreshold(ctx, "example", &ddos.BasicDefenseThresholdArgs{
			InstanceId:   _default.ID(),
			DdosType:     pulumi.String("defense"),
			InstanceType: pulumi.String("eip"),
			Bps:          pulumi.Int(390),
			Pps:          pulumi.Int(90000),
		})
		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.ecs.EipAddress;
import com.pulumi.alicloud.ecs.EipAddressArgs;
import com.pulumi.alicloud.ddos.BasicDefenseThreshold;
import com.pulumi.alicloud.ddos.BasicDefenseThresholdArgs;
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 default_ = new EipAddress("default", EipAddressArgs.builder()        
            .addressName(var_.name())
            .isp("BGP")
            .internetChargeType("PayByBandwidth")
            .paymentType("PayAsYouGo")
            .build());

        var example = new BasicDefenseThreshold("example", BasicDefenseThresholdArgs.builder()        
            .instanceId(default_.id())
            .ddosType("defense")
            .instanceType("eip")
            .bps(390)
            .pps(90000)
            .build());

    }
}
import pulumi
import pulumi_alicloud as alicloud

default = alicloud.ecs.EipAddress("default",
    address_name=var["name"],
    isp="BGP",
    internet_charge_type="PayByBandwidth",
    payment_type="PayAsYouGo")
example = alicloud.ddos.BasicDefenseThreshold("example",
    instance_id=default.id,
    ddos_type="defense",
    instance_type="eip",
    bps=390,
    pps=90000)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const _default = new alicloud.ecs.EipAddress("default", {
    addressName: _var.name,
    isp: "BGP",
    internetChargeType: "PayByBandwidth",
    paymentType: "PayAsYouGo",
});
const example = new alicloud.ddos.BasicDefenseThreshold("example", {
    instanceId: _default.id,
    ddosType: "defense",
    instanceType: "eip",
    bps: 390,
    pps: 90000,
});
resources:
  example:
    type: alicloud:ddos:BasicDefenseThreshold
    properties:
      instanceId: ${default.id}
      ddosType: defense
      instanceType: eip
      bps: 390
      pps: 90000
  default:
    type: alicloud:ecs:EipAddress
    properties:
      addressName: ${var.name}
      isp: BGP
      internetChargeType: PayByBandwidth
      paymentType: PayAsYouGo

Create BasicDefenseThreshold Resource

new BasicDefenseThreshold(name: string, args: BasicDefenseThresholdArgs, opts?: CustomResourceOptions);
@overload
def BasicDefenseThreshold(resource_name: str,
                          opts: Optional[ResourceOptions] = None,
                          bps: Optional[int] = None,
                          ddos_type: Optional[str] = None,
                          instance_id: Optional[str] = None,
                          instance_type: Optional[str] = None,
                          internet_ip: Optional[str] = None,
                          is_auto: Optional[bool] = None,
                          pps: Optional[int] = None)
@overload
def BasicDefenseThreshold(resource_name: str,
                          args: BasicDefenseThresholdArgs,
                          opts: Optional[ResourceOptions] = None)
func NewBasicDefenseThreshold(ctx *Context, name string, args BasicDefenseThresholdArgs, opts ...ResourceOption) (*BasicDefenseThreshold, error)
public BasicDefenseThreshold(string name, BasicDefenseThresholdArgs args, CustomResourceOptions? opts = null)
public BasicDefenseThreshold(String name, BasicDefenseThresholdArgs args)
public BasicDefenseThreshold(String name, BasicDefenseThresholdArgs args, CustomResourceOptions options)
type: alicloud:ddos:BasicDefenseThreshold
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

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

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

DdosType string

The type of the threshold to query. Valid values: defense,blackhole.

InstanceId string

The ID of the instance.

InstanceType string

The instance type of the public IP address asset. Value: ecs,slb,eip.

Bps int

Specifies the traffic scrubbing threshold. Unit: Mbit/s. The traffic scrubbing threshold cannot exceed the peak inbound or outbound Internet traffic, whichever is larger, of the asset.

InternetIp string

The Internet IP address.

IsAuto bool

Whether it is the system default threshold. Value:

Pps int

The current message number cleaning threshold. Unit: pps.

DdosType string

The type of the threshold to query. Valid values: defense,blackhole.

InstanceId string

The ID of the instance.

InstanceType string

The instance type of the public IP address asset. Value: ecs,slb,eip.

Bps int

Specifies the traffic scrubbing threshold. Unit: Mbit/s. The traffic scrubbing threshold cannot exceed the peak inbound or outbound Internet traffic, whichever is larger, of the asset.

InternetIp string

The Internet IP address.

IsAuto bool

Whether it is the system default threshold. Value:

Pps int

The current message number cleaning threshold. Unit: pps.

ddosType String

The type of the threshold to query. Valid values: defense,blackhole.

instanceId String

The ID of the instance.

instanceType String

The instance type of the public IP address asset. Value: ecs,slb,eip.

bps Integer

Specifies the traffic scrubbing threshold. Unit: Mbit/s. The traffic scrubbing threshold cannot exceed the peak inbound or outbound Internet traffic, whichever is larger, of the asset.

internetIp String

The Internet IP address.

isAuto Boolean

Whether it is the system default threshold. Value:

pps Integer

The current message number cleaning threshold. Unit: pps.

ddosType string

The type of the threshold to query. Valid values: defense,blackhole.

instanceId string

The ID of the instance.

instanceType string

The instance type of the public IP address asset. Value: ecs,slb,eip.

bps number

Specifies the traffic scrubbing threshold. Unit: Mbit/s. The traffic scrubbing threshold cannot exceed the peak inbound or outbound Internet traffic, whichever is larger, of the asset.

internetIp string

The Internet IP address.

isAuto boolean

Whether it is the system default threshold. Value:

pps number

The current message number cleaning threshold. Unit: pps.

ddos_type str

The type of the threshold to query. Valid values: defense,blackhole.

instance_id str

The ID of the instance.

instance_type str

The instance type of the public IP address asset. Value: ecs,slb,eip.

bps int

Specifies the traffic scrubbing threshold. Unit: Mbit/s. The traffic scrubbing threshold cannot exceed the peak inbound or outbound Internet traffic, whichever is larger, of the asset.

internet_ip str

The Internet IP address.

is_auto bool

Whether it is the system default threshold. Value:

pps int

The current message number cleaning threshold. Unit: pps.

ddosType String

The type of the threshold to query. Valid values: defense,blackhole.

instanceId String

The ID of the instance.

instanceType String

The instance type of the public IP address asset. Value: ecs,slb,eip.

bps Number

Specifies the traffic scrubbing threshold. Unit: Mbit/s. The traffic scrubbing threshold cannot exceed the peak inbound or outbound Internet traffic, whichever is larger, of the asset.

internetIp String

The Internet IP address.

isAuto Boolean

Whether it is the system default threshold. Value:

pps Number

The current message number cleaning threshold. Unit: pps.

Outputs

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

Id string

The provider-assigned unique ID for this managed resource.

MaxBps int

The maximum traffic scrubbing threshold. Unit: Mbit/s.

MaxPps int

The maximum packet scrubbing threshold. Unit: pps.

Id string

The provider-assigned unique ID for this managed resource.

MaxBps int

The maximum traffic scrubbing threshold. Unit: Mbit/s.

MaxPps int

The maximum packet scrubbing threshold. Unit: pps.

id String

The provider-assigned unique ID for this managed resource.

maxBps Integer

The maximum traffic scrubbing threshold. Unit: Mbit/s.

maxPps Integer

The maximum packet scrubbing threshold. Unit: pps.

id string

The provider-assigned unique ID for this managed resource.

maxBps number

The maximum traffic scrubbing threshold. Unit: Mbit/s.

maxPps number

The maximum packet scrubbing threshold. Unit: pps.

id str

The provider-assigned unique ID for this managed resource.

max_bps int

The maximum traffic scrubbing threshold. Unit: Mbit/s.

max_pps int

The maximum packet scrubbing threshold. Unit: pps.

id String

The provider-assigned unique ID for this managed resource.

maxBps Number

The maximum traffic scrubbing threshold. Unit: Mbit/s.

maxPps Number

The maximum packet scrubbing threshold. Unit: pps.

Look up Existing BasicDefenseThreshold Resource

Get an existing BasicDefenseThreshold 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?: BasicDefenseThresholdState, opts?: CustomResourceOptions): BasicDefenseThreshold
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        bps: Optional[int] = None,
        ddos_type: Optional[str] = None,
        instance_id: Optional[str] = None,
        instance_type: Optional[str] = None,
        internet_ip: Optional[str] = None,
        is_auto: Optional[bool] = None,
        max_bps: Optional[int] = None,
        max_pps: Optional[int] = None,
        pps: Optional[int] = None) -> BasicDefenseThreshold
func GetBasicDefenseThreshold(ctx *Context, name string, id IDInput, state *BasicDefenseThresholdState, opts ...ResourceOption) (*BasicDefenseThreshold, error)
public static BasicDefenseThreshold Get(string name, Input<string> id, BasicDefenseThresholdState? state, CustomResourceOptions? opts = null)
public static BasicDefenseThreshold get(String name, Output<String> id, BasicDefenseThresholdState 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:
Bps int

Specifies the traffic scrubbing threshold. Unit: Mbit/s. The traffic scrubbing threshold cannot exceed the peak inbound or outbound Internet traffic, whichever is larger, of the asset.

DdosType string

The type of the threshold to query. Valid values: defense,blackhole.

InstanceId string

The ID of the instance.

InstanceType string

The instance type of the public IP address asset. Value: ecs,slb,eip.

InternetIp string

The Internet IP address.

IsAuto bool

Whether it is the system default threshold. Value:

MaxBps int

The maximum traffic scrubbing threshold. Unit: Mbit/s.

MaxPps int

The maximum packet scrubbing threshold. Unit: pps.

Pps int

The current message number cleaning threshold. Unit: pps.

Bps int

Specifies the traffic scrubbing threshold. Unit: Mbit/s. The traffic scrubbing threshold cannot exceed the peak inbound or outbound Internet traffic, whichever is larger, of the asset.

DdosType string

The type of the threshold to query. Valid values: defense,blackhole.

InstanceId string

The ID of the instance.

InstanceType string

The instance type of the public IP address asset. Value: ecs,slb,eip.

InternetIp string

The Internet IP address.

IsAuto bool

Whether it is the system default threshold. Value:

MaxBps int

The maximum traffic scrubbing threshold. Unit: Mbit/s.

MaxPps int

The maximum packet scrubbing threshold. Unit: pps.

Pps int

The current message number cleaning threshold. Unit: pps.

bps Integer

Specifies the traffic scrubbing threshold. Unit: Mbit/s. The traffic scrubbing threshold cannot exceed the peak inbound or outbound Internet traffic, whichever is larger, of the asset.

ddosType String

The type of the threshold to query. Valid values: defense,blackhole.

instanceId String

The ID of the instance.

instanceType String

The instance type of the public IP address asset. Value: ecs,slb,eip.

internetIp String

The Internet IP address.

isAuto Boolean

Whether it is the system default threshold. Value:

maxBps Integer

The maximum traffic scrubbing threshold. Unit: Mbit/s.

maxPps Integer

The maximum packet scrubbing threshold. Unit: pps.

pps Integer

The current message number cleaning threshold. Unit: pps.

bps number

Specifies the traffic scrubbing threshold. Unit: Mbit/s. The traffic scrubbing threshold cannot exceed the peak inbound or outbound Internet traffic, whichever is larger, of the asset.

ddosType string

The type of the threshold to query. Valid values: defense,blackhole.

instanceId string

The ID of the instance.

instanceType string

The instance type of the public IP address asset. Value: ecs,slb,eip.

internetIp string

The Internet IP address.

isAuto boolean

Whether it is the system default threshold. Value:

maxBps number

The maximum traffic scrubbing threshold. Unit: Mbit/s.

maxPps number

The maximum packet scrubbing threshold. Unit: pps.

pps number

The current message number cleaning threshold. Unit: pps.

bps int

Specifies the traffic scrubbing threshold. Unit: Mbit/s. The traffic scrubbing threshold cannot exceed the peak inbound or outbound Internet traffic, whichever is larger, of the asset.

ddos_type str

The type of the threshold to query. Valid values: defense,blackhole.

instance_id str

The ID of the instance.

instance_type str

The instance type of the public IP address asset. Value: ecs,slb,eip.

internet_ip str

The Internet IP address.

is_auto bool

Whether it is the system default threshold. Value:

max_bps int

The maximum traffic scrubbing threshold. Unit: Mbit/s.

max_pps int

The maximum packet scrubbing threshold. Unit: pps.

pps int

The current message number cleaning threshold. Unit: pps.

bps Number

Specifies the traffic scrubbing threshold. Unit: Mbit/s. The traffic scrubbing threshold cannot exceed the peak inbound or outbound Internet traffic, whichever is larger, of the asset.

ddosType String

The type of the threshold to query. Valid values: defense,blackhole.

instanceId String

The ID of the instance.

instanceType String

The instance type of the public IP address asset. Value: ecs,slb,eip.

internetIp String

The Internet IP address.

isAuto Boolean

Whether it is the system default threshold. Value:

maxBps Number

The maximum traffic scrubbing threshold. Unit: Mbit/s.

maxPps Number

The maximum packet scrubbing threshold. Unit: pps.

pps Number

The current message number cleaning threshold. Unit: pps.

Import

Ddos Basic Antiddos can be imported using the id, e.g.

 $ pulumi import alicloud:ddos/basicDefenseThreshold:BasicDefenseThreshold example <instance_id>:<instance_type>:<ddos_type>

Package Details

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

This Pulumi package is based on the alicloud Terraform Provider.