aws.networkmanager.Device
Explore with Pulumi AI
Creates a device in a global network. If you specify both a site ID and a location, the location of the site is used for visualization in the Network Manager console.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.networkmanager.Device("example", {
globalNetworkId: exampleAwsNetworkmanagerGlobalNetwork.id,
siteId: exampleAwsNetworkmanagerSite.id,
});
import pulumi
import pulumi_aws as aws
example = aws.networkmanager.Device("example",
global_network_id=example_aws_networkmanager_global_network["id"],
site_id=example_aws_networkmanager_site["id"])
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/networkmanager"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := networkmanager.NewDevice(ctx, "example", &networkmanager.DeviceArgs{
GlobalNetworkId: pulumi.Any(exampleAwsNetworkmanagerGlobalNetwork.Id),
SiteId: pulumi.Any(exampleAwsNetworkmanagerSite.Id),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.NetworkManager.Device("example", new()
{
GlobalNetworkId = exampleAwsNetworkmanagerGlobalNetwork.Id,
SiteId = exampleAwsNetworkmanagerSite.Id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.networkmanager.Device;
import com.pulumi.aws.networkmanager.DeviceArgs;
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) {
var example = new Device("example", DeviceArgs.builder()
.globalNetworkId(exampleAwsNetworkmanagerGlobalNetwork.id())
.siteId(exampleAwsNetworkmanagerSite.id())
.build());
}
}
resources:
example:
type: aws:networkmanager:Device
properties:
globalNetworkId: ${exampleAwsNetworkmanagerGlobalNetwork.id}
siteId: ${exampleAwsNetworkmanagerSite.id}
Create Device Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Device(name: string, args: DeviceArgs, opts?: CustomResourceOptions);
@overload
def Device(resource_name: str,
args: DeviceArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Device(resource_name: str,
opts: Optional[ResourceOptions] = None,
global_network_id: Optional[str] = None,
aws_location: Optional[DeviceAwsLocationArgs] = None,
description: Optional[str] = None,
location: Optional[DeviceLocationArgs] = None,
model: Optional[str] = None,
serial_number: Optional[str] = None,
site_id: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
type: Optional[str] = None,
vendor: Optional[str] = None)
func NewDevice(ctx *Context, name string, args DeviceArgs, opts ...ResourceOption) (*Device, error)
public Device(string name, DeviceArgs args, CustomResourceOptions? opts = null)
public Device(String name, DeviceArgs args)
public Device(String name, DeviceArgs args, CustomResourceOptions options)
type: aws:networkmanager:Device
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args DeviceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args DeviceArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args DeviceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DeviceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DeviceArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var deviceResource = new Aws.NetworkManager.Device("deviceResource", new()
{
GlobalNetworkId = "string",
AwsLocation = new Aws.NetworkManager.Inputs.DeviceAwsLocationArgs
{
SubnetArn = "string",
Zone = "string",
},
Description = "string",
Location = new Aws.NetworkManager.Inputs.DeviceLocationArgs
{
Address = "string",
Latitude = "string",
Longitude = "string",
},
Model = "string",
SerialNumber = "string",
SiteId = "string",
Tags =
{
{ "string", "string" },
},
Type = "string",
Vendor = "string",
});
example, err := networkmanager.NewDevice(ctx, "deviceResource", &networkmanager.DeviceArgs{
GlobalNetworkId: pulumi.String("string"),
AwsLocation: &networkmanager.DeviceAwsLocationArgs{
SubnetArn: pulumi.String("string"),
Zone: pulumi.String("string"),
},
Description: pulumi.String("string"),
Location: &networkmanager.DeviceLocationArgs{
Address: pulumi.String("string"),
Latitude: pulumi.String("string"),
Longitude: pulumi.String("string"),
},
Model: pulumi.String("string"),
SerialNumber: pulumi.String("string"),
SiteId: pulumi.String("string"),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
Type: pulumi.String("string"),
Vendor: pulumi.String("string"),
})
var deviceResource = new Device("deviceResource", DeviceArgs.builder()
.globalNetworkId("string")
.awsLocation(DeviceAwsLocationArgs.builder()
.subnetArn("string")
.zone("string")
.build())
.description("string")
.location(DeviceLocationArgs.builder()
.address("string")
.latitude("string")
.longitude("string")
.build())
.model("string")
.serialNumber("string")
.siteId("string")
.tags(Map.of("string", "string"))
.type("string")
.vendor("string")
.build());
device_resource = aws.networkmanager.Device("deviceResource",
global_network_id="string",
aws_location={
"subnetArn": "string",
"zone": "string",
},
description="string",
location={
"address": "string",
"latitude": "string",
"longitude": "string",
},
model="string",
serial_number="string",
site_id="string",
tags={
"string": "string",
},
type="string",
vendor="string")
const deviceResource = new aws.networkmanager.Device("deviceResource", {
globalNetworkId: "string",
awsLocation: {
subnetArn: "string",
zone: "string",
},
description: "string",
location: {
address: "string",
latitude: "string",
longitude: "string",
},
model: "string",
serialNumber: "string",
siteId: "string",
tags: {
string: "string",
},
type: "string",
vendor: "string",
});
type: aws:networkmanager:Device
properties:
awsLocation:
subnetArn: string
zone: string
description: string
globalNetworkId: string
location:
address: string
latitude: string
longitude: string
model: string
serialNumber: string
siteId: string
tags:
string: string
type: string
vendor: string
Device Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The Device resource accepts the following input properties:
- Global
Network stringId - The ID of the global network.
- Aws
Location DeviceAws Location - The AWS location of the device. Documented below.
- Description string
- A description of the device.
- Location
Device
Location - The location of the device. Documented below.
- Model string
- The model of device.
- Serial
Number string - The serial number of the device.
- Site
Id string - The ID of the site.
- Dictionary<string, string>
- Key-value tags for the device. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Type string
- The type of device.
- Vendor string
- The vendor of the device.
- Global
Network stringId - The ID of the global network.
- Aws
Location DeviceAws Location Args - The AWS location of the device. Documented below.
- Description string
- A description of the device.
- Location
Device
Location Args - The location of the device. Documented below.
- Model string
- The model of device.
- Serial
Number string - The serial number of the device.
- Site
Id string - The ID of the site.
- map[string]string
- Key-value tags for the device. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Type string
- The type of device.
- Vendor string
- The vendor of the device.
- global
Network StringId - The ID of the global network.
- aws
Location DeviceAws Location - The AWS location of the device. Documented below.
- description String
- A description of the device.
- location
Device
Location - The location of the device. Documented below.
- model String
- The model of device.
- serial
Number String - The serial number of the device.
- site
Id String - The ID of the site.
- Map<String,String>
- Key-value tags for the device. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - type String
- The type of device.
- vendor String
- The vendor of the device.
- global
Network stringId - The ID of the global network.
- aws
Location DeviceAws Location - The AWS location of the device. Documented below.
- description string
- A description of the device.
- location
Device
Location - The location of the device. Documented below.
- model string
- The model of device.
- serial
Number string - The serial number of the device.
- site
Id string - The ID of the site.
- {[key: string]: string}
- Key-value tags for the device. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - type string
- The type of device.
- vendor string
- The vendor of the device.
- global_
network_ strid - The ID of the global network.
- aws_
location DeviceAws Location Args - The AWS location of the device. Documented below.
- description str
- A description of the device.
- location
Device
Location Args - 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.
- Mapping[str, str]
- Key-value tags for the device. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - type str
- The type of device.
- vendor str
- The vendor of the device.
- global
Network StringId - The ID of the global network.
- aws
Location Property Map - The AWS location of the device. Documented below.
- description String
- A description of the device.
- location Property Map
- The location of the device. Documented below.
- model String
- The model of device.
- serial
Number String - The serial number of the device.
- site
Id String - The ID of the site.
- Map<String>
- Key-value tags for the device. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - type String
- The type of device.
- vendor String
- The vendor of the device.
Outputs
All input properties are implicitly available as output properties. Additionally, the Device resource produces the following output properties:
Look up Existing Device Resource
Get an existing Device resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: DeviceState, opts?: CustomResourceOptions): Device
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
arn: Optional[str] = None,
aws_location: Optional[DeviceAwsLocationArgs] = None,
description: Optional[str] = None,
global_network_id: Optional[str] = None,
location: Optional[DeviceLocationArgs] = None,
model: Optional[str] = None,
serial_number: Optional[str] = None,
site_id: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
tags_all: Optional[Mapping[str, str]] = None,
type: Optional[str] = None,
vendor: Optional[str] = None) -> Device
func GetDevice(ctx *Context, name string, id IDInput, state *DeviceState, opts ...ResourceOption) (*Device, error)
public static Device Get(string name, Input<string> id, DeviceState? state, CustomResourceOptions? opts = null)
public static Device get(String name, Output<String> id, DeviceState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Arn string
- The Amazon Resource Name (ARN) of the device.
- Aws
Location DeviceAws Location - The AWS location of the device. Documented below.
- Description string
- A description of the device.
- Global
Network stringId - The ID of the global network.
- Location
Device
Location - The location of the device. Documented below.
- Model string
- The model of device.
- Serial
Number string - The serial number of the device.
- Site
Id string - The ID of the site.
- Dictionary<string, string>
- Key-value tags for the device. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Dictionary<string, string>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - Type string
- The type of device.
- Vendor string
- The vendor of the device.
- Arn string
- The Amazon Resource Name (ARN) of the device.
- Aws
Location DeviceAws Location Args - The AWS location of the device. Documented below.
- Description string
- A description of the device.
- Global
Network stringId - The ID of the global network.
- Location
Device
Location Args - The location of the device. Documented below.
- Model string
- The model of device.
- Serial
Number string - The serial number of the device.
- Site
Id string - The ID of the site.
- map[string]string
- Key-value tags for the device. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - map[string]string
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - Type string
- The type of device.
- Vendor string
- The vendor of the device.
- arn String
- The Amazon Resource Name (ARN) of the device.
- aws
Location DeviceAws Location - The AWS location of the device. Documented below.
- description String
- A description of the device.
- global
Network StringId - The ID of the global network.
- location
Device
Location - The location of the device. Documented below.
- model String
- The model of device.
- serial
Number String - The serial number of the device.
- site
Id String - The ID of the site.
- Map<String,String>
- Key-value tags for the device. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Map<String,String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - type String
- The type of device.
- vendor String
- The vendor of the device.
- arn string
- The Amazon Resource Name (ARN) of the device.
- aws
Location DeviceAws Location - The AWS location of the device. Documented below.
- description string
- A description of the device.
- global
Network stringId - The ID of the global network.
- location
Device
Location - The location of the device. Documented below.
- model string
- The model of device.
- serial
Number string - The serial number of the device.
- site
Id string - The ID of the site.
- {[key: string]: string}
- Key-value tags for the device. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - {[key: string]: string}
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - type string
- The type of device.
- vendor string
- The vendor of the device.
- arn str
- The Amazon Resource Name (ARN) of the device.
- aws_
location DeviceAws Location Args - The AWS location of the device. Documented below.
- description str
- A description of the device.
- global_
network_ strid - The ID of the global network.
- location
Device
Location Args - 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.
- Mapping[str, str]
- Key-value tags for the device. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Mapping[str, str]
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - type str
- The type of device.
- vendor str
- The vendor of the device.
- arn String
- The Amazon Resource Name (ARN) of the device.
- aws
Location Property Map - The AWS location of the device. Documented below.
- description String
- A description of the device.
- global
Network StringId - The ID of the global network.
- location Property Map
- The location of the device. Documented below.
- model String
- The model of device.
- serial
Number String - The serial number of the device.
- site
Id String - The ID of the site.
- Map<String>
- Key-value tags for the device. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Map<String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - type String
- The type of device.
- vendor String
- The vendor of the device.
Supporting Types
DeviceAwsLocation, DeviceAwsLocationArgs
- 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. Specify the ID of an Availability Zone, Local Zone, Wavelength Zone, or an Outpost.
DeviceLocation, DeviceLocationArgs
Import
Using pulumi import
, import aws_networkmanager_device
using the device ARN. For example:
$ pulumi import aws:networkmanager/device:Device example arn:aws:networkmanager::123456789012:device/global-network-0d47f6t230mz46dy4/device-07f6fd08867abc123
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.