UNPKG

@huaweicloudos/pulumi

Version:

A Pulumi package for creating and managing Huaweicloud cloud resources.

88 lines 4.01 kB
"use strict"; // *** 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.PgPluginUpdate = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Manages an RDS plugin update resource within HuaweiCloud. * * > **NOTE:** Deleting RDS PostgreSQL plugin update modify is not supported. If you destroy a resource of RDS PostgreSQL * plugin update, it is only removed from the state, but still remains in the cloud. And the instance doesn't return to * the state before modifying. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as pulumi from "@huaweicloudos/pulumi"; * * const config = new pulumi.Config(); * const instanceId = config.requireObject("instanceId"); * const databaseName = config.requireObject("databaseName"); * const extensionName = config.requireObject("extensionName"); * const test = new huaweicloud.rds.PgPluginUpdate("test", { * instanceId: instanceId, * databaseName: databaseName, * extensionName: extensionName, * }); * ``` */ class PgPluginUpdate extends pulumi.CustomResource { /** * Get an existing PgPluginUpdate 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 PgPluginUpdate(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of PgPluginUpdate. 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'] === PgPluginUpdate.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["databaseName"] = state ? state.databaseName : undefined; resourceInputs["extensionName"] = state ? state.extensionName : undefined; resourceInputs["instanceId"] = state ? state.instanceId : undefined; resourceInputs["region"] = state ? state.region : undefined; } else { const args = argsOrState; if ((!args || args.databaseName === undefined) && !opts.urn) { throw new Error("Missing required property 'databaseName'"); } if ((!args || args.extensionName === undefined) && !opts.urn) { throw new Error("Missing required property 'extensionName'"); } if ((!args || args.instanceId === undefined) && !opts.urn) { throw new Error("Missing required property 'instanceId'"); } resourceInputs["databaseName"] = args ? args.databaseName : undefined; resourceInputs["extensionName"] = args ? args.extensionName : undefined; resourceInputs["instanceId"] = args ? args.instanceId : undefined; resourceInputs["region"] = args ? args.region : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(PgPluginUpdate.__pulumiType, name, resourceInputs, opts); } } exports.PgPluginUpdate = PgPluginUpdate; /** @internal */ PgPluginUpdate.__pulumiType = 'huaweicloud:Rds/pgPluginUpdate:PgPluginUpdate'; //# sourceMappingURL=pgPluginUpdate.js.map