UNPKG

@pulumi/meraki

Version:

A Pulumi package for creating and managing Cisco Meraki resources. Based on terraform-provider-meraki: version v0.2.0

106 lines 5.21 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.Licenses = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as meraki from "@pulumi/meraki"; * * const example = new meraki.organizations.Licenses("example", { * deviceSerial: "Q234-ABCD-5678", * licenseId: "string", * organizationId: "string", * }); * export const merakiOrganizationsLicensesExample = example; * ``` * * ## Import * * ```sh * $ pulumi import meraki:organizations/licenses:Licenses example "license_id,organization_id" * ``` */ class Licenses extends pulumi.CustomResource { /** * Get an existing Licenses 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 Licenses(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of Licenses. 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'] === Licenses.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["activationDate"] = state ? state.activationDate : undefined; resourceInputs["claimDate"] = state ? state.claimDate : undefined; resourceInputs["deviceSerial"] = state ? state.deviceSerial : undefined; resourceInputs["durationInDays"] = state ? state.durationInDays : undefined; resourceInputs["expirationDate"] = state ? state.expirationDate : undefined; resourceInputs["headLicenseId"] = state ? state.headLicenseId : undefined; resourceInputs["licenseId"] = state ? state.licenseId : undefined; resourceInputs["licenseKey"] = state ? state.licenseKey : undefined; resourceInputs["licenseType"] = state ? state.licenseType : undefined; resourceInputs["networkId"] = state ? state.networkId : undefined; resourceInputs["orderNumber"] = state ? state.orderNumber : undefined; resourceInputs["organizationId"] = state ? state.organizationId : undefined; resourceInputs["permanentlyQueuedLicenses"] = state ? state.permanentlyQueuedLicenses : undefined; resourceInputs["seatCount"] = state ? state.seatCount : undefined; resourceInputs["state"] = state ? state.state : undefined; resourceInputs["totalDurationInDays"] = state ? state.totalDurationInDays : undefined; } else { const args = argsOrState; if ((!args || args.licenseId === undefined) && !opts.urn) { throw new Error("Missing required property 'licenseId'"); } if ((!args || args.organizationId === undefined) && !opts.urn) { throw new Error("Missing required property 'organizationId'"); } resourceInputs["deviceSerial"] = args ? args.deviceSerial : undefined; resourceInputs["licenseId"] = args ? args.licenseId : undefined; resourceInputs["organizationId"] = args ? args.organizationId : undefined; resourceInputs["activationDate"] = undefined /*out*/; resourceInputs["claimDate"] = undefined /*out*/; resourceInputs["durationInDays"] = undefined /*out*/; resourceInputs["expirationDate"] = undefined /*out*/; resourceInputs["headLicenseId"] = undefined /*out*/; resourceInputs["licenseKey"] = undefined /*out*/; resourceInputs["licenseType"] = undefined /*out*/; resourceInputs["networkId"] = undefined /*out*/; resourceInputs["orderNumber"] = undefined /*out*/; resourceInputs["permanentlyQueuedLicenses"] = undefined /*out*/; resourceInputs["seatCount"] = undefined /*out*/; resourceInputs["state"] = undefined /*out*/; resourceInputs["totalDurationInDays"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Licenses.__pulumiType, name, resourceInputs, opts); } } exports.Licenses = Licenses; /** @internal */ Licenses.__pulumiType = 'meraki:organizations/licenses:Licenses'; //# sourceMappingURL=licenses.js.map