@huaweicloudos/pulumi
Version:
A Pulumi package for creating and managing Huaweicloud cloud resources.
95 lines • 4.41 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.Package = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Manages DLI package resource within HuaweiCloud
*
* ## Example Usage
* ### Upload the specified python script as a resource package
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as pulumi from "@huaweicloudos/pulumi";
*
* const config = new pulumi.Config();
* const groupName = config.requireObject("groupName");
* const accessDomainName = config.requireObject("accessDomainName");
* const queue = new huaweicloud.dli.Package("queue", {
* groupName: groupName,
* objectPath: `https://${accessDomainName}/dli/packages/object_file.py`,
* type: "pyFile",
* });
* ```
*/
class Package extends pulumi.CustomResource {
/**
* Get an existing Package 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 Package(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of Package. 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'] === Package.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["createdAt"] = state ? state.createdAt : undefined;
resourceInputs["groupName"] = state ? state.groupName : undefined;
resourceInputs["isAsync"] = state ? state.isAsync : undefined;
resourceInputs["objectName"] = state ? state.objectName : undefined;
resourceInputs["objectPath"] = state ? state.objectPath : undefined;
resourceInputs["owner"] = state ? state.owner : undefined;
resourceInputs["region"] = state ? state.region : undefined;
resourceInputs["status"] = state ? state.status : undefined;
resourceInputs["tags"] = state ? state.tags : undefined;
resourceInputs["type"] = state ? state.type : undefined;
resourceInputs["updatedAt"] = state ? state.updatedAt : undefined;
}
else {
const args = argsOrState;
if ((!args || args.objectPath === undefined) && !opts.urn) {
throw new Error("Missing required property 'objectPath'");
}
if ((!args || args.type === undefined) && !opts.urn) {
throw new Error("Missing required property 'type'");
}
resourceInputs["groupName"] = args ? args.groupName : undefined;
resourceInputs["isAsync"] = args ? args.isAsync : undefined;
resourceInputs["objectPath"] = args ? args.objectPath : undefined;
resourceInputs["owner"] = args ? args.owner : undefined;
resourceInputs["region"] = args ? args.region : undefined;
resourceInputs["tags"] = args ? args.tags : undefined;
resourceInputs["type"] = args ? args.type : undefined;
resourceInputs["createdAt"] = undefined /*out*/;
resourceInputs["objectName"] = undefined /*out*/;
resourceInputs["status"] = undefined /*out*/;
resourceInputs["updatedAt"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(Package.__pulumiType, name, resourceInputs, opts);
}
}
exports.Package = Package;
/** @internal */
Package.__pulumiType = 'huaweicloud:Dli/package:Package';
//# sourceMappingURL=package.js.map