共用方式為


Microsoft.AppPlatform Spring/apps/deployments 2022-12-01

Bicep 資源定義

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

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

資源格式

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

resource symbolicname 'Microsoft.AppPlatform/Spring/apps/deployments@2022-12-01' = {
  name: 'string'
  sku: {
    capacity: int
    name: 'string'
    tier: 'string'
  }
  parent: resourceSymbolicName
  properties: {
    active: bool
    deploymentSettings: {
      addonConfigs: {
        {customized property}: any()
      }
      containerProbeSettings: {
        disableProbe: bool
      }
      environmentVariables: {
        {customized property}: 'string'
      }
      livenessProbe: {
        disableProbe: bool
        failureThreshold: int
        initialDelaySeconds: int
        periodSeconds: int
        probeAction: {
          type: 'string'
          // For remaining properties, see ProbeAction objects
        }
        successThreshold: int
        timeoutSeconds: int
      }
      readinessProbe: {
        disableProbe: bool
        failureThreshold: int
        initialDelaySeconds: int
        periodSeconds: int
        probeAction: {
          type: 'string'
          // For remaining properties, see ProbeAction objects
        }
        successThreshold: int
        timeoutSeconds: int
      }
      resourceRequests: {
        cpu: 'string'
        memory: 'string'
      }
      startupProbe: {
        disableProbe: bool
        failureThreshold: int
        initialDelaySeconds: int
        periodSeconds: int
        probeAction: {
          type: 'string'
          // For remaining properties, see ProbeAction objects
        }
        successThreshold: int
        timeoutSeconds: int
      }
      terminationGracePeriodSeconds: int
    }
    source: {
      version: 'string'
      type: 'string'
      // For remaining properties, see UserSourceInfo objects
    }
  }
}

ProbeAction 物件

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

針對 ExecAction,請使用:

  type: 'ExecAction'
  command: [
    'string'
  ]

針對 HTTPGetAction,請使用:

  type: 'HTTPGetAction'
  path: 'string'
  scheme: 'string'

針對 TCPSocketAction,請使用:

  type: 'TCPSocketAction'

UserSourceInfo 物件

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

針對 BuildResult,請使用:

  type: 'BuildResult'
  buildResultId: 'string'

針對 容器,請使用:

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

針對 Jar,請使用:

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

針對 NetCoreZip,請使用:

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

針對 Source,請使用:

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

屬性值

Spring/apps/deployments

名字 描述 價值
名字 資源名稱

請參閱如何在 Bicep 中設定子資源的名稱和類型。
字串 (必要)
sku 部署資源的 SKU Sku
父母 在 Bicep 中,您可以指定子資源的父資源。 只有在父資源外部宣告子資源時,才需要新增這個屬性。

如需詳細資訊,請參閱 父資源外部的子資源
類型資源的符號名稱:應用程式
性能 部署資源的屬性 DeploymentResourceProperties

DeploymentResourceProperties

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

DeploymentSettings

名字 描述 價值
addonConfigs 附加元件集合 DeploymentSettingsAddonConfigs
containerProbeSettings 容器活躍度和整備探查設定 ContainerProbeSettings
environmentVariables 環境變數的集合 DeploymentSettingsEnvironmentVariables
livenessProbe 應用程式實例活躍度定期探查。 如果探查失敗,應用程式實例將會重新啟動。 詳細資訊:https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes 探查
readinessProbe 定期探查應用程式實例服務整備程度。 如果探查失敗,應用程式實例將會從服務端點中移除。 詳細資訊:https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes 探查
resourceRequests 所需 CPU 和記憶體的要求資源數量。 建議使用此欄位來代表所需的 CPU 和記憶體,稍後將會淘汰舊的欄位 cpu 和 memoryInGB。 ResourceRequests
startupProbe StartupProbe 表示應用程式實例已成功初始化。 如果指定,則不會執行其他探查,直到順利完成為止。 如果此探查失敗,Pod 將會重新啟動,就像 livenessProbe 失敗一樣。 這可以用來在應用程式實例生命週期的開頭提供不同的探查參數,這時可能需要很長的時間才能載入數據或將快取暖,而不是在穩定狀態作業期間。 這無法更新。 詳細資訊:https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes 探查
terminationGracePeriodSeconds 應用程式實例需要正常終止的秒數選擇性持續時間。 刪除要求可能會減少。 值必須是非負整數。 值零表示透過終止訊號立即停止(沒有機會關閉)。 如果此值為 nil,則會改用預設寬限期。 寬限期是在應用程式實例中執行的進程傳送終止訊號及以終止訊號強制停止進程的時間后,以秒為單位的持續時間。 設定此值的時間超過程式的預期清除時間。 預設值為90秒。 int

DeploymentSettingsAddonConfigs

名字 描述 價值
{自定義屬性} 針對 Bicep,您可以使用 any() 函式。

ContainerProbeSettings

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

DeploymentSettingsEnvironmentVariables

名字 描述 價值
{自定義屬性} 字串

探針

名字 描述 價值
disableProbe 指出是否停用探查。 布林 (必要)
failureThreshold 探查在成功之後,要視為失敗的最小連續失敗。 最小值為 1。 int
initialDelaySeconds 在啟動探查之前,應用程式實例啟動后的秒數。 詳細資訊:https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes int
periodSeconds 執行探查的頻率(以秒為單位)。 最小值為 1。 int
probeAction 探查的動作。 ProbeAction
successThreshold 探查在失敗后要視為成功的最小連續成功。 對於活躍度和啟動,必須是1。 最小值為 1。 int
timeoutSeconds 探查逾時後的秒數。最小值為 1。 int

ProbeAction

名字 描述 價值
類型 設定物件類型 ExecAction
HTTPGetAction
TCPSocketAction (必要)

ExecAction

名字 描述 價值
類型 要採取的動作類型,以執行健康情況檢查。 'ExecAction' (必要)
命令 命令是在容器內執行的命令行,命令的工作目錄是容器文件系統中的根目錄 ('/')。 命令不會在殼層內執行,因此傳統殼層指令 (',' 等等) 將無法運作。 若要使用殼層,您必須明確呼叫該殼層。 結束狀態 0 會被視為即時/健康狀態,且非零狀況不良。 string[]

HttpGetAction

名字 描述 價值
類型 要採取的動作類型,以執行健康情況檢查。 'HTTPGetAction' (必要)
路徑 HTTP 伺服器上存取的路徑。 字串
方案 用於連線到主機的配置。 默認為 HTTP。

可能的列舉值:
- "HTTP" 表示所使用的配置將會 http://
- "HTTPS" 表示所使用的配置將會 https://
'HTTP'
'HTTPS'

TCPSocketAction

名字 描述 價值
類型 要採取的動作類型,以執行健康情況檢查。 'TCPSocketAction' (必要)

ResourceRequests

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

UserSourceInfo

名字 描述 價值
版本 來源的版本 字串
類型 設定物件類型 BuildResult
容器
Jar
NetCoreZip
來源(必要)

BuildResultUserSourceInfo

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

CustomContainerUserSourceInfo

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

CustomContainer

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

ImageRegistryCredential

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

JarUploadedUserSourceInfo

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

NetCoreZipUploadedUserSourceInfo

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

SourceUploadedUserSourceInfo

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

Sku

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

快速入門範本

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

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

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

ARM 樣本資源定義

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

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

資源格式

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

{
  "type": "Microsoft.AppPlatform/Spring/apps/deployments",
  "apiVersion": "2022-12-01",
  "name": "string",
  "sku": {
    "capacity": "int",
    "name": "string",
    "tier": "string"
  },
  "properties": {
    "active": "bool",
    "deploymentSettings": {
      "addonConfigs": {
        "{customized property}": {}
      },
      "containerProbeSettings": {
        "disableProbe": "bool"
      },
      "environmentVariables": {
        "{customized property}": "string"
      },
      "livenessProbe": {
        "disableProbe": "bool",
        "failureThreshold": "int",
        "initialDelaySeconds": "int",
        "periodSeconds": "int",
        "probeAction": {
          "type": "string"
          // For remaining properties, see ProbeAction objects
        },
        "successThreshold": "int",
        "timeoutSeconds": "int"
      },
      "readinessProbe": {
        "disableProbe": "bool",
        "failureThreshold": "int",
        "initialDelaySeconds": "int",
        "periodSeconds": "int",
        "probeAction": {
          "type": "string"
          // For remaining properties, see ProbeAction objects
        },
        "successThreshold": "int",
        "timeoutSeconds": "int"
      },
      "resourceRequests": {
        "cpu": "string",
        "memory": "string"
      },
      "startupProbe": {
        "disableProbe": "bool",
        "failureThreshold": "int",
        "initialDelaySeconds": "int",
        "periodSeconds": "int",
        "probeAction": {
          "type": "string"
          // For remaining properties, see ProbeAction objects
        },
        "successThreshold": "int",
        "timeoutSeconds": "int"
      },
      "terminationGracePeriodSeconds": "int"
    },
    "source": {
      "version": "string",
      "type": "string"
      // For remaining properties, see UserSourceInfo objects
    }
  }
}

ProbeAction 物件

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

針對 ExecAction,請使用:

  "type": "ExecAction",
  "command": [ "string" ]

針對 HTTPGetAction,請使用:

  "type": "HTTPGetAction",
  "path": "string",
  "scheme": "string"

針對 TCPSocketAction,請使用:

  "type": "TCPSocketAction"

UserSourceInfo 物件

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

針對 BuildResult,請使用:

  "type": "BuildResult",
  "buildResultId": "string"

針對 容器,請使用:

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

針對 Jar,請使用:

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

針對 NetCoreZip,請使用:

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

針對 Source,請使用:

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

屬性值

Spring/apps/deployments

名字 描述 價值
類型 資源類型 'Microsoft.AppPlatform/Spring/apps/deployments'
apiVersion 資源 API 版本 '2022-12-01'
名字 資源名稱

請參閱如何在JSON ARM 範本中設定子資源的名稱和類型。
字串 (必要)
sku 部署資源的 SKU Sku
性能 部署資源的屬性 DeploymentResourceProperties

DeploymentResourceProperties

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

DeploymentSettings

名字 描述 價值
addonConfigs 附加元件集合 DeploymentSettingsAddonConfigs
containerProbeSettings 容器活躍度和整備探查設定 ContainerProbeSettings
environmentVariables 環境變數的集合 DeploymentSettingsEnvironmentVariables
livenessProbe 應用程式實例活躍度定期探查。 如果探查失敗,應用程式實例將會重新啟動。 詳細資訊:https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes 探查
readinessProbe 定期探查應用程式實例服務整備程度。 如果探查失敗,應用程式實例將會從服務端點中移除。 詳細資訊:https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes 探查
resourceRequests 所需 CPU 和記憶體的要求資源數量。 建議使用此欄位來代表所需的 CPU 和記憶體,稍後將會淘汰舊的欄位 cpu 和 memoryInGB。 ResourceRequests
startupProbe StartupProbe 表示應用程式實例已成功初始化。 如果指定,則不會執行其他探查,直到順利完成為止。 如果此探查失敗,Pod 將會重新啟動,就像 livenessProbe 失敗一樣。 這可以用來在應用程式實例生命週期的開頭提供不同的探查參數,這時可能需要很長的時間才能載入數據或將快取暖,而不是在穩定狀態作業期間。 這無法更新。 詳細資訊:https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes 探查
terminationGracePeriodSeconds 應用程式實例需要正常終止的秒數選擇性持續時間。 刪除要求可能會減少。 值必須是非負整數。 值零表示透過終止訊號立即停止(沒有機會關閉)。 如果此值為 nil,則會改用預設寬限期。 寬限期是在應用程式實例中執行的進程傳送終止訊號及以終止訊號強制停止進程的時間后,以秒為單位的持續時間。 設定此值的時間超過程式的預期清除時間。 預設值為90秒。 int

DeploymentSettingsAddonConfigs

名字 描述 價值
{自定義屬性}

ContainerProbeSettings

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

DeploymentSettingsEnvironmentVariables

名字 描述 價值
{自定義屬性} 字串

探針

名字 描述 價值
disableProbe 指出是否停用探查。 布林 (必要)
failureThreshold 探查在成功之後,要視為失敗的最小連續失敗。 最小值為 1。 int
initialDelaySeconds 在啟動探查之前,應用程式實例啟動后的秒數。 詳細資訊:https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes int
periodSeconds 執行探查的頻率(以秒為單位)。 最小值為 1。 int
probeAction 探查的動作。 ProbeAction
successThreshold 探查在失敗后要視為成功的最小連續成功。 對於活躍度和啟動,必須是1。 最小值為 1。 int
timeoutSeconds 探查逾時後的秒數。最小值為 1。 int

ProbeAction

名字 描述 價值
類型 設定物件類型 ExecAction
HTTPGetAction
TCPSocketAction (必要)

ExecAction

名字 描述 價值
類型 要採取的動作類型,以執行健康情況檢查。 'ExecAction' (必要)
命令 命令是在容器內執行的命令行,命令的工作目錄是容器文件系統中的根目錄 ('/')。 命令不會在殼層內執行,因此傳統殼層指令 (',' 等等) 將無法運作。 若要使用殼層,您必須明確呼叫該殼層。 結束狀態 0 會被視為即時/健康狀態,且非零狀況不良。 string[]

HttpGetAction

名字 描述 價值
類型 要採取的動作類型,以執行健康情況檢查。 'HTTPGetAction' (必要)
路徑 HTTP 伺服器上存取的路徑。 字串
方案 用於連線到主機的配置。 默認為 HTTP。

可能的列舉值:
- "HTTP" 表示所使用的配置將會 http://
- "HTTPS" 表示所使用的配置將會 https://
'HTTP'
'HTTPS'

TCPSocketAction

名字 描述 價值
類型 要採取的動作類型,以執行健康情況檢查。 'TCPSocketAction' (必要)

ResourceRequests

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

UserSourceInfo

名字 描述 價值
版本 來源的版本 字串
類型 設定物件類型 BuildResult
容器
Jar
NetCoreZip
來源(必要)

BuildResultUserSourceInfo

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

CustomContainerUserSourceInfo

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

CustomContainer

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

ImageRegistryCredential

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

JarUploadedUserSourceInfo

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

NetCoreZipUploadedUserSourceInfo

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

SourceUploadedUserSourceInfo

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

Sku

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

快速入門範本

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

範本 描述
部署簡單的 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-12-01"
  name = "string"
  parent_id = "string"
  body = jsonencode({
    properties = {
      active = bool
      deploymentSettings = {
        addonConfigs = {}
        containerProbeSettings = {
          disableProbe = bool
        }
        environmentVariables = {
          {customized property} = "string"
        }
        livenessProbe = {
          disableProbe = bool
          failureThreshold = int
          initialDelaySeconds = int
          periodSeconds = int
          probeAction = {
            type = "string"
            // For remaining properties, see ProbeAction objects
          }
          successThreshold = int
          timeoutSeconds = int
        }
        readinessProbe = {
          disableProbe = bool
          failureThreshold = int
          initialDelaySeconds = int
          periodSeconds = int
          probeAction = {
            type = "string"
            // For remaining properties, see ProbeAction objects
          }
          successThreshold = int
          timeoutSeconds = int
        }
        resourceRequests = {
          cpu = "string"
          memory = "string"
        }
        startupProbe = {
          disableProbe = bool
          failureThreshold = int
          initialDelaySeconds = int
          periodSeconds = int
          probeAction = {
            type = "string"
            // For remaining properties, see ProbeAction objects
          }
          successThreshold = int
          timeoutSeconds = int
        }
        terminationGracePeriodSeconds = int
      }
      source = {
        version = "string"
        type = "string"
        // For remaining properties, see UserSourceInfo objects
      }
    }
    sku = {
      capacity = int
      name = "string"
      tier = "string"
    }
  })
}

ProbeAction 物件

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

針對 ExecAction,請使用:

  type = "ExecAction"
  command = [
    "string"
  ]

針對 HTTPGetAction,請使用:

  type = "HTTPGetAction"
  path = "string"
  scheme = "string"

針對 TCPSocketAction,請使用:

  type = "TCPSocketAction"

UserSourceInfo 物件

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

針對 BuildResult,請使用:

  type = "BuildResult"
  buildResultId = "string"

針對 容器,請使用:

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

針對 Jar,請使用:

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

針對 NetCoreZip,請使用:

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

針對 Source,請使用:

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

屬性值

Spring/apps/deployments

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

DeploymentResourceProperties

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

DeploymentSettings

名字 描述 價值
addonConfigs 附加元件集合 DeploymentSettingsAddonConfigs
containerProbeSettings 容器活躍度和整備探查設定 ContainerProbeSettings
environmentVariables 環境變數的集合 DeploymentSettingsEnvironmentVariables
livenessProbe 應用程式實例活躍度定期探查。 如果探查失敗,應用程式實例將會重新啟動。 詳細資訊:https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes 探查
readinessProbe 定期探查應用程式實例服務整備程度。 如果探查失敗,應用程式實例將會從服務端點中移除。 詳細資訊:https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes 探查
resourceRequests 所需 CPU 和記憶體的要求資源數量。 建議使用此欄位來代表所需的 CPU 和記憶體,稍後將會淘汰舊的欄位 cpu 和 memoryInGB。 ResourceRequests
startupProbe StartupProbe 表示應用程式實例已成功初始化。 如果指定,則不會執行其他探查,直到順利完成為止。 如果此探查失敗,Pod 將會重新啟動,就像 livenessProbe 失敗一樣。 這可以用來在應用程式實例生命週期的開頭提供不同的探查參數,這時可能需要很長的時間才能載入數據或將快取暖,而不是在穩定狀態作業期間。 這無法更新。 詳細資訊:https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes 探查
terminationGracePeriodSeconds 應用程式實例需要正常終止的秒數選擇性持續時間。 刪除要求可能會減少。 值必須是非負整數。 值零表示透過終止訊號立即停止(沒有機會關閉)。 如果此值為 nil,則會改用預設寬限期。 寬限期是在應用程式實例中執行的進程傳送終止訊號及以終止訊號強制停止進程的時間后,以秒為單位的持續時間。 設定此值的時間超過程式的預期清除時間。 預設值為90秒。 int

DeploymentSettingsAddonConfigs

名字 描述 價值
{自定義屬性}

ContainerProbeSettings

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

DeploymentSettingsEnvironmentVariables

名字 描述 價值
{自定義屬性} 字串

探針

名字 描述 價值
disableProbe 指出是否停用探查。 布林 (必要)
failureThreshold 探查在成功之後,要視為失敗的最小連續失敗。 最小值為 1。 int
initialDelaySeconds 在啟動探查之前,應用程式實例啟動后的秒數。 詳細資訊:https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes int
periodSeconds 執行探查的頻率(以秒為單位)。 最小值為 1。 int
probeAction 探查的動作。 ProbeAction
successThreshold 探查在失敗后要視為成功的最小連續成功。 對於活躍度和啟動,必須是1。 最小值為 1。 int
timeoutSeconds 探查逾時後的秒數。最小值為 1。 int

ProbeAction

名字 描述 價值
類型 設定物件類型 ExecAction
HTTPGetAction
TCPSocketAction (必要)

ExecAction

名字 描述 價值
類型 要採取的動作類型,以執行健康情況檢查。 “ExecAction” (必要)
命令 命令是在容器內執行的命令行,命令的工作目錄是容器文件系統中的根目錄 ('/')。 命令不會在殼層內執行,因此傳統殼層指令 (',' 等等) 將無法運作。 若要使用殼層,您必須明確呼叫該殼層。 結束狀態 0 會被視為即時/健康狀態,且非零狀況不良。 string[]

HttpGetAction

名字 描述 價值
類型 要採取的動作類型,以執行健康情況檢查。 “HTTPGetAction” (必要)
路徑 HTTP 伺服器上存取的路徑。 字串
方案 用於連線到主機的配置。 默認為 HTTP。

可能的列舉值:
- "HTTP" 表示所使用的配置將會 http://
- "HTTPS" 表示所使用的配置將會 https://
“HTTP”
“HTTPS”

TCPSocketAction

名字 描述 價值
類型 要採取的動作類型,以執行健康情況檢查。 “TCPSocketAction” (必要)

ResourceRequests

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

UserSourceInfo

名字 描述 價值
版本 來源的版本 字串
類型 設定物件類型 BuildResult
容器
Jar
NetCoreZip
來源(必要)

BuildResultUserSourceInfo

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

CustomContainerUserSourceInfo

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

CustomContainer

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

ImageRegistryCredential

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

JarUploadedUserSourceInfo

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

NetCoreZipUploadedUserSourceInfo

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

SourceUploadedUserSourceInfo

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

Sku

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