mssql

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.mssql.AwaitableGetElasticPoolResult(location=None, max_size_bytes=None, max_size_gb=None, name=None, per_db_max_capacity=None, per_db_min_capacity=None, resource_group_name=None, server_name=None, tags=None, zone_redundant=None, id=None)
class pulumi_azure.mssql.DatabaseVulnerabilityAssessmentRuleBaseline(resource_name, opts=None, baseline_name=None, baseline_results=None, database_name=None, rule_id=None, server_vulnerability_assessment_id=None, __props__=None, __name__=None, __opts__=None)

Manages a Database Vulnerability Assessment Rule Baseline.

NOTE Database Vulnerability Assessment is currently only available for MS SQL databases.

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

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

  • baseline_name (pulumi.Input[str]) – The name of the vulnerability assessment rule baseline. Valid options are default and master. default implies a baseline on a database level rule and master for server level rule. Defaults to default. Changing this forces a new resource to be created.

  • baseline_results (pulumi.Input[list]) – A baseline_result block as documented below. Multiple blocks can be defined.

  • database_name (pulumi.Input[str]) – Specifies the name of the MS SQL Database. Changing this forces a new resource to be created.

  • rule_id (pulumi.Input[str]) – The vulnerability assessment rule ID. Changing this forces a new resource to be created.

  • server_vulnerability_assessment_id (pulumi.Input[str]) – The Vulnerability Assessment ID of the MS SQL Server. Changing this forces a new resource to be created.

The baseline_results object supports the following:

  • results (pulumi.Input[list])

baseline_name = None

The name of the vulnerability assessment rule baseline. Valid options are default and master. default implies a baseline on a database level rule and master for server level rule. Defaults to default. Changing this forces a new resource to be created.

baseline_results = None

A baseline_result block as documented below. Multiple blocks can be defined.

  • results (list)

database_name = None

Specifies the name of the MS SQL Database. Changing this forces a new resource to be created.

rule_id = None

The vulnerability assessment rule ID. Changing this forces a new resource to be created.

server_vulnerability_assessment_id = None

The Vulnerability Assessment ID of the MS SQL Server. Changing this forces a new resource to be created.

static get(resource_name, id, opts=None, baseline_name=None, baseline_results=None, database_name=None, rule_id=None, server_vulnerability_assessment_id=None)

Get an existing DatabaseVulnerabilityAssessmentRuleBaseline 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.

  • baseline_name (pulumi.Input[str]) – The name of the vulnerability assessment rule baseline. Valid options are default and master. default implies a baseline on a database level rule and master for server level rule. Defaults to default. Changing this forces a new resource to be created.

  • baseline_results (pulumi.Input[list]) – A baseline_result block as documented below. Multiple blocks can be defined.

  • database_name (pulumi.Input[str]) – Specifies the name of the MS SQL Database. Changing this forces a new resource to be created.

  • rule_id (pulumi.Input[str]) – The vulnerability assessment rule ID. Changing this forces a new resource to be created.

  • server_vulnerability_assessment_id (pulumi.Input[str]) – The Vulnerability Assessment ID of the MS SQL Server. Changing this forces a new resource to be created.

The baseline_results object supports the following:

  • results (pulumi.Input[list])

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.mssql.ElasticPool(resource_name, opts=None, location=None, max_size_bytes=None, max_size_gb=None, name=None, per_database_settings=None, resource_group_name=None, server_name=None, sku=None, tags=None, zone_redundant=None, __props__=None, __name__=None, __opts__=None)

Allows you to manage an Azure SQL Elastic Pool via the 2017-10-01-preview API which allows for vCore and DTU based configurations.

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

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

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

  • max_size_bytes (pulumi.Input[float]) – The max data size of the elastic pool in bytes. Conflicts with max_size_gb.

  • max_size_gb (pulumi.Input[float]) – The max data size of the elastic pool in gigabytes. Conflicts with max_size_bytes.

  • name (pulumi.Input[str]) – Specifies the SKU Name for this Elasticpool. The name of the SKU, will be either vCore based tier + family pattern (e.g. GP_Gen4, BC_Gen5) or the DTU based BasicPool, StandardPool, or PremiumPool pattern.

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

  • 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.

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

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

  • zone_redundant (pulumi.Input[bool]) – Whether or not this elastic pool is zone redundant. tier needs to be Premium for DTU based or BusinessCritical for vCore based sku. Defaults to false.

The per_database_settings object supports the following:

  • maxCapacity (pulumi.Input[float]) - The maximum capacity any one database can consume.

  • minCapacity (pulumi.Input[float]) - The minimum capacity all databases are guaranteed.

The sku object supports the following:

  • capacity (pulumi.Input[float]) - The scale up/out capacity, representing server’s compute units. For more information see the documentation for your Elasticpool configuration: vCore-based or DTU-based.

  • family (pulumi.Input[str]) - The family of hardware Gen4 or Gen5.

  • name (pulumi.Input[str]) - Specifies the SKU Name for this Elasticpool. The name of the SKU, will be either vCore based tier + family pattern (e.g. GP_Gen4, BC_Gen5) or the DTU based BasicPool, StandardPool, or PremiumPool pattern.

  • tier (pulumi.Input[str]) - The tier of the particular SKU. Possible values are GeneralPurpose, BusinessCritical, Basic, Standard, or Premium. For more information see the documentation for your Elasticpool configuration: vCore-based or DTU-based.

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 max data size of the elastic pool in bytes. Conflicts with max_size_gb.

max_size_gb = None

The max data size of the elastic pool in gigabytes. Conflicts with max_size_bytes.

name = None

Specifies the SKU Name for this Elasticpool. The name of the SKU, will be either vCore based tier + family pattern (e.g. GP_Gen4, BC_Gen5) or the DTU based BasicPool, StandardPool, or PremiumPool pattern.

per_database_settings = None

A per_database_settings block as defined below.

  • maxCapacity (float) - The maximum capacity any one database can consume.

  • minCapacity (float) - The minimum capacity all databases are guaranteed.

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.

sku = None

A sku block as defined below.

  • capacity (float) - The scale up/out capacity, representing server’s compute units. For more information see the documentation for your Elasticpool configuration: vCore-based or DTU-based.

  • family (str) - The family of hardware Gen4 or Gen5.

  • name (str) - Specifies the SKU Name for this Elasticpool. The name of the SKU, will be either vCore based tier + family pattern (e.g. GP_Gen4, BC_Gen5) or the DTU based BasicPool, StandardPool, or PremiumPool pattern.

  • tier (str) - The tier of the particular SKU. Possible values are GeneralPurpose, BusinessCritical, Basic, Standard, or Premium. For more information see the documentation for your Elasticpool configuration: vCore-based or DTU-based.

tags = None

A mapping of tags to assign to the resource.

zone_redundant = None

Whether or not this elastic pool is zone redundant. tier needs to be Premium for DTU based or BusinessCritical for vCore based sku. Defaults to false.

static get(resource_name, id, opts=None, elastic_pool_properties=None, location=None, max_size_bytes=None, max_size_gb=None, name=None, per_database_settings=None, resource_group_name=None, server_name=None, sku=None, tags=None, zone_redundant=None)

Get an existing ElasticPool 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.

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

  • max_size_bytes (pulumi.Input[float]) – The max data size of the elastic pool in bytes. Conflicts with max_size_gb.

  • max_size_gb (pulumi.Input[float]) – The max data size of the elastic pool in gigabytes. Conflicts with max_size_bytes.

  • name (pulumi.Input[str]) – Specifies the SKU Name for this Elasticpool. The name of the SKU, will be either vCore based tier + family pattern (e.g. GP_Gen4, BC_Gen5) or the DTU based BasicPool, StandardPool, or PremiumPool pattern.

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

  • 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.

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

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

  • zone_redundant (pulumi.Input[bool]) – Whether or not this elastic pool is zone redundant. tier needs to be Premium for DTU based or BusinessCritical for vCore based sku. Defaults to false.

The elastic_pool_properties object supports the following:

  • creationDate (pulumi.Input[str])

  • license_type (pulumi.Input[str])

  • max_size_bytes (pulumi.Input[float]) - The max data size of the elastic pool in bytes. Conflicts with max_size_gb.

  • state (pulumi.Input[str])

  • zone_redundant (pulumi.Input[bool]) - Whether or not this elastic pool is zone redundant. tier needs to be Premium for DTU based or BusinessCritical for vCore based sku. Defaults to false.

The per_database_settings object supports the following:

  • maxCapacity (pulumi.Input[float]) - The maximum capacity any one database can consume.

  • minCapacity (pulumi.Input[float]) - The minimum capacity all databases are guaranteed.

The sku object supports the following:

  • capacity (pulumi.Input[float]) - The scale up/out capacity, representing server’s compute units. For more information see the documentation for your Elasticpool configuration: vCore-based or DTU-based.

  • family (pulumi.Input[str]) - The family of hardware Gen4 or Gen5.

  • name (pulumi.Input[str]) - Specifies the SKU Name for this Elasticpool. The name of the SKU, will be either vCore based tier + family pattern (e.g. GP_Gen4, BC_Gen5) or the DTU based BasicPool, StandardPool, or PremiumPool pattern.

  • tier (pulumi.Input[str]) - The tier of the particular SKU. Possible values are GeneralPurpose, BusinessCritical, Basic, Standard, or Premium. For more information see the documentation for your Elasticpool configuration: vCore-based or DTU-based.

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.mssql.GetElasticPoolResult(location=None, max_size_bytes=None, max_size_gb=None, name=None, per_db_max_capacity=None, per_db_min_capacity=None, resource_group_name=None, server_name=None, tags=None, zone_redundant=None, id=None)

A collection of values returned by getElasticPool.

location = None

Specifies the supported Azure location where the resource exists.

max_size_bytes = None

The max data size of the elastic pool in bytes.

max_size_gb = None

The max data size of the elastic pool in gigabytes.

per_db_max_capacity = None

The maximum capacity any one database can consume.

per_db_min_capacity = None

The minimum capacity all databases are guaranteed.

tags = None

A mapping of tags to assign to the resource.

zone_redundant = None

Whether or not this elastic pool is zone redundant.

id = None

id is the provider-assigned unique ID for this managed resource.

class pulumi_azure.mssql.ServerSecurityAlertPolicy(resource_name, opts=None, disabled_alerts=None, email_account_admins=None, email_addresses=None, resource_group_name=None, retention_days=None, server_name=None, state=None, storage_account_access_key=None, storage_endpoint=None, __props__=None, __name__=None, __opts__=None)

Manages a Security Alert Policy for a MSSQL Server.

NOTE Security Alert Policy is currently only available for MS SQL databases.

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

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

  • disabled_alerts (pulumi.Input[list]) – Specifies an array of alerts that are disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, Unsafe_Action.

  • email_account_admins (pulumi.Input[bool]) – Boolean flag which specifies if the alert is sent to the account administrators or not. Defaults to false.

  • email_addresses (pulumi.Input[list]) – Specifies an array of e-mail addresses to which the alert is sent.

  • resource_group_name (pulumi.Input[str]) – The name of the resource group that contains the MS SQL Server. Changing this forces a new resource to be created.

  • retention_days (pulumi.Input[float]) – Specifies the number of days to keep in the Threat Detection audit logs. Defaults to 0.

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

  • state (pulumi.Input[str]) – Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the specific database server. Allowed values are: Disabled, Enabled, New.

  • storage_account_access_key (pulumi.Input[str]) – Specifies the identifier key of the Threat Detection audit storage account.

  • storage_endpoint (pulumi.Input[str]) – Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs.

disabled_alerts = None

Specifies an array of alerts that are disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, Unsafe_Action.

email_account_admins = None

Boolean flag which specifies if the alert is sent to the account administrators or not. Defaults to false.

email_addresses = None

Specifies an array of e-mail addresses to which the alert is sent.

resource_group_name = None

The name of the resource group that contains the MS SQL Server. Changing this forces a new resource to be created.

retention_days = None

Specifies the number of days to keep in the Threat Detection audit logs. Defaults to 0.

server_name = None

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

state = None

Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the specific database server. Allowed values are: Disabled, Enabled, New.

storage_account_access_key = None

Specifies the identifier key of the Threat Detection audit storage account.

storage_endpoint = None

Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs.

static get(resource_name, id, opts=None, disabled_alerts=None, email_account_admins=None, email_addresses=None, resource_group_name=None, retention_days=None, server_name=None, state=None, storage_account_access_key=None, storage_endpoint=None)

Get an existing ServerSecurityAlertPolicy 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.

  • disabled_alerts (pulumi.Input[list]) – Specifies an array of alerts that are disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, Unsafe_Action.

  • email_account_admins (pulumi.Input[bool]) – Boolean flag which specifies if the alert is sent to the account administrators or not. Defaults to false.

  • email_addresses (pulumi.Input[list]) – Specifies an array of e-mail addresses to which the alert is sent.

  • resource_group_name (pulumi.Input[str]) – The name of the resource group that contains the MS SQL Server. Changing this forces a new resource to be created.

  • retention_days (pulumi.Input[float]) – Specifies the number of days to keep in the Threat Detection audit logs. Defaults to 0.

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

  • state (pulumi.Input[str]) – Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the specific database server. Allowed values are: Disabled, Enabled, New.

  • storage_account_access_key (pulumi.Input[str]) – Specifies the identifier key of the Threat Detection audit storage account.

  • storage_endpoint (pulumi.Input[str]) – Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs.

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.mssql.ServerVulnerabilityAssessment(resource_name, opts=None, recurring_scans=None, server_security_alert_policy_id=None, storage_account_access_key=None, storage_container_path=None, storage_container_sas_key=None, __props__=None, __name__=None, __opts__=None)

Manages the Vulnerability Assessment for a MS SQL Server.

NOTE Vulnerability Assessment is currently only available for MS SQL databases.

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

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

  • recurring_scans (pulumi.Input[dict]) – The recurring scans settings. The recurring_scans block supports fields documented below.

  • server_security_alert_policy_id (pulumi.Input[str]) – The id of the security alert policy of the MS SQL Server. Changing this forces a new resource to be created.

  • storage_account_access_key (pulumi.Input[str]) – Specifies the identifier key of the storage account for vulnerability assessment scan results. If storage_container_sas_key isn’t specified, storage_account_access_key is required.

  • storage_container_path (pulumi.Input[str]) – A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/).

  • storage_container_sas_key (pulumi.Input[str]) – A shared access signature (SAS Key) that has write access to the blob container specified in storage_container_path parameter. If storage_account_access_key isn’t specified, storage_container_sas_key is required.

The recurring_scans object supports the following:

  • emailSubscriptionAdmins (pulumi.Input[bool]) - Boolean flag which specifies if the schedule scan notification will be sent to the subscription administrators. Defaults to false.

  • emails (pulumi.Input[list]) - Specifies an array of e-mail addresses to which the scan notification is sent.

  • enabled (pulumi.Input[bool]) - Boolean flag which specifies if recurring scans is enabled or disabled. Defaults to false.

recurring_scans = None

The recurring scans settings. The recurring_scans block supports fields documented below.

  • emailSubscriptionAdmins (bool) - Boolean flag which specifies if the schedule scan notification will be sent to the subscription administrators. Defaults to false.

  • emails (list) - Specifies an array of e-mail addresses to which the scan notification is sent.

  • enabled (bool) - Boolean flag which specifies if recurring scans is enabled or disabled. Defaults to false.

server_security_alert_policy_id = None

The id of the security alert policy of the MS SQL Server. Changing this forces a new resource to be created.

storage_account_access_key = None

Specifies the identifier key of the storage account for vulnerability assessment scan results. If storage_container_sas_key isn’t specified, storage_account_access_key is required.

storage_container_path = None

A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/).

storage_container_sas_key = None

A shared access signature (SAS Key) that has write access to the blob container specified in storage_container_path parameter. If storage_account_access_key isn’t specified, storage_container_sas_key is required.

static get(resource_name, id, opts=None, recurring_scans=None, server_security_alert_policy_id=None, storage_account_access_key=None, storage_container_path=None, storage_container_sas_key=None)

Get an existing ServerVulnerabilityAssessment 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.

  • recurring_scans (pulumi.Input[dict]) – The recurring scans settings. The recurring_scans block supports fields documented below.

  • server_security_alert_policy_id (pulumi.Input[str]) – The id of the security alert policy of the MS SQL Server. Changing this forces a new resource to be created.

  • storage_account_access_key (pulumi.Input[str]) – Specifies the identifier key of the storage account for vulnerability assessment scan results. If storage_container_sas_key isn’t specified, storage_account_access_key is required.

  • storage_container_path (pulumi.Input[str]) – A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/).

  • storage_container_sas_key (pulumi.Input[str]) – A shared access signature (SAS Key) that has write access to the blob container specified in storage_container_path parameter. If storage_account_access_key isn’t specified, storage_container_sas_key is required.

The recurring_scans object supports the following:

  • emailSubscriptionAdmins (pulumi.Input[bool]) - Boolean flag which specifies if the schedule scan notification will be sent to the subscription administrators. Defaults to false.

  • emails (pulumi.Input[list]) - Specifies an array of e-mail addresses to which the scan notification is sent.

  • enabled (pulumi.Input[bool]) - Boolean flag which specifies if recurring scans is enabled or disabled. Defaults to false.

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

pulumi_azure.mssql.get_elastic_pool(name=None, resource_group_name=None, server_name=None, opts=None)

Use this data source to access information about an existing SQL elastic pool.

Parameters
  • name (str) – The name of the elastic pool.

  • resource_group_name (str) – The name of the resource group which contains the elastic pool.

  • server_name (str) – The name of the SQL Server which contains the elastic pool.