Bicep resource definition
The sessionPools resource type can be deployed with operations that target:
For a list of changed properties in each API version, see change log.
Usage Examples
Azure Verified Modules
The following Azure Verified Modules can be used to deploy this resource type.
To create a Microsoft.App/sessionPools resource, add the following Bicep to your template.
resource symbolicname 'Microsoft.App/sessionPools@2026-01-01' = {
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: {
lifecycleConfiguration: {
cooldownPeriodInSeconds: int
lifecycleType: 'string'
maxAlivePeriodInSeconds: int
}
}
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'
}
}
Property Values
Microsoft.App/sessionPools
| Name |
Description |
Value |
| identity |
The managed service identities assigned to this resource. |
ManagedServiceIdentity |
| location |
The geo-location where the resource lives |
string (required) |
| name |
The resource name |
string
Constraints: Min length = 3 Max length = 63 Pattern = ^[a-z][a-z0-9]*$ (required) |
| properties |
Container App session pool resource specific properties |
SessionPoolProperties |
| tags |
Resource tags |
Dictionary of tag names and values. See Tags in templates |
CustomContainerTemplate
| Name |
Description |
Value |
| containers |
List of container definitions for the sessions of the session pool. |
SessionContainer[] |
| ingress |
Session pool ingress configuration. |
SessionIngress |
| registryCredentials |
Private container registry credentials for containers used by the sessions of the session pool. |
SessionRegistryCredentials |
DynamicPoolConfiguration
| Name |
Description |
Value |
| lifecycleConfiguration |
The lifecycle configuration of a session in the dynamic session pool |
LifecycleConfiguration |
EnvironmentVar
| Name |
Description |
Value |
| name |
Environment variable name. |
string |
| secretRef |
Name of the Container App secret from which to pull the environment variable value. |
string |
| value |
Non-secret environment variable value. |
string |
LifecycleConfiguration
| Name |
Description |
Value |
| cooldownPeriodInSeconds |
The cooldown period of a session in seconds when the lifecycle type is 'Timed'. |
int |
| lifecycleType |
The lifecycle type of the session pool. |
'OnContainerExit' 'Timed' |
| maxAlivePeriodInSeconds |
The maximum alive period of a session in seconds when the lifecycle type is 'OnContainerExit'. |
int |
ManagedIdentitySetting
| Name |
Description |
Value |
| identity |
The resource ID of a user-assigned managed identity that is assigned to the Session Pool, or 'system' for system-assigned identity. |
string (required) |
| lifecycle |
Use to select the lifecycle stages of a Session Pool during which the Managed Identity should be available. |
'Main' 'None' |
ManagedServiceIdentity
| Name |
Description |
Value |
| type |
Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). |
'None' 'SystemAssigned' 'SystemAssigned,UserAssigned' 'UserAssigned' (required) |
| userAssignedIdentities |
The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests. |
UserAssignedIdentities |
ScaleConfiguration
| Name |
Description |
Value |
| maxConcurrentSessions |
The maximum count of sessions at the same time. |
int |
| readySessionInstances |
The minimum count of ready session instances. |
int |
SessionContainer
| Name |
Description |
Value |
| args |
Container start command arguments. |
string[] |
| command |
Container start command. |
string[] |
| env |
Container environment variables. |
EnvironmentVar[] |
| image |
Container image tag. |
string |
| name |
Custom container name. |
string |
| resources |
Container resource requirements. |
SessionContainerResources |
SessionContainerResources
| Name |
Description |
Value |
| cpu |
Required CPU in cores, e.g. 0.5 |
int |
| memory |
Required memory, e.g. "250Mb" |
string |
SessionIngress
| Name |
Description |
Value |
| targetPort |
Target port in containers for traffic from ingress |
int |
SessionNetworkConfiguration
| Name |
Description |
Value |
| status |
Network status for the sessions. |
'EgressDisabled' 'EgressEnabled' |
SessionPoolProperties
| Name |
Description |
Value |
| containerType |
The container type of the sessions. You can use your own container to build the session pool, or you can use a predefined container to run workload with specific language. |
'CustomContainer' 'PythonLTS' |
| customContainerTemplate |
The custom container configuration if the containerType is CustomContainer. |
CustomContainerTemplate |
| dynamicPoolConfiguration |
The pool configuration if the poolManagementType is dynamic. |
DynamicPoolConfiguration |
| environmentId |
Resource ID of the session pool's environment. |
string |
| managedIdentitySettings |
Optional settings for a Managed Identity that is assigned to the Session pool. |
ManagedIdentitySetting[] |
| poolManagementType |
The pool management type of the session pool. |
'Dynamic' 'Manual' |
| scaleConfiguration |
The scale configuration of the session pool. |
ScaleConfiguration |
| secrets |
The secrets of the session pool. |
SessionPoolSecret[] |
| sessionNetworkConfiguration |
The network configuration of the sessions in the session pool. |
SessionNetworkConfiguration |
SessionPoolSecret
| Name |
Description |
Value |
| name |
Secret Name. |
string |
| value |
Secret Value. |
string
Constraints: Sensitive value. Pass in as a secure parameter. |
SessionRegistryCredentials
| Name |
Description |
Value |
| identity |
A Managed Identity to use to authenticate with Azure Container Registry. For user-assigned identities, use the full user-assigned identity Resource ID. For system-assigned identities, use 'system' |
string |
| passwordSecretRef |
The name of the secret that contains the registry login password |
string |
| server |
Container registry server. |
string |
| username |
Container registry username. |
string |
UserAssignedIdentities
UserAssignedIdentity
ARM template resource definition
The sessionPools resource type can be deployed with operations that target:
Usage Examples
To create a Microsoft.App/sessionPools resource, add the following JSON to your template.
{
"type": "Microsoft.App/sessionPools",
"apiVersion": "2026-01-01",
"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": {
"lifecycleConfiguration": {
"cooldownPeriodInSeconds": "int",
"lifecycleType": "string",
"maxAlivePeriodInSeconds": "int"
}
},
"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"
}
}
Property Values
Microsoft.App/sessionPools
| Name |
Description |
Value |
| apiVersion |
The api version |
'2026-01-01' |
| identity |
The managed service identities assigned to this resource. |
ManagedServiceIdentity |
| location |
The geo-location where the resource lives |
string (required) |
| name |
The resource name |
string
Constraints: Min length = 3 Max length = 63 Pattern = ^[a-z][a-z0-9]*$ (required) |
| properties |
Container App session pool resource specific properties |
SessionPoolProperties |
| tags |
Resource tags |
Dictionary of tag names and values. See Tags in templates |
| type |
The resource type |
'Microsoft.App/sessionPools' |
CustomContainerTemplate
| Name |
Description |
Value |
| containers |
List of container definitions for the sessions of the session pool. |
SessionContainer[] |
| ingress |
Session pool ingress configuration. |
SessionIngress |
| registryCredentials |
Private container registry credentials for containers used by the sessions of the session pool. |
SessionRegistryCredentials |
DynamicPoolConfiguration
| Name |
Description |
Value |
| lifecycleConfiguration |
The lifecycle configuration of a session in the dynamic session pool |
LifecycleConfiguration |
EnvironmentVar
| Name |
Description |
Value |
| name |
Environment variable name. |
string |
| secretRef |
Name of the Container App secret from which to pull the environment variable value. |
string |
| value |
Non-secret environment variable value. |
string |
LifecycleConfiguration
| Name |
Description |
Value |
| cooldownPeriodInSeconds |
The cooldown period of a session in seconds when the lifecycle type is 'Timed'. |
int |
| lifecycleType |
The lifecycle type of the session pool. |
'OnContainerExit' 'Timed' |
| maxAlivePeriodInSeconds |
The maximum alive period of a session in seconds when the lifecycle type is 'OnContainerExit'. |
int |
ManagedIdentitySetting
| Name |
Description |
Value |
| identity |
The resource ID of a user-assigned managed identity that is assigned to the Session Pool, or 'system' for system-assigned identity. |
string (required) |
| lifecycle |
Use to select the lifecycle stages of a Session Pool during which the Managed Identity should be available. |
'Main' 'None' |
ManagedServiceIdentity
| Name |
Description |
Value |
| type |
Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). |
'None' 'SystemAssigned' 'SystemAssigned,UserAssigned' 'UserAssigned' (required) |
| userAssignedIdentities |
The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests. |
UserAssignedIdentities |
ScaleConfiguration
| Name |
Description |
Value |
| maxConcurrentSessions |
The maximum count of sessions at the same time. |
int |
| readySessionInstances |
The minimum count of ready session instances. |
int |
SessionContainer
| Name |
Description |
Value |
| args |
Container start command arguments. |
string[] |
| command |
Container start command. |
string[] |
| env |
Container environment variables. |
EnvironmentVar[] |
| image |
Container image tag. |
string |
| name |
Custom container name. |
string |
| resources |
Container resource requirements. |
SessionContainerResources |
SessionContainerResources
| Name |
Description |
Value |
| cpu |
Required CPU in cores, e.g. 0.5 |
int |
| memory |
Required memory, e.g. "250Mb" |
string |
SessionIngress
| Name |
Description |
Value |
| targetPort |
Target port in containers for traffic from ingress |
int |
SessionNetworkConfiguration
| Name |
Description |
Value |
| status |
Network status for the sessions. |
'EgressDisabled' 'EgressEnabled' |
SessionPoolProperties
| Name |
Description |
Value |
| containerType |
The container type of the sessions. You can use your own container to build the session pool, or you can use a predefined container to run workload with specific language. |
'CustomContainer' 'PythonLTS' |
| customContainerTemplate |
The custom container configuration if the containerType is CustomContainer. |
CustomContainerTemplate |
| dynamicPoolConfiguration |
The pool configuration if the poolManagementType is dynamic. |
DynamicPoolConfiguration |
| environmentId |
Resource ID of the session pool's environment. |
string |
| managedIdentitySettings |
Optional settings for a Managed Identity that is assigned to the Session pool. |
ManagedIdentitySetting[] |
| poolManagementType |
The pool management type of the session pool. |
'Dynamic' 'Manual' |
| scaleConfiguration |
The scale configuration of the session pool. |
ScaleConfiguration |
| secrets |
The secrets of the session pool. |
SessionPoolSecret[] |
| sessionNetworkConfiguration |
The network configuration of the sessions in the session pool. |
SessionNetworkConfiguration |
SessionPoolSecret
| Name |
Description |
Value |
| name |
Secret Name. |
string |
| value |
Secret Value. |
string
Constraints: Sensitive value. Pass in as a secure parameter. |
SessionRegistryCredentials
| Name |
Description |
Value |
| identity |
A Managed Identity to use to authenticate with Azure Container Registry. For user-assigned identities, use the full user-assigned identity Resource ID. For system-assigned identities, use 'system' |
string |
| passwordSecretRef |
The name of the secret that contains the registry login password |
string |
| server |
Container registry server. |
string |
| username |
Container registry username. |
string |
UserAssignedIdentities
UserAssignedIdentity
The sessionPools resource type can be deployed with operations that target:
- Resource groups
For a list of changed properties in each API version, see change log.
To create a Microsoft.App/sessionPools resource, add the following Terraform to your template.
resource "azapi_resource" "symbolicname" {
type = "Microsoft.App/sessionPools@2026-01-01"
name = "string"
parent_id = "string"
identity {
type = "string"
identity_ids = [
"string"
]
}
location = "string"
tags = {
{customized property} = "string"
}
body = {
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 = {
lifecycleConfiguration = {
cooldownPeriodInSeconds = int
lifecycleType = "string"
maxAlivePeriodInSeconds = int
}
}
environmentId = "string"
managedIdentitySettings = [
{
identity = "string"
lifecycle = "string"
}
]
poolManagementType = "string"
scaleConfiguration = {
maxConcurrentSessions = int
readySessionInstances = int
}
secrets = [
{
name = "string"
value = "string"
}
]
sessionNetworkConfiguration = {
status = "string"
}
}
}
}
Property Values
Microsoft.App/sessionPools
| Name |
Description |
Value |
| identity |
The managed service identities assigned to this resource. |
ManagedServiceIdentity |
| location |
The geo-location where the resource lives |
string (required) |
| name |
The resource name |
string
Constraints: Min length = 3 Max length = 63 Pattern = ^[a-z][a-z0-9]*$ (required) |
| properties |
Container App session pool resource specific properties |
SessionPoolProperties |
| tags |
Resource tags |
Dictionary of tag names and values. |
| type |
The resource type |
"Microsoft.App/sessionPools@2026-01-01" |
CustomContainerTemplate
| Name |
Description |
Value |
| containers |
List of container definitions for the sessions of the session pool. |
SessionContainer[] |
| ingress |
Session pool ingress configuration. |
SessionIngress |
| registryCredentials |
Private container registry credentials for containers used by the sessions of the session pool. |
SessionRegistryCredentials |
DynamicPoolConfiguration
| Name |
Description |
Value |
| lifecycleConfiguration |
The lifecycle configuration of a session in the dynamic session pool |
LifecycleConfiguration |
EnvironmentVar
| Name |
Description |
Value |
| name |
Environment variable name. |
string |
| secretRef |
Name of the Container App secret from which to pull the environment variable value. |
string |
| value |
Non-secret environment variable value. |
string |
LifecycleConfiguration
| Name |
Description |
Value |
| cooldownPeriodInSeconds |
The cooldown period of a session in seconds when the lifecycle type is 'Timed'. |
int |
| lifecycleType |
The lifecycle type of the session pool. |
'OnContainerExit' 'Timed' |
| maxAlivePeriodInSeconds |
The maximum alive period of a session in seconds when the lifecycle type is 'OnContainerExit'. |
int |
ManagedIdentitySetting
| Name |
Description |
Value |
| identity |
The resource ID of a user-assigned managed identity that is assigned to the Session Pool, or 'system' for system-assigned identity. |
string (required) |
| lifecycle |
Use to select the lifecycle stages of a Session Pool during which the Managed Identity should be available. |
'Main' 'None' |
ManagedServiceIdentity
| Name |
Description |
Value |
| type |
Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). |
'None' 'SystemAssigned' 'SystemAssigned,UserAssigned' 'UserAssigned' (required) |
| userAssignedIdentities |
The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests. |
UserAssignedIdentities |
ScaleConfiguration
| Name |
Description |
Value |
| maxConcurrentSessions |
The maximum count of sessions at the same time. |
int |
| readySessionInstances |
The minimum count of ready session instances. |
int |
SessionContainer
| Name |
Description |
Value |
| args |
Container start command arguments. |
string[] |
| command |
Container start command. |
string[] |
| env |
Container environment variables. |
EnvironmentVar[] |
| image |
Container image tag. |
string |
| name |
Custom container name. |
string |
| resources |
Container resource requirements. |
SessionContainerResources |
SessionContainerResources
| Name |
Description |
Value |
| cpu |
Required CPU in cores, e.g. 0.5 |
int |
| memory |
Required memory, e.g. "250Mb" |
string |
SessionIngress
| Name |
Description |
Value |
| targetPort |
Target port in containers for traffic from ingress |
int |
SessionNetworkConfiguration
| Name |
Description |
Value |
| status |
Network status for the sessions. |
'EgressDisabled' 'EgressEnabled' |
SessionPoolProperties
| Name |
Description |
Value |
| containerType |
The container type of the sessions. You can use your own container to build the session pool, or you can use a predefined container to run workload with specific language. |
'CustomContainer' 'PythonLTS' |
| customContainerTemplate |
The custom container configuration if the containerType is CustomContainer. |
CustomContainerTemplate |
| dynamicPoolConfiguration |
The pool configuration if the poolManagementType is dynamic. |
DynamicPoolConfiguration |
| environmentId |
Resource ID of the session pool's environment. |
string |
| managedIdentitySettings |
Optional settings for a Managed Identity that is assigned to the Session pool. |
ManagedIdentitySetting[] |
| poolManagementType |
The pool management type of the session pool. |
'Dynamic' 'Manual' |
| scaleConfiguration |
The scale configuration of the session pool. |
ScaleConfiguration |
| secrets |
The secrets of the session pool. |
SessionPoolSecret[] |
| sessionNetworkConfiguration |
The network configuration of the sessions in the session pool. |
SessionNetworkConfiguration |
SessionPoolSecret
| Name |
Description |
Value |
| name |
Secret Name. |
string |
| value |
Secret Value. |
string
Constraints: Sensitive value. Pass in as a secure parameter. |
SessionRegistryCredentials
| Name |
Description |
Value |
| identity |
A Managed Identity to use to authenticate with Azure Container Registry. For user-assigned identities, use the full user-assigned identity Resource ID. For system-assigned identities, use 'system' |
string |
| passwordSecretRef |
The name of the secret that contains the registry login password |
string |
| server |
Container registry server. |
string |
| username |
Container registry username. |
string |
UserAssignedIdentities
UserAssignedIdentity