1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. AntiddosCcBlackWhiteIp
tencentcloud 1.81.183 published on Wednesday, Apr 16, 2025 by tencentcloudstack

tencentcloud.AntiddosCcBlackWhiteIp

Explore with Pulumi AI

Provides a resource to create a antiddos cc black white ip

Example Usage

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

const ccBlackWhiteIp = new tencentcloud.AntiddosCcBlackWhiteIp("ccBlackWhiteIp", {
    blackWhiteIp: {
        ip: "1.2.3.5",
        mask: 0,
    },
    domain: "t.baidu.com",
    instanceId: "bgpip-xxxxxx",
    ip: "xxx.xxx.xxx.xxx",
    protocol: "http",
    type: "black",
});
Copy
import pulumi
import pulumi_tencentcloud as tencentcloud

cc_black_white_ip = tencentcloud.AntiddosCcBlackWhiteIp("ccBlackWhiteIp",
    black_white_ip={
        "ip": "1.2.3.5",
        "mask": 0,
    },
    domain="t.baidu.com",
    instance_id="bgpip-xxxxxx",
    ip="xxx.xxx.xxx.xxx",
    protocol="http",
    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.NewAntiddosCcBlackWhiteIp(ctx, "ccBlackWhiteIp", &tencentcloud.AntiddosCcBlackWhiteIpArgs{
			BlackWhiteIp: &tencentcloud.AntiddosCcBlackWhiteIpBlackWhiteIpArgs{
				Ip:   pulumi.String("1.2.3.5"),
				Mask: pulumi.Float64(0),
			},
			Domain:     pulumi.String("t.baidu.com"),
			InstanceId: pulumi.String("bgpip-xxxxxx"),
			Ip:         pulumi.String("xxx.xxx.xxx.xxx"),
			Protocol:   pulumi.String("http"),
			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 ccBlackWhiteIp = new Tencentcloud.AntiddosCcBlackWhiteIp("ccBlackWhiteIp", new()
    {
        BlackWhiteIp = new Tencentcloud.Inputs.AntiddosCcBlackWhiteIpBlackWhiteIpArgs
        {
            Ip = "1.2.3.5",
            Mask = 0,
        },
        Domain = "t.baidu.com",
        InstanceId = "bgpip-xxxxxx",
        Ip = "xxx.xxx.xxx.xxx",
        Protocol = "http",
        Type = "black",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.AntiddosCcBlackWhiteIp;
import com.pulumi.tencentcloud.AntiddosCcBlackWhiteIpArgs;
import com.pulumi.tencentcloud.inputs.AntiddosCcBlackWhiteIpBlackWhiteIpArgs;
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 ccBlackWhiteIp = new AntiddosCcBlackWhiteIp("ccBlackWhiteIp", AntiddosCcBlackWhiteIpArgs.builder()
            .blackWhiteIp(AntiddosCcBlackWhiteIpBlackWhiteIpArgs.builder()
                .ip("1.2.3.5")
                .mask(0)
                .build())
            .domain("t.baidu.com")
            .instanceId("bgpip-xxxxxx")
            .ip("xxx.xxx.xxx.xxx")
            .protocol("http")
            .type("black")
            .build());

    }
}
Copy
resources:
  ccBlackWhiteIp:
    type: tencentcloud:AntiddosCcBlackWhiteIp
    properties:
      blackWhiteIp:
        ip: 1.2.3.5
        mask: 0
      domain: t.baidu.com
      instanceId: bgpip-xxxxxx
      ip: xxx.xxx.xxx.xxx
      protocol: http
      type: black
Copy

Create AntiddosCcBlackWhiteIp Resource

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

Constructor syntax

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

@overload
def AntiddosCcBlackWhiteIp(resource_name: str,
                           opts: Optional[ResourceOptions] = None,
                           black_white_ip: Optional[AntiddosCcBlackWhiteIpBlackWhiteIpArgs] = None,
                           domain: Optional[str] = None,
                           instance_id: Optional[str] = None,
                           ip: Optional[str] = None,
                           protocol: Optional[str] = None,
                           type: Optional[str] = None,
                           antiddos_cc_black_white_ip_id: Optional[str] = None)
func NewAntiddosCcBlackWhiteIp(ctx *Context, name string, args AntiddosCcBlackWhiteIpArgs, opts ...ResourceOption) (*AntiddosCcBlackWhiteIp, error)
public AntiddosCcBlackWhiteIp(string name, AntiddosCcBlackWhiteIpArgs args, CustomResourceOptions? opts = null)
public AntiddosCcBlackWhiteIp(String name, AntiddosCcBlackWhiteIpArgs args)
public AntiddosCcBlackWhiteIp(String name, AntiddosCcBlackWhiteIpArgs args, CustomResourceOptions options)
type: tencentcloud:AntiddosCcBlackWhiteIp
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. AntiddosCcBlackWhiteIpArgs
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. AntiddosCcBlackWhiteIpArgs
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. AntiddosCcBlackWhiteIpArgs
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. AntiddosCcBlackWhiteIpArgs
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. AntiddosCcBlackWhiteIpArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

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

BlackWhiteIp This property is required. AntiddosCcBlackWhiteIpBlackWhiteIp
Black white ip.
Domain This property is required. string
domain.
InstanceId This property is required. string
instance id.
Ip This property is required. string
ip address.
Protocol This property is required. string
protocol.
Type This property is required. string
IP type, value [black(blacklist IP), white(whitelist IP)].
AntiddosCcBlackWhiteIpId string
ID of the resource.
BlackWhiteIp This property is required. AntiddosCcBlackWhiteIpBlackWhiteIpArgs
Black white ip.
Domain This property is required. string
domain.
InstanceId This property is required. string
instance id.
Ip This property is required. string
ip address.
Protocol This property is required. string
protocol.
Type This property is required. string
IP type, value [black(blacklist IP), white(whitelist IP)].
AntiddosCcBlackWhiteIpId string
ID of the resource.
blackWhiteIp This property is required. AntiddosCcBlackWhiteIpBlackWhiteIp
Black white ip.
domain This property is required. String
domain.
instanceId This property is required. String
instance id.
ip This property is required. String
ip address.
protocol This property is required. String
protocol.
type This property is required. String
IP type, value [black(blacklist IP), white(whitelist IP)].
antiddosCcBlackWhiteIpId String
ID of the resource.
blackWhiteIp This property is required. AntiddosCcBlackWhiteIpBlackWhiteIp
Black white ip.
domain This property is required. string
domain.
instanceId This property is required. string
instance id.
ip This property is required. string
ip address.
protocol This property is required. string
protocol.
type This property is required. string
IP type, value [black(blacklist IP), white(whitelist IP)].
antiddosCcBlackWhiteIpId string
ID of the resource.
black_white_ip This property is required. AntiddosCcBlackWhiteIpBlackWhiteIpArgs
Black white ip.
domain This property is required. str
domain.
instance_id This property is required. str
instance id.
ip This property is required. str
ip address.
protocol This property is required. str
protocol.
type This property is required. str
IP type, value [black(blacklist IP), white(whitelist IP)].
antiddos_cc_black_white_ip_id str
ID of the resource.
blackWhiteIp This property is required. Property Map
Black white ip.
domain This property is required. String
domain.
instanceId This property is required. String
instance id.
ip This property is required. String
ip address.
protocol This property is required. String
protocol.
type This property is required. String
IP type, value [black(blacklist IP), white(whitelist IP)].
antiddosCcBlackWhiteIpId String
ID of the resource.

Outputs

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

Get an existing AntiddosCcBlackWhiteIp 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?: AntiddosCcBlackWhiteIpState, opts?: CustomResourceOptions): AntiddosCcBlackWhiteIp
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        antiddos_cc_black_white_ip_id: Optional[str] = None,
        black_white_ip: Optional[AntiddosCcBlackWhiteIpBlackWhiteIpArgs] = None,
        domain: Optional[str] = None,
        instance_id: Optional[str] = None,
        ip: Optional[str] = None,
        protocol: Optional[str] = None,
        type: Optional[str] = None) -> AntiddosCcBlackWhiteIp
func GetAntiddosCcBlackWhiteIp(ctx *Context, name string, id IDInput, state *AntiddosCcBlackWhiteIpState, opts ...ResourceOption) (*AntiddosCcBlackWhiteIp, error)
public static AntiddosCcBlackWhiteIp Get(string name, Input<string> id, AntiddosCcBlackWhiteIpState? state, CustomResourceOptions? opts = null)
public static AntiddosCcBlackWhiteIp get(String name, Output<String> id, AntiddosCcBlackWhiteIpState state, CustomResourceOptions options)
resources:  _:    type: tencentcloud:AntiddosCcBlackWhiteIp    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:
AntiddosCcBlackWhiteIpId string
ID of the resource.
BlackWhiteIp AntiddosCcBlackWhiteIpBlackWhiteIp
Black white ip.
Domain string
domain.
InstanceId string
instance id.
Ip string
ip address.
Protocol string
protocol.
Type string
IP type, value [black(blacklist IP), white(whitelist IP)].
AntiddosCcBlackWhiteIpId string
ID of the resource.
BlackWhiteIp AntiddosCcBlackWhiteIpBlackWhiteIpArgs
Black white ip.
Domain string
domain.
InstanceId string
instance id.
Ip string
ip address.
Protocol string
protocol.
Type string
IP type, value [black(blacklist IP), white(whitelist IP)].
antiddosCcBlackWhiteIpId String
ID of the resource.
blackWhiteIp AntiddosCcBlackWhiteIpBlackWhiteIp
Black white ip.
domain String
domain.
instanceId String
instance id.
ip String
ip address.
protocol String
protocol.
type String
IP type, value [black(blacklist IP), white(whitelist IP)].
antiddosCcBlackWhiteIpId string
ID of the resource.
blackWhiteIp AntiddosCcBlackWhiteIpBlackWhiteIp
Black white ip.
domain string
domain.
instanceId string
instance id.
ip string
ip address.
protocol string
protocol.
type string
IP type, value [black(blacklist IP), white(whitelist IP)].
antiddos_cc_black_white_ip_id str
ID of the resource.
black_white_ip AntiddosCcBlackWhiteIpBlackWhiteIpArgs
Black white ip.
domain str
domain.
instance_id str
instance id.
ip str
ip address.
protocol str
protocol.
type str
IP type, value [black(blacklist IP), white(whitelist IP)].
antiddosCcBlackWhiteIpId String
ID of the resource.
blackWhiteIp Property Map
Black white ip.
domain String
domain.
instanceId String
instance id.
ip String
ip address.
protocol String
protocol.
type String
IP type, value [black(blacklist IP), white(whitelist IP)].

Supporting Types

AntiddosCcBlackWhiteIpBlackWhiteIp
, AntiddosCcBlackWhiteIpBlackWhiteIpArgs

Ip This property is required. string
ip address.
Mask This property is required. double
ip mask.
Ip This property is required. string
ip address.
Mask This property is required. float64
ip mask.
ip This property is required. String
ip address.
mask This property is required. Double
ip mask.
ip This property is required. string
ip address.
mask This property is required. number
ip mask.
ip This property is required. str
ip address.
mask This property is required. float
ip mask.
ip This property is required. String
ip address.
mask This property is required. Number
ip mask.

Import

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

$ pulumi import tencentcloud:index/antiddosCcBlackWhiteIp:AntiddosCcBlackWhiteIp cc_black_white_ip ${instanceId}#${policyId}#${instanceIp}#${domain}#${protocol}
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.