Tailscale
getDevices
The devices data source describes a list of devices in a tailnet.
Example Usage
using Pulumi;
using Tailscale = Pulumi.Tailscale;
class MyStack : Stack
{
public MyStack()
{
var sampleDevices = Output.Create(Tailscale.GetDevices.InvokeAsync(new Tailscale.GetDevicesArgs
{
NamePrefix = "example-",
}));
}
}
package main
import (
"github.com/pulumi/pulumi-tailscale/sdk/go/tailscale"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := tailscale.GetDevices(ctx, &GetDevicesArgs{
NamePrefix: pulumi.StringRef("example-"),
}, nil)
if err != nil {
return err
}
return nil
})
}
Coming soon!
import pulumi
import pulumi_tailscale as tailscale
sample_devices = tailscale.get_devices(name_prefix="example-")
import * as pulumi from "@pulumi/pulumi";
import * as tailscale from "@pulumi/tailscale";
const sampleDevices = pulumi.output(tailscale.getDevices({
namePrefix: "example-",
}));
Coming soon!
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(name_prefix: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetDevicesResult
def get_devices_output(name_prefix: 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: tailscale:index/getDevices:getDevices
Arguments:
# Arguments dictionary
The following arguments are supported:
- Name
Prefix string Filters the returned list of devices to those whose name have this prefix.
- Name
Prefix string Filters the returned list of devices to those whose name have this prefix.
- name
Prefix String Filters the returned list of devices to those whose name have this prefix.
- name
Prefix string Filters the returned list of devices to those whose name have this prefix.
- name_
prefix str Filters the returned list of devices to those whose name have this prefix.
- name
Prefix String Filters the returned list of devices to those whose name have this prefix.
getDevices Result
The following output properties are available:
- Devices
List<Get
Devices Device> The list of devices returned from the Tailscale API. Each element contains the following:
- Id string
The provider-assigned unique ID for this managed resource.
- Name
Prefix string
- Devices
[]Get
Devices Device The list of devices returned from the Tailscale API. Each element contains the following:
- Id string
The provider-assigned unique ID for this managed resource.
- Name
Prefix string
- devices
List
Devices Device> The list of devices returned from the Tailscale API. Each element contains the following:
- id String
The provider-assigned unique ID for this managed resource.
- name
Prefix String
- devices
Get
Devices Device[] The list of devices returned from the Tailscale API. Each element contains the following:
- id string
The provider-assigned unique ID for this managed resource.
- name
Prefix string
- devices
Sequence[Get
Devices Device] The list of devices returned from the Tailscale API. Each element contains the following:
- id str
The provider-assigned unique ID for this managed resource.
- name_
prefix str
- devices
List
The list of devices returned from the Tailscale API. Each element contains the following:
- id String
The provider-assigned unique ID for this managed resource.
- name
Prefix String
Supporting Types
GetDevicesDevice
Package Details
- Repository
- https://github.com/pulumi/pulumi-tailscale
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
tailscale
Terraform Provider.