From f1547c4dad4733c900c4088a30dadb4096eca4d5 Mon Sep 17 00:00:00 2001 From: Zunli Hu Date: Thu, 8 Dec 2022 14:51:36 +0800 Subject: [PATCH] Release app microsoft.app 2022 10 01 (#21683) * Adds base for updating Microsoft.App from version preview/2022-06-01-preview to version 2022-10-01 * Updates readme * Updates API version in new specs and examples * Add AppState and LatestReadyRevisionName (#21034) * Add new props * add defaults * Add swagger for client cert & CORS policy (#21126) * Fix password format of env domain for 2022-10-01 (#21463) * fix * fix * Remove AppState property as we decided to postpone it (#21483) * Remove AppState property as we decided to postpone it * Fix swagger issues * More swagger fixes * s360 swagger correctness fixes (#21472) Co-authored-by: Nan Jiang * Add kind for managed environment (#21589) * add * fix * fix (#21730) * fix (#21747) Co-authored-by: p-bouchon <107427816+p-bouchon@users.noreply.github.com> Co-authored-by: Ruslan Yakushev <1664475+ruslany@users.noreply.github.com> Co-authored-by: zhenqxuMSFT Co-authored-by: najian Co-authored-by: Nan Jiang --- .../stable/2022-10-01/CommonDefinitions.json | 6 +- .../stable/2022-10-01/ContainerApps.json | 6 + .../2022-10-01/ManagedEnvironments.json | 12 +- ...nvironmentsCertificate_CreateOrUpdate.json | 2 +- .../ConnectedEnvironments_CreateOrUpdate.json | 11 +- .../ConnectedEnvironments_Delete.json | 6 +- .../examples/ConnectedEnvironments_Get.json | 6 +- ...nectedEnvironments_ListBySubscription.json | 8 ++ .../examples/ContainerApps_Patch.json | 129 ++++++++++++++++++ .../ManagedEnvironments_CreateOrUpdate.json | 3 +- .../examples/ManagedEnvironments_Get.json | 1 + ...nagedEnvironments_ListByResourceGroup.json | 1 + ...anagedEnvironments_ListBySubscription.json | 1 + .../examples/ManagedEnvironments_Patch.json | 55 ++++++++ specification/app/resource-manager/readme.md | 28 +--- 15 files changed, 231 insertions(+), 44 deletions(-) diff --git a/specification/app/resource-manager/Microsoft.App/stable/2022-10-01/CommonDefinitions.json b/specification/app/resource-manager/Microsoft.App/stable/2022-10-01/CommonDefinitions.json index db5a9c92a5e0..8566e220ea6a 100644 --- a/specification/app/resource-manager/Microsoft.App/stable/2022-10-01/CommonDefinitions.json +++ b/specification/app/resource-manager/Microsoft.App/stable/2022-10-01/CommonDefinitions.json @@ -317,7 +317,6 @@ "x-ms-secret": true }, "certificatePassword": { - "format": "byte", "description": "Certificate password", "type": "string", "x-ms-secret": true @@ -687,7 +686,8 @@ }, "ignoreErrors": { "description": "Boolean describing if the component errors are ignores", - "type": "boolean" + "type": "boolean", + "default": false }, "initTimeout": { "description": "Initialization timeout", @@ -758,7 +758,7 @@ "description": "Collection of secrets used by a Dapr component", "type": "array", "items": { - "$ref": "./CommonDefinitions.json#/definitions/Secret" + "$ref": "./CommonDefinitions.json#/definitions/DaprSecret" }, "x-ms-identifiers": [ "name" 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 f00a37794b53..21bd9c1a2989 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 @@ -293,6 +293,12 @@ } ], "responses": { + "200": { + "description": "Ok", + "schema": { + "$ref": "#/definitions/ContainerApp" + } + }, "202": { "description": "Patch operation is in progress." }, diff --git a/specification/app/resource-manager/Microsoft.App/stable/2022-10-01/ManagedEnvironments.json b/specification/app/resource-manager/Microsoft.App/stable/2022-10-01/ManagedEnvironments.json index b884ef93a4ea..fc0b14f1533e 100644 --- a/specification/app/resource-manager/Microsoft.App/stable/2022-10-01/ManagedEnvironments.json +++ b/specification/app/resource-manager/Microsoft.App/stable/2022-10-01/ManagedEnvironments.json @@ -289,6 +289,12 @@ } ], "responses": { + "200": { + "description": "Ok", + "schema": { + "$ref": "#/definitions/ManagedEnvironment" + } + }, "202": { "description": "Patch operation is in progress." }, @@ -804,7 +810,7 @@ }, "runtimeSubnetId": { "type": "string", - "description": "This field is deprecated and not used. If you wish to provide your own subnet that Container App containers are injected into, then you should leverage the infrastructureSubnetId.", + "description": "Resource ID of a subnet that Container App containers are injected into. This subnet must be in the same VNET as the subnet defined in infrastructureSubnetId. Must not overlap with any other provided IP ranges.", "x-ms-mutability": [ "create", "read" @@ -849,6 +855,10 @@ } ], "properties": { + "kind": { + "type": "string", + "description": "Kind of the Environment." + }, "sku": { "$ref": "#/definitions/EnvironmentSkuProperties", "description": "SKU properties of the Environment." diff --git a/specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironmentsCertificate_CreateOrUpdate.json b/specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironmentsCertificate_CreateOrUpdate.json index 04db5c829ac2..fd40465ec152 100644 --- a/specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironmentsCertificate_CreateOrUpdate.json +++ b/specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironmentsCertificate_CreateOrUpdate.json @@ -9,7 +9,7 @@ "location": "East US", "properties": { "password": "private key password", - "value": "PFX-or-PEM-blob" + "value": "Y2VydA==" } } }, diff --git a/specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironments_CreateOrUpdate.json b/specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironments_CreateOrUpdate.json index 800f1b1113cc..7d9254e6e331 100644 --- a/specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironments_CreateOrUpdate.json +++ b/specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironments_CreateOrUpdate.json @@ -4,20 +4,19 @@ "resourceGroupName": "examplerg", "connectedEnvironmentName": "testenv", "api-version": "2022-10-01", - "kind": "kubernetes", "location": "East US", - "extendedLocation": { - "name": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.ExtendedLocation/customLocations/testcustomlocation", - "type": "CustomLocation" - }, "environmentEnvelope": { + "extendedLocation": { + "name": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.ExtendedLocation/customLocations/testcustomlocation", + "type": "CustomLocation" + }, "location": "East US", "properties": { "staticIp": "1.2.3.4", "daprAIConnectionString": "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://northcentralus-0.in.applicationinsights.azure.com/", "customDomainConfiguration": { "dnsSuffix": "www.my-name.com", - "certificateValue": "PFX-or-PEM-blob", + "certificateValue": "Y2VydA==", "certificatePassword": "private key password" } } diff --git a/specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironments_Delete.json b/specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironments_Delete.json index a98c801c06a2..62e57a52704b 100644 --- a/specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironments_Delete.json +++ b/specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironments_Delete.json @@ -13,7 +13,11 @@ }, "responses": { "200": {}, - "202": {}, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.App/localtions/eastus/operationResults/00000" + } + }, "204": {} } } diff --git a/specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironments_Get.json b/specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironments_Get.json index 72a807a4a8fc..97da2270b358 100644 --- a/specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironments_Get.json +++ b/specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironments_Get.json @@ -5,11 +5,7 @@ "connectedEnvironmentName": "examplekenv", "api-version": "2022-10-01", "kind": "kubernetes", - "location": "East US", - "extendedLocation": { - "name": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.ExtendedLocation/customLocations/testcustomlocation", - "type": "CustomLocation" - } + "location": "East US" }, "responses": { "200": { diff --git a/specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironments_ListBySubscription.json b/specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironments_ListBySubscription.json index 252db0fa6027..ad028f9d95df 100644 --- a/specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironments_ListBySubscription.json +++ b/specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironments_ListBySubscription.json @@ -12,6 +12,10 @@ "name": "sample1", "type": "Microsoft.App/connectedEnvironments", "location": "North Central US", + "extendedLocation": { + "name": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.ExtendedLocation/customLocations/testcustomlocation", + "type": "CustomLocation" + }, "tags": {}, "properties": { "provisioningState": "Succeeded", @@ -32,6 +36,10 @@ "name": "sample2", "type": "Microsoft.App/connectedEnvironments", "location": "North Central US", + "extendedLocation": { + "name": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.ExtendedLocation/customLocations/testcustomlocation", + "type": "CustomLocation" + }, "tags": {}, "properties": { "provisioningState": "Succeeded", 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..02f5384577e9 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 @@ -114,6 +114,135 @@ } }, "responses": { + "200": { + "headers": {}, + "body": { + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/containerApps/testcontainerApp0", + "name": "testcontainerApp0", + "type": "Microsoft.App/containerApps", + "location": "East US", + "properties": { + "provisioningState": "Succeeded", + "managedEnvironmentId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube", + "workloadProfileType": "GeneralPurpose", + "latestRevisionName": "testcontainerApp0-pjxhsye", + "latestReadyRevisionName": "testcontainerApp0-pjxhsye", + "latestRevisionFqdn": "testcontainerApp0-pjxhsye.demokube-t24clv0g.eastus.containerApps.k4apps.io", + "configuration": { + "ingress": { + "fqdn": "testcontainerApp0.demokube-t24clv0g.eastus.containerApps.k4apps.io", + "external": true, + "targetPort": 3000, + "transport": "auto", + "customDomains": [ + { + "name": "www.my-name.com", + "bindingType": "SniEnabled", + "certificateId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-name-dot-com" + }, + { + "name": "www.my-other-name.com", + "bindingType": "SniEnabled", + "certificateId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com" + } + ], + "traffic": [ + { + "weight": 80, + "revisionName": "testcontainerApp0-ab1234" + }, + { + "weight": 20, + "revisionName": "testcontainerApp0-ab4321", + "label": "staging" + } + ], + "ipSecurityRestrictions": [ + { + "name": "Allow work IP A subnet", + "description": "Allowing all IP's within the subnet below to access containerapp", + "ipAddressRange": "192.168.1.1/32", + "action": "Allow" + }, + { + "name": "Allow work IP B subnet", + "description": "Allowing all IP's within the subnet below to access containerapp", + "ipAddressRange": "192.168.1.1/8", + "action": "Allow" + } + ] + }, + "dapr": { + "enabled": true, + "appPort": 3000, + "appProtocol": "http", + "httpReadBufferSize": 30 + } + }, + "template": { + "containers": [ + { + "image": "repo/testcontainerApp0:v4", + "name": "testcontainerApp0", + "resources": { + "cpu": 0.2, + "memory": "100Mi" + }, + "probes": [ + { + "type": "Liveness", + "httpGet": { + "path": "/health", + "port": 8080, + "httpHeaders": [ + { + "name": "Custom-Header", + "value": "Awesome" + } + ] + }, + "initialDelaySeconds": 3, + "periodSeconds": 3 + } + ] + } + ], + "initContainers": [ + { + "image": "repo/testcontainerApp0:v4", + "name": "testinitcontainerApp0", + "resources": { + "cpu": 0.2, + "memory": "100Mi" + }, + "command": [ + "/bin/sh" + ], + "args": [ + "-c", + "while true; do echo hello; sleep 10;done" + ] + } + ], + "scale": { + "minReplicas": 1, + "maxReplicas": 5, + "rules": [ + { + "name": "httpscalingrule", + "http": { + "metadata": { + "concurrentRequests": "50" + } + } + } + ] + } + }, + "eventStreamEndpoint": "testEndpoint" + } + } + }, "202": { "headers": { "azure-asyncoperation": "https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.App/locations/eastus/containerappOperationResults/62e4d893-d233-4005-988e-a428d9f77076?api-version=2022-10-01" diff --git a/specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ManagedEnvironments_CreateOrUpdate.json b/specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ManagedEnvironments_CreateOrUpdate.json index a5c4e51f60d2..93418f7865a0 100644 --- a/specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ManagedEnvironments_CreateOrUpdate.json +++ b/specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ManagedEnvironments_CreateOrUpdate.json @@ -6,6 +6,7 @@ "api-version": "2022-10-01", "environmentEnvelope": { "location": "East US", + "kind": "serverless", "sku": { "name": "Premium" }, @@ -27,7 +28,7 @@ "customDomainConfiguration": { "dnsSuffix": "www.my-name.com", "certificateValue": "Y2VydA==", - "certificatePassword": "Y2VydA==" + "certificatePassword": "private key password" }, "workloadProfiles": [ { diff --git a/specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ManagedEnvironments_Get.json b/specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ManagedEnvironments_Get.json index bdd22827db4a..1bc512ad27d3 100644 --- a/specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ManagedEnvironments_Get.json +++ b/specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ManagedEnvironments_Get.json @@ -13,6 +13,7 @@ "type": "Microsoft.App/managedEnvironments", "location": "North Central US", "tags": {}, + "kind": "serverless", "sku": { "name": "Premium" }, diff --git a/specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ManagedEnvironments_ListByResourceGroup.json b/specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ManagedEnvironments_ListByResourceGroup.json index 12010d03ad34..925b03600d5f 100644 --- a/specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ManagedEnvironments_ListByResourceGroup.json +++ b/specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ManagedEnvironments_ListByResourceGroup.json @@ -14,6 +14,7 @@ "type": "Microsoft.App/managedEnvironments", "location": "North Central US", "tags": {}, + "kind": "serverless", "sku": { "name": "Premium" }, diff --git a/specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ManagedEnvironments_ListBySubscription.json b/specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ManagedEnvironments_ListBySubscription.json index d75713d86ea4..c617725a682d 100644 --- a/specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ManagedEnvironments_ListBySubscription.json +++ b/specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ManagedEnvironments_ListBySubscription.json @@ -13,6 +13,7 @@ "type": "Microsoft.App/managedEnvironments", "location": "North Central US", "tags": {}, + "kind": "serverless", "sku": { "name": "Premium" }, diff --git a/specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ManagedEnvironments_Patch.json b/specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ManagedEnvironments_Patch.json index 332e96cad6d7..45533b106382 100644 --- a/specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ManagedEnvironments_Patch.json +++ b/specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ManagedEnvironments_Patch.json @@ -13,6 +13,61 @@ } }, "responses": { + "200": { + "body": { + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/testcontainerenv", + "name": "testcontainerenv", + "type": "Microsoft.App/managedEnvironments", + "location": "East US", + "kind": "serverless", + "sku": { + "name": "Premium" + }, + "properties": { + "provisioningState": "Succeeded", + "deploymentErrors": null, + "defaultDomain": "testcontainerenv.k4apps.io", + "staticIp": "1.2.3.4", + "appLogsConfiguration": { + "logAnalyticsConfiguration": { + "customerId": "string" + } + }, + "zoneRedundant": true, + "vnetConfiguration": { + "outboundSettings": { + "outBoundType": "UserDefinedRouting", + "virtualNetworkApplianceIp": "192.168.1.20" + } + }, + "customDomainConfiguration": { + "customDomainVerificationId": "custom domain verification id", + "dnsSuffix": "www.my-name.com", + "subjectName": "CN=www.my-name.com", + "expirationDate": "2022-11-06T04:00:00Z", + "thumbprint": "CERTIFICATE_THUMBPRINT" + }, + "eventStreamEndpoint": "testEndpoint", + "workloadProfiles": [ + { + "workloadProfileType": "GeneralPurpose", + "minimumCount": 3, + "maximumCount": 12 + }, + { + "workloadProfileType": "MemoryOptimized", + "minimumCount": 3, + "maximumCount": 6 + }, + { + "workloadProfileType": "ComputeOptimized", + "minimumCount": 3, + "maximumCount": 6 + } + ] + } + } + }, "202": { "headers": { "azure-asyncoperation": "https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.App/locations/eastus/managedEnvironmentOperationResults/62e4d893-d233-4005-988e-a428d9f77076?api-version=2022-10-01" diff --git a/specification/app/resource-manager/readme.md b/specification/app/resource-manager/readme.md index 666cde81a250..4c1e542bcbf8 100644 --- a/specification/app/resource-manager/readme.md +++ b/specification/app/resource-manager/readme.md @@ -26,38 +26,15 @@ These are the global settings for the app. ``` yaml openapi-type: arm -tag: package-preview-2022-11 +tag: package-2022-10 ``` -### Tag: package-preview-2022-11 - -These settings apply only when `--tag=package-preview-2022-11` is specified on the command line. - -```yaml $(tag) == 'package-preview-2022-11' -input-file: - - Microsoft.App/preview/2022-11-01-preview/AuthConfigs.json - - Microsoft.App/preview/2022-11-01-preview/AvailableWorkloadProfiles.json - - Microsoft.App/preview/2022-11-01-preview/BillingMeters.json - - Microsoft.App/preview/2022-11-01-preview/CommonDefinitions.json - - Microsoft.App/preview/2022-11-01-preview/ConnectedEnvironments.json - - Microsoft.App/preview/2022-11-01-preview/ConnectedEnvironmentsCertificates.json - - Microsoft.App/preview/2022-11-01-preview/ConnectedEnvironmentsDaprComponents.json - - Microsoft.App/preview/2022-11-01-preview/ConnectedEnvironmentsStorages.json - - Microsoft.App/preview/2022-11-01-preview/ContainerApps.json - - Microsoft.App/preview/2022-11-01-preview/ContainerAppsRevisions.json - - Microsoft.App/preview/2022-11-01-preview/Diagnostics.json - - Microsoft.App/preview/2022-11-01-preview/Global.json - - Microsoft.App/preview/2022-11-01-preview/ManagedEnvironments.json - - Microsoft.App/preview/2022-11-01-preview/ManagedEnvironmentsDaprComponents.json - - Microsoft.App/preview/2022-11-01-preview/ManagedEnvironmentsStorages.json - - Microsoft.App/preview/2022-11-01-preview/SourceControls.json -``` ### Tag: package-2022-10 These settings apply only when `--tag=package-2022-10` is specified on the command line. -``` yaml $(tag) == 'package-2022-10' +```yaml $(tag) == 'package-2022-10' input-file: - Microsoft.App/stable/2022-10-01/AuthConfigs.json - Microsoft.App/stable/2022-10-01/AvailableWorkloadProfiles.json @@ -76,7 +53,6 @@ input-file: - Microsoft.App/stable/2022-10-01/ManagedEnvironmentsStorages.json - Microsoft.App/stable/2022-10-01/SourceControls.json ``` - ### Tag: package-preview-2022-06 These settings apply only when `--tag=package-preview-2022-06` is specified on the command line.