1. Packages
  2. Zscaler Internet Access (ZIA)
  3. API Docs
  4. getDevices
Zscaler Internet Access v0.0.7 published on Tuesday, Jul 30, 2024 by Zscaler

zia.getDevices

Explore with Pulumi AI

zia logo
Zscaler Internet Access v0.0.7 published on Tuesday, Jul 30, 2024 by Zscaler

    Use the zia_devices data source to get information about a device 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

    import * as pulumi from "@pulumi/pulumi";
    import * as zia from "@pulumi/zia";
    
    const device = zia.getDevices({
        name: "administrator",
    });
    
    import pulumi
    import pulumi_zia as zia
    
    device = zia.get_devices(name="administrator")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/zscaler/pulumi-zia/sdk/go/zia"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := zia.GetDevices(ctx, &zia.GetDevicesArgs{
    			Name: pulumi.StringRef("administrator"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Zia = Pulumi.Zia;
    
    return await Deployment.RunAsync(() => 
    {
        var device = Zia.GetDevices.Invoke(new()
        {
            Name = "administrator",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.zia.ZiaFunctions;
    import com.pulumi.zia.inputs.GetDevicesArgs;
    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 device = ZiaFunctions.getDevices(GetDevicesArgs.builder()
                .name("administrator")
                .build());
    
        }
    }
    
    variables:
      device:
        fn::invoke:
          Function: zia:getDevices
          Arguments:
            name: administrator
    

    Using getDevices

    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 getDevices(args: GetDevicesArgs, opts?: InvokeOptions): Promise<GetDevicesResult>
    function getDevicesOutput(args: GetDevicesOutputArgs, opts?: InvokeOptions): Output<GetDevicesResult>
    def get_devices(device_group_type: Optional[str] = None,
                    device_model: Optional[str] = None,
                    hostname: Optional[str] = None,
                    name: Optional[str] = None,
                    os_type: Optional[str] = None,
                    os_version: Optional[str] = None,
                    owner_name: Optional[str] = None,
                    opts: Optional[InvokeOptions] = None) -> GetDevicesResult
    def get_devices_output(device_group_type: Optional[pulumi.Input[str]] = None,
                    device_model: Optional[pulumi.Input[str]] = None,
                    hostname: Optional[pulumi.Input[str]] = None,
                    name: Optional[pulumi.Input[str]] = None,
                    os_type: Optional[pulumi.Input[str]] = None,
                    os_version: Optional[pulumi.Input[str]] = None,
                    owner_name: Optional[pulumi.Input[str]] = None,
                    opts: Optional[InvokeOptions] = None) -> Output[GetDevicesResult]
    func GetDevices(ctx *Context, args *GetDevicesArgs, opts ...InvokeOption) (*GetDevicesResult, error)
    func GetDevicesOutput(ctx *Context, args *GetDevicesOutputArgs, opts ...InvokeOption) GetDevicesResultOutput

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

    public static class GetDevices 
    {
        public static Task<GetDevicesResult> InvokeAsync(GetDevicesArgs args, InvokeOptions? opts = null)
        public static Output<GetDevicesResult> Invoke(GetDevicesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetDevicesResult> getDevices(GetDevicesArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: zia:index/getDevices:getDevices
      arguments:
        # arguments dictionary

    The following arguments are supported:

    DeviceGroupType string
    (String) The device group type. i.e ZCC_OS, NON_ZCC, CBI
    DeviceModel string
    (String) The device model.
    Hostname string
    Name string
    The name of the devices to be exported.
    OsType string
    (String) The operating system (OS). ANY, OTHER_OS, IOS, ANDROID_OS, WINDOWS_OS, MAC_OS, LINUX
    OsVersion string
    (String) The operating system version.
    OwnerName string
    (String) The device owner's user name.
    DeviceGroupType string
    (String) The device group type. i.e ZCC_OS, NON_ZCC, CBI
    DeviceModel string
    (String) The device model.
    Hostname string
    Name string
    The name of the devices to be exported.
    OsType string
    (String) The operating system (OS). ANY, OTHER_OS, IOS, ANDROID_OS, WINDOWS_OS, MAC_OS, LINUX
    OsVersion string
    (String) The operating system version.
    OwnerName string
    (String) The device owner's user name.
    deviceGroupType String
    (String) The device group type. i.e ZCC_OS, NON_ZCC, CBI
    deviceModel String
    (String) The device model.
    hostname String
    name String
    The name of the devices to be exported.
    osType String
    (String) The operating system (OS). ANY, OTHER_OS, IOS, ANDROID_OS, WINDOWS_OS, MAC_OS, LINUX
    osVersion String
    (String) The operating system version.
    ownerName String
    (String) The device owner's user name.
    deviceGroupType string
    (String) The device group type. i.e ZCC_OS, NON_ZCC, CBI
    deviceModel string
    (String) The device model.
    hostname string
    name string
    The name of the devices to be exported.
    osType string
    (String) The operating system (OS). ANY, OTHER_OS, IOS, ANDROID_OS, WINDOWS_OS, MAC_OS, LINUX
    osVersion string
    (String) The operating system version.
    ownerName string
    (String) The device owner's user name.
    device_group_type str
    (String) The device group type. i.e ZCC_OS, NON_ZCC, CBI
    device_model str
    (String) The device model.
    hostname str
    name str
    The name of the devices to be exported.
    os_type str
    (String) The operating system (OS). ANY, OTHER_OS, IOS, ANDROID_OS, WINDOWS_OS, MAC_OS, LINUX
    os_version str
    (String) The operating system version.
    owner_name str
    (String) The device owner's user name.
    deviceGroupType String
    (String) The device group type. i.e ZCC_OS, NON_ZCC, CBI
    deviceModel String
    (String) The device model.
    hostname String
    name String
    The name of the devices to be exported.
    osType String
    (String) The operating system (OS). ANY, OTHER_OS, IOS, ANDROID_OS, WINDOWS_OS, MAC_OS, LINUX
    osVersion String
    (String) The operating system version.
    ownerName String
    (String) The device owner's user name.

    getDevices Result

    The following output properties are available:

    Description string
    (String) The device's description.
    DeviceGroupType string
    (String) The device group type. i.e ZCC_OS, NON_ZCC, CBI
    DeviceModel string
    (String) The device model.
    Hostname string
    Id int
    (String) The unique identifer for the device group.
    Name string
    (String) The device name.
    OsType string
    (String) The operating system (OS). ANY, OTHER_OS, IOS, ANDROID_OS, WINDOWS_OS, MAC_OS, LINUX
    OsVersion string
    (String) The operating system version.
    OwnerName string
    (String) The device owner's user name.
    OwnerUserId int
    (int) The unique identifier of the device owner (i.e., user).
    Description string
    (String) The device's description.
    DeviceGroupType string
    (String) The device group type. i.e ZCC_OS, NON_ZCC, CBI
    DeviceModel string
    (String) The device model.
    Hostname string
    Id int
    (String) The unique identifer for the device group.
    Name string
    (String) The device name.
    OsType string
    (String) The operating system (OS). ANY, OTHER_OS, IOS, ANDROID_OS, WINDOWS_OS, MAC_OS, LINUX
    OsVersion string
    (String) The operating system version.
    OwnerName string
    (String) The device owner's user name.
    OwnerUserId int
    (int) The unique identifier of the device owner (i.e., user).
    description String
    (String) The device's description.
    deviceGroupType String
    (String) The device group type. i.e ZCC_OS, NON_ZCC, CBI
    deviceModel String
    (String) The device model.
    hostname String
    id Integer
    (String) The unique identifer for the device group.
    name String
    (String) The device name.
    osType String
    (String) The operating system (OS). ANY, OTHER_OS, IOS, ANDROID_OS, WINDOWS_OS, MAC_OS, LINUX
    osVersion String
    (String) The operating system version.
    ownerName String
    (String) The device owner's user name.
    ownerUserId Integer
    (int) The unique identifier of the device owner (i.e., user).
    description string
    (String) The device's description.
    deviceGroupType string
    (String) The device group type. i.e ZCC_OS, NON_ZCC, CBI
    deviceModel string
    (String) The device model.
    hostname string
    id number
    (String) The unique identifer for the device group.
    name string
    (String) The device name.
    osType string
    (String) The operating system (OS). ANY, OTHER_OS, IOS, ANDROID_OS, WINDOWS_OS, MAC_OS, LINUX
    osVersion string
    (String) The operating system version.
    ownerName string
    (String) The device owner's user name.
    ownerUserId number
    (int) The unique identifier of the device owner (i.e., user).
    description str
    (String) The device's description.
    device_group_type str
    (String) The device group type. i.e ZCC_OS, NON_ZCC, CBI
    device_model str
    (String) The device model.
    hostname str
    id int
    (String) The unique identifer for the device group.
    name str
    (String) The device name.
    os_type str
    (String) The operating system (OS). ANY, OTHER_OS, IOS, ANDROID_OS, WINDOWS_OS, MAC_OS, LINUX
    os_version str
    (String) The operating system version.
    owner_name str
    (String) The device owner's user name.
    owner_user_id int
    (int) The unique identifier of the device owner (i.e., user).
    description String
    (String) The device's description.
    deviceGroupType String
    (String) The device group type. i.e ZCC_OS, NON_ZCC, CBI
    deviceModel String
    (String) The device model.
    hostname String
    id Number
    (String) The unique identifer for the device group.
    name String
    (String) The device name.
    osType String
    (String) The operating system (OS). ANY, OTHER_OS, IOS, ANDROID_OS, WINDOWS_OS, MAC_OS, LINUX
    osVersion String
    (String) The operating system version.
    ownerName String
    (String) The device owner's user name.
    ownerUserId Number
    (int) The unique identifier of the device owner (i.e., user).

    Package Details

    Repository
    zia zscaler/pulumi-zia
    License
    MIT
    Notes
    This Pulumi package is based on the zia Terraform Provider.
    zia logo
    Zscaler Internet Access v0.0.7 published on Tuesday, Jul 30, 2024 by Zscaler