UNPKG

@pulumi/yandex

Version:

A Pulumi package for creating and managing yandex cloud resources.

91 lines 3.97 kB
"use strict"; // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.IotCoreDevice = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * Allows management of [Yandex.Cloud IoT Device](https://cloud.yandex.com/docs/iot-core/quickstart). * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as yandex from "@pulumi/yandex"; * * const myDevice = new yandex.IotCoreDevice("my_device", { * aliases: { * "some_alias1/subtopic": "$devices/{id}/events/somesubtopic", * "some_alias2/subtopic": "$devices/{id}/events/aaa/bbb", * }, * certificates: [ * "public part of certificate1", * "public part of certificate2", * ], * description: "any description", * passwords: [ * "my-password1", * "my-password2", * ], * registryId: "are1sampleregistryid11", * }); * ``` */ class IotCoreDevice extends pulumi.CustomResource { constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["aliases"] = state ? state.aliases : undefined; resourceInputs["certificates"] = state ? state.certificates : undefined; resourceInputs["createdAt"] = state ? state.createdAt : undefined; resourceInputs["description"] = state ? state.description : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["passwords"] = state ? state.passwords : undefined; resourceInputs["registryId"] = state ? state.registryId : undefined; } else { const args = argsOrState; if ((!args || args.registryId === undefined) && !opts.urn) { throw new Error("Missing required property 'registryId'"); } resourceInputs["aliases"] = args ? args.aliases : undefined; resourceInputs["certificates"] = args ? args.certificates : undefined; resourceInputs["description"] = args ? args.description : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["passwords"] = args ? args.passwords : undefined; resourceInputs["registryId"] = args ? args.registryId : undefined; resourceInputs["createdAt"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(IotCoreDevice.__pulumiType, name, resourceInputs, opts); } /** * Get an existing IotCoreDevice 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 IotCoreDevice(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of IotCoreDevice. 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'] === IotCoreDevice.__pulumiType; } } exports.IotCoreDevice = IotCoreDevice; /** @internal */ IotCoreDevice.__pulumiType = 'yandex:index/iotCoreDevice:IotCoreDevice'; //# sourceMappingURL=iotCoreDevice.js.map