1. Packages
  2. Unifi
  3. API Docs
  4. iam
  5. Group
Unifi v0.1.1 published on Wednesday, Jan 1, 2025 by Pulumiverse

unifi.iam.Group

Explore with Pulumi AI

unifi.iam.Group manages a user group (called “client group” in the UI), which can be used to limit bandwidth for groups of users.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as unifi from "@pulumiverse/unifi";

const wifi = new unifi.iam.Group("wifi", {
    name: "wifi",
    qosRateMaxDown: 2000,
    qosRateMaxUp: 10,
});
Copy
import pulumi
import pulumiverse_unifi as unifi

wifi = unifi.iam.Group("wifi",
    name="wifi",
    qos_rate_max_down=2000,
    qos_rate_max_up=10)
Copy
package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumiverse/pulumi-unifi/sdk/go/unifi/iam"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := iam.NewGroup(ctx, "wifi", &iam.GroupArgs{
			Name:           pulumi.String("wifi"),
			QosRateMaxDown: pulumi.Int(2000),
			QosRateMaxUp:   pulumi.Int(10),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Unifi = Pulumiverse.Unifi;

return await Deployment.RunAsync(() => 
{
    var wifi = new Unifi.IAM.Group("wifi", new()
    {
        Name = "wifi",
        QosRateMaxDown = 2000,
        QosRateMaxUp = 10,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.unifi.iam.Group;
import com.pulumi.unifi.iam.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) {
        var wifi = new Group("wifi", GroupArgs.builder()
            .name("wifi")
            .qosRateMaxDown(2000)
            .qosRateMaxUp(10)
            .build());

    }
}
Copy
resources:
  wifi:
    type: unifi:iam:Group
    properties:
      name: wifi
      qosRateMaxDown: 2000 # 2mbps
      qosRateMaxUp: 10 # 10kbps
Copy

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: Optional[GroupArgs] = None,
          opts: Optional[ResourceOptions] = None)

@overload
def Group(resource_name: str,
          opts: Optional[ResourceOptions] = None,
          name: Optional[str] = None,
          qos_rate_max_down: Optional[int] = None,
          qos_rate_max_up: Optional[int] = None,
          site: Optional[str] = None)
func NewGroup(ctx *Context, name string, args *GroupArgs, opts ...ResourceOption) (*Group, error)
public Group(string name, GroupArgs? args = null, CustomResourceOptions? opts = null)
public Group(String name, GroupArgs args)
public Group(String name, GroupArgs args, CustomResourceOptions options)
type: unifi:iam:Group
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. 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 This property is required. 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 This property is required. 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 This property is required. 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 This property is required. String
The unique name of the resource.
args This property is required. 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 unifiGroupResource = new Unifi.IAM.Group("unifiGroupResource", new()
{
    Name = "string",
    QosRateMaxDown = 0,
    QosRateMaxUp = 0,
    Site = "string",
});
Copy
example, err := iam.NewGroup(ctx, "unifiGroupResource", &iam.GroupArgs{
	Name:           pulumi.String("string"),
	QosRateMaxDown: pulumi.Int(0),
	QosRateMaxUp:   pulumi.Int(0),
	Site:           pulumi.String("string"),
})
Copy
var unifiGroupResource = new Group("unifiGroupResource", GroupArgs.builder()
    .name("string")
    .qosRateMaxDown(0)
    .qosRateMaxUp(0)
    .site("string")
    .build());
Copy
unifi_group_resource = unifi.iam.Group("unifiGroupResource",
    name="string",
    qos_rate_max_down=0,
    qos_rate_max_up=0,
    site="string")
Copy
const unifiGroupResource = new unifi.iam.Group("unifiGroupResource", {
    name: "string",
    qosRateMaxDown: 0,
    qosRateMaxUp: 0,
    site: "string",
});
Copy
type: unifi:iam:Group
properties:
    name: string
    qosRateMaxDown: 0
    qosRateMaxUp: 0
    site: string
Copy

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

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The Group resource accepts the following input properties:

Name string
The name of the user group.
QosRateMaxDown int
The QOS maximum download rate. Defaults to -1.
QosRateMaxUp int
The QOS maximum upload rate. Defaults to -1.
Site Changes to this property will trigger replacement. string
The name of the site to associate the user group with.
Name string
The name of the user group.
QosRateMaxDown int
The QOS maximum download rate. Defaults to -1.
QosRateMaxUp int
The QOS maximum upload rate. Defaults to -1.
Site Changes to this property will trigger replacement. string
The name of the site to associate the user group with.
name String
The name of the user group.
qosRateMaxDown Integer
The QOS maximum download rate. Defaults to -1.
qosRateMaxUp Integer
The QOS maximum upload rate. Defaults to -1.
site Changes to this property will trigger replacement. String
The name of the site to associate the user group with.
name string
The name of the user group.
qosRateMaxDown number
The QOS maximum download rate. Defaults to -1.
qosRateMaxUp number
The QOS maximum upload rate. Defaults to -1.
site Changes to this property will trigger replacement. string
The name of the site to associate the user group with.
name str
The name of the user group.
qos_rate_max_down int
The QOS maximum download rate. Defaults to -1.
qos_rate_max_up int
The QOS maximum upload rate. Defaults to -1.
site Changes to this property will trigger replacement. str
The name of the site to associate the user group with.
name String
The name of the user group.
qosRateMaxDown Number
The QOS maximum download rate. Defaults to -1.
qosRateMaxUp Number
The QOS maximum upload rate. Defaults to -1.
site Changes to this property will trigger replacement. String
The name of the site to associate the user 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,
        name: Optional[str] = None,
        qos_rate_max_down: Optional[int] = None,
        qos_rate_max_up: Optional[int] = None,
        site: 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)
resources:  _:    type: unifi:iam:Group    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
Name string
The name of the user group.
QosRateMaxDown int
The QOS maximum download rate. Defaults to -1.
QosRateMaxUp int
The QOS maximum upload rate. Defaults to -1.
Site Changes to this property will trigger replacement. string
The name of the site to associate the user group with.
Name string
The name of the user group.
QosRateMaxDown int
The QOS maximum download rate. Defaults to -1.
QosRateMaxUp int
The QOS maximum upload rate. Defaults to -1.
Site Changes to this property will trigger replacement. string
The name of the site to associate the user group with.
name String
The name of the user group.
qosRateMaxDown Integer
The QOS maximum download rate. Defaults to -1.
qosRateMaxUp Integer
The QOS maximum upload rate. Defaults to -1.
site Changes to this property will trigger replacement. String
The name of the site to associate the user group with.
name string
The name of the user group.
qosRateMaxDown number
The QOS maximum download rate. Defaults to -1.
qosRateMaxUp number
The QOS maximum upload rate. Defaults to -1.
site Changes to this property will trigger replacement. string
The name of the site to associate the user group with.
name str
The name of the user group.
qos_rate_max_down int
The QOS maximum download rate. Defaults to -1.
qos_rate_max_up int
The QOS maximum upload rate. Defaults to -1.
site Changes to this property will trigger replacement. str
The name of the site to associate the user group with.
name String
The name of the user group.
qosRateMaxDown Number
The QOS maximum download rate. Defaults to -1.
qosRateMaxUp Number
The QOS maximum upload rate. Defaults to -1.
site Changes to this property will trigger replacement. String
The name of the site to associate the user group with.

Import

import using the ID

$ pulumi import unifi:iam/group:Group wifi 5fe6261995fe130013456a36
Copy

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

Package Details

Repository
unifi pulumiverse/pulumi-unifi
License
Apache-2.0
Notes
This Pulumi package is based on the unifi Terraform Provider.