Kommentar
Åtkomst till den här sidan kräver auktorisering. Du kan prova att logga in eller ändra kataloger.
Åtkomst till den här sidan kräver auktorisering. Du kan prova att ändra kataloger.
- Latest
- 2025-02-01-preview
- 2025-01-01
- 2024-11-01-preview
- 2024-05-01-preview
- 2023-08-01
- 2023-08-01-preview
- 2023-05-01-preview
- 2023-02-01-preview
- 2022-11-01-preview
- 2022-08-01-preview
- 2022-05-01-preview
- 2022-02-01-preview
- 2021-11-01
- 2021-11-01-preview
- 2021-08-01-preview
- 2021-05-01-preview
- 2021-02-01-preview
- 2020-11-01-preview
- 2020-08-01-preview
- 2020-02-02-preview
- 2015-05-01-preview
Bicep-resursdefinition
Resurstypen servers/failoverGroups kan distribueras med åtgärder som är avsedda:
- Resursgrupper – Se resursgruppsdistributionskommandon
En lista över ändrade egenskaper i varje API-version finns i ändringsloggen.
Resursformat
För att skapa en Microsoft. SQL/servers/failoverGroups-resurs, lägg till följande Bicep i din mall.
resource symbolicname 'Microsoft.Sql/servers/failoverGroups@2021-05-01-preview' = {
parent: resourceSymbolicName
name: 'string'
properties: {
databases: [
'string'
]
partnerServers: [
{
id: 'string'
}
]
readOnlyEndpoint: {
failoverPolicy: 'string'
}
readWriteEndpoint: {
failoverPolicy: 'string'
failoverWithDataLossGracePeriodMinutes: int
}
}
tags: {
{customized property}: 'string'
}
}
Egenskapsvärden
Microsoft. SQL/servrar/failoverGroups
| Name | Description | Value |
|---|---|---|
| name | Resursnamnet | sträng (krävs) |
| parent | I Bicep kan du ange föräldraresursen för en barnresurs. Du behöver bara lägga till den här egenskapen när den underordnade resursen deklareras utanför den överordnade resursen. Mer information finns i Underordnad resurs utanför den överordnade resursen. |
Symboliskt namn för resurs av typen: servrar |
| properties | Resursegenskaper. | FailoverGroupProperties |
| tags | Resursetiketter | Ordlista med taggnamn och värden. Se taggar i mallar |
FailoverGroupProperties
| Name | Description | Value |
|---|---|---|
| databases | Lista över databaser i redundansgruppen. | string[] |
| partnerServers | Lista över partnerserverinformation för redundansgruppen. | PartnerInfo[] (obligatoriskt) |
| readOnlyEndpoint | Skrivskyddad slutpunkt för redundansklusterinstansen. | FailoverGroupReadOnlyEndpoint |
| readWriteEndpoint | Skrivskyddad slutpunkt för redundansklusterinstansen. | FailoverGroupReadWriteEndpoint (krävs) |
FailoverGroupReadOnlyEndpoint
| Name | Description | Value |
|---|---|---|
| failoverPolicy | Redundansprincip för den skrivskyddade slutpunkten för redundansgruppen. | 'Disabled' 'Enabled' |
FailoverGroupReadWriteEndpoint
| Name | Description | Value |
|---|---|---|
| failoverPolicy | Redundansprincip för skrivskyddad slutpunkt för redundansgruppen. Om failoverPolicy är Automatisk krävs failoverWithDataLossGracePeriodMinutes. | 'Automatic' "Manual" (obligatoriskt) |
| failoverWithDataLossGracePeriodMinutes | Respitperiod före redundansväxling med dataförlust görs för läs- och skrivslutpunkten. Om failoverPolicy är Automatisk krävs failoverWithDataLossGracePeriodMinutes. | int |
FailoverGroupTags
| Name | Description | Value |
|---|
PartnerInfo
| Name | Description | Value |
|---|---|---|
| id | Resursidentifierare för partnerservern. | sträng (krävs) |
Användningsexempel
Bicep-prover
Ett grundläggande exempel på att distribuera Microsoft Azure SQL Failover Group.
param resourceName string = 'acctest0001'
param location string = 'westus'
param secondaryLocation string = 'eastus'
@secure()
@description('The administrator login password for the SQL server')
param administratorLoginPassword string
resource server 'Microsoft.Sql/servers@2023-08-01-preview' = {
name: '${resourceName}-primary'
location: location
properties: {
administratorLogin: 'mradministrator'
administratorLoginPassword: null
minimalTlsVersion: '1.2'
publicNetworkAccess: 'Enabled'
restrictOutboundNetworkAccess: 'Disabled'
version: '12.0'
}
}
resource server1 'Microsoft.Sql/servers@2023-08-01-preview' = {
name: '${resourceName}-secondary'
properties: {
administratorLogin: 'mradministrator'
administratorLoginPassword: null
minimalTlsVersion: '1.2'
publicNetworkAccess: 'Enabled'
restrictOutboundNetworkAccess: 'Disabled'
version: '12.0'
}
}
resource database 'Microsoft.Sql/servers/databases@2023-08-01-preview' = {
parent: server
name: '${resourceName}-db'
location: location
properties: {
autoPauseDelay: 0
collation: 'SQL_Latin1_General_CP1_CI_AS'
createMode: 'Default'
elasticPoolId: ''
encryptionProtectorAutoRotation: false
highAvailabilityReplicaCount: 0
isLedgerOn: false
licenseType: ''
maxSizeBytes: 214748364800
minCapacity: 0
readScale: 'Disabled'
requestedBackupStorageRedundancy: 'Geo'
sampleName: ''
secondaryType: ''
zoneRedundant: false
}
sku: {
name: 'S1'
}
}
resource failoverGroup 'Microsoft.Sql/servers/failoverGroups@2023-08-01-preview' = {
parent: server
name: '${resourceName}-fg'
properties: {
databases: [
database.id
]
partnerServers: [
{
id: server1.id
}
]
readOnlyEndpoint: {
failoverPolicy: 'Disabled'
}
readWriteEndpoint: {
failoverPolicy: 'Automatic'
failoverWithDataLossGracePeriodMinutes: 60
}
}
}
Resursdefinition för ARM-mall
Resurstypen servers/failoverGroups kan distribueras med åtgärder som är avsedda:
- Resursgrupper – Se resursgruppsdistributionskommandon
En lista över ändrade egenskaper i varje API-version finns i ändringsloggen.
Resursformat
För att skapa en Microsoft. SQL/servers/failoverGroups-resurs, lägg till följande JSON i din mall.
{
"type": "Microsoft.Sql/servers/failoverGroups",
"apiVersion": "2021-05-01-preview",
"name": "string",
"properties": {
"databases": [ "string" ],
"partnerServers": [
{
"id": "string"
}
],
"readOnlyEndpoint": {
"failoverPolicy": "string"
},
"readWriteEndpoint": {
"failoverPolicy": "string",
"failoverWithDataLossGracePeriodMinutes": "int"
}
},
"tags": {
"{customized property}": "string"
}
}
Egenskapsvärden
Microsoft. SQL/servrar/failoverGroups
| Name | Description | Value |
|---|---|---|
| apiVersion | API-versionen | '2021-05-01-preview' |
| name | Resursnamnet | sträng (krävs) |
| properties | Resursegenskaper. | FailoverGroupProperties |
| tags | Resursetiketter | Ordlista med taggnamn och värden. Se taggar i mallar |
| type | Resurstypen | 'Microsoft. SQL/servrar/failoverGroups |
FailoverGroupProperties
| Name | Description | Value |
|---|---|---|
| databases | Lista över databaser i redundansgruppen. | string[] |
| partnerServers | Lista över partnerserverinformation för redundansgruppen. | PartnerInfo[] (obligatoriskt) |
| readOnlyEndpoint | Skrivskyddad slutpunkt för redundansklusterinstansen. | FailoverGroupReadOnlyEndpoint |
| readWriteEndpoint | Skrivskyddad slutpunkt för redundansklusterinstansen. | FailoverGroupReadWriteEndpoint (krävs) |
FailoverGroupReadOnlyEndpoint
| Name | Description | Value |
|---|---|---|
| failoverPolicy | Redundansprincip för den skrivskyddade slutpunkten för redundansgruppen. | 'Disabled' 'Enabled' |
FailoverGroupReadWriteEndpoint
| Name | Description | Value |
|---|---|---|
| failoverPolicy | Redundansprincip för skrivskyddad slutpunkt för redundansgruppen. Om failoverPolicy är Automatisk krävs failoverWithDataLossGracePeriodMinutes. | 'Automatic' "Manual" (obligatoriskt) |
| failoverWithDataLossGracePeriodMinutes | Respitperiod före redundansväxling med dataförlust görs för läs- och skrivslutpunkten. Om failoverPolicy är Automatisk krävs failoverWithDataLossGracePeriodMinutes. | int |
FailoverGroupTags
| Name | Description | Value |
|---|
PartnerInfo
| Name | Description | Value |
|---|---|---|
| id | Resursidentifierare för partnerservern. | sträng (krävs) |
Användningsexempel
Resursdefinition för Terraform (AzAPI-provider)
Resurstypen servers/failoverGroups kan distribueras med åtgärder som är avsedda:
- Resursgrupper
En lista över ändrade egenskaper i varje API-version finns i ändringsloggen.
Resursformat
För att skapa en Microsoft. SQL/servers/failoverGroups-resurs, lägg till följande Terraform i din mall.
resource "azapi_resource" "symbolicname" {
type = "Microsoft.Sql/servers/failoverGroups@2021-05-01-preview"
name = "string"
parent_id = "string"
tags = {
{customized property} = "string"
}
body = {
properties = {
databases = [
"string"
]
partnerServers = [
{
id = "string"
}
]
readOnlyEndpoint = {
failoverPolicy = "string"
}
readWriteEndpoint = {
failoverPolicy = "string"
failoverWithDataLossGracePeriodMinutes = int
}
}
}
}
Egenskapsvärden
Microsoft. SQL/servrar/failoverGroups
| Name | Description | Value |
|---|---|---|
| name | Resursnamnet | sträng (krävs) |
| parent_id | ID för resursen som är överordnad för den här resursen. | ID för resurs av typen: servrar |
| properties | Resursegenskaper. | FailoverGroupProperties |
| tags | Resursetiketter | Ordlista med taggnamn och värden. |
| type | Resurstypen | "Microsoft. sql/servers/failoverGroups@2021-05-01-preview" |
FailoverGroupProperties
| Name | Description | Value |
|---|---|---|
| databases | Lista över databaser i redundansgruppen. | string[] |
| partnerServers | Lista över partnerserverinformation för redundansgruppen. | PartnerInfo[] (obligatoriskt) |
| readOnlyEndpoint | Skrivskyddad slutpunkt för redundansklusterinstansen. | FailoverGroupReadOnlyEndpoint |
| readWriteEndpoint | Skrivskyddad slutpunkt för redundansklusterinstansen. | FailoverGroupReadWriteEndpoint (krävs) |
FailoverGroupReadOnlyEndpoint
| Name | Description | Value |
|---|---|---|
| failoverPolicy | Redundansprincip för den skrivskyddade slutpunkten för redundansgruppen. | 'Disabled' 'Enabled' |
FailoverGroupReadWriteEndpoint
| Name | Description | Value |
|---|---|---|
| failoverPolicy | Redundansprincip för skrivskyddad slutpunkt för redundansgruppen. Om failoverPolicy är Automatisk krävs failoverWithDataLossGracePeriodMinutes. | 'Automatic' "Manual" (obligatoriskt) |
| failoverWithDataLossGracePeriodMinutes | Respitperiod före redundansväxling med dataförlust görs för läs- och skrivslutpunkten. Om failoverPolicy är Automatisk krävs failoverWithDataLossGracePeriodMinutes. | int |
FailoverGroupTags
| Name | Description | Value |
|---|
PartnerInfo
| Name | Description | Value |
|---|---|---|
| id | Resursidentifierare för partnerservern. | sträng (krävs) |
Användningsexempel
Terraform-exempel
Ett grundläggande exempel på att distribuera Microsoft Azure SQL Failover Group.
terraform {
required_providers {
azapi = {
source = "Azure/azapi"
}
}
}
provider "azapi" {
skip_provider_registration = false
}
data "azapi_client_config" "current" {}
variable "resource_name" {
type = string
default = "acctest0001"
}
variable "location" {
type = string
default = "westus"
}
variable "secondary_location" {
type = string
default = "eastus"
}
variable "administrator_login_password" {
type = string
sensitive = true
description = "The administrator login password for the SQL server"
}
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@2023-08-01-preview"
parent_id = azapi_resource.resourceGroup.id
name = "${var.resource_name}-primary"
location = var.location
body = {
properties = {
administratorLogin = "mradministrator"
administratorLoginPassword = var.administrator_login_password
minimalTlsVersion = "1.2"
publicNetworkAccess = "Enabled"
restrictOutboundNetworkAccess = "Disabled"
version = "12.0"
}
}
}
resource "azapi_resource" "server_1" {
type = "Microsoft.Sql/servers@2023-08-01-preview"
parent_id = azapi_resource.resourceGroup.id
name = "${var.resource_name}-secondary"
location = var.secondary_location
body = {
properties = {
administratorLogin = "mradministrator"
administratorLoginPassword = var.administrator_login_password
minimalTlsVersion = "1.2"
publicNetworkAccess = "Enabled"
restrictOutboundNetworkAccess = "Disabled"
version = "12.0"
}
}
}
resource "azapi_resource" "database" {
type = "Microsoft.Sql/servers/databases@2023-08-01-preview"
parent_id = azapi_resource.server.id
name = "${var.resource_name}-db"
location = var.location
body = {
properties = {
autoPauseDelay = 0
collation = "SQL_Latin1_General_CP1_CI_AS"
createMode = "Default"
elasticPoolId = ""
encryptionProtectorAutoRotation = false
highAvailabilityReplicaCount = 0
isLedgerOn = false
licenseType = ""
maxSizeBytes = 214748364800
minCapacity = 0
readScale = "Disabled"
requestedBackupStorageRedundancy = "Geo"
sampleName = ""
secondaryType = ""
zoneRedundant = false
}
sku = {
name = "S1"
}
}
}
resource "azapi_resource" "failoverGroup" {
type = "Microsoft.Sql/servers/failoverGroups@2023-08-01-preview"
parent_id = azapi_resource.server.id
name = "${var.resource_name}-fg"
body = {
properties = {
databases = [azapi_resource.database.id]
partnerServers = [{
id = azapi_resource.server_1.id
}]
readOnlyEndpoint = {
failoverPolicy = "Disabled"
}
readWriteEndpoint = {
failoverPolicy = "Automatic"
failoverWithDataLossGracePeriodMinutes = 60
}
}
}
}