From 1e6f394496e09f5e298544cd11be59a987dcdeda Mon Sep 17 00:00:00 2001 From: Allan Zhang Date: Mon, 14 Dec 2020 18:40:30 -0800 Subject: [PATCH 01/25] Swagger changes for MaintenanceConfiguration --- ...aintenanceConfigurationsCreate_Update.json | 62 +++ .../MaintenanceConfigurationsDelete.json | 13 + .../MaintenanceConfigurationsGet.json | 42 +++ .../MaintenanceConfigurationsList.json | 37 ++ .../stable/2020-12-01/managedClusters.json | 355 ++++++++++++++++++ 5 files changed, 509 insertions(+) create mode 100644 specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/examples/MaintenanceConfigurationsCreate_Update.json create mode 100644 specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/examples/MaintenanceConfigurationsDelete.json create mode 100644 specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/examples/MaintenanceConfigurationsGet.json create mode 100644 specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/examples/MaintenanceConfigurationsList.json diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/examples/MaintenanceConfigurationsCreate_Update.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/examples/MaintenanceConfigurationsCreate_Update.json new file mode 100644 index 000000000000..dea7ef0eb27a --- /dev/null +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/examples/MaintenanceConfigurationsCreate_Update.json @@ -0,0 +1,62 @@ +{ + "parameters": { + "api-version": "2020-12-01", + "subscriptionId": "subid1", + "resourceGroupName": "rg1", + "resourceName": "clustername1", + "configName": "default", + "parameters": { + "properties": { + "timeInWeek": [ + { + "day": "Monday", + "hourSlots": [ + 1, + 2 + ] + } + ], + "notAllowedTime": [ + { + "start": "2020-11-26T03:00:00Z", + "end": "2020-11-30T12:00:00Z" + } + ] + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/maintenanceConfigurations/default", + "type": "Microsoft.ContainerService/managedClusters/maintenanceConfigurations", + "name": "default", + "systemData": { + "createdBy": "user1", + "createdByType": "user", + "createdAt": "2020-01-01T17:18:19.1234567Z", + "lastModifiedBy": "user2", + "lastModifiedByType": "user", + "lastModifiedAt": "2020-01-02T17:18:19.1234567Z" + }, + "properties": { + "timeInWeek": [ + { + "day": "Monday", + "hourSlots": [ + 1, + 2 + ] + } + ], + "notAllowedTime": [ + { + "start": "2020-11-26T03:00:00Z", + "end": "2020-11-30T12:00:00Z" + } + ] + } + } + } + } +} diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/examples/MaintenanceConfigurationsDelete.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/examples/MaintenanceConfigurationsDelete.json new file mode 100644 index 000000000000..ddc43009e011 --- /dev/null +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/examples/MaintenanceConfigurationsDelete.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "api-version": "2020-12-01", + "subscriptionId": "subid1", + "resourceGroupName": "rg1", + "resourceName": "clustername1", + "configName": "default" + }, + "responses": { + "200": {}, + "204": {} + } +} diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/examples/MaintenanceConfigurationsGet.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/examples/MaintenanceConfigurationsGet.json new file mode 100644 index 000000000000..42a8ef09334a --- /dev/null +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/examples/MaintenanceConfigurationsGet.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "api-version": "2020-12-01", + "subscriptionId": "subid1", + "resourceGroupName": "rg1", + "resourceName": "clustername1", + "configName": "default" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/maintenanceConfigurations/default", + "name": "default", + "systemData": { + "createdBy": "user1", + "createdByType": "user", + "createdAt": "2020-01-01T17:18:19.1234567Z", + "lastModifiedBy": "user2", + "lastModifiedByType": "user", + "lastModifiedAt": "2020-01-02T17:18:19.1234567Z" + }, + "properties": { + "timeInWeek": [ + { + "day": "Monday", + "hourSlots": [ + 1, + 2 + ] + } + ], + "notAllowedTime": [ + { + "start": "2020-11-26T03:00:00Z", + "end": "2020-11-30T12:00:00Z" + } + ] + } + } + } + } +} diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/examples/MaintenanceConfigurationsList.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/examples/MaintenanceConfigurationsList.json new file mode 100644 index 000000000000..7e29391714cd --- /dev/null +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/examples/MaintenanceConfigurationsList.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "api-version": "2020-12-01", + "subscriptionId": "subid1", + "resourceGroupName": "rg1", + "resourceName": "clustername1" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/maintenanceConfigurations/default", + "name": "default", + "properties": { + "timeInWeek": [ + { + "day": "Monday", + "hourSlots": [ + 1, + 2 + ] + } + ], + "notAllowedTime": [ + { + "start": "2020-11-26T03:00:00Z", + "end": "2020-11-30T12:00:00Z" + } + ] + } + } + ] + } + } + } +} diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json index f3e4430b70dc..9b228b6a9ae7 100644 --- a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json @@ -884,6 +884,209 @@ } } }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations": { + "get": { + "tags": [ + "MaintenanceConfigurations" + ], + "operationId": "MaintenanceConfigurations_List", + "summary": "Gets a list of maintenance configurations in the specified managed cluster.", + "description": "Gets a list of maintenance configurations in the specified managed cluster. The operation returns properties of each agent pool.", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ResourceNameParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/MaintenanceConfigurationListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List maintenance configurations by Managed Cluster": { + "$ref": "./examples/MaintenanceConfigurationsList.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}": { + "get": { + "tags": [ + "MaintenanceConfigurations" + ], + "operationId": "MaintenanceConfigurations_Get", + "summary": "Gets the maintenance configuration.", + "description": "Gets the details of maintenance configurations by managed cluster and resource group.", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ResourceNameParameter" + }, + { + "name": "configName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the maintenance configuration." + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/MaintenanceConfiguration" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-examples": { + "Get Maintenance Configuration": { + "$ref": "./examples/MaintenanceConfigurationsGet.json" + } + } + }, + "put": { + "tags": [ + "MaintenanceConfigurations" + ], + "operationId": "MaintenanceConfigurations_CreateOrUpdate", + "summary": "Creates or updates a maintenance configurations.", + "description": "Creates or updates a maintenance configuration in the specified managed cluster.", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ResourceNameParameter" + }, + { + "name": "configName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the maintenance configuration." + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/MaintenanceConfiguration" + }, + "description": "Parameters supplied to the Create or Update a default maintenance configuration." + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/MaintenanceConfiguration" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-long-running-operation": false, + "x-ms-examples": { + "Create/Update Maintenance Configuration": { + "$ref": "./examples/MaintenanceConfigurationsCreate_Update.json" + } + } + }, + "delete": { + "tags": [ + "MaintenanceConfigurations" + ], + "operationId": "MaintenanceConfigurations_Delete", + "summary": "Deletes a maintenance configuration.", + "description": "Deletes the maintenance configuration in the specified managed cluster.", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ResourceNameParameter" + }, + { + "name": "configName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the maintenance configuration." + } + ], + "responses": { + "200": { + "description": "OK" + }, + "204": { + "description": "NoContent" + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-long-running-operation": false, + "x-ms-examples": { + "Delete Maintenance Configuration": { + "$ref": "./examples/MaintenanceConfigurationsDelete.json" + } + } + } + }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile": { "post": { "tags": [ @@ -2247,6 +2450,158 @@ }, "description": "Profile of network configuration." }, + "SystemData": { + "description": "Top level metadata https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/common-api-contracts.md#system-metadata-for-all-azure-resources", + "type": "object", + "properties": { + "createdBy": { + "description": "A string identifier for the identity that created the resource", + "type": "string", + "readOnly": true + }, + "createdByType": { + "description": "The type of identity that created the resource: user, application, managedIdentity, key", + "type": "string", + "readOnly": true + }, + "createdAt": { + "format": "date-time", + "description": "The timestamp of resource creation (UTC)", + "type": "string", + "readOnly": true + }, + "lastModifiedBy": { + "description": "A string identifier for the identity that last modified the resource", + "type": "string", + "readOnly": true + }, + "lastModifiedByType": { + "description": "The type of identity that last modified the resource: user, application, managedIdentity, key", + "type": "string", + "readOnly": true + }, + "lastModifiedAt": { + "format": "date-time", + "description": "The timestamp of resource last modification (UTC)", + "type": "string", + "readOnly": true + } + } + }, + "MaintenanceConfigurationListResult": { + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/MaintenanceConfiguration" + }, + "description": "The list of maintenance configurations." + }, + "nextLink": { + "type": "string", + "description": "The URL to get the next set of maintenance configuration results.", + "readOnly": true + } + }, + "description": "The response from the List maintenance configurations operation." + }, + "MaintenanceConfiguration": { + "allOf": [ + { + "$ref": "#/definitions/SubResource" + }, + { + "properties": { + "systemData": { + "description": "System data", + "$ref": "#/definitions/SystemData", + "title": "SystemData", + "readOnly": true + }, + "properties": { + "description": "Properties of a default maintenance configuration.", + "$ref": "#/definitions/MaintenanceConfigurationProperties", + "x-ms-client-flatten": true + } + } + } + ], + "description": "maintenance configuration." + }, + "MaintenanceConfigurationProperties": { + "properties": { + "timeInWeek": { + "type": "array", + "items": { + "$ref": "#/definitions/TimeInWeek" + }, + "description": "Weekday time slots allowed to upgrade." + }, + "notAllowedTime": { + "type": "array", + "items": { + "$ref": "#/definitions/TimeSpan" + }, + "description": "Time slots on which upgrade is not allowed." + } + }, + "description": "Default maintenance configuration properties." + }, + "TimeInWeek": { + "properties": { + "day": { + "$ref": "#/definitions/WeekDay", + "description": "A day in a week." + }, + "hourSlots": { + "type": "array", + "items": { + "$ref": "#/definitions/HourInDay" + }, + "description": "hour slots in a day." + } + }, + "description": "Time in a week." + }, + "WeekDay": { + "type": "string", + "enum": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "x-ms-enum": { + "name": "WeekDay", + "modelAsString": true + }, + "description": "The weekday enum." + }, + "HourInDay": { + "type": "integer", + "format": "int32", + "maximum": 23, + "minimum": 0, + "description": "Hour in a day." + }, + "TimeSpan": { + "properties": { + "start": { + "type": "string", + "format": "date-time", + "description": "The start of a time span" + }, + "end": { + "type": "string", + "format": "date-time", + "description": "The end of a time span" + } + }, + "description": "The time span with start and end properties." + }, "ManagedClusterLoadBalancerProfile": { "properties": { "managedOutboundIPs": { From b3601ce3eb998efef68c8067cf67c0b9225a69c7 Mon Sep 17 00:00:00 2001 From: Allan Zhang Date: Mon, 14 Dec 2020 21:22:46 -0800 Subject: [PATCH 02/25] fix systemdata error --- .../stable/2020-12-01/managedClusters.json | 43 +------------------ 1 file changed, 1 insertion(+), 42 deletions(-) diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json index 9b228b6a9ae7..8e9461c03e32 100644 --- a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json @@ -2450,44 +2450,6 @@ }, "description": "Profile of network configuration." }, - "SystemData": { - "description": "Top level metadata https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/common-api-contracts.md#system-metadata-for-all-azure-resources", - "type": "object", - "properties": { - "createdBy": { - "description": "A string identifier for the identity that created the resource", - "type": "string", - "readOnly": true - }, - "createdByType": { - "description": "The type of identity that created the resource: user, application, managedIdentity, key", - "type": "string", - "readOnly": true - }, - "createdAt": { - "format": "date-time", - "description": "The timestamp of resource creation (UTC)", - "type": "string", - "readOnly": true - }, - "lastModifiedBy": { - "description": "A string identifier for the identity that last modified the resource", - "type": "string", - "readOnly": true - }, - "lastModifiedByType": { - "description": "The type of identity that last modified the resource: user, application, managedIdentity, key", - "type": "string", - "readOnly": true - }, - "lastModifiedAt": { - "format": "date-time", - "description": "The timestamp of resource last modification (UTC)", - "type": "string", - "readOnly": true - } - } - }, "MaintenanceConfigurationListResult": { "properties": { "value": { @@ -2513,10 +2475,7 @@ { "properties": { "systemData": { - "description": "System data", - "$ref": "#/definitions/SystemData", - "title": "SystemData", - "readOnly": true + "$ref": "v2/types.json#/definitions/systemData" }, "properties": { "description": "Properties of a default maintenance configuration.", From f709c9989c8f6a00117b5cd689c8ccfd0c9117f6 Mon Sep 17 00:00:00 2001 From: Allan Zhang Date: Mon, 14 Dec 2020 21:48:17 -0800 Subject: [PATCH 03/25] fix systemdata path --- .../stable/2020-12-01/managedClusters.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json index 8e9461c03e32..9823fe3e25c8 100644 --- a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json @@ -2475,7 +2475,7 @@ { "properties": { "systemData": { - "$ref": "v2/types.json#/definitions/systemData" + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData" }, "properties": { "description": "Properties of a default maintenance configuration.", From 2a82c689720fe1e7e27b9d2d4a53fa2425e0d9cb Mon Sep 17 00:00:00 2001 From: Allan Zhang Date: Mon, 14 Dec 2020 22:29:10 -0800 Subject: [PATCH 04/25] fix lint error --- .../examples/MaintenanceConfigurationsCreate_Update.json | 4 ++-- .../2020-12-01/examples/MaintenanceConfigurationsGet.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/examples/MaintenanceConfigurationsCreate_Update.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/examples/MaintenanceConfigurationsCreate_Update.json index dea7ef0eb27a..b73501f3d792 100644 --- a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/examples/MaintenanceConfigurationsCreate_Update.json +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/examples/MaintenanceConfigurationsCreate_Update.json @@ -33,10 +33,10 @@ "name": "default", "systemData": { "createdBy": "user1", - "createdByType": "user", + "createdByType": "User", "createdAt": "2020-01-01T17:18:19.1234567Z", "lastModifiedBy": "user2", - "lastModifiedByType": "user", + "lastModifiedByType": "User", "lastModifiedAt": "2020-01-02T17:18:19.1234567Z" }, "properties": { diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/examples/MaintenanceConfigurationsGet.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/examples/MaintenanceConfigurationsGet.json index 42a8ef09334a..fa834263f69d 100644 --- a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/examples/MaintenanceConfigurationsGet.json +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/examples/MaintenanceConfigurationsGet.json @@ -13,10 +13,10 @@ "name": "default", "systemData": { "createdBy": "user1", - "createdByType": "user", + "createdByType": "User", "createdAt": "2020-01-01T17:18:19.1234567Z", "lastModifiedBy": "user2", - "lastModifiedByType": "user", + "lastModifiedByType": "User", "lastModifiedAt": "2020-01-02T17:18:19.1234567Z" }, "properties": { From 12d779a2ab78be32e8a61053cc900ffeab4104ed Mon Sep 17 00:00:00 2001 From: Allan Zhang Date: Mon, 14 Dec 2020 22:51:38 -0800 Subject: [PATCH 05/25] fix systemdata error --- .../MaintenanceConfigurationsCreate_Update.json | 16 ++++++++-------- .../examples/MaintenanceConfigurationsGet.json | 16 ++++++++-------- .../stable/2020-12-01/managedClusters.json | 6 +++--- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/examples/MaintenanceConfigurationsCreate_Update.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/examples/MaintenanceConfigurationsCreate_Update.json index b73501f3d792..6675ed5d0301 100644 --- a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/examples/MaintenanceConfigurationsCreate_Update.json +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/examples/MaintenanceConfigurationsCreate_Update.json @@ -31,15 +31,15 @@ "id": "/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/maintenanceConfigurations/default", "type": "Microsoft.ContainerService/managedClusters/maintenanceConfigurations", "name": "default", - "systemData": { - "createdBy": "user1", - "createdByType": "User", - "createdAt": "2020-01-01T17:18:19.1234567Z", - "lastModifiedBy": "user2", - "lastModifiedByType": "User", - "lastModifiedAt": "2020-01-02T17:18:19.1234567Z" - }, "properties": { + "systemData": { + "createdBy": "user1", + "createdByType": "User", + "createdAt": "2020-01-01T17:18:19.1234567Z", + "lastModifiedBy": "user2", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-01-02T17:18:19.1234567Z" + }, "timeInWeek": [ { "day": "Monday", diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/examples/MaintenanceConfigurationsGet.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/examples/MaintenanceConfigurationsGet.json index fa834263f69d..2e44c0149047 100644 --- a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/examples/MaintenanceConfigurationsGet.json +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/examples/MaintenanceConfigurationsGet.json @@ -11,15 +11,15 @@ "body": { "id": "/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/maintenanceConfigurations/default", "name": "default", - "systemData": { - "createdBy": "user1", - "createdByType": "User", - "createdAt": "2020-01-01T17:18:19.1234567Z", - "lastModifiedBy": "user2", - "lastModifiedByType": "User", - "lastModifiedAt": "2020-01-02T17:18:19.1234567Z" - }, "properties": { + "systemData": { + "createdBy": "user1", + "createdByType": "User", + "createdAt": "2020-01-01T17:18:19.1234567Z", + "lastModifiedBy": "user2", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-01-02T17:18:19.1234567Z" + }, "timeInWeek": [ { "day": "Monday", diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json index 9823fe3e25c8..d1f6a7fba9fe 100644 --- a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json @@ -2474,9 +2474,6 @@ }, { "properties": { - "systemData": { - "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData" - }, "properties": { "description": "Properties of a default maintenance configuration.", "$ref": "#/definitions/MaintenanceConfigurationProperties", @@ -2489,6 +2486,9 @@ }, "MaintenanceConfigurationProperties": { "properties": { + "systemData": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData" + }, "timeInWeek": { "type": "array", "items": { From ca5ec2ad5fabb5f39bf0063e28b82d7a29d7555a Mon Sep 17 00:00:00 2001 From: Allan Zhang Date: Tue, 15 Dec 2020 10:47:32 -0800 Subject: [PATCH 06/25] fix swagger lint error --- ...aintenanceConfigurationsCreate_Update.json | 16 +-- .../MaintenanceConfigurationsGet.json | 16 +-- .../stable/2020-12-01/managedClusters.json | 115 ++++++++++++++++-- 3 files changed, 123 insertions(+), 24 deletions(-) diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/examples/MaintenanceConfigurationsCreate_Update.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/examples/MaintenanceConfigurationsCreate_Update.json index 6675ed5d0301..b73501f3d792 100644 --- a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/examples/MaintenanceConfigurationsCreate_Update.json +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/examples/MaintenanceConfigurationsCreate_Update.json @@ -31,15 +31,15 @@ "id": "/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/maintenanceConfigurations/default", "type": "Microsoft.ContainerService/managedClusters/maintenanceConfigurations", "name": "default", + "systemData": { + "createdBy": "user1", + "createdByType": "User", + "createdAt": "2020-01-01T17:18:19.1234567Z", + "lastModifiedBy": "user2", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-01-02T17:18:19.1234567Z" + }, "properties": { - "systemData": { - "createdBy": "user1", - "createdByType": "User", - "createdAt": "2020-01-01T17:18:19.1234567Z", - "lastModifiedBy": "user2", - "lastModifiedByType": "User", - "lastModifiedAt": "2020-01-02T17:18:19.1234567Z" - }, "timeInWeek": [ { "day": "Monday", diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/examples/MaintenanceConfigurationsGet.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/examples/MaintenanceConfigurationsGet.json index 2e44c0149047..fa834263f69d 100644 --- a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/examples/MaintenanceConfigurationsGet.json +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/examples/MaintenanceConfigurationsGet.json @@ -11,15 +11,15 @@ "body": { "id": "/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/maintenanceConfigurations/default", "name": "default", + "systemData": { + "createdBy": "user1", + "createdByType": "User", + "createdAt": "2020-01-01T17:18:19.1234567Z", + "lastModifiedBy": "user2", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-01-02T17:18:19.1234567Z" + }, "properties": { - "systemData": { - "createdBy": "user1", - "createdByType": "User", - "createdAt": "2020-01-01T17:18:19.1234567Z", - "lastModifiedBy": "user2", - "lastModifiedByType": "User", - "lastModifiedAt": "2020-01-02T17:18:19.1234567Z" - }, "timeInWeek": [ { "day": "Monday", diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json index d1f6a7fba9fe..72f8eed55caf 100644 --- a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json @@ -910,7 +910,38 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/MaintenanceConfigurationListResult" + "properties": { + "value": { + "type": "array", + "items": { + "allOf": [ + { + "$ref": "#/definitions/SubResource" + }, + { + "properties": { + "systemData": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData" + }, + "properties": { + "description": "Properties of a default maintenance configuration.", + "$ref": "#/definitions/MaintenanceConfigurationProperties", + "x-ms-client-flatten": true + } + } + } + ], + "description": "maintenance configuration." + }, + "description": "The list of maintenance configurations." + }, + "nextLink": { + "type": "string", + "description": "The URL to get the next set of maintenance configuration results.", + "readOnly": true + } + }, + "description": "The response from the List maintenance configurations operation." } }, "default": { @@ -963,7 +994,24 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/MaintenanceConfiguration" + "allOf": [ + { + "$ref": "#/definitions/SubResource" + }, + { + "properties": { + "systemData": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData" + }, + "properties": { + "description": "Properties of a default maintenance configuration.", + "$ref": "#/definitions/MaintenanceConfigurationProperties", + "x-ms-client-flatten": true + } + } + } + ], + "description": "maintenance configuration." } }, "default": { @@ -1011,7 +1059,24 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/MaintenanceConfiguration" + "allOf": [ + { + "$ref": "#/definitions/SubResource" + }, + { + "properties": { + "systemData": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData" + }, + "properties": { + "description": "Properties of a default maintenance configuration.", + "$ref": "#/definitions/MaintenanceConfigurationProperties", + "x-ms-client-flatten": true + } + } + } + ], + "description": "maintenance configuration." }, "description": "Parameters supplied to the Create or Update a default maintenance configuration." } @@ -1020,7 +1085,24 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/MaintenanceConfiguration" + "allOf": [ + { + "$ref": "#/definitions/SubResource" + }, + { + "properties": { + "systemData": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData" + }, + "properties": { + "description": "Properties of a default maintenance configuration.", + "$ref": "#/definitions/MaintenanceConfigurationProperties", + "x-ms-client-flatten": true + } + } + } + ], + "description": "maintenance configuration." } }, "default": { @@ -2455,7 +2537,24 @@ "value": { "type": "array", "items": { - "$ref": "#/definitions/MaintenanceConfiguration" + "allOf": [ + { + "$ref": "#/definitions/SubResource" + }, + { + "properties": { + "systemData": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData" + }, + "properties": { + "description": "Properties of a default maintenance configuration.", + "$ref": "#/definitions/MaintenanceConfigurationProperties", + "x-ms-client-flatten": true + } + } + } + ], + "description": "maintenance configuration." }, "description": "The list of maintenance configurations." }, @@ -2474,6 +2573,9 @@ }, { "properties": { + "systemData": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData" + }, "properties": { "description": "Properties of a default maintenance configuration.", "$ref": "#/definitions/MaintenanceConfigurationProperties", @@ -2486,9 +2588,6 @@ }, "MaintenanceConfigurationProperties": { "properties": { - "systemData": { - "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData" - }, "timeInWeek": { "type": "array", "items": { From c3ccf9dc78bfbeb0bf0e8fee2bd9d2099205f3f0 Mon Sep 17 00:00:00 2001 From: Allan Zhang Date: Tue, 15 Dec 2020 10:51:13 -0800 Subject: [PATCH 07/25] fix swagger errors --- .../stable/2020-12-01/managedClusters.json | 63 +++++++++++++++++-- 1 file changed, 58 insertions(+), 5 deletions(-) diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json index 72f8eed55caf..6e050fcf51ed 100644 --- a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json @@ -921,7 +921,7 @@ { "properties": { "systemData": { - "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData" + "$ref": "#/definitions/SystemData" }, "properties": { "description": "Properties of a default maintenance configuration.", @@ -1001,7 +1001,7 @@ { "properties": { "systemData": { - "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData" + "$ref": "#/definitions/SystemData" }, "properties": { "description": "Properties of a default maintenance configuration.", @@ -1066,7 +1066,7 @@ { "properties": { "systemData": { - "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData" + "$ref": "#/definitions/SystemData" }, "properties": { "description": "Properties of a default maintenance configuration.", @@ -2544,7 +2544,7 @@ { "properties": { "systemData": { - "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData" + "$ref": "#/definitions/SystemData" }, "properties": { "description": "Properties of a default maintenance configuration.", @@ -2574,7 +2574,7 @@ { "properties": { "systemData": { - "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData" + "$ref": "#/definitions/SystemData" }, "properties": { "description": "Properties of a default maintenance configuration.", @@ -2660,6 +2660,59 @@ }, "description": "The time span with start and end properties." }, + "SystemData": { + "description": "Metadata pertaining to creation and last modification of the resource.", + "type": "object", + "readOnly": true, + "properties": { + "createdBy": { + "type": "string", + "description": "The identity that created the resource." + }, + "createdByType": { + "type": "string", + "description": "The type of identity that created the resource.", + "enum": [ + "User", + "Application", + "ManagedIdentity", + "Key" + ], + "x-ms-enum": { + "name": "createdByType", + "modelAsString": true + } + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "The timestamp of resource creation (UTC)." + }, + "lastModifiedBy": { + "type": "string", + "description": "The identity that last modified the resource." + }, + "lastModifiedByType": { + "type": "string", + "description": "The type of identity that last modified the resource.", + "enum": [ + "User", + "Application", + "ManagedIdentity", + "Key" + ], + "x-ms-enum": { + "name": "createdByType", + "modelAsString": true + } + }, + "lastModifiedAt": { + "type": "string", + "format": "date-time", + "description": "The type of identity that last modified the resource." + } + } + }, "ManagedClusterLoadBalancerProfile": { "properties": { "managedOutboundIPs": { From 64177f44182984fce11de1e7bc71489c85b159b3 Mon Sep 17 00:00:00 2001 From: Allan Zhang Date: Tue, 15 Dec 2020 11:08:11 -0800 Subject: [PATCH 08/25] use referenced schema --- .../stable/2020-12-01/managedClusters.json | 164 +----------------- 1 file changed, 6 insertions(+), 158 deletions(-) diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json index 6e050fcf51ed..9823fe3e25c8 100644 --- a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json @@ -910,38 +910,7 @@ "200": { "description": "OK", "schema": { - "properties": { - "value": { - "type": "array", - "items": { - "allOf": [ - { - "$ref": "#/definitions/SubResource" - }, - { - "properties": { - "systemData": { - "$ref": "#/definitions/SystemData" - }, - "properties": { - "description": "Properties of a default maintenance configuration.", - "$ref": "#/definitions/MaintenanceConfigurationProperties", - "x-ms-client-flatten": true - } - } - } - ], - "description": "maintenance configuration." - }, - "description": "The list of maintenance configurations." - }, - "nextLink": { - "type": "string", - "description": "The URL to get the next set of maintenance configuration results.", - "readOnly": true - } - }, - "description": "The response from the List maintenance configurations operation." + "$ref": "#/definitions/MaintenanceConfigurationListResult" } }, "default": { @@ -994,24 +963,7 @@ "200": { "description": "OK", "schema": { - "allOf": [ - { - "$ref": "#/definitions/SubResource" - }, - { - "properties": { - "systemData": { - "$ref": "#/definitions/SystemData" - }, - "properties": { - "description": "Properties of a default maintenance configuration.", - "$ref": "#/definitions/MaintenanceConfigurationProperties", - "x-ms-client-flatten": true - } - } - } - ], - "description": "maintenance configuration." + "$ref": "#/definitions/MaintenanceConfiguration" } }, "default": { @@ -1059,24 +1011,7 @@ "in": "body", "required": true, "schema": { - "allOf": [ - { - "$ref": "#/definitions/SubResource" - }, - { - "properties": { - "systemData": { - "$ref": "#/definitions/SystemData" - }, - "properties": { - "description": "Properties of a default maintenance configuration.", - "$ref": "#/definitions/MaintenanceConfigurationProperties", - "x-ms-client-flatten": true - } - } - } - ], - "description": "maintenance configuration." + "$ref": "#/definitions/MaintenanceConfiguration" }, "description": "Parameters supplied to the Create or Update a default maintenance configuration." } @@ -1085,24 +1020,7 @@ "200": { "description": "OK", "schema": { - "allOf": [ - { - "$ref": "#/definitions/SubResource" - }, - { - "properties": { - "systemData": { - "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData" - }, - "properties": { - "description": "Properties of a default maintenance configuration.", - "$ref": "#/definitions/MaintenanceConfigurationProperties", - "x-ms-client-flatten": true - } - } - } - ], - "description": "maintenance configuration." + "$ref": "#/definitions/MaintenanceConfiguration" } }, "default": { @@ -2537,24 +2455,7 @@ "value": { "type": "array", "items": { - "allOf": [ - { - "$ref": "#/definitions/SubResource" - }, - { - "properties": { - "systemData": { - "$ref": "#/definitions/SystemData" - }, - "properties": { - "description": "Properties of a default maintenance configuration.", - "$ref": "#/definitions/MaintenanceConfigurationProperties", - "x-ms-client-flatten": true - } - } - } - ], - "description": "maintenance configuration." + "$ref": "#/definitions/MaintenanceConfiguration" }, "description": "The list of maintenance configurations." }, @@ -2574,7 +2475,7 @@ { "properties": { "systemData": { - "$ref": "#/definitions/SystemData" + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData" }, "properties": { "description": "Properties of a default maintenance configuration.", @@ -2660,59 +2561,6 @@ }, "description": "The time span with start and end properties." }, - "SystemData": { - "description": "Metadata pertaining to creation and last modification of the resource.", - "type": "object", - "readOnly": true, - "properties": { - "createdBy": { - "type": "string", - "description": "The identity that created the resource." - }, - "createdByType": { - "type": "string", - "description": "The type of identity that created the resource.", - "enum": [ - "User", - "Application", - "ManagedIdentity", - "Key" - ], - "x-ms-enum": { - "name": "createdByType", - "modelAsString": true - } - }, - "createdAt": { - "type": "string", - "format": "date-time", - "description": "The timestamp of resource creation (UTC)." - }, - "lastModifiedBy": { - "type": "string", - "description": "The identity that last modified the resource." - }, - "lastModifiedByType": { - "type": "string", - "description": "The type of identity that last modified the resource.", - "enum": [ - "User", - "Application", - "ManagedIdentity", - "Key" - ], - "x-ms-enum": { - "name": "createdByType", - "modelAsString": true - } - }, - "lastModifiedAt": { - "type": "string", - "format": "date-time", - "description": "The type of identity that last modified the resource." - } - } - }, "ManagedClusterLoadBalancerProfile": { "properties": { "managedOutboundIPs": { From 3187e8c23dad77543fe5407c2af55226f1dd60c2 Mon Sep 17 00:00:00 2001 From: Allan Zhang Date: Tue, 15 Dec 2020 11:41:11 -0800 Subject: [PATCH 09/25] fix swagger error --- .../stable/2020-12-01/managedClusters.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json index 9823fe3e25c8..19eafda458e3 100644 --- a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json @@ -891,7 +891,7 @@ ], "operationId": "MaintenanceConfigurations_List", "summary": "Gets a list of maintenance configurations in the specified managed cluster.", - "description": "Gets a list of maintenance configurations in the specified managed cluster. The operation returns properties of each agent pool.", + "description": "Gets a list of maintenance configurations in the specified managed cluster. The operation returns properties of each maintenance configuration.", "parameters": [ { "$ref": "#/parameters/ApiVersionParameter" @@ -2475,7 +2475,9 @@ { "properties": { "systemData": { - "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData" + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData", + "readOnly": true, + "description": "The system meta data relating to this resource." }, "properties": { "description": "Properties of a default maintenance configuration.", From ab981c260b4acd995582e269202b47ad9414e505 Mon Sep 17 00:00:00 2001 From: Allan Zhang Date: Tue, 15 Dec 2020 12:01:09 -0800 Subject: [PATCH 10/25] test validation --- .../stable/2020-12-01/managedClusters.json | 203 ------------------ 1 file changed, 203 deletions(-) diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json index 19eafda458e3..6a4773b43325 100644 --- a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json @@ -884,209 +884,6 @@ } } }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations": { - "get": { - "tags": [ - "MaintenanceConfigurations" - ], - "operationId": "MaintenanceConfigurations_List", - "summary": "Gets a list of maintenance configurations in the specified managed cluster.", - "description": "Gets a list of maintenance configurations in the specified managed cluster. The operation returns properties of each maintenance configuration.", - "parameters": [ - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/ResourceGroupNameParameter" - }, - { - "$ref": "#/parameters/ResourceNameParameter" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/MaintenanceConfigurationListResult" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/CloudError" - } - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - }, - "x-ms-examples": { - "List maintenance configurations by Managed Cluster": { - "$ref": "./examples/MaintenanceConfigurationsList.json" - } - } - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}": { - "get": { - "tags": [ - "MaintenanceConfigurations" - ], - "operationId": "MaintenanceConfigurations_Get", - "summary": "Gets the maintenance configuration.", - "description": "Gets the details of maintenance configurations by managed cluster and resource group.", - "parameters": [ - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/ResourceGroupNameParameter" - }, - { - "$ref": "#/parameters/ResourceNameParameter" - }, - { - "name": "configName", - "in": "path", - "required": true, - "type": "string", - "description": "The name of the maintenance configuration." - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/MaintenanceConfiguration" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/CloudError" - } - } - }, - "x-ms-examples": { - "Get Maintenance Configuration": { - "$ref": "./examples/MaintenanceConfigurationsGet.json" - } - } - }, - "put": { - "tags": [ - "MaintenanceConfigurations" - ], - "operationId": "MaintenanceConfigurations_CreateOrUpdate", - "summary": "Creates or updates a maintenance configurations.", - "description": "Creates or updates a maintenance configuration in the specified managed cluster.", - "parameters": [ - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/ResourceGroupNameParameter" - }, - { - "$ref": "#/parameters/ResourceNameParameter" - }, - { - "name": "configName", - "in": "path", - "required": true, - "type": "string", - "description": "The name of the maintenance configuration." - }, - { - "name": "parameters", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/MaintenanceConfiguration" - }, - "description": "Parameters supplied to the Create or Update a default maintenance configuration." - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/MaintenanceConfiguration" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/CloudError" - } - } - }, - "x-ms-long-running-operation": false, - "x-ms-examples": { - "Create/Update Maintenance Configuration": { - "$ref": "./examples/MaintenanceConfigurationsCreate_Update.json" - } - } - }, - "delete": { - "tags": [ - "MaintenanceConfigurations" - ], - "operationId": "MaintenanceConfigurations_Delete", - "summary": "Deletes a maintenance configuration.", - "description": "Deletes the maintenance configuration in the specified managed cluster.", - "parameters": [ - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/ResourceGroupNameParameter" - }, - { - "$ref": "#/parameters/ResourceNameParameter" - }, - { - "name": "configName", - "in": "path", - "required": true, - "type": "string", - "description": "The name of the maintenance configuration." - } - ], - "responses": { - "200": { - "description": "OK" - }, - "204": { - "description": "NoContent" - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/CloudError" - } - } - }, - "x-ms-long-running-operation": false, - "x-ms-examples": { - "Delete Maintenance Configuration": { - "$ref": "./examples/MaintenanceConfigurationsDelete.json" - } - } - } - }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile": { "post": { "tags": [ From fe01c75303ea1f94cfe416f16f454dc6b2e75e01 Mon Sep 17 00:00:00 2001 From: Allan Zhang Date: Tue, 15 Dec 2020 12:05:00 -0800 Subject: [PATCH 11/25] fix swagger error --- .../stable/2020-12-01/managedClusters.json | 58 ------------------- 1 file changed, 58 deletions(-) diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json index 6a4773b43325..4a2d8d2279e4 100644 --- a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json @@ -2247,64 +2247,6 @@ }, "description": "Profile of network configuration." }, - "MaintenanceConfigurationListResult": { - "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/definitions/MaintenanceConfiguration" - }, - "description": "The list of maintenance configurations." - }, - "nextLink": { - "type": "string", - "description": "The URL to get the next set of maintenance configuration results.", - "readOnly": true - } - }, - "description": "The response from the List maintenance configurations operation." - }, - "MaintenanceConfiguration": { - "allOf": [ - { - "$ref": "#/definitions/SubResource" - }, - { - "properties": { - "systemData": { - "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData", - "readOnly": true, - "description": "The system meta data relating to this resource." - }, - "properties": { - "description": "Properties of a default maintenance configuration.", - "$ref": "#/definitions/MaintenanceConfigurationProperties", - "x-ms-client-flatten": true - } - } - } - ], - "description": "maintenance configuration." - }, - "MaintenanceConfigurationProperties": { - "properties": { - "timeInWeek": { - "type": "array", - "items": { - "$ref": "#/definitions/TimeInWeek" - }, - "description": "Weekday time slots allowed to upgrade." - }, - "notAllowedTime": { - "type": "array", - "items": { - "$ref": "#/definitions/TimeSpan" - }, - "description": "Time slots on which upgrade is not allowed." - } - }, - "description": "Default maintenance configuration properties." - }, "TimeInWeek": { "properties": { "day": { From e9ba5c319d2830b3cbd1fd0d6db00cdd0a0abcfd Mon Sep 17 00:00:00 2001 From: Allan Zhang Date: Tue, 15 Dec 2020 12:10:30 -0800 Subject: [PATCH 12/25] test validation --- .../stable/2020-12-01/managedClusters.json | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json index 4a2d8d2279e4..00d2d2312f8b 100644 --- a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json @@ -2247,6 +2247,25 @@ }, "description": "Profile of network configuration." }, + "MaintenanceConfigurationProperties": { + "properties": { + "timeInWeek": { + "type": "array", + "items": { + "$ref": "#/definitions/TimeInWeek" + }, + "description": "Weekday time slots allowed to upgrade." + }, + "notAllowedTime": { + "type": "array", + "items": { + "$ref": "#/definitions/TimeSpan" + }, + "description": "Time slots on which upgrade is not allowed." + } + }, + "description": "Default maintenance configuration properties." + }, "TimeInWeek": { "properties": { "day": { From ebae22e989ae5e8b7cd3491adc067a87015ec2d3 Mon Sep 17 00:00:00 2001 From: Allan Zhang Date: Tue, 15 Dec 2020 12:28:22 -0800 Subject: [PATCH 13/25] fix swagger error --- .../stable/2020-12-01/managedClusters.json | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json index 00d2d2312f8b..814447111b4f 100644 --- a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json @@ -2247,6 +2247,23 @@ }, "description": "Profile of network configuration." }, + "MaintenanceConfiguration": { + "allOf": [ + { + "$ref": "#/definitions/SubResource" + }, + { + "properties": { + "properties": { + "description": "Properties of a default maintenance configuration.", + "$ref": "#/definitions/MaintenanceConfigurationProperties", + "x-ms-client-flatten": true + } + } + } + ], + "description": "maintenance configuration." + }, "MaintenanceConfigurationProperties": { "properties": { "timeInWeek": { From ec0c2b352653e26f0772ae1c887af96716ce2ebc Mon Sep 17 00:00:00 2001 From: Allan Zhang Date: Tue, 15 Dec 2020 13:14:43 -0800 Subject: [PATCH 14/25] fix error --- .../stable/2020-12-01/managedClusters.json | 58 +++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json index 814447111b4f..c79f0bd31b40 100644 --- a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json @@ -2247,6 +2247,59 @@ }, "description": "Profile of network configuration." }, + "SystemData": { + "description": "Metadata pertaining to creation and last modification of the resource.", + "type": "object", + "readOnly": true, + "properties": { + "createdBy": { + "type": "string", + "description": "The identity that created the resource." + }, + "createdByType": { + "type": "string", + "description": "The type of identity that created the resource.", + "enum": [ + "User", + "Application", + "ManagedIdentity", + "Key" + ], + "x-ms-enum": { + "name": "createdByType", + "modelAsString": true + } + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "The timestamp of resource creation (UTC)." + }, + "lastModifiedBy": { + "type": "string", + "description": "The identity that last modified the resource." + }, + "lastModifiedByType": { + "type": "string", + "description": "The type of identity that last modified the resource.", + "enum": [ + "User", + "Application", + "ManagedIdentity", + "Key" + ], + "x-ms-enum": { + "name": "createdByType", + "modelAsString": true + } + }, + "lastModifiedAt": { + "type": "string", + "format": "date-time", + "description": "The type of identity that last modified the resource." + } + } + }, "MaintenanceConfiguration": { "allOf": [ { @@ -2254,6 +2307,11 @@ }, { "properties": { + "systemData": { + "$ref": "#/definitions/SystemData", + "readOnly": true, + "description": "The system meta data relating to this resource." + }, "properties": { "description": "Properties of a default maintenance configuration.", "$ref": "#/definitions/MaintenanceConfigurationProperties", From 5956f0456fb25345c973596ae5b247e43a2be9af Mon Sep 17 00:00:00 2001 From: Allan Zhang Date: Tue, 15 Dec 2020 13:28:19 -0800 Subject: [PATCH 15/25] fix swagger error --- .../stable/2020-12-01/managedClusters.json | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json index c79f0bd31b40..18676734071c 100644 --- a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json @@ -2247,6 +2247,23 @@ }, "description": "Profile of network configuration." }, + "MaintenanceConfigurationListResult": { + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/MaintenanceConfiguration" + }, + "description": "The list of maintenance configurations." + }, + "nextLink": { + "type": "string", + "description": "The URL to get the next set of maintenance configuration results.", + "readOnly": true + } + }, + "description": "The response from the List maintenance configurations operation." + }, "SystemData": { "description": "Metadata pertaining to creation and last modification of the resource.", "type": "object", From a8a8a7037343d53be1d5e9155b2ef8c1b0248f48 Mon Sep 17 00:00:00 2001 From: Allan Zhang Date: Tue, 15 Dec 2020 13:34:04 -0800 Subject: [PATCH 16/25] fix swagger error --- .../stable/2020-12-01/managedClusters.json | 157 ++++++++++++++++++ 1 file changed, 157 insertions(+) diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json index 18676734071c..c66acab922ff 100644 --- a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json @@ -2247,6 +2247,163 @@ }, "description": "Profile of network configuration." }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}": { + "get": { + "tags": [ + "MaintenanceConfigurations" + ], + "operationId": "MaintenanceConfigurations_Get", + "summary": "Gets the maintenance configuration.", + "description": "Gets the details of maintenance configurations by managed cluster and resource group.", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ResourceNameParameter" + }, + { + "name": "configName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the maintenance configuration." + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/MaintenanceConfiguration" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-examples": { + "Get Maintenance Configuration": { + "$ref": "./examples/MaintenanceConfigurationsGet.json" + } + } + }, + "put": { + "tags": [ + "MaintenanceConfigurations" + ], + "operationId": "MaintenanceConfigurations_CreateOrUpdate", + "summary": "Creates or updates a maintenance configurations.", + "description": "Creates or updates a maintenance configuration in the specified managed cluster.", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ResourceNameParameter" + }, + { + "name": "configName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the maintenance configuration." + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/MaintenanceConfiguration" + }, + "description": "Parameters supplied to the Create or Update a default maintenance configuration." + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/MaintenanceConfiguration" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-long-running-operation": false, + "x-ms-examples": { + "Create/Update Maintenance Configuration": { + "$ref": "./examples/MaintenanceConfigurationsCreate_Update.json" + } + } + }, + "delete": { + "tags": [ + "MaintenanceConfigurations" + ], + "operationId": "MaintenanceConfigurations_Delete", + "summary": "Deletes a maintenance configuration.", + "description": "Deletes the maintenance configuration in the specified managed cluster.", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ResourceNameParameter" + }, + { + "name": "configName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the maintenance configuration." + } + ], + "responses": { + "200": { + "description": "OK" + }, + "204": { + "description": "NoContent" + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-long-running-operation": false, + "x-ms-examples": { + "Delete Maintenance Configuration": { + "$ref": "./examples/MaintenanceConfigurationsDelete.json" + } + } + } + }, "MaintenanceConfigurationListResult": { "properties": { "value": { From bc85745271a4e545d29ba1988d7c68d4b0f73bb0 Mon Sep 17 00:00:00 2001 From: Allan Zhang Date: Tue, 15 Dec 2020 13:37:54 -0800 Subject: [PATCH 17/25] fix error --- .../stable/2020-12-01/managedClusters.json | 107 ------------------ 1 file changed, 107 deletions(-) diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json index c66acab922ff..a943cbb35089 100644 --- a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json @@ -2295,113 +2295,6 @@ "$ref": "./examples/MaintenanceConfigurationsGet.json" } } - }, - "put": { - "tags": [ - "MaintenanceConfigurations" - ], - "operationId": "MaintenanceConfigurations_CreateOrUpdate", - "summary": "Creates or updates a maintenance configurations.", - "description": "Creates or updates a maintenance configuration in the specified managed cluster.", - "parameters": [ - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/ResourceGroupNameParameter" - }, - { - "$ref": "#/parameters/ResourceNameParameter" - }, - { - "name": "configName", - "in": "path", - "required": true, - "type": "string", - "description": "The name of the maintenance configuration." - }, - { - "name": "parameters", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/MaintenanceConfiguration" - }, - "description": "Parameters supplied to the Create or Update a default maintenance configuration." - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/MaintenanceConfiguration" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/CloudError" - } - } - }, - "x-ms-long-running-operation": false, - "x-ms-examples": { - "Create/Update Maintenance Configuration": { - "$ref": "./examples/MaintenanceConfigurationsCreate_Update.json" - } - } - }, - "delete": { - "tags": [ - "MaintenanceConfigurations" - ], - "operationId": "MaintenanceConfigurations_Delete", - "summary": "Deletes a maintenance configuration.", - "description": "Deletes the maintenance configuration in the specified managed cluster.", - "parameters": [ - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/ResourceGroupNameParameter" - }, - { - "$ref": "#/parameters/ResourceNameParameter" - }, - { - "name": "configName", - "in": "path", - "required": true, - "type": "string", - "description": "The name of the maintenance configuration." - } - ], - "responses": { - "200": { - "description": "OK" - }, - "204": { - "description": "NoContent" - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/CloudError" - } - } - }, - "x-ms-long-running-operation": false, - "x-ms-examples": { - "Delete Maintenance Configuration": { - "$ref": "./examples/MaintenanceConfigurationsDelete.json" - } - } } }, "MaintenanceConfigurationListResult": { From 48dc077335f55cc0228437e17002ef46f9e7681e Mon Sep 17 00:00:00 2001 From: Allan Zhang Date: Tue, 15 Dec 2020 13:44:54 -0800 Subject: [PATCH 18/25] fix error --- .../stable/2020-12-01/managedClusters.json | 100 +++++++++--------- 1 file changed, 50 insertions(+), 50 deletions(-) diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json index a943cbb35089..fc31311306d0 100644 --- a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json @@ -573,6 +573,56 @@ } } }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}": { + "get": { + "tags": [ + "MaintenanceConfigurations" + ], + "operationId": "MaintenanceConfigurations_Get", + "summary": "Gets the maintenance configuration.", + "description": "Gets the details of maintenance configurations by managed cluster and resource group.", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ResourceNameParameter" + }, + { + "name": "configName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the maintenance configuration." + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/MaintenanceConfiguration" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-examples": { + "Get Maintenance Configuration": { + "$ref": "./examples/MaintenanceConfigurationsGet.json" + } + } + } + }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools": { "get": { "tags": [ @@ -2247,56 +2297,6 @@ }, "description": "Profile of network configuration." }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}": { - "get": { - "tags": [ - "MaintenanceConfigurations" - ], - "operationId": "MaintenanceConfigurations_Get", - "summary": "Gets the maintenance configuration.", - "description": "Gets the details of maintenance configurations by managed cluster and resource group.", - "parameters": [ - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/ResourceGroupNameParameter" - }, - { - "$ref": "#/parameters/ResourceNameParameter" - }, - { - "name": "configName", - "in": "path", - "required": true, - "type": "string", - "description": "The name of the maintenance configuration." - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/MaintenanceConfiguration" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/CloudError" - } - } - }, - "x-ms-examples": { - "Get Maintenance Configuration": { - "$ref": "./examples/MaintenanceConfigurationsGet.json" - } - } - } - }, "MaintenanceConfigurationListResult": { "properties": { "value": { From 7abb2966de1ba35ad1939e6092713c2ca4e86c30 Mon Sep 17 00:00:00 2001 From: Allan Zhang Date: Tue, 15 Dec 2020 13:50:49 -0800 Subject: [PATCH 19/25] fix error --- .../stable/2020-12-01/managedClusters.json | 107 ++++++++++++++++++ 1 file changed, 107 insertions(+) diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json index fc31311306d0..deb6edca2047 100644 --- a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json @@ -621,6 +621,113 @@ "$ref": "./examples/MaintenanceConfigurationsGet.json" } } + }, + "put": { + "tags": [ + "MaintenanceConfigurations" + ], + "operationId": "MaintenanceConfigurations_CreateOrUpdate", + "summary": "Creates or updates a maintenance configurations.", + "description": "Creates or updates a maintenance configuration in the specified managed cluster.", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ResourceNameParameter" + }, + { + "name": "configName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the maintenance configuration." + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/MaintenanceConfiguration" + }, + "description": "Parameters supplied to the Create or Update a default maintenance configuration." + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/MaintenanceConfiguration" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-long-running-operation": false, + "x-ms-examples": { + "Create/Update Maintenance Configuration": { + "$ref": "./examples/MaintenanceConfigurationsCreate_Update.json" + } + } + }, + "delete": { + "tags": [ + "MaintenanceConfigurations" + ], + "operationId": "MaintenanceConfigurations_Delete", + "summary": "Deletes a maintenance configuration.", + "description": "Deletes the maintenance configuration in the specified managed cluster.", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ResourceNameParameter" + }, + { + "name": "configName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the maintenance configuration." + } + ], + "responses": { + "200": { + "description": "OK" + }, + "204": { + "description": "NoContent" + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-long-running-operation": false, + "x-ms-examples": { + "Delete Maintenance Configuration": { + "$ref": "./examples/MaintenanceConfigurationsDelete.json" + } + } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools": { From bc23292cdc6c4282d4f5bba56c024f9eb35d526d Mon Sep 17 00:00:00 2001 From: Allan Zhang Date: Tue, 15 Dec 2020 13:54:42 -0800 Subject: [PATCH 20/25] fix error --- .../stable/2020-12-01/managedClusters.json | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json index deb6edca2047..f39e95292ab8 100644 --- a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json @@ -573,6 +573,52 @@ } } }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations": { + "get": { + "tags": [ + "MaintenanceConfigurations" + ], + "operationId": "MaintenanceConfigurations_List", + "summary": "Gets a list of maintenance configurations in the specified managed cluster.", + "description": "Gets a list of maintenance configurations in the specified managed cluster. The operation returns properties of each maintenance configuration.", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ResourceNameParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/MaintenanceConfigurationListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List maintenance configurations by Managed Cluster": { + "$ref": "./examples/MaintenanceConfigurationsList.json" + } + } + } + }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}": { "get": { "tags": [ From 91017426b9721c202b51ae0fd341b404ae9aa46e Mon Sep 17 00:00:00 2001 From: Allan Zhang Date: Tue, 15 Dec 2020 13:56:39 -0800 Subject: [PATCH 21/25] fix error --- .../stable/2020-12-01/managedClusters.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json index f39e95292ab8..9a08e91990d3 100644 --- a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json @@ -2528,7 +2528,7 @@ { "properties": { "systemData": { - "$ref": "#/definitions/SystemData", + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData", "readOnly": true, "description": "The system meta data relating to this resource." }, From a919fffb600c554562e21712a110772d60fe1658 Mon Sep 17 00:00:00 2001 From: Allan Zhang Date: Tue, 15 Dec 2020 13:57:51 -0800 Subject: [PATCH 22/25] fix error --- .../stable/2020-12-01/managedClusters.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json index 9a08e91990d3..f39e95292ab8 100644 --- a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json @@ -2528,7 +2528,7 @@ { "properties": { "systemData": { - "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData", + "$ref": "#/definitions/SystemData", "readOnly": true, "description": "The system meta data relating to this resource." }, From 0865b14e91445639c5c4d0e67a658973d21b7fb0 Mon Sep 17 00:00:00 2001 From: Allan Zhang Date: Tue, 15 Dec 2020 14:10:49 -0800 Subject: [PATCH 23/25] fix error --- .../examples/MaintenanceConfigurationsCreate_Update.json | 8 -------- .../2020-12-01/examples/MaintenanceConfigurationsGet.json | 8 -------- 2 files changed, 16 deletions(-) diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/examples/MaintenanceConfigurationsCreate_Update.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/examples/MaintenanceConfigurationsCreate_Update.json index b73501f3d792..24616c8dd327 100644 --- a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/examples/MaintenanceConfigurationsCreate_Update.json +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/examples/MaintenanceConfigurationsCreate_Update.json @@ -31,14 +31,6 @@ "id": "/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/maintenanceConfigurations/default", "type": "Microsoft.ContainerService/managedClusters/maintenanceConfigurations", "name": "default", - "systemData": { - "createdBy": "user1", - "createdByType": "User", - "createdAt": "2020-01-01T17:18:19.1234567Z", - "lastModifiedBy": "user2", - "lastModifiedByType": "User", - "lastModifiedAt": "2020-01-02T17:18:19.1234567Z" - }, "properties": { "timeInWeek": [ { diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/examples/MaintenanceConfigurationsGet.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/examples/MaintenanceConfigurationsGet.json index fa834263f69d..d04f10819b77 100644 --- a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/examples/MaintenanceConfigurationsGet.json +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/examples/MaintenanceConfigurationsGet.json @@ -11,14 +11,6 @@ "body": { "id": "/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/maintenanceConfigurations/default", "name": "default", - "systemData": { - "createdBy": "user1", - "createdByType": "User", - "createdAt": "2020-01-01T17:18:19.1234567Z", - "lastModifiedBy": "user2", - "lastModifiedByType": "User", - "lastModifiedAt": "2020-01-02T17:18:19.1234567Z" - }, "properties": { "timeInWeek": [ { From a8eb5c205f7eb241eae0fc9f8512266288363fdc Mon Sep 17 00:00:00 2001 From: Allan Zhang Date: Tue, 15 Dec 2020 18:40:34 -0800 Subject: [PATCH 24/25] fix lint error --- ...aintenanceConfigurationsCreate_Update.json | 8 ++++++ .../MaintenanceConfigurationsGet.json | 8 ++++++ .../stable/2020-12-01/managedClusters.json | 26 +++++++++---------- 3 files changed, 28 insertions(+), 14 deletions(-) diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/examples/MaintenanceConfigurationsCreate_Update.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/examples/MaintenanceConfigurationsCreate_Update.json index 24616c8dd327..b73501f3d792 100644 --- a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/examples/MaintenanceConfigurationsCreate_Update.json +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/examples/MaintenanceConfigurationsCreate_Update.json @@ -31,6 +31,14 @@ "id": "/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/maintenanceConfigurations/default", "type": "Microsoft.ContainerService/managedClusters/maintenanceConfigurations", "name": "default", + "systemData": { + "createdBy": "user1", + "createdByType": "User", + "createdAt": "2020-01-01T17:18:19.1234567Z", + "lastModifiedBy": "user2", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-01-02T17:18:19.1234567Z" + }, "properties": { "timeInWeek": [ { diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/examples/MaintenanceConfigurationsGet.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/examples/MaintenanceConfigurationsGet.json index d04f10819b77..fa834263f69d 100644 --- a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/examples/MaintenanceConfigurationsGet.json +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/examples/MaintenanceConfigurationsGet.json @@ -11,6 +11,14 @@ "body": { "id": "/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/maintenanceConfigurations/default", "name": "default", + "systemData": { + "createdBy": "user1", + "createdByType": "User", + "createdAt": "2020-01-01T17:18:19.1234567Z", + "lastModifiedBy": "user2", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-01-02T17:18:19.1234567Z" + }, "properties": { "timeInWeek": [ { diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json index f39e95292ab8..04d1654ea02a 100644 --- a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json @@ -2524,22 +2524,20 @@ "allOf": [ { "$ref": "#/definitions/SubResource" - }, - { - "properties": { - "systemData": { - "$ref": "#/definitions/SystemData", - "readOnly": true, - "description": "The system meta data relating to this resource." - }, - "properties": { - "description": "Properties of a default maintenance configuration.", - "$ref": "#/definitions/MaintenanceConfigurationProperties", - "x-ms-client-flatten": true - } - } } ], + "properties": { + "systemData": { + "$ref": "#/definitions/SystemData", + "readOnly": true, + "description": "The system meta data relating to this resource." + }, + "properties": { + "description": "Properties of a default maintenance configuration.", + "$ref": "#/definitions/MaintenanceConfigurationProperties", + "x-ms-client-flatten": true + } + }, "description": "maintenance configuration." }, "MaintenanceConfigurationProperties": { From e8e7ce447a2462e0008339941a039fb8b4ff2e2b Mon Sep 17 00:00:00 2001 From: Allan Zhang Date: Tue, 15 Dec 2020 18:51:09 -0800 Subject: [PATCH 25/25] fix warning --- .../stable/2020-12-01/managedClusters.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json index 04d1654ea02a..b33733760752 100644 --- a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json @@ -578,7 +578,7 @@ "tags": [ "MaintenanceConfigurations" ], - "operationId": "MaintenanceConfigurations_List", + "operationId": "MaintenanceConfigurations_ListByManagedCluster", "summary": "Gets a list of maintenance configurations in the specified managed cluster.", "description": "Gets a list of maintenance configurations in the specified managed cluster. The operation returns properties of each maintenance configuration.", "parameters": [