Cloudflare

v4.13.0 published on Monday, Nov 28, 2022 by Pulumi

getDevices

Use this data source to lookup Devices.

Example Usage

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

return await Deployment.RunAsync(() => 
{
    var devices = Cloudflare.GetDevices.Invoke(new()
    {
        AccountId = "c68973221045fe805dfb9aa520153148",
    });

});
package main

import (
	"github.com/pulumi/pulumi-cloudflare/sdk/v4/go/cloudflare"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err = cloudflare.GetDevices(ctx, &GetDevicesArgs{
			AccountId: "c68973221045fe805dfb9aa520153148",
		}, 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.cloudflare.CloudflareFunctions;
import com.pulumi.cloudflare.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 devices = CloudflareFunctions.getDevices(GetDevicesArgs.builder()
            .accountId("c68973221045fe805dfb9aa520153148")
            .build());

    }
}
import pulumi
import pulumi_cloudflare as cloudflare

devices = cloudflare.get_devices(account_id="c68973221045fe805dfb9aa520153148")
import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";

const devices = cloudflare.getDevices({
    accountId: "c68973221045fe805dfb9aa520153148",
});
variables:
  devices:
    fn::invoke:
      Function: cloudflare:getDevices
      Arguments:
        accountId: c68973221045fe805dfb9aa520153148

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(account_id: Optional[str] = None,
                opts: Optional[InvokeOptions] = None) -> GetDevicesResult
def get_devices_output(account_id: 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: cloudflare:index/getDevices:getDevices
  arguments:
    # arguments dictionary

The following arguments are supported:

AccountId string

The account for which to list the devices.

AccountId string

The account for which to list the devices.

accountId String

The account for which to list the devices.

accountId string

The account for which to list the devices.

account_id str

The account for which to list the devices.

accountId String

The account for which to list the devices.

getDevices Result

The following output properties are available:

AccountId string
Devices List<GetDevicesDevice>

A list of device object. See below for nested attributes.

Id string

The provider-assigned unique ID for this managed resource.

AccountId string
Devices []GetDevicesDevice

A list of device object. See below for nested attributes.

Id string

The provider-assigned unique ID for this managed resource.

accountId String
devices List<GetDevicesDevice>

A list of device object. See below for nested attributes.

id String

The provider-assigned unique ID for this managed resource.

accountId string
devices GetDevicesDevice[]

A list of device object. See below for nested attributes.

id string

The provider-assigned unique ID for this managed resource.

account_id str
devices Sequence[GetDevicesDevice]

A list of device object. See below for nested attributes.

id str

The provider-assigned unique ID for this managed resource.

accountId String
devices List<Property Map>

A list of device object. See below for nested attributes.

id String

The provider-assigned unique ID for this managed resource.

Supporting Types

GetDevicesDevice

Created string

When the device was created.

DeviceType string

The type of the device.

Id string

Device ID.

Ip string

IPv4 or IPv6 address.

Key string

The device's public key.

LastSeen string

When the device was last seen.

Model string

The device model name.

Name string

The device name.

OsDistroName string
OsDistroRevision string
OsVersion string

The operating system version.

Updated string

When the device was updated.

UserEmail string

User's email.

UserId string

User's ID.

UserName string

User's Name.

Version string

The WARP client version.

Created string

When the device was created.

DeviceType string

The type of the device.

Id string

Device ID.

Ip string

IPv4 or IPv6 address.

Key string

The device's public key.

LastSeen string

When the device was last seen.

Model string

The device model name.

Name string

The device name.

OsDistroName string
OsDistroRevision string
OsVersion string

The operating system version.

Updated string

When the device was updated.

UserEmail string

User's email.

UserId string

User's ID.

UserName string

User's Name.

Version string

The WARP client version.

created String

When the device was created.

deviceType String

The type of the device.

id String

Device ID.

ip String

IPv4 or IPv6 address.

key String

The device's public key.

lastSeen String

When the device was last seen.

model String

The device model name.

name String

The device name.

osDistroName String
osDistroRevision String
osVersion String

The operating system version.

updated String

When the device was updated.

userEmail String

User's email.

userId String

User's ID.

userName String

User's Name.

version String

The WARP client version.

created string

When the device was created.

deviceType string

The type of the device.

id string

Device ID.

ip string

IPv4 or IPv6 address.

key string

The device's public key.

lastSeen string

When the device was last seen.

model string

The device model name.

name string

The device name.

osDistroName string
osDistroRevision string
osVersion string

The operating system version.

updated string

When the device was updated.

userEmail string

User's email.

userId string

User's ID.

userName string

User's Name.

version string

The WARP client version.

created str

When the device was created.

device_type str

The type of the device.

id str

Device ID.

ip str

IPv4 or IPv6 address.

key str

The device's public key.

last_seen str

When the device was last seen.

model str

The device model name.

name str

The device name.

os_distro_name str
os_distro_revision str
os_version str

The operating system version.

updated str

When the device was updated.

user_email str

User's email.

user_id str

User's ID.

user_name str

User's Name.

version str

The WARP client version.

created String

When the device was created.

deviceType String

The type of the device.

id String

Device ID.

ip String

IPv4 or IPv6 address.

key String

The device's public key.

lastSeen String

When the device was last seen.

model String

The device model name.

name String

The device name.

osDistroName String
osDistroRevision String
osVersion String

The operating system version.

updated String

When the device was updated.

userEmail String

User's email.

userId String

User's ID.

userName String

User's Name.

version String

The WARP client version.

Package Details

Repository
https://github.com/pulumi/pulumi-cloudflare
License
Apache-2.0
Notes

This Pulumi package is based on the cloudflare Terraform Provider.