tencentcloud.AntiddosDdosGeoIpBlockConfig
Explore with Pulumi AI
Provides a resource to create a antiddos ddos_geo_ip_block_config
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const ddosGeoIpBlockConfig = new tencentcloud.AntiddosDdosGeoIpBlockConfig("ddosGeoIpBlockConfig", {
ddosGeoIpBlockConfig: {
action: "drop",
areaLists: [100002],
regionType: "customized",
},
instanceId: "bgp-xxxxxx",
});
import pulumi
import pulumi_tencentcloud as tencentcloud
ddos_geo_ip_block_config = tencentcloud.AntiddosDdosGeoIpBlockConfig("ddosGeoIpBlockConfig",
ddos_geo_ip_block_config={
"action": "drop",
"area_lists": [100002],
"region_type": "customized",
},
instance_id="bgp-xxxxxx")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := tencentcloud.NewAntiddosDdosGeoIpBlockConfig(ctx, "ddosGeoIpBlockConfig", &tencentcloud.AntiddosDdosGeoIpBlockConfigArgs{
DdosGeoIpBlockConfig: &tencentcloud.AntiddosDdosGeoIpBlockConfigDdosGeoIpBlockConfigArgs{
Action: pulumi.String("drop"),
AreaLists: pulumi.Float64Array{
pulumi.Float64(100002),
},
RegionType: pulumi.String("customized"),
},
InstanceId: pulumi.String("bgp-xxxxxx"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var ddosGeoIpBlockConfig = new Tencentcloud.AntiddosDdosGeoIpBlockConfig("ddosGeoIpBlockConfig", new()
{
DdosGeoIpBlockConfig = new Tencentcloud.Inputs.AntiddosDdosGeoIpBlockConfigDdosGeoIpBlockConfigArgs
{
Action = "drop",
AreaLists = new[]
{
100002,
},
RegionType = "customized",
},
InstanceId = "bgp-xxxxxx",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.AntiddosDdosGeoIpBlockConfig;
import com.pulumi.tencentcloud.AntiddosDdosGeoIpBlockConfigArgs;
import com.pulumi.tencentcloud.inputs.AntiddosDdosGeoIpBlockConfigDdosGeoIpBlockConfigArgs;
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 ddosGeoIpBlockConfig = new AntiddosDdosGeoIpBlockConfig("ddosGeoIpBlockConfig", AntiddosDdosGeoIpBlockConfigArgs.builder()
.ddosGeoIpBlockConfig(AntiddosDdosGeoIpBlockConfigDdosGeoIpBlockConfigArgs.builder()
.action("drop")
.areaLists(100002)
.regionType("customized")
.build())
.instanceId("bgp-xxxxxx")
.build());
}
}
resources:
ddosGeoIpBlockConfig:
type: tencentcloud:AntiddosDdosGeoIpBlockConfig
properties:
ddosGeoIpBlockConfig:
action: drop
areaLists:
- 100002
regionType: customized
instanceId: bgp-xxxxxx
Create AntiddosDdosGeoIpBlockConfig Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new AntiddosDdosGeoIpBlockConfig(name: string, args: AntiddosDdosGeoIpBlockConfigArgs, opts?: CustomResourceOptions);
@overload
def AntiddosDdosGeoIpBlockConfig(resource_name: str,
args: AntiddosDdosGeoIpBlockConfigArgs,
opts: Optional[ResourceOptions] = None)
@overload
def AntiddosDdosGeoIpBlockConfig(resource_name: str,
opts: Optional[ResourceOptions] = None,
ddos_geo_ip_block_config: Optional[AntiddosDdosGeoIpBlockConfigDdosGeoIpBlockConfigArgs] = None,
instance_id: Optional[str] = None,
antiddos_ddos_geo_ip_block_config_id: Optional[str] = None)
func NewAntiddosDdosGeoIpBlockConfig(ctx *Context, name string, args AntiddosDdosGeoIpBlockConfigArgs, opts ...ResourceOption) (*AntiddosDdosGeoIpBlockConfig, error)
public AntiddosDdosGeoIpBlockConfig(string name, AntiddosDdosGeoIpBlockConfigArgs args, CustomResourceOptions? opts = null)
public AntiddosDdosGeoIpBlockConfig(String name, AntiddosDdosGeoIpBlockConfigArgs args)
public AntiddosDdosGeoIpBlockConfig(String name, AntiddosDdosGeoIpBlockConfigArgs args, CustomResourceOptions options)
type: tencentcloud:AntiddosDdosGeoIpBlockConfig
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 AntiddosDdosGeoIpBlockConfigArgs
- 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 AntiddosDdosGeoIpBlockConfigArgs
- 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 AntiddosDdosGeoIpBlockConfigArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AntiddosDdosGeoIpBlockConfigArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AntiddosDdosGeoIpBlockConfigArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
AntiddosDdosGeoIpBlockConfig 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 AntiddosDdosGeoIpBlockConfig resource accepts the following input properties:
- Ddos
Geo AntiddosIp Block Config Ddos Geo Ip Block Config Ddos Geo Ip Block Config - DDoS region blocking configuration, configuration ID cannot be empty when filling in parameters.
- Instance
Id string - InstanceId.
- Antiddos
Ddos stringGeo Ip Block Config Id - ID of the resource.
- Ddos
Geo AntiddosIp Block Config Ddos Geo Ip Block Config Ddos Geo Ip Block Config Args - DDoS region blocking configuration, configuration ID cannot be empty when filling in parameters.
- Instance
Id string - InstanceId.
- Antiddos
Ddos stringGeo Ip Block Config Id - ID of the resource.
- ddos
Geo AntiddosIp Block Config Ddos Geo Ip Block Config Ddos Geo Ip Block Config - DDoS region blocking configuration, configuration ID cannot be empty when filling in parameters.
- instance
Id String - InstanceId.
- antiddos
Ddos StringGeo Ip Block Config Id - ID of the resource.
- ddos
Geo AntiddosIp Block Config Ddos Geo Ip Block Config Ddos Geo Ip Block Config - DDoS region blocking configuration, configuration ID cannot be empty when filling in parameters.
- instance
Id string - InstanceId.
- antiddos
Ddos stringGeo Ip Block Config Id - ID of the resource.
- ddos_
geo_ Antiddosip_ block_ config Ddos Geo Ip Block Config Ddos Geo Ip Block Config Args - DDoS region blocking configuration, configuration ID cannot be empty when filling in parameters.
- instance_
id str - InstanceId.
- antiddos_
ddos_ strgeo_ ip_ block_ config_ id - ID of the resource.
- ddos
Geo Property MapIp Block Config - DDoS region blocking configuration, configuration ID cannot be empty when filling in parameters.
- instance
Id String - InstanceId.
- antiddos
Ddos StringGeo Ip Block Config Id - ID of the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the AntiddosDdosGeoIpBlockConfig 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 AntiddosDdosGeoIpBlockConfig Resource
Get an existing AntiddosDdosGeoIpBlockConfig 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?: AntiddosDdosGeoIpBlockConfigState, opts?: CustomResourceOptions): AntiddosDdosGeoIpBlockConfig
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
antiddos_ddos_geo_ip_block_config_id: Optional[str] = None,
ddos_geo_ip_block_config: Optional[AntiddosDdosGeoIpBlockConfigDdosGeoIpBlockConfigArgs] = None,
instance_id: Optional[str] = None) -> AntiddosDdosGeoIpBlockConfig
func GetAntiddosDdosGeoIpBlockConfig(ctx *Context, name string, id IDInput, state *AntiddosDdosGeoIpBlockConfigState, opts ...ResourceOption) (*AntiddosDdosGeoIpBlockConfig, error)
public static AntiddosDdosGeoIpBlockConfig Get(string name, Input<string> id, AntiddosDdosGeoIpBlockConfigState? state, CustomResourceOptions? opts = null)
public static AntiddosDdosGeoIpBlockConfig get(String name, Output<String> id, AntiddosDdosGeoIpBlockConfigState state, CustomResourceOptions options)
resources: _: type: tencentcloud:AntiddosDdosGeoIpBlockConfig 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
Ddos stringGeo Ip Block Config Id - ID of the resource.
- Ddos
Geo AntiddosIp Block Config Ddos Geo Ip Block Config Ddos Geo Ip Block Config - DDoS region blocking configuration, configuration ID cannot be empty when filling in parameters.
- Instance
Id string - InstanceId.
- Antiddos
Ddos stringGeo Ip Block Config Id - ID of the resource.
- Ddos
Geo AntiddosIp Block Config Ddos Geo Ip Block Config Ddos Geo Ip Block Config Args - DDoS region blocking configuration, configuration ID cannot be empty when filling in parameters.
- Instance
Id string - InstanceId.
- antiddos
Ddos StringGeo Ip Block Config Id - ID of the resource.
- ddos
Geo AntiddosIp Block Config Ddos Geo Ip Block Config Ddos Geo Ip Block Config - DDoS region blocking configuration, configuration ID cannot be empty when filling in parameters.
- instance
Id String - InstanceId.
- antiddos
Ddos stringGeo Ip Block Config Id - ID of the resource.
- ddos
Geo AntiddosIp Block Config Ddos Geo Ip Block Config Ddos Geo Ip Block Config - DDoS region blocking configuration, configuration ID cannot be empty when filling in parameters.
- instance
Id string - InstanceId.
- antiddos_
ddos_ strgeo_ ip_ block_ config_ id - ID of the resource.
- ddos_
geo_ Antiddosip_ block_ config Ddos Geo Ip Block Config Ddos Geo Ip Block Config Args - DDoS region blocking configuration, configuration ID cannot be empty when filling in parameters.
- instance_
id str - InstanceId.
- antiddos
Ddos StringGeo Ip Block Config Id - ID of the resource.
- ddos
Geo Property MapIp Block Config - DDoS region blocking configuration, configuration ID cannot be empty when filling in parameters.
- instance
Id String - InstanceId.
Supporting Types
AntiddosDdosGeoIpBlockConfigDdosGeoIpBlockConfig, AntiddosDdosGeoIpBlockConfigDdosGeoIpBlockConfigArgs
- Action string
- Blocking action, value [drop (intercept) trans (release)].
- Region
Type string - Region type, value [oversea (overseas) China (domestic) customized (custom region)].
- Area
Lists List<double> - When RegionType is customized, an AreaList must be filled in, with a maximum of 128 entries;.
- Action string
- Blocking action, value [drop (intercept) trans (release)].
- Region
Type string - Region type, value [oversea (overseas) China (domestic) customized (custom region)].
- Area
Lists []float64 - When RegionType is customized, an AreaList must be filled in, with a maximum of 128 entries;.
- action String
- Blocking action, value [drop (intercept) trans (release)].
- region
Type String - Region type, value [oversea (overseas) China (domestic) customized (custom region)].
- area
Lists List<Double> - When RegionType is customized, an AreaList must be filled in, with a maximum of 128 entries;.
- action string
- Blocking action, value [drop (intercept) trans (release)].
- region
Type string - Region type, value [oversea (overseas) China (domestic) customized (custom region)].
- area
Lists number[] - When RegionType is customized, an AreaList must be filled in, with a maximum of 128 entries;.
- action str
- Blocking action, value [drop (intercept) trans (release)].
- region_
type str - Region type, value [oversea (overseas) China (domestic) customized (custom region)].
- area_
lists Sequence[float] - When RegionType is customized, an AreaList must be filled in, with a maximum of 128 entries;.
- action String
- Blocking action, value [drop (intercept) trans (release)].
- region
Type String - Region type, value [oversea (overseas) China (domestic) customized (custom region)].
- area
Lists List<Number> - When RegionType is customized, an AreaList must be filled in, with a maximum of 128 entries;.
Import
antiddos ddos_geo_ip_block_config can be imported using the id, e.g.
$ pulumi import tencentcloud:index/antiddosDdosGeoIpBlockConfig:AntiddosDdosGeoIpBlockConfig ddos_geo_ip_block_config ${instanceId}#${configId}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the
tencentcloud
Terraform Provider.