你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Microsoft.AppPlatform Spring/apps/deployments 2021-06-01-preview
Bicep 资源定义
Spring/apps/deployments 资源类型可以使用面向以下操作进行部署:
- 资源组 - 请参阅 资源组部署命令
有关每个 API 版本中已更改属性的列表,请参阅 更改日志。
资源格式
若要创建 Microsoft.AppPlatform/Spring/apps/deployments 资源,请将以下 Bicep 添加到模板。
resource symbolicname 'Microsoft.AppPlatform/Spring/apps/deployments@2021-06-01-preview' = {
name: 'string'
sku: {
capacity: int
name: 'string'
tier: 'string'
}
parent: resourceSymbolicName
properties: {
deploymentSettings: {
cpu: int
environmentVariables: {}
jvmOptions: 'string'
memoryInGB: int
netCoreMainEntryPath: 'string'
resourceRequests: {
cpu: 'string'
memory: 'string'
}
runtimeVersion: 'string'
}
source: {
artifactSelector: 'string'
customContainer: {
args: [
'string'
]
command: [
'string'
]
containerImage: 'string'
imageRegistryCredential: {
password: 'string'
username: 'string'
}
server: 'string'
}
relativePath: 'string'
type: 'string'
version: 'string'
}
}
}
属性值
Spring/apps/deployments
名称 | 说明 | 值 |
---|---|---|
name | 资源名称 了解如何在 Bicep 中设置子资源的名称和类型。 |
字符串 (必需) |
sku | 部署资源的 SKU | Sku |
父级 (parent) | 在 Bicep 中,可以为子资源指定父资源。 仅当子资源在父资源外部声明时,才需要添加此属性。 有关详细信息,请参阅 父资源之外的子资源。 |
类型为 的资源的符号名称: 应用 |
properties | 部署资源的属性 | DeploymentResourceProperties |
DeploymentResourceProperties
名称 | 说明 | 值 |
---|---|---|
deploymentSettings | 部署的部署设置 | DeploymentSettings |
source | 已上传部署的源信息。 | UserSourceInfo |
DeploymentSettings
名称 | 说明 | 值 |
---|---|---|
cpu | 所需的 CPU。 对于基本层,此值应为 1,标准层的范围应为 [1, 4]。 从 API 版本 2021-06-01-preview 开始,已弃用此功能。 请使用 resourceRequests 字段设置 CPU 大小。 | int |
environmentVariables | 环境变量的集合 | 对象 (object) |
jvmOptions | JVM 参数 | 字符串 |
memoryInGB | 所需的内存大小(以 GB 为单位)。 对于基本层,这应在范围 [1, 2] 中,对于标准层,应在范围 [1, 8] 内。 从 API 版本 2021-06-01-preview 开始,已弃用此功能。 请使用 resourceRequests 字段设置内存大小。 | int |
netCoreMainEntryPath | 相对于 zip 根目录的 .NET 可执行文件的路径 | 字符串 |
resourceRequests | 所需 CPU 和内存的请求资源数量。 建议使用此字段来表示所需的 CPU 和内存,旧字段 cpu 和 memoryInGB 稍后将弃用。 | ResourceRequests |
runtimeVersion | 运行时版本 | “Java_11” “Java_8” “NetCore_31” |
ResourceRequests
名称 | 说明 | 值 |
---|---|---|
cpu | 所需的 CPU。 1 核可由 1 或 1000 米表示。 对于基本层,此值应为 500 米或 1,标准层应为 {500m, 1, 2, 3, 4}。 | 字符串 |
内存 | 所需内存。 1 GB 可由 1Gi 或 1024Mi 表示。 对于基本层,这应该是 {512Mi, 1Gi, 2Gi} ,对于标准层,应为 {512Mi, 1Gi, 2Gi, ..., 8Gi}。 | 字符串 |
UserSourceInfo
名称 | 说明 | 值 |
---|---|---|
artifactSelector | 用于多模块项目部署的项目选择器。 这应该是 目标模块/项目的相对路径。 |
字符串 |
customContainer | 自定义容器有效负载 | CustomContainer |
relativePath | 存储源的存储的相对路径 | 字符串 |
type | 上传的源的类型 | 'Container' “Jar” “NetCoreZip” 'Source' |
版本 | 源的版本 | 字符串 |
CustomContainer
名称 | 说明 | 值 |
---|---|---|
args | 入口点的参数。 如果未提供此 CMD,则使用 docker 映像的 CMD。 | string[] |
命令 | 入口点数组。 不在 shell 中执行。 如果未提供,将使用 docker 映像的 ENTRYPOINT。 | string[] |
containerImage | 自定义容器的容器映像。 这应采用 {repository}:{tag} 的形式,不带注册表的服务器名称 | 字符串 |
imageRegistryCredential | 映像注册表的凭据 | ImageRegistryCredential |
server | 包含容器映像的注册表的名称 | 字符串 |
ImageRegistryCredential
名称 | 说明 | 值 |
---|---|---|
password | 映像注册表凭据的密码 | 字符串 |
username | 映像注册表凭据的用户名 | 字符串 |
SKU
名称 | 说明 | 值 |
---|---|---|
容量 | 目标资源的当前容量 | int |
name | SKU 的名称 | 字符串 |
层 | SKU 的层 | 字符串 |
ARM 模板资源定义
Spring/apps/deployments 资源类型可以使用面向以下操作进行部署:
- 资源组 - 请参阅 资源组部署命令
有关每个 API 版本中已更改属性的列表,请参阅 更改日志。
资源格式
若要创建 Microsoft.AppPlatform/Spring/apps/deployments 资源,请将以下 JSON 添加到模板。
{
"type": "Microsoft.AppPlatform/Spring/apps/deployments",
"apiVersion": "2021-06-01-preview",
"name": "string",
"sku": {
"capacity": "int",
"name": "string",
"tier": "string"
},
"properties": {
"deploymentSettings": {
"cpu": "int",
"environmentVariables": {},
"jvmOptions": "string",
"memoryInGB": "int",
"netCoreMainEntryPath": "string",
"resourceRequests": {
"cpu": "string",
"memory": "string"
},
"runtimeVersion": "string"
},
"source": {
"artifactSelector": "string",
"customContainer": {
"args": [ "string" ],
"command": [ "string" ],
"containerImage": "string",
"imageRegistryCredential": {
"password": "string",
"username": "string"
},
"server": "string"
},
"relativePath": "string",
"type": "string",
"version": "string"
}
}
}
属性值
Spring/apps/deployments
名称 | 说明 | Value |
---|---|---|
type | 资源类型 | 'Microsoft.AppPlatform/Spring/apps/deployments' |
apiVersion | 资源 API 版本 | '2021-06-01-preview' |
name | 资源名称 了解如何在 JSON ARM 模板中设置子资源的名称和类型。 |
字符串 (必需) |
sku | 部署资源的 SKU | Sku |
properties | 部署资源的属性 | DeploymentResourceProperties |
DeploymentResourceProperties
名称 | 说明 | 值 |
---|---|---|
deploymentSettings | 部署的部署设置 | DeploymentSettings |
source | 已上传部署的源信息。 | UserSourceInfo |
DeploymentSettings
名称 | 说明 | 值 |
---|---|---|
cpu | 所需的 CPU。 对于基本层,此值应为 1;对于标准层,此范围应为 [1, 4]。 从 API 版本 2021-06-01-preview 开始,此功能已弃用。 请使用 resourceRequests 字段设置 CPU 大小。 | int |
environmentVariables | 环境变量的集合 | 对象 (object) |
jvmOptions | JVM 参数 | 字符串 |
memoryInGB | 所需的内存大小(以 GB 为单位)。 对于基本层,此范围应为 [1, 2],标准层的范围应为 [1, 8]。 从 API 版本 2021-06-01-preview 开始,此功能已弃用。 请使用 resourceRequests 字段设置内存大小。 | int |
netCoreMainEntryPath | 相对于 zip 根目录的 .NET 可执行文件的路径 | 字符串 |
resourceRequests | 所需 CPU 和内存的请求资源数量。 建议使用此字段来表示所需的 CPU 和内存,旧字段 cpu 和 memoryInGB 稍后将弃用。 | ResourceRequests |
runtimeVersion | 运行时版本 | “Java_11” “Java_8” “NetCore_31” |
ResourceRequests
名称 | 说明 | 值 |
---|---|---|
cpu | 所需的 CPU。 1 个核心可以由 1 或 1000 米表示。 对于基本层,此值应为 500 米或 1,标准层应为 {500m,1,2,3,4}。 | 字符串 |
内存 | 所需的内存。 1 GB 可由 1Gi 或 1024Mi 表示。 对于基本层,这应为 {512Mi, 1Gi, 2Gi},对于标准层应为 {512Mi, 1Gi, 2Gi, ..., 8Gi}。 | 字符串 |
UserSourceInfo
名称 | 说明 | 值 |
---|---|---|
artifactSelector | 要用于多模块项目的部署的项目的选择器。 这应为 目标模块/项目的相对路径。 |
字符串 |
customContainer | 自定义容器有效负载 | CustomContainer |
relativePath | 存储源的存储的相对路径 | 字符串 |
type | 上传的源的类型 | “Container” “Jar” “NetCoreZip” “源” |
版本 | 源的版本 | 字符串 |
CustomContainer
名称 | 说明 | 值 |
---|---|---|
args | 入口点的参数。 如果未提供此 CMD,则使用 Docker 映像的 CMD。 | string[] |
命令 | Entrypoint 数组。 未在 shell 中执行。 如果未提供,则使用 Docker 映像的 ENTRYPOINT。 | string[] |
containerImage | 自定义容器的容器映像。 这应采用 {repository}:{tag} 的形式,不带注册表的服务器名称 | 字符串 |
imageRegistryCredential | 映像注册表的凭据 | ImageRegistryCredential |
server | 包含容器映像的注册表的名称 | 字符串 |
ImageRegistryCredential
名称 | 说明 | 值 |
---|---|---|
password | 映像注册表凭据的密码 | 字符串 |
username | 映像注册表凭据的用户名 | 字符串 |
SKU
名称 | 说明 | 值 |
---|---|---|
容量 | 目标资源的当前容量 | int |
name | SKU 的名称 | 字符串 |
层 | SKU 层 | 字符串 |
Terraform (AzAPI 提供程序) 资源定义
Spring/apps/deployments 资源类型可以通过针对以下操作进行部署:
- 资源组
有关每个 API 版本中更改的属性的列表,请参阅 更改日志。
资源格式
若要创建 Microsoft.AppPlatform/Spring/apps/deployments 资源,请将以下 Terraform 添加到模板。
resource "azapi_resource" "symbolicname" {
type = "Microsoft.AppPlatform/Spring/apps/deployments@2021-06-01-preview"
name = "string"
parent_id = "string"
body = jsonencode({
properties = {
deploymentSettings = {
cpu = int
environmentVariables = {}
jvmOptions = "string"
memoryInGB = int
netCoreMainEntryPath = "string"
resourceRequests = {
cpu = "string"
memory = "string"
}
runtimeVersion = "string"
}
source = {
artifactSelector = "string"
customContainer = {
args = [
"string"
]
command = [
"string"
]
containerImage = "string"
imageRegistryCredential = {
password = "string"
username = "string"
}
server = "string"
}
relativePath = "string"
type = "string"
version = "string"
}
}
sku = {
capacity = int
name = "string"
tier = "string"
}
})
}
属性值
Spring/apps/deployments
名称 | 说明 | Value |
---|---|---|
type | 资源类型 | “Microsoft.AppPlatform/Spring/apps/deployments@2021-06-01-preview” |
name | 资源名称 | 字符串 (必需) |
parent_id | 此资源的父资源 ID。 | 类型为“应用”的资源的 ID |
sku | 部署资源的 SKU | Sku |
properties | 部署资源的属性 | DeploymentResourceProperties |
DeploymentResourceProperties
名称 | 说明 | 值 |
---|---|---|
deploymentSettings | 部署的部署设置 | DeploymentSettings |
source | 已上传部署的源信息。 | UserSourceInfo |
DeploymentSettings
名称 | 说明 | 值 |
---|---|---|
cpu | 所需的 CPU。 对于基本层,此值应为 1;对于标准层,此范围应为 [1, 4]。 从 API 版本 2021-06-01-preview 开始,此功能已弃用。 请使用 resourceRequests 字段设置 CPU 大小。 | int |
environmentVariables | 环境变量的集合 | 对象 (object) |
jvmOptions | JVM 参数 | 字符串 |
memoryInGB | 所需的内存大小(以 GB 为单位)。 对于基本层,此范围应为 [1, 2],标准层的范围应为 [1, 8]。 从 API 版本 2021-06-01-preview 开始,此功能已弃用。 请使用 resourceRequests 字段设置内存大小。 | int |
netCoreMainEntryPath | 相对于 zip 根目录的 .NET 可执行文件的路径 | 字符串 |
resourceRequests | 所需 CPU 和内存的请求资源数量。 建议使用此字段来表示所需的 CPU 和内存,旧字段 cpu 和 memoryInGB 稍后将弃用。 | ResourceRequests |
runtimeVersion | 运行时版本 | “Java_11” “Java_8” “NetCore_31” |
ResourceRequests
名称 | 说明 | 值 |
---|---|---|
cpu | 所需的 CPU。 1 个核心可以由 1 或 1000 米表示。 对于基本层,此值应为 500 米或 1,标准层应为 {500m,1,2,3,4}。 | 字符串 |
内存 | 所需的内存。 1 GB 可由 1Gi 或 1024Mi 表示。 对于基本层,这应为 {512Mi, 1Gi, 2Gi},对于标准层应为 {512Mi, 1Gi, 2Gi, ..., 8Gi}。 | 字符串 |
UserSourceInfo
名称 | 说明 | 值 |
---|---|---|
artifactSelector | 要用于多模块项目的部署的项目的选择器。 这应为 目标模块/项目的相对路径。 |
字符串 |
customContainer | 自定义容器有效负载 | CustomContainer |
relativePath | 存储源的存储的相对路径 | 字符串 |
type | 上传的源的类型 | “容器” “Jar” “NetCoreZip” “源” |
版本 | 源的版本 | 字符串 |
CustomContainer
名称 | 说明 | 值 |
---|---|---|
args | 入口点的参数。 如果未提供此 CMD,则使用 Docker 映像的 CMD。 | string[] |
命令 | Entrypoint 数组。 未在 shell 中执行。 如果未提供,则使用 Docker 映像的 ENTRYPOINT。 | string[] |
containerImage | 自定义容器的容器映像。 这应采用 {repository}:{tag} 的形式,不带注册表的服务器名称 | 字符串 |
imageRegistryCredential | 映像注册表的凭据 | ImageRegistryCredential |
server | 包含容器映像的注册表的名称 | 字符串 |
ImageRegistryCredential
名称 | 说明 | 值 |
---|---|---|
password | 映像注册表凭据的密码 | 字符串 |
username | 映像注册表凭据的用户名 | 字符串 |
SKU
名称 | 说明 | 值 |
---|---|---|
容量 | 目标资源的当前容量 | int |
name | SKU 的名称 | 字符串 |
层 | SKU 层 | 字符串 |