1. Packages
  2. Volcengine
  3. API Docs
  4. cloud_firewall
  5. CfwAddressBook
Volcengine v0.0.29 published on Tuesday, Apr 29, 2025 by Volcengine

volcengine.cloud_firewall.CfwAddressBook

Explore with Pulumi AI

volcengine logo
Volcengine v0.0.29 published on Tuesday, Apr 29, 2025 by Volcengine

    Provides a resource to manage cfw address book

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as volcengine from "@volcengine/pulumi";
    
    const foo = new volcengine.cloud_firewall.CfwAddressBook("foo", {
        addressLists: [
            "192.168.1.1",
            "192.168.2.2",
        ],
        description: "acc-test",
        groupName: "acc-test-address-book",
        groupType: "ip",
    });
    
    import pulumi
    import pulumi_volcengine as volcengine
    
    foo = volcengine.cloud_firewall.CfwAddressBook("foo",
        address_lists=[
            "192.168.1.1",
            "192.168.2.2",
        ],
        description="acc-test",
        group_name="acc-test-address-book",
        group_type="ip")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/cloud_firewall"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := cloud_firewall.NewCfwAddressBook(ctx, "foo", &cloud_firewall.CfwAddressBookArgs{
    			AddressLists: pulumi.StringArray{
    				pulumi.String("192.168.1.1"),
    				pulumi.String("192.168.2.2"),
    			},
    			Description: pulumi.String("acc-test"),
    			GroupName:   pulumi.String("acc-test-address-book"),
    			GroupType:   pulumi.String("ip"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Volcengine = Pulumi.Volcengine;
    
    return await Deployment.RunAsync(() => 
    {
        var foo = new Volcengine.Cloud_firewall.CfwAddressBook("foo", new()
        {
            AddressLists = new[]
            {
                "192.168.1.1",
                "192.168.2.2",
            },
            Description = "acc-test",
            GroupName = "acc-test-address-book",
            GroupType = "ip",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.volcengine.cloud_firewall.CfwAddressBook;
    import com.pulumi.volcengine.cloud_firewall.CfwAddressBookArgs;
    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 foo = new CfwAddressBook("foo", CfwAddressBookArgs.builder()        
                .addressLists(            
                    "192.168.1.1",
                    "192.168.2.2")
                .description("acc-test")
                .groupName("acc-test-address-book")
                .groupType("ip")
                .build());
    
        }
    }
    
    resources:
      foo:
        type: volcengine:cloud_firewall:CfwAddressBook
        properties:
          addressLists:
            - 192.168.1.1
            - 192.168.2.2
          description: acc-test
          groupName: acc-test-address-book
          groupType: ip
    

    Create CfwAddressBook Resource

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

    Constructor syntax

    new CfwAddressBook(name: string, args: CfwAddressBookArgs, opts?: CustomResourceOptions);
    @overload
    def CfwAddressBook(resource_name: str,
                       args: CfwAddressBookArgs,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def CfwAddressBook(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       address_lists: Optional[Sequence[str]] = None,
                       group_name: Optional[str] = None,
                       group_type: Optional[str] = None,
                       description: Optional[str] = None)
    func NewCfwAddressBook(ctx *Context, name string, args CfwAddressBookArgs, opts ...ResourceOption) (*CfwAddressBook, error)
    public CfwAddressBook(string name, CfwAddressBookArgs args, CustomResourceOptions? opts = null)
    public CfwAddressBook(String name, CfwAddressBookArgs args)
    public CfwAddressBook(String name, CfwAddressBookArgs args, CustomResourceOptions options)
    
    type: volcengine:cloud_firewall:CfwAddressBook
    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 CfwAddressBookArgs
    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 CfwAddressBookArgs
    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 CfwAddressBookArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args CfwAddressBookArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args CfwAddressBookArgs
    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 cfwAddressBookResource = new Volcengine.Cloud_firewall.CfwAddressBook("cfwAddressBookResource", new()
    {
        AddressLists = new[]
        {
            "string",
        },
        GroupName = "string",
        GroupType = "string",
        Description = "string",
    });
    
    example, err := cloud_firewall.NewCfwAddressBook(ctx, "cfwAddressBookResource", &cloud_firewall.CfwAddressBookArgs{
    	AddressLists: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	GroupName:   pulumi.String("string"),
    	GroupType:   pulumi.String("string"),
    	Description: pulumi.String("string"),
    })
    
    var cfwAddressBookResource = new CfwAddressBook("cfwAddressBookResource", CfwAddressBookArgs.builder()
        .addressLists("string")
        .groupName("string")
        .groupType("string")
        .description("string")
        .build());
    
    cfw_address_book_resource = volcengine.cloud_firewall.CfwAddressBook("cfwAddressBookResource",
        address_lists=["string"],
        group_name="string",
        group_type="string",
        description="string")
    
    const cfwAddressBookResource = new volcengine.cloud_firewall.CfwAddressBook("cfwAddressBookResource", {
        addressLists: ["string"],
        groupName: "string",
        groupType: "string",
        description: "string",
    });
    
    type: volcengine:cloud_firewall:CfwAddressBook
    properties:
        addressLists:
            - string
        description: string
        groupName: string
        groupType: string
    

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

    AddressLists List<string>
    The address list of the address book. When group_type is ip, fill in IPv4/CIDRV4 addresses in the address list. When group_type is port, fill in the port information in the address list, supporting two formats: 22 and 100/200. When group_type is domain, fill in the domain name information in the address list.
    GroupName string
    The name of the address book.
    GroupType string
    The type of the address book. Valid values: ip, port, domain.
    Description string
    The description of the address book.
    AddressLists []string
    The address list of the address book. When group_type is ip, fill in IPv4/CIDRV4 addresses in the address list. When group_type is port, fill in the port information in the address list, supporting two formats: 22 and 100/200. When group_type is domain, fill in the domain name information in the address list.
    GroupName string
    The name of the address book.
    GroupType string
    The type of the address book. Valid values: ip, port, domain.
    Description string
    The description of the address book.
    addressLists List<String>
    The address list of the address book. When group_type is ip, fill in IPv4/CIDRV4 addresses in the address list. When group_type is port, fill in the port information in the address list, supporting two formats: 22 and 100/200. When group_type is domain, fill in the domain name information in the address list.
    groupName String
    The name of the address book.
    groupType String
    The type of the address book. Valid values: ip, port, domain.
    description String
    The description of the address book.
    addressLists string[]
    The address list of the address book. When group_type is ip, fill in IPv4/CIDRV4 addresses in the address list. When group_type is port, fill in the port information in the address list, supporting two formats: 22 and 100/200. When group_type is domain, fill in the domain name information in the address list.
    groupName string
    The name of the address book.
    groupType string
    The type of the address book. Valid values: ip, port, domain.
    description string
    The description of the address book.
    address_lists Sequence[str]
    The address list of the address book. When group_type is ip, fill in IPv4/CIDRV4 addresses in the address list. When group_type is port, fill in the port information in the address list, supporting two formats: 22 and 100/200. When group_type is domain, fill in the domain name information in the address list.
    group_name str
    The name of the address book.
    group_type str
    The type of the address book. Valid values: ip, port, domain.
    description str
    The description of the address book.
    addressLists List<String>
    The address list of the address book. When group_type is ip, fill in IPv4/CIDRV4 addresses in the address list. When group_type is port, fill in the port information in the address list, supporting two formats: 22 and 100/200. When group_type is domain, fill in the domain name information in the address list.
    groupName String
    The name of the address book.
    groupType String
    The type of the address book. Valid values: ip, port, domain.
    description String
    The description of the address book.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the CfwAddressBook resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    RefCnt int
    The reference count of the address book.
    Id string
    The provider-assigned unique ID for this managed resource.
    RefCnt int
    The reference count of the address book.
    id String
    The provider-assigned unique ID for this managed resource.
    refCnt Integer
    The reference count of the address book.
    id string
    The provider-assigned unique ID for this managed resource.
    refCnt number
    The reference count of the address book.
    id str
    The provider-assigned unique ID for this managed resource.
    ref_cnt int
    The reference count of the address book.
    id String
    The provider-assigned unique ID for this managed resource.
    refCnt Number
    The reference count of the address book.

    Look up Existing CfwAddressBook Resource

    Get an existing CfwAddressBook 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?: CfwAddressBookState, opts?: CustomResourceOptions): CfwAddressBook
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            address_lists: Optional[Sequence[str]] = None,
            description: Optional[str] = None,
            group_name: Optional[str] = None,
            group_type: Optional[str] = None,
            ref_cnt: Optional[int] = None) -> CfwAddressBook
    func GetCfwAddressBook(ctx *Context, name string, id IDInput, state *CfwAddressBookState, opts ...ResourceOption) (*CfwAddressBook, error)
    public static CfwAddressBook Get(string name, Input<string> id, CfwAddressBookState? state, CustomResourceOptions? opts = null)
    public static CfwAddressBook get(String name, Output<String> id, CfwAddressBookState state, CustomResourceOptions options)
    resources:  _:    type: volcengine:cloud_firewall:CfwAddressBook    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.
    The following state arguments are supported:
    AddressLists List<string>
    The address list of the address book. When group_type is ip, fill in IPv4/CIDRV4 addresses in the address list. When group_type is port, fill in the port information in the address list, supporting two formats: 22 and 100/200. When group_type is domain, fill in the domain name information in the address list.
    Description string
    The description of the address book.
    GroupName string
    The name of the address book.
    GroupType string
    The type of the address book. Valid values: ip, port, domain.
    RefCnt int
    The reference count of the address book.
    AddressLists []string
    The address list of the address book. When group_type is ip, fill in IPv4/CIDRV4 addresses in the address list. When group_type is port, fill in the port information in the address list, supporting two formats: 22 and 100/200. When group_type is domain, fill in the domain name information in the address list.
    Description string
    The description of the address book.
    GroupName string
    The name of the address book.
    GroupType string
    The type of the address book. Valid values: ip, port, domain.
    RefCnt int
    The reference count of the address book.
    addressLists List<String>
    The address list of the address book. When group_type is ip, fill in IPv4/CIDRV4 addresses in the address list. When group_type is port, fill in the port information in the address list, supporting two formats: 22 and 100/200. When group_type is domain, fill in the domain name information in the address list.
    description String
    The description of the address book.
    groupName String
    The name of the address book.
    groupType String
    The type of the address book. Valid values: ip, port, domain.
    refCnt Integer
    The reference count of the address book.
    addressLists string[]
    The address list of the address book. When group_type is ip, fill in IPv4/CIDRV4 addresses in the address list. When group_type is port, fill in the port information in the address list, supporting two formats: 22 and 100/200. When group_type is domain, fill in the domain name information in the address list.
    description string
    The description of the address book.
    groupName string
    The name of the address book.
    groupType string
    The type of the address book. Valid values: ip, port, domain.
    refCnt number
    The reference count of the address book.
    address_lists Sequence[str]
    The address list of the address book. When group_type is ip, fill in IPv4/CIDRV4 addresses in the address list. When group_type is port, fill in the port information in the address list, supporting two formats: 22 and 100/200. When group_type is domain, fill in the domain name information in the address list.
    description str
    The description of the address book.
    group_name str
    The name of the address book.
    group_type str
    The type of the address book. Valid values: ip, port, domain.
    ref_cnt int
    The reference count of the address book.
    addressLists List<String>
    The address list of the address book. When group_type is ip, fill in IPv4/CIDRV4 addresses in the address list. When group_type is port, fill in the port information in the address list, supporting two formats: 22 and 100/200. When group_type is domain, fill in the domain name information in the address list.
    description String
    The description of the address book.
    groupName String
    The name of the address book.
    groupType String
    The type of the address book. Valid values: ip, port, domain.
    refCnt Number
    The reference count of the address book.

    Import

    AddressBook can be imported using the id, e.g.

    $ pulumi import volcengine:cloud_firewall/cfwAddressBook:CfwAddressBook default resource_id
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    volcengine volcengine/pulumi-volcengine
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the volcengine Terraform Provider.
    volcengine logo
    Volcengine v0.0.29 published on Tuesday, Apr 29, 2025 by Volcengine