UNPKG

@pulumi/aws

Version:

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

99 lines 4.22 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.Device = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Manages a Network Manager Device. * * Use this resource to create 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 * * ```typescript * 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 * * Using `pulumi import`, import `aws_networkmanager_device` using the device ARN. For example: * * ```sh * $ pulumi import aws:networkmanager/device:Device example arn:aws:networkmanager::123456789012:device/global-network-0d47f6t230mz46dy4/device-07f6fd08867abc123 * ``` */ class Device extends pulumi.CustomResource { /** * Get an existing Device resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name, id, state, opts) { return new Device(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of Device. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj) { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === Device.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["arn"] = state?.arn; resourceInputs["awsLocation"] = state?.awsLocation; resourceInputs["description"] = state?.description; resourceInputs["globalNetworkId"] = state?.globalNetworkId; resourceInputs["location"] = state?.location; resourceInputs["model"] = state?.model; resourceInputs["serialNumber"] = state?.serialNumber; resourceInputs["siteId"] = state?.siteId; resourceInputs["tags"] = state?.tags; resourceInputs["tagsAll"] = state?.tagsAll; resourceInputs["type"] = state?.type; resourceInputs["vendor"] = state?.vendor; } else { const args = argsOrState; if (args?.globalNetworkId === undefined && !opts.urn) { throw new Error("Missing required property 'globalNetworkId'"); } resourceInputs["awsLocation"] = args?.awsLocation; resourceInputs["description"] = args?.description; resourceInputs["globalNetworkId"] = args?.globalNetworkId; resourceInputs["location"] = args?.location; resourceInputs["model"] = args?.model; resourceInputs["serialNumber"] = args?.serialNumber; resourceInputs["siteId"] = args?.siteId; resourceInputs["tags"] = args?.tags; resourceInputs["type"] = args?.type; resourceInputs["vendor"] = args?.vendor; resourceInputs["arn"] = undefined /*out*/; resourceInputs["tagsAll"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Device.__pulumiType, name, resourceInputs, opts); } } exports.Device = Device; /** @internal */ Device.__pulumiType = 'aws:networkmanager/device:Device'; //# sourceMappingURL=device.js.map