Microsoft. SQL servers/elasticPools 2014-04-01

Bicep-resourcedefinitie

Het resourcetype servers/elasticPools kan worden geïmplementeerd met bewerkingen die zijn gericht op:

Zie logboek wijzigenvoor een lijst met gewijzigde eigenschappen in elke API-versie.

Resource-indeling

Om een Microsoft te creëren. Sql/servers/elasticPools-resource, voeg de volgende Bicep toe aan je template.

resource symbolicname 'Microsoft.Sql/servers/elasticPools@2014-04-01' = {
  parent: resourceSymbolicName
  location: 'string'
  name: 'string'
  properties: {
    databaseDtuMax: int
    databaseDtuMin: int
    dtu: int
    edition: 'string'
    storageMB: int
    zoneRedundant: bool
  }
  tags: {
    {customized property}: 'string'
  }
}

Eigenschapswaarden

Microsoft. SQL/servers/elasticPools

Name Description Value
location Resourcelocatie. Touwtje (verplicht)
name De resourcenaam Touwtje (verplicht)
parent In Bicep kun je de ouderresource voor een kindresource specificeren. U hoeft deze eigenschap alleen toe te voegen wanneer de onderliggende resource buiten de bovenliggende resource wordt gedeclareerd.

Zie onderliggende resource buiten de bovenliggende resourcevoor meer informatie.
Symbolische naam voor resource van het type: servers
properties De eigenschappen die de resource vertegenwoordigen. ElasticPoolProperties
tags Resourcetags Woordenlijst met tagnamen en -waarden. Zie Tags in sjablonen

ElasticPoolProperties

Name Description Value
databaseDtuMax Het maximum aantal DTU's dat elke database kan gebruiken. int
databaseDtuMin De minimale DTU is gegarandeerd. int
dtu Het totale aantal gedeelde DTU's voor de elastische databasepool. int
edition De editie van de elastische pool. 'Basic'
'BusinessCritical'
'GeneralPurpose'
'Premium'
'Standard'
storageMB Hiermee haalt u de opslaglimiet op voor de elastische pool van de database in MB. int
zoneRedundant Of deze elastische databasepool zone-redundant is, wat betekent dat de replica's van deze database worden verdeeld over meerdere beschikbaarheidszones. bool

TrackedResourceTags

Name Description Value

Gebruiksvoorbeelden

Bicep Monsters

Een eenvoudig voorbeeld van het implementeren van Azure SQL Elastic Pool.

param resourceName string = 'acctest0001'
param location string = 'westeurope'
@secure()
@description('The administrator login password for the SQL server')
param administratorLoginPassword string

resource server 'Microsoft.Sql/servers@2021-02-01-preview' = {
  name: resourceName
  location: location
  properties: {
    administratorLogin: '4dm1n157r470r'
    administratorLoginPassword: null
    minimalTlsVersion: '1.2'
    publicNetworkAccess: 'Enabled'
    restrictOutboundNetworkAccess: 'Disabled'
    version: '12.0'
  }
}

resource elasticPool 'Microsoft.Sql/servers/elasticPools@2020-11-01-preview' = {
  parent: server
  name: resourceName
  location: location
  properties: {
    maintenanceConfigurationId: resourceId('Microsoft.Maintenance/publicMaintenanceConfigurations', 'SQL_Default')
    maxSizeBytes: 5242880000
    perDatabaseSettings: {
      maxCapacity: 5
      minCapacity: 0
    }
    zoneRedundant: false
  }
  sku: {
    capacity: 50
    family: ''
    name: 'BasicPool'
    tier: 'Basic'
  }
}

Resourcedefinitie van ARM-sjabloon

Het resourcetype servers/elasticPools kan worden geïmplementeerd met bewerkingen die zijn gericht op:

Zie logboek wijzigenvoor een lijst met gewijzigde eigenschappen in elke API-versie.

Resource-indeling

Om een Microsoft te creëren. Sql/servers/elasticPools-resource, voeg de volgende JSON toe aan je template.

{
  "type": "Microsoft.Sql/servers/elasticPools",
  "apiVersion": "2014-04-01",
  "name": "string",
  "location": "string",
  "properties": {
    "databaseDtuMax": "int",
    "databaseDtuMin": "int",
    "dtu": "int",
    "edition": "string",
    "storageMB": "int",
    "zoneRedundant": "bool"
  },
  "tags": {
    "{customized property}": "string"
  }
}

Eigenschapswaarden

Microsoft. SQL/servers/elasticPools

Name Description Value
apiVersion De API-versie '2014-04-01'
location Resourcelocatie. Touwtje (verplicht)
name De resourcenaam Touwtje (verplicht)
properties De eigenschappen die de resource vertegenwoordigen. ElasticPoolProperties
tags Resourcetags Woordenlijst met tagnamen en -waarden. Zie Tags in sjablonen
type Het brontype 'Microsoft. SQL/servers/elasticPools'

ElasticPoolProperties

Name Description Value
databaseDtuMax Het maximum aantal DTU's dat elke database kan gebruiken. int
databaseDtuMin De minimale DTU is gegarandeerd. int
dtu Het totale aantal gedeelde DTU's voor de elastische databasepool. int
edition De editie van de elastische pool. 'Basic'
'BusinessCritical'
'GeneralPurpose'
'Premium'
'Standard'
storageMB Hiermee haalt u de opslaglimiet op voor de elastische pool van de database in MB. int
zoneRedundant Of deze elastische databasepool zone-redundant is, wat betekent dat de replica's van deze database worden verdeeld over meerdere beschikbaarheidszones. bool

TrackedResourceTags

Name Description Value

Gebruiksvoorbeelden

Azure Quickstart Templates

De volgende Azure Quickstart-sjablonen deployen dit resourcetype.

Template Description
Deploy een nieuwe SQL Elastic Pool

Deploy naar Azure
Met dit sjabloon kun je een nieuwe SQL Elastic Pool uitrollen met de bijbehorende SQL Server en nieuwe SQL-databases om eraan toe te wijzen.

Resourcedefinitie van Terraform (AzAPI-provider)

Het resourcetype servers/elasticPools kan worden geïmplementeerd met bewerkingen die zijn gericht op:

  • Resourcegroepen

Zie logboek wijzigenvoor een lijst met gewijzigde eigenschappen in elke API-versie.

Resource-indeling

Om een Microsoft te creëren. Sql/servers/elasticPools-resource, voeg de volgende Terraform toe aan je template.

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.Sql/servers/elasticPools@2014-04-01"
  name = "string"
  parent_id = "string"
  location = "string"
  tags = {
    {customized property} = "string"
  }
  body = {
    properties = {
      databaseDtuMax = int
      databaseDtuMin = int
      dtu = int
      edition = "string"
      storageMB = int
      zoneRedundant = bool
    }
  }
}

Eigenschapswaarden

Microsoft. SQL/servers/elasticPools

Name Description Value
location Resourcelocatie. Touwtje (verplicht)
name De resourcenaam Touwtje (verplicht)
parent_id De id van de resource die het bovenliggende item voor deze resource is. Id voor resource van het type: servers
properties De eigenschappen die de resource vertegenwoordigen. ElasticPoolProperties
tags Resourcetags Woordenlijst met tagnamen en -waarden.
type Het brontype "Microsoft. SQL/servers/elasticPools@2014-04-01"

ElasticPoolProperties

Name Description Value
databaseDtuMax Het maximum aantal DTU's dat elke database kan gebruiken. int
databaseDtuMin De minimale DTU is gegarandeerd. int
dtu Het totale aantal gedeelde DTU's voor de elastische databasepool. int
edition De editie van de elastische pool. 'Basic'
'BusinessCritical'
'GeneralPurpose'
'Premium'
'Standard'
storageMB Hiermee haalt u de opslaglimiet op voor de elastische pool van de database in MB. int
zoneRedundant Of deze elastische databasepool zone-redundant is, wat betekent dat de replica's van deze database worden verdeeld over meerdere beschikbaarheidszones. bool

TrackedResourceTags

Name Description Value

Gebruiksvoorbeelden

Terraform-monsters

Een eenvoudig voorbeeld van het implementeren van Azure SQL Elastic Pool.

terraform {
  required_providers {
    azapi = {
      source = "Azure/azapi"
    }
    azurerm = {
      source = "hashicorp/azurerm"
    }
  }
}

provider "azurerm" {
  features {
  }
}

provider "azapi" {
  skip_provider_registration = false
}

variable "resource_name" {
  type    = string
  default = "acctest0001"
}

variable "location" {
  type    = string
  default = "westeurope"
}

variable "administrator_login_password" {
  type        = string
  description = "The administrator login password for the SQL server"
  sensitive   = true
}

data "azurerm_client_config" "current" {
}

resource "azapi_resource" "resourceGroup" {
  type     = "Microsoft.Resources/resourceGroups@2020-06-01"
  name     = var.resource_name
  location = var.location
}

resource "azapi_resource" "server" {
  type      = "Microsoft.Sql/servers@2021-02-01-preview"
  parent_id = azapi_resource.resourceGroup.id
  name      = var.resource_name
  location  = var.location
  body = {
    properties = {
      administratorLogin            = "4dm1n157r470r"
      administratorLoginPassword    = var.administrator_login_password
      minimalTlsVersion             = "1.2"
      publicNetworkAccess           = "Enabled"
      restrictOutboundNetworkAccess = "Disabled"
      version                       = "12.0"
    }
  }
  schema_validation_enabled = false
  response_export_values    = ["*"]
}

data "azapi_resource_id" "publicMaintenanceConfiguration" {
  type      = "Microsoft.Maintenance/publicMaintenanceConfigurations@2023-04-01"
  parent_id = "/subscriptions/${data.azurerm_client_config.current.subscription_id}"
  name      = "SQL_Default"
}

resource "azapi_resource" "elasticPool" {
  type      = "Microsoft.Sql/servers/elasticPools@2020-11-01-preview"
  parent_id = azapi_resource.server.id
  name      = var.resource_name
  location  = var.location
  body = {
    properties = {
      maintenanceConfigurationId = data.azapi_resource_id.publicMaintenanceConfiguration.id
      maxSizeBytes               = 5.24288e+09
      perDatabaseSettings = {
        maxCapacity = 5
        minCapacity = 0
      }
      zoneRedundant = false
    }
    sku = {
      capacity = 50
      family   = ""
      name     = "BasicPool"
      tier     = "Basic"
    }
  }
  schema_validation_enabled = false
  response_export_values    = ["*"]
}

Een eenvoudig voorbeeld van het implementeren van Azure SQL Elastic Pool.

terraform {
  required_providers {
    azapi = {
      source = "Azure/azapi"
    }
    azurerm = {
      source = "hashicorp/azurerm"
    }
  }
}

provider "azurerm" {
  features {
  }
}

provider "azapi" {
  skip_provider_registration = false
}

variable "resource_name" {
  type    = string
  default = "acctest0001"
}

variable "location" {
  type    = string
  default = "westeurope"
}

variable "administrator_login_password" {
  type        = string
  description = "The administrator login password for the SQL server"
  sensitive   = true
}

data "azurerm_client_config" "current" {
}

resource "azapi_resource" "resourceGroup" {
  type     = "Microsoft.Resources/resourceGroups@2020-06-01"
  name     = var.resource_name
  location = var.location
}

resource "azapi_resource" "server" {
  type      = "Microsoft.Sql/servers@2021-02-01-preview"
  parent_id = azapi_resource.resourceGroup.id
  name      = var.resource_name
  location  = var.location
  body = {
    properties = {
      administratorLogin            = "4dm1n157r470r"
      administratorLoginPassword    = var.administrator_login_password
      minimalTlsVersion             = "1.2"
      publicNetworkAccess           = "Enabled"
      restrictOutboundNetworkAccess = "Disabled"
      version                       = "12.0"
    }
  }
  schema_validation_enabled = false
  response_export_values    = ["*"]
}

data "azapi_resource_id" "publicMaintenanceConfiguration" {
  type      = "Microsoft.Maintenance/publicMaintenanceConfigurations@2023-04-01"
  parent_id = "/subscriptions/${data.azurerm_client_config.current.subscription_id}"
  name      = "SQL_Default"
}

resource "azapi_resource" "elasticPool" {
  type      = "Microsoft.Sql/servers/elasticPools@2020-11-01-preview"
  parent_id = azapi_resource.server.id
  name      = var.resource_name
  location  = var.location
  body = {
    properties = {
      maintenanceConfigurationId = data.azapi_resource_id.publicMaintenanceConfiguration.id
      maxSizeBytes               = 5.24288e+09
      perDatabaseSettings = {
        maxCapacity = 5
        minCapacity = 0
      }
      zoneRedundant = false
    }
    sku = {
      capacity = 50
      family   = ""
      name     = "BasicPool"
      tier     = "Basic"
    }
  }
  schema_validation_enabled = false
  response_export_values    = ["*"]
}