-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Add SessionPools and Sessions #28047
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 83 commits
0466f48
085975f
736b434
7d24da4
3f65002
49b2258
7579115
fdf1732
e2083fc
2105658
b805a40
b89435e
7b12678
3012e70
bc39d7f
b7e8cde
0b7b3df
2ef5f2f
55ca190
be67ed6
1bd2c71
64db91e
099c7a5
c5cf899
faee932
096e9ee
406a733
6d0e7a2
d41a1a7
ab78cdf
0f21f79
c167226
2695e42
a29baf6
8004066
7cb646f
bdd6ba5
ea32d53
5dcfa90
56a1991
5484024
4b8414b
d6fa624
1bdf67a
7c19ebf
0bdc104
548769b
e2a629c
1fb6264
62ea325
5e9f510
1e7acb5
8987ec1
b84d8a4
3af4938
e81d3dc
da899e6
b6c3f6c
19a6af4
65ec394
bba433a
6fd9185
0239396
4403da0
4606920
7b421dc
0b6c205
0b42504
c705b1c
edc90bd
d7d7337
372e946
052aa40
c82b9d9
e008a08
69a251d
eeea358
489cd79
b61b6c5
caff56a
c35507a
275a1d7
9b698a8
4ebdeee
8b179e9
093a1a0
261950f
e5dcea5
3d18d06
b02872d
da8f917
f5a1cde
d9eab1d
c80b5e4
5739186
db41f15
b042168
ad074ac
44d624c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,387 @@ | ||
| { | ||
| "swagger": "2.0", | ||
| "info": { | ||
| "title": "ContainerApps API Client", | ||
| "version": "2024-02-02-preview" | ||
| }, | ||
| "schemes": [ | ||
| "https" | ||
| ], | ||
| "host": "management.azure.com", | ||
| "produces": [ | ||
| "application/json" | ||
| ], | ||
| "consumes": [ | ||
| "application/json" | ||
| ], | ||
| "security": [ | ||
| { | ||
| "azure_auth": [ | ||
| "user_impersonation" | ||
| ] | ||
| } | ||
| ], | ||
| "securityDefinitions": { | ||
| "azure_auth": { | ||
| "type": "oauth2", | ||
| "description": "Azure Active Directory OAuth2 Flow.", | ||
| "flow": "implicit", | ||
| "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", | ||
| "scopes": { | ||
| "user_impersonation": "impersonate your user account" | ||
| } | ||
| } | ||
| }, | ||
| "parameters": { | ||
| "SessionPoolNameParameter": { | ||
| "name": "sessionPoolName", | ||
| "in": "path", | ||
| "description": "Name of the Session Pool.", | ||
| "required": true, | ||
| "type": "string", | ||
| "pattern": "^[a-z][a-z0-9]*$", | ||
| "minLength": 3, | ||
| "maxLength": 63 | ||
| } | ||
| }, | ||
| "paths": { | ||
| "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/sessionPools/{sessionPoolName}/generateSessions": { | ||
| "post": { | ||
| "tags": [ | ||
| "ContainerAppsSessionPoolSessions" | ||
| ], | ||
| "summary": "Generate Sessions from a Session Pool.", | ||
| "operationId": "ContainerAppsSessionPoolSessionsGeneration_ListGenerated", | ||
| "parameters": [ | ||
| { | ||
| "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" | ||
| }, | ||
| { | ||
| "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" | ||
| }, | ||
| { | ||
| "$ref": "#/parameters/SessionPoolNameParameter" | ||
| }, | ||
| { | ||
| "name": "generateSessionsEnvelope", | ||
| "in": "body", | ||
| "description": "Properties used to generate a session", | ||
| "required": true, | ||
| "schema": { | ||
| "$ref": "#/definitions/GenerateSessionsRequest" | ||
| } | ||
| }, | ||
| { | ||
| "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" | ||
| } | ||
| ], | ||
| "responses": { | ||
| "200": { | ||
|
||
| "description": "OK", | ||
| "schema": { | ||
| "$ref": "#/definitions/SessionCollection" | ||
| } | ||
| }, | ||
| "202": { | ||
| "description": "Generating SessionPool Sessions.", | ||
| "headers": { | ||
| "Location": { | ||
| "type": "string" | ||
| } | ||
| } | ||
| }, | ||
| "default": { | ||
| "description": "Error response.", | ||
| "schema": { | ||
| "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" | ||
| } | ||
| } | ||
| }, | ||
| "x-ms-long-running-operation": true, | ||
| "x-ms-long-running-operation-options": { | ||
| "final-state-via": "azure-async-operation" | ||
| }, | ||
| "x-ms-examples": { | ||
| "Generate Sessions": { | ||
| "$ref": "./examples/Sessions_GenerateSessions.json" | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/sessionPools/{sessionPoolName}/sessions/{name}": { | ||
|
||
| "get": { | ||
| "tags": [ | ||
| "ContainerAppsSessionPoolSessions" | ||
| ], | ||
| "summary": "Get the properties of a Session.", | ||
|
||
| "operationId": "ContainerAppsSessionPoolSessions_Get", | ||
| "parameters": [ | ||
| { | ||
| "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" | ||
| }, | ||
| { | ||
| "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" | ||
| }, | ||
| { | ||
| "$ref": "#/parameters/SessionPoolNameParameter" | ||
| }, | ||
| { | ||
| "name": "name", | ||
|
||
| "in": "path", | ||
| "description": "Name of the Session.", | ||
| "required": true, | ||
| "type": "string", | ||
| "minLength": 3, | ||
| "maxLength": 63 | ||
| }, | ||
|
||
| { | ||
| "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" | ||
| } | ||
| ], | ||
| "responses": { | ||
| "200": { | ||
| "description": "OK.", | ||
| "schema": { | ||
| "$ref": "#/definitions/Session" | ||
| } | ||
| }, | ||
| "default": { | ||
| "description": "Common error response.", | ||
| "schema": { | ||
| "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" | ||
| } | ||
| } | ||
| }, | ||
| "x-ms-examples": { | ||
| "Get Session": { | ||
| "$ref": "./examples/Sessions_Get.json" | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/sessionPools/{sessionPoolName}/sessions": { | ||
|
||
| "get": { | ||
| "tags": [ | ||
| "ContainerAppsSessionPoolSessions" | ||
| ], | ||
| "summary": "Get the Session Pools in a Session Pool.", | ||
| "operationId": "ContainerAppsSessionPoolSessions_ListBySessionPool", | ||
| "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/SessionCollection" | ||
| } | ||
| }, | ||
| "default": { | ||
| "description": "Error response.", | ||
| "schema": { | ||
| "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" | ||
| } | ||
| } | ||
| }, | ||
| "x-ms-examples": { | ||
| "List Sessions by Session Pool": { | ||
| "$ref": "./examples/Sessions_ListBySessionPool.json" | ||
| } | ||
| }, | ||
| "x-ms-pageable": { | ||
| "nextLinkName": "nextLink" | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "definitions": { | ||
| "SSHConfiguration": { | ||
| "description": "SSH configuration of the Session.", | ||
| "type": "object", | ||
| "properties": { | ||
| "username": { | ||
| "description": "The username.", | ||
| "type": "string" | ||
| }, | ||
| "password": { | ||
| "description": "The password.", | ||
| "type": "string" | ||
| }, | ||
| "authorizedPublicKey": { | ||
| "description": "The authorized public key.", | ||
| "type": "string" | ||
| } | ||
| } | ||
| }, | ||
| "CodeExecutionConfiguration": { | ||
| "description": "Code execution configuration of the Session.", | ||
| "type": "object", | ||
| "properties": { | ||
| "token": { | ||
| "description": "The token used for code execution.", | ||
| "type": "string" | ||
| }, | ||
| "environment": { | ||
| "description": "The environment used for code execution.", | ||
| "type": "string" | ||
| } | ||
| } | ||
| }, | ||
| "SessionTemplate": { | ||
| "description": "Session template.", | ||
| "type": "object", | ||
| "properties": { | ||
| "requestedDurationInSeconds": { | ||
| "description": "The requested duration of the Session in seconds.", | ||
| "type": "integer", | ||
| "format": "int32" | ||
| }, | ||
| "timeElapsedInSeconds": { | ||
| "description": "The time elapsed in seconds since the Session was created.", | ||
| "type": "integer", | ||
| "format": "int32", | ||
| "readOnly": true | ||
| }, | ||
| "expiredAt": { | ||
| "description": "The time when the Session will expire.", | ||
| "type": "string", | ||
| "format": "date-time", | ||
| "readOnly": true | ||
| }, | ||
| "generatedAt": { | ||
| "description": "The time when the Session was generated.", | ||
| "type": "string", | ||
| "format": "date-time", | ||
| "readOnly": true | ||
| }, | ||
|
||
| "sessionType": { | ||
| "description": "The type of the Session.", | ||
| "enum": [ | ||
| "SSH", | ||
| "CustomImage" | ||
| ], | ||
| "type": "string", | ||
| "x-ms-enum": { | ||
| "name": "ContainerType", | ||
| "modelAsString": true | ||
| } | ||
| }, | ||
| "status": { | ||
|
||
| "description": "The status of the Session.", | ||
| "enum": [ | ||
| "PodScheduled", | ||
| "PodReadyToStartContainers", | ||
| "ContainersReady", | ||
| "Initialized", | ||
| "Ready" | ||
| ], | ||
| "type": "string", | ||
| "x-ms-enum": { | ||
| "name": "SessionStatus", | ||
| "modelAsString": true | ||
| }, | ||
| "readOnly": true | ||
| }, | ||
| "sshConfiguration": { | ||
| "description": "SSH configuration of the Session.", | ||
| "$ref": "#/definitions/SSHConfiguration" | ||
| }, | ||
| "codeExecutionConfiguration": { | ||
| "description": "Code execution configuration of the Session.", | ||
| "$ref": "#/definitions/CodeExecutionConfiguration" | ||
| } | ||
| } | ||
| }, | ||
| "Session": { | ||
| "description": "Session resource.", | ||
| "type": "object", | ||
| "allOf": [ | ||
| { | ||
| "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ProxyResource" | ||
| } | ||
| ], | ||
| "properties": { | ||
| "properties": { | ||
| "description": "Session resource specific properties.", | ||
| "type": "object", | ||
| "properties": { | ||
| "name": { | ||
| "description": "The name of the Session.", | ||
|
||
| "type": "string" | ||
| }, | ||
| "endpoint": { | ||
| "description": "The endpoint of the Session.", | ||
| "type": "string" | ||
| }, | ||
| "sessionTemplate": { | ||
| "description": "The template of the session.", | ||
| "$ref": "#/definitions/SessionTemplate" | ||
| } | ||
| }, | ||
| "x-ms-client-flatten": true | ||
| } | ||
| } | ||
| }, | ||
| "GenerateSessionsRequest": { | ||
| "description": "Request body to generate sessions.", | ||
| "type": "object", | ||
| "allOf": [ | ||
| { | ||
| "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ProxyResource" | ||
| } | ||
| ], | ||
| "properties": { | ||
| "properties": { | ||
| "description": "Session resource specific properties.", | ||
| "type": "object", | ||
| "properties": { | ||
| "count": { | ||
| "description": "The number of Sessions to generate.", | ||
|
||
| "type": "integer", | ||
| "format": "int32", | ||
| "maximum": 1000, | ||
| "minimum": 1 | ||
| }, | ||
| "sessionTemplate": { | ||
| "description": "The template of the session.", | ||
| "$ref": "#/definitions/SessionTemplate" | ||
| } | ||
| }, | ||
| "x-ms-client-flatten": true | ||
| } | ||
| } | ||
| }, | ||
| "SessionCollection": { | ||
| "description": "Session collection ARM resource.", | ||
| "required": [ | ||
| "value" | ||
| ], | ||
| "type": "object", | ||
| "properties": { | ||
| "value": { | ||
| "description": "Collection of resources.", | ||
| "type": "array", | ||
| "items": { | ||
| "$ref": "#/definitions/Session" | ||
| } | ||
| }, | ||
| "nextLink": { | ||
| "description": "Link to next page of resources.", | ||
| "type": "string", | ||
| "readOnly": true | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
operationIdcan beContainerAppsSessionPoolSessionsGeneration_GenerateSessionswhich is same as operation name?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, changed to ContainerAppsSessionPoolSessionsGeneration_GenerateSessions