1. Packages
  2. Volcengine
  3. API Docs
  4. waf
  5. HostGroup
Volcengine v0.0.34 published on Wednesday, Jul 2, 2025 by Volcengine

volcengine.waf.HostGroup

Explore with Pulumi AI

volcengine logo
Volcengine v0.0.34 published on Wednesday, Jul 2, 2025 by Volcengine

    Provides a resource to manage waf host group

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as volcengine from "@volcengine/pulumi";
    
    const foo = new volcengine.waf.HostGroup("foo", {
        description: "tf-test",
        hostLists: ["www.tf-test.com"],
    });
    
    import pulumi
    import pulumi_volcengine as volcengine
    
    foo = volcengine.waf.HostGroup("foo",
        description="tf-test",
        host_lists=["www.tf-test.com"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/waf"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := waf.NewHostGroup(ctx, "foo", &waf.HostGroupArgs{
    			Description: pulumi.String("tf-test"),
    			HostLists: pulumi.StringArray{
    				pulumi.String("www.tf-test.com"),
    			},
    		})
    		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.Waf.HostGroup("foo", new()
        {
            Description = "tf-test",
            HostLists = new[]
            {
                "www.tf-test.com",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.volcengine.waf.HostGroup;
    import com.pulumi.volcengine.waf.HostGroupArgs;
    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 HostGroup("foo", HostGroupArgs.builder()        
                .description("tf-test")
                .hostLists("www.tf-test.com")
                .build());
    
        }
    }
    
    resources:
      foo:
        type: volcengine:waf:HostGroup
        properties:
          description: tf-test
          hostLists:
            - www.tf-test.com
    

    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,
                  action: Optional[str] = None,
                  description: Optional[str] = None,
                  name: 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: volcengine:waf:HostGroup
    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 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 volcengineHostGroupResource = new Volcengine.Waf.HostGroup("volcengineHostGroupResource", new()
    {
        HostLists = new[]
        {
            "string",
        },
        Action = "string",
        Description = "string",
        Name = "string",
        ProjectName = "string",
    });
    
    example, err := waf.NewHostGroup(ctx, "volcengineHostGroupResource", &waf.HostGroupArgs{
    	HostLists: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Action:      pulumi.String("string"),
    	Description: pulumi.String("string"),
    	Name:        pulumi.String("string"),
    	ProjectName: pulumi.String("string"),
    })
    
    var volcengineHostGroupResource = new com.pulumi.volcengine.waf.HostGroup("volcengineHostGroupResource", com.pulumi.volcengine.waf.HostGroupArgs.builder()
        .hostLists("string")
        .action("string")
        .description("string")
        .name("string")
        .projectName("string")
        .build());
    
    volcengine_host_group_resource = volcengine.waf.HostGroup("volcengineHostGroupResource",
        host_lists=["string"],
        action="string",
        description="string",
        name="string",
        project_name="string")
    
    const volcengineHostGroupResource = new volcengine.waf.HostGroup("volcengineHostGroupResource", {
        hostLists: ["string"],
        action: "string",
        description: "string",
        name: "string",
        projectName: "string",
    });
    
    type: volcengine:waf:HostGroup
    properties:
        action: string
        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>
    Domain names that need to be added to this domain name group.
    Action string
    Domain name list modification action. Works only on modified scenes.
    Description string
    Domain name group description.
    Name string
    The name of the domain name group.
    ProjectName string
    The project of Domain name group.
    HostLists []string
    Domain names that need to be added to this domain name group.
    Action string
    Domain name list modification action. Works only on modified scenes.
    Description string
    Domain name group description.
    Name string
    The name of the domain name group.
    ProjectName string
    The project of Domain name group.
    hostLists List<String>
    Domain names that need to be added to this domain name group.
    action String
    Domain name list modification action. Works only on modified scenes.
    description String
    Domain name group description.
    name String
    The name of the domain name group.
    projectName String
    The project of Domain name group.
    hostLists string[]
    Domain names that need to be added to this domain name group.
    action string
    Domain name list modification action. Works only on modified scenes.
    description string
    Domain name group description.
    name string
    The name of the domain name group.
    projectName string
    The project of Domain name group.
    host_lists Sequence[str]
    Domain names that need to be added to this domain name group.
    action str
    Domain name list modification action. Works only on modified scenes.
    description str
    Domain name group description.
    name str
    The name of the domain name group.
    project_name str
    The project of Domain name group.
    hostLists List<String>
    Domain names that need to be added to this domain name group.
    action String
    Domain name list modification action. Works only on modified scenes.
    description String
    Domain name group description.
    name String
    The name of the domain name group.
    projectName String
    The project of Domain name group.

    Outputs

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

    HostCount int
    The number of domain names contained in the domain name group.
    HostGroupId int
    The ID of the domain name group.
    Id string
    The provider-assigned unique ID for this managed resource.
    RelatedRules List<HostGroupRelatedRule>
    The list of associated rules.
    UpdateTime string
    Domain name group update time.
    HostCount int
    The number of domain names contained in the domain name group.
    HostGroupId int
    The ID of the domain name group.
    Id string
    The provider-assigned unique ID for this managed resource.
    RelatedRules []HostGroupRelatedRule
    The list of associated rules.
    UpdateTime string
    Domain name group update time.
    hostCount Integer
    The number of domain names contained in the domain name group.
    hostGroupId Integer
    The ID of the domain name group.
    id String
    The provider-assigned unique ID for this managed resource.
    relatedRules List<HostGroupRelatedRule>
    The list of associated rules.
    updateTime String
    Domain name group update time.
    hostCount number
    The number of domain names contained in the domain name group.
    hostGroupId number
    The ID of the domain name group.
    id string
    The provider-assigned unique ID for this managed resource.
    relatedRules HostGroupRelatedRule[]
    The list of associated rules.
    updateTime string
    Domain name group update time.
    host_count int
    The number of domain names contained in the domain name group.
    host_group_id int
    The ID of the domain name group.
    id str
    The provider-assigned unique ID for this managed resource.
    related_rules Sequence[HostGroupRelatedRule]
    The list of associated rules.
    update_time str
    Domain name group update time.
    hostCount Number
    The number of domain names contained in the domain name group.
    hostGroupId Number
    The ID of the domain name group.
    id String
    The provider-assigned unique ID for this managed resource.
    relatedRules List<Property Map>
    The list of associated rules.
    updateTime String
    Domain name 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,
            action: Optional[str] = None,
            description: Optional[str] = None,
            host_count: Optional[int] = None,
            host_group_id: Optional[int] = 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: volcengine:waf:HostGroup    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:
    Action string
    Domain name list modification action. Works only on modified scenes.
    Description string
    Domain name group description.
    HostCount int
    The number of domain names contained in the domain name group.
    HostGroupId int
    The ID of the domain name group.
    HostLists List<string>
    Domain names that need to be added to this domain name group.
    Name string
    The name of the domain name group.
    ProjectName string
    The project of Domain name group.
    RelatedRules List<HostGroupRelatedRule>
    The list of associated rules.
    UpdateTime string
    Domain name group update time.
    Action string
    Domain name list modification action. Works only on modified scenes.
    Description string
    Domain name group description.
    HostCount int
    The number of domain names contained in the domain name group.
    HostGroupId int
    The ID of the domain name group.
    HostLists []string
    Domain names that need to be added to this domain name group.
    Name string
    The name of the domain name group.
    ProjectName string
    The project of Domain name group.
    RelatedRules []HostGroupRelatedRuleArgs
    The list of associated rules.
    UpdateTime string
    Domain name group update time.
    action String
    Domain name list modification action. Works only on modified scenes.
    description String
    Domain name group description.
    hostCount Integer
    The number of domain names contained in the domain name group.
    hostGroupId Integer
    The ID of the domain name group.
    hostLists List<String>
    Domain names that need to be added to this domain name group.
    name String
    The name of the domain name group.
    projectName String
    The project of Domain name group.
    relatedRules List<HostGroupRelatedRule>
    The list of associated rules.
    updateTime String
    Domain name group update time.
    action string
    Domain name list modification action. Works only on modified scenes.
    description string
    Domain name group description.
    hostCount number
    The number of domain names contained in the domain name group.
    hostGroupId number
    The ID of the domain name group.
    hostLists string[]
    Domain names that need to be added to this domain name group.
    name string
    The name of the domain name group.
    projectName string
    The project of Domain name group.
    relatedRules HostGroupRelatedRule[]
    The list of associated rules.
    updateTime string
    Domain name group update time.
    action str
    Domain name list modification action. Works only on modified scenes.
    description str
    Domain name group description.
    host_count int
    The number of domain names contained in the domain name group.
    host_group_id int
    The ID of the domain name group.
    host_lists Sequence[str]
    Domain names that need to be added to this domain name group.
    name str
    The name of the domain name group.
    project_name str
    The project of Domain name group.
    related_rules Sequence[HostGroupRelatedRuleArgs]
    The list of associated rules.
    update_time str
    Domain name group update time.
    action String
    Domain name list modification action. Works only on modified scenes.
    description String
    Domain name group description.
    hostCount Number
    The number of domain names contained in the domain name group.
    hostGroupId Number
    The ID of the domain name group.
    hostLists List<String>
    Domain names that need to be added to this domain name group.
    name String
    The name of the domain name group.
    projectName String
    The project of Domain name group.
    relatedRules List<Property Map>
    The list of associated rules.
    updateTime String
    Domain name group update time.

    Supporting Types

    HostGroupRelatedRule, HostGroupRelatedRuleArgs

    RuleName string
    The name of the rule.
    RuleTag string
    The ID of the rule.
    RuleType string
    The type of the rule.
    RuleName string
    The name of the rule.
    RuleTag string
    The ID of the rule.
    RuleType string
    The type of the rule.
    ruleName String
    The name of the rule.
    ruleTag String
    The ID of the rule.
    ruleType String
    The type of the rule.
    ruleName string
    The name of the rule.
    ruleTag string
    The ID of the rule.
    ruleType string
    The type of the rule.
    rule_name str
    The name of the rule.
    rule_tag str
    The ID of the rule.
    rule_type str
    The type of the rule.
    ruleName String
    The name of the rule.
    ruleTag String
    The ID of the rule.
    ruleType String
    The type of the rule.

    Import

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

    $ pulumi import volcengine:waf/hostGroup:HostGroup 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.34 published on Wednesday, Jul 2, 2025 by Volcengine