UNPKG

@volcengine/pulumi

Version:

A Pulumi package for creating and managing volcengine cloud resources.

101 lines 4.28 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.ParameterTemplate = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * (Deprecated! Recommend use volcengine_rds_mysql_*** replace) Provides a resource to manage rds parameter template * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as volcengine from "@volcengine/pulumi"; * * const foo = new volcengine.rds.ParameterTemplate("foo", { * templateDesc: "created by terraform", * templateName: "tf-template", * templateParams: [ * { * name: "auto_increment_increment", * runningValue: "2", * }, * { * name: "slow_query_log", * runningValue: "ON", * }, * { * name: "net_retry_count", * runningValue: "33", * }, * ], * templateType: "MySQL", * templateTypeVersion: "MySQL_Community_5_7", * }); * ``` * * ## Import * * RDS Instance can be imported using the id, e.g. * * ```sh * $ pulumi import volcengine:rds/parameterTemplate:ParameterTemplate default mysql-sys-80bb93aa14be22d0 * ``` */ class ParameterTemplate extends pulumi.CustomResource { /** * Get an existing ParameterTemplate 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 ParameterTemplate(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of ParameterTemplate. 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'] === ParameterTemplate.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["templateDesc"] = state ? state.templateDesc : undefined; resourceInputs["templateName"] = state ? state.templateName : undefined; resourceInputs["templateParams"] = state ? state.templateParams : undefined; resourceInputs["templateType"] = state ? state.templateType : undefined; resourceInputs["templateTypeVersion"] = state ? state.templateTypeVersion : undefined; } else { const args = argsOrState; if ((!args || args.templateName === undefined) && !opts.urn) { throw new Error("Missing required property 'templateName'"); } if ((!args || args.templateParams === undefined) && !opts.urn) { throw new Error("Missing required property 'templateParams'"); } resourceInputs["templateDesc"] = args ? args.templateDesc : undefined; resourceInputs["templateName"] = args ? args.templateName : undefined; resourceInputs["templateParams"] = args ? args.templateParams : undefined; resourceInputs["templateType"] = args ? args.templateType : undefined; resourceInputs["templateTypeVersion"] = args ? args.templateTypeVersion : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(ParameterTemplate.__pulumiType, name, resourceInputs, opts); } } exports.ParameterTemplate = ParameterTemplate; /** @internal */ ParameterTemplate.__pulumiType = 'volcengine:rds/parameterTemplate:ParameterTemplate'; //# sourceMappingURL=parameterTemplate.js.map