Skip to content
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

add replicas apis #17501

Merged
merged 1 commit into from
Jan 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,119 @@
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{revisionName}/replicas/{name}": {
"get": {
"tags": [
"ContainerAppsRevisionReplicas"
],
"summary": "Get a replica for a Container App Revision.",
"operationId": "ContainerAppsRevisionReplicas_GetReplica",
"parameters": [
{
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter"
},
{
"name": "containerAppName",
"in": "path",
"description": "Name of the Container App.",
"required": true,
"type": "string"
},
{
"name": "revisionName",
"in": "path",
"description": "Name of the Container App Revision.",
"required": true,
"type": "string"
},
{
"name": "name",
"in": "path",
"description": "Name of the Container App Revision Replica.",
"required": true,
"type": "string"
},
{
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/Replica"
}
},
"default": {
"description": "Common error response.",
"schema": {
"$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse"
}
}
},
"x-ms-examples": {
"Get Container App's revision replica": {
"$ref": "./examples/Replicas_Get.json"
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{revisionName}/replicas": {
"get": {
"tags": [
"ContainerAppsRevisionReplicas"
],
"summary": "List replicas for a Container App Revision.",
"operationId": "ContainerAppsRevisionReplicas_ListReplicas",
"parameters": [
{
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter"
},
{
"name": "containerAppName",
"in": "path",
"description": "Name of the Container App.",
"required": true,
"type": "string"
},
{
"name": "revisionName",
"in": "path",
"description": "Name of the Container App Revision.",
"required": true,
"type": "string"
},
{
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/ReplicaCollection"
}
},
"default": {
"description": "Common error response.",
"schema": {
"$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse"
}
}
},
"x-ms-examples": {
"List Container App's replicas": {
"$ref": "./examples/Replicas_List.json"
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{name}/restart": {
"post": {
"tags": [
Expand Down Expand Up @@ -375,6 +488,83 @@
"readOnly": true
}
}
},
"Replica": {
"description": "Container App Revision Replica.",
"type": "object",
"allOf": [
{
"$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ProxyResource"
}
],
"properties": {
"properties": {
"description": "Replica resource specific properties",
"type": "object",
"properties": {
"createdTime": {
"type": "string",
"description": "Timestamp describing when the pod was created by controller",
"format": "date-time",
"readOnly": true
},
"containers": {
"description": "The containers collection under a replica.",
"type": "array",
"items": {
"$ref": "#/definitions/ReplicaContainer"
},
"x-ms-identifiers": [
"name"
]
}
},
"x-ms-client-flatten": true
}
}
},
"ReplicaCollection": {
"description": "Container App Revision Replicas collection ARM resource.",
"required": [
"value"
],
"type": "object",
"properties": {
"value": {
"description": "Collection of resources.",
"type": "array",
"items": {
"$ref": "#/definitions/Replica"
}
}
}
},
"ReplicaContainer": {
"description": "Container object under Container App Revision Replica.",
"type": "object",
"properties": {
"name": {
"description": "The Name of the Container",
"type": "string"
},
"containerId": {
"description": "The Id of the Container",
"type": "string"
},
"ready": {
"description": "The container ready status",
"type": "boolean"
},
"started": {
"description": "The container start status",
"type": "boolean"
},
"restartCount": {
"format": "int32",
"description": "The container restart count",
"type": "integer"
}
}
}
},
"securityDefinitions": {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"parameters": {
"subscriptionId": "651f8027-33e8-4ec4-97b4-f6e9f3dc8744",
"resourceGroupName": "workerapps-rg-xj",
"containerAppName": "myapp",
"revisionName": "myapp--0wlqy09",
"name": "myapp--0wlqy09-5d9774cff-5wnd8",
"api-version": "2022-01-01-preview"
},
"responses": {
"200": {
"headers": {},
"body": {
"id": "/subscriptions/651f8027-33e8-4ec4-97b4-f6e9f3dc8744/resourceGroups/workerapps-rg-xj/providers/Microsoft.App/containerApps/myapp/revisions/myapp--0wlqy09/replicas/myapp--0wlqy09-5d9774cff-5wnd8",
"name": "myapp--0wlqy09-5d9774cff-5wnd8",
"type": "Microsoft.Web/containerapps/revisions/replicas",
"properties": {
"createdTime": "2022-01-25T19:42:45Z",
"containers": [
{
"name": "hello92",
"containerId": "containerd://6bac7bb3afed1c704b5fe563c34c0ecf59ac30c766bb73488f7fa552dc42ee54",
"ready": true,
"started": true,
"restartCount": 0
}
]
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"parameters": {
"subscriptionId": "651f8027-33e8-4ec4-97b4-f6e9f3dc8744",
"resourceGroupName": "workerapps-rg-xj",
"containerAppName": "myapp",
"revisionName": "myapp--0wlqy09",
"api-version": "2021-02-01"
},
"responses": {
"200": {
"headers": {},
"body": {
"value": [
{
"id": "/subscriptions/651f8027-33e8-4ec4-97b4-f6e9f3dc8744/resourceGroups/workerapps-rg-xj/providers/Microsoft.App/containerApps/myapp/revisions/myapp--0wlqy09/replicas/myapp--0wlqy09-5d9774cff-5wnd8",
"name": "myapp--0wlqy09-5d9774cff-5wnd8",
"type": "Microsoft.Web/containerapps/revisions/replicas",
"properties": {
"createdTime": "2022-01-25T19:42:45Z",
"containers": [
{
"name": "hello92",
"containerId": "containerd://6bac7bb3afed1c704b5fe563c34c0ecf59ac30c766bb73488f7fa552dc42ee54",
"ready": true,
"started": true,
"restartCount": 0
}
]
}
}
]
}
}
}
}