你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Microsoft.App sessionPools

Bicep 资源定义

可以使用目标操作部署 sessionPools 资源类型:

有关每个 API 版本中已更改属性的列表,请参阅 更改日志

资源格式

若要创建 Microsoft.App/sessionPools 资源,请将以下 Bicep 添加到模板。

resource symbolicname 'Microsoft.App/sessionPools@2024-10-02-preview' = {
  identity: {
    type: 'string'
    userAssignedIdentities: {
      {customized property}: {}
    }
  }
  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: {
        identity: 'string'
        passwordSecretRef: 'string'
        server: 'string'
        username: 'string'
      }
    }
    dynamicPoolConfiguration: {
      cooldownPeriodInSeconds: int
      executionType: 'string'
    }
    environmentId: 'string'
    managedIdentitySettings: [
      {
        identity: 'string'
        lifecycle: 'string'
      }
    ]
    poolManagementType: 'string'
    scaleConfiguration: {
      maxConcurrentSessions: int
      readySessionInstances: int
    }
    secrets: [
      {
        name: 'string'
        value: 'string'
      }
    ]
    sessionNetworkConfiguration: {
      status: 'string'
    }
  }
  tags: {
    {customized property}: 'string'
  }
}

属性值

CustomContainerTemplate

名字 描述 价值
器皿 会话池会话的容器定义列表。 SessionContainer[]
入口 会话池入口配置。 SessionIngress
registryCredentials 会话池的会话使用的容器的专用容器注册表凭据。 SessionRegistryCredentials

DynamicPoolConfiguration

名字 描述 价值
cooldownPeriodInSeconds 会话的冷却期(以秒为单位)。 int
executionType 会话池的执行类型。 “Timed”

EnvironmentVar

名字 描述 价值
名字 环境变量名称。 字符串
secretRef 要从中拉取环境变量值的容器应用机密的名称。 字符串
价值 非机密环境变量值。 字符串

ManagedIdentitySetting

名字 描述 价值
身份 分配给会话池的用户分配托管标识的资源 ID,或系统分配的标识的“系统”。 string (必需)
生命周期 用于选择会话池的生命周期阶段,在此期间应提供托管标识。 “All”
“Init”
“Main”
“None”

ManagedServiceIdentity

名字 描述 价值
类型 托管服务标识的类型(其中允许 SystemAssigned 和 UserAssigned 类型)。 “None”
“SystemAssigned”
“SystemAssigned,UserAssigned”
“UserAssigned”(必需)
userAssignedIdentities 与资源关联的用户分配标识集。 userAssignedIdentities 字典密钥将为 ARM 资源 ID,格式为“/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}”。 字典值可以是请求中的空对象({})。 UserAssignedIdentities

Microsoft.App/sessionPools

名字 描述 价值
身份 会话池需要托管标识才能与其他 Azure 服务交互,以不维护代码中的任何机密或凭据。 ManagedServiceIdentity
位置 资源所在的地理位置 string (必需)
名字 资源名称 字符串

约束:
最小长度 = 3
最大长度 = 63
模式 = ^[a-z][a-z0-9]*$ (必需)
性能 容器应用会话池资源特定属性 SessionPoolProperties
标签 资源标记 标记名称和值的字典。 请参阅模板 中的 标记

ScaleConfiguration

名字 描述 价值
maxConcurrentSessions 同时的最大会话计数。 int
readySessionInstances 就绪会话实例的最小计数。 int

SessionContainer

名字 描述 价值
args 容器启动命令参数。 string[]
命令 容器启动命令。 string[]
env 容器环境变量。 EnvironmentVar[]
图像 容器映像标记。 字符串
名字 自定义容器名称。 字符串
资源 容器资源要求。 SessionContainerResources

SessionContainerResources

名字 描述 价值
中央处理器 核心中所需的 CPU,例如 0.5 int
记忆 所需的内存,例如“250Mb” 字符串

SessionIngress

名字 描述 价值
targetPort 用于来自入口的流量的容器中的目标端口 int

SessionNetworkConfiguration

名字 描述 价值
地位 会话的网络状态。 “EgressDisabled”
“EgressEnabled”

SessionPoolProperties

名字 描述 价值
containerType 会话的容器类型。 “CustomContainer”
“PythonLTS”
customContainerTemplate 如果 containerType 为 CustomContainer,则为自定义容器配置。 CustomContainerTemplate
dynamicPoolConfiguration 如果 poolManagementType 是动态的,则为池配置。 DynamicPoolConfiguration
environmentId 会话池环境的资源 ID。 字符串
managedIdentitySettings 分配给会话池的托管标识的可选设置。 ManagedIdentitySetting[]
poolManagementType 会话池的池管理类型。 “Dynamic”
“Manual”
scaleConfiguration 会话池的缩放配置。 ScaleConfiguration
秘密 会话池的机密。 SessionPoolSecret[]
sessionNetworkConfiguration 会话池中会话的网络配置。 SessionNetworkConfiguration

SessionPoolSecret

名字 描述 价值
名字 机密名称。 字符串
价值 机密值。 字符串

约束:
敏感值。 以安全参数的形式传入。

SessionRegistryCredentials

名字 描述 价值
身份 用于通过 Azure 容器注册表进行身份验证的托管标识。 对于用户分配的标识,请使用完整的用户分配标识资源 ID。 对于系统分配的标识,请使用“system” 字符串
passwordSecretRef 包含注册表登录密码的机密的名称 字符串
服务器 容器注册表服务器。 字符串
username 容器注册表用户名。 字符串

TrackedResourceTags

名字 描述 价值

UserAssignedIdentities

名字 描述 价值

UserAssignedIdentity

名字 描述 价值

ARM 模板资源定义

可以使用目标操作部署 sessionPools 资源类型:

有关每个 API 版本中已更改属性的列表,请参阅 更改日志

资源格式

若要创建 Microsoft.App/sessionPools 资源,请将以下 JSON 添加到模板。

{
  "type": "Microsoft.App/sessionPools",
  "apiVersion": "2024-10-02-preview",
  "name": "string",
  "identity": {
    "type": "string",
    "userAssignedIdentities": {
      "{customized property}": {
      }
    }
  },
  "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": {
        "identity": "string",
        "passwordSecretRef": "string",
        "server": "string",
        "username": "string"
      }
    },
    "dynamicPoolConfiguration": {
      "cooldownPeriodInSeconds": "int",
      "executionType": "string"
    },
    "environmentId": "string",
    "managedIdentitySettings": [
      {
        "identity": "string",
        "lifecycle": "string"
      }
    ],
    "poolManagementType": "string",
    "scaleConfiguration": {
      "maxConcurrentSessions": "int",
      "readySessionInstances": "int"
    },
    "secrets": [
      {
        "name": "string",
        "value": "string"
      }
    ],
    "sessionNetworkConfiguration": {
      "status": "string"
    }
  },
  "tags": {
    "{customized property}": "string"
  }
}

属性值

CustomContainerTemplate

名字 描述 价值
器皿 会话池会话的容器定义列表。 SessionContainer[]
入口 会话池入口配置。 SessionIngress
registryCredentials 会话池的会话使用的容器的专用容器注册表凭据。 SessionRegistryCredentials

DynamicPoolConfiguration

名字 描述 价值
cooldownPeriodInSeconds 会话的冷却期(以秒为单位)。 int
executionType 会话池的执行类型。 “Timed”

EnvironmentVar

名字 描述 价值
名字 环境变量名称。 字符串
secretRef 要从中拉取环境变量值的容器应用机密的名称。 字符串
价值 非机密环境变量值。 字符串

ManagedIdentitySetting

名字 描述 价值
身份 分配给会话池的用户分配托管标识的资源 ID,或系统分配的标识的“系统”。 string (必需)
生命周期 用于选择会话池的生命周期阶段,在此期间应提供托管标识。 “All”
“Init”
“Main”
“None”

ManagedServiceIdentity

名字 描述 价值
类型 托管服务标识的类型(其中允许 SystemAssigned 和 UserAssigned 类型)。 “None”
“SystemAssigned”
“SystemAssigned,UserAssigned”
“UserAssigned”(必需)
userAssignedIdentities 与资源关联的用户分配标识集。 userAssignedIdentities 字典密钥将为 ARM 资源 ID,格式为“/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}”。 字典值可以是请求中的空对象({})。 UserAssignedIdentities

Microsoft.App/sessionPools

名字 描述 价值
apiVersion API 版本 '2024-10-02-preview'
身份 会话池需要托管标识才能与其他 Azure 服务交互,以不维护代码中的任何机密或凭据。 ManagedServiceIdentity
位置 资源所在的地理位置 string (必需)
名字 资源名称 字符串

约束:
最小长度 = 3
最大长度 = 63
模式 = ^[a-z][a-z0-9]*$ (必需)
性能 容器应用会话池资源特定属性 SessionPoolProperties
标签 资源标记 标记名称和值的字典。 请参阅模板 中的 标记
类型 资源类型 “Microsoft.App/sessionPools”

ScaleConfiguration

名字 描述 价值
maxConcurrentSessions 同时的最大会话计数。 int
readySessionInstances 就绪会话实例的最小计数。 int

SessionContainer

名字 描述 价值
args 容器启动命令参数。 string[]
命令 容器启动命令。 string[]
env 容器环境变量。 EnvironmentVar[]
图像 容器映像标记。 字符串
名字 自定义容器名称。 字符串
资源 容器资源要求。 SessionContainerResources

SessionContainerResources

名字 描述 价值
中央处理器 核心中所需的 CPU,例如 0.5 int
记忆 所需的内存,例如“250Mb” 字符串

SessionIngress

名字 描述 价值
targetPort 用于来自入口的流量的容器中的目标端口 int

SessionNetworkConfiguration

名字 描述 价值
地位 会话的网络状态。 “EgressDisabled”
“EgressEnabled”

SessionPoolProperties

名字 描述 价值
containerType 会话的容器类型。 “CustomContainer”
“PythonLTS”
customContainerTemplate 如果 containerType 为 CustomContainer,则为自定义容器配置。 CustomContainerTemplate
dynamicPoolConfiguration 如果 poolManagementType 是动态的,则为池配置。 DynamicPoolConfiguration
environmentId 会话池环境的资源 ID。 字符串
managedIdentitySettings 分配给会话池的托管标识的可选设置。 ManagedIdentitySetting[]
poolManagementType 会话池的池管理类型。 “Dynamic”
“Manual”
scaleConfiguration 会话池的缩放配置。 ScaleConfiguration
秘密 会话池的机密。 SessionPoolSecret[]
sessionNetworkConfiguration 会话池中会话的网络配置。 SessionNetworkConfiguration

SessionPoolSecret

名字 描述 价值
名字 机密名称。 字符串
价值 机密值。 字符串

约束:
敏感值。 以安全参数的形式传入。

SessionRegistryCredentials

名字 描述 价值
身份 用于通过 Azure 容器注册表进行身份验证的托管标识。 对于用户分配的标识,请使用完整的用户分配标识资源 ID。 对于系统分配的标识,请使用“system” 字符串
passwordSecretRef 包含注册表登录密码的机密的名称 字符串
服务器 容器注册表服务器。 字符串
username 容器注册表用户名。 字符串

TrackedResourceTags

名字 描述 价值

UserAssignedIdentities

名字 描述 价值

UserAssignedIdentity

名字 描述 价值

Terraform (AzAPI 提供程序)资源定义

可以使用目标操作部署 sessionPools 资源类型:

  • 资源组

有关每个 API 版本中已更改属性的列表,请参阅 更改日志

资源格式

若要创建 Microsoft.App/sessionPools 资源,请将以下 Terraform 添加到模板中。

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.App/sessionPools@2024-10-02-preview"
  name = "string"
  identity = {
    type = "string"
    userAssignedIdentities = {
      {customized property} = {
      }
    }
  }
  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 = {
          identity = "string"
          passwordSecretRef = "string"
          server = "string"
          username = "string"
        }
      }
      dynamicPoolConfiguration = {
        cooldownPeriodInSeconds = int
        executionType = "string"
      }
      environmentId = "string"
      managedIdentitySettings = [
        {
          identity = "string"
          lifecycle = "string"
        }
      ]
      poolManagementType = "string"
      scaleConfiguration = {
        maxConcurrentSessions = int
        readySessionInstances = int
      }
      secrets = [
        {
          name = "string"
          value = "string"
        }
      ]
      sessionNetworkConfiguration = {
        status = "string"
      }
    }
  })
}

属性值

CustomContainerTemplate

名字 描述 价值
器皿 会话池会话的容器定义列表。 SessionContainer[]
入口 会话池入口配置。 SessionIngress
registryCredentials 会话池的会话使用的容器的专用容器注册表凭据。 SessionRegistryCredentials

DynamicPoolConfiguration

名字 描述 价值
cooldownPeriodInSeconds 会话的冷却期(以秒为单位)。 int
executionType 会话池的执行类型。 “Timed”

EnvironmentVar

名字 描述 价值
名字 环境变量名称。 字符串
secretRef 要从中拉取环境变量值的容器应用机密的名称。 字符串
价值 非机密环境变量值。 字符串

ManagedIdentitySetting

名字 描述 价值
身份 分配给会话池的用户分配托管标识的资源 ID,或系统分配的标识的“系统”。 string (必需)
生命周期 用于选择会话池的生命周期阶段,在此期间应提供托管标识。 “All”
“Init”
“Main”
“None”

ManagedServiceIdentity

名字 描述 价值
类型 托管服务标识的类型(其中允许 SystemAssigned 和 UserAssigned 类型)。 “None”
“SystemAssigned”
“SystemAssigned,UserAssigned”
“UserAssigned”(必需)
userAssignedIdentities 与资源关联的用户分配标识集。 userAssignedIdentities 字典密钥将为 ARM 资源 ID,格式为“/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}”。 字典值可以是请求中的空对象({})。 UserAssignedIdentities

Microsoft.App/sessionPools

名字 描述 价值
身份 会话池需要托管标识才能与其他 Azure 服务交互,以不维护代码中的任何机密或凭据。 ManagedServiceIdentity
位置 资源所在的地理位置 string (必需)
名字 资源名称 字符串

约束:
最小长度 = 3
最大长度 = 63
模式 = ^[a-z][a-z0-9]*$ (必需)
性能 容器应用会话池资源特定属性 SessionPoolProperties
标签 资源标记 标记名称和值的字典。
类型 资源类型 “Microsoft.App/sessionPools@2024-10-02-preview”

ScaleConfiguration

名字 描述 价值
maxConcurrentSessions 同时的最大会话计数。 int
readySessionInstances 就绪会话实例的最小计数。 int

SessionContainer

名字 描述 价值
args 容器启动命令参数。 string[]
命令 容器启动命令。 string[]
env 容器环境变量。 EnvironmentVar[]
图像 容器映像标记。 字符串
名字 自定义容器名称。 字符串
资源 容器资源要求。 SessionContainerResources

SessionContainerResources

名字 描述 价值
中央处理器 核心中所需的 CPU,例如 0.5 int
记忆 所需的内存,例如“250Mb” 字符串

SessionIngress

名字 描述 价值
targetPort 用于来自入口的流量的容器中的目标端口 int

SessionNetworkConfiguration

名字 描述 价值
地位 会话的网络状态。 “EgressDisabled”
“EgressEnabled”

SessionPoolProperties

名字 描述 价值
containerType 会话的容器类型。 “CustomContainer”
“PythonLTS”
customContainerTemplate 如果 containerType 为 CustomContainer,则为自定义容器配置。 CustomContainerTemplate
dynamicPoolConfiguration 如果 poolManagementType 是动态的,则为池配置。 DynamicPoolConfiguration
environmentId 会话池环境的资源 ID。 字符串
managedIdentitySettings 分配给会话池的托管标识的可选设置。 ManagedIdentitySetting[]
poolManagementType 会话池的池管理类型。 “Dynamic”
“Manual”
scaleConfiguration 会话池的缩放配置。 ScaleConfiguration
秘密 会话池的机密。 SessionPoolSecret[]
sessionNetworkConfiguration 会话池中会话的网络配置。 SessionNetworkConfiguration

SessionPoolSecret

名字 描述 价值
名字 机密名称。 字符串
价值 机密值。 字符串

约束:
敏感值。 以安全参数的形式传入。

SessionRegistryCredentials

名字 描述 价值
身份 用于通过 Azure 容器注册表进行身份验证的托管标识。 对于用户分配的标识,请使用完整的用户分配标识资源 ID。 对于系统分配的标识,请使用“system” 字符串
passwordSecretRef 包含注册表登录密码的机密的名称 字符串
服务器 容器注册表服务器。 字符串
username 容器注册表用户名。 字符串

TrackedResourceTags

名字 描述 价值

UserAssignedIdentities

名字 描述 价值

UserAssignedIdentity

名字 描述 价值