1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. AntiddosDdosBlackWhiteIp
tencentcloud 1.81.187 published on Monday, Apr 28, 2025 by tencentcloudstack

tencentcloud.AntiddosDdosBlackWhiteIp

Explore with Pulumi AI

Provides a resource to create a antiddos ddos black white ip

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";

const ddosBlackWhiteIp = new tencentcloud.AntiddosDdosBlackWhiteIp("ddosBlackWhiteIp", {
    instanceId: "bgp-xxxxxx",
    ip: "1.2.3.5",
    mask: 0,
    type: "black",
});
Copy
import pulumi
import pulumi_tencentcloud as tencentcloud

ddos_black_white_ip = tencentcloud.AntiddosDdosBlackWhiteIp("ddosBlackWhiteIp",
    instance_id="bgp-xxxxxx",
    ip="1.2.3.5",
    mask=0,
    type="black")
Copy
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.NewAntiddosDdosBlackWhiteIp(ctx, "ddosBlackWhiteIp", &tencentcloud.AntiddosDdosBlackWhiteIpArgs{
			InstanceId: pulumi.String("bgp-xxxxxx"),
			Ip:         pulumi.String("1.2.3.5"),
			Mask:       pulumi.Float64(0),
			Type:       pulumi.String("black"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;

return await Deployment.RunAsync(() => 
{
    var ddosBlackWhiteIp = new Tencentcloud.AntiddosDdosBlackWhiteIp("ddosBlackWhiteIp", new()
    {
        InstanceId = "bgp-xxxxxx",
        Ip = "1.2.3.5",
        Mask = 0,
        Type = "black",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.AntiddosDdosBlackWhiteIp;
import com.pulumi.tencentcloud.AntiddosDdosBlackWhiteIpArgs;
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 ddosBlackWhiteIp = new AntiddosDdosBlackWhiteIp("ddosBlackWhiteIp", AntiddosDdosBlackWhiteIpArgs.builder()
            .instanceId("bgp-xxxxxx")
            .ip("1.2.3.5")
            .mask(0)
            .type("black")
            .build());

    }
}
Copy
resources:
  ddosBlackWhiteIp:
    type: tencentcloud:AntiddosDdosBlackWhiteIp
    properties:
      instanceId: bgp-xxxxxx
      ip: 1.2.3.5
      mask: 0
      type: black
Copy

Create AntiddosDdosBlackWhiteIp Resource

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

Constructor syntax

new AntiddosDdosBlackWhiteIp(name: string, args: AntiddosDdosBlackWhiteIpArgs, opts?: CustomResourceOptions);
@overload
def AntiddosDdosBlackWhiteIp(resource_name: str,
                             args: AntiddosDdosBlackWhiteIpArgs,
                             opts: Optional[ResourceOptions] = None)

@overload
def AntiddosDdosBlackWhiteIp(resource_name: str,
                             opts: Optional[ResourceOptions] = None,
                             instance_id: Optional[str] = None,
                             ip: Optional[str] = None,
                             mask: Optional[float] = None,
                             type: Optional[str] = None,
                             antiddos_ddos_black_white_ip_id: Optional[str] = None)
func NewAntiddosDdosBlackWhiteIp(ctx *Context, name string, args AntiddosDdosBlackWhiteIpArgs, opts ...ResourceOption) (*AntiddosDdosBlackWhiteIp, error)
public AntiddosDdosBlackWhiteIp(string name, AntiddosDdosBlackWhiteIpArgs args, CustomResourceOptions? opts = null)
public AntiddosDdosBlackWhiteIp(String name, AntiddosDdosBlackWhiteIpArgs args)
public AntiddosDdosBlackWhiteIp(String name, AntiddosDdosBlackWhiteIpArgs args, CustomResourceOptions options)
type: tencentcloud:AntiddosDdosBlackWhiteIp
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. AntiddosDdosBlackWhiteIpArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. AntiddosDdosBlackWhiteIpArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. AntiddosDdosBlackWhiteIpArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. AntiddosDdosBlackWhiteIpArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. AntiddosDdosBlackWhiteIpArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

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

InstanceId This property is required. string
instance id.
Ip This property is required. string
ip list.
Mask This property is required. double
ip mask.
Type This property is required. string
ip type, black: black ip list, white: white ip list.
AntiddosDdosBlackWhiteIpId string
ID of the resource.
InstanceId This property is required. string
instance id.
Ip This property is required. string
ip list.
Mask This property is required. float64
ip mask.
Type This property is required. string
ip type, black: black ip list, white: white ip list.
AntiddosDdosBlackWhiteIpId string
ID of the resource.
instanceId This property is required. String
instance id.
ip This property is required. String
ip list.
mask This property is required. Double
ip mask.
type This property is required. String
ip type, black: black ip list, white: white ip list.
antiddosDdosBlackWhiteIpId String
ID of the resource.
instanceId This property is required. string
instance id.
ip This property is required. string
ip list.
mask This property is required. number
ip mask.
type This property is required. string
ip type, black: black ip list, white: white ip list.
antiddosDdosBlackWhiteIpId string
ID of the resource.
instance_id This property is required. str
instance id.
ip This property is required. str
ip list.
mask This property is required. float
ip mask.
type This property is required. str
ip type, black: black ip list, white: white ip list.
antiddos_ddos_black_white_ip_id str
ID of the resource.
instanceId This property is required. String
instance id.
ip This property is required. String
ip list.
mask This property is required. Number
ip mask.
type This property is required. String
ip type, black: black ip list, white: white ip list.
antiddosDdosBlackWhiteIpId String
ID of the resource.

Outputs

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

Get an existing AntiddosDdosBlackWhiteIp 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?: AntiddosDdosBlackWhiteIpState, opts?: CustomResourceOptions): AntiddosDdosBlackWhiteIp
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        antiddos_ddos_black_white_ip_id: Optional[str] = None,
        instance_id: Optional[str] = None,
        ip: Optional[str] = None,
        mask: Optional[float] = None,
        type: Optional[str] = None) -> AntiddosDdosBlackWhiteIp
func GetAntiddosDdosBlackWhiteIp(ctx *Context, name string, id IDInput, state *AntiddosDdosBlackWhiteIpState, opts ...ResourceOption) (*AntiddosDdosBlackWhiteIp, error)
public static AntiddosDdosBlackWhiteIp Get(string name, Input<string> id, AntiddosDdosBlackWhiteIpState? state, CustomResourceOptions? opts = null)
public static AntiddosDdosBlackWhiteIp get(String name, Output<String> id, AntiddosDdosBlackWhiteIpState state, CustomResourceOptions options)
resources:  _:    type: tencentcloud:AntiddosDdosBlackWhiteIp    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
AntiddosDdosBlackWhiteIpId string
ID of the resource.
InstanceId string
instance id.
Ip string
ip list.
Mask double
ip mask.
Type string
ip type, black: black ip list, white: white ip list.
AntiddosDdosBlackWhiteIpId string
ID of the resource.
InstanceId string
instance id.
Ip string
ip list.
Mask float64
ip mask.
Type string
ip type, black: black ip list, white: white ip list.
antiddosDdosBlackWhiteIpId String
ID of the resource.
instanceId String
instance id.
ip String
ip list.
mask Double
ip mask.
type String
ip type, black: black ip list, white: white ip list.
antiddosDdosBlackWhiteIpId string
ID of the resource.
instanceId string
instance id.
ip string
ip list.
mask number
ip mask.
type string
ip type, black: black ip list, white: white ip list.
antiddos_ddos_black_white_ip_id str
ID of the resource.
instance_id str
instance id.
ip str
ip list.
mask float
ip mask.
type str
ip type, black: black ip list, white: white ip list.
antiddosDdosBlackWhiteIpId String
ID of the resource.
instanceId String
instance id.
ip String
ip list.
mask Number
ip mask.
type String
ip type, black: black ip list, white: white ip list.

Import

antiddos ddos_black_white_ip can be imported using the id, e.g.

$ pulumi import tencentcloud:index/antiddosDdosBlackWhiteIp:AntiddosDdosBlackWhiteIp ddos_black_white_ip ${instanceId}#${ip}
Copy

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.