opentelekomcloud.AntiddosV1
Explore with Pulumi AI
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:
- App
Type doubleId - The application type ID.
- Cleaning
Access doublePos Id - 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 stringId - The ID corresponding to the Elastic IP Address (EIP) of a user.
- Http
Request doublePos Id - The position ID of number of HTTP requests. The value ranges from 1 to 15.
- Traffic
Pos doubleId - The position ID of traffic. The value ranges from 1 to 9.
- Antiddos
V1Id string - Region string
- Timeouts
Antiddos
V1Timeouts
- App
Type float64Id - The application type ID.
- Cleaning
Access float64Pos Id - 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 stringId - The ID corresponding to the Elastic IP Address (EIP) of a user.
- Http
Request float64Pos Id - The position ID of number of HTTP requests. The value ranges from 1 to 15.
- Traffic
Pos float64Id - The position ID of traffic. The value ranges from 1 to 9.
- Antiddos
V1Id string - Region string
- Timeouts
Antiddos
V1Timeouts Args
- app
Type DoubleId - The application type ID.
- cleaning
Access DoublePos Id - The position ID of access limit during cleaning. The value ranges from 1 to 8.
- enable
L7 Boolean - Specifies whether to enable L7 defense.
- floating
Ip StringId - The ID corresponding to the Elastic IP Address (EIP) of a user.
- http
Request DoublePos Id - The position ID of number of HTTP requests. The value ranges from 1 to 15.
- traffic
Pos DoubleId - The position ID of traffic. The value ranges from 1 to 9.
- antiddos
V1Id String - region String
- timeouts
Antiddos
V1Timeouts
- app
Type numberId - The application type ID.
- cleaning
Access numberPos Id - The position ID of access limit during cleaning. The value ranges from 1 to 8.
- enable
L7 boolean - Specifies whether to enable L7 defense.
- floating
Ip stringId - The ID corresponding to the Elastic IP Address (EIP) of a user.
- http
Request numberPos Id - The position ID of number of HTTP requests. The value ranges from 1 to 15.
- traffic
Pos numberId - The position ID of traffic. The value ranges from 1 to 9.
- antiddos
V1Id string - region string
- timeouts
Antiddos
V1Timeouts
- app_
type_ floatid - The application type ID.
- cleaning_
access_ floatpos_ id - 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_ strid - The ID corresponding to the Elastic IP Address (EIP) of a user.
- http_
request_ floatpos_ id - The position ID of number of HTTP requests. The value ranges from 1 to 15.
- traffic_
pos_ floatid - The position ID of traffic. The value ranges from 1 to 9.
- antiddos_
v1_ strid - region str
- timeouts
Antiddos
V1Timeouts Args
- app
Type NumberId - The application type ID.
- cleaning
Access NumberPos Id - The position ID of access limit during cleaning. The value ranges from 1 to 8.
- enable
L7 Boolean - Specifies whether to enable L7 defense.
- floating
Ip StringId - The ID corresponding to the Elastic IP Address (EIP) of a user.
- http
Request NumberPos Id - The position ID of number of HTTP requests. The value ranges from 1 to 15.
- traffic
Pos NumberId - The position ID of traffic. The value ranges from 1 to 9.
- antiddos
V1Id 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.
- Antiddos
V1Id string - App
Type doubleId - The application type ID.
- Cleaning
Access doublePos Id - 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 stringId - The ID corresponding to the Elastic IP Address (EIP) of a user.
- Http
Request doublePos Id - The position ID of number of HTTP requests. The value ranges from 1 to 15.
- Region string
- Timeouts
Antiddos
V1Timeouts - Traffic
Pos doubleId - The position ID of traffic. The value ranges from 1 to 9.
- Antiddos
V1Id string - App
Type float64Id - The application type ID.
- Cleaning
Access float64Pos Id - 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 stringId - The ID corresponding to the Elastic IP Address (EIP) of a user.
- Http
Request float64Pos Id - The position ID of number of HTTP requests. The value ranges from 1 to 15.
- Region string
- Timeouts
Antiddos
V1Timeouts Args - Traffic
Pos float64Id - The position ID of traffic. The value ranges from 1 to 9.
- antiddos
V1Id String - app
Type DoubleId - The application type ID.
- cleaning
Access DoublePos Id - The position ID of access limit during cleaning. The value ranges from 1 to 8.
- enable
L7 Boolean - Specifies whether to enable L7 defense.
- floating
Ip StringId - The ID corresponding to the Elastic IP Address (EIP) of a user.
- http
Request DoublePos Id - The position ID of number of HTTP requests. The value ranges from 1 to 15.
- region String
- timeouts
Antiddos
V1Timeouts - traffic
Pos DoubleId - The position ID of traffic. The value ranges from 1 to 9.
- antiddos
V1Id string - app
Type numberId - The application type ID.
- cleaning
Access numberPos Id - The position ID of access limit during cleaning. The value ranges from 1 to 8.
- enable
L7 boolean - Specifies whether to enable L7 defense.
- floating
Ip stringId - The ID corresponding to the Elastic IP Address (EIP) of a user.
- http
Request numberPos Id - The position ID of number of HTTP requests. The value ranges from 1 to 15.
- region string
- timeouts
Antiddos
V1Timeouts - traffic
Pos numberId - The position ID of traffic. The value ranges from 1 to 9.
- antiddos_
v1_ strid - app_
type_ floatid - The application type ID.
- cleaning_
access_ floatpos_ id - 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_ strid - The ID corresponding to the Elastic IP Address (EIP) of a user.
- http_
request_ floatpos_ id - The position ID of number of HTTP requests. The value ranges from 1 to 15.
- region str
- timeouts
Antiddos
V1Timeouts Args - traffic_
pos_ floatid - The position ID of traffic. The value ranges from 1 to 9.
- antiddos
V1Id String - app
Type NumberId - The application type ID.
- cleaning
Access NumberPos Id - The position ID of access limit during cleaning. The value ranges from 1 to 8.
- enable
L7 Boolean - Specifies whether to enable L7 defense.
- floating
Ip StringId - The ID corresponding to the Elastic IP Address (EIP) of a user.
- http
Request NumberPos Id - The position ID of number of HTTP requests. The value ranges from 1 to 15.
- region String
- timeouts Property Map
- traffic
Pos NumberId - The position ID of traffic. The value ranges from 1 to 9.
Supporting Types
AntiddosV1Timeouts, AntiddosV1TimeoutsArgs
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.