Microsoft.DBforPostgreSQL 伺服器

Bicep 資源定義

伺服器資源類型可以使用目標作業進行部署:

如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄檔。

資源格式

若要建立 Microsoft.DBforPostgreSQL/servers 資源,請將下列 Bicep 新增至範本。

resource symbolicname 'Microsoft.DBforPostgreSQL/servers@2017-12-01' = {
  name: 'string'
  location: 'string'
  tags: {
    tagName1: 'tagValue1'
    tagName2: 'tagValue2'
  }
  sku: {
    capacity: int
    family: 'string'
    name: 'string'
    size: 'string'
    tier: 'string'
  }
  identity: {
    type: 'SystemAssigned'
  }
  properties: {
    infrastructureEncryption: 'string'
    minimalTlsVersion: 'string'
    publicNetworkAccess: 'string'
    sslEnforcement: 'string'
    storageProfile: {
      backupRetentionDays: int
      geoRedundantBackup: 'string'
      storageAutogrow: 'string'
      storageMB: int
    }
    version: 'string'
    createMode: 'string'
    // For remaining properties, see ServerPropertiesForCreateOrServerProperties objects
  }
}

ServerPropertiesForCreateOrServerProperties 物件

設定 createMode 屬性以指定物件的類型。

針對 [預設],請使用:

  createMode: 'Default'
  administratorLogin: 'string'
  administratorLoginPassword: 'string'

針對 GeoRestore,請使用:

  createMode: 'GeoRestore'
  sourceServerId: 'string'

針對 PointInTimeRestore,請使用:

  createMode: 'PointInTimeRestore'
  restorePointInTime: 'string'
  sourceServerId: 'string'

針對 [複本],請使用:

  createMode: 'Replica'
  sourceServerId: 'string'

屬性值

servers

名稱 描述
NAME 資源名稱 需要字串 ()

字元限制:3-63

有效字元:
小寫字母、連字號和數字。

不能以連字號開頭或結尾。

資源名稱在整個 Azure 中必須是唯一的。
location 資源所在的位置。 需要字串 ()
tags 索引鍵/值組形式的應用程式特有中繼資料。 標記名稱和值的字典。 請參閱 範本中的標籤
sku SKU (伺服器) 定價層。 Sku
身分識別 伺服器的 Azure Active Directory 身分識別。 ResourceIdentity
properties 伺服器的屬性。 ServerPropertiesForCreateOrServerProperties (必要)

ResourceIdentity

名稱 描述
類型 識別類型。 將此設定為 'SystemAssigned',以便自動建立並指派資源的 Azure Active Directory 主體。 'SystemAssigned'

ServerPropertiesForCreateOrServerProperties

名稱 描述
infrastructureEncryption 顯示伺服器是否啟用基礎結構加密的狀態。 'Disabled'
'Enabled'
minimalTlsVersion 為伺服器強制執行最低 Tls 版本。 'TLS1_0'
'TLS1_1'
'TLS1_2'
'TLSEnforcementDisabled'
publicNetworkAccess 此伺服器是否允許公用網路存取。 值是選擇性的,但如果傳入,則必須是 'Enabled' 或 'Disabled' 'Disabled'
'Enabled'
sslEnforcement 在連線到伺服器時啟用 SSL 強制執行。 'Disabled'
'Enabled'
storageProfile 伺服器的儲存體設定檔。 StorageProfile
version 伺服器版本。 '10'
'10.0'
'10.2'
'11'
'9.5'
'9.6'
createMode 設定物件類型 預設值
GeoRestore
PointInTimeRestore
需要本 ()

StorageProfile

名稱 描述
backupRetentionDays 伺服器的備份保留天數。 int
geoRedundantBackup 針對伺服器備份啟用異地備援或不啟用。 'Disabled'
'Enabled'
storageAutogrow 啟用儲存體自動成長。 'Disabled'
'Enabled'
storageMB 伺服器允許的最大儲存體。 int

ServerPropertiesForDefaultCreate

名稱 描述
createMode 建立新伺服器的模式。 必要) 'Default' (
administratorLogin 伺服器的系統管理員登入名稱。 只有在建立伺服器 (且建立) 時,才能指定。 需要字串 ()
administratorLoginPassword 系統管理員登入的密碼。 需要字串 ()

ServerPropertiesForGeoRestore

名稱 描述
createMode 建立新伺服器的模式。 'GeoRestore' (必要)
sourceServerId 要從中還原的來源伺服器識別碼。 需要字串 ()

ServerPropertiesForRestore

名稱 描述
createMode 建立新伺服器的模式。 需要 'PointInTimeRestore' ()
restorePointInTime 還原點建立時間 (ISO8601 格式) ,並指定要從還原的時間。 需要字串 ()
sourceServerId 要從中還原的來源伺服器識別碼。 需要字串 ()

ServerPropertiesForReplica

名稱 描述
createMode 建立新伺服器的模式。 'Replica' (必要)
sourceServerId 要從中建立複本的主伺服器識別碼。 需要字串 ()

SKU

名稱 描述
處理能力 相應增加/放大容量,代表伺服器的計算單位。 int
family 硬體系列。 字串
NAME sku 的名稱,通常是階層 + 系列 + 核心,例如B_Gen4_1,GP_Gen5_8。 需要字串 ()
{1}size{2} 要適當地由資源解譯的大小程式代碼。 字串
tier 特定 SKU 的層級,例如基本層。 'Basic'
'GeneralPurpose'
'MemoryOptimized'

快速入門範本

下列快速入門範本會部署此資源類型。

[範本] 描述
在 App Services 上使用 PostgreSQL 資料庫的 Airflow Web 應用程式

部署至 Azure
在 App Services 上使用 PostgreSQL 資料庫部署 Airflow Web 應用程式的範本
Buffalo Web 應用程式

部署至 Azure
快速且便宜地開始在 Azure 上執行 Golang Buffalo 應用程式。
使用 VNet 部署適用於 PostgreSQL 的 Azure 資料庫

部署至 Azure
此範本提供一種方式來部署適用于 PostgreSQL 的 Azure 資料庫與 VNet 整合。
Linux 上的 Airflow Docker Web 應用程式與 PostgreSQL

部署至 Azure
此範本可讓您輕鬆地在 Linux Web 應用程式上使用適用于 PostgreSQL 的 Azure 資料庫部署 puckel/docker-airflow 映射 (最新的標籤)
Linux 上的 Web 應用程式與 PostgreSQL

部署至 Azure
此範本提供一種簡單的方式,可透過適用于 PostgreSQL 的 Azure 資料庫在 Linux 上部署 Web 應用程式, (Preview) 。
使用 PostgreSQL 在 Linux 上的 Sonarqube Docker Web 應用程式

部署至 Azure
此範本可讓您輕鬆地在 Linux Web 應用程式上部署 Sonarqube docker 映射, (alpine 標籤) 與適用于 PostgreSQL 的 Azure 資料庫 (Preview)
Linux 上的 Web 應用程式與 PostgreSQL

部署至 Azure
此範本提供簡單的方式,可讓您使用適用于 PostgreSQL 的 Azure 資料庫在 Linux 上部署 Web 應用程式。

ARM 範本資源定義

伺服器資源類型可以使用目標作業進行部署:

如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄檔。

資源格式

若要建立 Microsoft.DBforPostgreSQL/servers 資源,請將下列 JSON 新增至範本。

{
  "type": "Microsoft.DBforPostgreSQL/servers",
  "apiVersion": "2017-12-01",
  "name": "string",
  "location": "string",
  "tags": {
    "tagName1": "tagValue1",
    "tagName2": "tagValue2"
  },
  "sku": {
    "capacity": "int",
    "family": "string",
    "name": "string",
    "size": "string",
    "tier": "string"
  },
  "identity": {
    "type": "SystemAssigned"
  },
  "properties": {
    "infrastructureEncryption": "string",
    "minimalTlsVersion": "string",
    "publicNetworkAccess": "string",
    "sslEnforcement": "string",
    "storageProfile": {
      "backupRetentionDays": "int",
      "geoRedundantBackup": "string",
      "storageAutogrow": "string",
      "storageMB": "int"
    },
    "version": "string",
    "createMode": "string"
    // For remaining properties, see ServerPropertiesForCreateOrServerProperties objects
  }
}

ServerPropertiesForCreateOrServerProperties 物件

設定 createMode 屬性以指定物件的類型。

針對 [預設],請使用:

  "createMode": "Default",
  "administratorLogin": "string",
  "administratorLoginPassword": "string"

針對 GeoRestore,請使用:

  "createMode": "GeoRestore",
  "sourceServerId": "string"

針對 PointInTimeRestore,請使用:

  "createMode": "PointInTimeRestore",
  "restorePointInTime": "string",
  "sourceServerId": "string"

針對 [複本],請使用:

  "createMode": "Replica",
  "sourceServerId": "string"

屬性值

servers

名稱 描述
類型 資源類型 'Microsoft.DBforPostgreSQL/servers'
apiVersion 資源 API 版本 '2017-12-01'
NAME 資源名稱 需要字串 ()

字元限制:3-63

有效字元:
小寫字母、連字號和數字。

不能以連字號開頭或結尾。

資源名稱在整個 Azure 中必須是唯一的。
location 資源所在的位置。 需要字串 ()
tags 索引鍵/值組形式的應用程式特有中繼資料。 標記名稱和值的字典。 請參閱 範本中的標籤
sku SKU (伺服器) 定價層。 Sku
身分識別 伺服器的 Azure Active Directory 身分識別。 ResourceIdentity
properties 伺服器的屬性。 ServerPropertiesForCreateOrServerProperties (必要)

ResourceIdentity

名稱 描述
類型 識別類型。 將此設定為 'SystemAssigned',以便自動建立並指派資源的 Azure Active Directory 主體。 'SystemAssigned'

ServerPropertiesForCreateOrServerProperties

名稱 描述
infrastructureEncryption 顯示伺服器是否啟用基礎結構加密的狀態。 'Disabled'
'Enabled'
minimalTlsVersion 為伺服器強制執行最低 Tls 版本。 'TLS1_0'
'TLS1_1'
'TLS1_2'
'TLSEnforcementDisabled'
publicNetworkAccess 此伺服器是否允許公用網路存取。 值是選擇性的,但如果傳入,則必須是 'Enabled' 或 'Disabled' 'Disabled'
'Enabled'
sslEnforcement 在連線到伺服器時啟用 SSL 強制執行。 'Disabled'
'Enabled'
storageProfile 伺服器的儲存體設定檔。 StorageProfile
version 伺服器版本。 '10'
'10.0'
'10.2'
'11'
'9.5'
'9.6'
createMode 設定物件類型 預設值
GeoRestore
PointInTimeRestore
需要本 ()

StorageProfile

名稱 描述
backupRetentionDays 伺服器的備份保留天數。 int
geoRedundantBackup 針對伺服器備份啟用異地備援或不啟用。 'Disabled'
'Enabled'
storageAutogrow 啟用儲存體自動成長。 'Disabled'
'Enabled'
storageMB 伺服器允許的最大儲存體。 int

ServerPropertiesForDefaultCreate

名稱 描述
createMode 建立新伺服器的模式。 必要) 'Default' (
administratorLogin 伺服器的系統管理員登入名稱。 只有在建立伺服器 (且建立) 時,才能指定。 需要字串 ()
administratorLoginPassword 系統管理員登入的密碼。 需要字串 ()

ServerPropertiesForGeoRestore

名稱 描述
createMode 建立新伺服器的模式。 'GeoRestore' (必要)
sourceServerId 要從中還原的來源伺服器識別碼。 需要字串 ()

ServerPropertiesForRestore

名稱 描述
createMode 建立新伺服器的模式。 需要 'PointInTimeRestore' ()
restorePointInTime 還原點建立時間 (ISO8601 格式) ,並指定要從還原的時間。 需要字串 ()
sourceServerId 要從中還原的來源伺服器識別碼。 需要字串 ()

ServerPropertiesForReplica

名稱 描述
createMode 建立新伺服器的模式。 'Replica' (必要)
sourceServerId 要從中建立複本的主伺服器識別碼。 需要字串 ()

SKU

名稱 描述
處理能力 相應增加/放大容量,代表伺服器的計算單位。 int
family 硬體系列。 字串
NAME sku 的名稱,通常是階層 + 系列 + 核心,例如B_Gen4_1,GP_Gen5_8。 需要字串 ()
{1}size{2} 要適當地由資源解譯的大小程式代碼。 字串
tier 特定 SKU 的層級,例如基本層。 'Basic'
'GeneralPurpose'
'MemoryOptimized'

快速入門範本

下列快速入門範本會部署此資源類型。

[範本] 描述
在 App Services 上使用 PostgreSQL 資料庫的 Airflow Web 應用程式

部署至 Azure
在 App Services 上使用 PostgreSQL 資料庫部署 Airflow Web 應用程式的範本
Buffalo Web 應用程式

部署至 Azure
快速且便宜地開始在 Azure 上執行 Golang Buffalo 應用程式。
使用 VNet 部署適用於 PostgreSQL 的 Azure 資料庫

部署至 Azure
此範本提供一種方式來部署適用于 PostgreSQL 的 Azure 資料庫與 VNet 整合。
Linux 上的 Airflow Docker Web 應用程式與 PostgreSQL

部署至 Azure
此範本可讓您輕鬆地在 Linux Web 應用程式上使用適用于 PostgreSQL 的 Azure 資料庫部署 puckel/docker-airflow 映射 (最新的標籤)
Linux 上的 Web 應用程式與 PostgreSQL

部署至 Azure
此範本提供一種簡單的方式,可透過適用于 PostgreSQL 的 Azure 資料庫在 Linux 上部署 Web 應用程式, (Preview) 。
使用 PostgreSQL 在 Linux 上的 Sonarqube Docker Web 應用程式

部署至 Azure
此範本可讓您輕鬆地在 Linux Web 應用程式上部署 Sonarqube docker 映射, (alpine 標籤) 與適用于 PostgreSQL 的 Azure 資料庫 (Preview)
Linux 上的 Web 應用程式與 PostgreSQL

部署至 Azure
此範本提供簡單的方式,可讓您使用適用于 PostgreSQL 的 Azure 資料庫在 Linux 上部署 Web 應用程式。

Terraform (AzAPI 提供者) 資源定義

伺服器資源類型可以使用目標作業進行部署:

  • 資源群組

如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄檔。

資源格式

若要建立 Microsoft.DBforPostgreSQL/servers 資源,請將下列 Terraform 新增至範本。

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.DBforPostgreSQL/servers@2017-12-01"
  name = "string"
  location = "string"
  parent_id = "string"
  tags = {
    tagName1 = "tagValue1"
    tagName2 = "tagValue2"
  }
  identity {
    type = "SystemAssigned"
  }
  body = jsonencode({
    properties = {
      infrastructureEncryption = "string"
      minimalTlsVersion = "string"
      publicNetworkAccess = "string"
      sslEnforcement = "string"
      storageProfile = {
        backupRetentionDays = int
        geoRedundantBackup = "string"
        storageAutogrow = "string"
        storageMB = int
      }
      version = "string"
      createMode = "string"
      // For remaining properties, see ServerPropertiesForCreateOrServerProperties objects
    }
    sku = {
      capacity = int
      family = "string"
      name = "string"
      size = "string"
      tier = "string"
    }
  })
}

ServerPropertiesForCreateOrServerProperties 物件

設定 createMode 屬性以指定物件的類型。

針對 [預設],請使用:

  createMode = "Default"
  administratorLogin = "string"
  administratorLoginPassword = "string"

針對 GeoRestore,請使用:

  createMode = "GeoRestore"
  sourceServerId = "string"

針對 PointInTimeRestore,請使用:

  createMode = "PointInTimeRestore"
  restorePointInTime = "string"
  sourceServerId = "string"

針對 [複本],請使用:

  createMode = "Replica"
  sourceServerId = "string"

屬性值

servers

名稱 描述
類型 資源類型 「Microsoft.DBforPostgreSQL/servers@2017-12-01」
NAME 資源名稱 需要字串 ()

字元限制:3-63

有效字元:
小寫字母、連字號和數字。

不能以連字號開頭或結尾。

資源名稱在整個 Azure 中必須是唯一的。
location 資源所在的位置。 需要字串 ()
parent_id 若要部署至資源群組,請使用該資源群組的識別碼。 需要字串 ()
tags 索引鍵/值組形式的應用程式特有中繼資料。 標記名稱和值的字典。
sku SKU (伺服器) 定價層。 Sku
身分識別 伺服器的 Azure Active Directory 身分識別。 ResourceIdentity
properties 伺服器的屬性。 ServerPropertiesForCreateOrServerProperties (必要)

ResourceIdentity

名稱 描述
類型 識別類型。 將此設定為 'SystemAssigned',以便自動建立並指派資源的 Azure Active Directory 主體。 「SystemAssigned」

ServerPropertiesForCreateOrServerProperties

名稱 描述
infrastructureEncryption 顯示伺服器是否啟用基礎結構加密的狀態。 「Disabled」
「Enabled」
minimalTlsVersion 為伺服器強制執行最低 Tls 版本。 「TLS1_0」
「TLS1_1」
「TLS1_2」
「TLSEnforcementDisabled」
publicNetworkAccess 此伺服器是否允許公用網路存取。 值是選擇性的,但如果傳入,則必須是 'Enabled' 或 'Disabled' 「Disabled」
「Enabled」
sslEnforcement 在連線到伺服器時啟用 SSL 強制執行。 「Disabled」
「Enabled」
storageProfile 伺服器的儲存體設定檔。 StorageProfile
version 伺服器版本。 "10"
"10.0"
"10.2"
"11"
"9.5"
"9.6"
createMode 設定物件類型 預設值
GeoRestore
PointInTimeRestore
需要本 ()

StorageProfile

名稱 描述
backupRetentionDays 伺服器的備份保留天數。 int
geoRedundantBackup 針對伺服器備份啟用異地備援或不啟用。 「Disabled」
「Enabled」
storageAutogrow 啟用儲存體自動成長。 「Disabled」
「Enabled」
storageMB 伺服器允許的最大儲存體。 int

ServerPropertiesForDefaultCreate

名稱 描述
createMode 建立新伺服器的模式。 「Default」 (必要)
administratorLogin 伺服器的系統管理員登入名稱。 只有在建立伺服器 (且建立) 時,才能指定。 需要字串 ()
administratorLoginPassword 系統管理員登入的密碼。 需要字串 ()

ServerPropertiesForGeoRestore

名稱 描述
createMode 建立新伺服器的模式。 「GeoRestore」 (必要)
sourceServerId 要從中還原的來源伺服器識別碼。 需要字串 ()

ServerPropertiesForRestore

名稱 描述
createMode 建立新伺服器的模式。 「PointInTimeRestore」 (必要)
restorePointInTime 還原點建立時間 (ISO8601 格式) ,並指定要從還原的時間。 需要字串 ()
sourceServerId 要從中還原的來源伺服器識別碼。 需要字串 ()

ServerPropertiesForReplica

名稱 描述
createMode 建立新伺服器的模式。 「複本」 (必要)
sourceServerId 要從中建立複本的主伺服器識別碼。 需要字串 ()

SKU

名稱 描述
處理能力 相應增加/放大容量,代表伺服器的計算單位。 int
family 硬體系列。 字串
NAME sku 的名稱,通常是階層 + 系列 + 核心,例如B_Gen4_1,GP_Gen5_8。 需要字串 ()
{1}size{2} 要適當地由資源解譯的大小程式代碼。 字串
tier 特定 SKU 的層級,例如基本層。 "Basic"
「GeneralPurpose」
「MemoryOptimized」