DatabaseMysqlConfigArgs

data class DatabaseMysqlConfigArgs(val backupHour: Output<Int>? = null, val backupMinute: Output<Int>? = null, val binlogRetentionPeriod: Output<Int>? = null, val clusterId: Output<String>? = null, val connectTimeout: Output<Int>? = null, val defaultTimeZone: Output<String>? = null, val groupConcatMaxLen: Output<Int>? = null, val informationSchemaStatsExpiry: Output<Int>? = null, val innodbFtMinTokenSize: Output<Int>? = null, val innodbFtServerStopwordTable: Output<String>? = null, val innodbLockWaitTimeout: Output<Int>? = null, val innodbLogBufferSize: Output<Int>? = null, val innodbOnlineAlterLogMaxSize: Output<Int>? = null, val innodbPrintAllDeadlocks: Output<Boolean>? = null, val innodbRollbackOnTimeout: Output<Boolean>? = null, val interactiveTimeout: Output<Int>? = null, val internalTmpMemStorageEngine: Output<String>? = null, val longQueryTime: Output<Double>? = null, val maxAllowedPacket: Output<Int>? = null, val maxHeapTableSize: Output<Int>? = null, val netReadTimeout: Output<Int>? = null, val netWriteTimeout: Output<Int>? = null, val slowQueryLog: Output<Boolean>? = null, val sortBufferSize: Output<Int>? = null, val sqlMode: Output<String>? = null, val sqlRequirePrimaryKey: Output<Boolean>? = null, val tmpTableSize: Output<Int>? = null, val waitTimeout: Output<Int>? = null) : ConvertibleToJava<DatabaseMysqlConfigArgs>

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

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 pulumi
import pulumi_digitalocean as digitalocean
example_database_cluster = digitalocean.DatabaseCluster("example",
name="example-mysql-cluster",
engine="mysql",
version="8",
size=digitalocean.DatabaseSlug.D_B_1_VPCU1_GB,
region=digitalocean.Region.NYC1,
node_count=1)
example = digitalocean.DatabaseMysqlConfig("example",
cluster_id=example_database_cluster.id,
connect_timeout=10,
default_time_zone="UTC")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using DigitalOcean = Pulumi.DigitalOcean;
return await Deployment.RunAsync(() =>
{
var exampleDatabaseCluster = new DigitalOcean.DatabaseCluster("example", new()
{
Name = "example-mysql-cluster",
Engine = "mysql",
Version = "8",
Size = DigitalOcean.DatabaseSlug.DB_1VPCU1GB,
Region = DigitalOcean.Region.NYC1,
NodeCount = 1,
});
var example = new DigitalOcean.DatabaseMysqlConfig("example", new()
{
ClusterId = exampleDatabaseCluster.Id,
ConnectTimeout = 10,
DefaultTimeZone = "UTC",
});
});
package main
import (
"github.com/pulumi/pulumi-digitalocean/sdk/v4/go/digitalocean"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleDatabaseCluster, err := digitalocean.NewDatabaseCluster(ctx, "example", &digitalocean.DatabaseClusterArgs{
Name: pulumi.String("example-mysql-cluster"),
Engine: pulumi.String("mysql"),
Version: pulumi.String("8"),
Size: pulumi.String(digitalocean.DatabaseSlug_DB_1VPCU1GB),
Region: pulumi.String(digitalocean.RegionNYC1),
NodeCount: pulumi.Int(1),
})
if err != nil {
return err
}
_, err = digitalocean.NewDatabaseMysqlConfig(ctx, "example", &digitalocean.DatabaseMysqlConfigArgs{
ClusterId: exampleDatabaseCluster.ID(),
ConnectTimeout: pulumi.Int(10),
DefaultTimeZone: pulumi.String("UTC"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.digitalocean.DatabaseCluster;
import com.pulumi.digitalocean.DatabaseClusterArgs;
import com.pulumi.digitalocean.DatabaseMysqlConfig;
import com.pulumi.digitalocean.DatabaseMysqlConfigArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var exampleDatabaseCluster = new DatabaseCluster("exampleDatabaseCluster", DatabaseClusterArgs.builder()
.name("example-mysql-cluster")
.engine("mysql")
.version("8")
.size("db-s-1vcpu-1gb")
.region("nyc1")
.nodeCount(1)
.build());
var example = new DatabaseMysqlConfig("example", DatabaseMysqlConfigArgs.builder()
.clusterId(exampleDatabaseCluster.id())
.connectTimeout(10)
.defaultTimeZone("UTC")
.build());
}
}
resources:
example:
type: digitalocean:DatabaseMysqlConfig
properties:
clusterId: ${exampleDatabaseCluster.id}
connectTimeout: 10
defaultTimeZone: UTC
exampleDatabaseCluster:
type: digitalocean:DatabaseCluster
name: example
properties:
name: example-mysql-cluster
engine: mysql
version: '8'
size: db-s-1vcpu-1gb
region: nyc1
nodeCount: 1

Import

A MySQL database cluster's configuration can be imported using the id the parent cluster, e.g.

$ pulumi import digitalocean:index/databaseMysqlConfig:DatabaseMysqlConfig example 4b62829a-9c42-465b-aaa3-84051048e712

Constructors

Link copied to clipboard
constructor(backupHour: Output<Int>? = null, backupMinute: Output<Int>? = null, binlogRetentionPeriod: Output<Int>? = null, clusterId: Output<String>? = null, connectTimeout: Output<Int>? = null, defaultTimeZone: Output<String>? = null, groupConcatMaxLen: Output<Int>? = null, informationSchemaStatsExpiry: Output<Int>? = null, innodbFtMinTokenSize: Output<Int>? = null, innodbFtServerStopwordTable: Output<String>? = null, innodbLockWaitTimeout: Output<Int>? = null, innodbLogBufferSize: Output<Int>? = null, innodbOnlineAlterLogMaxSize: Output<Int>? = null, innodbPrintAllDeadlocks: Output<Boolean>? = null, innodbRollbackOnTimeout: Output<Boolean>? = null, interactiveTimeout: Output<Int>? = null, internalTmpMemStorageEngine: Output<String>? = null, longQueryTime: Output<Double>? = null, maxAllowedPacket: Output<Int>? = null, maxHeapTableSize: Output<Int>? = null, netReadTimeout: Output<Int>? = null, netWriteTimeout: Output<Int>? = null, slowQueryLog: Output<Boolean>? = null, sortBufferSize: Output<Int>? = null, sqlMode: Output<String>? = null, sqlRequirePrimaryKey: Output<Boolean>? = null, tmpTableSize: Output<Int>? = null, waitTimeout: Output<Int>? = null)

Properties

Link copied to clipboard
val backupHour: Output<Int>? = null

The hour of day (in UTC) when backup for the service starts. New backup only starts if previous backup has already completed.

Link copied to clipboard
val backupMinute: Output<Int>? = null

The minute of the backup hour when backup for the service starts. New backup only starts if previous backup has already completed.

Link copied to clipboard
val binlogRetentionPeriod: Output<Int>? = null

The minimum amount of time, in seconds, to keep binlog entries before deletion. This may be extended for services that require binlog entries for longer than the default, for example if using the MySQL Debezium Kafka connector.

Link copied to clipboard
val clusterId: Output<String>? = null

The ID of the target MySQL cluster.

Link copied to clipboard
val connectTimeout: Output<Int>? = null

The number of seconds that the mysqld server waits for a connect packet before responding with bad handshake.

Link copied to clipboard
val defaultTimeZone: Output<String>? = null

Default server time zone, in the form of an offset from UTC (from -12:00 to +12:00), a time zone name (EST), or SYSTEM to use the MySQL server default.

Link copied to clipboard
val groupConcatMaxLen: Output<Int>? = null

The maximum permitted result length, in bytes, for the GROUP_CONCAT() function.

Link copied to clipboard
val informationSchemaStatsExpiry: Output<Int>? = null

The time, in seconds, before cached statistics expire.

Link copied to clipboard
val innodbFtMinTokenSize: Output<Int>? = null

The minimum length of words that an InnoDB FULLTEXT index stores.

Link copied to clipboard
val innodbFtServerStopwordTable: Output<String>? = null

The InnoDB FULLTEXT index stopword list for all InnoDB tables.

Link copied to clipboard
val innodbLockWaitTimeout: Output<Int>? = null

The time, in seconds, that an InnoDB transaction waits for a row lock. before giving up.

Link copied to clipboard
val innodbLogBufferSize: Output<Int>? = null

The size of the buffer, in bytes, that InnoDB uses to write to the log files. on disk.

Link copied to clipboard
val innodbOnlineAlterLogMaxSize: Output<Int>? = null

The upper limit, in bytes, of the size of the temporary log files used during online DDL operations for InnoDB tables.

Link copied to clipboard
val innodbPrintAllDeadlocks: Output<Boolean>? = null

When enabled, records information about all deadlocks in InnoDB user transactions in the error log. Disabled by default.

Link copied to clipboard
val innodbRollbackOnTimeout: Output<Boolean>? = null

When enabled, transaction timeouts cause InnoDB to abort and roll back the entire transaction.

Link copied to clipboard
val interactiveTimeout: Output<Int>? = null

The time, in seconds, the server waits for activity on an interactive. connection before closing it.

Link copied to clipboard
val internalTmpMemStorageEngine: Output<String>? = null

The storage engine for in-memory internal temporary tables. Supported values are: TempTable, MEMORY.

Link copied to clipboard
val longQueryTime: Output<Double>? = null

The time, in seconds, for a query to take to execute before being captured by slow_query_logs. Default is 10 seconds.

Link copied to clipboard
val maxAllowedPacket: Output<Int>? = null

The size of the largest message, in bytes, that can be received by the server. Default is 67108864 (64M).

Link copied to clipboard
val maxHeapTableSize: Output<Int>? = null

The maximum size, in bytes, of internal in-memory tables. Also set tmp_table_size. Default is 16777216 (16M)

Link copied to clipboard
val netReadTimeout: Output<Int>? = null

The time, in seconds, to wait for more data from an existing connection. aborting the read.

Link copied to clipboard
val netWriteTimeout: Output<Int>? = null

The number of seconds to wait for a block to be written to a connection before aborting the write.

Link copied to clipboard
val slowQueryLog: Output<Boolean>? = null

When enabled, captures slow queries. When disabled, also truncates the mysql.slow_log table. Default is false.

Link copied to clipboard
val sortBufferSize: Output<Int>? = null

The sort buffer size, in bytes, for ORDER BY optimization. Default is 262144. (256K).

Link copied to clipboard
val sqlMode: Output<String>? = null

Global SQL mode. If empty, uses MySQL server defaults. Must only include uppercase alphabetic characters, underscores, and commas.

Link copied to clipboard
val sqlRequirePrimaryKey: Output<Boolean>? = null

Require primary key to be defined for new tables or old tables modified with ALTER TABLE and fail if missing. It is recommended to always have primary keys because various functionality may break if any large table is missing them.

Link copied to clipboard
val tmpTableSize: Output<Int>? = null

The maximum size, in bytes, of internal in-memory tables. Also set max_heap_table_size. Default is 16777216 (16M).

Link copied to clipboard
val waitTimeout: Output<Int>? = null

The number of seconds the server waits for activity on a noninteractive connection before closing it.

Functions

Link copied to clipboard
open override fun toJava(): DatabaseMysqlConfigArgs