published on Thursday, Jul 9, 2026 by Byteplus
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:
- 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.
- Host
Lists []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.
- 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.
- 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.
- host
Lists 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.
- 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.
- 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.
Outputs
All input properties are implicitly available as output properties. Additionally, the HostGroup resource produces the following output properties:
- Host
Count int - Number of domains in the domain group.
- Host
Group stringId - Domain group ID.
- Id string
- The provider-assigned unique ID for this managed resource.
-
List<Byteplus.
Host Group Related Rule> - 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.
- Host
Count int - Number of domains in the domain group.
- Host
Group stringId - Domain group ID.
- Id string
- The provider-assigned unique ID for this managed resource.
-
[]Host
Group Related Rule - 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.
- host_
count number - Number of domains in the domain group.
- host_
group_ stringid - Domain group ID.
- id string
- The provider-assigned unique ID for this managed resource.
- 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.
- host
Count Integer - Number of domains in the domain group.
- host
Group StringId - Domain group ID.
- id String
- The provider-assigned unique ID for this managed resource.
-
List<Host
Group Related Rule> - 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.
- host
Count number - Number of domains in the domain group.
- host
Group stringId - Domain group ID.
- id string
- The provider-assigned unique ID for this managed resource.
-
Host
Group Related Rule[] - 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.
- host_
count int - Number of domains in the domain group.
- host_
group_ strid - Domain group ID.
- id str
- The provider-assigned unique ID for this managed resource.
-
Sequence[Host
Group Related Rule] - 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.
- host
Count Number - Number of domains in the domain group.
- host
Group StringId - Domain group ID.
- id String
- The provider-assigned unique ID for this managed resource.
- 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.
- update
Time 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) -> HostGroupfunc 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.
- Description string
- Domain group description.
- Host
Count int - Number of domains in the domain group.
- Host
Group stringId - 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.
-
List<Byteplus.
Host Group Related Rule> - 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.
- Host
Count int - Number of domains in the domain group.
- Host
Group stringId - Domain group ID.
- Host
Lists []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.
-
[]Host
Group Related Rule Args - 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.
- host_
count number - Number of domains in the domain group.
- host_
group_ stringid - 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.
- 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.
- host
Count Integer - Number of domains in the domain group.
- host
Group StringId - 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.
-
List<Host
Group Related Rule> - 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.
- host
Count number - Number of domains in the domain group.
- host
Group stringId - Domain group ID.
- host
Lists 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.
-
Host
Group Related Rule[] - 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 str
- Domain group description.
- host_
count int - Number of domains in the domain group.
- host_
group_ strid - 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.
-
Sequence[Host
Group Related Rule Args] - 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.
- host
Count Number - Number of domains in the domain group.
- host
Group StringId - 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.
- 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.
- update
Time String - Domain group update time.
Supporting Types
HostGroupRelatedRule, HostGroupRelatedRuleArgs
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
byteplusccTerraform Provider.
published on Thursday, Jul 9, 2026 by Byteplus