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

tencentcloud.CfwAddressTemplate

Explore with Pulumi AI

Provides a resource to create a cfw address_template

Example Usage

If type is 1

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

const example = new tencentcloud.CfwAddressTemplate("example", {
    detail: "test template",
    ipString: "1.1.1.1,2.2.2.2",
    type: 1,
});
Copy
import pulumi
import pulumi_tencentcloud as tencentcloud

example = tencentcloud.CfwAddressTemplate("example",
    detail="test template",
    ip_string="1.1.1.1,2.2.2.2",
    type=1)
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.NewCfwAddressTemplate(ctx, "example", &tencentcloud.CfwAddressTemplateArgs{
			Detail:   pulumi.String("test template"),
			IpString: pulumi.String("1.1.1.1,2.2.2.2"),
			Type:     pulumi.Float64(1),
		})
		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 example = new Tencentcloud.CfwAddressTemplate("example", new()
    {
        Detail = "test template",
        IpString = "1.1.1.1,2.2.2.2",
        Type = 1,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.CfwAddressTemplate;
import com.pulumi.tencentcloud.CfwAddressTemplateArgs;
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 example = new CfwAddressTemplate("example", CfwAddressTemplateArgs.builder()
            .detail("test template")
            .ipString("1.1.1.1,2.2.2.2")
            .type(1)
            .build());

    }
}
Copy
resources:
  example:
    type: tencentcloud:CfwAddressTemplate
    properties:
      detail: test template
      ipString: 1.1.1.1,2.2.2.2
      type: 1
Copy

If type is 5

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

const example = new tencentcloud.CfwAddressTemplate("example", {
    detail: "test template",
    ipString: "www.qq.com,www.tencent.com",
    type: 5,
});
Copy
import pulumi
import pulumi_tencentcloud as tencentcloud

example = tencentcloud.CfwAddressTemplate("example",
    detail="test template",
    ip_string="www.qq.com,www.tencent.com",
    type=5)
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.NewCfwAddressTemplate(ctx, "example", &tencentcloud.CfwAddressTemplateArgs{
			Detail:   pulumi.String("test template"),
			IpString: pulumi.String("www.qq.com,www.tencent.com"),
			Type:     pulumi.Float64(5),
		})
		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 example = new Tencentcloud.CfwAddressTemplate("example", new()
    {
        Detail = "test template",
        IpString = "www.qq.com,www.tencent.com",
        Type = 5,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.CfwAddressTemplate;
import com.pulumi.tencentcloud.CfwAddressTemplateArgs;
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 example = new CfwAddressTemplate("example", CfwAddressTemplateArgs.builder()
            .detail("test template")
            .ipString("www.qq.com,www.tencent.com")
            .type(5)
            .build());

    }
}
Copy
resources:
  example:
    type: tencentcloud:CfwAddressTemplate
    properties:
      detail: test template
      ipString: www.qq.com,www.tencent.com
      type: 5
Copy

Create CfwAddressTemplate Resource

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

Constructor syntax

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

@overload
def CfwAddressTemplate(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       detail: Optional[str] = None,
                       ip_string: Optional[str] = None,
                       type: Optional[float] = None,
                       cfw_address_template_id: Optional[str] = None,
                       name: Optional[str] = None)
func NewCfwAddressTemplate(ctx *Context, name string, args CfwAddressTemplateArgs, opts ...ResourceOption) (*CfwAddressTemplate, error)
public CfwAddressTemplate(string name, CfwAddressTemplateArgs args, CustomResourceOptions? opts = null)
public CfwAddressTemplate(String name, CfwAddressTemplateArgs args)
public CfwAddressTemplate(String name, CfwAddressTemplateArgs args, CustomResourceOptions options)
type: tencentcloud:CfwAddressTemplate
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. CfwAddressTemplateArgs
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. CfwAddressTemplateArgs
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. CfwAddressTemplateArgs
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. CfwAddressTemplateArgs
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. CfwAddressTemplateArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

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

Detail This property is required. string
Template Detail.
IpString This property is required. string
Type is 1, ip template eg: 1.1.1.1,2.2.2.2; Type is 5, domain name template eg: www.qq.com, www.tencent.com.
Type This property is required. double
1: ip template; 5: domain name templates.
CfwAddressTemplateId string
ID of the resource.
Name string
Template name.
Detail This property is required. string
Template Detail.
IpString This property is required. string
Type is 1, ip template eg: 1.1.1.1,2.2.2.2; Type is 5, domain name template eg: www.qq.com, www.tencent.com.
Type This property is required. float64
1: ip template; 5: domain name templates.
CfwAddressTemplateId string
ID of the resource.
Name string
Template name.
detail This property is required. String
Template Detail.
ipString This property is required. String
Type is 1, ip template eg: 1.1.1.1,2.2.2.2; Type is 5, domain name template eg: www.qq.com, www.tencent.com.
type This property is required. Double
1: ip template; 5: domain name templates.
cfwAddressTemplateId String
ID of the resource.
name String
Template name.
detail This property is required. string
Template Detail.
ipString This property is required. string
Type is 1, ip template eg: 1.1.1.1,2.2.2.2; Type is 5, domain name template eg: www.qq.com, www.tencent.com.
type This property is required. number
1: ip template; 5: domain name templates.
cfwAddressTemplateId string
ID of the resource.
name string
Template name.
detail This property is required. str
Template Detail.
ip_string This property is required. str
Type is 1, ip template eg: 1.1.1.1,2.2.2.2; Type is 5, domain name template eg: www.qq.com, www.tencent.com.
type This property is required. float
1: ip template; 5: domain name templates.
cfw_address_template_id str
ID of the resource.
name str
Template name.
detail This property is required. String
Template Detail.
ipString This property is required. String
Type is 1, ip template eg: 1.1.1.1,2.2.2.2; Type is 5, domain name template eg: www.qq.com, www.tencent.com.
type This property is required. Number
1: ip template; 5: domain name templates.
cfwAddressTemplateId String
ID of the resource.
name String
Template name.

Outputs

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

Get an existing CfwAddressTemplate 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?: CfwAddressTemplateState, opts?: CustomResourceOptions): CfwAddressTemplate
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        cfw_address_template_id: Optional[str] = None,
        detail: Optional[str] = None,
        ip_string: Optional[str] = None,
        name: Optional[str] = None,
        type: Optional[float] = None) -> CfwAddressTemplate
func GetCfwAddressTemplate(ctx *Context, name string, id IDInput, state *CfwAddressTemplateState, opts ...ResourceOption) (*CfwAddressTemplate, error)
public static CfwAddressTemplate Get(string name, Input<string> id, CfwAddressTemplateState? state, CustomResourceOptions? opts = null)
public static CfwAddressTemplate get(String name, Output<String> id, CfwAddressTemplateState state, CustomResourceOptions options)
resources:  _:    type: tencentcloud:CfwAddressTemplate    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:
CfwAddressTemplateId string
ID of the resource.
Detail string
Template Detail.
IpString string
Type is 1, ip template eg: 1.1.1.1,2.2.2.2; Type is 5, domain name template eg: www.qq.com, www.tencent.com.
Name string
Template name.
Type double
1: ip template; 5: domain name templates.
CfwAddressTemplateId string
ID of the resource.
Detail string
Template Detail.
IpString string
Type is 1, ip template eg: 1.1.1.1,2.2.2.2; Type is 5, domain name template eg: www.qq.com, www.tencent.com.
Name string
Template name.
Type float64
1: ip template; 5: domain name templates.
cfwAddressTemplateId String
ID of the resource.
detail String
Template Detail.
ipString String
Type is 1, ip template eg: 1.1.1.1,2.2.2.2; Type is 5, domain name template eg: www.qq.com, www.tencent.com.
name String
Template name.
type Double
1: ip template; 5: domain name templates.
cfwAddressTemplateId string
ID of the resource.
detail string
Template Detail.
ipString string
Type is 1, ip template eg: 1.1.1.1,2.2.2.2; Type is 5, domain name template eg: www.qq.com, www.tencent.com.
name string
Template name.
type number
1: ip template; 5: domain name templates.
cfw_address_template_id str
ID of the resource.
detail str
Template Detail.
ip_string str
Type is 1, ip template eg: 1.1.1.1,2.2.2.2; Type is 5, domain name template eg: www.qq.com, www.tencent.com.
name str
Template name.
type float
1: ip template; 5: domain name templates.
cfwAddressTemplateId String
ID of the resource.
detail String
Template Detail.
ipString String
Type is 1, ip template eg: 1.1.1.1,2.2.2.2; Type is 5, domain name template eg: www.qq.com, www.tencent.com.
name String
Template name.
type Number
1: ip template; 5: domain name templates.

Import

cfw address_template can be imported using the id, e.g.

$ pulumi import tencentcloud:index/cfwAddressTemplate:CfwAddressTemplate example mb_1300846651_1695611353900
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.