1. Packages
  2. Packages
  3. Bytepluscc Provider
  4. API Docs
  5. waf
  6. HostGroup
Viewing docs for bytepluscc v0.0.39
published on Thursday, Jul 9, 2026 by Byteplus
bytepluscc logo
Viewing docs for bytepluscc v0.0.39
published on Thursday, Jul 9, 2026 by Byteplus

    Domain groups are used for centralized management of multiple domains. You can batch associate rules and manage them collectively.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as bytepluscc from "@byteplus/pulumi-bytepluscc";
    
    const example = new bytepluscc.waf.HostGroup("Example", {
        description: "测试域名组描述",
        projectName: "default",
        hostLists: ["www.testwaf.com"],
        name: "test-host-group-full",
    });
    
    import pulumi
    import pulumi_bytepluscc as bytepluscc
    
    example = bytepluscc.waf.HostGroup("Example",
        description="测试域名组描述",
        project_name="default",
        host_lists=["www.testwaf.com"],
        name="test-host-group-full")
    
    package main
    
    import (
    	"github.com/byteplus-sdk/pulumi-bytepluscc/sdk/go/bytepluscc/waf"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := waf.NewHostGroup(ctx, "Example", &waf.HostGroupArgs{
    			Description: pulumi.String("测试域名组描述"),
    			ProjectName: pulumi.String("default"),
    			HostLists: pulumi.StringArray{
    				pulumi.String("www.testwaf.com"),
    			},
    			Name: pulumi.String("test-host-group-full"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Bytepluscc = Byteplus.Pulumi.Bytepluscc;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Bytepluscc.Waf.HostGroup("Example", new()
        {
            Description = "测试域名组描述",
            ProjectName = "default",
            HostLists = new[]
            {
                "www.testwaf.com",
            },
            Name = "test-host-group-full",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.byteplus.bytepluscc.waf.HostGroup;
    import com.byteplus.bytepluscc.waf.HostGroupArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    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 HostGroup("example", HostGroupArgs.builder()
                .description("测试域名组描述")
                .projectName("default")
                .hostLists("www.testwaf.com")
                .name("test-host-group-full")
                .build());
    
        }
    }
    
    resources:
      example:
        type: bytepluscc:waf:HostGroup
        name: Example
        properties:
          description: 测试域名组描述
          projectName: default
          hostLists:
            - www.testwaf.com
          name: test-host-group-full
    
    pulumi {
      required_providers {
        bytepluscc = {
          source = "pulumi/bytepluscc"
        }
      }
    }
    
    resource "bytepluscc_waf_hostgroup" "Example" {
      description  = "测试域名组描述"
      project_name = "default"
      host_lists   = ["www.testwaf.com"]
      name         = "test-host-group-full"
    }
    

    Create HostGroup Resource

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

    Constructor syntax

    new HostGroup(name: string, args: HostGroupArgs, opts?: CustomResourceOptions);
    @overload
    def HostGroup(resource_name: str,
                  args: HostGroupArgs,
                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def HostGroup(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  host_lists: Optional[Sequence[str]] = None,
                  name: Optional[str] = None,
                  description: Optional[str] = None,
                  project_name: Optional[str] = None)
    func NewHostGroup(ctx *Context, name string, args HostGroupArgs, opts ...ResourceOption) (*HostGroup, error)
    public HostGroup(string name, HostGroupArgs args, CustomResourceOptions? opts = null)
    public HostGroup(String name, HostGroupArgs args)
    public HostGroup(String name, HostGroupArgs args, CustomResourceOptions options)
    
    type: bytepluscc:waf:HostGroup
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "bytepluscc_waf_hostgroup" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args HostGroupArgs
    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 HostGroupArgs
    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 HostGroupArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args HostGroupArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args HostGroupArgs
    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 byteplusccHostGroupResource = new Bytepluscc.Waf.HostGroup("byteplusccHostGroupResource", new()
    {
        HostLists = new[]
        {
            "string",
        },
        Name = "string",
        Description = "string",
        ProjectName = "string",
    });
    
    example, err := waf.NewHostGroup(ctx, "byteplusccHostGroupResource", &waf.HostGroupArgs{
    	HostLists: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Name:        pulumi.String("string"),
    	Description: pulumi.String("string"),
    	ProjectName: pulumi.String("string"),
    })
    
    resource "bytepluscc_waf_hostgroup" "byteplusccHostGroupResource" {
      host_lists   = ["string"]
      name         = "string"
      description  = "string"
      project_name = "string"
    }
    
    var byteplusccHostGroupResource = new com.byteplus.bytepluscc.waf.HostGroup("byteplusccHostGroupResource", com.byteplus.bytepluscc.waf.HostGroupArgs.builder()
        .hostLists("string")
        .name("string")
        .description("string")
        .projectName("string")
        .build());
    
    bytepluscc_host_group_resource = bytepluscc.waf.HostGroup("byteplusccHostGroupResource",
        host_lists=["string"],
        name="string",
        description="string",
        project_name="string")
    
    const byteplusccHostGroupResource = new bytepluscc.waf.HostGroup("byteplusccHostGroupResource", {
        hostLists: ["string"],
        name: "string",
        description: "string",
        projectName: "string",
    });
    
    type: bytepluscc:waf:HostGroup
    properties:
        description: string
        hostLists:
            - string
        name: string
        projectName: string
    

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

    HostLists List<string>
    Domains in the domain group. The list can be filtered by the first element.
    Name string
    Domain group name.
    Description string
    Domain group description.
    ProjectName string
    Project name.
    HostLists []string
    Domains in the domain group. The list can be filtered by the first element.
    Name string
    Domain group name.
    Description string
    Domain group description.
    ProjectName string
    Project name.
    host_lists list(string)
    Domains in the domain group. The list can be filtered by the first element.
    name string
    Domain group name.
    description string
    Domain group description.
    project_name string
    Project name.
    hostLists List<String>
    Domains in the domain group. The list can be filtered by the first element.
    name String
    Domain group name.
    description String
    Domain group description.
    projectName String
    Project name.
    hostLists string[]
    Domains in the domain group. The list can be filtered by the first element.
    name string
    Domain group name.
    description string
    Domain group description.
    projectName string
    Project name.
    host_lists Sequence[str]
    Domains in the domain group. The list can be filtered by the first element.
    name str
    Domain group name.
    description str
    Domain group description.
    project_name str
    Project name.
    hostLists List<String>
    Domains in the domain group. The list can be filtered by the first element.
    name String
    Domain group name.
    description String
    Domain group description.
    projectName String
    Project name.

    Outputs

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

    HostCount int
    Number of domains in the domain group.
    HostGroupId string
    Domain group ID.
    Id string
    The provider-assigned unique ID for this managed resource.
    RelatedRules List<Byteplus.HostGroupRelatedRule>
    Associated rule list. Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
    UpdateTime string
    Domain group update time.
    HostCount int
    Number of domains in the domain group.
    HostGroupId string
    Domain group ID.
    Id string
    The provider-assigned unique ID for this managed resource.
    RelatedRules []HostGroupRelatedRule
    Associated rule list. Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
    UpdateTime string
    Domain group update time.
    host_count number
    Number of domains in the domain group.
    host_group_id string
    Domain group ID.
    id string
    The provider-assigned unique ID for this managed resource.
    related_rules list(object)
    Associated rule list. Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
    update_time string
    Domain group update time.
    hostCount Integer
    Number of domains in the domain group.
    hostGroupId String
    Domain group ID.
    id String
    The provider-assigned unique ID for this managed resource.
    relatedRules List<HostGroupRelatedRule>
    Associated rule list. Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
    updateTime String
    Domain group update time.
    hostCount number
    Number of domains in the domain group.
    hostGroupId string
    Domain group ID.
    id string
    The provider-assigned unique ID for this managed resource.
    relatedRules HostGroupRelatedRule[]
    Associated rule list. Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
    updateTime string
    Domain group update time.
    host_count int
    Number of domains in the domain group.
    host_group_id str
    Domain group ID.
    id str
    The provider-assigned unique ID for this managed resource.
    related_rules Sequence[HostGroupRelatedRule]
    Associated rule list. Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
    update_time str
    Domain group update time.
    hostCount Number
    Number of domains in the domain group.
    hostGroupId String
    Domain group ID.
    id String
    The provider-assigned unique ID for this managed resource.
    relatedRules List<Property Map>
    Associated rule list. Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
    updateTime String
    Domain group update time.

    Look up Existing HostGroup Resource

    Get an existing HostGroup 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?: HostGroupState, opts?: CustomResourceOptions): HostGroup
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            description: Optional[str] = None,
            host_count: Optional[int] = None,
            host_group_id: Optional[str] = None,
            host_lists: Optional[Sequence[str]] = None,
            name: Optional[str] = None,
            project_name: Optional[str] = None,
            related_rules: Optional[Sequence[HostGroupRelatedRuleArgs]] = None,
            update_time: Optional[str] = None) -> HostGroup
    func GetHostGroup(ctx *Context, name string, id IDInput, state *HostGroupState, opts ...ResourceOption) (*HostGroup, error)
    public static HostGroup Get(string name, Input<string> id, HostGroupState? state, CustomResourceOptions? opts = null)
    public static HostGroup get(String name, Output<String> id, HostGroupState state, CustomResourceOptions options)
    resources:  _:    type: bytepluscc:waf:HostGroup    get:      id: ${id}
    import {
      to = bytepluscc_waf_hostgroup.example
      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:
    Description string
    Domain group description.
    HostCount int
    Number of domains in the domain group.
    HostGroupId string
    Domain group ID.
    HostLists List<string>
    Domains in the domain group. The list can be filtered by the first element.
    Name string
    Domain group name.
    ProjectName string
    Project name.
    RelatedRules List<Byteplus.HostGroupRelatedRule>
    Associated rule list. Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
    UpdateTime string
    Domain group update time.
    Description string
    Domain group description.
    HostCount int
    Number of domains in the domain group.
    HostGroupId string
    Domain group ID.
    HostLists []string
    Domains in the domain group. The list can be filtered by the first element.
    Name string
    Domain group name.
    ProjectName string
    Project name.
    RelatedRules []HostGroupRelatedRuleArgs
    Associated rule list. Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
    UpdateTime string
    Domain group update time.
    description string
    Domain group description.
    host_count number
    Number of domains in the domain group.
    host_group_id string
    Domain group ID.
    host_lists list(string)
    Domains in the domain group. The list can be filtered by the first element.
    name string
    Domain group name.
    project_name string
    Project name.
    related_rules list(object)
    Associated rule list. Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
    update_time string
    Domain group update time.
    description String
    Domain group description.
    hostCount Integer
    Number of domains in the domain group.
    hostGroupId String
    Domain group ID.
    hostLists List<String>
    Domains in the domain group. The list can be filtered by the first element.
    name String
    Domain group name.
    projectName String
    Project name.
    relatedRules List<HostGroupRelatedRule>
    Associated rule list. Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
    updateTime String
    Domain group update time.
    description string
    Domain group description.
    hostCount number
    Number of domains in the domain group.
    hostGroupId string
    Domain group ID.
    hostLists string[]
    Domains in the domain group. The list can be filtered by the first element.
    name string
    Domain group name.
    projectName string
    Project name.
    relatedRules HostGroupRelatedRule[]
    Associated rule list. Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
    updateTime string
    Domain group update time.
    description str
    Domain group description.
    host_count int
    Number of domains in the domain group.
    host_group_id str
    Domain group ID.
    host_lists Sequence[str]
    Domains in the domain group. The list can be filtered by the first element.
    name str
    Domain group name.
    project_name str
    Project name.
    related_rules Sequence[HostGroupRelatedRuleArgs]
    Associated rule list. Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
    update_time str
    Domain group update time.
    description String
    Domain group description.
    hostCount Number
    Number of domains in the domain group.
    hostGroupId String
    Domain group ID.
    hostLists List<String>
    Domains in the domain group. The list can be filtered by the first element.
    name String
    Domain group name.
    projectName String
    Project name.
    relatedRules List<Property Map>
    Associated rule list. Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
    updateTime String
    Domain group update time.

    Supporting Types

    HostGroupRelatedRule, HostGroupRelatedRuleArgs

    RuleName string
    Rule name.
    RuleTag string
    Rule ID.
    RuleType string
    Rule type. Allow indicates an allowlist, Block indicates a blocklist.
    RuleName string
    Rule name.
    RuleTag string
    Rule ID.
    RuleType string
    Rule type. Allow indicates an allowlist, Block indicates a blocklist.
    rule_name string
    Rule name.
    rule_tag string
    Rule ID.
    rule_type string
    Rule type. Allow indicates an allowlist, Block indicates a blocklist.
    ruleName String
    Rule name.
    ruleTag String
    Rule ID.
    ruleType String
    Rule type. Allow indicates an allowlist, Block indicates a blocklist.
    ruleName string
    Rule name.
    ruleTag string
    Rule ID.
    ruleType string
    Rule type. Allow indicates an allowlist, Block indicates a blocklist.
    rule_name str
    Rule name.
    rule_tag str
    Rule ID.
    rule_type str
    Rule type. Allow indicates an allowlist, Block indicates a blocklist.
    ruleName String
    Rule name.
    ruleTag String
    Rule ID.
    ruleType String
    Rule type. Allow indicates an allowlist, Block indicates a blocklist.

    Import

    $ pulumi import bytepluscc:waf/hostGroup:HostGroup example "host_group_id"
    

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

    Package Details

    Repository
    bytepluscc byteplus-sdk/pulumi-bytepluscc
    License
    MPL-2.0
    Notes
    This Pulumi package is based on the bytepluscc Terraform Provider.
    bytepluscc logo
    Viewing docs for bytepluscc v0.0.39
    published on Thursday, Jul 9, 2026 by Byteplus

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial