UNPKG

@pulumi/aws

Version:

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

86 lines 3.13 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.Thing = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Creates and manages an AWS IoT Thing. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.iot.Thing("example", { * name: "example", * attributes: { * First: "examplevalue", * }, * }); * ``` * * ## Import * * Using `pulumi import`, import IOT Things using the name. For example: * * ```sh * $ pulumi import aws:iot/thing:Thing example example * ``` */ class Thing extends pulumi.CustomResource { /** * Get an existing Thing 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 Thing(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of Thing. 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'] === Thing.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["arn"] = state?.arn; resourceInputs["attributes"] = state?.attributes; resourceInputs["defaultClientId"] = state?.defaultClientId; resourceInputs["name"] = state?.name; resourceInputs["region"] = state?.region; resourceInputs["thingTypeName"] = state?.thingTypeName; resourceInputs["version"] = state?.version; } else { const args = argsOrState; resourceInputs["attributes"] = args?.attributes; resourceInputs["name"] = args?.name; resourceInputs["region"] = args?.region; resourceInputs["thingTypeName"] = args?.thingTypeName; resourceInputs["arn"] = undefined /*out*/; resourceInputs["defaultClientId"] = undefined /*out*/; resourceInputs["version"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Thing.__pulumiType, name, resourceInputs, opts); } } exports.Thing = Thing; /** @internal */ Thing.__pulumiType = 'aws:iot/thing:Thing'; //# sourceMappingURL=thing.js.map