1. Packages
  2. Unifi
  3. API Docs
  4. firewall
  5. Group
Unifi v0.0.3 published on Monday, Dec 5, 2022 by Pulumiverse

unifi.firewall.Group

Explore with Pulumi AI

unifi logo
Unifi v0.0.3 published on Monday, Dec 5, 2022 by Pulumiverse

    unifi.firewall.Group manages groups of addresses or ports for use in firewall rules (unifi.firewall.Rule).

    Example Usage

    using System.Collections.Generic;
    using Pulumi;
    using Unifi = Pulumiverse.Unifi;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var laptopIps = config.RequireObject<dynamic>("laptopIps");
        var canPrint = new Unifi.Firewall.Group("canPrint", new()
        {
            Type = "address-group",
            Members = laptopIps,
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    	"github.com/pulumiverse/pulumi-unifi/sdk/go/unifi/firewall"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		laptopIps := cfg.Require("laptopIps")
    		_, err := firewall.NewGroup(ctx, "canPrint", &firewall.GroupArgs{
    			Type:    pulumi.String("address-group"),
    			Members: laptopIps,
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.unifi.firewall.Group;
    import com.pulumi.unifi.firewall.GroupArgs;
    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) {
            final var config = ctx.config();
            final var laptopIps = config.get("laptopIps");
            var canPrint = new Group("canPrint", GroupArgs.builder()        
                .type("address-group")
                .members(laptopIps)
                .build());
    
        }
    }
    
    import pulumi
    import pulumiverse_unifi as unifi
    
    config = pulumi.Config()
    laptop_ips = config.require_object("laptopIps")
    can_print = unifi.firewall.Group("canPrint",
        type="address-group",
        members=laptop_ips)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as unifi from "@pulumiverse/unifi";
    
    const config = new pulumi.Config();
    const laptopIps = config.requireObject("laptopIps");
    const canPrint = new unifi.firewall.Group("canPrint", {
        type: "address-group",
        members: laptopIps,
    });
    
    configuration:
      laptopIps:
        type: list(string)
    resources:
      canPrint:
        type: unifi:firewall:Group
        properties:
          type: address-group
          members: ${laptopIps}
    

    Create Group Resource

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

    Constructor syntax

    new Group(name: string, args: GroupArgs, opts?: CustomResourceOptions);
    @overload
    def Group(resource_name: str,
              args: GroupArgs,
              opts: Optional[ResourceOptions] = None)
    
    @overload
    def Group(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              members: Optional[Sequence[str]] = None,
              type: Optional[str] = None,
              name: Optional[str] = None,
              site: Optional[str] = None)
    func NewGroup(ctx *Context, name string, args GroupArgs, opts ...ResourceOption) (*Group, error)
    public Group(string name, GroupArgs args, CustomResourceOptions? opts = null)
    public Group(String name, GroupArgs args)
    public Group(String name, GroupArgs args, CustomResourceOptions options)
    
    type: unifi:firewall:Group
    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 GroupArgs
    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 GroupArgs
    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 GroupArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args GroupArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args GroupArgs
    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 groupResource = new Unifi.Firewall.Group("groupResource", new()
    {
        Members = new[]
        {
            "string",
        },
        Type = "string",
        Name = "string",
        Site = "string",
    });
    
    example, err := firewall.NewGroup(ctx, "groupResource", &firewall.GroupArgs{
    	Members: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Type: pulumi.String("string"),
    	Name: pulumi.String("string"),
    	Site: pulumi.String("string"),
    })
    
    var groupResource = new Group("groupResource", GroupArgs.builder()
        .members("string")
        .type("string")
        .name("string")
        .site("string")
        .build());
    
    group_resource = unifi.firewall.Group("groupResource",
        members=["string"],
        type="string",
        name="string",
        site="string")
    
    const groupResource = new unifi.firewall.Group("groupResource", {
        members: ["string"],
        type: "string",
        name: "string",
        site: "string",
    });
    
    type: unifi:firewall:Group
    properties:
        members:
            - string
        name: string
        site: string
        type: string
    

    Group Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The Group resource accepts the following input properties:

    Members List<string>
    The members of the firewall group.
    Type string
    The type of the firewall group. Must be one of: address-group, port-group, or ipv6-address-group.
    Name string
    The name of the firewall group.
    Site string
    The name of the site to associate the firewall group with.
    Members []string
    The members of the firewall group.
    Type string
    The type of the firewall group. Must be one of: address-group, port-group, or ipv6-address-group.
    Name string
    The name of the firewall group.
    Site string
    The name of the site to associate the firewall group with.
    members List<String>
    The members of the firewall group.
    type String
    The type of the firewall group. Must be one of: address-group, port-group, or ipv6-address-group.
    name String
    The name of the firewall group.
    site String
    The name of the site to associate the firewall group with.
    members string[]
    The members of the firewall group.
    type string
    The type of the firewall group. Must be one of: address-group, port-group, or ipv6-address-group.
    name string
    The name of the firewall group.
    site string
    The name of the site to associate the firewall group with.
    members Sequence[str]
    The members of the firewall group.
    type str
    The type of the firewall group. Must be one of: address-group, port-group, or ipv6-address-group.
    name str
    The name of the firewall group.
    site str
    The name of the site to associate the firewall group with.
    members List<String>
    The members of the firewall group.
    type String
    The type of the firewall group. Must be one of: address-group, port-group, or ipv6-address-group.
    name String
    The name of the firewall group.
    site String
    The name of the site to associate the firewall group with.

    Outputs

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

    Get an existing Group 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?: GroupState, opts?: CustomResourceOptions): Group
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            members: Optional[Sequence[str]] = None,
            name: Optional[str] = None,
            site: Optional[str] = None,
            type: Optional[str] = None) -> Group
    func GetGroup(ctx *Context, name string, id IDInput, state *GroupState, opts ...ResourceOption) (*Group, error)
    public static Group Get(string name, Input<string> id, GroupState? state, CustomResourceOptions? opts = null)
    public static Group get(String name, Output<String> id, GroupState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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:
    Members List<string>
    The members of the firewall group.
    Name string
    The name of the firewall group.
    Site string
    The name of the site to associate the firewall group with.
    Type string
    The type of the firewall group. Must be one of: address-group, port-group, or ipv6-address-group.
    Members []string
    The members of the firewall group.
    Name string
    The name of the firewall group.
    Site string
    The name of the site to associate the firewall group with.
    Type string
    The type of the firewall group. Must be one of: address-group, port-group, or ipv6-address-group.
    members List<String>
    The members of the firewall group.
    name String
    The name of the firewall group.
    site String
    The name of the site to associate the firewall group with.
    type String
    The type of the firewall group. Must be one of: address-group, port-group, or ipv6-address-group.
    members string[]
    The members of the firewall group.
    name string
    The name of the firewall group.
    site string
    The name of the site to associate the firewall group with.
    type string
    The type of the firewall group. Must be one of: address-group, port-group, or ipv6-address-group.
    members Sequence[str]
    The members of the firewall group.
    name str
    The name of the firewall group.
    site str
    The name of the site to associate the firewall group with.
    type str
    The type of the firewall group. Must be one of: address-group, port-group, or ipv6-address-group.
    members List<String>
    The members of the firewall group.
    name String
    The name of the firewall group.
    site String
    The name of the site to associate the firewall group with.
    type String
    The type of the firewall group. Must be one of: address-group, port-group, or ipv6-address-group.

    Package Details

    Repository
    unifi pulumiverse/pulumi-unifi
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the unifi Terraform Provider.
    unifi logo
    Unifi v0.0.3 published on Monday, Dec 5, 2022 by Pulumiverse