sql

class pulumi_azure.sql.ActiveDirectoryAdministrator(resource_name, opts=None, login=None, object_id=None, resource_group_name=None, server_name=None, tenant_id=None, __name__=None, __opts__=None)

Allows you to set a user or group as the AD administrator for an Azure SQL server

Parameters:
  • resource_name (str) – The name of the resource.
  • opts (pulumi.ResourceOptions) – Options for the resource.
  • login (pulumi.Input[str]) – The login name of the principal to set as the server administrator
  • object_id (pulumi.Input[str]) – The ID of the principal to set as the server administrator
  • resource_group_name (pulumi.Input[str]) – The name of the resource group for the SQL server. Changing this forces a new resource to be created.
  • server_name (pulumi.Input[str]) – The name of the SQL Server on which to set the administrator. Changing this forces a new resource to be created.
  • tenant_id (pulumi.Input[str]) – The Azure Tenant ID
login = None

The login name of the principal to set as the server administrator

object_id = None

The ID of the principal to set as the server administrator

resource_group_name = None

The name of the resource group for the SQL server. Changing this forces a new resource to be created.

server_name = None

The name of the SQL Server on which to set the administrator. Changing this forces a new resource to be created.

tenant_id = None

The Azure Tenant ID

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.sql.Database(resource_name, opts=None, collation=None, create_mode=None, edition=None, elastic_pool_name=None, import_=None, location=None, max_size_bytes=None, name=None, requested_service_objective_id=None, requested_service_objective_name=None, resource_group_name=None, restore_point_in_time=None, server_name=None, source_database_deletion_date=None, source_database_id=None, tags=None, threat_detection_policy=None, __name__=None, __opts__=None)

Allows you to manage an Azure SQL Database

Parameters:
  • resource_name (str) – The name of the resource.
  • opts (pulumi.ResourceOptions) – Options for the resource.
  • collation (pulumi.Input[str]) – The name of the collation. Applies only if create_mode is Default. Azure default is SQL_LATIN1_GENERAL_CP1_CI_AS. Changing this forces a new resource to be created.
  • create_mode (pulumi.Input[str]) – Specifies the type of database to create. Defaults to Default. See below for the accepted values/
  • edition (pulumi.Input[str]) – The edition of the database to be created. Applies only if create_mode is Default. Valid values are: Basic, Standard, Premium, or DataWarehouse. Please see Azure SQL Database Service Tiers.
  • elastic_pool*name (pulumi.Input[str]) –

    The name of the elastic database pool.

:param pulumi.Input[dict] import*: A Database Import block as documented below. create_mode must be set to Default. :param pulumi.Input[str] location: Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. :param pulumi.Input[str] max_size_bytes: The maximum size that the database can grow to. Applies only if create_mode is Default. Please see Azure SQL Database Service Tiers. :param pulumi.Input[str] name: The name of the database. :param pulumi.Input[str] requested_service_objective_id: Use requested_service_objective_id or requested_service_objective_name to set the performance level for the database.

Parameters:
  • requested_service_objective_name (pulumi.Input[str]) –

    Use requested_service_objective_name or requested_service_objective_id to set the performance level for the database. Valid values are: S0, S1, S2, S3, P1, P2, P4, P6, P11 and ElasticPool. Please see Azure SQL Database Service Tiers.

  • resource_group_name (pulumi.Input[str]) – The name of the resource group in which to create the database. This must be the same as Database Server resource group currently.
  • restore_point_in_time (pulumi.Input[str]) – The point in time for the restore. Only applies if create_mode is PointInTimeRestore e.g. 2013-11-08T22:00:40Z
  • server_name (pulumi.Input[str]) – The name of the SQL Server on which to create the database.
  • source_database_deletion_date (pulumi.Input[str]) – The deletion date time of the source database. Only applies to deleted databases where create_mode is PointInTimeRestore.
  • source_database_id (pulumi.Input[str]) – The URI of the source database if create_mode value is not Default.
  • tags (pulumi.Input[dict]) – A mapping of tags to assign to the resource.
  • threat_detection_policy (pulumi.Input[dict]) – Threat detection policy configuration. The threat_detection_policy block supports fields documented below.
collation = None

The name of the collation. Applies only if create_mode is Default. Azure default is SQL_LATIN1_GENERAL_CP1_CI_AS. Changing this forces a new resource to be created.

create_mode = None

Specifies the type of database to create. Defaults to Default. See below for the accepted values/

creation_date = None

The creation date of the SQL Database.

default_secondary_location = None

The default secondary location of the SQL Database.

edition = None

The edition of the database to be created. Applies only if create_mode is Default. Valid values are: Basic, Standard, Premium, or DataWarehouse. Please see Azure SQL Database Service Tiers.

elastic_pool_name = None

The name of the elastic database pool.

import_ = None

A Database Import block as documented below. create_mode must be set to Default.

location = None

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

max_size_bytes = None

The maximum size that the database can grow to. Applies only if create_mode is Default. Please see Azure SQL Database Service Tiers.

name = None

The name of the database.

requested_service_objective_id = None

Use requested_service_objective_id or requested_service_objective_name to set the performance level for the database. Please see Azure SQL Database Service Tiers.

requested_service_objective_name = None

Use requested_service_objective_name or requested_service_objective_id to set the performance level for the database. Valid values are: S0, S1, S2, S3, P1, P2, P4, P6, P11 and ElasticPool. Please see Azure SQL Database Service Tiers.

resource_group_name = None

The name of the resource group in which to create the database. This must be the same as Database Server resource group currently.

restore_point_in_time = None

The point in time for the restore. Only applies if create_mode is PointInTimeRestore e.g. 2013-11-08T22:00:40Z

server_name = None

The name of the SQL Server on which to create the database.

source_database_deletion_date = None

The deletion date time of the source database. Only applies to deleted databases where create_mode is PointInTimeRestore.

source_database_id = None

The URI of the source database if create_mode value is not Default.

tags = None

A mapping of tags to assign to the resource.

threat_detection_policy = None

Threat detection policy configuration. The threat_detection_policy block supports fields documented below.

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.sql.ElasticPool(resource_name, opts=None, db_dtu_max=None, db_dtu_min=None, dtu=None, edition=None, location=None, name=None, pool_size=None, resource_group_name=None, server_name=None, tags=None, __name__=None, __opts__=None)

Allows you to manage an Azure SQL Elastic Pool.

NOTE: - This version of the Elasticpool resource is being deprecated and should no longer be used. Please use the azurerm_mssql_elasticpool version instead.
Parameters:
  • resource_name (str) – The name of the resource.
  • opts (pulumi.ResourceOptions) – Options for the resource.
  • db_dtu_max (pulumi.Input[float]) – The maximum DTU which will be guaranteed to all databases in the elastic pool to be created.
  • db_dtu_min (pulumi.Input[float]) – The minimum DTU which will be guaranteed to all databases in the elastic pool to be created.
  • dtu (pulumi.Input[float]) –

    The total shared DTU for the elastic pool. Valid values depend on the edition which has been defined. Refer to Azure SQL Database Service Tiers for valid combinations.

  • edition (pulumi.Input[str]) –

    The edition of the elastic pool to be created. Valid values are Basic, Standard, and Premium. Refer to Azure SQL Database Service Tiers for details. 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]) – The name of the elastic pool. This needs to be globally unique. Changing this forces a new resource to be created.
  • pool_size (pulumi.Input[float]) –

    The maximum size in MB that all databases in the elastic pool can grow to. The maximum size must be consistent with combination of edition and dtu and the limits documented in Azure SQL Database Service Tiers. If not defined when creating an elastic pool, the value is set to the size implied by edition and dtu.

  • resource_group_name (pulumi.Input[str]) – The name of the resource group in which to create the elastic pool. This must be the same as the resource group of the underlying SQL server.
  • server_name (pulumi.Input[str]) – The name of the SQL Server on which to create the elastic pool. Changing this forces a new resource to be created.
  • tags (pulumi.Input[dict]) – A mapping of tags to assign to the resource.
creation_date = None

The creation date of the SQL Elastic Pool.

db_dtu_max = None

The maximum DTU which will be guaranteed to all databases in the elastic pool to be created.

db_dtu_min = None

The minimum DTU which will be guaranteed to all databases in the elastic pool to be created.

dtu = None

The total shared DTU for the elastic pool. Valid values depend on the edition which has been defined. Refer to Azure SQL Database Service Tiers for valid combinations.

edition = None

The edition of the elastic pool to be created. Valid values are Basic, Standard, and Premium. Refer to Azure SQL Database Service Tiers for details. Changing this forces a new resource to be created.

location = None

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

name = None

The name of the elastic pool. This needs to be globally unique. Changing this forces a new resource to be created.

pool_size = None

The maximum size in MB that all databases in the elastic pool can grow to. The maximum size must be consistent with combination of edition and dtu and the limits documented in Azure SQL Database Service Tiers. If not defined when creating an elastic pool, the value is set to the size implied by edition and dtu.

resource_group_name = None

The name of the resource group in which to create the elastic pool. This must be the same as the resource group of the underlying SQL server.

server_name = None

The name of the SQL Server on which to create the elastic pool. Changing this forces a new resource to be created.

tags = None

A mapping of tags to assign to the resource.

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.sql.FirewallRule(resource_name, opts=None, end_ip_address=None, name=None, resource_group_name=None, server_name=None, start_ip_address=None, __name__=None, __opts__=None)

Allows you to manage an Azure SQL Firewall Rule

Parameters:
  • resource_name (str) – The name of the resource.
  • opts (pulumi.ResourceOptions) – Options for the resource.
  • end_ip_address (pulumi.Input[str]) – The ending IP address to allow through the firewall for this rule.
  • name (pulumi.Input[str]) – The name of the firewall rule.
  • resource_group_name (pulumi.Input[str]) – The name of the resource group in which to create the sql server.
  • server_name (pulumi.Input[str]) – The name of the SQL Server on which to create the Firewall Rule.
  • start_ip_address (pulumi.Input[str]) – The starting IP address to allow through the firewall for this rule.
end_ip_address = None

The ending IP address to allow through the firewall for this rule.

name = None

The name of the firewall rule.

resource_group_name = None

The name of the resource group in which to create the sql server.

server_name = None

The name of the SQL Server on which to create the Firewall Rule.

start_ip_address = None

The starting IP address to allow through the firewall for this rule.

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.sql.SqlServer(resource_name, opts=None, administrator_login=None, administrator_login_password=None, location=None, name=None, resource_group_name=None, tags=None, version=None, __name__=None, __opts__=None)

Manages a SQL Azure Database Server.

Note: All arguments including the administrator login and password will be stored in the raw state as plain-text. Read more about sensitive data in state.
Parameters:
  • resource_name (str) – The name of the resource.
  • opts (pulumi.ResourceOptions) – Options for the resource.
  • administrator_login (pulumi.Input[str]) – The administrator login name for the new server. Changing this forces a new resource to be created.
  • administrator_login_password (pulumi.Input[str]) – The password associated with the administrator_login user. Needs to comply with Azure’s Password Policy
  • 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]) – The name of the SQL Server. This needs to be globally unique within Azure.
  • resource_group_name (pulumi.Input[str]) – The name of the resource group in which to create the SQL Server.
  • tags (pulumi.Input[dict]) – A mapping of tags to assign to the resource.
  • version (pulumi.Input[str]) – The version for the new server. Valid values are: 2.0 (for v11 server) and 12.0 (for v12 server).
administrator_login = None

The administrator login name for the new server. Changing this forces a new resource to be created.

administrator_login_password = None

The password associated with the administrator_login user. Needs to comply with Azure’s Password Policy

fully_qualified_domain_name = None

The fully qualified domain name of the Azure SQL Server (e.g. myServerName.database.windows.net)

location = None

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

name = None

The name of the SQL Server. This needs to be globally unique within Azure.

resource_group_name = None

The name of the resource group in which to create the SQL Server.

tags = None

A mapping of tags to assign to the resource.

version = None

The version for the new server. Valid values are: 2.0 (for v11 server) and 12.0 (for v12 server).

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.sql.VirtualNetworkRule(resource_name, opts=None, ignore_missing_vnet_service_endpoint=None, name=None, resource_group_name=None, server_name=None, subnet_id=None, __name__=None, __opts__=None)

Allows you to add, update, or remove an Azure SQL server to a subnet of a virtual network.

Parameters:
  • resource_name (str) – The name of the resource.
  • opts (pulumi.ResourceOptions) – Options for the resource.
  • ignore_missing_vnet_service_endpoint (pulumi.Input[bool]) – Create the virtual network rule before the subnet has the virtual network service endpoint enabled. The default value is false.
  • name (pulumi.Input[str]) – The name of the SQL virtual network rule. Changing this forces a new resource to be created. Cannot be empty and must only contain alphanumeric characters and hyphens. Cannot start with a number, and cannot start or end with a hyphen.
  • resource_group_name (pulumi.Input[str]) – The name of the resource group where the SQL 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 SQL 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 SQL server will be connected to.
ignore_missing_vnet_service_endpoint = None

Create the virtual network rule before the subnet has the virtual network service endpoint enabled. The default value is false.

name = None

The name of the SQL virtual network rule. Changing this forces a new resource to be created. Cannot be empty and must only contain alphanumeric characters and hyphens. Cannot start with a number, and cannot start or end with a hyphen.

resource_group_name = None

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

server_name = None

The name of the SQL Server to which this SQL 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 SQL 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