@huaweicloudos/pulumi
Version:
A Pulumi package for creating and managing Huaweicloud cloud resources.
87 lines • 4.01 kB
JavaScript
;
// *** 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.Dependency = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Manages a custom dependency package within HuaweiCloud FunctionGraph.
*
* > This resource will be deprecated in a future version. Please use `huaweicloudFgsDependencyVersion` resource to
* replace it. For specific usage instructions, please refer to the corresponding document.
*
* ## Example Usage
*
* ## Import
*
* Dependencies can be imported using the `id`, e.g.bash
*
* ```sh
* $ pulumi import huaweicloud:FunctionGraph/dependency:Dependency test 795e722f-0c23-41b6-a189-dcd56f889cf6
* ```
*/
class Dependency extends pulumi.CustomResource {
/**
* Get an existing Dependency 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 Dependency(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of Dependency. 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'] === Dependency.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["description"] = state ? state.description : undefined;
resourceInputs["etag"] = state ? state.etag : undefined;
resourceInputs["link"] = state ? state.link : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["owner"] = state ? state.owner : undefined;
resourceInputs["region"] = state ? state.region : undefined;
resourceInputs["runtime"] = state ? state.runtime : undefined;
resourceInputs["size"] = state ? state.size : undefined;
resourceInputs["version"] = state ? state.version : undefined;
}
else {
const args = argsOrState;
if ((!args || args.link === undefined) && !opts.urn) {
throw new Error("Missing required property 'link'");
}
if ((!args || args.runtime === undefined) && !opts.urn) {
throw new Error("Missing required property 'runtime'");
}
resourceInputs["description"] = args ? args.description : undefined;
resourceInputs["link"] = args ? args.link : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["region"] = args ? args.region : undefined;
resourceInputs["runtime"] = args ? args.runtime : undefined;
resourceInputs["etag"] = undefined /*out*/;
resourceInputs["owner"] = undefined /*out*/;
resourceInputs["size"] = undefined /*out*/;
resourceInputs["version"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(Dependency.__pulumiType, name, resourceInputs, opts);
}
}
exports.Dependency = Dependency;
/** @internal */
Dependency.__pulumiType = 'huaweicloud:FunctionGraph/dependency:Dependency';
//# sourceMappingURL=dependency.js.map