UNPKG

@pulumi/aws

Version:

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

101 lines 3.75 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.ThingGroup = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Manages an AWS IoT Thing Group. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const parent = new aws.iot.ThingGroup("parent", {name: "parent"}); * const example = new aws.iot.ThingGroup("example", { * name: "example", * parentGroupName: parent.name, * properties: { * attributePayload: { * attributes: { * One: "11111", * Two: "TwoTwo", * }, * }, * description: "This is my thing group", * }, * tags: { * managed: "true", * }, * }); * ``` * * ## Import * * Using `pulumi import`, import IoT Things Groups using the name. For example: * * ```sh * $ pulumi import aws:iot/thingGroup:ThingGroup example example * ``` */ class ThingGroup extends pulumi.CustomResource { /** * Get an existing ThingGroup 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 ThingGroup(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of ThingGroup. 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'] === ThingGroup.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["arn"] = state?.arn; resourceInputs["metadatas"] = state?.metadatas; resourceInputs["name"] = state?.name; resourceInputs["parentGroupName"] = state?.parentGroupName; resourceInputs["properties"] = state?.properties; resourceInputs["region"] = state?.region; resourceInputs["tags"] = state?.tags; resourceInputs["tagsAll"] = state?.tagsAll; resourceInputs["version"] = state?.version; } else { const args = argsOrState; resourceInputs["name"] = args?.name; resourceInputs["parentGroupName"] = args?.parentGroupName; resourceInputs["properties"] = args?.properties; resourceInputs["region"] = args?.region; resourceInputs["tags"] = args?.tags; resourceInputs["arn"] = undefined /*out*/; resourceInputs["metadatas"] = undefined /*out*/; resourceInputs["tagsAll"] = undefined /*out*/; resourceInputs["version"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(ThingGroup.__pulumiType, name, resourceInputs, opts); } } exports.ThingGroup = ThingGroup; /** @internal */ ThingGroup.__pulumiType = 'aws:iot/thingGroup:ThingGroup'; //# sourceMappingURL=thingGroup.js.map