@huaweicloudos/pulumi
Version:
A Pulumi package for creating and managing Huaweicloud cloud resources.
74 lines • 3.25 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.InstantTaskDelete = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Manages an RDS instant task delete resource within HuaweiCloud.
*
* > This resource is only a one-time action resource for operating the API.
* Deleting this resource will not clear the corresponding request record,
* but will only remove the resource information from the tfstate file.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as pulumi from "@huaweicloudos/pulumi";
*
* const config = new pulumi.Config();
* const jobId = config.requireObject("jobId");
* const test = new huaweicloud.rds.InstantTaskDelete("test", {jobId: jobId});
* ```
*/
class InstantTaskDelete extends pulumi.CustomResource {
/**
* Get an existing InstantTaskDelete 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 InstantTaskDelete(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of InstantTaskDelete. 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'] === InstantTaskDelete.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["enableForceNew"] = state ? state.enableForceNew : undefined;
resourceInputs["jobId"] = state ? state.jobId : undefined;
resourceInputs["region"] = state ? state.region : undefined;
}
else {
const args = argsOrState;
if ((!args || args.jobId === undefined) && !opts.urn) {
throw new Error("Missing required property 'jobId'");
}
resourceInputs["enableForceNew"] = args ? args.enableForceNew : undefined;
resourceInputs["jobId"] = args ? args.jobId : undefined;
resourceInputs["region"] = args ? args.region : undefined;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(InstantTaskDelete.__pulumiType, name, resourceInputs, opts);
}
}
exports.InstantTaskDelete = InstantTaskDelete;
/** @internal */
InstantTaskDelete.__pulumiType = 'huaweicloud:Rds/instantTaskDelete:InstantTaskDelete';
//# sourceMappingURL=instantTaskDelete.js.map