1. Packages
  2. Yandex
  3. API Docs
  4. MdbMysqlCluster
Yandex v0.13.0 published on Tuesday, Feb 22, 2022 by Pulumi

yandex.MdbMysqlCluster

Explore with Pulumi AI

Manages a MySQL cluster within the Yandex.Cloud. For more information, see the official documentation.

MySQL config

If not specified mysql_config then does not make any changes.

  • sql_mode default value: ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION

some of:
- 1: “ALLOW_INVALID_DATES” - 2: “ANSI_QUOTES” - 3: “ERROR_FOR_DIVISION_BY_ZERO” - 4: “HIGH_NOT_PRECEDENCE” - 5: “IGNORE_SPACE” - 6: “NO_AUTO_VALUE_ON_ZERO” - 7: “NO_BACKSLASH_ESCAPES” - 8: “NO_ENGINE_SUBSTITUTION” - 9: “NO_UNSIGNED_SUBTRACTION” - 10: “NO_ZERO_DATE” - 11: “NO_ZERO_IN_DATE” - 15: “ONLY_FULL_GROUP_BY” - 16: “PAD_CHAR_TO_FULL_LENGTH” - 17: “PIPES_AS_CONCAT” - 18: “REAL_AS_FLOAT” - 19: “STRICT_ALL_TABLES” - 20: “STRICT_TRANS_TABLES” - 21: “TIME_TRUNCATE_FRACTIONAL” - 22: “ANSI” - 23: “TRADITIONAL” - 24: “NO_DIR_IN_CREATE” or:

  • 0: “SQLMODE_UNSPECIFIED”

MysqlConfig 8.0

  • audit_log boolean

  • auto_increment_increment integer

  • auto_increment_offset integer

  • binlog_cache_size integer

  • binlog_group_commit_sync_delay integer

  • binlog_row_image one of:

    • 0: “BINLOG_ROW_IMAGE_UNSPECIFIED”
    • 1: “FULL”
    • 2: “MINIMAL”
    • 3: “NOBLOB”
  • binlog_rows_query_log_events boolean

  • character_set_server text

  • collation_server text

  • default_authentication_plugin one of:

    • 0: “AUTH_PLUGIN_UNSPECIFIED”
    • 1: “MYSQL_NATIVE_PASSWORD”
    • 2: “CACHING_SHA2_PASSWORD”
    • 3: “SHA256_PASSWORD”
  • default_time_zone text

  • explicit_defaults_for_timestamp boolean

  • general_log boolean

  • group_concat_max_len integer

  • innodb_adaptive_hash_index boolean

  • innodb_buffer_pool_size integer

  • innodb_flush_log_at_trx_commit integer

  • innodb_io_capacity integer

  • innodb_io_capacity_max integer

  • innodb_lock_wait_timeout integer

  • innodb_log_buffer_size integer

  • innodb_log_file_size integer

  • innodb_numa_interleave boolean

  • innodb_print_all_deadlocks boolean

  • innodb_purge_threads integer

  • innodb_read_io_threads integer

  • innodb_temp_data_file_max_size integer

  • innodb_thread_concurrency integer

  • innodb_write_io_threads integer

  • join_buffer_size integer

  • long_query_time float

  • max_allowed_packet integer

  • max_connections integer

  • max_heap_table_size integer

  • net_read_timeout integer

  • net_write_timeout integer

  • regexp_time_limit integer

  • rpl_semi_sync_master_wait_for_slave_count integer

  • slave_parallel_type one of:

    • 0: “SLAVE_PARALLEL_TYPE_UNSPECIFIED”
    • 1: “DATABASE”
    • 2: “LOGICAL_CLOCK”
  • slave_parallel_workers integer

  • sort_buffer_size integer

  • sync_binlog integer

  • table_definition_cache integer

  • table_open_cache integer

  • table_open_cache_instances integer

  • thread_cache_size integer

  • thread_stack integer

  • tmp_table_size integer

  • transaction_isolation one of:

    • 0: “TRANSACTION_ISOLATION_UNSPECIFIED”
    • 1: “READ_COMMITTED”
    • 2: “REPEATABLE_READ”
    • 3: “SERIALIZABLE”

MysqlConfig 5.7

  • audit_log boolean

  • auto_increment_increment integer

  • auto_increment_offset integer

  • binlog_cache_size integer

  • binlog_group_commit_sync_delay integer

  • binlog_row_image one of:

    • 0: “BINLOG_ROW_IMAGE_UNSPECIFIED”
    • 1: “FULL”
    • 2: “MINIMAL”
    • 3: “NOBLOB”
  • binlog_rows_query_log_events boolean

  • character_set_server text

  • collation_server text

  • default_authentication_plugin one of:

    • 0: “AUTH_PLUGIN_UNSPECIFIED”
    • 1: “MYSQL_NATIVE_PASSWORD”
    • 2: “CACHING_SHA2_PASSWORD”
    • 3: “SHA256_PASSWORD”
  • default_time_zone text

  • explicit_defaults_for_timestamp boolean

  • general_log boolean

  • group_concat_max_len integer

  • innodb_adaptive_hash_index boolean

  • innodb_buffer_pool_size integer

  • innodb_flush_log_at_trx_commit integer

  • innodb_io_capacity integer

  • innodb_io_capacity_max integer

  • innodb_lock_wait_timeout integer

  • innodb_log_buffer_size integer

  • innodb_log_file_size integer

  • innodb_numa_interleave boolean

  • innodb_print_all_deadlocks boolean

  • innodb_purge_threads integer

  • innodb_read_io_threads integer

  • innodb_temp_data_file_max_size integer

  • innodb_thread_concurrency integer

  • innodb_write_io_threads integer

  • join_buffer_size integer

  • long_query_time float

  • max_allowed_packet integer

  • max_connections integer

  • max_heap_table_size integer

  • net_read_timeout integer

  • net_write_timeout integer

  • rpl_semi_sync_master_wait_for_slave_count integer

  • slave_parallel_type one of:

    • 0: “SLAVE_PARALLEL_TYPE_UNSPECIFIED”
    • 1: “DATABASE”
    • 2: “LOGICAL_CLOCK”
  • slave_parallel_workers integer

  • sort_buffer_size integer

  • sync_binlog integer

  • table_definition_cache integer

  • table_open_cache integer

  • table_open_cache_instances integer

  • thread_cache_size integer

  • thread_stack integer

  • tmp_table_size integer

  • transaction_isolation one of:

    • 0: “TRANSACTION_ISOLATION_UNSPECIFIED”
    • 1: “READ_COMMITTED”
    • 2: “REPEATABLE_READ”
    • 3: “SERIALIZABLE”

Example Usage

Example of creating a Single Node MySQL.

using Pulumi;
using Yandex = Pulumi.Yandex;

class MyStack : Stack
{
    public MyStack()
    {
        var fooVpcNetwork = new Yandex.VpcNetwork("fooVpcNetwork", new Yandex.VpcNetworkArgs
        {
        });
        var fooVpcSubnet = new Yandex.VpcSubnet("fooVpcSubnet", new Yandex.VpcSubnetArgs
        {
            Zone = "ru-central1-a",
            NetworkId = fooVpcNetwork.Id,
            V4CidrBlocks = 
            {
                "10.5.0.0/24",
            },
        });
        var fooMdbMysqlCluster = new Yandex.MdbMysqlCluster("fooMdbMysqlCluster", new Yandex.MdbMysqlClusterArgs
        {
            Environment = "PRESTABLE",
            NetworkId = fooVpcNetwork.Id,
            Version = "8.0",
            Resources = new Yandex.Inputs.MdbMysqlClusterResourcesArgs
            {
                ResourcePresetId = "s2.micro",
                DiskTypeId = "network-ssd",
                DiskSize = 16,
            },
            MysqlConfig = 
            {
                { "sql_mode", "ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION" },
                { "max_connections", "100" },
                { "default_authentication_plugin", "MYSQL_NATIVE_PASSWORD" },
                { "innodb_print_all_deadlocks", "true" },
            },
            Access = new Yandex.Inputs.MdbMysqlClusterAccessArgs
            {
                WebSql = true,
            },
            Databases = 
            {
                new Yandex.Inputs.MdbMysqlClusterDatabaseArgs
                {
                    Name = "db_name",
                },
            },
            Users = 
            {
                new Yandex.Inputs.MdbMysqlClusterUserArgs
                {
                    Name = "user_name",
                    Password = "your_password",
                    Permissions = 
                    {
                        new Yandex.Inputs.MdbMysqlClusterUserPermissionArgs
                        {
                            DatabaseName = "db_name",
                            Roles = 
                            {
                                "ALL",
                            },
                        },
                    },
                },
            },
            Hosts = 
            {
                new Yandex.Inputs.MdbMysqlClusterHostArgs
                {
                    Zone = "ru-central1-a",
                    SubnetId = fooVpcSubnet.Id,
                },
            },
        });
    }

}
Copy
package main

import (
	"github.com/pulumi/pulumi-yandex/sdk/go/yandex"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		fooVpcNetwork, err := yandex.NewVpcNetwork(ctx, "fooVpcNetwork", nil)
		if err != nil {
			return err
		}
		fooVpcSubnet, err := yandex.NewVpcSubnet(ctx, "fooVpcSubnet", &yandex.VpcSubnetArgs{
			Zone:      pulumi.String("ru-central1-a"),
			NetworkId: fooVpcNetwork.ID(),
			V4CidrBlocks: pulumi.StringArray{
				pulumi.String("10.5.0.0/24"),
			},
		})
		if err != nil {
			return err
		}
		_, err = yandex.NewMdbMysqlCluster(ctx, "fooMdbMysqlCluster", &yandex.MdbMysqlClusterArgs{
			Environment: pulumi.String("PRESTABLE"),
			NetworkId:   fooVpcNetwork.ID(),
			Version:     pulumi.String("8.0"),
			Resources: &MdbMysqlClusterResourcesArgs{
				ResourcePresetId: pulumi.String("s2.micro"),
				DiskTypeId:       pulumi.String("network-ssd"),
				DiskSize:         pulumi.Int(16),
			},
			MysqlConfig: pulumi.StringMap{
				"sql_mode":                      pulumi.String("ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION"),
				"max_connections":               pulumi.String("100"),
				"default_authentication_plugin": pulumi.String("MYSQL_NATIVE_PASSWORD"),
				"innodb_print_all_deadlocks":    pulumi.String("true"),
			},
			Access: &MdbMysqlClusterAccessArgs{
				WebSql: pulumi.Bool(true),
			},
			Databases: MdbMysqlClusterDatabaseArray{
				&MdbMysqlClusterDatabaseArgs{
					Name: pulumi.String("db_name"),
				},
			},
			Users: MdbMysqlClusterUserArray{
				&MdbMysqlClusterUserArgs{
					Name:     pulumi.String("user_name"),
					Password: pulumi.String("your_password"),
					Permissions: MdbMysqlClusterUserPermissionArray{
						&MdbMysqlClusterUserPermissionArgs{
							DatabaseName: pulumi.String("db_name"),
							Roles: pulumi.StringArray{
								pulumi.String("ALL"),
							},
						},
					},
				},
			},
			Hosts: MdbMysqlClusterHostArray{
				&MdbMysqlClusterHostArgs{
					Zone:     pulumi.String("ru-central1-a"),
					SubnetId: fooVpcSubnet.ID(),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy

Coming soon!

import * as pulumi from "@pulumi/pulumi";
import * as yandex from "@pulumi/yandex";

const fooVpcNetwork = new yandex.VpcNetwork("fooVpcNetwork", {});
const fooVpcSubnet = new yandex.VpcSubnet("fooVpcSubnet", {
    zone: "ru-central1-a",
    networkId: fooVpcNetwork.id,
    v4CidrBlocks: ["10.5.0.0/24"],
});
const fooMdbMysqlCluster = new yandex.MdbMysqlCluster("fooMdbMysqlCluster", {
    environment: "PRESTABLE",
    networkId: fooVpcNetwork.id,
    version: "8.0",
    resources: {
        resourcePresetId: "s2.micro",
        diskTypeId: "network-ssd",
        diskSize: 16,
    },
    mysqlConfig: {
        sql_mode: "ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION",
        max_connections: 100,
        default_authentication_plugin: "MYSQL_NATIVE_PASSWORD",
        innodb_print_all_deadlocks: true,
    },
    access: {
        webSql: true,
    },
    databases: [{
        name: "db_name",
    }],
    users: [{
        name: "user_name",
        password: "your_password",
        permissions: [{
            databaseName: "db_name",
            roles: ["ALL"],
        }],
    }],
    hosts: [{
        zone: "ru-central1-a",
        subnetId: fooVpcSubnet.id,
    }],
});
Copy
import pulumi
import pulumi_yandex as yandex

foo_vpc_network = yandex.VpcNetwork("fooVpcNetwork")
foo_vpc_subnet = yandex.VpcSubnet("fooVpcSubnet",
    zone="ru-central1-a",
    network_id=foo_vpc_network.id,
    v4_cidr_blocks=["10.5.0.0/24"])
foo_mdb_mysql_cluster = yandex.MdbMysqlCluster("fooMdbMysqlCluster",
    environment="PRESTABLE",
    network_id=foo_vpc_network.id,
    version="8.0",
    resources=yandex.MdbMysqlClusterResourcesArgs(
        resource_preset_id="s2.micro",
        disk_type_id="network-ssd",
        disk_size=16,
    ),
    mysql_config={
        "sql_mode": "ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION",
        "max_connections": "100",
        "default_authentication_plugin": "MYSQL_NATIVE_PASSWORD",
        "innodb_print_all_deadlocks": "true",
    },
    access=yandex.MdbMysqlClusterAccessArgs(
        web_sql=True,
    ),
    databases=[yandex.MdbMysqlClusterDatabaseArgs(
        name="db_name",
    )],
    users=[yandex.MdbMysqlClusterUserArgs(
        name="user_name",
        password="your_password",
        permissions=[yandex.MdbMysqlClusterUserPermissionArgs(
            database_name="db_name",
            roles=["ALL"],
        )],
    )],
    hosts=[yandex.MdbMysqlClusterHostArgs(
        zone="ru-central1-a",
        subnet_id=foo_vpc_subnet.id,
    )])
Copy

Coming soon!

Example of creating a High-Availability(HA) MySQL Cluster.

using Pulumi;
using Yandex = Pulumi.Yandex;

class MyStack : Stack
{
    public MyStack()
    {
        var fooVpcNetwork = new Yandex.VpcNetwork("fooVpcNetwork", new Yandex.VpcNetworkArgs
        {
        });
        var fooVpcSubnet = new Yandex.VpcSubnet("fooVpcSubnet", new Yandex.VpcSubnetArgs
        {
            Zone = "ru-central1-a",
            NetworkId = fooVpcNetwork.Id,
            V4CidrBlocks = 
            {
                "10.1.0.0/24",
            },
        });
        var bar = new Yandex.VpcSubnet("bar", new Yandex.VpcSubnetArgs
        {
            Zone = "ru-central1-b",
            NetworkId = fooVpcNetwork.Id,
            V4CidrBlocks = 
            {
                "10.2.0.0/24",
            },
        });
        var fooMdbMysqlCluster = new Yandex.MdbMysqlCluster("fooMdbMysqlCluster", new Yandex.MdbMysqlClusterArgs
        {
            Environment = "PRESTABLE",
            NetworkId = fooVpcNetwork.Id,
            Version = "8.0",
            Resources = new Yandex.Inputs.MdbMysqlClusterResourcesArgs
            {
                ResourcePresetId = "s2.micro",
                DiskTypeId = "network-ssd",
                DiskSize = 16,
            },
            Databases = 
            {
                new Yandex.Inputs.MdbMysqlClusterDatabaseArgs
                {
                    Name = "db_name",
                },
            },
            MaintenanceWindow = new Yandex.Inputs.MdbMysqlClusterMaintenanceWindowArgs
            {
                Type = "WEEKLY",
                Day = "SAT",
                Hour = 12,
            },
            Users = 
            {
                new Yandex.Inputs.MdbMysqlClusterUserArgs
                {
                    Name = "user_name",
                    Password = "your_password",
                    Permissions = 
                    {
                        new Yandex.Inputs.MdbMysqlClusterUserPermissionArgs
                        {
                            DatabaseName = "db_name",
                            Roles = 
                            {
                                "ALL",
                            },
                        },
                    },
                },
            },
            Hosts = 
            {
                new Yandex.Inputs.MdbMysqlClusterHostArgs
                {
                    Zone = "ru-central1-a",
                    SubnetId = fooVpcSubnet.Id,
                },
                new Yandex.Inputs.MdbMysqlClusterHostArgs
                {
                    Zone = "ru-central1-b",
                    SubnetId = bar.Id,
                },
            },
        });
    }

}
Copy
package main

import (
	"github.com/pulumi/pulumi-yandex/sdk/go/yandex"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		fooVpcNetwork, err := yandex.NewVpcNetwork(ctx, "fooVpcNetwork", nil)
		if err != nil {
			return err
		}
		fooVpcSubnet, err := yandex.NewVpcSubnet(ctx, "fooVpcSubnet", &yandex.VpcSubnetArgs{
			Zone:      pulumi.String("ru-central1-a"),
			NetworkId: fooVpcNetwork.ID(),
			V4CidrBlocks: pulumi.StringArray{
				pulumi.String("10.1.0.0/24"),
			},
		})
		if err != nil {
			return err
		}
		bar, err := yandex.NewVpcSubnet(ctx, "bar", &yandex.VpcSubnetArgs{
			Zone:      pulumi.String("ru-central1-b"),
			NetworkId: fooVpcNetwork.ID(),
			V4CidrBlocks: pulumi.StringArray{
				pulumi.String("10.2.0.0/24"),
			},
		})
		if err != nil {
			return err
		}
		_, err = yandex.NewMdbMysqlCluster(ctx, "fooMdbMysqlCluster", &yandex.MdbMysqlClusterArgs{
			Environment: pulumi.String("PRESTABLE"),
			NetworkId:   fooVpcNetwork.ID(),
			Version:     pulumi.String("8.0"),
			Resources: &MdbMysqlClusterResourcesArgs{
				ResourcePresetId: pulumi.String("s2.micro"),
				DiskTypeId:       pulumi.String("network-ssd"),
				DiskSize:         pulumi.Int(16),
			},
			Databases: MdbMysqlClusterDatabaseArray{
				&MdbMysqlClusterDatabaseArgs{
					Name: pulumi.String("db_name"),
				},
			},
			MaintenanceWindow: &MdbMysqlClusterMaintenanceWindowArgs{
				Type: pulumi.String("WEEKLY"),
				Day:  pulumi.String("SAT"),
				Hour: pulumi.Int(12),
			},
			Users: MdbMysqlClusterUserArray{
				&MdbMysqlClusterUserArgs{
					Name:     pulumi.String("user_name"),
					Password: pulumi.String("your_password"),
					Permissions: MdbMysqlClusterUserPermissionArray{
						&MdbMysqlClusterUserPermissionArgs{
							DatabaseName: pulumi.String("db_name"),
							Roles: pulumi.StringArray{
								pulumi.String("ALL"),
							},
						},
					},
				},
			},
			Hosts: MdbMysqlClusterHostArray{
				&MdbMysqlClusterHostArgs{
					Zone:     pulumi.String("ru-central1-a"),
					SubnetId: fooVpcSubnet.ID(),
				},
				&MdbMysqlClusterHostArgs{
					Zone:     pulumi.String("ru-central1-b"),
					SubnetId: bar.ID(),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy

Coming soon!

import * as pulumi from "@pulumi/pulumi";
import * as yandex from "@pulumi/yandex";

const fooVpcNetwork = new yandex.VpcNetwork("fooVpcNetwork", {});
const fooVpcSubnet = new yandex.VpcSubnet("fooVpcSubnet", {
    zone: "ru-central1-a",
    networkId: fooVpcNetwork.id,
    v4CidrBlocks: ["10.1.0.0/24"],
});
const bar = new yandex.VpcSubnet("bar", {
    zone: "ru-central1-b",
    networkId: fooVpcNetwork.id,
    v4CidrBlocks: ["10.2.0.0/24"],
});
const fooMdbMysqlCluster = new yandex.MdbMysqlCluster("fooMdbMysqlCluster", {
    environment: "PRESTABLE",
    networkId: fooVpcNetwork.id,
    version: "8.0",
    resources: {
        resourcePresetId: "s2.micro",
        diskTypeId: "network-ssd",
        diskSize: 16,
    },
    databases: [{
        name: "db_name",
    }],
    maintenanceWindow: {
        type: "WEEKLY",
        day: "SAT",
        hour: 12,
    },
    users: [{
        name: "user_name",
        password: "your_password",
        permissions: [{
            databaseName: "db_name",
            roles: ["ALL"],
        }],
    }],
    hosts: [
        {
            zone: "ru-central1-a",
            subnetId: fooVpcSubnet.id,
        },
        {
            zone: "ru-central1-b",
            subnetId: bar.id,
        },
    ],
});
Copy
import pulumi
import pulumi_yandex as yandex

foo_vpc_network = yandex.VpcNetwork("fooVpcNetwork")
foo_vpc_subnet = yandex.VpcSubnet("fooVpcSubnet",
    zone="ru-central1-a",
    network_id=foo_vpc_network.id,
    v4_cidr_blocks=["10.1.0.0/24"])
bar = yandex.VpcSubnet("bar",
    zone="ru-central1-b",
    network_id=foo_vpc_network.id,
    v4_cidr_blocks=["10.2.0.0/24"])
foo_mdb_mysql_cluster = yandex.MdbMysqlCluster("fooMdbMysqlCluster",
    environment="PRESTABLE",
    network_id=foo_vpc_network.id,
    version="8.0",
    resources=yandex.MdbMysqlClusterResourcesArgs(
        resource_preset_id="s2.micro",
        disk_type_id="network-ssd",
        disk_size=16,
    ),
    databases=[yandex.MdbMysqlClusterDatabaseArgs(
        name="db_name",
    )],
    maintenance_window=yandex.MdbMysqlClusterMaintenanceWindowArgs(
        type="WEEKLY",
        day="SAT",
        hour=12,
    ),
    users=[yandex.MdbMysqlClusterUserArgs(
        name="user_name",
        password="your_password",
        permissions=[yandex.MdbMysqlClusterUserPermissionArgs(
            database_name="db_name",
            roles=["ALL"],
        )],
    )],
    hosts=[
        yandex.MdbMysqlClusterHostArgs(
            zone="ru-central1-a",
            subnet_id=foo_vpc_subnet.id,
        ),
        yandex.MdbMysqlClusterHostArgs(
            zone="ru-central1-b",
            subnet_id=bar.id,
        ),
    ])
Copy

Coming soon!

Example of creating a MySQL Cluster with cascade replicas: HA-group consist of 'na-1' and 'na-2', cascade replicas form a chain 'na-1' > 'nb-1' > 'nb-2'

using Pulumi;
using Yandex = Pulumi.Yandex;

class MyStack : Stack
{
    public MyStack()
    {
        var fooVpcNetwork = new Yandex.VpcNetwork("fooVpcNetwork", new Yandex.VpcNetworkArgs
        {
        });
        var fooVpcSubnet = new Yandex.VpcSubnet("fooVpcSubnet", new Yandex.VpcSubnetArgs
        {
            Zone = "ru-central1-a",
            NetworkId = fooVpcNetwork.Id,
            V4CidrBlocks = 
            {
                "10.1.0.0/24",
            },
        });
        var bar = new Yandex.VpcSubnet("bar", new Yandex.VpcSubnetArgs
        {
            Zone = "ru-central1-b",
            NetworkId = fooVpcNetwork.Id,
            V4CidrBlocks = 
            {
                "10.2.0.0/24",
            },
        });
        var fooMdbMysqlCluster = new Yandex.MdbMysqlCluster("fooMdbMysqlCluster", new Yandex.MdbMysqlClusterArgs
        {
            Environment = "PRESTABLE",
            NetworkId = fooVpcNetwork.Id,
            Version = "8.0",
            Resources = new Yandex.Inputs.MdbMysqlClusterResourcesArgs
            {
                ResourcePresetId = "s2.micro",
                DiskTypeId = "network-ssd",
                DiskSize = 16,
            },
            Databases = 
            {
                new Yandex.Inputs.MdbMysqlClusterDatabaseArgs
                {
                    Name = "db_name",
                },
            },
            MaintenanceWindow = new Yandex.Inputs.MdbMysqlClusterMaintenanceWindowArgs
            {
                Type = "WEEKLY",
                Day = "SAT",
                Hour = 12,
            },
            Users = 
            {
                new Yandex.Inputs.MdbMysqlClusterUserArgs
                {
                    Name = "user_name",
                    Password = "your_password",
                    Permissions = 
                    {
                        new Yandex.Inputs.MdbMysqlClusterUserPermissionArgs
                        {
                            DatabaseName = "db_name",
                            Roles = 
                            {
                                "ALL",
                            },
                        },
                    },
                },
            },
            Hosts = 
            {
                new Yandex.Inputs.MdbMysqlClusterHostArgs
                {
                    Zone = "ru-central1-a",
                    Name = "na-1",
                    SubnetId = fooVpcSubnet.Id,
                },
                new Yandex.Inputs.MdbMysqlClusterHostArgs
                {
                    Zone = "ru-central1-a",
                    Name = "na-2",
                    SubnetId = fooVpcSubnet.Id,
                },
                new Yandex.Inputs.MdbMysqlClusterHostArgs
                {
                    Zone = "ru-central1-b",
                    Name = "nb-1",
                    ReplicationSourceName = "na-1",
                    SubnetId = bar.Id,
                },
                new Yandex.Inputs.MdbMysqlClusterHostArgs
                {
                    Zone = "ru-central1-b",
                    Name = "nb-2",
                    ReplicationSourceName = "nb-1",
                    SubnetId = bar.Id,
                },
            },
        });
    }

}
Copy
package main

import (
	"github.com/pulumi/pulumi-yandex/sdk/go/yandex"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		fooVpcNetwork, err := yandex.NewVpcNetwork(ctx, "fooVpcNetwork", nil)
		if err != nil {
			return err
		}
		fooVpcSubnet, err := yandex.NewVpcSubnet(ctx, "fooVpcSubnet", &yandex.VpcSubnetArgs{
			Zone:      pulumi.String("ru-central1-a"),
			NetworkId: fooVpcNetwork.ID(),
			V4CidrBlocks: pulumi.StringArray{
				pulumi.String("10.1.0.0/24"),
			},
		})
		if err != nil {
			return err
		}
		bar, err := yandex.NewVpcSubnet(ctx, "bar", &yandex.VpcSubnetArgs{
			Zone:      pulumi.String("ru-central1-b"),
			NetworkId: fooVpcNetwork.ID(),
			V4CidrBlocks: pulumi.StringArray{
				pulumi.String("10.2.0.0/24"),
			},
		})
		if err != nil {
			return err
		}
		_, err = yandex.NewMdbMysqlCluster(ctx, "fooMdbMysqlCluster", &yandex.MdbMysqlClusterArgs{
			Environment: pulumi.String("PRESTABLE"),
			NetworkId:   fooVpcNetwork.ID(),
			Version:     pulumi.String("8.0"),
			Resources: &MdbMysqlClusterResourcesArgs{
				ResourcePresetId: pulumi.String("s2.micro"),
				DiskTypeId:       pulumi.String("network-ssd"),
				DiskSize:         pulumi.Int(16),
			},
			Databases: MdbMysqlClusterDatabaseArray{
				&MdbMysqlClusterDatabaseArgs{
					Name: pulumi.String("db_name"),
				},
			},
			MaintenanceWindow: &MdbMysqlClusterMaintenanceWindowArgs{
				Type: pulumi.String("WEEKLY"),
				Day:  pulumi.String("SAT"),
				Hour: pulumi.Int(12),
			},
			Users: MdbMysqlClusterUserArray{
				&MdbMysqlClusterUserArgs{
					Name:     pulumi.String("user_name"),
					Password: pulumi.String("your_password"),
					Permissions: MdbMysqlClusterUserPermissionArray{
						&MdbMysqlClusterUserPermissionArgs{
							DatabaseName: pulumi.String("db_name"),
							Roles: pulumi.StringArray{
								pulumi.String("ALL"),
							},
						},
					},
				},
			},
			Hosts: MdbMysqlClusterHostArray{
				&MdbMysqlClusterHostArgs{
					Zone:     pulumi.String("ru-central1-a"),
					Name:     pulumi.String("na-1"),
					SubnetId: fooVpcSubnet.ID(),
				},
				&MdbMysqlClusterHostArgs{
					Zone:     pulumi.String("ru-central1-a"),
					Name:     pulumi.String("na-2"),
					SubnetId: fooVpcSubnet.ID(),
				},
				&MdbMysqlClusterHostArgs{
					Zone:                  pulumi.String("ru-central1-b"),
					Name:                  pulumi.String("nb-1"),
					ReplicationSourceName: pulumi.String("na-1"),
					SubnetId:              bar.ID(),
				},
				&MdbMysqlClusterHostArgs{
					Zone:                  pulumi.String("ru-central1-b"),
					Name:                  pulumi.String("nb-2"),
					ReplicationSourceName: pulumi.String("nb-1"),
					SubnetId:              bar.ID(),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy

Coming soon!

import * as pulumi from "@pulumi/pulumi";
import * as yandex from "@pulumi/yandex";

const fooVpcNetwork = new yandex.VpcNetwork("fooVpcNetwork", {});
const fooVpcSubnet = new yandex.VpcSubnet("fooVpcSubnet", {
    zone: "ru-central1-a",
    networkId: fooVpcNetwork.id,
    v4CidrBlocks: ["10.1.0.0/24"],
});
const bar = new yandex.VpcSubnet("bar", {
    zone: "ru-central1-b",
    networkId: fooVpcNetwork.id,
    v4CidrBlocks: ["10.2.0.0/24"],
});
const fooMdbMysqlCluster = new yandex.MdbMysqlCluster("fooMdbMysqlCluster", {
    environment: "PRESTABLE",
    networkId: fooVpcNetwork.id,
    version: "8.0",
    resources: {
        resourcePresetId: "s2.micro",
        diskTypeId: "network-ssd",
        diskSize: 16,
    },
    databases: [{
        name: "db_name",
    }],
    maintenanceWindow: {
        type: "WEEKLY",
        day: "SAT",
        hour: 12,
    },
    users: [{
        name: "user_name",
        password: "your_password",
        permissions: [{
            databaseName: "db_name",
            roles: ["ALL"],
        }],
    }],
    hosts: [
        {
            zone: "ru-central1-a",
            name: "na-1",
            subnetId: fooVpcSubnet.id,
        },
        {
            zone: "ru-central1-a",
            name: "na-2",
            subnetId: fooVpcSubnet.id,
        },
        {
            zone: "ru-central1-b",
            name: "nb-1",
            replicationSourceName: "na-1",
            subnetId: bar.id,
        },
        {
            zone: "ru-central1-b",
            name: "nb-2",
            replicationSourceName: "nb-1",
            subnetId: bar.id,
        },
    ],
});
Copy
import pulumi
import pulumi_yandex as yandex

foo_vpc_network = yandex.VpcNetwork("fooVpcNetwork")
foo_vpc_subnet = yandex.VpcSubnet("fooVpcSubnet",
    zone="ru-central1-a",
    network_id=foo_vpc_network.id,
    v4_cidr_blocks=["10.1.0.0/24"])
bar = yandex.VpcSubnet("bar",
    zone="ru-central1-b",
    network_id=foo_vpc_network.id,
    v4_cidr_blocks=["10.2.0.0/24"])
foo_mdb_mysql_cluster = yandex.MdbMysqlCluster("fooMdbMysqlCluster",
    environment="PRESTABLE",
    network_id=foo_vpc_network.id,
    version="8.0",
    resources=yandex.MdbMysqlClusterResourcesArgs(
        resource_preset_id="s2.micro",
        disk_type_id="network-ssd",
        disk_size=16,
    ),
    databases=[yandex.MdbMysqlClusterDatabaseArgs(
        name="db_name",
    )],
    maintenance_window=yandex.MdbMysqlClusterMaintenanceWindowArgs(
        type="WEEKLY",
        day="SAT",
        hour=12,
    ),
    users=[yandex.MdbMysqlClusterUserArgs(
        name="user_name",
        password="your_password",
        permissions=[yandex.MdbMysqlClusterUserPermissionArgs(
            database_name="db_name",
            roles=["ALL"],
        )],
    )],
    hosts=[
        yandex.MdbMysqlClusterHostArgs(
            zone="ru-central1-a",
            name="na-1",
            subnet_id=foo_vpc_subnet.id,
        ),
        yandex.MdbMysqlClusterHostArgs(
            zone="ru-central1-a",
            name="na-2",
            subnet_id=foo_vpc_subnet.id,
        ),
        yandex.MdbMysqlClusterHostArgs(
            zone="ru-central1-b",
            name="nb-1",
            replication_source_name="na-1",
            subnet_id=bar.id,
        ),
        yandex.MdbMysqlClusterHostArgs(
            zone="ru-central1-b",
            name="nb-2",
            replication_source_name="nb-1",
            subnet_id=bar.id,
        ),
    ])
Copy

Coming soon!

Example of creating a Single Node MySQL with user params.

using Pulumi;
using Yandex = Pulumi.Yandex;

class MyStack : Stack
{
    public MyStack()
    {
        var fooVpcNetwork = new Yandex.VpcNetwork("fooVpcNetwork", new Yandex.VpcNetworkArgs
        {
        });
        var fooVpcSubnet = new Yandex.VpcSubnet("fooVpcSubnet", new Yandex.VpcSubnetArgs
        {
            Zone = "ru-central1-a",
            NetworkId = fooVpcNetwork.Id,
            V4CidrBlocks = 
            {
                "10.5.0.0/24",
            },
        });
        var fooMdbMysqlCluster = new Yandex.MdbMysqlCluster("fooMdbMysqlCluster", new Yandex.MdbMysqlClusterArgs
        {
            Environment = "PRESTABLE",
            NetworkId = fooVpcNetwork.Id,
            Version = "8.0",
            Resources = new Yandex.Inputs.MdbMysqlClusterResourcesArgs
            {
                ResourcePresetId = "s2.micro",
                DiskTypeId = "network-ssd",
                DiskSize = 16,
            },
            Databases = 
            {
                new Yandex.Inputs.MdbMysqlClusterDatabaseArgs
                {
                    Name = "db_name",
                },
            },
            MaintenanceWindow = new Yandex.Inputs.MdbMysqlClusterMaintenanceWindowArgs
            {
                Type = "ANYTIME",
            },
            Users = 
            {
                new Yandex.Inputs.MdbMysqlClusterUserArgs
                {
                    Name = "user_name",
                    Password = "your_password",
                    Permissions = 
                    {
                        new Yandex.Inputs.MdbMysqlClusterUserPermissionArgs
                        {
                            DatabaseName = "db_name",
                            Roles = 
                            {
                                "ALL",
                            },
                        },
                    },
                    ConnectionLimits = new Yandex.Inputs.MdbMysqlClusterUserConnectionLimitsArgs
                    {
                        MaxQuestionsPerHour = 10,
                    },
                    GlobalPermissions = 
                    {
                        "REPLICATION_SLAVE",
                        "PROCESS",
                    },
                    AuthenticationPlugin = "CACHING_SHA2_PASSWORD",
                },
            },
            Hosts = 
            {
                new Yandex.Inputs.MdbMysqlClusterHostArgs
                {
                    Zone = "ru-central1-a",
                    SubnetId = fooVpcSubnet.Id,
                },
            },
        });
    }

}
Copy
package main

import (
	"github.com/pulumi/pulumi-yandex/sdk/go/yandex"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		fooVpcNetwork, err := yandex.NewVpcNetwork(ctx, "fooVpcNetwork", nil)
		if err != nil {
			return err
		}
		fooVpcSubnet, err := yandex.NewVpcSubnet(ctx, "fooVpcSubnet", &yandex.VpcSubnetArgs{
			Zone:      pulumi.String("ru-central1-a"),
			NetworkId: fooVpcNetwork.ID(),
			V4CidrBlocks: pulumi.StringArray{
				pulumi.String("10.5.0.0/24"),
			},
		})
		if err != nil {
			return err
		}
		_, err = yandex.NewMdbMysqlCluster(ctx, "fooMdbMysqlCluster", &yandex.MdbMysqlClusterArgs{
			Environment: pulumi.String("PRESTABLE"),
			NetworkId:   fooVpcNetwork.ID(),
			Version:     pulumi.String("8.0"),
			Resources: &MdbMysqlClusterResourcesArgs{
				ResourcePresetId: pulumi.String("s2.micro"),
				DiskTypeId:       pulumi.String("network-ssd"),
				DiskSize:         pulumi.Int(16),
			},
			Databases: MdbMysqlClusterDatabaseArray{
				&MdbMysqlClusterDatabaseArgs{
					Name: pulumi.String("db_name"),
				},
			},
			MaintenanceWindow: &MdbMysqlClusterMaintenanceWindowArgs{
				Type: pulumi.String("ANYTIME"),
			},
			Users: MdbMysqlClusterUserArray{
				&MdbMysqlClusterUserArgs{
					Name:     pulumi.String("user_name"),
					Password: pulumi.String("your_password"),
					Permissions: MdbMysqlClusterUserPermissionArray{
						&MdbMysqlClusterUserPermissionArgs{
							DatabaseName: pulumi.String("db_name"),
							Roles: pulumi.StringArray{
								pulumi.String("ALL"),
							},
						},
					},
					ConnectionLimits: &MdbMysqlClusterUserConnectionLimitsArgs{
						MaxQuestionsPerHour: pulumi.Int(10),
					},
					GlobalPermissions: pulumi.StringArray{
						pulumi.String("REPLICATION_SLAVE"),
						pulumi.String("PROCESS"),
					},
					AuthenticationPlugin: pulumi.String("CACHING_SHA2_PASSWORD"),
				},
			},
			Hosts: MdbMysqlClusterHostArray{
				&MdbMysqlClusterHostArgs{
					Zone:     pulumi.String("ru-central1-a"),
					SubnetId: fooVpcSubnet.ID(),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy

Coming soon!

import * as pulumi from "@pulumi/pulumi";
import * as yandex from "@pulumi/yandex";

const fooVpcNetwork = new yandex.VpcNetwork("fooVpcNetwork", {});
const fooVpcSubnet = new yandex.VpcSubnet("fooVpcSubnet", {
    zone: "ru-central1-a",
    networkId: fooVpcNetwork.id,
    v4CidrBlocks: ["10.5.0.0/24"],
});
const fooMdbMysqlCluster = new yandex.MdbMysqlCluster("fooMdbMysqlCluster", {
    environment: "PRESTABLE",
    networkId: fooVpcNetwork.id,
    version: "8.0",
    resources: {
        resourcePresetId: "s2.micro",
        diskTypeId: "network-ssd",
        diskSize: 16,
    },
    databases: [{
        name: "db_name",
    }],
    maintenanceWindow: {
        type: "ANYTIME",
    },
    users: [{
        name: "user_name",
        password: "your_password",
        permissions: [{
            databaseName: "db_name",
            roles: ["ALL"],
        }],
        connectionLimits: {
            maxQuestionsPerHour: 10,
        },
        globalPermissions: [
            "REPLICATION_SLAVE",
            "PROCESS",
        ],
        authenticationPlugin: "CACHING_SHA2_PASSWORD",
    }],
    hosts: [{
        zone: "ru-central1-a",
        subnetId: fooVpcSubnet.id,
    }],
});
Copy
import pulumi
import pulumi_yandex as yandex

foo_vpc_network = yandex.VpcNetwork("fooVpcNetwork")
foo_vpc_subnet = yandex.VpcSubnet("fooVpcSubnet",
    zone="ru-central1-a",
    network_id=foo_vpc_network.id,
    v4_cidr_blocks=["10.5.0.0/24"])
foo_mdb_mysql_cluster = yandex.MdbMysqlCluster("fooMdbMysqlCluster",
    environment="PRESTABLE",
    network_id=foo_vpc_network.id,
    version="8.0",
    resources=yandex.MdbMysqlClusterResourcesArgs(
        resource_preset_id="s2.micro",
        disk_type_id="network-ssd",
        disk_size=16,
    ),
    databases=[yandex.MdbMysqlClusterDatabaseArgs(
        name="db_name",
    )],
    maintenance_window=yandex.MdbMysqlClusterMaintenanceWindowArgs(
        type="ANYTIME",
    ),
    users=[yandex.MdbMysqlClusterUserArgs(
        name="user_name",
        password="your_password",
        permissions=[yandex.MdbMysqlClusterUserPermissionArgs(
            database_name="db_name",
            roles=["ALL"],
        )],
        connection_limits=yandex.MdbMysqlClusterUserConnectionLimitsArgs(
            max_questions_per_hour=10,
        ),
        global_permissions=[
            "REPLICATION_SLAVE",
            "PROCESS",
        ],
        authentication_plugin="CACHING_SHA2_PASSWORD",
    )],
    hosts=[yandex.MdbMysqlClusterHostArgs(
        zone="ru-central1-a",
        subnet_id=foo_vpc_subnet.id,
    )])
Copy

Coming soon!

Example of restoring MySQL cluster.

using Pulumi;
using Yandex = Pulumi.Yandex;

class MyStack : Stack
{
    public MyStack()
    {
        var fooVpcNetwork = new Yandex.VpcNetwork("fooVpcNetwork", new Yandex.VpcNetworkArgs
        {
        });
        var fooVpcSubnet = new Yandex.VpcSubnet("fooVpcSubnet", new Yandex.VpcSubnetArgs
        {
            Zone = "ru-central1-a",
            NetworkId = fooVpcNetwork.Id,
            V4CidrBlocks = 
            {
                "10.5.0.0/24",
            },
        });
        var fooMdbMysqlCluster = new Yandex.MdbMysqlCluster("fooMdbMysqlCluster", new Yandex.MdbMysqlClusterArgs
        {
            Environment = "PRESTABLE",
            NetworkId = fooVpcNetwork.Id,
            Version = "8.0",
            Restore = new Yandex.Inputs.MdbMysqlClusterRestoreArgs
            {
                BackupId = "c9qj2tns23432471d9qha:stream_20210122T141717Z",
                Time = "2021-01-23T15:04:05",
            },
            Resources = new Yandex.Inputs.MdbMysqlClusterResourcesArgs
            {
                ResourcePresetId = "s2.micro",
                DiskTypeId = "network-ssd",
                DiskSize = 16,
            },
            Databases = 
            {
                new Yandex.Inputs.MdbMysqlClusterDatabaseArgs
                {
                    Name = "db_name",
                },
            },
            Users = 
            {
                new Yandex.Inputs.MdbMysqlClusterUserArgs
                {
                    Name = "user_name",
                    Password = "your_password",
                    Permissions = 
                    {
                        new Yandex.Inputs.MdbMysqlClusterUserPermissionArgs
                        {
                            DatabaseName = "db_name",
                            Roles = 
                            {
                                "ALL",
                            },
                        },
                    },
                },
            },
            Hosts = 
            {
                new Yandex.Inputs.MdbMysqlClusterHostArgs
                {
                    Zone = "ru-central1-a",
                    SubnetId = fooVpcSubnet.Id,
                },
            },
        });
    }

}
Copy
package main

import (
	"github.com/pulumi/pulumi-yandex/sdk/go/yandex"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		fooVpcNetwork, err := yandex.NewVpcNetwork(ctx, "fooVpcNetwork", nil)
		if err != nil {
			return err
		}
		fooVpcSubnet, err := yandex.NewVpcSubnet(ctx, "fooVpcSubnet", &yandex.VpcSubnetArgs{
			Zone:      pulumi.String("ru-central1-a"),
			NetworkId: fooVpcNetwork.ID(),
			V4CidrBlocks: pulumi.StringArray{
				pulumi.String("10.5.0.0/24"),
			},
		})
		if err != nil {
			return err
		}
		_, err = yandex.NewMdbMysqlCluster(ctx, "fooMdbMysqlCluster", &yandex.MdbMysqlClusterArgs{
			Environment: pulumi.String("PRESTABLE"),
			NetworkId:   fooVpcNetwork.ID(),
			Version:     pulumi.String("8.0"),
			Restore: &MdbMysqlClusterRestoreArgs{
				BackupId: pulumi.String("c9qj2tns23432471d9qha:stream_20210122T141717Z"),
				Time:     pulumi.String("2021-01-23T15:04:05"),
			},
			Resources: &MdbMysqlClusterResourcesArgs{
				ResourcePresetId: pulumi.String("s2.micro"),
				DiskTypeId:       pulumi.String("network-ssd"),
				DiskSize:         pulumi.Int(16),
			},
			Databases: MdbMysqlClusterDatabaseArray{
				&MdbMysqlClusterDatabaseArgs{
					Name: pulumi.String("db_name"),
				},
			},
			Users: MdbMysqlClusterUserArray{
				&MdbMysqlClusterUserArgs{
					Name:     pulumi.String("user_name"),
					Password: pulumi.String("your_password"),
					Permissions: MdbMysqlClusterUserPermissionArray{
						&MdbMysqlClusterUserPermissionArgs{
							DatabaseName: pulumi.String("db_name"),
							Roles: pulumi.StringArray{
								pulumi.String("ALL"),
							},
						},
					},
				},
			},
			Hosts: MdbMysqlClusterHostArray{
				&MdbMysqlClusterHostArgs{
					Zone:     pulumi.String("ru-central1-a"),
					SubnetId: fooVpcSubnet.ID(),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy

Coming soon!

import * as pulumi from "@pulumi/pulumi";
import * as yandex from "@pulumi/yandex";

const fooVpcNetwork = new yandex.VpcNetwork("fooVpcNetwork", {});
const fooVpcSubnet = new yandex.VpcSubnet("fooVpcSubnet", {
    zone: "ru-central1-a",
    networkId: fooVpcNetwork.id,
    v4CidrBlocks: ["10.5.0.0/24"],
});
const fooMdbMysqlCluster = new yandex.MdbMysqlCluster("fooMdbMysqlCluster", {
    environment: "PRESTABLE",
    networkId: fooVpcNetwork.id,
    version: "8.0",
    restore: {
        backupId: "c9qj2tns23432471d9qha:stream_20210122T141717Z",
        time: "2021-01-23T15:04:05",
    },
    resources: {
        resourcePresetId: "s2.micro",
        diskTypeId: "network-ssd",
        diskSize: 16,
    },
    databases: [{
        name: "db_name",
    }],
    users: [{
        name: "user_name",
        password: "your_password",
        permissions: [{
            databaseName: "db_name",
            roles: ["ALL"],
        }],
    }],
    hosts: [{
        zone: "ru-central1-a",
        subnetId: fooVpcSubnet.id,
    }],
});
Copy
import pulumi
import pulumi_yandex as yandex

foo_vpc_network = yandex.VpcNetwork("fooVpcNetwork")
foo_vpc_subnet = yandex.VpcSubnet("fooVpcSubnet",
    zone="ru-central1-a",
    network_id=foo_vpc_network.id,
    v4_cidr_blocks=["10.5.0.0/24"])
foo_mdb_mysql_cluster = yandex.MdbMysqlCluster("fooMdbMysqlCluster",
    environment="PRESTABLE",
    network_id=foo_vpc_network.id,
    version="8.0",
    restore=yandex.MdbMysqlClusterRestoreArgs(
        backup_id="c9qj2tns23432471d9qha:stream_20210122T141717Z",
        time="2021-01-23T15:04:05",
    ),
    resources=yandex.MdbMysqlClusterResourcesArgs(
        resource_preset_id="s2.micro",
        disk_type_id="network-ssd",
        disk_size=16,
    ),
    databases=[yandex.MdbMysqlClusterDatabaseArgs(
        name="db_name",
    )],
    users=[yandex.MdbMysqlClusterUserArgs(
        name="user_name",
        password="your_password",
        permissions=[yandex.MdbMysqlClusterUserPermissionArgs(
            database_name="db_name",
            roles=["ALL"],
        )],
    )],
    hosts=[yandex.MdbMysqlClusterHostArgs(
        zone="ru-central1-a",
        subnet_id=foo_vpc_subnet.id,
    )])
Copy

Coming soon!

Create MdbMysqlCluster Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new MdbMysqlCluster(name: string, args: MdbMysqlClusterArgs, opts?: CustomResourceOptions);
@overload
def MdbMysqlCluster(resource_name: str,
                    args: MdbMysqlClusterArgs,
                    opts: Optional[ResourceOptions] = None)

@overload
def MdbMysqlCluster(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    hosts: Optional[Sequence[MdbMysqlClusterHostArgs]] = None,
                    version: Optional[str] = None,
                    users: Optional[Sequence[MdbMysqlClusterUserArgs]] = None,
                    databases: Optional[Sequence[MdbMysqlClusterDatabaseArgs]] = None,
                    resources: Optional[MdbMysqlClusterResourcesArgs] = None,
                    network_id: Optional[str] = None,
                    environment: Optional[str] = None,
                    deletion_protection: Optional[bool] = None,
                    folder_id: Optional[str] = None,
                    labels: Optional[Mapping[str, str]] = None,
                    maintenance_window: Optional[MdbMysqlClusterMaintenanceWindowArgs] = None,
                    mysql_config: Optional[Mapping[str, str]] = None,
                    name: Optional[str] = None,
                    description: Optional[str] = None,
                    access: Optional[MdbMysqlClusterAccessArgs] = None,
                    restore: Optional[MdbMysqlClusterRestoreArgs] = None,
                    security_group_ids: Optional[Sequence[str]] = None,
                    backup_window_start: Optional[MdbMysqlClusterBackupWindowStartArgs] = None,
                    allow_regeneration_host: Optional[bool] = None)
func NewMdbMysqlCluster(ctx *Context, name string, args MdbMysqlClusterArgs, opts ...ResourceOption) (*MdbMysqlCluster, error)
public MdbMysqlCluster(string name, MdbMysqlClusterArgs args, CustomResourceOptions? opts = null)
public MdbMysqlCluster(String name, MdbMysqlClusterArgs args)
public MdbMysqlCluster(String name, MdbMysqlClusterArgs args, CustomResourceOptions options)
type: yandex:MdbMysqlCluster
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. MdbMysqlClusterArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. MdbMysqlClusterArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. MdbMysqlClusterArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. MdbMysqlClusterArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. MdbMysqlClusterArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var mdbMysqlClusterResource = new Yandex.MdbMysqlCluster("mdbMysqlClusterResource", new()
{
    Hosts = new[]
    {
        new Yandex.Inputs.MdbMysqlClusterHostArgs
        {
            Zone = "string",
            AssignPublicIp = false,
            Fqdn = "string",
            Name = "string",
            ReplicationSource = "string",
            ReplicationSourceName = "string",
            SubnetId = "string",
        },
    },
    Version = "string",
    Users = new[]
    {
        new Yandex.Inputs.MdbMysqlClusterUserArgs
        {
            Name = "string",
            Password = "string",
            AuthenticationPlugin = "string",
            ConnectionLimits = new Yandex.Inputs.MdbMysqlClusterUserConnectionLimitsArgs
            {
                MaxConnectionsPerHour = 0,
                MaxQuestionsPerHour = 0,
                MaxUpdatesPerHour = 0,
                MaxUserConnections = 0,
            },
            GlobalPermissions = new[]
            {
                "string",
            },
            Permissions = new[]
            {
                new Yandex.Inputs.MdbMysqlClusterUserPermissionArgs
                {
                    DatabaseName = "string",
                    Roles = new[]
                    {
                        "string",
                    },
                },
            },
        },
    },
    Databases = new[]
    {
        new Yandex.Inputs.MdbMysqlClusterDatabaseArgs
        {
            Name = "string",
        },
    },
    Resources = new Yandex.Inputs.MdbMysqlClusterResourcesArgs
    {
        DiskSize = 0,
        DiskTypeId = "string",
        ResourcePresetId = "string",
    },
    NetworkId = "string",
    Environment = "string",
    DeletionProtection = false,
    FolderId = "string",
    Labels = 
    {
        { "string", "string" },
    },
    MaintenanceWindow = new Yandex.Inputs.MdbMysqlClusterMaintenanceWindowArgs
    {
        Type = "string",
        Day = "string",
        Hour = 0,
    },
    MysqlConfig = 
    {
        { "string", "string" },
    },
    Name = "string",
    Description = "string",
    Access = new Yandex.Inputs.MdbMysqlClusterAccessArgs
    {
        DataLens = false,
        WebSql = false,
    },
    Restore = new Yandex.Inputs.MdbMysqlClusterRestoreArgs
    {
        BackupId = "string",
        Time = "string",
    },
    SecurityGroupIds = new[]
    {
        "string",
    },
    BackupWindowStart = new Yandex.Inputs.MdbMysqlClusterBackupWindowStartArgs
    {
        Hours = 0,
        Minutes = 0,
    },
});
Copy
example, err := yandex.NewMdbMysqlCluster(ctx, "mdbMysqlClusterResource", &yandex.MdbMysqlClusterArgs{
	Hosts: yandex.MdbMysqlClusterHostArray{
		&yandex.MdbMysqlClusterHostArgs{
			Zone:                  pulumi.String("string"),
			AssignPublicIp:        pulumi.Bool(false),
			Fqdn:                  pulumi.String("string"),
			Name:                  pulumi.String("string"),
			ReplicationSource:     pulumi.String("string"),
			ReplicationSourceName: pulumi.String("string"),
			SubnetId:              pulumi.String("string"),
		},
	},
	Version: pulumi.String("string"),
	Users: yandex.MdbMysqlClusterUserArray{
		&yandex.MdbMysqlClusterUserArgs{
			Name:                 pulumi.String("string"),
			Password:             pulumi.String("string"),
			AuthenticationPlugin: pulumi.String("string"),
			ConnectionLimits: &yandex.MdbMysqlClusterUserConnectionLimitsArgs{
				MaxConnectionsPerHour: pulumi.Int(0),
				MaxQuestionsPerHour:   pulumi.Int(0),
				MaxUpdatesPerHour:     pulumi.Int(0),
				MaxUserConnections:    pulumi.Int(0),
			},
			GlobalPermissions: pulumi.StringArray{
				pulumi.String("string"),
			},
			Permissions: yandex.MdbMysqlClusterUserPermissionArray{
				&yandex.MdbMysqlClusterUserPermissionArgs{
					DatabaseName: pulumi.String("string"),
					Roles: pulumi.StringArray{
						pulumi.String("string"),
					},
				},
			},
		},
	},
	Databases: yandex.MdbMysqlClusterDatabaseArray{
		&yandex.MdbMysqlClusterDatabaseArgs{
			Name: pulumi.String("string"),
		},
	},
	Resources: &yandex.MdbMysqlClusterResourcesArgs{
		DiskSize:         pulumi.Int(0),
		DiskTypeId:       pulumi.String("string"),
		ResourcePresetId: pulumi.String("string"),
	},
	NetworkId:          pulumi.String("string"),
	Environment:        pulumi.String("string"),
	DeletionProtection: pulumi.Bool(false),
	FolderId:           pulumi.String("string"),
	Labels: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	MaintenanceWindow: &yandex.MdbMysqlClusterMaintenanceWindowArgs{
		Type: pulumi.String("string"),
		Day:  pulumi.String("string"),
		Hour: pulumi.Int(0),
	},
	MysqlConfig: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	Name:        pulumi.String("string"),
	Description: pulumi.String("string"),
	Access: &yandex.MdbMysqlClusterAccessArgs{
		DataLens: pulumi.Bool(false),
		WebSql:   pulumi.Bool(false),
	},
	Restore: &yandex.MdbMysqlClusterRestoreArgs{
		BackupId: pulumi.String("string"),
		Time:     pulumi.String("string"),
	},
	SecurityGroupIds: pulumi.StringArray{
		pulumi.String("string"),
	},
	BackupWindowStart: &yandex.MdbMysqlClusterBackupWindowStartArgs{
		Hours:   pulumi.Int(0),
		Minutes: pulumi.Int(0),
	},
})
Copy
var mdbMysqlClusterResource = new MdbMysqlCluster("mdbMysqlClusterResource", MdbMysqlClusterArgs.builder()
    .hosts(MdbMysqlClusterHostArgs.builder()
        .zone("string")
        .assignPublicIp(false)
        .fqdn("string")
        .name("string")
        .replicationSource("string")
        .replicationSourceName("string")
        .subnetId("string")
        .build())
    .version("string")
    .users(MdbMysqlClusterUserArgs.builder()
        .name("string")
        .password("string")
        .authenticationPlugin("string")
        .connectionLimits(MdbMysqlClusterUserConnectionLimitsArgs.builder()
            .maxConnectionsPerHour(0)
            .maxQuestionsPerHour(0)
            .maxUpdatesPerHour(0)
            .maxUserConnections(0)
            .build())
        .globalPermissions("string")
        .permissions(MdbMysqlClusterUserPermissionArgs.builder()
            .databaseName("string")
            .roles("string")
            .build())
        .build())
    .databases(MdbMysqlClusterDatabaseArgs.builder()
        .name("string")
        .build())
    .resources(MdbMysqlClusterResourcesArgs.builder()
        .diskSize(0)
        .diskTypeId("string")
        .resourcePresetId("string")
        .build())
    .networkId("string")
    .environment("string")
    .deletionProtection(false)
    .folderId("string")
    .labels(Map.of("string", "string"))
    .maintenanceWindow(MdbMysqlClusterMaintenanceWindowArgs.builder()
        .type("string")
        .day("string")
        .hour(0)
        .build())
    .mysqlConfig(Map.of("string", "string"))
    .name("string")
    .description("string")
    .access(MdbMysqlClusterAccessArgs.builder()
        .dataLens(false)
        .webSql(false)
        .build())
    .restore(MdbMysqlClusterRestoreArgs.builder()
        .backupId("string")
        .time("string")
        .build())
    .securityGroupIds("string")
    .backupWindowStart(MdbMysqlClusterBackupWindowStartArgs.builder()
        .hours(0)
        .minutes(0)
        .build())
    .build());
Copy
mdb_mysql_cluster_resource = yandex.MdbMysqlCluster("mdbMysqlClusterResource",
    hosts=[{
        "zone": "string",
        "assign_public_ip": False,
        "fqdn": "string",
        "name": "string",
        "replication_source": "string",
        "replication_source_name": "string",
        "subnet_id": "string",
    }],
    version="string",
    users=[{
        "name": "string",
        "password": "string",
        "authentication_plugin": "string",
        "connection_limits": {
            "max_connections_per_hour": 0,
            "max_questions_per_hour": 0,
            "max_updates_per_hour": 0,
            "max_user_connections": 0,
        },
        "global_permissions": ["string"],
        "permissions": [{
            "database_name": "string",
            "roles": ["string"],
        }],
    }],
    databases=[{
        "name": "string",
    }],
    resources={
        "disk_size": 0,
        "disk_type_id": "string",
        "resource_preset_id": "string",
    },
    network_id="string",
    environment="string",
    deletion_protection=False,
    folder_id="string",
    labels={
        "string": "string",
    },
    maintenance_window={
        "type": "string",
        "day": "string",
        "hour": 0,
    },
    mysql_config={
        "string": "string",
    },
    name="string",
    description="string",
    access={
        "data_lens": False,
        "web_sql": False,
    },
    restore={
        "backup_id": "string",
        "time": "string",
    },
    security_group_ids=["string"],
    backup_window_start={
        "hours": 0,
        "minutes": 0,
    })
Copy
const mdbMysqlClusterResource = new yandex.MdbMysqlCluster("mdbMysqlClusterResource", {
    hosts: [{
        zone: "string",
        assignPublicIp: false,
        fqdn: "string",
        name: "string",
        replicationSource: "string",
        replicationSourceName: "string",
        subnetId: "string",
    }],
    version: "string",
    users: [{
        name: "string",
        password: "string",
        authenticationPlugin: "string",
        connectionLimits: {
            maxConnectionsPerHour: 0,
            maxQuestionsPerHour: 0,
            maxUpdatesPerHour: 0,
            maxUserConnections: 0,
        },
        globalPermissions: ["string"],
        permissions: [{
            databaseName: "string",
            roles: ["string"],
        }],
    }],
    databases: [{
        name: "string",
    }],
    resources: {
        diskSize: 0,
        diskTypeId: "string",
        resourcePresetId: "string",
    },
    networkId: "string",
    environment: "string",
    deletionProtection: false,
    folderId: "string",
    labels: {
        string: "string",
    },
    maintenanceWindow: {
        type: "string",
        day: "string",
        hour: 0,
    },
    mysqlConfig: {
        string: "string",
    },
    name: "string",
    description: "string",
    access: {
        dataLens: false,
        webSql: false,
    },
    restore: {
        backupId: "string",
        time: "string",
    },
    securityGroupIds: ["string"],
    backupWindowStart: {
        hours: 0,
        minutes: 0,
    },
});
Copy
type: yandex:MdbMysqlCluster
properties:
    access:
        dataLens: false
        webSql: false
    backupWindowStart:
        hours: 0
        minutes: 0
    databases:
        - name: string
    deletionProtection: false
    description: string
    environment: string
    folderId: string
    hosts:
        - assignPublicIp: false
          fqdn: string
          name: string
          replicationSource: string
          replicationSourceName: string
          subnetId: string
          zone: string
    labels:
        string: string
    maintenanceWindow:
        day: string
        hour: 0
        type: string
    mysqlConfig:
        string: string
    name: string
    networkId: string
    resources:
        diskSize: 0
        diskTypeId: string
        resourcePresetId: string
    restore:
        backupId: string
        time: string
    securityGroupIds:
        - string
    users:
        - authenticationPlugin: string
          connectionLimits:
            maxConnectionsPerHour: 0
            maxQuestionsPerHour: 0
            maxUpdatesPerHour: 0
            maxUserConnections: 0
          globalPermissions:
            - string
          name: string
          password: string
          permissions:
            - databaseName: string
              roles:
                - string
    version: string
Copy

MdbMysqlCluster Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The MdbMysqlCluster resource accepts the following input properties:

Databases This property is required. List<MdbMysqlClusterDatabase>
A database of the MySQL cluster. The structure is documented below.
Environment This property is required. string
Deployment environment of the MySQL cluster.
Hosts This property is required. List<MdbMysqlClusterHost>
A host of the MySQL cluster. The structure is documented below.
NetworkId This property is required. string
ID of the network, to which the MySQL cluster uses.
Resources This property is required. MdbMysqlClusterResources
Resources allocated to hosts of the MySQL cluster. The structure is documented below.
Users This property is required. List<MdbMysqlClusterUser>
A user of the MySQL cluster. The structure is documented below.
Version This property is required. string
Version of the MySQL cluster. (allowed versions are: 5.7, 8.0)
Access MdbMysqlClusterAccess
Access policy to the MySQL cluster. The structure is documented below.
AllowRegenerationHost bool

Deprecated: You can safely remove this option. There is no need to recreate host if assign_public_ip is changed.

BackupWindowStart MdbMysqlClusterBackupWindowStart
Time to start the daily backup, in the UTC. The structure is documented below.
DeletionProtection bool
Inhibits deletion of the cluster. Can be either true or false.
Description string
Description of the MySQL cluster.
FolderId string
The ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.
Labels Dictionary<string, string>
A set of key/value label pairs to assign to the MySQL cluster.
MaintenanceWindow MdbMysqlClusterMaintenanceWindow
Maintenance policy of the MySQL cluster. The structure is documented below.
MysqlConfig Dictionary<string, string>
MySQL cluster config. Detail info in "MySQL config" section (documented below).
Name string
Host state name. It should be set for all hosts or unset for all hosts. This field can be used by another host, to select which host will be its replication source. Please refer to replication_source_name parameter.
Restore MdbMysqlClusterRestore
The cluster will be created from the specified backup. The structure is documented below.
SecurityGroupIds List<string>
A set of ids of security groups assigned to hosts of the cluster.
Databases This property is required. []MdbMysqlClusterDatabaseArgs
A database of the MySQL cluster. The structure is documented below.
Environment This property is required. string
Deployment environment of the MySQL cluster.
Hosts This property is required. []MdbMysqlClusterHostArgs
A host of the MySQL cluster. The structure is documented below.
NetworkId This property is required. string
ID of the network, to which the MySQL cluster uses.
Resources This property is required. MdbMysqlClusterResourcesArgs
Resources allocated to hosts of the MySQL cluster. The structure is documented below.
Users This property is required. []MdbMysqlClusterUserArgs
A user of the MySQL cluster. The structure is documented below.
Version This property is required. string
Version of the MySQL cluster. (allowed versions are: 5.7, 8.0)
Access MdbMysqlClusterAccessArgs
Access policy to the MySQL cluster. The structure is documented below.
AllowRegenerationHost bool

Deprecated: You can safely remove this option. There is no need to recreate host if assign_public_ip is changed.

BackupWindowStart MdbMysqlClusterBackupWindowStartArgs
Time to start the daily backup, in the UTC. The structure is documented below.
DeletionProtection bool
Inhibits deletion of the cluster. Can be either true or false.
Description string
Description of the MySQL cluster.
FolderId string
The ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.
Labels map[string]string
A set of key/value label pairs to assign to the MySQL cluster.
MaintenanceWindow MdbMysqlClusterMaintenanceWindowArgs
Maintenance policy of the MySQL cluster. The structure is documented below.
MysqlConfig map[string]string
MySQL cluster config. Detail info in "MySQL config" section (documented below).
Name string
Host state name. It should be set for all hosts or unset for all hosts. This field can be used by another host, to select which host will be its replication source. Please refer to replication_source_name parameter.
Restore MdbMysqlClusterRestoreArgs
The cluster will be created from the specified backup. The structure is documented below.
SecurityGroupIds []string
A set of ids of security groups assigned to hosts of the cluster.
databases This property is required. List<MdbMysqlClusterDatabase>
A database of the MySQL cluster. The structure is documented below.
environment This property is required. String
Deployment environment of the MySQL cluster.
hosts This property is required. List<MdbMysqlClusterHost>
A host of the MySQL cluster. The structure is documented below.
networkId This property is required. String
ID of the network, to which the MySQL cluster uses.
resources This property is required. MdbMysqlClusterResources
Resources allocated to hosts of the MySQL cluster. The structure is documented below.
users This property is required. List<MdbMysqlClusterUser>
A user of the MySQL cluster. The structure is documented below.
version This property is required. String
Version of the MySQL cluster. (allowed versions are: 5.7, 8.0)
access MdbMysqlClusterAccess
Access policy to the MySQL cluster. The structure is documented below.
allowRegenerationHost Boolean

Deprecated: You can safely remove this option. There is no need to recreate host if assign_public_ip is changed.

backupWindowStart MdbMysqlClusterBackupWindowStart
Time to start the daily backup, in the UTC. The structure is documented below.
deletionProtection Boolean
Inhibits deletion of the cluster. Can be either true or false.
description String
Description of the MySQL cluster.
folderId String
The ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.
labels Map<String,String>
A set of key/value label pairs to assign to the MySQL cluster.
maintenanceWindow MdbMysqlClusterMaintenanceWindow
Maintenance policy of the MySQL cluster. The structure is documented below.
mysqlConfig Map<String,String>
MySQL cluster config. Detail info in "MySQL config" section (documented below).
name String
Host state name. It should be set for all hosts or unset for all hosts. This field can be used by another host, to select which host will be its replication source. Please refer to replication_source_name parameter.
restore MdbMysqlClusterRestore
The cluster will be created from the specified backup. The structure is documented below.
securityGroupIds List<String>
A set of ids of security groups assigned to hosts of the cluster.
databases This property is required. MdbMysqlClusterDatabase[]
A database of the MySQL cluster. The structure is documented below.
environment This property is required. string
Deployment environment of the MySQL cluster.
hosts This property is required. MdbMysqlClusterHost[]
A host of the MySQL cluster. The structure is documented below.
networkId This property is required. string
ID of the network, to which the MySQL cluster uses.
resources This property is required. MdbMysqlClusterResources
Resources allocated to hosts of the MySQL cluster. The structure is documented below.
users This property is required. MdbMysqlClusterUser[]
A user of the MySQL cluster. The structure is documented below.
version This property is required. string
Version of the MySQL cluster. (allowed versions are: 5.7, 8.0)
access MdbMysqlClusterAccess
Access policy to the MySQL cluster. The structure is documented below.
allowRegenerationHost boolean

Deprecated: You can safely remove this option. There is no need to recreate host if assign_public_ip is changed.

backupWindowStart MdbMysqlClusterBackupWindowStart
Time to start the daily backup, in the UTC. The structure is documented below.
deletionProtection boolean
Inhibits deletion of the cluster. Can be either true or false.
description string
Description of the MySQL cluster.
folderId string
The ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.
labels {[key: string]: string}
A set of key/value label pairs to assign to the MySQL cluster.
maintenanceWindow MdbMysqlClusterMaintenanceWindow
Maintenance policy of the MySQL cluster. The structure is documented below.
mysqlConfig {[key: string]: string}
MySQL cluster config. Detail info in "MySQL config" section (documented below).
name string
Host state name. It should be set for all hosts or unset for all hosts. This field can be used by another host, to select which host will be its replication source. Please refer to replication_source_name parameter.
restore MdbMysqlClusterRestore
The cluster will be created from the specified backup. The structure is documented below.
securityGroupIds string[]
A set of ids of security groups assigned to hosts of the cluster.
databases This property is required. Sequence[MdbMysqlClusterDatabaseArgs]
A database of the MySQL cluster. The structure is documented below.
environment This property is required. str
Deployment environment of the MySQL cluster.
hosts This property is required. Sequence[MdbMysqlClusterHostArgs]
A host of the MySQL cluster. The structure is documented below.
network_id This property is required. str
ID of the network, to which the MySQL cluster uses.
resources This property is required. MdbMysqlClusterResourcesArgs
Resources allocated to hosts of the MySQL cluster. The structure is documented below.
users This property is required. Sequence[MdbMysqlClusterUserArgs]
A user of the MySQL cluster. The structure is documented below.
version This property is required. str
Version of the MySQL cluster. (allowed versions are: 5.7, 8.0)
access MdbMysqlClusterAccessArgs
Access policy to the MySQL cluster. The structure is documented below.
allow_regeneration_host bool

Deprecated: You can safely remove this option. There is no need to recreate host if assign_public_ip is changed.

backup_window_start MdbMysqlClusterBackupWindowStartArgs
Time to start the daily backup, in the UTC. The structure is documented below.
deletion_protection bool
Inhibits deletion of the cluster. Can be either true or false.
description str
Description of the MySQL cluster.
folder_id str
The ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.
labels Mapping[str, str]
A set of key/value label pairs to assign to the MySQL cluster.
maintenance_window MdbMysqlClusterMaintenanceWindowArgs
Maintenance policy of the MySQL cluster. The structure is documented below.
mysql_config Mapping[str, str]
MySQL cluster config. Detail info in "MySQL config" section (documented below).
name str
Host state name. It should be set for all hosts or unset for all hosts. This field can be used by another host, to select which host will be its replication source. Please refer to replication_source_name parameter.
restore MdbMysqlClusterRestoreArgs
The cluster will be created from the specified backup. The structure is documented below.
security_group_ids Sequence[str]
A set of ids of security groups assigned to hosts of the cluster.
databases This property is required. List<Property Map>
A database of the MySQL cluster. The structure is documented below.
environment This property is required. String
Deployment environment of the MySQL cluster.
hosts This property is required. List<Property Map>
A host of the MySQL cluster. The structure is documented below.
networkId This property is required. String
ID of the network, to which the MySQL cluster uses.
resources This property is required. Property Map
Resources allocated to hosts of the MySQL cluster. The structure is documented below.
users This property is required. List<Property Map>
A user of the MySQL cluster. The structure is documented below.
version This property is required. String
Version of the MySQL cluster. (allowed versions are: 5.7, 8.0)
access Property Map
Access policy to the MySQL cluster. The structure is documented below.
allowRegenerationHost Boolean

Deprecated: You can safely remove this option. There is no need to recreate host if assign_public_ip is changed.

backupWindowStart Property Map
Time to start the daily backup, in the UTC. The structure is documented below.
deletionProtection Boolean
Inhibits deletion of the cluster. Can be either true or false.
description String
Description of the MySQL cluster.
folderId String
The ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.
labels Map<String>
A set of key/value label pairs to assign to the MySQL cluster.
maintenanceWindow Property Map
Maintenance policy of the MySQL cluster. The structure is documented below.
mysqlConfig Map<String>
MySQL cluster config. Detail info in "MySQL config" section (documented below).
name String
Host state name. It should be set for all hosts or unset for all hosts. This field can be used by another host, to select which host will be its replication source. Please refer to replication_source_name parameter.
restore Property Map
The cluster will be created from the specified backup. The structure is documented below.
securityGroupIds List<String>
A set of ids of security groups assigned to hosts of the cluster.

Outputs

All input properties are implicitly available as output properties. Additionally, the MdbMysqlCluster resource produces the following output properties:

CreatedAt string
Creation timestamp of the cluster.
Health string
Aggregated health of the cluster.
Id string
The provider-assigned unique ID for this managed resource.
Status string
Status of the cluster.
CreatedAt string
Creation timestamp of the cluster.
Health string
Aggregated health of the cluster.
Id string
The provider-assigned unique ID for this managed resource.
Status string
Status of the cluster.
createdAt String
Creation timestamp of the cluster.
health String
Aggregated health of the cluster.
id String
The provider-assigned unique ID for this managed resource.
status String
Status of the cluster.
createdAt string
Creation timestamp of the cluster.
health string
Aggregated health of the cluster.
id string
The provider-assigned unique ID for this managed resource.
status string
Status of the cluster.
created_at str
Creation timestamp of the cluster.
health str
Aggregated health of the cluster.
id str
The provider-assigned unique ID for this managed resource.
status str
Status of the cluster.
createdAt String
Creation timestamp of the cluster.
health String
Aggregated health of the cluster.
id String
The provider-assigned unique ID for this managed resource.
status String
Status of the cluster.

Look up Existing MdbMysqlCluster Resource

Get an existing MdbMysqlCluster resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: MdbMysqlClusterState, opts?: CustomResourceOptions): MdbMysqlCluster
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        access: Optional[MdbMysqlClusterAccessArgs] = None,
        allow_regeneration_host: Optional[bool] = None,
        backup_window_start: Optional[MdbMysqlClusterBackupWindowStartArgs] = None,
        created_at: Optional[str] = None,
        databases: Optional[Sequence[MdbMysqlClusterDatabaseArgs]] = None,
        deletion_protection: Optional[bool] = None,
        description: Optional[str] = None,
        environment: Optional[str] = None,
        folder_id: Optional[str] = None,
        health: Optional[str] = None,
        hosts: Optional[Sequence[MdbMysqlClusterHostArgs]] = None,
        labels: Optional[Mapping[str, str]] = None,
        maintenance_window: Optional[MdbMysqlClusterMaintenanceWindowArgs] = None,
        mysql_config: Optional[Mapping[str, str]] = None,
        name: Optional[str] = None,
        network_id: Optional[str] = None,
        resources: Optional[MdbMysqlClusterResourcesArgs] = None,
        restore: Optional[MdbMysqlClusterRestoreArgs] = None,
        security_group_ids: Optional[Sequence[str]] = None,
        status: Optional[str] = None,
        users: Optional[Sequence[MdbMysqlClusterUserArgs]] = None,
        version: Optional[str] = None) -> MdbMysqlCluster
func GetMdbMysqlCluster(ctx *Context, name string, id IDInput, state *MdbMysqlClusterState, opts ...ResourceOption) (*MdbMysqlCluster, error)
public static MdbMysqlCluster Get(string name, Input<string> id, MdbMysqlClusterState? state, CustomResourceOptions? opts = null)
public static MdbMysqlCluster get(String name, Output<String> id, MdbMysqlClusterState state, CustomResourceOptions options)
resources:  _:    type: yandex:MdbMysqlCluster    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
Access MdbMysqlClusterAccess
Access policy to the MySQL cluster. The structure is documented below.
AllowRegenerationHost bool

Deprecated: You can safely remove this option. There is no need to recreate host if assign_public_ip is changed.

BackupWindowStart MdbMysqlClusterBackupWindowStart
Time to start the daily backup, in the UTC. The structure is documented below.
CreatedAt string
Creation timestamp of the cluster.
Databases List<MdbMysqlClusterDatabase>
A database of the MySQL cluster. The structure is documented below.
DeletionProtection bool
Inhibits deletion of the cluster. Can be either true or false.
Description string
Description of the MySQL cluster.
Environment string
Deployment environment of the MySQL cluster.
FolderId string
The ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.
Health string
Aggregated health of the cluster.
Hosts List<MdbMysqlClusterHost>
A host of the MySQL cluster. The structure is documented below.
Labels Dictionary<string, string>
A set of key/value label pairs to assign to the MySQL cluster.
MaintenanceWindow MdbMysqlClusterMaintenanceWindow
Maintenance policy of the MySQL cluster. The structure is documented below.
MysqlConfig Dictionary<string, string>
MySQL cluster config. Detail info in "MySQL config" section (documented below).
Name string
Host state name. It should be set for all hosts or unset for all hosts. This field can be used by another host, to select which host will be its replication source. Please refer to replication_source_name parameter.
NetworkId string
ID of the network, to which the MySQL cluster uses.
Resources MdbMysqlClusterResources
Resources allocated to hosts of the MySQL cluster. The structure is documented below.
Restore MdbMysqlClusterRestore
The cluster will be created from the specified backup. The structure is documented below.
SecurityGroupIds List<string>
A set of ids of security groups assigned to hosts of the cluster.
Status string
Status of the cluster.
Users List<MdbMysqlClusterUser>
A user of the MySQL cluster. The structure is documented below.
Version string
Version of the MySQL cluster. (allowed versions are: 5.7, 8.0)
Access MdbMysqlClusterAccessArgs
Access policy to the MySQL cluster. The structure is documented below.
AllowRegenerationHost bool

Deprecated: You can safely remove this option. There is no need to recreate host if assign_public_ip is changed.

BackupWindowStart MdbMysqlClusterBackupWindowStartArgs
Time to start the daily backup, in the UTC. The structure is documented below.
CreatedAt string
Creation timestamp of the cluster.
Databases []MdbMysqlClusterDatabaseArgs
A database of the MySQL cluster. The structure is documented below.
DeletionProtection bool
Inhibits deletion of the cluster. Can be either true or false.
Description string
Description of the MySQL cluster.
Environment string
Deployment environment of the MySQL cluster.
FolderId string
The ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.
Health string
Aggregated health of the cluster.
Hosts []MdbMysqlClusterHostArgs
A host of the MySQL cluster. The structure is documented below.
Labels map[string]string
A set of key/value label pairs to assign to the MySQL cluster.
MaintenanceWindow MdbMysqlClusterMaintenanceWindowArgs
Maintenance policy of the MySQL cluster. The structure is documented below.
MysqlConfig map[string]string
MySQL cluster config. Detail info in "MySQL config" section (documented below).
Name string
Host state name. It should be set for all hosts or unset for all hosts. This field can be used by another host, to select which host will be its replication source. Please refer to replication_source_name parameter.
NetworkId string
ID of the network, to which the MySQL cluster uses.
Resources MdbMysqlClusterResourcesArgs
Resources allocated to hosts of the MySQL cluster. The structure is documented below.
Restore MdbMysqlClusterRestoreArgs
The cluster will be created from the specified backup. The structure is documented below.
SecurityGroupIds []string
A set of ids of security groups assigned to hosts of the cluster.
Status string
Status of the cluster.
Users []MdbMysqlClusterUserArgs
A user of the MySQL cluster. The structure is documented below.
Version string
Version of the MySQL cluster. (allowed versions are: 5.7, 8.0)
access MdbMysqlClusterAccess
Access policy to the MySQL cluster. The structure is documented below.
allowRegenerationHost Boolean

Deprecated: You can safely remove this option. There is no need to recreate host if assign_public_ip is changed.

backupWindowStart MdbMysqlClusterBackupWindowStart
Time to start the daily backup, in the UTC. The structure is documented below.
createdAt String
Creation timestamp of the cluster.
databases List<MdbMysqlClusterDatabase>
A database of the MySQL cluster. The structure is documented below.
deletionProtection Boolean
Inhibits deletion of the cluster. Can be either true or false.
description String
Description of the MySQL cluster.
environment String
Deployment environment of the MySQL cluster.
folderId String
The ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.
health String
Aggregated health of the cluster.
hosts List<MdbMysqlClusterHost>
A host of the MySQL cluster. The structure is documented below.
labels Map<String,String>
A set of key/value label pairs to assign to the MySQL cluster.
maintenanceWindow MdbMysqlClusterMaintenanceWindow
Maintenance policy of the MySQL cluster. The structure is documented below.
mysqlConfig Map<String,String>
MySQL cluster config. Detail info in "MySQL config" section (documented below).
name String
Host state name. It should be set for all hosts or unset for all hosts. This field can be used by another host, to select which host will be its replication source. Please refer to replication_source_name parameter.
networkId String
ID of the network, to which the MySQL cluster uses.
resources MdbMysqlClusterResources
Resources allocated to hosts of the MySQL cluster. The structure is documented below.
restore MdbMysqlClusterRestore
The cluster will be created from the specified backup. The structure is documented below.
securityGroupIds List<String>
A set of ids of security groups assigned to hosts of the cluster.
status String
Status of the cluster.
users List<MdbMysqlClusterUser>
A user of the MySQL cluster. The structure is documented below.
version String
Version of the MySQL cluster. (allowed versions are: 5.7, 8.0)
access MdbMysqlClusterAccess
Access policy to the MySQL cluster. The structure is documented below.
allowRegenerationHost boolean

Deprecated: You can safely remove this option. There is no need to recreate host if assign_public_ip is changed.

backupWindowStart MdbMysqlClusterBackupWindowStart
Time to start the daily backup, in the UTC. The structure is documented below.
createdAt string
Creation timestamp of the cluster.
databases MdbMysqlClusterDatabase[]
A database of the MySQL cluster. The structure is documented below.
deletionProtection boolean
Inhibits deletion of the cluster. Can be either true or false.
description string
Description of the MySQL cluster.
environment string
Deployment environment of the MySQL cluster.
folderId string
The ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.
health string
Aggregated health of the cluster.
hosts MdbMysqlClusterHost[]
A host of the MySQL cluster. The structure is documented below.
labels {[key: string]: string}
A set of key/value label pairs to assign to the MySQL cluster.
maintenanceWindow MdbMysqlClusterMaintenanceWindow
Maintenance policy of the MySQL cluster. The structure is documented below.
mysqlConfig {[key: string]: string}
MySQL cluster config. Detail info in "MySQL config" section (documented below).
name string
Host state name. It should be set for all hosts or unset for all hosts. This field can be used by another host, to select which host will be its replication source. Please refer to replication_source_name parameter.
networkId string
ID of the network, to which the MySQL cluster uses.
resources MdbMysqlClusterResources
Resources allocated to hosts of the MySQL cluster. The structure is documented below.
restore MdbMysqlClusterRestore
The cluster will be created from the specified backup. The structure is documented below.
securityGroupIds string[]
A set of ids of security groups assigned to hosts of the cluster.
status string
Status of the cluster.
users MdbMysqlClusterUser[]
A user of the MySQL cluster. The structure is documented below.
version string
Version of the MySQL cluster. (allowed versions are: 5.7, 8.0)
access MdbMysqlClusterAccessArgs
Access policy to the MySQL cluster. The structure is documented below.
allow_regeneration_host bool

Deprecated: You can safely remove this option. There is no need to recreate host if assign_public_ip is changed.

backup_window_start MdbMysqlClusterBackupWindowStartArgs
Time to start the daily backup, in the UTC. The structure is documented below.
created_at str
Creation timestamp of the cluster.
databases Sequence[MdbMysqlClusterDatabaseArgs]
A database of the MySQL cluster. The structure is documented below.
deletion_protection bool
Inhibits deletion of the cluster. Can be either true or false.
description str
Description of the MySQL cluster.
environment str
Deployment environment of the MySQL cluster.
folder_id str
The ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.
health str
Aggregated health of the cluster.
hosts Sequence[MdbMysqlClusterHostArgs]
A host of the MySQL cluster. The structure is documented below.
labels Mapping[str, str]
A set of key/value label pairs to assign to the MySQL cluster.
maintenance_window MdbMysqlClusterMaintenanceWindowArgs
Maintenance policy of the MySQL cluster. The structure is documented below.
mysql_config Mapping[str, str]
MySQL cluster config. Detail info in "MySQL config" section (documented below).
name str
Host state name. It should be set for all hosts or unset for all hosts. This field can be used by another host, to select which host will be its replication source. Please refer to replication_source_name parameter.
network_id str
ID of the network, to which the MySQL cluster uses.
resources MdbMysqlClusterResourcesArgs
Resources allocated to hosts of the MySQL cluster. The structure is documented below.
restore MdbMysqlClusterRestoreArgs
The cluster will be created from the specified backup. The structure is documented below.
security_group_ids Sequence[str]
A set of ids of security groups assigned to hosts of the cluster.
status str
Status of the cluster.
users Sequence[MdbMysqlClusterUserArgs]
A user of the MySQL cluster. The structure is documented below.
version str
Version of the MySQL cluster. (allowed versions are: 5.7, 8.0)
access Property Map
Access policy to the MySQL cluster. The structure is documented below.
allowRegenerationHost Boolean

Deprecated: You can safely remove this option. There is no need to recreate host if assign_public_ip is changed.

backupWindowStart Property Map
Time to start the daily backup, in the UTC. The structure is documented below.
createdAt String
Creation timestamp of the cluster.
databases List<Property Map>
A database of the MySQL cluster. The structure is documented below.
deletionProtection Boolean
Inhibits deletion of the cluster. Can be either true or false.
description String
Description of the MySQL cluster.
environment String
Deployment environment of the MySQL cluster.
folderId String
The ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.
health String
Aggregated health of the cluster.
hosts List<Property Map>
A host of the MySQL cluster. The structure is documented below.
labels Map<String>
A set of key/value label pairs to assign to the MySQL cluster.
maintenanceWindow Property Map
Maintenance policy of the MySQL cluster. The structure is documented below.
mysqlConfig Map<String>
MySQL cluster config. Detail info in "MySQL config" section (documented below).
name String
Host state name. It should be set for all hosts or unset for all hosts. This field can be used by another host, to select which host will be its replication source. Please refer to replication_source_name parameter.
networkId String
ID of the network, to which the MySQL cluster uses.
resources Property Map
Resources allocated to hosts of the MySQL cluster. The structure is documented below.
restore Property Map
The cluster will be created from the specified backup. The structure is documented below.
securityGroupIds List<String>
A set of ids of security groups assigned to hosts of the cluster.
status String
Status of the cluster.
users List<Property Map>
A user of the MySQL cluster. The structure is documented below.
version String
Version of the MySQL cluster. (allowed versions are: 5.7, 8.0)

Supporting Types

MdbMysqlClusterAccess
, MdbMysqlClusterAccessArgs

DataLens bool
Allow access for Yandex DataLens.
WebSql bool
Allows access for SQL queries in the management console.
DataLens bool
Allow access for Yandex DataLens.
WebSql bool
Allows access for SQL queries in the management console.
dataLens Boolean
Allow access for Yandex DataLens.
webSql Boolean
Allows access for SQL queries in the management console.
dataLens boolean
Allow access for Yandex DataLens.
webSql boolean
Allows access for SQL queries in the management console.
data_lens bool
Allow access for Yandex DataLens.
web_sql bool
Allows access for SQL queries in the management console.
dataLens Boolean
Allow access for Yandex DataLens.
webSql Boolean
Allows access for SQL queries in the management console.

MdbMysqlClusterBackupWindowStart
, MdbMysqlClusterBackupWindowStartArgs

Hours int
The hour at which backup will be started.
Minutes int
The minute at which backup will be started.
Hours int
The hour at which backup will be started.
Minutes int
The minute at which backup will be started.
hours Integer
The hour at which backup will be started.
minutes Integer
The minute at which backup will be started.
hours number
The hour at which backup will be started.
minutes number
The minute at which backup will be started.
hours int
The hour at which backup will be started.
minutes int
The minute at which backup will be started.
hours Number
The hour at which backup will be started.
minutes Number
The minute at which backup will be started.

MdbMysqlClusterDatabase
, MdbMysqlClusterDatabaseArgs

Name This property is required. string
Host state name. It should be set for all hosts or unset for all hosts. This field can be used by another host, to select which host will be its replication source. Please refer to replication_source_name parameter.
Name This property is required. string
Host state name. It should be set for all hosts or unset for all hosts. This field can be used by another host, to select which host will be its replication source. Please refer to replication_source_name parameter.
name This property is required. String
Host state name. It should be set for all hosts or unset for all hosts. This field can be used by another host, to select which host will be its replication source. Please refer to replication_source_name parameter.
name This property is required. string
Host state name. It should be set for all hosts or unset for all hosts. This field can be used by another host, to select which host will be its replication source. Please refer to replication_source_name parameter.
name This property is required. str
Host state name. It should be set for all hosts or unset for all hosts. This field can be used by another host, to select which host will be its replication source. Please refer to replication_source_name parameter.
name This property is required. String
Host state name. It should be set for all hosts or unset for all hosts. This field can be used by another host, to select which host will be its replication source. Please refer to replication_source_name parameter.

MdbMysqlClusterHost
, MdbMysqlClusterHostArgs

Zone This property is required. string
The availability zone where the MySQL host will be created.
AssignPublicIp bool
Sets whether the host should get a public IP address. It can be changed on the fly only when name is set.
Fqdn string
The fully qualified domain name of the host.
Name string
Host state name. It should be set for all hosts or unset for all hosts. This field can be used by another host, to select which host will be its replication source. Please refer to replication_source_name parameter.
ReplicationSource string
Host replication source (fqdn), when replication_source is empty then host is in HA group.
ReplicationSourceName string
Host replication source name points to host's name from which this host should replicate. When not set then host in HA group. It works only when name is set.
SubnetId string
The ID of the subnet, to which the host belongs. The subnet must be a part of the network to which the cluster belongs.
Zone This property is required. string
The availability zone where the MySQL host will be created.
AssignPublicIp bool
Sets whether the host should get a public IP address. It can be changed on the fly only when name is set.
Fqdn string
The fully qualified domain name of the host.
Name string
Host state name. It should be set for all hosts or unset for all hosts. This field can be used by another host, to select which host will be its replication source. Please refer to replication_source_name parameter.
ReplicationSource string
Host replication source (fqdn), when replication_source is empty then host is in HA group.
ReplicationSourceName string
Host replication source name points to host's name from which this host should replicate. When not set then host in HA group. It works only when name is set.
SubnetId string
The ID of the subnet, to which the host belongs. The subnet must be a part of the network to which the cluster belongs.
zone This property is required. String
The availability zone where the MySQL host will be created.
assignPublicIp Boolean
Sets whether the host should get a public IP address. It can be changed on the fly only when name is set.
fqdn String
The fully qualified domain name of the host.
name String
Host state name. It should be set for all hosts or unset for all hosts. This field can be used by another host, to select which host will be its replication source. Please refer to replication_source_name parameter.
replicationSource String
Host replication source (fqdn), when replication_source is empty then host is in HA group.
replicationSourceName String
Host replication source name points to host's name from which this host should replicate. When not set then host in HA group. It works only when name is set.
subnetId String
The ID of the subnet, to which the host belongs. The subnet must be a part of the network to which the cluster belongs.
zone This property is required. string
The availability zone where the MySQL host will be created.
assignPublicIp boolean
Sets whether the host should get a public IP address. It can be changed on the fly only when name is set.
fqdn string
The fully qualified domain name of the host.
name string
Host state name. It should be set for all hosts or unset for all hosts. This field can be used by another host, to select which host will be its replication source. Please refer to replication_source_name parameter.
replicationSource string
Host replication source (fqdn), when replication_source is empty then host is in HA group.
replicationSourceName string
Host replication source name points to host's name from which this host should replicate. When not set then host in HA group. It works only when name is set.
subnetId string
The ID of the subnet, to which the host belongs. The subnet must be a part of the network to which the cluster belongs.
zone This property is required. str
The availability zone where the MySQL host will be created.
assign_public_ip bool
Sets whether the host should get a public IP address. It can be changed on the fly only when name is set.
fqdn str
The fully qualified domain name of the host.
name str
Host state name. It should be set for all hosts or unset for all hosts. This field can be used by another host, to select which host will be its replication source. Please refer to replication_source_name parameter.
replication_source str
Host replication source (fqdn), when replication_source is empty then host is in HA group.
replication_source_name str
Host replication source name points to host's name from which this host should replicate. When not set then host in HA group. It works only when name is set.
subnet_id str
The ID of the subnet, to which the host belongs. The subnet must be a part of the network to which the cluster belongs.
zone This property is required. String
The availability zone where the MySQL host will be created.
assignPublicIp Boolean
Sets whether the host should get a public IP address. It can be changed on the fly only when name is set.
fqdn String
The fully qualified domain name of the host.
name String
Host state name. It should be set for all hosts or unset for all hosts. This field can be used by another host, to select which host will be its replication source. Please refer to replication_source_name parameter.
replicationSource String
Host replication source (fqdn), when replication_source is empty then host is in HA group.
replicationSourceName String
Host replication source name points to host's name from which this host should replicate. When not set then host in HA group. It works only when name is set.
subnetId String
The ID of the subnet, to which the host belongs. The subnet must be a part of the network to which the cluster belongs.

MdbMysqlClusterMaintenanceWindow
, MdbMysqlClusterMaintenanceWindowArgs

Type This property is required. string
Type of maintenance window. Can be either ANYTIME or WEEKLY. A day and hour of window need to be specified with weekly window.
Day string
Day of the week (in DDD format). Allowed values: "MON", "TUE", "WED", "THU", "FRI", "SAT", "SUN"
Hour int
Hour of the day in UTC (in HH format). Allowed value is between 0 and 23.
Type This property is required. string
Type of maintenance window. Can be either ANYTIME or WEEKLY. A day and hour of window need to be specified with weekly window.
Day string
Day of the week (in DDD format). Allowed values: "MON", "TUE", "WED", "THU", "FRI", "SAT", "SUN"
Hour int
Hour of the day in UTC (in HH format). Allowed value is between 0 and 23.
type This property is required. String
Type of maintenance window. Can be either ANYTIME or WEEKLY. A day and hour of window need to be specified with weekly window.
day String
Day of the week (in DDD format). Allowed values: "MON", "TUE", "WED", "THU", "FRI", "SAT", "SUN"
hour Integer
Hour of the day in UTC (in HH format). Allowed value is between 0 and 23.
type This property is required. string
Type of maintenance window. Can be either ANYTIME or WEEKLY. A day and hour of window need to be specified with weekly window.
day string
Day of the week (in DDD format). Allowed values: "MON", "TUE", "WED", "THU", "FRI", "SAT", "SUN"
hour number
Hour of the day in UTC (in HH format). Allowed value is between 0 and 23.
type This property is required. str
Type of maintenance window. Can be either ANYTIME or WEEKLY. A day and hour of window need to be specified with weekly window.
day str
Day of the week (in DDD format). Allowed values: "MON", "TUE", "WED", "THU", "FRI", "SAT", "SUN"
hour int
Hour of the day in UTC (in HH format). Allowed value is between 0 and 23.
type This property is required. String
Type of maintenance window. Can be either ANYTIME or WEEKLY. A day and hour of window need to be specified with weekly window.
day String
Day of the week (in DDD format). Allowed values: "MON", "TUE", "WED", "THU", "FRI", "SAT", "SUN"
hour Number
Hour of the day in UTC (in HH format). Allowed value is between 0 and 23.

MdbMysqlClusterResources
, MdbMysqlClusterResourcesArgs

DiskSize This property is required. int
Volume of the storage available to a MySQL host, in gigabytes.
DiskTypeId This property is required. string
Type of the storage of MySQL hosts.
ResourcePresetId This property is required. string
DiskSize This property is required. int
Volume of the storage available to a MySQL host, in gigabytes.
DiskTypeId This property is required. string
Type of the storage of MySQL hosts.
ResourcePresetId This property is required. string
diskSize This property is required. Integer
Volume of the storage available to a MySQL host, in gigabytes.
diskTypeId This property is required. String
Type of the storage of MySQL hosts.
resourcePresetId This property is required. String
diskSize This property is required. number
Volume of the storage available to a MySQL host, in gigabytes.
diskTypeId This property is required. string
Type of the storage of MySQL hosts.
resourcePresetId This property is required. string
disk_size This property is required. int
Volume of the storage available to a MySQL host, in gigabytes.
disk_type_id This property is required. str
Type of the storage of MySQL hosts.
resource_preset_id This property is required. str
diskSize This property is required. Number
Volume of the storage available to a MySQL host, in gigabytes.
diskTypeId This property is required. String
Type of the storage of MySQL hosts.
resourcePresetId This property is required. String

MdbMysqlClusterRestore
, MdbMysqlClusterRestoreArgs

BackupId This property is required. string
Backup ID. The cluster will be created from the specified backup. How to get a list of MySQL backups.
Time string
Timestamp of the moment to which the MySQL cluster should be restored. (Format: "2006-01-02T15:04:05" - UTC). When not set, current time is used.
BackupId This property is required. string
Backup ID. The cluster will be created from the specified backup. How to get a list of MySQL backups.
Time string
Timestamp of the moment to which the MySQL cluster should be restored. (Format: "2006-01-02T15:04:05" - UTC). When not set, current time is used.
backupId This property is required. String
Backup ID. The cluster will be created from the specified backup. How to get a list of MySQL backups.
time String
Timestamp of the moment to which the MySQL cluster should be restored. (Format: "2006-01-02T15:04:05" - UTC). When not set, current time is used.
backupId This property is required. string
Backup ID. The cluster will be created from the specified backup. How to get a list of MySQL backups.
time string
Timestamp of the moment to which the MySQL cluster should be restored. (Format: "2006-01-02T15:04:05" - UTC). When not set, current time is used.
backup_id This property is required. str
Backup ID. The cluster will be created from the specified backup. How to get a list of MySQL backups.
time str
Timestamp of the moment to which the MySQL cluster should be restored. (Format: "2006-01-02T15:04:05" - UTC). When not set, current time is used.
backupId This property is required. String
Backup ID. The cluster will be created from the specified backup. How to get a list of MySQL backups.
time String
Timestamp of the moment to which the MySQL cluster should be restored. (Format: "2006-01-02T15:04:05" - UTC). When not set, current time is used.

MdbMysqlClusterUser
, MdbMysqlClusterUserArgs

Name This property is required. string
Host state name. It should be set for all hosts or unset for all hosts. This field can be used by another host, to select which host will be its replication source. Please refer to replication_source_name parameter.
Password This property is required. string
The password of the user.
AuthenticationPlugin string
Authentication plugin. Allowed values: MYSQL_NATIVE_PASSWORD, CACHING_SHA2_PASSWORD, SHA256_PASSWORD (for version 5.7 MYSQL_NATIVE_PASSWORD, SHA256_PASSWORD)
ConnectionLimits MdbMysqlClusterUserConnectionLimits
User's connection limits. The structure is documented below. If the attribute is not specified there will be no changes.
GlobalPermissions List<string>
List user's global permissions
Allowed permissions: REPLICATION_CLIENT, REPLICATION_SLAVE, PROCESS for clear list use empty list. If the attribute is not specified there will be no changes.
Permissions List<MdbMysqlClusterUserPermission>
Set of permissions granted to the user. The structure is documented below.
Name This property is required. string
Host state name. It should be set for all hosts or unset for all hosts. This field can be used by another host, to select which host will be its replication source. Please refer to replication_source_name parameter.
Password This property is required. string
The password of the user.
AuthenticationPlugin string
Authentication plugin. Allowed values: MYSQL_NATIVE_PASSWORD, CACHING_SHA2_PASSWORD, SHA256_PASSWORD (for version 5.7 MYSQL_NATIVE_PASSWORD, SHA256_PASSWORD)
ConnectionLimits MdbMysqlClusterUserConnectionLimits
User's connection limits. The structure is documented below. If the attribute is not specified there will be no changes.
GlobalPermissions []string
List user's global permissions
Allowed permissions: REPLICATION_CLIENT, REPLICATION_SLAVE, PROCESS for clear list use empty list. If the attribute is not specified there will be no changes.
Permissions []MdbMysqlClusterUserPermission
Set of permissions granted to the user. The structure is documented below.
name This property is required. String
Host state name. It should be set for all hosts or unset for all hosts. This field can be used by another host, to select which host will be its replication source. Please refer to replication_source_name parameter.
password This property is required. String
The password of the user.
authenticationPlugin String
Authentication plugin. Allowed values: MYSQL_NATIVE_PASSWORD, CACHING_SHA2_PASSWORD, SHA256_PASSWORD (for version 5.7 MYSQL_NATIVE_PASSWORD, SHA256_PASSWORD)
connectionLimits MdbMysqlClusterUserConnectionLimits
User's connection limits. The structure is documented below. If the attribute is not specified there will be no changes.
globalPermissions List<String>
List user's global permissions
Allowed permissions: REPLICATION_CLIENT, REPLICATION_SLAVE, PROCESS for clear list use empty list. If the attribute is not specified there will be no changes.
permissions List<MdbMysqlClusterUserPermission>
Set of permissions granted to the user. The structure is documented below.
name This property is required. string
Host state name. It should be set for all hosts or unset for all hosts. This field can be used by another host, to select which host will be its replication source. Please refer to replication_source_name parameter.
password This property is required. string
The password of the user.
authenticationPlugin string
Authentication plugin. Allowed values: MYSQL_NATIVE_PASSWORD, CACHING_SHA2_PASSWORD, SHA256_PASSWORD (for version 5.7 MYSQL_NATIVE_PASSWORD, SHA256_PASSWORD)
connectionLimits MdbMysqlClusterUserConnectionLimits
User's connection limits. The structure is documented below. If the attribute is not specified there will be no changes.
globalPermissions string[]
List user's global permissions
Allowed permissions: REPLICATION_CLIENT, REPLICATION_SLAVE, PROCESS for clear list use empty list. If the attribute is not specified there will be no changes.
permissions MdbMysqlClusterUserPermission[]
Set of permissions granted to the user. The structure is documented below.
name This property is required. str
Host state name. It should be set for all hosts or unset for all hosts. This field can be used by another host, to select which host will be its replication source. Please refer to replication_source_name parameter.
password This property is required. str
The password of the user.
authentication_plugin str
Authentication plugin. Allowed values: MYSQL_NATIVE_PASSWORD, CACHING_SHA2_PASSWORD, SHA256_PASSWORD (for version 5.7 MYSQL_NATIVE_PASSWORD, SHA256_PASSWORD)
connection_limits MdbMysqlClusterUserConnectionLimits
User's connection limits. The structure is documented below. If the attribute is not specified there will be no changes.
global_permissions Sequence[str]
List user's global permissions
Allowed permissions: REPLICATION_CLIENT, REPLICATION_SLAVE, PROCESS for clear list use empty list. If the attribute is not specified there will be no changes.
permissions Sequence[MdbMysqlClusterUserPermission]
Set of permissions granted to the user. The structure is documented below.
name This property is required. String
Host state name. It should be set for all hosts or unset for all hosts. This field can be used by another host, to select which host will be its replication source. Please refer to replication_source_name parameter.
password This property is required. String
The password of the user.
authenticationPlugin String
Authentication plugin. Allowed values: MYSQL_NATIVE_PASSWORD, CACHING_SHA2_PASSWORD, SHA256_PASSWORD (for version 5.7 MYSQL_NATIVE_PASSWORD, SHA256_PASSWORD)
connectionLimits Property Map
User's connection limits. The structure is documented below. If the attribute is not specified there will be no changes.
globalPermissions List<String>
List user's global permissions
Allowed permissions: REPLICATION_CLIENT, REPLICATION_SLAVE, PROCESS for clear list use empty list. If the attribute is not specified there will be no changes.
permissions List<Property Map>
Set of permissions granted to the user. The structure is documented below.

MdbMysqlClusterUserConnectionLimits
, MdbMysqlClusterUserConnectionLimitsArgs

MaxConnectionsPerHour int
Max connections per hour.
MaxQuestionsPerHour int
Max questions per hour.
MaxUpdatesPerHour int
Max updates per hour.
MaxUserConnections int
Max user connections.
MaxConnectionsPerHour int
Max connections per hour.
MaxQuestionsPerHour int
Max questions per hour.
MaxUpdatesPerHour int
Max updates per hour.
MaxUserConnections int
Max user connections.
maxConnectionsPerHour Integer
Max connections per hour.
maxQuestionsPerHour Integer
Max questions per hour.
maxUpdatesPerHour Integer
Max updates per hour.
maxUserConnections Integer
Max user connections.
maxConnectionsPerHour number
Max connections per hour.
maxQuestionsPerHour number
Max questions per hour.
maxUpdatesPerHour number
Max updates per hour.
maxUserConnections number
Max user connections.
max_connections_per_hour int
Max connections per hour.
max_questions_per_hour int
Max questions per hour.
max_updates_per_hour int
Max updates per hour.
max_user_connections int
Max user connections.
maxConnectionsPerHour Number
Max connections per hour.
maxQuestionsPerHour Number
Max questions per hour.
maxUpdatesPerHour Number
Max updates per hour.
maxUserConnections Number
Max user connections.

MdbMysqlClusterUserPermission
, MdbMysqlClusterUserPermissionArgs

DatabaseName This property is required. string
The name of the database that the permission grants access to.
Roles List<string>
List user's roles in the database. Allowed roles: ALL,ALTER,ALTER_ROUTINE,CREATE,CREATE_ROUTINE,CREATE_TEMPORARY_TABLES, CREATE_VIEW,DELETE,DROP,EVENT,EXECUTE,INDEX,INSERT,LOCK_TABLES,SELECT,SHOW_VIEW,TRIGGER,UPDATE.
DatabaseName This property is required. string
The name of the database that the permission grants access to.
Roles []string
List user's roles in the database. Allowed roles: ALL,ALTER,ALTER_ROUTINE,CREATE,CREATE_ROUTINE,CREATE_TEMPORARY_TABLES, CREATE_VIEW,DELETE,DROP,EVENT,EXECUTE,INDEX,INSERT,LOCK_TABLES,SELECT,SHOW_VIEW,TRIGGER,UPDATE.
databaseName This property is required. String
The name of the database that the permission grants access to.
roles List<String>
List user's roles in the database. Allowed roles: ALL,ALTER,ALTER_ROUTINE,CREATE,CREATE_ROUTINE,CREATE_TEMPORARY_TABLES, CREATE_VIEW,DELETE,DROP,EVENT,EXECUTE,INDEX,INSERT,LOCK_TABLES,SELECT,SHOW_VIEW,TRIGGER,UPDATE.
databaseName This property is required. string
The name of the database that the permission grants access to.
roles string[]
List user's roles in the database. Allowed roles: ALL,ALTER,ALTER_ROUTINE,CREATE,CREATE_ROUTINE,CREATE_TEMPORARY_TABLES, CREATE_VIEW,DELETE,DROP,EVENT,EXECUTE,INDEX,INSERT,LOCK_TABLES,SELECT,SHOW_VIEW,TRIGGER,UPDATE.
database_name This property is required. str
The name of the database that the permission grants access to.
roles Sequence[str]
List user's roles in the database. Allowed roles: ALL,ALTER,ALTER_ROUTINE,CREATE,CREATE_ROUTINE,CREATE_TEMPORARY_TABLES, CREATE_VIEW,DELETE,DROP,EVENT,EXECUTE,INDEX,INSERT,LOCK_TABLES,SELECT,SHOW_VIEW,TRIGGER,UPDATE.
databaseName This property is required. String
The name of the database that the permission grants access to.
roles List<String>
List user's roles in the database. Allowed roles: ALL,ALTER,ALTER_ROUTINE,CREATE,CREATE_ROUTINE,CREATE_TEMPORARY_TABLES, CREATE_VIEW,DELETE,DROP,EVENT,EXECUTE,INDEX,INSERT,LOCK_TABLES,SELECT,SHOW_VIEW,TRIGGER,UPDATE.

Import

A cluster can be imported using the id of the resource, e.g.

 $ pulumi import yandex:index/mdbMysqlCluster:MdbMysqlCluster foo cluster_id
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Yandex pulumi/pulumi-yandex
License
Apache-2.0
Notes
This Pulumi package is based on the yandex Terraform Provider.