UNPKG

@pulumi/aws

Version:

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

116 lines 5.51 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.LicenseConfiguration = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Provides a License Manager license configuration resource. * * > **Note:** Removing the `licenseCount` attribute is not supported by the License Manager API. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.licensemanager.LicenseConfiguration("example", { * name: "Example", * description: "Example", * licenseCount: 10, * licenseCountHardLimit: true, * licenseCountingType: "Socket", * licenseRules: ["#minimumSockets=2"], * tags: { * foo: "barr", * }, * }); * ``` * * ## Rules * * License rules should be in the format of `#RuleType=RuleValue`. Supported rule types: * * * `minimumVcpus` - Resource must have minimum vCPU count in order to use the license. Default: 1 * * `maximumVcpus` - Resource must have maximum vCPU count in order to use the license. Default: unbounded, limit: 10000 * * `minimumCores` - Resource must have minimum core count in order to use the license. Default: 1 * * `maximumCores` - Resource must have maximum core count in order to use the license. Default: unbounded, limit: 10000 * * `minimumSockets` - Resource must have minimum socket count in order to use the license. Default: 1 * * `maximumSockets` - Resource must have maximum socket count in order to use the license. Default: unbounded, limit: 10000 * * `allowedTenancy` - Defines where the license can be used. If set, restricts license usage to selected tenancies. Specify a comma delimited list of `EC2-Default`, `EC2-DedicatedHost`, `EC2-DedicatedInstance` * * ## Import * * Using `pulumi import`, import license configurations using the `id`. For example: * * ```sh * $ pulumi import aws:licensemanager/licenseConfiguration:LicenseConfiguration example arn:aws:license-manager:eu-west-1:123456789012:license-configuration:lic-0123456789abcdef0123456789abcdef * ``` */ class LicenseConfiguration extends pulumi.CustomResource { /** * Get an existing LicenseConfiguration 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 LicenseConfiguration(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of LicenseConfiguration. 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'] === LicenseConfiguration.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["arn"] = state?.arn; resourceInputs["description"] = state?.description; resourceInputs["licenseCount"] = state?.licenseCount; resourceInputs["licenseCountHardLimit"] = state?.licenseCountHardLimit; resourceInputs["licenseCountingType"] = state?.licenseCountingType; resourceInputs["licenseRules"] = state?.licenseRules; resourceInputs["name"] = state?.name; resourceInputs["ownerAccountId"] = state?.ownerAccountId; resourceInputs["region"] = state?.region; resourceInputs["tags"] = state?.tags; resourceInputs["tagsAll"] = state?.tagsAll; } else { const args = argsOrState; if (args?.licenseCountingType === undefined && !opts.urn) { throw new Error("Missing required property 'licenseCountingType'"); } resourceInputs["description"] = args?.description; resourceInputs["licenseCount"] = args?.licenseCount; resourceInputs["licenseCountHardLimit"] = args?.licenseCountHardLimit; resourceInputs["licenseCountingType"] = args?.licenseCountingType; resourceInputs["licenseRules"] = args?.licenseRules; resourceInputs["name"] = args?.name; resourceInputs["region"] = args?.region; resourceInputs["tags"] = args?.tags; resourceInputs["arn"] = undefined /*out*/; resourceInputs["ownerAccountId"] = undefined /*out*/; resourceInputs["tagsAll"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(LicenseConfiguration.__pulumiType, name, resourceInputs, opts); } } exports.LicenseConfiguration = LicenseConfiguration; /** @internal */ LicenseConfiguration.__pulumiType = 'aws:licensemanager/licenseConfiguration:LicenseConfiguration'; //# sourceMappingURL=licenseConfiguration.js.map