Microsoft.App sessionPools

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.

Resource format

To create a Microsoft.App/sessionPools resource, add the following Bicep to your template.

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'
  }
}

Property values

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
cooldownPeriodInSeconds The cooldown period of a session in seconds. int
executionType The execution type of the session pool. 'Timed'

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

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. 'All'
'Init'
'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

Microsoft.App/sessionPools

Name Description Value
identity Managed identities needed by a session pool to interact with other Azure services to not maintain any secrets or credentials in code. ManagedServiceIdentity
location The geo-location where the resource lives string (required)
name The resource name string

Constraints:
Min length = 3
Max length = 3
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

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. '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

TrackedResourceTags

Name Description Value

UserAssignedIdentities

Name Description Value

UserAssignedIdentity

Name Description Value

ARM template 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.

Resource format

To create a Microsoft.App/sessionPools resource, add the following JSON to your template.

{
  "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"
  }
}

Property values

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
cooldownPeriodInSeconds The cooldown period of a session in seconds. int
executionType The execution type of the session pool. 'Timed'

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

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. 'All'
'Init'
'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

Microsoft.App/sessionPools

Name Description Value
apiVersion The api version '2024-10-02-preview'
identity Managed identities needed by a session pool to interact with other Azure services to not maintain any secrets or credentials in code. ManagedServiceIdentity
location The geo-location where the resource lives string (required)
name The resource name string

Constraints:
Min length = 3
Max length = 3
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'

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. '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

TrackedResourceTags

Name Description Value

UserAssignedIdentities

Name Description Value

UserAssignedIdentity

Name Description Value

Terraform (AzAPI provider) resource definition

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.

Resource format

To create a Microsoft.App/sessionPools resource, add the following Terraform to your template.

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"
      }
    }
  })
}

Property values

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
cooldownPeriodInSeconds The cooldown period of a session in seconds. int
executionType The execution type of the session pool. 'Timed'

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

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. 'All'
'Init'
'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

Microsoft.App/sessionPools

Name Description Value
identity Managed identities needed by a session pool to interact with other Azure services to not maintain any secrets or credentials in code. ManagedServiceIdentity
location The geo-location where the resource lives string (required)
name The resource name string

Constraints:
Min length = 3
Max length = 3
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@2024-10-02-preview"

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. '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

TrackedResourceTags

Name Description Value

UserAssignedIdentities

Name Description Value

UserAssignedIdentity

Name Description Value