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
DeploymentSettings
DeploymentSettingsAddonConfigs
DeploymentSettingsEnvironmentVariables
ImageRegistryCredential
名字 |
描述 |
價值 |
密碼 |
映像登錄認證的密碼 |
字串 |
username |
映像登錄認證的用戶名稱 |
字串 |
JarUploadedUserSourceInfo
名字 |
描述 |
價值 |
jvmOptions |
JVM 參數 |
字串 |
relativePath |
儲存來源之記憶體的相對路徑 |
字串 |
runtimeVersion |
Jar 檔案的運行時間版本 |
字串 |
類型 |
上傳的來源類型 |
'Jar' (必要) |
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
使用範例
Azure 快速入門範例
下列 Azure 快速入門範本 包含用於部署此資源類型的 Bicep 範例。
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
DeploymentSettings
DeploymentSettingsAddonConfigs
DeploymentSettingsEnvironmentVariables
ImageRegistryCredential
名字 |
描述 |
價值 |
密碼 |
映像登錄認證的密碼 |
字串 |
username |
映像登錄認證的用戶名稱 |
字串 |
JarUploadedUserSourceInfo
名字 |
描述 |
價值 |
jvmOptions |
JVM 參數 |
字串 |
relativePath |
儲存來源之記憶體的相對路徑 |
字串 |
runtimeVersion |
Jar 檔案的運行時間版本 |
字串 |
類型 |
上傳的來源類型 |
'Jar' (必要) |
名字 |
描述 |
價值 |
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
使用範例
Azure 快速入門範本
下列 Azure 快速入門範本 部署此資源類型。
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
DeploymentSettings
DeploymentSettingsAddonConfigs
DeploymentSettingsEnvironmentVariables
ImageRegistryCredential
名字 |
描述 |
價值 |
密碼 |
映像登錄認證的密碼 |
字串 |
username |
映像登錄認證的用戶名稱 |
字串 |
JarUploadedUserSourceInfo
名字 |
描述 |
價值 |
jvmOptions |
JVM 參數 |
字串 |
relativePath |
儲存來源之記憶體的相對路徑 |
字串 |
runtimeVersion |
Jar 檔案的運行時間版本 |
字串 |
類型 |
上傳的來源類型 |
'Jar' (必要) |
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