This page documents the language specification for the azure package. If you're looking for help working with the inputs, outputs, or functions of azure resources in a Pulumi program, please see the resource documentation for examples and API reference.
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.
Note: Since this resource is provisioned by default, the Azure Provider will not check for the presence of an existing resource prior to attempting to create it.
import pulumi import pulumi_azure as azure example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe") example_server = azure.mysql.Server("exampleServer", location=example_resource_group.location, resource_group_name=example_resource_group.name, sku_name="GP_Gen5_2", storage_profile={ "storage_mb": 5120, "backup_retention_days": 7, "geoRedundantBackup": "Disabled", }, administrator_login="psqladminun", administrator_login_password="H@Sh1CoR3!", version="5.7", ssl_enforcement="Enabled") example_configuration = azure.mysql.Configuration("exampleConfiguration", resource_group_name=example_resource_group.name, server_name=example_server.name, value="600")
- 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: pulumi.Output[str] = 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: pulumi.Output[str] = None¶The name of the resource group in which the MySQL Server exists. Changing this forces a new resource to be created.
server_name: pulumi.Output[str] = None¶Specifies the name of the MySQL Server. Changing this forces a new resource to be created.
value: pulumi.Output[str] = 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
import pulumi import pulumi_azure as azure example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe") example_server = azure.mysql.Server("exampleServer", location=example_resource_group.location, resource_group_name=example_resource_group.name, sku_name="B_Gen5_2", storage_profile={ "storage_mb": 5120, "backup_retention_days": 7, "geoRedundantBackup": "Disabled", }, administrator_login="mysqladminun", administrator_login_password="H@Sh1CoR3!", version="5.7", ssl_enforcement="Enabled") example_database = azure.mysql.Database("exampleDatabase", resource_group_name=example_resource_group.name, server_name=example_server.name, charset="utf8", collation="utf8_unicode_ci")
- 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: pulumi.Output[str] = 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: pulumi.Output[str] = 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: pulumi.Output[str] = 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: pulumi.Output[str] = None¶The name of the resource group in which the MySQL Server exists. Changing this forces a new resource to be created.
server_name: pulumi.Output[str] = 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
import pulumi import pulumi_azure as azure example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe") example_server = azure.mysql.Server("exampleServer") # ... example_firewall_rule = azure.mysql.FirewallRule("exampleFirewallRule", resource_group_name=example_resource_group.name, server_name=example_server.name, start_ip_address="40.112.8.12", end_ip_address="40.112.8.12")
import pulumi import pulumi_azure as azure example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe") example_server = azure.mysql.Server("exampleServer") # ... example_firewall_rule = azure.mysql.FirewallRule("exampleFirewallRule", resource_group_name=example_resource_group.name, server_name=example_server.name, start_ip_address="40.112.0.0", end_ip_address="40.112.255.255")
- 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: pulumi.Output[str] = None¶Specifies the End IP Address associated with this Firewall Rule. Changing this forces a new resource to be created.
name: pulumi.Output[str] = None¶Specifies the name of the MySQL Firewall Rule. Changing this forces a new resource to be created.
resource_group_name: pulumi.Output[str] = None¶The name of the resource group in which the MySQL Server exists. Changing this forces a new resource to be created.
server_name: pulumi.Output[str] = None¶Specifies the name of the MySQL Server. Changing this forces a new resource to be created.
start_ip_address: pulumi.Output[str] = 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, auto_grow_enabled=None, backup_retention_days=None, create_mode=None, creation_source_server_id=None, geo_redundant_backup_enabled=None, infrastructure_encryption_enabled=None, location=None, name=None, public_network_access_enabled=None, resource_group_name=None, restore_point_in_time=None, sku_name=None, ssl_enforcement=None, ssl_enforcement_enabled=None, ssl_minimal_tls_version_enforced=None, storage_mb=None, storage_profile=None, tags=None, version=None, __props__=None, __name__=None, __opts__=None)¶ Manages a MySQL Server.
import pulumi import pulumi_azure as azure example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe") example_server = azure.mysql.Server("exampleServer", location=example_resource_group.location, resource_group_name=example_resource_group.name, administrator_login="mysqladminun", administrator_login_password="H@Sh1CoR3!", sku_name="B_Gen5_2", storage_mb=5120, version="5.7", auto_grow_enabled=True, backup_retention_days=7, geo_redundant_backup_enabled=True, infrastructure_encryption_enabled=True, public_network_access_enabled=False, ssl_enforcement_enabled=True, ssl_minimal_tls_version_enforced="TLS1_2")
- 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. Required when
create_modeisDefault. Changing this forces a new resource to be created.administrator_login_password (pulumi.Input[str]) – The Password associated with the
administrator_loginfor the MySQL Server. Required whencreate_modeisDefault.auto_grow_enabled (pulumi.Input[bool]) – Enable/Disable auto-growing of the storage. Storage auto-grow prevents your server from running out of storage and becoming read-only. If storage auto grow is enabled, the storage automatically grows without impacting the workload. The default value if not explicitly specified is
true.backup_retention_days (pulumi.Input[float]) – Backup retention days for the server, supported values are between
7and35days.create_mode (pulumi.Input[str]) – The creation mode. Can be used to restore or replicate existing servers. Possible values are
Default,Replica,GeoRestore, andPointInTimeRestore. Defaults toDefault.creation_source_server_id (pulumi.Input[str]) – For creation modes other than
Default, the source server ID to use.geo_redundant_backup_enabled (pulumi.Input[bool]) – Turn Geo-redundant server backups on/off. This allows you to choose between locally redundant or geo-redundant backup storage in the General Purpose and Memory Optimized tiers. When the backups are stored in geo-redundant backup storage, they are not only stored within the region in which your server is hosted, but are also replicated to a paired data center. This provides better protection and ability to restore your server in a different region in the event of a disaster. This is not supported for the Basic tier.
infrastructure_encryption_enabled (pulumi.Input[bool]) – Whether or not infrastructure is encrypted for this server. Defaults to
false. Changing this forces a new resource to be created.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 name of the MySQL Server. Changing this forces a new resource to be created. This needs to be globally unique within Azure.
public_network_access_enabled (pulumi.Input[bool]) – Whether or not public network access is allowed for this server. Defaults to
true.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.
restore_point_in_time (pulumi.Input[str]) – When
create_modeisPointInTimeRestore, specifies the point in time to restore fromcreation_source_server_id.sku_name (pulumi.Input[str]) – Specifies the SKU Name for this MySQL Server. The name of the SKU, follows the
tier+family+corespattern (e.g.B_Gen4_1,GP_Gen5_8). For more information see the product documentation.ssl_enforcement_enabled (pulumi.Input[bool]) – Specifies if SSL should be enforced on connections. Possible values are
trueandfalse.ssl_minimal_tls_version_enforced (pulumi.Input[str]) – The minimum TLS version to support on the sever. Possible values are
TLSEnforcementDisabled,TLS1_0,TLS1_1, andTLS1_2. Defaults toTLSEnforcementDisabled.storage_mb (pulumi.Input[float]) –
Max storage allowed for a server. Possible values are between
5120MB(5GB) and1048576MB(1TB) for the Basic SKU and between5120MB(5GB) and4194304MB(4TB) for General Purpose/Memory Optimized SKUs. For more information see the product documentation.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,5.7, and8.0. Changing this forces a new resource to be created.
The storage_profile object supports the following:
autoGrow(pulumi.Input[str])backup_retention_days(pulumi.Input[float]) - Backup retention days for the server, supported values are between7and35days.geoRedundantBackup(pulumi.Input[str])storage_mb(pulumi.Input[float]) - Max storage allowed for a server. Possible values are between5120MB(5GB) and1048576MB(1TB) for the Basic SKU and between5120MB(5GB) and4194304MB(4TB) for General Purpose/Memory Optimized SKUs. For more information see the product documentation.
administrator_login: pulumi.Output[str] = None¶The Administrator Login for the MySQL Server. Required when
create_modeisDefault. Changing this forces a new resource to be created.
administrator_login_password: pulumi.Output[str] = None¶The Password associated with the
administrator_loginfor the MySQL Server. Required whencreate_modeisDefault.
auto_grow_enabled: pulumi.Output[bool] = None¶Enable/Disable auto-growing of the storage. Storage auto-grow prevents your server from running out of storage and becoming read-only. If storage auto grow is enabled, the storage automatically grows without impacting the workload. The default value if not explicitly specified is
true.
backup_retention_days: pulumi.Output[float] = None¶Backup retention days for the server, supported values are between
7and35days.
create_mode: pulumi.Output[str] = None¶The creation mode. Can be used to restore or replicate existing servers. Possible values are
Default,Replica,GeoRestore, andPointInTimeRestore. Defaults toDefault.
creation_source_server_id: pulumi.Output[str] = None¶For creation modes other than
Default, the source server ID to use.
fqdn: pulumi.Output[str] = None¶The FQDN of the MySQL Server.
geo_redundant_backup_enabled: pulumi.Output[bool] = None¶Turn Geo-redundant server backups on/off. This allows you to choose between locally redundant or geo-redundant backup storage in the General Purpose and Memory Optimized tiers. When the backups are stored in geo-redundant backup storage, they are not only stored within the region in which your server is hosted, but are also replicated to a paired data center. This provides better protection and ability to restore your server in a different region in the event of a disaster. This is not supported for the Basic tier.
infrastructure_encryption_enabled: pulumi.Output[bool] = None¶Whether or not infrastructure is encrypted for this server. Defaults to
false. Changing this forces a new resource to be created.
location: pulumi.Output[str] = None¶Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
name: pulumi.Output[str] = None¶Specifies the name of the MySQL Server. Changing this forces a new resource to be created. This needs to be globally unique within Azure.
public_network_access_enabled: pulumi.Output[bool] = None¶Whether or not public network access is allowed for this server. Defaults to
true.
resource_group_name: pulumi.Output[str] = None¶The name of the resource group in which to create the MySQL Server. Changing this forces a new resource to be created.
restore_point_in_time: pulumi.Output[str] = None¶When
create_modeisPointInTimeRestore, specifies the point in time to restore fromcreation_source_server_id.
sku_name: pulumi.Output[str] = None¶Specifies the SKU Name for this MySQL Server. The name of the SKU, follows the
tier+family+corespattern (e.g.B_Gen4_1,GP_Gen5_8). For more information see the product documentation.
ssl_enforcement_enabled: pulumi.Output[bool] = None¶Specifies if SSL should be enforced on connections. Possible values are
trueandfalse.
ssl_minimal_tls_version_enforced: pulumi.Output[str] = None¶The minimum TLS version to support on the sever. Possible values are
TLSEnforcementDisabled,TLS1_0,TLS1_1, andTLS1_2. Defaults toTLSEnforcementDisabled.
storage_mb: pulumi.Output[float] = None¶Max storage allowed for a server. Possible values are between
5120MB(5GB) and1048576MB(1TB) for the Basic SKU and between5120MB(5GB) and4194304MB(4TB) for General Purpose/Memory Optimized SKUs. For more information see the product documentation.
A mapping of tags to assign to the resource.
version: pulumi.Output[str] = None¶Specifies the version of MySQL to use. Valid values are
5.6,5.7, and8.0. Changing this forces a new resource to be created.
- static
get(resource_name, id, opts=None, administrator_login=None, administrator_login_password=None, auto_grow_enabled=None, backup_retention_days=None, create_mode=None, creation_source_server_id=None, fqdn=None, geo_redundant_backup_enabled=None, infrastructure_encryption_enabled=None, location=None, name=None, public_network_access_enabled=None, resource_group_name=None, restore_point_in_time=None, sku_name=None, ssl_enforcement=None, ssl_enforcement_enabled=None, ssl_minimal_tls_version_enforced=None, storage_mb=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. Required when
create_modeisDefault. Changing this forces a new resource to be created.administrator_login_password (pulumi.Input[str]) – The Password associated with the
administrator_loginfor the MySQL Server. Required whencreate_modeisDefault.auto_grow_enabled (pulumi.Input[bool]) – Enable/Disable auto-growing of the storage. Storage auto-grow prevents your server from running out of storage and becoming read-only. If storage auto grow is enabled, the storage automatically grows without impacting the workload. The default value if not explicitly specified is
true.backup_retention_days (pulumi.Input[float]) – Backup retention days for the server, supported values are between
7and35days.create_mode (pulumi.Input[str]) – The creation mode. Can be used to restore or replicate existing servers. Possible values are
Default,Replica,GeoRestore, andPointInTimeRestore. Defaults toDefault.creation_source_server_id (pulumi.Input[str]) – For creation modes other than
Default, the source server ID to use.fqdn (pulumi.Input[str]) – The FQDN of the MySQL Server.
geo_redundant_backup_enabled (pulumi.Input[bool]) – Turn Geo-redundant server backups on/off. This allows you to choose between locally redundant or geo-redundant backup storage in the General Purpose and Memory Optimized tiers. When the backups are stored in geo-redundant backup storage, they are not only stored within the region in which your server is hosted, but are also replicated to a paired data center. This provides better protection and ability to restore your server in a different region in the event of a disaster. This is not supported for the Basic tier.
infrastructure_encryption_enabled (pulumi.Input[bool]) – Whether or not infrastructure is encrypted for this server. Defaults to
false. Changing this forces a new resource to be created.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 name of the MySQL Server. Changing this forces a new resource to be created. This needs to be globally unique within Azure.
public_network_access_enabled (pulumi.Input[bool]) – Whether or not public network access is allowed for this server. Defaults to
true.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.
restore_point_in_time (pulumi.Input[str]) – When
create_modeisPointInTimeRestore, specifies the point in time to restore fromcreation_source_server_id.sku_name (pulumi.Input[str]) –
Specifies the SKU Name for this MySQL Server. The name of the SKU, follows the
tier+family+corespattern (e.g.B_Gen4_1,GP_Gen5_8). For more information see the product documentation.ssl_enforcement_enabled (pulumi.Input[bool]) – Specifies if SSL should be enforced on connections. Possible values are
trueandfalse.ssl_minimal_tls_version_enforced (pulumi.Input[str]) – The minimum TLS version to support on the sever. Possible values are
TLSEnforcementDisabled,TLS1_0,TLS1_1, andTLS1_2. Defaults toTLSEnforcementDisabled.storage_mb (pulumi.Input[float]) –
Max storage allowed for a server. Possible values are between
5120MB(5GB) and1048576MB(1TB) for the Basic SKU and between5120MB(5GB) and4194304MB(4TB) for General Purpose/Memory Optimized SKUs. For more information see the product documentation.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,5.7, and8.0. Changing this forces a new resource to be created.
The storage_profile object supports the following:
autoGrow(pulumi.Input[str])backup_retention_days(pulumi.Input[float]) - Backup retention days for the server, supported values are between7and35days.geoRedundantBackup(pulumi.Input[str])storage_mb(pulumi.Input[float]) - Max storage allowed for a server. Possible values are between5120MB(5GB) and1048576MB(1TB) for the Basic SKU and between5120MB(5GB) and4194304MB(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>`_import pulumi import pulumi_azure as azure example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe") example_virtual_network = azure.network.VirtualNetwork("exampleVirtualNetwork", address_spaces=["10.7.29.0/29"], location=example_resource_group.location, resource_group_name=example_resource_group.name) internal = azure.network.Subnet("internal", resource_group_name=example_resource_group.name, virtual_network_name=example_virtual_network.name, address_prefix="10.7.29.0/29", service_endpoints=["Microsoft.Sql"]) example_server = azure.mysql.Server("exampleServer", location=example_resource_group.location, resource_group_name=example_resource_group.name, administrator_login="mysqladminun", administrator_login_password="H@Sh1CoR3!", version="5.7", ssl_enforcement="Enabled", sku_name="GP_Gen5_2", storage_profile={ "storage_mb": 5120, "backup_retention_days": 7, "geoRedundantBackup": "Disabled", }) example_virtual_network_rule = azure.mysql.VirtualNetworkRule("exampleVirtualNetworkRule", resource_group_name=example_resource_group.name, server_name=example_server.name, subnet_id=internal.id)
- 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: pulumi.Output[str] = 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: pulumi.Output[str] = None¶The name of the resource group where the MySQL server resides. Changing this forces a new resource to be created.
server_name: pulumi.Output[str] = 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: pulumi.Output[str] = 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