AWS Classic

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

getDevice

Retrieve information about a device.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(Aws.NetworkManager.GetDevice.InvokeAsync(new Aws.NetworkManager.GetDeviceArgs
        {
            GlobalNetworkIdId = @var.Global_network_id,
            DeviceId = @var.Device_id,
        }));
    }

}
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.LookupDevice(ctx, &networkmanager.LookupDeviceArgs{
			GlobalNetworkIdId: _var.Global_network_id,
			DeviceId:          _var.Device_id,
		}, 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.getDevice(GetDeviceArgs.builder()
            .globalNetworkIdId(var_.global_network_id())
            .deviceId(var_.device_id())
            .build()));

    }
}
import pulumi
import pulumi_aws as aws

example = aws.networkmanager.get_device(global_network_id_id=var["global_network_id"],
    device_id=var["device_id"])
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = aws.networkmanager.getDevice({
    globalNetworkIdId: _var.global_network_id,
    deviceId: _var.device_id,
});
variables:
  example:
    Fn::Invoke:
      Function: aws:networkmanager:getDevice
      Arguments:
        globalNetworkIdId: ${var.global_network_id}
        deviceId: ${var.device_id}

Using getDevice

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 getDevice(args: GetDeviceArgs, opts?: InvokeOptions): Promise<GetDeviceResult>
function getDeviceOutput(args: GetDeviceOutputArgs, opts?: InvokeOptions): Output<GetDeviceResult>
def get_device(device_id: Optional[str] = None,
               global_network_id: Optional[str] = None,
               tags: Optional[Mapping[str, str]] = None,
               opts: Optional[InvokeOptions] = None) -> GetDeviceResult
def get_device_output(device_id: Optional[pulumi.Input[str]] = None,
               global_network_id: Optional[pulumi.Input[str]] = None,
               tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
               opts: Optional[InvokeOptions] = None) -> Output[GetDeviceResult]
func LookupDevice(ctx *Context, args *LookupDeviceArgs, opts ...InvokeOption) (*LookupDeviceResult, error)
func LookupDeviceOutput(ctx *Context, args *LookupDeviceOutputArgs, opts ...InvokeOption) LookupDeviceResultOutput

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

public static class GetDevice 
{
    public static Task<GetDeviceResult> InvokeAsync(GetDeviceArgs args, InvokeOptions? opts = null)
    public static Output<GetDeviceResult> Invoke(GetDeviceInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetDeviceResult> getDevice(GetDeviceArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: aws:networkmanager/getDevice:getDevice
  Arguments:
    # Arguments dictionary

The following arguments are supported:

DeviceId string

The ID of the device.

GlobalNetworkId string

The ID of the global network.

Tags Dictionary<string, string>

Key-value tags for the device.

DeviceId string

The ID of the device.

GlobalNetworkId string

The ID of the global network.

Tags map[string]string

Key-value tags for the device.

deviceId String

The ID of the device.

globalNetworkId String

The ID of the global network.

tags Map<String,String>

Key-value tags for the device.

deviceId string

The ID of the device.

globalNetworkId string

The ID of the global network.

tags {[key: string]: string}

Key-value tags for the device.

device_id str

The ID of the device.

global_network_id str

The ID of the global network.

tags Mapping[str, str]

Key-value tags for the device.

deviceId String

The ID of the device.

globalNetworkId String

The ID of the global network.

tags Map<String>

Key-value tags for the device.

getDevice Result

The following output properties are available:

Arn string

The Amazon Resource Name (ARN) of the device.

AwsLocations List<GetDeviceAwsLocation>

The AWS location of the device. Documented below.

Description string

A description of the device.

DeviceId string
GlobalNetworkId string
Id string

The provider-assigned unique ID for this managed resource.

Locations List<GetDeviceLocation>

The location of the device. Documented below.

Model string

The model of device.

SerialNumber string

The serial number of the device.

SiteId string

The ID of the site.

Tags Dictionary<string, string>

Key-value tags for the device.

Type string

The type of device.

Vendor string

The vendor of the device.

Arn string

The Amazon Resource Name (ARN) of the device.

AwsLocations []GetDeviceAwsLocation

The AWS location of the device. Documented below.

Description string

A description of the device.

DeviceId string
GlobalNetworkId string
Id string

The provider-assigned unique ID for this managed resource.

Locations []GetDeviceLocation

The location of the device. Documented below.

Model string

The model of device.

SerialNumber string

The serial number of the device.

SiteId string

The ID of the site.

Tags map[string]string

Key-value tags for the device.

Type string

The type of device.

Vendor string

The vendor of the device.

arn String

The Amazon Resource Name (ARN) of the device.

awsLocations List<GetDeviceAwsLocation>

The AWS location of the device. Documented below.

description String

A description of the device.

deviceId String
globalNetworkId String
id String

The provider-assigned unique ID for this managed resource.

locations List<GetDeviceLocation>

The location of the device. Documented below.

model String

The model of device.

serialNumber String

The serial number of the device.

siteId String

The ID of the site.

tags Map<String,String>

Key-value tags for the device.

type String

The type of device.

vendor String

The vendor of the device.

arn string

The Amazon Resource Name (ARN) of the device.

awsLocations GetDeviceAwsLocation[]

The AWS location of the device. Documented below.

description string

A description of the device.

deviceId string
globalNetworkId string
id string

The provider-assigned unique ID for this managed resource.

locations GetDeviceLocation[]

The location of the device. Documented below.

model string

The model of device.

serialNumber string

The serial number of the device.

siteId string

The ID of the site.

tags {[key: string]: string}

Key-value tags for the device.

type string

The type of device.

vendor string

The vendor of the device.

arn str

The Amazon Resource Name (ARN) of the device.

aws_locations Sequence[GetDeviceAwsLocation]

The AWS location of the device. Documented below.

description str

A description of the device.

device_id str
global_network_id str
id str

The provider-assigned unique ID for this managed resource.

locations Sequence[GetDeviceLocation]

The location of the device. Documented below.

model str

The model of device.

serial_number str

The serial number of the device.

site_id str

The ID of the site.

tags Mapping[str, str]

Key-value tags for the device.

type str

The type of device.

vendor str

The vendor of the device.

arn String

The Amazon Resource Name (ARN) of the device.

awsLocations List<Property Map>

The AWS location of the device. Documented below.

description String

A description of the device.

deviceId String
globalNetworkId String
id String

The provider-assigned unique ID for this managed resource.

locations List<Property Map>

The location of the device. Documented below.

model String

The model of device.

serialNumber String

The serial number of the device.

siteId String

The ID of the site.

tags Map<String>

Key-value tags for the device.

type String

The type of device.

vendor String

The vendor of the device.

Supporting Types

GetDeviceAwsLocation

SubnetArn string

The Amazon Resource Name (ARN) of the subnet that the device is located in.

Zone string

The Zone that the device is located in.

SubnetArn string

The Amazon Resource Name (ARN) of the subnet that the device is located in.

Zone string

The Zone that the device is located in.

subnetArn String

The Amazon Resource Name (ARN) of the subnet that the device is located in.

zone String

The Zone that the device is located in.

subnetArn string

The Amazon Resource Name (ARN) of the subnet that the device is located in.

zone string

The Zone that the device is located in.

subnet_arn str

The Amazon Resource Name (ARN) of the subnet that the device is located in.

zone str

The Zone that the device is located in.

subnetArn String

The Amazon Resource Name (ARN) of the subnet that the device is located in.

zone String

The Zone that the device is located in.

GetDeviceLocation

Address string

The physical address.

Latitude string

The latitude.

Longitude string

The longitude.

Address string

The physical address.

Latitude string

The latitude.

Longitude string

The longitude.

address String

The physical address.

latitude String

The latitude.

longitude String

The longitude.

address string

The physical address.

latitude string

The latitude.

longitude string

The longitude.

address str

The physical address.

latitude str

The latitude.

longitude str

The longitude.

address String

The physical address.

latitude String

The latitude.

longitude String

The longitude.

Package Details

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

This Pulumi package is based on the aws Terraform Provider.