UNPKG

@pulumi/digitalocean

Version:

A Pulumi package for creating and managing DigitalOcean cloud resources.

141 lines 8.63 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.DatabaseMysqlConfig = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * Provides a virtual resource that can be used to change advanced configuration * options for a DigitalOcean managed MySQL database cluster. * * > **Note** MySQL configurations are only removed from state when destroyed. The remote configuration is not unset. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as digitalocean from "@pulumi/digitalocean"; * * const exampleDatabaseCluster = new digitalocean.DatabaseCluster("example", { * name: "example-mysql-cluster", * engine: "mysql", * version: "8", * size: digitalocean.DatabaseSlug.DB_1VPCU1GB, * region: digitalocean.Region.NYC1, * nodeCount: 1, * }); * const example = new digitalocean.DatabaseMysqlConfig("example", { * clusterId: exampleDatabaseCluster.id, * connectTimeout: 10, * defaultTimeZone: "UTC", * }); * ``` * * ## Import * * A MySQL database cluster's configuration can be imported using the `id` the parent cluster, e.g. * * ```sh * $ pulumi import digitalocean:index/databaseMysqlConfig:DatabaseMysqlConfig example 4b62829a-9c42-465b-aaa3-84051048e712 * ``` */ class DatabaseMysqlConfig extends pulumi.CustomResource { /** * Get an existing DatabaseMysqlConfig 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 DatabaseMysqlConfig(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of DatabaseMysqlConfig. 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'] === DatabaseMysqlConfig.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["backupHour"] = state ? state.backupHour : undefined; resourceInputs["backupMinute"] = state ? state.backupMinute : undefined; resourceInputs["binlogRetentionPeriod"] = state ? state.binlogRetentionPeriod : undefined; resourceInputs["clusterId"] = state ? state.clusterId : undefined; resourceInputs["connectTimeout"] = state ? state.connectTimeout : undefined; resourceInputs["defaultTimeZone"] = state ? state.defaultTimeZone : undefined; resourceInputs["groupConcatMaxLen"] = state ? state.groupConcatMaxLen : undefined; resourceInputs["informationSchemaStatsExpiry"] = state ? state.informationSchemaStatsExpiry : undefined; resourceInputs["innodbFtMinTokenSize"] = state ? state.innodbFtMinTokenSize : undefined; resourceInputs["innodbFtServerStopwordTable"] = state ? state.innodbFtServerStopwordTable : undefined; resourceInputs["innodbLockWaitTimeout"] = state ? state.innodbLockWaitTimeout : undefined; resourceInputs["innodbLogBufferSize"] = state ? state.innodbLogBufferSize : undefined; resourceInputs["innodbOnlineAlterLogMaxSize"] = state ? state.innodbOnlineAlterLogMaxSize : undefined; resourceInputs["innodbPrintAllDeadlocks"] = state ? state.innodbPrintAllDeadlocks : undefined; resourceInputs["innodbRollbackOnTimeout"] = state ? state.innodbRollbackOnTimeout : undefined; resourceInputs["interactiveTimeout"] = state ? state.interactiveTimeout : undefined; resourceInputs["internalTmpMemStorageEngine"] = state ? state.internalTmpMemStorageEngine : undefined; resourceInputs["longQueryTime"] = state ? state.longQueryTime : undefined; resourceInputs["maxAllowedPacket"] = state ? state.maxAllowedPacket : undefined; resourceInputs["maxHeapTableSize"] = state ? state.maxHeapTableSize : undefined; resourceInputs["netReadTimeout"] = state ? state.netReadTimeout : undefined; resourceInputs["netWriteTimeout"] = state ? state.netWriteTimeout : undefined; resourceInputs["slowQueryLog"] = state ? state.slowQueryLog : undefined; resourceInputs["sortBufferSize"] = state ? state.sortBufferSize : undefined; resourceInputs["sqlMode"] = state ? state.sqlMode : undefined; resourceInputs["sqlRequirePrimaryKey"] = state ? state.sqlRequirePrimaryKey : undefined; resourceInputs["tmpTableSize"] = state ? state.tmpTableSize : undefined; resourceInputs["waitTimeout"] = state ? state.waitTimeout : undefined; } else { const args = argsOrState; if ((!args || args.clusterId === undefined) && !opts.urn) { throw new Error("Missing required property 'clusterId'"); } resourceInputs["backupHour"] = args ? args.backupHour : undefined; resourceInputs["backupMinute"] = args ? args.backupMinute : undefined; resourceInputs["binlogRetentionPeriod"] = args ? args.binlogRetentionPeriod : undefined; resourceInputs["clusterId"] = args ? args.clusterId : undefined; resourceInputs["connectTimeout"] = args ? args.connectTimeout : undefined; resourceInputs["defaultTimeZone"] = args ? args.defaultTimeZone : undefined; resourceInputs["groupConcatMaxLen"] = args ? args.groupConcatMaxLen : undefined; resourceInputs["informationSchemaStatsExpiry"] = args ? args.informationSchemaStatsExpiry : undefined; resourceInputs["innodbFtMinTokenSize"] = args ? args.innodbFtMinTokenSize : undefined; resourceInputs["innodbFtServerStopwordTable"] = args ? args.innodbFtServerStopwordTable : undefined; resourceInputs["innodbLockWaitTimeout"] = args ? args.innodbLockWaitTimeout : undefined; resourceInputs["innodbLogBufferSize"] = args ? args.innodbLogBufferSize : undefined; resourceInputs["innodbOnlineAlterLogMaxSize"] = args ? args.innodbOnlineAlterLogMaxSize : undefined; resourceInputs["innodbPrintAllDeadlocks"] = args ? args.innodbPrintAllDeadlocks : undefined; resourceInputs["innodbRollbackOnTimeout"] = args ? args.innodbRollbackOnTimeout : undefined; resourceInputs["interactiveTimeout"] = args ? args.interactiveTimeout : undefined; resourceInputs["internalTmpMemStorageEngine"] = args ? args.internalTmpMemStorageEngine : undefined; resourceInputs["longQueryTime"] = args ? args.longQueryTime : undefined; resourceInputs["maxAllowedPacket"] = args ? args.maxAllowedPacket : undefined; resourceInputs["maxHeapTableSize"] = args ? args.maxHeapTableSize : undefined; resourceInputs["netReadTimeout"] = args ? args.netReadTimeout : undefined; resourceInputs["netWriteTimeout"] = args ? args.netWriteTimeout : undefined; resourceInputs["slowQueryLog"] = args ? args.slowQueryLog : undefined; resourceInputs["sortBufferSize"] = args ? args.sortBufferSize : undefined; resourceInputs["sqlMode"] = args ? args.sqlMode : undefined; resourceInputs["sqlRequirePrimaryKey"] = args ? args.sqlRequirePrimaryKey : undefined; resourceInputs["tmpTableSize"] = args ? args.tmpTableSize : undefined; resourceInputs["waitTimeout"] = args ? args.waitTimeout : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(DatabaseMysqlConfig.__pulumiType, name, resourceInputs, opts); } } exports.DatabaseMysqlConfig = DatabaseMysqlConfig; /** @internal */ DatabaseMysqlConfig.__pulumiType = 'digitalocean:index/databaseMysqlConfig:DatabaseMysqlConfig'; //# sourceMappingURL=databaseMysqlConfig.js.map