AWS Classic

Pulumi Official
Package maintained by Pulumi
v5.10.0 published on Monday, Jul 11, 2022 by Pulumi

getDevices

Retrieve information about devices.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(Aws.NetworkManager.GetDevices.InvokeAsync(new Aws.NetworkManager.GetDevicesArgs
        {
            GlobalNetworkId = @var.Global_network_id,
            Tags = 
            {
                { "Env", "test" },
            },
        }));
    }

}
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/networkmanager"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := networkmanager.GetDevices(ctx, &networkmanager.GetDevicesArgs{
			GlobalNetworkId: _var.Global_network_id,
			Tags: map[string]interface{}{
				"Env": "test",
			},
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var example = Output.of(NetworkmanagerFunctions.getDevices(GetDevicesArgs.builder()
            .globalNetworkId(var_.global_network_id())
            .tags(Map.of("Env", "test"))
            .build()));

    }
}
import pulumi
import pulumi_aws as aws

example = aws.networkmanager.get_devices(global_network_id=var["global_network_id"],
    tags={
        "Env": "test",
    })
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = aws.networkmanager.getDevices({
    globalNetworkId: _var.global_network_id,
    tags: {
        Env: "test",
    },
});
variables:
  example:
    Fn::Invoke:
      Function: aws:networkmanager:getDevices
      Arguments:
        globalNetworkId: ${var.global_network_id}
        tags:
          Env: test

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(global_network_id: Optional[str] = None,
                site_id: Optional[str] = None,
                tags: Optional[Mapping[str, str]] = None,
                opts: Optional[InvokeOptions] = None) -> GetDevicesResult
def get_devices_output(global_network_id: Optional[pulumi.Input[str]] = None,
                site_id: Optional[pulumi.Input[str]] = None,
                tags: Optional[pulumi.Input[Mapping[str, 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: aws:networkmanager/getDevices:getDevices
  Arguments:
    # Arguments dictionary

The following arguments are supported:

GlobalNetworkId string

The ID of the Global Network of the devices to retrieve.

SiteId string

The ID of the site of the devices to retrieve.

Tags Dictionary<string, string>

Restricts the list to the devices with these tags.

GlobalNetworkId string

The ID of the Global Network of the devices to retrieve.

SiteId string

The ID of the site of the devices to retrieve.

Tags map[string]string

Restricts the list to the devices with these tags.

globalNetworkId String

The ID of the Global Network of the devices to retrieve.

siteId String

The ID of the site of the devices to retrieve.

tags Map<String,String>

Restricts the list to the devices with these tags.

globalNetworkId string

The ID of the Global Network of the devices to retrieve.

siteId string

The ID of the site of the devices to retrieve.

tags {[key: string]: string}

Restricts the list to the devices with these tags.

global_network_id str

The ID of the Global Network of the devices to retrieve.

site_id str

The ID of the site of the devices to retrieve.

tags Mapping[str, str]

Restricts the list to the devices with these tags.

globalNetworkId String

The ID of the Global Network of the devices to retrieve.

siteId String

The ID of the site of the devices to retrieve.

tags Map<String>

Restricts the list to the devices with these tags.

getDevices Result

The following output properties are available:

GlobalNetworkId string
Id string

The provider-assigned unique ID for this managed resource.

Ids List<string>

The IDs of the devices.

SiteId string
Tags Dictionary<string, string>
GlobalNetworkId string
Id string

The provider-assigned unique ID for this managed resource.

Ids []string

The IDs of the devices.

SiteId string
Tags map[string]string
globalNetworkId String
id String

The provider-assigned unique ID for this managed resource.

ids List<String>

The IDs of the devices.

siteId String
tags Map<String,String>
globalNetworkId string
id string

The provider-assigned unique ID for this managed resource.

ids string[]

The IDs of the devices.

siteId string
tags {[key: string]: string}
global_network_id str
id str

The provider-assigned unique ID for this managed resource.

ids Sequence[str]

The IDs of the devices.

site_id str
tags Mapping[str, str]
globalNetworkId String
id String

The provider-assigned unique ID for this managed resource.

ids List<String>

The IDs of the devices.

siteId String
tags Map<String>

Package Details

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

This Pulumi package is based on the aws Terraform Provider.