mysql

This provider is a derived work of the Terraform Provider distributed under MPL 2.0. If you encounter a bug or missing feature, first check the pulumi/pulumi-azure repo; however, if that doesn’t turn up anything, please consult the source terraform-providers/terraform-provider-azurerm repo.

class pulumi_azure.mysql.Configuration(resource_name, opts=None, name=None, resource_group_name=None, server_name=None, value=None, __props__=None, __name__=None, __opts__=None)

Sets a MySQL Configuration value on a MySQL Server.

Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • name (pulumi.Input[str]) – Specifies the name of the MySQL Configuration, which needs to be a valid MySQL configuration name. Changing this forces a new resource to be created.

  • resource_group_name (pulumi.Input[str]) – The name of the resource group in which the MySQL Server exists. Changing this forces a new resource to be created.

  • server_name (pulumi.Input[str]) – Specifies the name of the MySQL Server. Changing this forces a new resource to be created.

  • value (pulumi.Input[str]) – Specifies the value of the MySQL Configuration. See the MySQL documentation for valid values.

name = None

Specifies the name of the MySQL Configuration, which needs to be a valid MySQL configuration name. Changing this forces a new resource to be created.

resource_group_name = None

The name of the resource group in which the MySQL Server exists. Changing this forces a new resource to be created.

server_name = None

Specifies the name of the MySQL Server. Changing this forces a new resource to be created.

value = None

Specifies the value of the MySQL Configuration. See the MySQL documentation for valid values.

static get(resource_name, id, opts=None, name=None, resource_group_name=None, server_name=None, value=None)

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

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • name (pulumi.Input[str]) –

    Specifies the name of the MySQL Configuration, which needs to be a valid MySQL configuration name. Changing this forces a new resource to be created.

  • resource_group_name (pulumi.Input[str]) – The name of the resource group in which the MySQL Server exists. Changing this forces a new resource to be created.

  • server_name (pulumi.Input[str]) – Specifies the name of the MySQL Server. Changing this forces a new resource to be created.

  • value (pulumi.Input[str]) – Specifies the value of the MySQL Configuration. See the MySQL documentation for valid values.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_azure.mysql.Database(resource_name, opts=None, charset=None, collation=None, name=None, resource_group_name=None, server_name=None, __props__=None, __name__=None, __opts__=None)

Manages a MySQL Database within a MySQL Server

Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • charset (pulumi.Input[str]) – Specifies the Charset for the MySQL Database, which needs to be a valid MySQL Charset. Changing this forces a new resource to be created.

  • collation (pulumi.Input[str]) – Specifies the Collation for the MySQL Database, which needs to be a valid MySQL Collation. Changing this forces a new resource to be created.

  • name (pulumi.Input[str]) – Specifies the name of the MySQL Database, which needs to be a valid MySQL identifier. Changing this forces a new resource to be created.

  • resource_group_name (pulumi.Input[str]) – The name of the resource group in which the MySQL Server exists. Changing this forces a new resource to be created.

  • server_name (pulumi.Input[str]) – Specifies the name of the MySQL Server. Changing this forces a new resource to be created.

charset = None

Specifies the Charset for the MySQL Database, which needs to be a valid MySQL Charset. Changing this forces a new resource to be created.

collation = None

Specifies the Collation for the MySQL Database, which needs to be a valid MySQL Collation. Changing this forces a new resource to be created.

name = None

Specifies the name of the MySQL Database, which needs to be a valid MySQL identifier. Changing this forces a new resource to be created.

resource_group_name = None

The name of the resource group in which the MySQL Server exists. Changing this forces a new resource to be created.

server_name = None

Specifies the name of the MySQL Server. Changing this forces a new resource to be created.

static get(resource_name, id, opts=None, charset=None, collation=None, name=None, resource_group_name=None, server_name=None)

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

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • charset (pulumi.Input[str]) –

    Specifies the Charset for the MySQL Database, which needs to be a valid MySQL Charset. Changing this forces a new resource to be created.

  • collation (pulumi.Input[str]) –

    Specifies the Collation for the MySQL Database, which needs to be a valid MySQL Collation. Changing this forces a new resource to be created.

  • name (pulumi.Input[str]) –

    Specifies the name of the MySQL Database, which needs to be a valid MySQL identifier. Changing this forces a new resource to be created.

  • resource_group_name (pulumi.Input[str]) – The name of the resource group in which the MySQL Server exists. Changing this forces a new resource to be created.

  • server_name (pulumi.Input[str]) – Specifies the name of the MySQL Server. Changing this forces a new resource to be created.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_azure.mysql.FirewallRule(resource_name, opts=None, end_ip_address=None, name=None, resource_group_name=None, server_name=None, start_ip_address=None, __props__=None, __name__=None, __opts__=None)

Manages a Firewall Rule for a MySQL Server

Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • end_ip_address (pulumi.Input[str]) – Specifies the End IP Address associated with this Firewall Rule. Changing this forces a new resource to be created.

  • name (pulumi.Input[str]) – Specifies the name of the MySQL Firewall Rule. Changing this forces a new resource to be created.

  • resource_group_name (pulumi.Input[str]) – The name of the resource group in which the MySQL Server exists. Changing this forces a new resource to be created.

  • server_name (pulumi.Input[str]) – Specifies the name of the MySQL Server. Changing this forces a new resource to be created.

  • start_ip_address (pulumi.Input[str]) – Specifies the Start IP Address associated with this Firewall Rule. Changing this forces a new resource to be created.

end_ip_address = None

Specifies the End IP Address associated with this Firewall Rule. Changing this forces a new resource to be created.

name = None

Specifies the name of the MySQL Firewall Rule. Changing this forces a new resource to be created.

resource_group_name = None

The name of the resource group in which the MySQL Server exists. Changing this forces a new resource to be created.

server_name = None

Specifies the name of the MySQL Server. Changing this forces a new resource to be created.

start_ip_address = None

Specifies the Start IP Address associated with this Firewall Rule. Changing this forces a new resource to be created.

static get(resource_name, id, opts=None, end_ip_address=None, name=None, resource_group_name=None, server_name=None, start_ip_address=None)

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

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • end_ip_address (pulumi.Input[str]) – Specifies the End IP Address associated with this Firewall Rule. Changing this forces a new resource to be created.

  • name (pulumi.Input[str]) – Specifies the name of the MySQL Firewall Rule. Changing this forces a new resource to be created.

  • resource_group_name (pulumi.Input[str]) – The name of the resource group in which the MySQL Server exists. Changing this forces a new resource to be created.

  • server_name (pulumi.Input[str]) – Specifies the name of the MySQL Server. Changing this forces a new resource to be created.

  • start_ip_address (pulumi.Input[str]) – Specifies the Start IP Address associated with this Firewall Rule. Changing this forces a new resource to be created.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_azure.mysql.Server(resource_name, opts=None, administrator_login=None, administrator_login_password=None, location=None, name=None, resource_group_name=None, sku=None, ssl_enforcement=None, storage_profile=None, tags=None, version=None, __props__=None, __name__=None, __opts__=None)

Manages a MySQL Server.

Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • administrator_login (pulumi.Input[str]) – The Administrator Login for the MySQL Server. Changing this forces a new resource to be created.

  • administrator_login_password (pulumi.Input[str]) – The Password associated with the administrator_login for the MySQL Server.

  • location (pulumi.Input[str]) – Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

  • name (pulumi.Input[str]) – Specifies the SKU Name for this MySQL Server. The name of the SKU, follows the tier + family + cores pattern (e.g. B_Gen4_1, GP_Gen5_8). For more information see the product documentation.

  • resource_group_name (pulumi.Input[str]) – The name of the resource group in which to create the MySQL Server. Changing this forces a new resource to be created.

  • sku (pulumi.Input[dict]) – A sku block as defined below.

  • ssl_enforcement (pulumi.Input[str]) – Specifies if SSL should be enforced on connections. Possible values are Enabled and Disabled.

  • storage_profile (pulumi.Input[dict]) – A storage_profile block as defined below.

  • tags (pulumi.Input[dict]) – A mapping of tags to assign to the resource.

  • version (pulumi.Input[str]) – Specifies the version of MySQL to use. Valid values are 5.6 and 5.7. Changing this forces a new resource to be created.

The sku object supports the following:

  • capacity (pulumi.Input[float]) - The scale up/out capacity, representing server’s compute units.

  • family (pulumi.Input[str]) - The family of hardware Gen4 or Gen5, before selecting your family check the product documentation for availability in your region.

  • name (pulumi.Input[str]) - Specifies the SKU Name for this MySQL Server. The name of the SKU, follows the tier + family + cores pattern (e.g. B_Gen4_1, GP_Gen5_8). For more information see the product documentation.

  • tier (pulumi.Input[str]) - The tier of the particular SKU. Possible values are Basic, GeneralPurpose, and MemoryOptimized. For more information see the product documentation.

The storage_profile object supports the following:

  • backupRetentionDays (pulumi.Input[float]) - Backup retention days for the server, supported values are between 7 and 35 days.

  • geoRedundantBackup (pulumi.Input[str]) - Enable Geo-redundant or not for server backup. Valid values for this property are Enabled or Disabled, not supported for the basic tier.

  • storageMb (pulumi.Input[float]) - Max storage allowed for a server. Possible values are between 5120 MB(5GB) and 1048576 MB(1TB) for the Basic SKU and between 5120 MB(5GB) and 4194304 MB(4TB) for General Purpose/Memory Optimized SKUs. For more information see the product documentation.

administrator_login = None

The Administrator Login for the MySQL Server. Changing this forces a new resource to be created.

administrator_login_password = None

The Password associated with the administrator_login for the MySQL Server.

fqdn = None

The FQDN of the MySQL Server.

location = None

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

name = None

Specifies the SKU Name for this MySQL Server. The name of the SKU, follows the tier + family + cores pattern (e.g. B_Gen4_1, GP_Gen5_8). For more information see the product documentation.

resource_group_name = None

The name of the resource group in which to create the MySQL Server. Changing this forces a new resource to be created.

sku = None

A sku block as defined below.

  • capacity (float) - The scale up/out capacity, representing server’s compute units.

  • family (str) - The family of hardware Gen4 or Gen5, before selecting your family check the product documentation for availability in your region.

  • name (str) - Specifies the SKU Name for this MySQL Server. The name of the SKU, follows the tier + family + cores pattern (e.g. B_Gen4_1, GP_Gen5_8). For more information see the product documentation.

  • tier (str) - The tier of the particular SKU. Possible values are Basic, GeneralPurpose, and MemoryOptimized. For more information see the product documentation.

ssl_enforcement = None

Specifies if SSL should be enforced on connections. Possible values are Enabled and Disabled.

storage_profile = None

A storage_profile block as defined below.

  • backupRetentionDays (float) - Backup retention days for the server, supported values are between 7 and 35 days.

  • geoRedundantBackup (str) - Enable Geo-redundant or not for server backup. Valid values for this property are Enabled or Disabled, not supported for the basic tier.

  • storageMb (float) - Max storage allowed for a server. Possible values are between 5120 MB(5GB) and 1048576 MB(1TB) for the Basic SKU and between 5120 MB(5GB) and 4194304 MB(4TB) for General Purpose/Memory Optimized SKUs. For more information see the product documentation.

tags = None

A mapping of tags to assign to the resource.

version = None

Specifies the version of MySQL to use. Valid values are 5.6 and 5.7. Changing this forces a new resource to be created.

static get(resource_name, id, opts=None, administrator_login=None, administrator_login_password=None, fqdn=None, location=None, name=None, resource_group_name=None, sku=None, ssl_enforcement=None, storage_profile=None, tags=None, version=None)

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

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • administrator_login (pulumi.Input[str]) – The Administrator Login for the MySQL Server. Changing this forces a new resource to be created.

  • administrator_login_password (pulumi.Input[str]) – The Password associated with the administrator_login for the MySQL Server.

  • fqdn (pulumi.Input[str]) – The FQDN of the MySQL Server.

  • location (pulumi.Input[str]) – Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

  • name (pulumi.Input[str]) –

    Specifies the SKU Name for this MySQL Server. The name of the SKU, follows the tier + family + cores pattern (e.g. B_Gen4_1, GP_Gen5_8). For more information see the product documentation.

  • resource_group_name (pulumi.Input[str]) – The name of the resource group in which to create the MySQL Server. Changing this forces a new resource to be created.

  • sku (pulumi.Input[dict]) – A sku block as defined below.

  • ssl_enforcement (pulumi.Input[str]) – Specifies if SSL should be enforced on connections. Possible values are Enabled and Disabled.

  • storage_profile (pulumi.Input[dict]) – A storage_profile block as defined below.

  • tags (pulumi.Input[dict]) – A mapping of tags to assign to the resource.

  • version (pulumi.Input[str]) – Specifies the version of MySQL to use. Valid values are 5.6 and 5.7. Changing this forces a new resource to be created.

The sku object supports the following:

  • capacity (pulumi.Input[float]) - The scale up/out capacity, representing server’s compute units.

  • family (pulumi.Input[str]) - The family of hardware Gen4 or Gen5, before selecting your family check the product documentation for availability in your region.

  • name (pulumi.Input[str]) - Specifies the SKU Name for this MySQL Server. The name of the SKU, follows the tier + family + cores pattern (e.g. B_Gen4_1, GP_Gen5_8). For more information see the product documentation.

  • tier (pulumi.Input[str]) - The tier of the particular SKU. Possible values are Basic, GeneralPurpose, and MemoryOptimized. For more information see the product documentation.

The storage_profile object supports the following:

  • backupRetentionDays (pulumi.Input[float]) - Backup retention days for the server, supported values are between 7 and 35 days.

  • geoRedundantBackup (pulumi.Input[str]) - Enable Geo-redundant or not for server backup. Valid values for this property are Enabled or Disabled, not supported for the basic tier.

  • storageMb (pulumi.Input[float]) - Max storage allowed for a server. Possible values are between 5120 MB(5GB) and 1048576 MB(1TB) for the Basic SKU and between 5120 MB(5GB) and 4194304 MB(4TB) for General Purpose/Memory Optimized SKUs. For more information see the product documentation.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_azure.mysql.VirtualNetworkRule(resource_name, opts=None, name=None, resource_group_name=None, server_name=None, subnet_id=None, __props__=None, __name__=None, __opts__=None)

Manages a MySQL Virtual Network Rule.

NOTE: MySQL Virtual Network Rules can only be used with SKU Tiers of ``GeneralPurpose` or MemoryOptimized <https://docs.microsoft.com/en-us/azure/mysql/concepts-data-access-and-security-vnet>`_

Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • name (pulumi.Input[str]) – The name of the MySQL Virtual Network Rule. Cannot be empty and must only contain alphanumeric characters and hyphens. Cannot start with a number, and cannot start or end with a hyphen. Changing this forces a new resource to be created.

  • resource_group_name (pulumi.Input[str]) – The name of the resource group where the MySQL server resides. Changing this forces a new resource to be created.

  • server_name (pulumi.Input[str]) – The name of the SQL Server to which this MySQL virtual network rule will be applied to. Changing this forces a new resource to be created.

  • subnet_id (pulumi.Input[str]) – The ID of the subnet that the MySQL server will be connected to.

name = None

The name of the MySQL Virtual Network Rule. Cannot be empty and must only contain alphanumeric characters and hyphens. Cannot start with a number, and cannot start or end with a hyphen. Changing this forces a new resource to be created.

resource_group_name = None

The name of the resource group where the MySQL server resides. Changing this forces a new resource to be created.

server_name = None

The name of the SQL Server to which this MySQL virtual network rule will be applied to. Changing this forces a new resource to be created.

subnet_id = None

The ID of the subnet that the MySQL server will be connected to.

static get(resource_name, id, opts=None, name=None, resource_group_name=None, server_name=None, subnet_id=None)

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

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • name (pulumi.Input[str]) – The name of the MySQL Virtual Network Rule. Cannot be empty and must only contain alphanumeric characters and hyphens. Cannot start with a number, and cannot start or end with a hyphen. Changing this forces a new resource to be created.

  • resource_group_name (pulumi.Input[str]) – The name of the resource group where the MySQL server resides. Changing this forces a new resource to be created.

  • server_name (pulumi.Input[str]) – The name of the SQL Server to which this MySQL virtual network rule will be applied to. Changing this forces a new resource to be created.

  • subnet_id (pulumi.Input[str]) – The ID of the subnet that the MySQL server will be connected to.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str