diff --git a/specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/SessionPools.json b/specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/SessionPools.json index 13046bc09ed9..6e60f4c74719 100644 --- a/specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/SessionPools.json +++ b/specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/SessionPools.json @@ -231,6 +231,9 @@ }, "Create or Update Session Pool with lifecycle OnContainerExit Timed": { "$ref": "./examples/SessionPools_LifecycleOnContainerExit_CreateOrUpdate.json" + }, + "Create or Update Session Pool with MCP server": { + "$ref": "./examples/SessionPools_McpServer_CreateOrUpdate.json" } } }, @@ -346,9 +349,114 @@ } } } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/sessionPools/{sessionPoolName}/fetchMcpServerCredentials": { + "post": { + "tags": [ + "ContainerAppsSessionPools" + ], + "summary": "Fetch the MCP server credentials of a session pool.", + "operationId": "ContainerAppsSessionPools_FetchMcpServerCredentials", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/SessionPoolNameParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK.", + "schema": { + "$ref": "#/definitions/McpServerCredential" + } + }, + "default": { + "description": "Common error response.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Fetch Session Pool MCP server credentials": { + "$ref": "./examples/SessionPools_FetchMcpServerCredentials.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/sessionPools/{sessionPoolName}/rotateMcpServerCredentials": { + "post": { + "tags": [ + "ContainerAppsSessionPools" + ], + "summary": "Rotate and fetch the rotated MCP server credentials of a session pool.", + "operationId": "ContainerAppsSessionPools_RotateMcpServerCredentials", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/SessionPoolNameParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK.", + "schema": { + "$ref": "#/definitions/McpServerCredential" + } + }, + "default": { + "description": "Common error response.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Rotate Session Pool MCP server credentials": { + "$ref": "./examples/SessionPools_RotateMcpServerCredentials.json" + } + } + } } }, "definitions": { + "McpServerSettings": { + "description": "The settings of the MCP server for this session pool.", + "type": "object", + "properties": { + "isMcpServerEnabled": { + "description": "Indicates whether the MCP server is enabled.", + "type": "boolean", + "default": false + }, + "isMcpServerApiKeyDisabled": { + "description": "Indicates whether the MCP server API key is disabled.", + "type": "boolean", + "default": false + }, + "mcpServerEndpoint": { + "description": "The endpoint of the MCP server.", + "type": "string", + "readOnly": true + } + } + }, "TemplatePoolStatus": { "description": "The status of pods in the pool of this template.", "type": "object", @@ -899,6 +1007,10 @@ "x-ms-identifiers": [ "identity" ] + }, + "mcpServerSettings": { + "description": "The MCP server settings of the session pool.", + "$ref": "#/definitions/McpServerSettings" } }, "x-ms-client-flatten": true @@ -1006,6 +1118,18 @@ "readOnly": true } } + }, + "McpServerCredential": { + "description": "The credentials used for the MCP server endpoint authentication.", + "type": "object", + "properties": { + "apiKey": { + "description": "The API key for the MCP server.", + "type": "string", + "readOnly": true, + "x-ms-secret": true + } + } } } } diff --git a/specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/SessionPools_FetchMcpServerCredentials.json b/specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/SessionPools_FetchMcpServerCredentials.json new file mode 100644 index 000000000000..85dc5f14db98 --- /dev/null +++ b/specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/SessionPools_FetchMcpServerCredentials.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "resourceGroupName": "rg", + "sessionPoolName": "testsessionpool", + "api-version": "2025-10-02-preview" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "apiKey": "dummyapikey" + } + } + } +} diff --git a/specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/SessionPools_McpServer_CreateOrUpdate.json b/specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/SessionPools_McpServer_CreateOrUpdate.json new file mode 100644 index 000000000000..b0d89f680d69 --- /dev/null +++ b/specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/SessionPools_McpServer_CreateOrUpdate.json @@ -0,0 +1,97 @@ +{ + "parameters": { + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "resourceGroupName": "rg", + "sessionPoolName": "testsessionpool", + "api-version": "2025-10-02-preview", + "sessionPoolEnvelope": { + "location": "East US", + "properties": { + "poolManagementType": "Dynamic", + "containerType": "Shell", + "scaleConfiguration": { + "maxConcurrentSessions": 50 + }, + "dynamicPoolConfiguration": { + "lifecycleConfiguration": { + "lifecycleType": "Timed", + "cooldownPeriodInSeconds": 600 + } + }, + "sessionNetworkConfiguration": { + "status": "EgressEnabled" + }, + "mcpServerSettings": { + "isMcpServerEnabled": true, + "isMcpServerApiKeyDisabled": false + } + } + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/sessionPools/testsessionpool", + "name": "testsessionpool", + "type": "Microsoft.App/sessionPools", + "location": "East US", + "properties": { + "provisioningState": "Succeeded", + "poolManagementType": "Dynamic", + "containerType": "Shell", + "scaleConfiguration": { + "maxConcurrentSessions": 50 + }, + "dynamicPoolConfiguration": { + "lifecycleConfiguration": { + "lifecycleType": "Timed", + "cooldownPeriodInSeconds": 600 + } + }, + "sessionNetworkConfiguration": { + "status": "EgressEnabled" + }, + "mcpServerSettings": { + "isMcpServerEnabled": true, + "isMcpServerApiKeyDisabled": false, + "mcpServerEndpoint": "https://eastus.dynamicsessions.io/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/sessionPools/testsessionpool/mcp" + }, + "poolManagementEndpoint": "https://eastus.dynamicsessions.io/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/sessionPools/testsessionpool" + } + } + }, + "201": { + "headers": {}, + "body": { + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/sessionPools/testsessionpool", + "name": "testsessionpool", + "type": "Microsoft.App/sessionPools", + "location": "East US", + "properties": { + "provisioningState": "InProgress", + "poolManagementType": "Dynamic", + "containerType": "Shell", + "scaleConfiguration": { + "maxConcurrentSessions": 50 + }, + "dynamicPoolConfiguration": { + "lifecycleConfiguration": { + "lifecycleType": "Timed", + "cooldownPeriodInSeconds": 600 + } + }, + "sessionNetworkConfiguration": { + "status": "EgressEnabled" + }, + "mcpServerSettings": { + "isMcpServerEnabled": true, + "isMcpServerApiKeyDisabled": false, + "mcpServerEndpoint": "https://eastus.dynamicsessions.io/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/sessionPools/testsessionpool/mcp" + }, + "poolManagementEndpoint": "https://eastus.dynamicsessions.io/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/sessionPools/testsessionpool" + } + } + } + } +} diff --git a/specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/SessionPools_RotateMcpServerCredentials.json b/specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/SessionPools_RotateMcpServerCredentials.json new file mode 100644 index 000000000000..85dc5f14db98 --- /dev/null +++ b/specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/SessionPools_RotateMcpServerCredentials.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "resourceGroupName": "rg", + "sessionPoolName": "testsessionpool", + "api-version": "2025-10-02-preview" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "apiKey": "dummyapikey" + } + } + } +}