From 8240593bde5350e6762015523ccd57cb61e32da5 Mon Sep 17 00:00:00 2001 From: Alfredo Santamaria Date: Thu, 18 Feb 2021 19:34:21 -0800 Subject: [PATCH] [Service Fabric Managed Clusters] Adding missing property ClusterUpgradeCadence (#12858) * adding missing property ClusterUpgradeCadence * change createdByType and lastModifiedAt to strings * remove duplicate operations path * fix sdk-net path typo * commit to rerun automation * remove x-ms-client-flatten for ServiceResource * remove after_scripts automation was failing * rename _Create to _CreateOrUpdate in apps Co-authored-by: Alfredo Santamaria Gomez --- ...anagedClusterPutOperation_example_max.json | 6 +- .../managedapplication.json | 86 ++----------------- .../2021-01-01-preview/managedcluster.json | 55 +++++++----- .../preview/2021-01-01-preview/nodetype.json | 77 +---------------- .../resource-manager/readme.md | 5 +- 5 files changed, 46 insertions(+), 183 deletions(-) diff --git a/specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabricManagedClusters/preview/2021-01-01-preview/examples/ManagedClusterPutOperation_example_max.json b/specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabricManagedClusters/preview/2021-01-01-preview/examples/ManagedClusterPutOperation_example_max.json index 7eff04bea4ee..afe9a08cd5bc 100644 --- a/specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabricManagedClusters/preview/2021-01-01-preview/examples/ManagedClusterPutOperation_example_max.json +++ b/specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabricManagedClusters/preview/2021-01-01-preview/examples/ManagedClusterPutOperation_example_max.json @@ -174,7 +174,8 @@ "enableAutoOSUpgrade": true, "applicationTypeVersionsCleanupPolicy": { "maxUnusedVersionsToKeep": 3 - } + }, + "clusterUpgradeCadence": "Wave1" } } }, @@ -268,7 +269,8 @@ "enableAutoOSUpgrade": true, "applicationTypeVersionsCleanupPolicy": { "maxUnusedVersionsToKeep": 3 - } + }, + "clusterUpgradeCadence": "Wave1" } } } diff --git a/specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabricManagedClusters/preview/2021-01-01-preview/managedapplication.json b/specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabricManagedClusters/preview/2021-01-01-preview/managedapplication.json index d9a4955f9e13..b674c66c8c05 100644 --- a/specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabricManagedClusters/preview/2021-01-01-preview/managedapplication.json +++ b/specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabricManagedClusters/preview/2021-01-01-preview/managedapplication.json @@ -34,42 +34,6 @@ } ], "paths": { - "/providers/Microsoft.ServiceFabric/operations": { - "get": { - "tags": [ - "Operations" - ], - "summary": "Lists all of the available Service Fabric resource provider API operations.", - "description": "Get the list of available Service Fabric resource provider API operations.", - "operationId": "Operations_List", - "parameters": [ - { - "name": "api-version", - "in": "query", - "description": "The version of the Service Fabric resource provider API", - "required": true, - "type": "string" - } - ], - "responses": { - "200": { - "description": "OK. The request has succeeded.", - "schema": { - "$ref": "#/definitions/OperationListResult" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/ErrorModel" - } - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - } - } - }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}": { "get": { "tags": [ @@ -119,7 +83,7 @@ "tags": [ "ApplicationType" ], - "operationId": "ApplicationTypes_Create", + "operationId": "ApplicationTypes_CreateOrUpdate", "summary": "Creates or updates a Service Fabric managed application type name resource.", "description": "Create or update a Service Fabric managed application type name resource with the specified name.", "parameters": [ @@ -372,7 +336,7 @@ "tags": [ "ApplicationTypeVersion" ], - "operationId": "ApplicationTypeVersions_Create", + "operationId": "ApplicationTypeVersions_CreateOrUpdate", "summary": "Creates or updates a Service Fabric managed application type version resource.", "description": "Create or update a Service Fabric managed application type version resource with the specified name.", "parameters": [ @@ -644,7 +608,7 @@ "tags": [ "Application" ], - "operationId": "Applications_Create", + "operationId": "Applications_CreateOrUpdate", "summary": "Creates or updates a Service Fabric managed application resource.", "description": "Create or update a Service Fabric managed application resource with the specified name.", "parameters": [ @@ -910,7 +874,7 @@ "tags": [ "Service" ], - "operationId": "Services_Create", + "operationId": "Services_CreateOrUpdate", "summary": "Creates or updates a Service Fabric managed service resource.", "description": "Create or update a Service Fabric managed service resource with the specified name.", "parameters": [ @@ -2198,7 +2162,6 @@ "description": "The service resource.", "properties": { "properties": { - "x-ms-client-flatten": true, "$ref": "#/definitions/ServiceResourceProperties" } }, @@ -2602,23 +2565,6 @@ }, "description": "The error details." }, - "OperationListResult": { - "properties": { - "value": { - "type": "array", - "description": "List of operations supported by the Service Fabric resource provider.", - "items": { - "$ref": "#/definitions/OperationResult" - } - }, - "nextLink": { - "type": "string", - "description": "URL to get the next set of operation list results if there are any.", - "readOnly": true - } - }, - "description": "Describes the result of the request to list Service Fabric resource provider operations." - }, "OperationResult": { "properties": { "name": { @@ -2655,17 +2601,7 @@ }, "createdByType": { "type": "string", - "description": "The type of identity that created the resource.", - "enum": [ - "User", - "Application", - "ManagedIdentity", - "Key" - ], - "x-ms-enum": { - "name": "createdByType", - "modelAsString": true - } + "description": "The type of identity that created the resource." }, "createdAt": { "type": "string", @@ -2678,17 +2614,7 @@ }, "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 - } + "description": "The type of identity that last modified the resource." }, "lastModifiedAt": { "type": "string", diff --git a/specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabricManagedClusters/preview/2021-01-01-preview/managedcluster.json b/specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabricManagedClusters/preview/2021-01-01-preview/managedcluster.json index 4d48c92c4b8c..ffda15d86d32 100644 --- a/specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabricManagedClusters/preview/2021-01-01-preview/managedcluster.json +++ b/specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabricManagedClusters/preview/2021-01-01-preview/managedcluster.json @@ -430,6 +430,33 @@ }, "description": "Client certificate definition." }, + "ClusterUpgradeCadence": { + "type": "string", + "enum": [ + "Wave0", + "Wave1", + "Wave2" + ], + "x-ms-enum": { + "name": "clusterUpgradeCadence", + "modelAsString": true, + "values": [ + { + "value": "Wave0", + "description": "Cluster upgrade starts immediately after a new version is rolled out. Recommended for Test/Dev clusters." + }, + { + "value": "Wave1", + "description": "Cluster upgrade starts 7 days after a new version is rolled out. Recommended for Pre-prod clusters." + }, + { + "value": "Wave2", + "description": "Cluster upgrade starts 14 days after a new version is rolled out. Recommended for Production clusters." + } + ] + }, + "description": "Indicates when new cluster runtime version upgrades will be applied after they are released. By default is Wave0." + }, "ClusterState": { "type": "string", "description": "The current state of the cluster.\n\n - WaitingForNodes - Indicates that the cluster resource is created and the resource provider is waiting for Service Fabric VM extension to boot up and report to it.\n - Deploying - Indicates that the Service Fabric runtime is being installed on the VMs. Cluster resource will be in this state until the cluster boots up and system services are up.\n - BaselineUpgrade - Indicates that the cluster is upgrading to establishes the cluster version. This upgrade is automatically initiated when the cluster boots up for the first time.\n - Upgrading - Indicates that the cluster is being upgraded with the user provided configuration.\n - UpgradeFailed - Indicates that the last upgrade for the cluster has failed.\n - Ready - Indicates that the cluster is in a stable state.\n", @@ -639,6 +666,10 @@ "type": "string", "description": "The Service Fabric runtime version of the cluster. This property can only by set the user when **upgradeMode** is set to 'Manual'. To get list of available Service Fabric versions for new clusters use [ClusterVersion API](./ClusterVersion.md). To get the list of available version for existing clusters use **availableClusterVersions**." }, + "clusterUpgradeCadence": { + "$ref": "#/definitions/ClusterUpgradeCadence", + "description": "Indicates when new cluster runtime version upgrades will be applied after they are released. By default is Wave0." + }, "addonFeatures": { "type": "array", "items": { @@ -981,17 +1012,7 @@ }, "createdByType": { "type": "string", - "description": "The type of identity that created the resource.", - "enum": [ - "User", - "Application", - "ManagedIdentity", - "Key" - ], - "x-ms-enum": { - "name": "createdByType", - "modelAsString": true - } + "description": "The type of identity that created the resource." }, "createdAt": { "type": "string", @@ -1004,17 +1025,7 @@ }, "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 - } + "description": "The type of identity that last modified the resource." }, "lastModifiedAt": { "type": "string", diff --git a/specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabricManagedClusters/preview/2021-01-01-preview/nodetype.json b/specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabricManagedClusters/preview/2021-01-01-preview/nodetype.json index 8eca84f46a52..4223547c0ff8 100644 --- a/specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabricManagedClusters/preview/2021-01-01-preview/nodetype.json +++ b/specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabricManagedClusters/preview/2021-01-01-preview/nodetype.json @@ -34,42 +34,6 @@ } ], "paths": { - "/providers/Microsoft.ServiceFabric/operations": { - "get": { - "tags": [ - "Operations" - ], - "summary": "Lists all of the available Service Fabric resource provider API operations.", - "description": "Get the list of available Service Fabric resource provider API operations.", - "operationId": "Operations_List", - "parameters": [ - { - "name": "api-version", - "in": "query", - "description": "The version of the Service Fabric resource provider API", - "required": true, - "type": "string" - } - ], - "responses": { - "200": { - "description": "OK. The request has succeeded.", - "schema": { - "$ref": "#/definitions/OperationListResult" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/ErrorModel" - } - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - } - } - }, "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes": { "get": { "operationId": "NodeTypes_ListByManagedClusters", @@ -913,23 +877,6 @@ "Other" ] }, - "OperationListResult": { - "properties": { - "value": { - "type": "array", - "description": "List of operations supported by the Service Fabric resource provider.", - "items": { - "$ref": "#/definitions/OperationResult" - } - }, - "nextLink": { - "type": "string", - "description": "URL to get the next set of operation list results if there are any.", - "readOnly": true - } - }, - "description": "Describes the result of the request to list Service Fabric resource provider operations." - }, "OperationResult": { "properties": { "name": { @@ -966,17 +913,7 @@ }, "createdByType": { "type": "string", - "description": "The type of identity that created the resource.", - "enum": [ - "User", - "Application", - "ManagedIdentity", - "Key" - ], - "x-ms-enum": { - "name": "createdByType", - "modelAsString": true - } + "description": "The type of identity that created the resource." }, "createdAt": { "type": "string", @@ -989,17 +926,7 @@ }, "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 - } + "description": "The type of identity that last modified the resource." }, "lastModifiedAt": { "type": "string", diff --git a/specification/servicefabricmanagedclusters/resource-manager/readme.md b/specification/servicefabricmanagedclusters/resource-manager/readme.md index 705a633a39dc..69d93fe30678 100644 --- a/specification/servicefabricmanagedclusters/resource-manager/readme.md +++ b/specification/servicefabricmanagedclusters/resource-manager/readme.md @@ -94,11 +94,8 @@ swagger-to-sdk: - repo: azure-sdk-for-net - repo: azure-sdk-for-python - repo: azure-resource-manager-schemas - after_scripts: - - node sdkauto_afterscript.js servicefabricmanagedlusters/resource-manager ``` - ## C# These settings apply only when `--csharp` is specified on the command line. @@ -110,7 +107,7 @@ csharp: license-header: MICROSOFT_MIT_NO_VERSION namespace: Microsoft.Azure.Management.ServiceFabricManagedClusters payload-flattening-threshold: 1 - output-folder: $(csharp-sdks-folder)/servicefabricmanagedlusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated + output-folder: $(csharp-sdks-folder)/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated clear-output-folder: true ```