zia logo
Zscaler Internet Access v0.0.3, Jan 30 23

zia.DeviceGroups.getDeviceGroups

Use the zia_device_groups data source to get information about a device group in the Zscaler Internet Access cloud or via the API. This data source can then be associated with resources such as: URL Filtering Rules

Example Usage

using System.Collections.Generic;
using Pulumi;
using Zia = Pulumi.Zia;

return await Deployment.RunAsync(() => 
{
    var ios = Zia.DeviceGroups.GetDeviceGroups.Invoke(new()
    {
        Name = "IOS",
    });

});
package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/zscaler/pulumi-zia/sdk/go/zia/DeviceGroups"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := DeviceGroups.GetDeviceGroups(ctx, &devicegroups.GetDeviceGroupsArgs{
			Name: pulumi.StringRef("IOS"),
		}, nil)
		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.zia.DeviceGroups.DeviceGroupsFunctions;
import com.pulumi.zia.DeviceGroups.inputs.GetDeviceGroupsArgs;
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 ios = DeviceGroupsFunctions.getDeviceGroups(GetDeviceGroupsArgs.builder()
            .name("IOS")
            .build());

    }
}
import pulumi
import pulumi_zia as zia

ios = zia.DeviceGroups.get_device_groups(name="IOS")
import * as pulumi from "@pulumi/pulumi";
import * as zia from "@pulumi/zia";

const ios = zia.DeviceGroups.getDeviceGroups({
    name: "IOS",
});
variables:
  ios:
    fn::invoke:
      Function: zia:DeviceGroups:getDeviceGroups
      Arguments:
        name: IOS
using System.Collections.Generic;
using Pulumi;
using Zia = Pulumi.Zia;

return await Deployment.RunAsync(() => 
{
    var android = Zia.DeviceGroups.GetDeviceGroups.Invoke(new()
    {
        Name = "Android",
    });

});
package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/zscaler/pulumi-zia/sdk/go/zia/DeviceGroups"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := DeviceGroups.GetDeviceGroups(ctx, &devicegroups.GetDeviceGroupsArgs{
			Name: pulumi.StringRef("Android"),
		}, nil)
		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.zia.DeviceGroups.DeviceGroupsFunctions;
import com.pulumi.zia.DeviceGroups.inputs.GetDeviceGroupsArgs;
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 android = DeviceGroupsFunctions.getDeviceGroups(GetDeviceGroupsArgs.builder()
            .name("Android")
            .build());

    }
}
import pulumi
import pulumi_zia as zia

android = zia.DeviceGroups.get_device_groups(name="Android")
import * as pulumi from "@pulumi/pulumi";
import * as zia from "@pulumi/zia";

const android = zia.DeviceGroups.getDeviceGroups({
    name: "Android",
});
variables:
  android:
    fn::invoke:
      Function: zia:DeviceGroups:getDeviceGroups
      Arguments:
        name: Android

Using getDeviceGroups

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getDeviceGroups(args: GetDeviceGroupsArgs, opts?: InvokeOptions): Promise<GetDeviceGroupsResult>
function getDeviceGroupsOutput(args: GetDeviceGroupsOutputArgs, opts?: InvokeOptions): Output<GetDeviceGroupsResult>
def get_device_groups(name: Optional[str] = None,
                      opts: Optional[InvokeOptions] = None) -> GetDeviceGroupsResult
def get_device_groups_output(name: Optional[pulumi.Input[str]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetDeviceGroupsResult]
func GetDeviceGroups(ctx *Context, args *GetDeviceGroupsArgs, opts ...InvokeOption) (*GetDeviceGroupsResult, error)
func GetDeviceGroupsOutput(ctx *Context, args *GetDeviceGroupsOutputArgs, opts ...InvokeOption) GetDeviceGroupsResultOutput

> Note: This function is named GetDeviceGroups in the Go SDK.

public static class GetDeviceGroups 
{
    public static Task<GetDeviceGroupsResult> InvokeAsync(GetDeviceGroupsArgs args, InvokeOptions? opts = null)
    public static Output<GetDeviceGroupsResult> Invoke(GetDeviceGroupsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetDeviceGroupsResult> getDeviceGroups(GetDeviceGroupsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: zia:DeviceGroups/getDeviceGroups:getDeviceGroups
  arguments:
    # arguments dictionary

The following arguments are supported:

Name string

The name of the device group to be exported.

Name string

The name of the device group to be exported.

name String

The name of the device group to be exported.

name string

The name of the device group to be exported.

name str

The name of the device group to be exported.

name String

The name of the device group to be exported.

getDeviceGroups Result

The following output properties are available:

Description string

(String) The device group's description.

DeviceCount int

(int) The number of devices within the group.

DeviceNames string

(String) The names of devices that belong to the device group. The device names are comma-separated.

GroupType string

(String) The device group type. i.e ZCC_OS, NON_ZCC, CBI

Id int

(String) The unique identifer for the device group.

OsType string

(String) The operating system (OS).

Predefined bool

(Boolean) Indicates whether this is a predefined device group. If this value is set to true, the group is predefined.

Name string

(String) The device group name.

Description string

(String) The device group's description.

DeviceCount int

(int) The number of devices within the group.

DeviceNames string

(String) The names of devices that belong to the device group. The device names are comma-separated.

GroupType string

(String) The device group type. i.e ZCC_OS, NON_ZCC, CBI

Id int

(String) The unique identifer for the device group.

OsType string

(String) The operating system (OS).

Predefined bool

(Boolean) Indicates whether this is a predefined device group. If this value is set to true, the group is predefined.

Name string

(String) The device group name.

description String

(String) The device group's description.

deviceCount Integer

(int) The number of devices within the group.

deviceNames String

(String) The names of devices that belong to the device group. The device names are comma-separated.

groupType String

(String) The device group type. i.e ZCC_OS, NON_ZCC, CBI

id Integer

(String) The unique identifer for the device group.

osType String

(String) The operating system (OS).

predefined Boolean

(Boolean) Indicates whether this is a predefined device group. If this value is set to true, the group is predefined.

name String

(String) The device group name.

description string

(String) The device group's description.

deviceCount number

(int) The number of devices within the group.

deviceNames string

(String) The names of devices that belong to the device group. The device names are comma-separated.

groupType string

(String) The device group type. i.e ZCC_OS, NON_ZCC, CBI

id number

(String) The unique identifer for the device group.

osType string

(String) The operating system (OS).

predefined boolean

(Boolean) Indicates whether this is a predefined device group. If this value is set to true, the group is predefined.

name string

(String) The device group name.

description str

(String) The device group's description.

device_count int

(int) The number of devices within the group.

device_names str

(String) The names of devices that belong to the device group. The device names are comma-separated.

group_type str

(String) The device group type. i.e ZCC_OS, NON_ZCC, CBI

id int

(String) The unique identifer for the device group.

os_type str

(String) The operating system (OS).

predefined bool

(Boolean) Indicates whether this is a predefined device group. If this value is set to true, the group is predefined.

name str

(String) The device group name.

description String

(String) The device group's description.

deviceCount Number

(int) The number of devices within the group.

deviceNames String

(String) The names of devices that belong to the device group. The device names are comma-separated.

groupType String

(String) The device group type. i.e ZCC_OS, NON_ZCC, CBI

id Number

(String) The unique identifer for the device group.

osType String

(String) The operating system (OS).

predefined Boolean

(Boolean) Indicates whether this is a predefined device group. If this value is set to true, the group is predefined.

name String

(String) The device group name.

Package Details

Repository
zia zscaler/pulumi-zia
License
MIT
Notes

This Pulumi package is based on the zia Terraform Provider.