共用方式為


Microsoft.AppPlatform Spring/apps/deployments 2022-03-01-preview

Bicep 資源定義

Spring/apps/deployments 資源類型可以使用目標作業來部署:

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

資源格式

若要建立 Microsoft.AppPlatform/Spring/apps/deployments 資源,請將下列 Bicep 新增至範本。

resource symbolicname 'Microsoft.AppPlatform/Spring/apps/deployments@2022-03-01-preview' = {
  parent: resourceSymbolicName
  name: 'string'
  properties: {
    active: bool
    deploymentSettings: {
      addonConfigs: {
        {customized property}: {
          {customized property}: any(...)
        }
      }
      containerProbeSettings: {
        disableProbe: bool
      }
      environmentVariables: {
        {customized property}: 'string'
      }
      resourceRequests: {
        cpu: 'string'
        memory: 'string'
      }
    }
    source: {
      version: 'string'
      type: 'string'
      // For remaining properties, see UserSourceInfo objects
    }
  }
  sku: {
    capacity: int
    name: 'string'
    tier: 'string'
  }
}

UserSourceInfo 物件

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

針對 BuildResult,請使用:

{
  buildResultId: 'string'
  type: 'BuildResult'
}

針對 容器,請使用:

{
  customContainer: {
    args: [
      'string'
    ]
    command: [
      'string'
    ]
    containerImage: 'string'
    imageRegistryCredential: {
      password: 'string'
      username: 'string'
    }
    languageFramework: 'string'
    server: 'string'
  }
  type: 'Container'
}

針對 Jar,請使用:

{
  jvmOptions: 'string'
  relativePath: 'string'
  runtimeVersion: 'string'
  type: 'Jar'
}

針對 NetCoreZip,請使用:

{
  netCoreMainEntryPath: 'string'
  relativePath: 'string'
  runtimeVersion: 'string'
  type: 'NetCoreZip'
}

針對 Source,請使用:

{
  artifactSelector: 'string'
  relativePath: 'string'
  runtimeVersion: 'string'
  type: 'Source'
}

屬性值

AddonProfile

名字 描述 價值

BuildResultUserSourceInfo

名字 描述 價值
buildResultId 相同 Spring 實例下現有成功建置結果的資源標識碼。 字串
類型 上傳的來源類型 'BuildResult' (必要)

ContainerProbeSettings

名字 描述 價值
disableProbe 指出是否停用活躍度和整備程度探查 bool

CustomContainer

名字 描述 價值
args 進入點的自變數。 如果未提供,則會使用 Docker 映像的 CMD。 string[]
命令 Entrypoint 陣列。 未在殼層內執行。 如果未提供,則會使用 Docker 映像的 ENTRYPOINT。 string[]
containerImage 自訂容器的容器映像。 這應該以 <存放庫>的形式:<標籤>,而不需登錄的伺服器名稱 字串
imageRegistryCredential 映像登錄的認證 ImageRegistryCredential
languageFramework 上傳之容器映像的語言架構 字串
伺服器 包含容器映像的登錄名稱 字串

CustomContainerUserSourceInfo

名字 描述 價值
customContainer 自定義容器承載 CustomContainer
類型 上傳的來源類型 'Container' (必要)

DeploymentResourceProperties

名字 描述 價值
積極 指出部署是否為使用中 bool
deploymentSettings 部署的部署設定 DeploymentSettings
已上傳部署的來源資訊。 UserSourceInfo

DeploymentSettings

名字 描述 價值
addonConfigs 附加元件集合 DeploymentSettingsAddonConfigs
containerProbeSettings 容器活躍度和整備探查設定 ContainerProbeSettings
environmentVariables 環境變數的集合 DeploymentSettingsEnvironmentVariables
resourceRequests 所需 CPU 和記憶體的要求資源數量。 建議使用此欄位來代表所需的 CPU 和記憶體,稍後將會淘汰舊的欄位 cpu 和 memoryInGB。 ResourceRequests

DeploymentSettingsAddonConfigs

名字 描述 價值

DeploymentSettingsEnvironmentVariables

名字 描述 價值

ImageRegistryCredential

名字 描述 價值
密碼 映像登錄認證的密碼 字串
username 映像登錄認證的用戶名稱 字串

JarUploadedUserSourceInfo

名字 描述 價值
jvmOptions JVM 參數 字串
relativePath 儲存來源之記憶體的相對路徑 字串
runtimeVersion Jar 檔案的運行時間版本 字串
類型 上傳的來源類型 'Jar' (必要)

Microsoft.AppPlatform/Spring/apps/deployments

名字 描述 價值
名字 資源名稱 字串 (必要)
父母 在 Bicep 中,您可以指定子資源的父資源。 只有在父資源外部宣告子資源時,才需要新增這個屬性。

如需詳細資訊,請參閱 父資源外部的子資源
類型的資源符號名稱:Spring/apps
性能 部署資源的屬性 DeploymentResourceProperties
sku 部署資源的 SKU Sku

NetCoreZipUploadedUserSourceInfo

名字 描述 價值
netCoreMainEntryPath 相對於 zip 根目錄的 .NET 可執行文件路徑 字串
relativePath 儲存來源之記憶體的相對路徑 字串
runtimeVersion .Net 檔案的運行時間版本 字串
類型 上傳的來源類型 'NetCoreZip' (必要)

ResourceRequests

名字 描述 價值
中央處理器 必要的CPU。 1 個核心可以以 1 或 1000m 表示。 這應該是基本層的 500m 或 1,標準層的 {500m、1、2、3、4} 。 字串
記憶 必要的記憶體。 1 GB 可由 1Gi 或 1024Mi 表示。 這應該是基本層的 {512Mi、1Gi、2Gi} 和標準層的 {512Mi、1Gi、2Gi、...、8Gi} 。 字串

Sku

名字 描述 價值
能力 目標資源的目前容量 int
名字 Sku 的名稱 字串
Sku 的階層 字串

SourceUploadedUserSourceInfo

名字 描述 價值
artifactSelector 要用於多模組專案的部署成品選取器。 這應該是
目標模組/項目的相對路徑。
字串
relativePath 儲存來源之記憶體的相對路徑 字串
runtimeVersion 來源檔案的運行時間版本 字串
類型 上傳的來源類型 'Source' (必要)

UserSourceInfo

名字 描述 價值
類型 將 設定為 type BuildResultUserSourceInfo的 'BuildResult'。 針對 customContainerUserSourceInfo 類型 設定為 'Container',。 將 類型設定為 『Jar』 JarUploadedUserSourceInfo。 針對 netCoreZipUploadedUserSourceInfo 類型 設定為 'NetCoreZip',。 針對 sourceUploadedUserSourceInfo 類型 設定為 'Source', 'BuildResult'
'Container'
'Jar'
'NetCoreZip'
'Source' (必要)
版本 來源的版本 字串

使用範例

Azure 快速入門範例

下列 Azure 快速入門範本 包含用於部署此資源類型的 Bicep 範例。

Bicep 檔案 描述
部署簡單的 Azure Spring Apps 微服務應用程式 此範本會部署簡單的 Azure Spring Apps 微服務應用程式,以在 Azure 上執行。

ARM 樣本資源定義

Spring/apps/deployments 資源類型可以使用目標作業來部署:

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

資源格式

若要建立 Microsoft.AppPlatform/Spring/apps/deployments 資源,請將下列 JSON 新增至範本。

{
  "type": "Microsoft.AppPlatform/Spring/apps/deployments",
  "apiVersion": "2022-03-01-preview",
  "name": "string",
  "properties": {
    "active": "bool",
    "deploymentSettings": {
      "addonConfigs": {
        "{customized property}": {
          "{customized property}": {}
        }
      },
      "containerProbeSettings": {
        "disableProbe": "bool"
      },
      "environmentVariables": {
        "{customized property}": "string"
      },
      "resourceRequests": {
        "cpu": "string",
        "memory": "string"
      }
    },
    "source": {
      "version": "string",
      "type": "string"
      // For remaining properties, see UserSourceInfo objects
    }
  },
  "sku": {
    "capacity": "int",
    "name": "string",
    "tier": "string"
  }
}

UserSourceInfo 物件

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

針對 BuildResult,請使用:

{
  "buildResultId": "string",
  "type": "BuildResult"
}

針對 容器,請使用:

{
  "customContainer": {
    "args": [ "string" ],
    "command": [ "string" ],
    "containerImage": "string",
    "imageRegistryCredential": {
      "password": "string",
      "username": "string"
    },
    "languageFramework": "string",
    "server": "string"
  },
  "type": "Container"
}

針對 Jar,請使用:

{
  "jvmOptions": "string",
  "relativePath": "string",
  "runtimeVersion": "string",
  "type": "Jar"
}

針對 NetCoreZip,請使用:

{
  "netCoreMainEntryPath": "string",
  "relativePath": "string",
  "runtimeVersion": "string",
  "type": "NetCoreZip"
}

針對 Source,請使用:

{
  "artifactSelector": "string",
  "relativePath": "string",
  "runtimeVersion": "string",
  "type": "Source"
}

屬性值

AddonProfile

名字 描述 價值

BuildResultUserSourceInfo

名字 描述 價值
buildResultId 相同 Spring 實例下現有成功建置結果的資源標識碼。 字串
類型 上傳的來源類型 'BuildResult' (必要)

ContainerProbeSettings

名字 描述 價值
disableProbe 指出是否停用活躍度和整備程度探查 bool

CustomContainer

名字 描述 價值
args 進入點的自變數。 如果未提供,則會使用 Docker 映像的 CMD。 string[]
命令 Entrypoint 陣列。 未在殼層內執行。 如果未提供,則會使用 Docker 映像的 ENTRYPOINT。 string[]
containerImage 自訂容器的容器映像。 這應該以 <存放庫>的形式:<標籤>,而不需登錄的伺服器名稱 字串
imageRegistryCredential 映像登錄的認證 ImageRegistryCredential
languageFramework 上傳之容器映像的語言架構 字串
伺服器 包含容器映像的登錄名稱 字串

CustomContainerUserSourceInfo

名字 描述 價值
customContainer 自定義容器承載 CustomContainer
類型 上傳的來源類型 'Container' (必要)

DeploymentResourceProperties

名字 描述 價值
積極 指出部署是否為使用中 bool
deploymentSettings 部署的部署設定 DeploymentSettings
已上傳部署的來源資訊。 UserSourceInfo

DeploymentSettings

名字 描述 價值
addonConfigs 附加元件集合 DeploymentSettingsAddonConfigs
containerProbeSettings 容器活躍度和整備探查設定 ContainerProbeSettings
environmentVariables 環境變數的集合 DeploymentSettingsEnvironmentVariables
resourceRequests 所需 CPU 和記憶體的要求資源數量。 建議使用此欄位來代表所需的 CPU 和記憶體,稍後將會淘汰舊的欄位 cpu 和 memoryInGB。 ResourceRequests

DeploymentSettingsAddonConfigs

名字 描述 價值

DeploymentSettingsEnvironmentVariables

名字 描述 價值

ImageRegistryCredential

名字 描述 價值
密碼 映像登錄認證的密碼 字串
username 映像登錄認證的用戶名稱 字串

JarUploadedUserSourceInfo

名字 描述 價值
jvmOptions JVM 參數 字串
relativePath 儲存來源之記憶體的相對路徑 字串
runtimeVersion Jar 檔案的運行時間版本 字串
類型 上傳的來源類型 'Jar' (必要)

Microsoft.AppPlatform/Spring/apps/deployments

名字 描述 價值
apiVersion API 版本 '2022-03-01-preview'
名字 資源名稱 字串 (必要)
性能 部署資源的屬性 DeploymentResourceProperties
sku 部署資源的 SKU Sku
類型 資源類型 'Microsoft.AppPlatform/Spring/apps/deployments'

NetCoreZipUploadedUserSourceInfo

名字 描述 價值
netCoreMainEntryPath 相對於 zip 根目錄的 .NET 可執行文件路徑 字串
relativePath 儲存來源之記憶體的相對路徑 字串
runtimeVersion .Net 檔案的運行時間版本 字串
類型 上傳的來源類型 'NetCoreZip' (必要)

ResourceRequests

名字 描述 價值
中央處理器 必要的CPU。 1 個核心可以以 1 或 1000m 表示。 這應該是基本層的 500m 或 1,標準層的 {500m、1、2、3、4} 。 字串
記憶 必要的記憶體。 1 GB 可由 1Gi 或 1024Mi 表示。 這應該是基本層的 {512Mi、1Gi、2Gi} 和標準層的 {512Mi、1Gi、2Gi、...、8Gi} 。 字串

Sku

名字 描述 價值
能力 目標資源的目前容量 int
名字 Sku 的名稱 字串
Sku 的階層 字串

SourceUploadedUserSourceInfo

名字 描述 價值
artifactSelector 要用於多模組專案的部署成品選取器。 這應該是
目標模組/項目的相對路徑。
字串
relativePath 儲存來源之記憶體的相對路徑 字串
runtimeVersion 來源檔案的運行時間版本 字串
類型 上傳的來源類型 'Source' (必要)

UserSourceInfo

名字 描述 價值
類型 將 設定為 type BuildResultUserSourceInfo的 'BuildResult'。 針對 customContainerUserSourceInfo 類型 設定為 'Container',。 將 類型設定為 『Jar』 JarUploadedUserSourceInfo。 針對 netCoreZipUploadedUserSourceInfo 類型 設定為 'NetCoreZip',。 針對 sourceUploadedUserSourceInfo 類型 設定為 'Source', 'BuildResult'
'Container'
'Jar'
'NetCoreZip'
'Source' (必要)
版本 來源的版本 字串

使用範例

Azure 快速入門範本

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

範本 描述
部署簡單的 Azure Spring Apps 微服務應用程式

部署至 Azure
此範本會部署簡單的 Azure Spring Apps 微服務應用程式,以在 Azure 上執行。

Terraform (AzAPI 提供者) 資源定義

Spring/apps/deployments 資源類型可以使用目標作業來部署:

  • 資源群組

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

資源格式

若要建立 Microsoft.AppPlatform/Spring/apps/deployments 資源,請將下列 Terraform 新增至範本。

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.AppPlatform/Spring/apps/deployments@2022-03-01-preview"
  name = "string"
  sku = {
    capacity = int
    name = "string"
    tier = "string"
  }
  body = jsonencode({
    properties = {
      active = bool
      deploymentSettings = {
        addonConfigs = {
          {customized property} = {
            {customized property} = ?
          }
        }
        containerProbeSettings = {
          disableProbe = bool
        }
        environmentVariables = {
          {customized property} = "string"
        }
        resourceRequests = {
          cpu = "string"
          memory = "string"
        }
      }
      source = {
        version = "string"
        type = "string"
        // For remaining properties, see UserSourceInfo objects
      }
    }
  })
}

UserSourceInfo 物件

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

針對 BuildResult,請使用:

{
  buildResultId = "string"
  type = "BuildResult"
}

針對 容器,請使用:

{
  customContainer = {
    args = [
      "string"
    ]
    command = [
      "string"
    ]
    containerImage = "string"
    imageRegistryCredential = {
      password = "string"
      username = "string"
    }
    languageFramework = "string"
    server = "string"
  }
  type = "Container"
}

針對 Jar,請使用:

{
  jvmOptions = "string"
  relativePath = "string"
  runtimeVersion = "string"
  type = "Jar"
}

針對 NetCoreZip,請使用:

{
  netCoreMainEntryPath = "string"
  relativePath = "string"
  runtimeVersion = "string"
  type = "NetCoreZip"
}

針對 Source,請使用:

{
  artifactSelector = "string"
  relativePath = "string"
  runtimeVersion = "string"
  type = "Source"
}

屬性值

AddonProfile

名字 描述 價值

BuildResultUserSourceInfo

名字 描述 價值
buildResultId 相同 Spring 實例下現有成功建置結果的資源標識碼。 字串
類型 上傳的來源類型 'BuildResult' (必要)

ContainerProbeSettings

名字 描述 價值
disableProbe 指出是否停用活躍度和整備程度探查 bool

CustomContainer

名字 描述 價值
args 進入點的自變數。 如果未提供,則會使用 Docker 映像的 CMD。 string[]
命令 Entrypoint 陣列。 未在殼層內執行。 如果未提供,則會使用 Docker 映像的 ENTRYPOINT。 string[]
containerImage 自訂容器的容器映像。 這應該以 <存放庫>的形式:<標籤>,而不需登錄的伺服器名稱 字串
imageRegistryCredential 映像登錄的認證 ImageRegistryCredential
languageFramework 上傳之容器映像的語言架構 字串
伺服器 包含容器映像的登錄名稱 字串

CustomContainerUserSourceInfo

名字 描述 價值
customContainer 自定義容器承載 CustomContainer
類型 上傳的來源類型 'Container' (必要)

DeploymentResourceProperties

名字 描述 價值
積極 指出部署是否為使用中 bool
deploymentSettings 部署的部署設定 DeploymentSettings
已上傳部署的來源資訊。 UserSourceInfo

DeploymentSettings

名字 描述 價值
addonConfigs 附加元件集合 DeploymentSettingsAddonConfigs
containerProbeSettings 容器活躍度和整備探查設定 ContainerProbeSettings
environmentVariables 環境變數的集合 DeploymentSettingsEnvironmentVariables
resourceRequests 所需 CPU 和記憶體的要求資源數量。 建議使用此欄位來代表所需的 CPU 和記憶體,稍後將會淘汰舊的欄位 cpu 和 memoryInGB。 ResourceRequests

DeploymentSettingsAddonConfigs

名字 描述 價值

DeploymentSettingsEnvironmentVariables

名字 描述 價值

ImageRegistryCredential

名字 描述 價值
密碼 映像登錄認證的密碼 字串
username 映像登錄認證的用戶名稱 字串

JarUploadedUserSourceInfo

名字 描述 價值
jvmOptions JVM 參數 字串
relativePath 儲存來源之記憶體的相對路徑 字串
runtimeVersion Jar 檔案的運行時間版本 字串
類型 上傳的來源類型 'Jar' (必要)

Microsoft.AppPlatform/Spring/apps/deployments

名字 描述 價值
名字 資源名稱 字串 (必要)
parent_id 此資源為父系之資源的標識碼。 類型資源的標識碼:Spring/apps
性能 部署資源的屬性 DeploymentResourceProperties
sku 部署資源的 SKU Sku
類型 資源類型 “Microsoft.AppPlatform/Spring/apps/deployments@2022-03-01-preview”

NetCoreZipUploadedUserSourceInfo

名字 描述 價值
netCoreMainEntryPath 相對於 zip 根目錄的 .NET 可執行文件路徑 字串
relativePath 儲存來源之記憶體的相對路徑 字串
runtimeVersion .Net 檔案的運行時間版本 字串
類型 上傳的來源類型 'NetCoreZip' (必要)

ResourceRequests

名字 描述 價值
中央處理器 必要的CPU。 1 個核心可以以 1 或 1000m 表示。 這應該是基本層的 500m 或 1,標準層的 {500m、1、2、3、4} 。 字串
記憶 必要的記憶體。 1 GB 可由 1Gi 或 1024Mi 表示。 這應該是基本層的 {512Mi、1Gi、2Gi} 和標準層的 {512Mi、1Gi、2Gi、...、8Gi} 。 字串

Sku

名字 描述 價值
能力 目標資源的目前容量 int
名字 Sku 的名稱 字串
Sku 的階層 字串

SourceUploadedUserSourceInfo

名字 描述 價值
artifactSelector 要用於多模組專案的部署成品選取器。 這應該是
目標模組/項目的相對路徑。
字串
relativePath 儲存來源之記憶體的相對路徑 字串
runtimeVersion 來源檔案的運行時間版本 字串
類型 上傳的來源類型 'Source' (必要)

UserSourceInfo

名字 描述 價值
類型 將 設定為 type BuildResultUserSourceInfo的 'BuildResult'。 針對 customContainerUserSourceInfo 類型 設定為 'Container',。 將 類型設定為 『Jar』 JarUploadedUserSourceInfo。 針對 netCoreZipUploadedUserSourceInfo 類型 設定為 'NetCoreZip',。 針對 sourceUploadedUserSourceInfo 類型 設定為 'Source', 'BuildResult'
'Container'
'Jar'
'NetCoreZip'
'Source' (必要)
版本 來源的版本 字串