From 066b3ac82dacbcc2e5bb1091a501e1bd4903f14f Mon Sep 17 00:00:00 2001 From: Sanchit Mehta Date: Tue, 23 Nov 2021 17:58:31 -0800 Subject: [PATCH] Swagger Fixes for Container App, KubeEnvironments spec (#16793) * Pre-Prettier-commit * Adding missing file * Prettier fixes * Add missing definitions * Fix intendation in readme.md * add suppressions * Fix Kube Environments 2021-03-01 contract + add list secrets api to Container Apps Swagger * Fix sercret read property * Prettier fix * Model fix * Prettier Fix #2 Co-authored-by: Jenny Lawrance --- .../stable/2021-03-01/ContainerApps.json | 75 +++++++++++++++++++ .../stable/2021-03-01/KubeEnvironments.json | 31 ++++---- .../examples/ListContainerAppSecrets.json | 25 +++++++ 3 files changed, 113 insertions(+), 18 deletions(-) create mode 100644 specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/ListContainerAppSecrets.json diff --git a/specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/ContainerApps.json b/specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/ContainerApps.json index 7460e7952e86..afb9ba61ef4a 100644 --- a/specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/ContainerApps.json +++ b/specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/ContainerApps.json @@ -254,6 +254,49 @@ }, "x-ms-long-running-operation": true } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Web/containerApps/{name}/listSecrets": { + "post": { + "tags": [ + "ContainerApps" + ], + "summary": "List secrets for a container app", + "operationId": "ContainerApps_ListSecrets", + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "name": "name", + "in": "path", + "description": "Name of the Container App.", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/SecretsCollection" + } + }, + "default": { + "description": "App Service error response.", + "schema": { + "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" + } + } + }, + "x-ms-examples": { + "List Container Apps Secrets": { + "$ref": "./examples/ListContainerAppSecrets.json" + } + } + } } }, "definitions": { @@ -373,6 +416,22 @@ } } }, + "SecretsCollection": { + "description": "Container App Secrets Collection ARM resource.", + "required": [ + "value" + ], + "type": "object", + "properties": { + "value": { + "description": "Collection of resources.", + "type": "array", + "items": { + "$ref": "#/definitions/ContainerAppSecret" + } + } + } + }, "Ingress": { "description": "Container App Ingress configuration.", "type": "object", @@ -454,6 +513,22 @@ } } }, + "ContainerAppSecret": { + "description": "Container App Secret.", + "type": "object", + "properties": { + "name": { + "description": "Secret Name.", + "type": "string", + "readOnly": true + }, + "value": { + "description": "Secret Value.", + "type": "string", + "readOnly": true + } + } + }, "TrafficWeight": { "description": "Traffic weight assigned to a revision", "type": "object", diff --git a/specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/KubeEnvironments.json b/specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/KubeEnvironments.json index f47fc7617ed1..9c55a569edb7 100644 --- a/specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/KubeEnvironments.json +++ b/specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/KubeEnvironments.json @@ -339,42 +339,33 @@ "read" ] }, - "vnetConfiguration": { - "$ref": "#/definitions/VnetConfiguration" - } - } - }, - "VnetConfiguration": { - "type": "object", - "description": "Configuration properties for container apps environment to join a Virtual Network", - "properties": { - "platformServiceCidr": { + "platformReservedCidr": { "type": "string", - "description": "CIDR notation IP range from which to assign infrastructure service environment IPs. It must not overlap with any Subnet IP ranges.", + "description": "IP range in CIDR notation that can be reserved for environment infrastructure IP addresses. It must not overlap with any other Subnet IP ranges.", "x-ms-mutability": [ "create", "read" ] }, - "platformServiceDnsIp": { + "platformReservedDnsIP": { "type": "string", - "description": "IpAddress in platformService Cidr for internal service DNS server", + "description": "An IP address from the IP range defined by platformReservedCidr that will be reserved for the internal DNS server", "x-ms-mutability": [ "create", "read" ] }, - "infrastructureSubnetResourceId": { + "controlPlaneSubnetResourceId": { "type": "string", - "description": "Subnet Resource Id for Infrastructure components should be in the same VNET as 'InfrastructureSubnetResourceId'. Must not overlap with ServiceCidr", + "description": "Resource ID of a subnet for control plane infrastructure components. This subnet must be in the same VNET as the subnet defined in appSubnetResourceId. Must not overlap with the IP range defined in platformReservedCidr, if defined.", "x-ms-mutability": [ "create", "read" ] }, - "runtimeSubnetResourceName": { + "appSubnetResourceId": { "type": "string", - "description": " Subnet Resource Name to which the ContainerApp Containers are injected into, should be in the same VNET as 'InfrastructureSubnetResourceId'. Must not overlap with ServiceCidr", + "description": "Resource ID of a subnet for control plane infrastructure components. This subnet must be in the same VNET as the subnet defined in appSubnetResourceId. Must not overlap with the IP range defined in platformReservedCidr, if defined.", "x-ms-mutability": [ "create", "read" @@ -382,7 +373,7 @@ }, "dockerBridgeCidr": { "type": "string", - "description": "CIDR notation IP range assigned to the Docker bridge, network. It must not overlap with any Subnet IP ranges or the infrastructure service address range.", + "description": "CIDR notation IP range assigned to the Docker bridge network. It must not overlap with any Subnet IP ranges or the IP range defined in platformReservedCidr, if defined.", "x-ms-mutability": [ "create", "read" @@ -541,6 +532,10 @@ "$ref": "#/definitions/AppLogsConfiguration", "description": "Cluster configuration which enables the log daemon to export\napp logs to a destination. Currently only \"log-analytics\" is\nsupported" }, + "containerAppsConfiguration": { + "$ref": "#/definitions/ContainerAppsConfiguration", + "description": "Cluster configuration for Container Apps Environments to configure Dapr Instrumentation Key and VNET Configuration" + }, "aksResourceID": { "type": "string", "x-ms-mutability": [ diff --git a/specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/ListContainerAppSecrets.json b/specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/ListContainerAppSecrets.json new file mode 100644 index 000000000000..1755ad944566 --- /dev/null +++ b/specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/ListContainerAppSecrets.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "resourceGroupName": "rg", + "name": "testcontainerApp0", + "api-version": "2021-03-01" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "value": [ + { + "name": "secret1", + "value": "value1" + }, + { + "name": "secret2", + "value": "value2" + } + ] + } + } + } +}