From c013938019b053fddf5984c83444da5e2224fffc Mon Sep 17 00:00:00 2001 From: Ruslan Yakushev <1664475+ruslany@users.noreply.github.com> Date: Tue, 11 Oct 2022 20:07:34 -0700 Subject: [PATCH] Add AppState and LatestReadyRevisionName (#21034) * Add new props * add defaults --- .../stable/2022-10-01/ContainerApps.json | 28 +++++++++++++++++-- .../ContainerApps_CreateOrUpdate.json | 7 +++++ .../examples/ContainerApps_Get.json | 3 ++ .../ContainerApps_ListByResourceGroup.json | 3 ++ .../ContainerApps_ListBySubscription.json | 3 ++ .../examples/ContainerApps_Patch.json | 1 + .../ContainerApps_TcpApp_CreateOrUpdate.json | 6 ++++ 7 files changed, 48 insertions(+), 3 deletions(-) diff --git a/specification/app/resource-manager/Microsoft.App/stable/2022-10-01/ContainerApps.json b/specification/app/resource-manager/Microsoft.App/stable/2022-10-01/ContainerApps.json index eb51ebda9543..9d1269f9f26f 100644 --- a/specification/app/resource-manager/Microsoft.App/stable/2022-10-01/ContainerApps.json +++ b/specification/app/resource-manager/Microsoft.App/stable/2022-10-01/ContainerApps.json @@ -482,6 +482,7 @@ "Single" ], "type": "string", + "default": "Single", "x-ms-enum": { "name": "ActiveRevisionsMode", "modelAsString": true @@ -568,11 +569,28 @@ "$ref": "./CommonDefinitions.json#/definitions/WorkloadProfileType", "description": "Workload profile type to pin for container app execution." }, + "appState": { + "description": "Current state of the app. Controls if the app is enabled or disabled.", + "enum": [ + "Enabled", + "Disabled" + ], + "type": "string", + "x-ms-enum": { + "name": "AppState", + "modelAsString": true + } + }, "latestRevisionName": { "description": "Name of the latest revision of the Container App.", "type": "string", "readOnly": true }, + "latestReadyRevisionName": { + "description": "Name of the latest ready revision of the Container App.", + "type": "string", + "readOnly": true + }, "latestRevisionFqdn": { "description": "Fully Qualified Domain Name of the latest revision of the Container App.", "type": "string", @@ -636,7 +654,8 @@ "properties": { "enabled": { "description": "Boolean indicating if the Dapr side car is enabled", - "type": "boolean" + "type": "boolean", + "default": false }, "appId": { "description": "Dapr application identifier", @@ -649,6 +668,7 @@ "grpc" ], "type": "string", + "default": "http", "x-ms-enum": { "name": "appProtocol", "modelAsString": true @@ -725,7 +745,8 @@ "x-ms-enum": { "name": "IngressTransportMethod", "modelAsString": true - } + }, + "default": "auto" }, "traffic": { "description": "Traffic weights for app's revisions", @@ -749,7 +770,8 @@ }, "allowInsecure": { "description": "Bool indicating if HTTP connections to is allowed. If set to false HTTP connections are automatically redirected to HTTPS connections", - "type": "boolean" + "type": "boolean", + "default": false }, "ipSecurityRestrictions": { "description": "Rules to restrict incoming IP address.", diff --git a/specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ContainerApps_CreateOrUpdate.json b/specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ContainerApps_CreateOrUpdate.json index f3e88c7dfea9..6fefb87ed3b5 100644 --- a/specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ContainerApps_CreateOrUpdate.json +++ b/specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ContainerApps_CreateOrUpdate.json @@ -9,6 +9,7 @@ "properties": { "environmentId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube", "workloadProfileType": "GeneralPurpose", + "appState": "Enabled", "configuration": { "ingress": { "external": true, @@ -130,6 +131,9 @@ "provisioningState": "Succeeded", "managedEnvironmentId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube", "workloadProfileType": "GeneralPurpose", + "appState": "Enabled", + "latestRevisionName": "testcontainerApp0-pjxhsye", + "latestReadyRevisionName": "testcontainerApp0-pjxhsye", "latestRevisionFqdn": "testcontainerApp0-pjxhsye.demokube-t24clv0g.eastus.containerApps.k4apps.io", "configuration": { "ingress": { @@ -256,6 +260,9 @@ "properties": { "provisioningState": "InProgress", "managedEnvironmentId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube", + "appState": "Enabled", + "latestRevisionName": "testcontainerApp0-pjxhsye", + "latestReadyRevisionName": "testcontainerApp0-pjxhsye", "latestRevisionFqdn": "testcontainerApp0-pjxhsye.demokube-t24clv0g.eastus.containerApps.k4apps.io", "configuration": { "ingress": { diff --git a/specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ContainerApps_Get.json b/specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ContainerApps_Get.json index c92be59cd0c4..1e2a4ca45079 100644 --- a/specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ContainerApps_Get.json +++ b/specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ContainerApps_Get.json @@ -17,6 +17,9 @@ "provisioningState": "Succeeded", "managedEnvironmentId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube", "workloadProfileType": "GeneralPurpose", + "appState": "Enabled", + "latestRevisionName": "testcontainerApp0-pjxhsye", + "latestReadyRevisionName": "testcontainerApp0-pjxhsye", "latestRevisionFqdn": "testcontainerApp0-pjxhsye.demokube-t24clv0g.eastus.containerApps.k4apps.io", "configuration": { "ingress": { diff --git a/specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ContainerApps_ListByResourceGroup.json b/specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ContainerApps_ListByResourceGroup.json index de9e1b0129d7..831a45f52ac0 100644 --- a/specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ContainerApps_ListByResourceGroup.json +++ b/specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ContainerApps_ListByResourceGroup.json @@ -18,6 +18,9 @@ "provisioningState": "Succeeded", "managedEnvironmentId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube", "workloadProfileType": "GeneralPurpose", + "appState": "Enabled", + "latestRevisionName": "testcontainerApp0-pjxhsye", + "latestReadyRevisionName": "testcontainerApp0-pjxhsye", "latestRevisionFqdn": "testcontainerApp0-pjxhsye.demokube-t24clv0g.eastus.containerApps.k4apps.io", "configuration": { "ingress": { diff --git a/specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ContainerApps_ListBySubscription.json b/specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ContainerApps_ListBySubscription.json index 96c6ea48fb25..028362e71287 100644 --- a/specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ContainerApps_ListBySubscription.json +++ b/specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ContainerApps_ListBySubscription.json @@ -17,6 +17,9 @@ "provisioningState": "Succeeded", "managedEnvironmentId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube", "workloadProfileType": "GeneralPurpose", + "appState": "Enabled", + "latestRevisionName": "testcontainerApp0-pjxhsye", + "latestReadyRevisionName": "testcontainerApp0-pjxhsye", "latestRevisionFqdn": "testcontainerApp0-pjxhsye.demokube-t24clv0g.eastus.containerApps.k4apps.io", "configuration": { "ingress": { diff --git a/specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ContainerApps_Patch.json b/specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ContainerApps_Patch.json index 3baaea00cade..0e55844e31a8 100644 --- a/specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ContainerApps_Patch.json +++ b/specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ContainerApps_Patch.json @@ -11,6 +11,7 @@ "tag2": "value2" }, "properties": { + "appState": "Enabled", "configuration": { "ingress": { "external": true, diff --git a/specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ContainerApps_TcpApp_CreateOrUpdate.json b/specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ContainerApps_TcpApp_CreateOrUpdate.json index e2403003ed04..fe0b7d1a956a 100644 --- a/specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ContainerApps_TcpApp_CreateOrUpdate.json +++ b/specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ContainerApps_TcpApp_CreateOrUpdate.json @@ -68,6 +68,9 @@ "properties": { "provisioningState": "Succeeded", "managedEnvironmentId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube", + "appState": "Enabled", + "latestRevisionName": "testcontainerAppTcp-pjxhsye", + "latestReadyRevisionName": "testcontainerAppTcp-pjxhsye", "latestRevisionFqdn": "testcontainerAppTcp-pjxhsye.demokube-t24clv0g.eastus.containerApps.k4apps.io", "configuration": { "ingress": { @@ -137,6 +140,9 @@ "properties": { "provisioningState": "InProgress", "managedEnvironmentId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube", + "appState": "Enabled", + "latestRevisionName": "testcontainerAppTcp-pjxhsye", + "latestReadyRevisionName": "testcontainerAppTcp-pjxhsye", "latestRevisionFqdn": "testcontainerAppTcp-pjxhsye.demokube-t24clv0g.eastus.containerApps.k4apps.io", "configuration": { "ingress": {