@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
87 lines • 4.28 kB
JavaScript
;
// *** 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.LicenseGrant = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Provides a License Manager grant. This allows for sharing licenses with other AWS accounts.
*
* ## Import
*
* Using `pulumi import`, import `aws_licensemanager_grant` using the grant arn. For example:
*
* ```sh
* $ pulumi import aws:licensemanager/licenseGrant:LicenseGrant test arn:aws:license-manager::123456789011:grant:g-01d313393d9e443d8664cc054db1e089
* ```
*/
class LicenseGrant extends pulumi.CustomResource {
/**
* Get an existing LicenseGrant 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 LicenseGrant(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of LicenseGrant. 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'] === LicenseGrant.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["allowedOperations"] = state ? state.allowedOperations : undefined;
resourceInputs["arn"] = state ? state.arn : undefined;
resourceInputs["homeRegion"] = state ? state.homeRegion : undefined;
resourceInputs["licenseArn"] = state ? state.licenseArn : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["parentArn"] = state ? state.parentArn : undefined;
resourceInputs["principal"] = state ? state.principal : undefined;
resourceInputs["region"] = state ? state.region : undefined;
resourceInputs["status"] = state ? state.status : undefined;
resourceInputs["version"] = state ? state.version : undefined;
}
else {
const args = argsOrState;
if ((!args || args.allowedOperations === undefined) && !opts.urn) {
throw new Error("Missing required property 'allowedOperations'");
}
if ((!args || args.licenseArn === undefined) && !opts.urn) {
throw new Error("Missing required property 'licenseArn'");
}
if ((!args || args.principal === undefined) && !opts.urn) {
throw new Error("Missing required property 'principal'");
}
resourceInputs["allowedOperations"] = args ? args.allowedOperations : undefined;
resourceInputs["licenseArn"] = args ? args.licenseArn : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["principal"] = args ? args.principal : undefined;
resourceInputs["region"] = args ? args.region : undefined;
resourceInputs["arn"] = undefined /*out*/;
resourceInputs["homeRegion"] = undefined /*out*/;
resourceInputs["parentArn"] = undefined /*out*/;
resourceInputs["status"] = undefined /*out*/;
resourceInputs["version"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(LicenseGrant.__pulumiType, name, resourceInputs, opts);
}
}
exports.LicenseGrant = LicenseGrant;
/** @internal */
LicenseGrant.__pulumiType = 'aws:licensemanager/licenseGrant:LicenseGrant';
//# sourceMappingURL=licenseGrant.js.map