1. Packages
  2. Opentelekomcloud Provider
  3. API Docs
  4. AntiddosV1
opentelekomcloud 1.36.37 published on Thursday, Apr 24, 2025 by opentelekomcloud

opentelekomcloud.AntiddosV1

Explore with Pulumi AI

opentelekomcloud logo
opentelekomcloud 1.36.37 published on Thursday, Apr 24, 2025 by opentelekomcloud

    Up-to-date reference of API arguments for Anti-DDoS service you can get at documentation portal.

    Anti-DDoS monitors the service traffic from the Internet to ECSs, ELB instances, and BMSs to detect attack traffic in real time. It then cleans attack traffic according to user-configured defense policies so that services run as normal.

    ~> AntiDDoS protection for Elastic IP is provided by default and shouldn’t be created manually.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as opentelekomcloud from "@pulumi/opentelekomcloud";
    
    const config = new pulumi.Config();
    const eipId = config.requireObject("eipId");
    const myantiddos = new opentelekomcloud.AntiddosV1("myantiddos", {
        floatingIpId: eipId,
        enableL7: true,
        trafficPosId: 1,
        httpRequestPosId: 3,
        cleaningAccessPosId: 2,
        appTypeId: 0,
    });
    
    import pulumi
    import pulumi_opentelekomcloud as opentelekomcloud
    
    config = pulumi.Config()
    eip_id = config.require_object("eipId")
    myantiddos = opentelekomcloud.AntiddosV1("myantiddos",
        floating_ip_id=eip_id,
        enable_l7=True,
        traffic_pos_id=1,
        http_request_pos_id=3,
        cleaning_access_pos_id=2,
        app_type_id=0)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
    	"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, "")
    		eipId := cfg.RequireObject("eipId")
    		_, err := opentelekomcloud.NewAntiddosV1(ctx, "myantiddos", &opentelekomcloud.AntiddosV1Args{
    			FloatingIpId:        pulumi.Any(eipId),
    			EnableL7:            pulumi.Bool(true),
    			TrafficPosId:        pulumi.Float64(1),
    			HttpRequestPosId:    pulumi.Float64(3),
    			CleaningAccessPosId: pulumi.Float64(2),
    			AppTypeId:           pulumi.Float64(0),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Opentelekomcloud = Pulumi.Opentelekomcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var eipId = config.RequireObject<dynamic>("eipId");
        var myantiddos = new Opentelekomcloud.AntiddosV1("myantiddos", new()
        {
            FloatingIpId = eipId,
            EnableL7 = true,
            TrafficPosId = 1,
            HttpRequestPosId = 3,
            CleaningAccessPosId = 2,
            AppTypeId = 0,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.opentelekomcloud.AntiddosV1;
    import com.pulumi.opentelekomcloud.AntiddosV1Args;
    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 eipId = config.get("eipId");
            var myantiddos = new AntiddosV1("myantiddos", AntiddosV1Args.builder()
                .floatingIpId(eipId)
                .enableL7(true)
                .trafficPosId(1)
                .httpRequestPosId(3)
                .cleaningAccessPosId(2)
                .appTypeId(0)
                .build());
    
        }
    }
    
    configuration:
      eipId:
        type: dynamic
    resources:
      myantiddos:
        type: opentelekomcloud:AntiddosV1
        properties:
          floatingIpId: ${eipId}
          enableL7: true
          trafficPosId: 1
          httpRequestPosId: 3
          cleaningAccessPosId: 2
          appTypeId: 0
    

    Create AntiddosV1 Resource

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

    Constructor syntax

    new AntiddosV1(name: string, args: AntiddosV1Args, opts?: CustomResourceOptions);
    @overload
    def AntiddosV1(resource_name: str,
                   args: AntiddosV1Args,
                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def AntiddosV1(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   app_type_id: Optional[float] = None,
                   cleaning_access_pos_id: Optional[float] = None,
                   enable_l7: Optional[bool] = None,
                   floating_ip_id: Optional[str] = None,
                   http_request_pos_id: Optional[float] = None,
                   traffic_pos_id: Optional[float] = None,
                   antiddos_v1_id: Optional[str] = None,
                   region: Optional[str] = None,
                   timeouts: Optional[AntiddosV1TimeoutsArgs] = None)
    func NewAntiddosV1(ctx *Context, name string, args AntiddosV1Args, opts ...ResourceOption) (*AntiddosV1, error)
    public AntiddosV1(string name, AntiddosV1Args args, CustomResourceOptions? opts = null)
    public AntiddosV1(String name, AntiddosV1Args args)
    public AntiddosV1(String name, AntiddosV1Args args, CustomResourceOptions options)
    
    type: opentelekomcloud:AntiddosV1
    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 AntiddosV1Args
    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 AntiddosV1Args
    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 AntiddosV1Args
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AntiddosV1Args
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AntiddosV1Args
    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 antiddosV1Resource = new Opentelekomcloud.AntiddosV1("antiddosV1Resource", new()
    {
        AppTypeId = 0,
        CleaningAccessPosId = 0,
        EnableL7 = false,
        FloatingIpId = "string",
        HttpRequestPosId = 0,
        TrafficPosId = 0,
        AntiddosV1Id = "string",
        Region = "string",
        Timeouts = new Opentelekomcloud.Inputs.AntiddosV1TimeoutsArgs
        {
            Create = "string",
            Delete = "string",
            Update = "string",
        },
    });
    
    example, err := opentelekomcloud.NewAntiddosV1(ctx, "antiddosV1Resource", &opentelekomcloud.AntiddosV1Args{
    	AppTypeId:           pulumi.Float64(0),
    	CleaningAccessPosId: pulumi.Float64(0),
    	EnableL7:            pulumi.Bool(false),
    	FloatingIpId:        pulumi.String("string"),
    	HttpRequestPosId:    pulumi.Float64(0),
    	TrafficPosId:        pulumi.Float64(0),
    	AntiddosV1Id:        pulumi.String("string"),
    	Region:              pulumi.String("string"),
    	Timeouts: &opentelekomcloud.AntiddosV1TimeoutsArgs{
    		Create: pulumi.String("string"),
    		Delete: pulumi.String("string"),
    		Update: pulumi.String("string"),
    	},
    })
    
    var antiddosV1Resource = new AntiddosV1("antiddosV1Resource", AntiddosV1Args.builder()
        .appTypeId(0)
        .cleaningAccessPosId(0)
        .enableL7(false)
        .floatingIpId("string")
        .httpRequestPosId(0)
        .trafficPosId(0)
        .antiddosV1Id("string")
        .region("string")
        .timeouts(AntiddosV1TimeoutsArgs.builder()
            .create("string")
            .delete("string")
            .update("string")
            .build())
        .build());
    
    antiddos_v1_resource = opentelekomcloud.AntiddosV1("antiddosV1Resource",
        app_type_id=0,
        cleaning_access_pos_id=0,
        enable_l7=False,
        floating_ip_id="string",
        http_request_pos_id=0,
        traffic_pos_id=0,
        antiddos_v1_id="string",
        region="string",
        timeouts={
            "create": "string",
            "delete": "string",
            "update": "string",
        })
    
    const antiddosV1Resource = new opentelekomcloud.AntiddosV1("antiddosV1Resource", {
        appTypeId: 0,
        cleaningAccessPosId: 0,
        enableL7: false,
        floatingIpId: "string",
        httpRequestPosId: 0,
        trafficPosId: 0,
        antiddosV1Id: "string",
        region: "string",
        timeouts: {
            create: "string",
            "delete": "string",
            update: "string",
        },
    });
    
    type: opentelekomcloud:AntiddosV1
    properties:
        antiddosV1Id: string
        appTypeId: 0
        cleaningAccessPosId: 0
        enableL7: false
        floatingIpId: string
        httpRequestPosId: 0
        region: string
        timeouts:
            create: string
            delete: string
            update: string
        trafficPosId: 0
    

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

    AppTypeId double
    The application type ID.
    CleaningAccessPosId double
    The position ID of access limit during cleaning. The value ranges from 1 to 8.
    EnableL7 bool
    Specifies whether to enable L7 defense.
    FloatingIpId string
    The ID corresponding to the Elastic IP Address (EIP) of a user.
    HttpRequestPosId double
    The position ID of number of HTTP requests. The value ranges from 1 to 15.
    TrafficPosId double
    The position ID of traffic. The value ranges from 1 to 9.
    AntiddosV1Id string
    Region string
    Timeouts AntiddosV1Timeouts
    AppTypeId float64
    The application type ID.
    CleaningAccessPosId float64
    The position ID of access limit during cleaning. The value ranges from 1 to 8.
    EnableL7 bool
    Specifies whether to enable L7 defense.
    FloatingIpId string
    The ID corresponding to the Elastic IP Address (EIP) of a user.
    HttpRequestPosId float64
    The position ID of number of HTTP requests. The value ranges from 1 to 15.
    TrafficPosId float64
    The position ID of traffic. The value ranges from 1 to 9.
    AntiddosV1Id string
    Region string
    Timeouts AntiddosV1TimeoutsArgs
    appTypeId Double
    The application type ID.
    cleaningAccessPosId Double
    The position ID of access limit during cleaning. The value ranges from 1 to 8.
    enableL7 Boolean
    Specifies whether to enable L7 defense.
    floatingIpId String
    The ID corresponding to the Elastic IP Address (EIP) of a user.
    httpRequestPosId Double
    The position ID of number of HTTP requests. The value ranges from 1 to 15.
    trafficPosId Double
    The position ID of traffic. The value ranges from 1 to 9.
    antiddosV1Id String
    region String
    timeouts AntiddosV1Timeouts
    appTypeId number
    The application type ID.
    cleaningAccessPosId number
    The position ID of access limit during cleaning. The value ranges from 1 to 8.
    enableL7 boolean
    Specifies whether to enable L7 defense.
    floatingIpId string
    The ID corresponding to the Elastic IP Address (EIP) of a user.
    httpRequestPosId number
    The position ID of number of HTTP requests. The value ranges from 1 to 15.
    trafficPosId number
    The position ID of traffic. The value ranges from 1 to 9.
    antiddosV1Id string
    region string
    timeouts AntiddosV1Timeouts
    app_type_id float
    The application type ID.
    cleaning_access_pos_id float
    The position ID of access limit during cleaning. The value ranges from 1 to 8.
    enable_l7 bool
    Specifies whether to enable L7 defense.
    floating_ip_id str
    The ID corresponding to the Elastic IP Address (EIP) of a user.
    http_request_pos_id float
    The position ID of number of HTTP requests. The value ranges from 1 to 15.
    traffic_pos_id float
    The position ID of traffic. The value ranges from 1 to 9.
    antiddos_v1_id str
    region str
    timeouts AntiddosV1TimeoutsArgs
    appTypeId Number
    The application type ID.
    cleaningAccessPosId Number
    The position ID of access limit during cleaning. The value ranges from 1 to 8.
    enableL7 Boolean
    Specifies whether to enable L7 defense.
    floatingIpId String
    The ID corresponding to the Elastic IP Address (EIP) of a user.
    httpRequestPosId Number
    The position ID of number of HTTP requests. The value ranges from 1 to 15.
    trafficPosId Number
    The position ID of traffic. The value ranges from 1 to 9.
    antiddosV1Id String
    region String
    timeouts Property Map

    Outputs

    All input properties are implicitly available as output properties. Additionally, the AntiddosV1 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 AntiddosV1 Resource

    Get an existing AntiddosV1 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?: AntiddosV1State, opts?: CustomResourceOptions): AntiddosV1
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            antiddos_v1_id: Optional[str] = None,
            app_type_id: Optional[float] = None,
            cleaning_access_pos_id: Optional[float] = None,
            enable_l7: Optional[bool] = None,
            floating_ip_id: Optional[str] = None,
            http_request_pos_id: Optional[float] = None,
            region: Optional[str] = None,
            timeouts: Optional[AntiddosV1TimeoutsArgs] = None,
            traffic_pos_id: Optional[float] = None) -> AntiddosV1
    func GetAntiddosV1(ctx *Context, name string, id IDInput, state *AntiddosV1State, opts ...ResourceOption) (*AntiddosV1, error)
    public static AntiddosV1 Get(string name, Input<string> id, AntiddosV1State? state, CustomResourceOptions? opts = null)
    public static AntiddosV1 get(String name, Output<String> id, AntiddosV1State state, CustomResourceOptions options)
    resources:  _:    type: opentelekomcloud:AntiddosV1    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.
    The following state arguments are supported:
    AntiddosV1Id string
    AppTypeId double
    The application type ID.
    CleaningAccessPosId double
    The position ID of access limit during cleaning. The value ranges from 1 to 8.
    EnableL7 bool
    Specifies whether to enable L7 defense.
    FloatingIpId string
    The ID corresponding to the Elastic IP Address (EIP) of a user.
    HttpRequestPosId double
    The position ID of number of HTTP requests. The value ranges from 1 to 15.
    Region string
    Timeouts AntiddosV1Timeouts
    TrafficPosId double
    The position ID of traffic. The value ranges from 1 to 9.
    AntiddosV1Id string
    AppTypeId float64
    The application type ID.
    CleaningAccessPosId float64
    The position ID of access limit during cleaning. The value ranges from 1 to 8.
    EnableL7 bool
    Specifies whether to enable L7 defense.
    FloatingIpId string
    The ID corresponding to the Elastic IP Address (EIP) of a user.
    HttpRequestPosId float64
    The position ID of number of HTTP requests. The value ranges from 1 to 15.
    Region string
    Timeouts AntiddosV1TimeoutsArgs
    TrafficPosId float64
    The position ID of traffic. The value ranges from 1 to 9.
    antiddosV1Id String
    appTypeId Double
    The application type ID.
    cleaningAccessPosId Double
    The position ID of access limit during cleaning. The value ranges from 1 to 8.
    enableL7 Boolean
    Specifies whether to enable L7 defense.
    floatingIpId String
    The ID corresponding to the Elastic IP Address (EIP) of a user.
    httpRequestPosId Double
    The position ID of number of HTTP requests. The value ranges from 1 to 15.
    region String
    timeouts AntiddosV1Timeouts
    trafficPosId Double
    The position ID of traffic. The value ranges from 1 to 9.
    antiddosV1Id string
    appTypeId number
    The application type ID.
    cleaningAccessPosId number
    The position ID of access limit during cleaning. The value ranges from 1 to 8.
    enableL7 boolean
    Specifies whether to enable L7 defense.
    floatingIpId string
    The ID corresponding to the Elastic IP Address (EIP) of a user.
    httpRequestPosId number
    The position ID of number of HTTP requests. The value ranges from 1 to 15.
    region string
    timeouts AntiddosV1Timeouts
    trafficPosId number
    The position ID of traffic. The value ranges from 1 to 9.
    antiddos_v1_id str
    app_type_id float
    The application type ID.
    cleaning_access_pos_id float
    The position ID of access limit during cleaning. The value ranges from 1 to 8.
    enable_l7 bool
    Specifies whether to enable L7 defense.
    floating_ip_id str
    The ID corresponding to the Elastic IP Address (EIP) of a user.
    http_request_pos_id float
    The position ID of number of HTTP requests. The value ranges from 1 to 15.
    region str
    timeouts AntiddosV1TimeoutsArgs
    traffic_pos_id float
    The position ID of traffic. The value ranges from 1 to 9.
    antiddosV1Id String
    appTypeId Number
    The application type ID.
    cleaningAccessPosId Number
    The position ID of access limit during cleaning. The value ranges from 1 to 8.
    enableL7 Boolean
    Specifies whether to enable L7 defense.
    floatingIpId String
    The ID corresponding to the Elastic IP Address (EIP) of a user.
    httpRequestPosId Number
    The position ID of number of HTTP requests. The value ranges from 1 to 15.
    region String
    timeouts Property Map
    trafficPosId Number
    The position ID of traffic. The value ranges from 1 to 9.

    Supporting Types

    AntiddosV1Timeouts, AntiddosV1TimeoutsArgs

    Create string
    Delete string
    Update string
    Create string
    Delete string
    Update string
    create String
    delete String
    update String
    create string
    delete string
    update string
    create str
    delete str
    update str
    create String
    delete String
    update String

    Import

    Antiddos can be imported using the floating_ip_id, e.g.

    $ pulumi import opentelekomcloud:index/antiddosV1:AntiddosV1 myantiddos c1881895-cdcb-4d23-96cb-032e6a3ee667
    

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

    Package Details

    Repository
    opentelekomcloud opentelekomcloud/terraform-provider-opentelekomcloud
    License
    Notes
    This Pulumi package is based on the opentelekomcloud Terraform Provider.
    opentelekomcloud logo
    opentelekomcloud 1.36.37 published on Thursday, Apr 24, 2025 by opentelekomcloud