你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Microsoft.App sessionPools 2024-02-02-preview
Bicep 资源定义
可以使用目标操作部署 sessionPools 资源类型:
有关每个 API 版本中已更改属性的列表,请参阅 更改日志。
若要创建 Microsoft.App/sessionPools 资源,请将以下 Bicep 添加到模板。
resource symbolicname 'Microsoft.App/sessionPools@2024-02-02-preview' = {
location: 'string'
name: 'string'
properties: {
containerType: 'string'
customContainerTemplate: {
containers: [
{
args: [
'string'
]
command: [
'string'
]
env: [
{
name: 'string'
secretRef: 'string'
value: 'string'
}
]
image: 'string'
name: 'string'
resources: {
cpu: int
memory: 'string'
}
}
]
ingress: {
targetPort: int
}
registryCredentials: {
passwordSecretRef: 'string'
registryServer: 'string'
username: 'string'
}
}
dynamicPoolConfiguration: {
cooldownPeriodInSeconds: int
executionType: 'string'
}
environmentId: 'string'
poolManagementType: 'string'
scaleConfiguration: {
maxConcurrentSessions: int
readySessionInstances: int
}
secrets: [
{
name: 'string'
value: 'string'
}
]
sessionNetworkConfiguration: {
status: 'string'
}
}
tags: {
{customized property}: 'string'
}
}
属性值
CustomContainerTemplate
DynamicPoolConfiguration
名字 |
描述 |
价值 |
cooldownPeriodInSeconds |
会话的冷却期(以秒为单位)。 |
int |
executionType |
会话池的执行类型。 |
“Timed” |
EnvironmentVar
名字 |
描述 |
价值 |
名字 |
环境变量名称。 |
字符串 |
secretRef |
要从中拉取环境变量值的容器应用机密的名称。 |
字符串 |
价值 |
非机密环境变量值。 |
字符串 |
Microsoft.App/sessionPools
名字 |
描述 |
价值 |
位置 |
资源所在的地理位置 |
string (必需) |
名字 |
资源名称 |
字符串
约束: 最小长度 = 3 最大长度 = 63 模式 = ^[a-z][a-z0-9]*$ (必需) |
性能 |
容器应用会话池资源特定属性 |
SessionPoolProperties |
标签 |
资源标记 |
标记名称和值的字典。 请参阅模板 中的 标记 |
ScaleConfiguration
名字 |
描述 |
价值 |
maxConcurrentSessions |
同时的最大会话计数。 |
int |
readySessionInstances |
就绪会话实例的最小计数。 |
int |
SessionContainer
SessionContainerResources
名字 |
描述 |
价值 |
中央处理器 |
核心中所需的 CPU,例如 0.5 |
int |
记忆 |
所需的内存,例如“250Mb” |
字符串 |
SessionIngress
名字 |
描述 |
价值 |
targetPort |
用于来自入口的流量的容器中的目标端口 |
int |
SessionNetworkConfiguration
名字 |
描述 |
价值 |
地位 |
会话的网络状态。 |
“EgressDisabled” “EgressEnabled” |
SessionPoolProperties
SessionPoolSecret
名字 |
描述 |
价值 |
名字 |
机密名称。 |
字符串 |
价值 |
机密值。 |
字符串
约束: 敏感值。 以安全参数的形式传入。 |
SessionRegistryCredentials
名字 |
描述 |
价值 |
passwordSecretRef |
包含注册表登录密码的机密的名称 |
字符串 |
registryServer |
容器注册表服务器。 |
字符串 |
username |
容器注册表用户名。 |
字符串 |
用法示例
Azure 验证模块
以下 Azure 验证模块 可用于部署此资源类型。
模块 |
描述 |
应用会话池 |
应用会话池的 AVM 资源模块 |
ARM 模板资源定义
可以使用目标操作部署 sessionPools 资源类型:
有关每个 API 版本中已更改属性的列表,请参阅 更改日志。
若要创建 Microsoft.App/sessionPools 资源,请将以下 JSON 添加到模板。
{
"type": "Microsoft.App/sessionPools",
"apiVersion": "2024-02-02-preview",
"name": "string",
"location": "string",
"properties": {
"containerType": "string",
"customContainerTemplate": {
"containers": [
{
"args": [ "string" ],
"command": [ "string" ],
"env": [
{
"name": "string",
"secretRef": "string",
"value": "string"
}
],
"image": "string",
"name": "string",
"resources": {
"cpu": "int",
"memory": "string"
}
}
],
"ingress": {
"targetPort": "int"
},
"registryCredentials": {
"passwordSecretRef": "string",
"registryServer": "string",
"username": "string"
}
},
"dynamicPoolConfiguration": {
"cooldownPeriodInSeconds": "int",
"executionType": "string"
},
"environmentId": "string",
"poolManagementType": "string",
"scaleConfiguration": {
"maxConcurrentSessions": "int",
"readySessionInstances": "int"
},
"secrets": [
{
"name": "string",
"value": "string"
}
],
"sessionNetworkConfiguration": {
"status": "string"
}
},
"tags": {
"{customized property}": "string"
}
}
属性值
CustomContainerTemplate
DynamicPoolConfiguration
名字 |
描述 |
价值 |
cooldownPeriodInSeconds |
会话的冷却期(以秒为单位)。 |
int |
executionType |
会话池的执行类型。 |
“Timed” |
EnvironmentVar
名字 |
描述 |
价值 |
名字 |
环境变量名称。 |
字符串 |
secretRef |
要从中拉取环境变量值的容器应用机密的名称。 |
字符串 |
价值 |
非机密环境变量值。 |
字符串 |
Microsoft.App/sessionPools
名字 |
描述 |
价值 |
apiVersion |
API 版本 |
'2024-02-02-preview' |
位置 |
资源所在的地理位置 |
string (必需) |
名字 |
资源名称 |
字符串
约束: 最小长度 = 3 最大长度 = 63 模式 = ^[a-z][a-z0-9]*$ (必需) |
性能 |
容器应用会话池资源特定属性 |
SessionPoolProperties |
标签 |
资源标记 |
标记名称和值的字典。 请参阅模板 中的 标记 |
类型 |
资源类型 |
“Microsoft.App/sessionPools” |
ScaleConfiguration
名字 |
描述 |
价值 |
maxConcurrentSessions |
同时的最大会话计数。 |
int |
readySessionInstances |
就绪会话实例的最小计数。 |
int |
SessionContainer
SessionContainerResources
名字 |
描述 |
价值 |
中央处理器 |
核心中所需的 CPU,例如 0.5 |
int |
记忆 |
所需的内存,例如“250Mb” |
字符串 |
SessionIngress
名字 |
描述 |
价值 |
targetPort |
用于来自入口的流量的容器中的目标端口 |
int |
SessionNetworkConfiguration
名字 |
描述 |
价值 |
地位 |
会话的网络状态。 |
“EgressDisabled” “EgressEnabled” |
SessionPoolProperties
SessionPoolSecret
名字 |
描述 |
价值 |
名字 |
机密名称。 |
字符串 |
价值 |
机密值。 |
字符串
约束: 敏感值。 以安全参数的形式传入。 |
SessionRegistryCredentials
名字 |
描述 |
价值 |
passwordSecretRef |
包含注册表登录密码的机密的名称 |
字符串 |
registryServer |
容器注册表服务器。 |
字符串 |
username |
容器注册表用户名。 |
字符串 |
用法示例
可以使用目标操作部署 sessionPools 资源类型:
有关每个 API 版本中已更改属性的列表,请参阅 更改日志。
若要创建 Microsoft.App/sessionPools 资源,请将以下 Terraform 添加到模板中。
resource "azapi_resource" "symbolicname" {
type = "Microsoft.App/sessionPools@2024-02-02-preview"
name = "string"
location = "string"
tags = {
{customized property} = "string"
}
body = jsonencode({
properties = {
containerType = "string"
customContainerTemplate = {
containers = [
{
args = [
"string"
]
command = [
"string"
]
env = [
{
name = "string"
secretRef = "string"
value = "string"
}
]
image = "string"
name = "string"
resources = {
cpu = int
memory = "string"
}
}
]
ingress = {
targetPort = int
}
registryCredentials = {
passwordSecretRef = "string"
registryServer = "string"
username = "string"
}
}
dynamicPoolConfiguration = {
cooldownPeriodInSeconds = int
executionType = "string"
}
environmentId = "string"
poolManagementType = "string"
scaleConfiguration = {
maxConcurrentSessions = int
readySessionInstances = int
}
secrets = [
{
name = "string"
value = "string"
}
]
sessionNetworkConfiguration = {
status = "string"
}
}
})
}
属性值
CustomContainerTemplate
DynamicPoolConfiguration
名字 |
描述 |
价值 |
cooldownPeriodInSeconds |
会话的冷却期(以秒为单位)。 |
int |
executionType |
会话池的执行类型。 |
“Timed” |
EnvironmentVar
名字 |
描述 |
价值 |
名字 |
环境变量名称。 |
字符串 |
secretRef |
要从中拉取环境变量值的容器应用机密的名称。 |
字符串 |
价值 |
非机密环境变量值。 |
字符串 |
Microsoft.App/sessionPools
名字 |
描述 |
价值 |
位置 |
资源所在的地理位置 |
string (必需) |
名字 |
资源名称 |
字符串
约束: 最小长度 = 3 最大长度 = 63 模式 = ^[a-z][a-z0-9]*$ (必需) |
性能 |
容器应用会话池资源特定属性 |
SessionPoolProperties |
标签 |
资源标记 |
标记名称和值的字典。 |
类型 |
资源类型 |
“Microsoft.App/sessionPools@2024-02-02-preview” |
ScaleConfiguration
名字 |
描述 |
价值 |
maxConcurrentSessions |
同时的最大会话计数。 |
int |
readySessionInstances |
就绪会话实例的最小计数。 |
int |
SessionContainer
SessionContainerResources
名字 |
描述 |
价值 |
中央处理器 |
核心中所需的 CPU,例如 0.5 |
int |
记忆 |
所需的内存,例如“250Mb” |
字符串 |
SessionIngress
名字 |
描述 |
价值 |
targetPort |
用于来自入口的流量的容器中的目标端口 |
int |
SessionNetworkConfiguration
名字 |
描述 |
价值 |
地位 |
会话的网络状态。 |
“EgressDisabled” “EgressEnabled” |
SessionPoolProperties
SessionPoolSecret
名字 |
描述 |
价值 |
名字 |
机密名称。 |
字符串 |
价值 |
机密值。 |
字符串
约束: 敏感值。 以安全参数的形式传入。 |
SessionRegistryCredentials
名字 |
描述 |
价值 |
passwordSecretRef |
包含注册表登录密码的机密的名称 |
字符串 |
registryServer |
容器注册表服务器。 |
字符串 |
username |
容器注册表用户名。 |
字符串 |