Repository: Azure/ARO-RP
Pull request #2521 (2022-11-07 09:53:40)

Liveconfig: Use case insensitive matching for the AKS cluster lookup
### Which issue this PR addresses:

Fixes AKS cluster location matching in regions that return mixed case instance meta locations.

### What this PR does / why we need it:

Currently the AKS cluster credentials are not matching the correct cluster in Canary due to EastUS2EUAP != eastus2euap and CentralUSEUAP != centraluseuap. This is an assumption, but we have logs with EastUS2EUAP and CentralUSEUAP and when running an `az aks list` the results show the locations are lowercase.

### Test plan for issue:

Tested against a Dev AKS cluster.

### Is there any documentation that needs to be updated for this PR?

No.


UlrichSchlueter: lgtm

Patch:
diff --git a/.sha256sum b/.sha256sum
index d82cdd4a0..f883b7c71 100644
--- a/.sha256sum
+++ b/.sha256sum
@@ -1,4 +1,4 @@
-468fa0da0a50d50640ec57843ad288af343128b39f5bf23e76e4e336580883d4  swagger/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/stable/2020-04-30/redhatopenshift.json
-c323c84befa5ea11da50a2407050abed6540ea01e796720bc2241604ce80567c  swagger/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/preview/2021-09-01-preview/redhatopenshift.json
-e4e522e41855de71c0318db31cbd96c8713e7a74e7c81911bb494f0b194b3f43  swagger/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/stable/2022-04-01/redhatopenshift.json
-009e7ade338aa2803cb5ef94e3d6057b7093af7ed9b194e51b86e4eb71b4ac05  swagger/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/stable/2022-09-04/redhatopenshift.json
+19efc68e41e35c052ea0d194ff390e93ae3cb1d9a91e4d2fb453becb463bf3b8  swagger/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/stable/2020-04-30/redhatopenshift.json
+12d47b965d8a83b06ae3a44c632b624c57b129b5fbcc8c3f8de4fd80e2273f97  swagger/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/preview/2021-09-01-preview/redhatopenshift.json
+239c63228da1db172f298cd81d0c3cc0d52ecca907915efe61be98c42b6d8f1d  swagger/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/stable/2022-04-01/redhatopenshift.json
+85763f6620fe8a9b432194e0c95ecef14e76bc827620737197424d84886872e0  swagger/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/stable/2022-09-04/redhatopenshift.json
diff --git a/docs/deploy-development-rp.md b/docs/deploy-development-rp.md
index 468c6e0ef..66d1b3f5a 100644
--- a/docs/deploy-development-rp.md
+++ b/docs/deploy-development-rp.md
@@ -232,7 +232,7 @@
 
 * List the enabled OpenShift installation versions within a region
   ```bash
-  curl -X GET -k "https://localhost:8443/subscriptions/$AZURE_SUBSCRIPTION_ID/providers/Microsoft.RedHatOpenShift/locations/$LOCATION/listinstallversions?api-version=2022-09-04"
+  curl -X GET -k "https://localhost:8443/subscriptions/$AZURE_SUBSCRIPTION_ID/providers/Microsoft.RedHatOpenShift/locations/$LOCATION/openshiftversions?api-version=2022-09-04"
   ```
 
 ## OpenShift Cluster Manager (OCM) Configuration API Actions
diff --git a/pkg/client/services/redhatopenshift/mgmt/2022-09-04/redhatopenshift/machinepools.go b/pkg/client/services/redhatopenshift/mgmt/2022-09-04/redhatopenshift/machinepools.go
index f512d53af..b29e633dd 100644
--- a/pkg/client/services/redhatopenshift/mgmt/2022-09-04/redhatopenshift/machinepools.go
+++ b/pkg/client/services/redhatopenshift/mgmt/2022-09-04/redhatopenshift/machinepools.go
@@ -517,7 +517,7 @@ func (client MachinePoolsClient) UpdateSender(req *http.Request) (*http.Response
 func (client MachinePoolsClient) UpdateResponder(resp *http.Response) (result MachinePool, err error) {
 	err = autorest.Respond(
 		resp,
-		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+		azure.WithErrorUnlessStatusCode(http.StatusOK),
 		autorest.ByUnmarshallingJSON(&result),
 		autorest.ByClosing())
 	result.Response = autorest.Response{Response: resp}
diff --git a/pkg/client/services/redhatopenshift/mgmt/2022-09-04/redhatopenshift/models.go b/pkg/client/services/redhatopenshift/mgmt/2022-09-04/redhatopenshift/models.go
index 080b54c62..ad1b71928 100644
--- a/pkg/client/services/redhatopenshift/mgmt/2022-09-04/redhatopenshift/models.go
+++ b/pkg/client/services/redhatopenshift/mgmt/2022-09-04/redhatopenshift/models.go
@@ -969,6 +969,156 @@ type OpenShiftVersionList struct {
 	NextLink *string `json:"nextLink,omitempty"`
 }
 
+// OpenShiftVersionListIterator provides access to a complete listing of OpenShiftVersion values.
+type OpenShiftVersionListIterator struct {
+	i    int
+	page OpenShiftVersionListPage
+}
+
+// NextWithContext advances to the next value.  If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *OpenShiftVersionListIterator) NextWithContext(ctx context.Context) (err error) {
+	if tracing.IsEnabled() {
+		ctx = tracing.StartSpan(ctx, fqdn+"/OpenShiftVersionListIterator.NextWithContext")
+		defer func() {
+			sc := -1
+			if iter.Response().Response.Response != nil {
+				sc = iter.Response().Response.Response.StatusCode
+			}
+			tracing.EndSpan(ctx, sc, err)
+		}()
+	}
+	iter.i++
+	if iter.i < len(iter.page.Values()) {
+		return nil
+	}
+	err = iter.page.NextWithContext(ctx)
+	if err != nil {
+		iter.i--
+		return err
+	}
+	iter.i = 0
+	return nil
+}
+
+// Next advances to the next value.  If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *OpenShiftVersionListIterator) Next() error {
+	return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter OpenShiftVersionListIterator) NotDone() bool {
+	return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter OpenShiftVersionListIterator) Response() OpenShiftVersionList {
+	return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter OpenShiftVersionListIterator) Value() OpenShiftVersion {
+	if !iter.page.NotDone() {
+		return OpenShiftVersion{}
+	}
+	return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the OpenShiftVersionListIterator type.
+func NewOpenShiftVersionListIterator(page OpenShiftVersionListPage) OpenShiftVersionListIterator {
+	return OpenShiftVersionListIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (osvl OpenShiftVersionList) IsEmpty() bool {
+	return osvl.Value == nil || len(*osvl.Value) == 0
+}
+
+// hasNextLink returns true if the NextLink is not empty.
+func (osvl OpenShiftVersionList) hasNextLink() bool {
+	return osvl.NextLink != nil && len(*osvl.NextLink) != 0
+}
+
+// openShiftVersionListPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (osvl OpenShiftVersionList) openShiftVersionListPreparer(ctx context.Context) (*http.Request, error) {
+	if !osvl.hasNextLink() {
+		return nil, nil
+	}
+	return autorest.Prepare((&http.Request{}).WithContext(ctx),
+		autorest.AsJSON(),
+		autorest.AsGet(),
+		autorest.WithBaseURL(to.String(osvl.NextLink)))
+}
+
+// OpenShiftVersionListPage contains a page of OpenShiftVersion values.
+type OpenShiftVersionListPage struct {
+	fn   func(context.Context, OpenShiftVersionList) (OpenShiftVersionList, error)
+	osvl OpenShiftVersionList
+}
+
+// NextWithContext advances to the next page of values.  If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *OpenShiftVersionListPage) NextWithContext(ctx context.Context) (err error) {
+	if tracing.IsEnabled() {
+		ctx = tracing.StartSpan(ctx, fqdn+"/OpenShiftVersionListPage.NextWithContext")
+		defer func() {
+			sc := -1
+			if page.Response().Response.Response != nil {
+				sc = page.Response().Response.Response.StatusCode
+			}
+			tracing.EndSpan(ctx, sc, err)
+		}()
+	}
+	for {
+		next, err := page.fn(ctx, page.osvl)
+		if err != nil {
+			return err
+		}
+		page.osvl = next
+		if !next.hasNextLink() || !next.IsEmpty() {
+			break
+		}
+	}
+	return nil
+}
+
+// Next advances to the next page of values.  If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *OpenShiftVersionListPage) Next() error {
+	return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page OpenShiftVersionListPage) NotDone() bool {
+	return !page.osvl.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page OpenShiftVersionListPage) Response() OpenShiftVersionList {
+	return page.osvl
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page OpenShiftVersionListPage) Values() []OpenShiftVersion {
+	if page.osvl.IsEmpty() {
+		return nil
+	}
+	return *page.osvl.Value
+}
+
+// Creates a new instance of the OpenShiftVersionListPage type.
+func NewOpenShiftVersionListPage(cur OpenShiftVersionList, getNextPage func(context.Context, OpenShiftVersionList) (OpenShiftVersionList, error)) OpenShiftVersionListPage {
+	return OpenShiftVersionListPage{
+		fn:   getNextPage,
+		osvl: cur,
+	}
+}
+
 // OpenShiftVersionProperties openShiftVersionProperties represents the properties of an OpenShiftVersion.
 type OpenShiftVersionProperties struct {
 	// Version - Version represents the version to create the cluster at.
diff --git a/pkg/client/services/redhatopenshift/mgmt/2022-09-04/redhatopenshift/openshiftversions.go b/pkg/client/services/redhatopenshift/mgmt/2022-09-04/redhatopenshift/openshiftversions.go
index 6780035d3..f1e6c1156 100644
--- a/pkg/client/services/redhatopenshift/mgmt/2022-09-04/redhatopenshift/openshiftversions.go
+++ b/pkg/client/services/redhatopenshift/mgmt/2022-09-04/redhatopenshift/openshiftversions.go
@@ -47,13 +47,13 @@ func NewOpenShiftVersionsClientWithBaseURI(baseURI string, subscriptionID string
 // List the operation returns the installable OpenShift versions as strings.
 // Parameters:
 // location - the name of Azure region.
-func (client OpenShiftVersionsClient) List(ctx context.Context, location string) (result OpenShiftVersionList, err error) {
+func (client OpenShiftVersionsClient) List(ctx context.Context, location string) (result OpenShiftVersionListPage, err error) {
 	if tracing.IsEnabled() {
 		ctx = tracing.StartSpan(ctx, fqdn+"/OpenShiftVersionsClient.List")
 		defer func() {
 			sc := -1
-			if result.Response.Response != nil {
-				sc = result.Response.Response.StatusCode
+			if result.osvl.Response.Response != nil {
+				sc = result.osvl.Response.Response.StatusCode
 			}
 			tracing.EndSpan(ctx, sc, err)
 		}()
@@ -66,6 +66,7 @@ func (client OpenShiftVersionsClient) List(ctx context.Context, location string)
 		return result, validation.NewError("redhatopenshift.OpenShiftVersionsClient", "List", err.Error())
 	}
 
+	result.fn = client.listNextResults
 	req, err := client.ListPreparer(ctx, location)
 	if err != nil {
 		err = autorest.NewErrorWithError(err, "redhatopenshift.OpenShiftVersionsClient", "List", nil, "Failure preparing request")
@@ -74,16 +75,20 @@ func (client OpenShiftVersionsClient) List(ctx context.Context, location string)
 
 	resp, err := client.ListSender(req)
 	if err != nil {
-		result.Response = autorest.Response{Response: resp}
+		result.osvl.Response = autorest.Response{Response: resp}
 		err = autorest.NewErrorWithError(err, "redhatopenshift.OpenShiftVersionsClient", "List", resp, "Failure sending request")
 		return
 	}
 
-	result, err = client.ListResponder(resp)
+	result.osvl, err = client.ListResponder(resp)
 	if err != nil {
 		err = autorest.NewErrorWithError(err, "redhatopenshift.OpenShiftVersionsClient", "List", resp, "Failure responding to request")
 		return
 	}
+	if result.osvl.hasNextLink() && result.osvl.IsEmpty() {
+		err = result.NextWithContext(ctx)
+		return
+	}
 
 	return
 }
@@ -103,7 +108,7 @@ func (client OpenShiftVersionsClient) ListPreparer(ctx context.Context, location
 	preparer := autorest.CreatePreparer(
 		autorest.AsGet(),
 		autorest.WithBaseURL(client.BaseURI),
-		autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.RedHatOpenShift/locations/{location}/listinstallversions", pathParameters),
+		autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.RedHatOpenShift/locations/{location}/openshiftversions", pathParameters),
 		autorest.WithQueryParameters(queryParameters))
 	return preparer.Prepare((&http.Request{}).WithContext(ctx))
 }
@@ -125,3 +130,40 @@ func (client OpenShiftVersionsClient) ListResponder(resp *http.Response) (result
 	result.Response = autorest.Response{Response: resp}
 	return
 }
+
+// listNextResults retrieves the next set of results, if any.
+func (client OpenShiftVersionsClient) listNextResults(ctx context.Context, lastResults OpenShiftVersionList) (result OpenShiftVersionList, err error) {
+	req, err := lastResults.openShiftVersionListPreparer(ctx)
+	if err != nil {
+		return result, autorest.NewErrorWithError(err, "redhatopenshift.OpenShiftVersionsClient", "listNextResults", nil, "Failure preparing next results request")
+	}
+	if req == nil {
+		return
+	}
+	resp, err := client.ListSender(req)
+	if err != nil {
+		result.Response = autorest.Response{Response: resp}
+		return result, autorest.NewErrorWithError(err, "redhatopenshift.OpenShiftVersionsClient", "listNextResults", resp, "Failure sending next results request")
+	}
+	result, err = client.ListResponder(resp)
+	if err != nil {
+		err = autorest.NewErrorWithError(err, "redhatopenshift.OpenShiftVersionsClient", "listNextResults", resp, "Failure responding to next results request")
+	}
+	return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client OpenShiftVersionsClient) ListComplete(ctx context.Context, location string) (result OpenShiftVersionListIterator, err error) {
+	if tracing.IsEnabled() {
+		ctx = tracing.StartSpan(ctx, fqdn+"/OpenShiftVersionsClient.List")
+		defer func() {
+			sc := -1
+			if result.Response().Response.Response != nil {
+				sc = result.page.Response().Response.Response.StatusCode
+			}
+			tracing.EndSpan(ctx, sc, err)
+		}()
+	}
+	result.page, err = client.List(ctx, location)
+	return
+}
diff --git a/pkg/client/services/redhatopenshift/mgmt/2022-09-04/redhatopenshift/redhatopenshiftapi/interfaces.go b/pkg/client/services/redhatopenshift/mgmt/2022-09-04/redhatopenshift/redhatopenshiftapi/interfaces.go
index 0c1aa0be1..ef7c35ec6 100644
--- a/pkg/client/services/redhatopenshift/mgmt/2022-09-04/redhatopenshift/redhatopenshiftapi/interfaces.go
+++ b/pkg/client/services/redhatopenshift/mgmt/2022-09-04/redhatopenshift/redhatopenshiftapi/interfaces.go
@@ -35,7 +35,8 @@ var _ OperationsClientAPI = (*redhatopenshift.OperationsClient)(nil)
 
 // OpenShiftVersionsClientAPI contains the set of methods on the OpenShiftVersionsClient type.
 type OpenShiftVersionsClientAPI interface {
-	List(ctx context.Context, location string) (result redhatopenshift.OpenShiftVersionList, err error)
+	List(ctx context.Context, location string) (result redhatopenshift.OpenShiftVersionListPage, err error)
+	ListComplete(ctx context.Context, location string) (result redhatopenshift.OpenShiftVersionListIterator, err error)
 }
 
 var _ OpenShiftVersionsClientAPI = (*redhatopenshift.OpenShiftVersionsClient)(nil)
diff --git a/pkg/client/services/redhatopenshift/mgmt/2022-09-04/redhatopenshift/secrets.go b/pkg/client/services/redhatopenshift/mgmt/2022-09-04/redhatopenshift/secrets.go
index c7293e394..2ee71b469 100644
--- a/pkg/client/services/redhatopenshift/mgmt/2022-09-04/redhatopenshift/secrets.go
+++ b/pkg/client/services/redhatopenshift/mgmt/2022-09-04/redhatopenshift/secrets.go
@@ -517,7 +517,7 @@ func (client SecretsClient) UpdateSender(req *http.Request) (*http.Response, err
 func (client SecretsClient) UpdateResponder(resp *http.Response) (result Secret, err error) {
 	err = autorest.Respond(
 		resp,
-		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+		azure.WithErrorUnlessStatusCode(http.StatusOK),
 		autorest.ByUnmarshallingJSON(&result),
 		autorest.ByClosing())
 	result.Response = autorest.Response{Response: resp}
diff --git a/pkg/client/services/redhatopenshift/mgmt/2022-09-04/redhatopenshift/syncidentityproviders.go b/pkg/client/services/redhatopenshift/mgmt/2022-09-04/redhatopenshift/syncidentityproviders.go
index c629da2e6..dde571f23 100644
--- a/pkg/client/services/redhatopenshift/mgmt/2022-09-04/redhatopenshift/syncidentityproviders.go
+++ b/pkg/client/services/redhatopenshift/mgmt/2022-09-04/redhatopenshift/syncidentityproviders.go
@@ -518,7 +518,7 @@ func (client SyncIdentityProvidersClient) UpdateSender(req *http.Request) (*http
 func (client SyncIdentityProvidersClient) UpdateResponder(resp *http.Response) (result SyncIdentityProvider, err error) {
 	err = autorest.Respond(
 		resp,
-		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+		azure.WithErrorUnlessStatusCode(http.StatusOK),
 		autorest.ByUnmarshallingJSON(&result),
 		autorest.ByClosing())
 	result.Response = autorest.Response{Response: resp}
diff --git a/pkg/client/services/redhatopenshift/mgmt/2022-09-04/redhatopenshift/syncsets.go b/pkg/client/services/redhatopenshift/mgmt/2022-09-04/redhatopenshift/syncsets.go
index 856f90ffb..183e00bfb 100644
--- a/pkg/client/services/redhatopenshift/mgmt/2022-09-04/redhatopenshift/syncsets.go
+++ b/pkg/client/services/redhatopenshift/mgmt/2022-09-04/redhatopenshift/syncsets.go
@@ -517,7 +517,7 @@ func (client SyncSetsClient) UpdateSender(req *http.Request) (*http.Response, er
 func (client SyncSetsClient) UpdateResponder(resp *http.Response) (result SyncSet, err error) {
 	err = autorest.Respond(
 		resp,
-		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+		azure.WithErrorUnlessStatusCode(http.StatusOK),
 		autorest.ByUnmarshallingJSON(&result),
 		autorest.ByClosing())
 	result.Response = autorest.Response{Response: resp}
diff --git a/pkg/frontend/changefeed.go b/pkg/frontend/changefeed.go
index 537880938..48bb4c07b 100644
--- a/pkg/frontend/changefeed.go
+++ b/pkg/frontend/changefeed.go
@@ -15,6 +15,11 @@ import (
 func (f *frontend) changefeed(ctx context.Context) {
 	defer recover.Panic(f.baseLog)
 
+	// f.dbOpenShiftVersions will be nil when running unit tests. Return here to avoid nil pointer panic
+	if f.dbOpenShiftVersions == nil {
+		return
+	}
+
 	frontendIterator := f.dbOpenShiftVersions.ChangeFeed()
 
 	t := time.NewTicker(10 * time.Second)
diff --git a/pkg/frontend/clustermanager_putorpatch.go b/pkg/frontend/clustermanager_putorpatch.go
index bc7114850..b43c25e16 100644
--- a/pkg/frontend/clustermanager_putorpatch.go
+++ b/pkg/frontend/clustermanager_putorpatch.go
@@ -63,9 +63,12 @@ func (f *frontend) _putOrPatchSyncSet(ctx context.Context, log *logrus.Entry, r
 		return nil, err
 	}
 
-	ocmdoc, _ := f.dbClusterManagerConfiguration.Get(ctx, r.URL.Path)
+	ocmdoc, err := f.dbClusterManagerConfiguration.Get(ctx, r.URL.Path)
 	if err != nil && !cosmosdb.IsErrorStatusCode(err, http.StatusNotFound) {
 		return nil, err
+	} else if cosmosdb.IsErrorStatusCode(err, http.StatusNotFound) && r.Method == http.MethodPatch {
+		return nil, api.NewCloudError(http.StatusNotFound, api.CloudErrorCodeResourceNotFound, "", "The Resource '%s/%s/%s/%s' under resource group '%s' was not found.",
+			vars["resourceType"], vars["resourceName"], vars["ocmResourceType"], vars["ocmResourceName"], vars["resourceGroupName"])
 	}
 
 	var resources string
@@ -132,9 +135,12 @@ func (f *frontend) _putOrPatchMachinePool(ctx context.Context, log *logrus.Entry
 		return nil, err
 	}
 
-	ocmdoc, _ := f.dbClusterManagerConfiguration.Get(ctx, r.URL.Path)
+	ocmdoc, err := f.dbClusterManagerConfiguration.Get(ctx, r.URL.Path)
 	if err != nil && !cosmosdb.IsErrorStatusCode(err, http.StatusNotFound) {
 		return nil, err
+	} else if cosmosdb.IsErrorStatusCode(err, http.StatusNotFound) && r.Method == http.MethodPatch {
+		return nil, api.NewCloudError(http.StatusNotFound, api.CloudErrorCodeResourceNotFound, "", "The Resource '%s/%s/%s/%s' under resource group '%s' was not found.",
+			vars["resourceType"], vars["resourceName"], vars["ocmResourceType"], vars["ocmResourceName"], vars["resourceGroupName"])
 	}
 
 	var resources string
@@ -201,9 +207,12 @@ func (f *frontend) _putOrPatchSyncIdentityProvider(ctx context.Context, log *log
 		return nil, err
 	}
 
-	ocmdoc, _ := f.dbClusterManagerConfiguration.Get(ctx, r.URL.Path)
+	ocmdoc, err := f.dbClusterManagerConfiguration.Get(ctx, r.URL.Path)
 	if err != nil && !cosmosdb.IsErrorStatusCode(err, http.StatusNotFound) {
 		return nil, err
+	} else if cosmosdb.IsErrorStatusCode(err, http.StatusNotFound) && r.Method == http.MethodPatch {
+		return nil, api.NewCloudError(http.StatusNotFound, api.CloudErrorCodeResourceNotFound, "", "The Resource '%s/%s/%s/%s' under resource group '%s' was not found.",
+			vars["resourceType"], vars["resourceName"], vars["ocmResourceType"], vars["ocmResourceName"], vars["resourceGroupName"])
 	}
 
 	var resources string
@@ -270,9 +279,12 @@ func (f *frontend) _putOrPatchSecret(ctx context.Context, log *logrus.Entry, r *
 		return nil, err
 	}
 
-	ocmdoc, _ := f.dbClusterManagerConfiguration.Get(ctx, r.URL.Path)
+	ocmdoc, err := f.dbClusterManagerConfiguration.Get(ctx, r.URL.Path)
 	if err != nil && !cosmosdb.IsErrorStatusCode(err, http.StatusNotFound) {
 		return nil, err
+	} else if cosmosdb.IsErrorStatusCode(err, http.StatusNotFound) && r.Method == http.MethodPatch {
+		return nil, api.NewCloudError(http.StatusNotFound, api.CloudErrorCodeResourceNotFound, "", "The Resource '%s/%s/%s/%s' under resource group '%s' was not found.",
+			vars["resourceType"], vars["resourceName"], vars["ocmResourceType"], vars["ocmResourceName"], vars["resourceGroupName"])
 	}
 
 	var resources string
diff --git a/pkg/frontend/frontend.go b/pkg/frontend/frontend.go
index 667c43ce2..a37ea6ec1 100644
--- a/pkg/frontend/frontend.go
+++ b/pkg/frontend/frontend.go
@@ -264,7 +264,7 @@ func (f *frontend) authenticatedRoutes(r *mux.Router) {
 	s.Methods(http.MethodPost).HandlerFunc(f.postOpenShiftClusterKubeConfigCredentials).Name("postOpenShiftClusterKubeConfigCredentials")
 
 	s = r.
-		Path("/subscriptions/{subscriptionId}/providers/{resourceProviderNamespace}/locations/{location}/listinstallversions").
+		Path("/subscriptions/{subscriptionId}/providers/{resourceProviderNamespace}/locations/{location}/openshiftversions").
 		Queries("api-version", "{api-version}").
 		Subrouter()
 
diff --git a/pkg/swagger/paths.go b/pkg/swagger/paths.go
index 294c2c8d5..d9e08b3b4 100644
--- a/pkg/swagger/paths.go
+++ b/pkg/swagger/paths.go
@@ -128,9 +128,67 @@ func (g *generator) populateResponses(typ string, isDelete bool, statusCodes ...
 	return
 }
 
+func (g *generator) putResourceOperation(parameterSelector int, resourceType string, friendlyName string, longRunning bool) *Operation {
+	return &Operation{
+		Tags:        []string{resourceType + "s"},
+		Summary:     "Creates or updates a " + friendlyName + " with the specified subscription, resource group and resource name.",
+		Description: "The operation returns properties of a " + friendlyName + ".",
+		OperationID: resourceType + "s_CreateOrUpdate",
+		Parameters:  g.populateParameters(parameterSelector, resourceType, friendlyName),
+		Responses: map[string]interface{}{
+			strconv.FormatInt(int64(http.StatusOK), 10): Response{
+				Description: http.StatusText(http.StatusOK),
+				Schema: &Schema{
+					Ref: "#/definitions/" + resourceType,
+				},
+			},
+			strconv.FormatInt(int64(http.StatusCreated), 10): Response{
+				Description: http.StatusText(http.StatusCreated),
+				Schema: &Schema{
+					Ref: "#/definitions/" + resourceType,
+				},
+			},
+			"default": Response{
+				Description: "Error response describing why the operation failed.  If any of the input parameters is wrong, 400 (Bad Request) is returned.",
+				Schema: &Schema{
+					Ref: "#/definitions/CloudError",
+				},
+			},
+		},
+		LongRunningOperation: longRunning,
+	}
+}
+
+func (g *generator) patchResourceOperation(parameterSelector int, resourceType string, friendlyName string, isLongRunning bool) *Operation {
+	return &Operation{
+		Tags:        []string{resourceType + "s"},
+		Summary:     "Updates a " + friendlyName + " with the specified subscription, resource group and resource name.",
+		Description: "The operation returns properties of a " + friendlyName + ".",
+		OperationID: resourceType + "s_Update",
+		Parameters:  g.populateParameters(parameterSelector, resourceType, friendlyName),
+		Responses: map[string]interface{}{
+			strconv.FormatInt(int64(http.StatusOK), 10): Response{
+				Description: http.StatusText(http.StatusOK),
+				Schema: &Schema{
+					Ref: "#/definitions/" + resourceType,
+				},
+			},
+			"default": Response{
+				Description: "Error response describing why the operation failed.  If the resource doesn't exist, 404 (Not Found) is returned.  If any of the input parameters is wrong, 400 (Bad Request) is returned.",
+				Schema: &Schema{
+					Ref: "#/definitions/CloudError",
+				},
+			},
+		},
+		LongRunningOperation: isLongRunning,
+	}
+}
+
 // populateChildResourcePaths populates the paths for a child resource of a top level ARM resoure with list and CRUD operations defined for the path item
 func (g *generator) populateChildResourcePaths(ps Paths, resourceProviderNamespace string, resourceType string, childResourceType string, friendlyName string) {
 	titleCaser := cases.Title(language.Und, cases.NoLower)
+	isLongRunningOperation := false
+
 	ps["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/"+resourceProviderNamespace+"/"+resourceType+"/{resourceName}/"+childResourceType+"s"] = &PathItem{
 		Get: &Operation{
 			Tags:        []string{titleCaser.String(childResourceType) + "s"},
@@ -153,14 +211,7 @@ func (g *generator) populateChildResourcePaths(ps Paths, resourceProviderNamespa
 			Parameters:  g.populateParameters(7, titleCaser.String(childResourceType), friendlyName),
 			Responses:   g.populateResponses(titleCaser.String(childResourceType), false, http.StatusOK),
 		},
-		Put: &Operation{
-			Tags:        []string{titleCaser.String(childResourceType) + "s"},
-			Summary:     "Creates or updates a " + friendlyName + " with the specified subscription, resource group and resource name.",
-			Description: "The operation returns properties of a " + friendlyName + ".",
-			OperationID: titleCaser.String(childResourceType) + "s_CreateOrUpdate",
-			Parameters:  g.populateParameters(8, titleCaser.String(childResourceType), friendlyName),
-			Responses:   g.populateResponses(titleCaser.String(childResourceType), false, http.StatusOK, http.StatusCreated),
-		},
+		Put: g.putResourceOperation(8, titleCaser.String(childResourceType), friendlyName, isLongRunningOperation),
 		Delete: &Operation{
 			Tags:        []string{titleCaser.String(childResourceType) + "s"},
 			Summary:     "Deletes a " + friendlyName + " with the specified subscription, resource group and resource name.",
@@ -169,14 +220,7 @@ func (g *generator) populateChildResourcePaths(ps Paths, resourceProviderNamespa
 			Parameters:  g.populateParameters(7, titleCaser.String(childResourceType), friendlyName),
 			Responses:   g.populateResponses(titleCaser.String(childResourceType), true, http.StatusOK, http.StatusNoContent),
 		},
-		Patch: &Operation{
-			Tags:        []string{titleCaser.String(childResourceType) + "s"},
-			Summary:     "Patches (create or update) a " + friendlyName + " with the specified subscription, resource group and resource name.",
-			Description: "The operation returns properties of a " + friendlyName + ".",
-			OperationID: titleCaser.String(childResourceType) + "s_Update",
-			Parameters:  g.populateParameters(9, titleCaser.String(childResourceType), friendlyName),
-			Responses:   g.populateResponses(titleCaser.String(childResourceType), false, http.StatusOK, http.StatusCreated),
-		},
+		Patch: g.patchResourceOperation(9, titleCaser.String(childResourceType), friendlyName, isLongRunningOperation),
 	}
 }
 
diff --git a/pkg/swagger/swagger.go b/pkg/swagger/swagger.go
index 63c3a256a..90d3f995d 100644
--- a/pkg/swagger/swagger.go
+++ b/pkg/swagger/swagger.go
@@ -44,6 +44,17 @@ func Run(api, outputDir string) error {
 		Produces:    []string{"application/json"},
 		Paths:       g.populateTopLevelPaths("Microsoft.RedHatOpenShift", "openShiftCluster", "OpenShift cluster"),
 		Definitions: Definitions{},
+		Parameters: ParametersDefinitions{
+			"api-version": &Parameter{
+				Name:                 "api-version",
+				Description:          "The version of the API the caller wants to use.",
+				Required:             true,
+				Type:                 "string",
+				In:                   "query",
+				Pattern:              "^\\d{2}-\\d{2}-\\d{4}(-preview)?$",
+				XMSParameterLocation: "client",
+			},
+		},
 		SecurityDefinitions: SecurityDefinitions{
 			"azure_auth": {
 				Type:             "oauth2",
@@ -101,7 +112,7 @@ func Run(api, outputDir string) error {
 	}
 
 	if g.installVersionList {
-		s.Paths["/subscriptions/{subscriptionId}/providers/Microsoft.RedHatOpenShift/locations/{location}/listinstallversions"] = &PathItem{
+		s.Paths["/subscriptions/{subscriptionId}/providers/Microsoft.RedHatOpenShift/locations/{location}/openshiftversions"] = &PathItem{
 			Get: &Operation{
 				Tags:        []string{"OpenShiftVersions"},
 				Summary:     "Lists all OpenShift versions available to install in the specified location.",
@@ -109,6 +120,9 @@ func Run(api, outputDir string) error {
 				OperationID: "OpenShiftVersions_List",
 				Parameters:  g.populateParameters(6, "OpenShiftVersionList", "OpenShift Versions"),
 				Responses:   g.populateResponses("OpenShiftVersionList", false, http.StatusOK),
+				Pageable: &Pageable{
+					NextLinkName: "nextLink",
+				},
 			},
 		}
 	}
diff --git a/pkg/swagger/types.go b/pkg/swagger/types.go
index ea664620e..531557c65 100644
--- a/pkg/swagger/types.go
+++ b/pkg/swagger/types.go
@@ -129,6 +129,8 @@ type Parameter struct {
 	UniqueItems      bool          `json:"uniqueItems,omitempty"`
 	Enum             []interface{} `json:"enum,omitempty"`
 	MultipleOf       int           `json:"multipleOf,omitempty"`
+
+	XMSParameterLocation string `json:"x-ms-parameter-location,omitempty"`
 }
 
 // Items represents an Items object
diff --git a/pkg/util/liveconfig/hive.go b/pkg/util/liveconfig/hive.go
index 4cc4728ec..d6a06b203 100644
--- a/pkg/util/liveconfig/hive.go
+++ b/pkg/util/liveconfig/hive.go
@@ -19,7 +19,7 @@ import (
 func getAksClusterByNameAndLocation(ctx context.Context, aksClusters mgmtcontainerservice.ManagedClusterListResultPage, aksClusterName, location string) (*mgmtcontainerservice.ManagedCluster, error) {
 	for aksClusters.NotDone() {
 		for _, cluster := range aksClusters.Values() {
-			if *cluster.Name == aksClusterName && *cluster.Location == location {
+			if strings.EqualFold(*cluster.Name, aksClusterName) && strings.EqualFold(*cluster.Location, location) {
 				return &cluster, nil
 			}
 		}
diff --git a/python/client/azure/mgmt/redhatopenshift/v2022_09_04/operations/_machine_pools_operations.py b/python/client/azure/mgmt/redhatopenshift/v2022_09_04/operations/_machine_pools_operations.py
index 74aa885ba..172652dcc 100644
--- a/python/client/azure/mgmt/redhatopenshift/v2022_09_04/operations/_machine_pools_operations.py
+++ b/python/client/azure/mgmt/redhatopenshift/v2022_09_04/operations/_machine_pools_operations.py
@@ -558,8 +558,7 @@ class MachinePoolsOperations(object):
         **kwargs  # type: Any
     ):
         # type: (...) -> "_models.MachinePool"
-        """Patches (create or update) a MachinePool with the specified subscription, resource group and
-        resource name.
+        """Updates a MachinePool with the specified subscription, resource group and resource name.
 
         The operation returns properties of a MachinePool.
 
@@ -607,15 +606,11 @@ class MachinePoolsOperations(object):
         )
         response = pipeline_response.http_response
 
-        if response.status_code not in [200, 201]:
+        if response.status_code not in [200]:
             map_error(status_code=response.status_code, response=response, error_map=error_map)
             raise HttpResponseError(response=response, error_format=ARMErrorFormat)
 
-        if response.status_code == 200:
-            deserialized = self._deserialize('MachinePool', pipeline_response)
-
-        if response.status_code == 201:
-            deserialized = self._deserialize('MachinePool', pipeline_response)
+        deserialized = self._deserialize('MachinePool', pipeline_response)
 
         if cls:
             return cls(pipeline_response, deserialized, {})
diff --git a/python/client/azure/mgmt/redhatopenshift/v2022_09_04/operations/_open_shift_versions_operations.py b/python/client/azure/mgmt/redhatopenshift/v2022_09_04/operations/_open_shift_versions_operations.py
index d51d26dc7..3315aab33 100644
--- a/python/client/azure/mgmt/redhatopenshift/v2022_09_04/operations/_open_shift_versions_operations.py
+++ b/python/client/azure/mgmt/redhatopenshift/v2022_09_04/operations/_open_shift_versions_operations.py
@@ -19,6 +19,7 @@ from typing import TYPE_CHECKING
 from msrest import Serializer
 
 from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
+from azure.core.paging import ItemPaged
 from azure.core.pipeline import PipelineResponse
 from azure.core.pipeline.transport import HttpResponse
 from azure.core.rest import HttpRequest
@@ -30,7 +31,7 @@ from .._vendor import _convert_request, _format_url_section
 
 if TYPE_CHECKING:
     # pylint: disable=unused-import,ungrouped-imports
-    from typing import Any, Callable, Dict, Optional, TypeVar
+    from typing import Any, Callable, Dict, Iterable, Optional, TypeVar
     T = TypeVar('T')
     ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
 
@@ -48,7 +49,7 @@ def build_list_request(
 
     accept = "application/json"
     # Construct URL
-    _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.RedHatOpenShift/locations/{location}/listinstallversions")  # pylint: disable=line-too-long
+    _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.RedHatOpenShift/locations/{location}/openshiftversions")  # pylint: disable=line-too-long
     path_format_arguments = {
         "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1),
         "location": _SERIALIZER.url("location", location, 'str', min_length=1),
@@ -101,7 +102,7 @@ class OpenShiftVersionsOperations(object):
         location,  # type: str
         **kwargs  # type: Any
     ):
-        # type: (...) -> "_models.OpenShiftVersionList"
+        # type: (...) -> Iterable["_models.OpenShiftVersionList"]
         """Lists all OpenShift versions available to install in the specified location.
 
         The operation returns the installable OpenShift versions as strings.
@@ -109,45 +110,69 @@ class OpenShiftVersionsOperations(object):
         :param location: The name of Azure region.
         :type location: str
         :keyword callable cls: A custom type or function that will be passed the direct response
-        :return: OpenShiftVersionList, or the result of cls(response)
-        :rtype: ~azure.mgmt.redhatopenshift.v2022_09_04.models.OpenShiftVersionList
+        :return: An iterator like instance of either OpenShiftVersionList or the result of
+         cls(response)
+        :rtype:
+         ~azure.core.paging.ItemPaged[~azure.mgmt.redhatopenshift.v2022_09_04.models.OpenShiftVersionList]
         :raises: ~azure.core.exceptions.HttpResponseError
         """
+        api_version = kwargs.pop('api_version', "2022-09-04")  # type: str
+
         cls = kwargs.pop('cls', None)  # type: ClsType["_models.OpenShiftVersionList"]
         error_map = {
             401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
         }
         error_map.update(kwargs.pop('error_map', {}))
-
-        api_version = kwargs.pop('api_version', "2022-09-04")  # type: str
-
-        
-        request = build_list_request(
-            subscription_id=self._config.subscription_id,
-            location=location,
-            api_version=api_version,
-            template_url=self.list.metadata['url'],
-        )
-        request = _convert_request(request)
-        request.url = self._client.format_url(request.url)
-
-        pipeline_response = self._client._pipeline.run(  # pylint: disable=protected-access
-            request,
-            stream=False,
-            **kwargs
+        def prepare_request(next_link=None):
+            if not next_link:
+                
+                request = build_list_request(
+                    subscription_id=self._config.subscription_id,
+                    location=location,
+                    api_version=api_version,
+                    template_url=self.list.metadata['url'],
+                )
+                request = _convert_request(request)
+                request.url = self._client.format_url(request.url)
+
+            else:
+                
+                request = build_list_request(
+                    subscription_id=self._config.subscription_id,
+                    location=location,
+                    api_version=api_version,
+                    template_url=next_link,
+                )
+                request = _convert_request(request)
+                request.url = self._client.format_url(request.url)
+                request.method = "GET"
+            return request
+
+        def extract_data(pipeline_response):
+            deserialized = self._deserialize("OpenShiftVersionList", pipeline_response)
+            list_of_elem = deserialized.value
+            if cls:
+                list_of_elem = cls(list_of_elem)
+            return deserialized.next_link or None, iter(list_of_elem)
+
+        def get_next(next_link=None):
+            request = prepare_request(next_link)
+
+            pipeline_response = self._client._pipeline.run(  # pylint: disable=protected-access
+                request,
+                stream=False,
+                **kwargs
+            )
+            response = pipeline_response.http_response
+
+            if response.status_code not in [200]:
+                map_error(status_code=response.status_code, response=response, error_map=error_map)
+                raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+            return pipeline_response
+
+
+        return ItemPaged(
+            get_next, extract_data
         )
-        response = pipeline_response.http_response
-
-        if response.status_code not in [200]:
-            map_error(status_code=response.status_code, response=response, error_map=error_map)
-            raise HttpResponseError(response=response, error_format=ARMErrorFormat)
-
-        deserialized = self._deserialize('OpenShiftVersionList', pipeline_response)
-
-        if cls:
-            return cls(pipeline_response, deserialized, {})
-
-        return deserialized
-
-    list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.RedHatOpenShift/locations/{location}/listinstallversions"}  # type: ignore
-
+    list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.RedHatOpenShift/locations/{location}/openshiftversions"}  # type: ignore
diff --git a/python/client/azure/mgmt/redhatopenshift/v2022_09_04/operations/_secrets_operations.py b/python/client/azure/mgmt/redhatopenshift/v2022_09_04/operations/_secrets_operations.py
index 1d208a63f..cc871dd96 100644
--- a/python/client/azure/mgmt/redhatopenshift/v2022_09_04/operations/_secrets_operations.py
+++ b/python/client/azure/mgmt/redhatopenshift/v2022_09_04/operations/_secrets_operations.py
@@ -556,8 +556,7 @@ class SecretsOperations(object):
         **kwargs  # type: Any
     ):
         # type: (...) -> "_models.Secret"
-        """Patches (create or update) a Secret with the specified subscription, resource group and
-        resource name.
+        """Updates a Secret with the specified subscription, resource group and resource name.
 
         The operation returns properties of a Secret.
 
@@ -605,15 +604,11 @@ class SecretsOperations(object):
         )
         response = pipeline_response.http_response
 
-        if response.status_code not in [200, 201]:
+        if response.status_code not in [200]:
             map_error(status_code=response.status_code, response=response, error_map=error_map)
             raise HttpResponseError(response=response, error_format=ARMErrorFormat)
 
-        if response.status_code == 200:
-            deserialized = self._deserialize('Secret', pipeline_response)
-
-        if response.status_code == 201:
-            deserialized = self._deserialize('Secret', pipeline_response)
+        deserialized = self._deserialize('Secret', pipeline_response)
 
         if cls:
             return cls(pipeline_response, deserialized, {})
diff --git a/python/client/azure/mgmt/redhatopenshift/v2022_09_04/operations/_sync_identity_providers_operations.py b/python/client/azure/mgmt/redhatopenshift/v2022_09_04/operations/_sync_identity_providers_operations.py
index 82c2ed67e..bbb80376f 100644
--- a/python/client/azure/mgmt/redhatopenshift/v2022_09_04/operations/_sync_identity_providers_operations.py
+++ b/python/client/azure/mgmt/redhatopenshift/v2022_09_04/operations/_sync_identity_providers_operations.py
@@ -560,8 +560,8 @@ class SyncIdentityProvidersOperations(object):
         **kwargs  # type: Any
     ):
         # type: (...) -> "_models.SyncIdentityProvider"
-        """Patches (create or update) a SyncIdentityProvider with the specified subscription, resource
-        group and resource name.
+        """Updates a SyncIdentityProvider with the specified subscription, resource group and resource
+        name.
 
         The operation returns properties of a SyncIdentityProvider.
 
@@ -609,15 +609,11 @@ class SyncIdentityProvidersOperations(object):
         )
         response = pipeline_response.http_response
 
-        if response.status_code not in [200, 201]:
+        if response.status_code not in [200]:
             map_error(status_code=response.status_code, response=response, error_map=error_map)
             raise HttpResponseError(response=response, error_format=ARMErrorFormat)
 
-        if response.status_code == 200:
-            deserialized = self._deserialize('SyncIdentityProvider', pipeline_response)
-
-        if response.status_code == 201:
-            deserialized = self._deserialize('SyncIdentityProvider', pipeline_response)
+        deserialized = self._deserialize('SyncIdentityProvider', pipeline_response)
 
         if cls:
             return cls(pipeline_response, deserialized, {})
diff --git a/python/client/azure/mgmt/redhatopenshift/v2022_09_04/operations/_sync_sets_operations.py b/python/client/azure/mgmt/redhatopenshift/v2022_09_04/operations/_sync_sets_operations.py
index b4d598410..210165114 100644
--- a/python/client/azure/mgmt/redhatopenshift/v2022_09_04/operations/_sync_sets_operations.py
+++ b/python/client/azure/mgmt/redhatopenshift/v2022_09_04/operations/_sync_sets_operations.py
@@ -557,8 +557,7 @@ class SyncSetsOperations(object):
         **kwargs  # type: Any
     ):
         # type: (...) -> "_models.SyncSet"
-        """Patches (create or update) a SyncSet with the specified subscription, resource group and
-        resource name.
+        """Updates a SyncSet with the specified subscription, resource group and resource name.
 
         The operation returns properties of a SyncSet.
 
@@ -606,15 +605,11 @@ class SyncSetsOperations(object):
         )
         response = pipeline_response.http_response
 
-        if response.status_code not in [200, 201]:
+        if response.status_code not in [200]:
             map_error(status_code=response.status_code, response=response, error_map=error_map)
             raise HttpResponseError(response=response, error_format=ARMErrorFormat)
 
-        if response.status_code == 200:
-            deserialized = self._deserialize('SyncSet', pipeline_response)
-
-        if response.status_code == 201:
-            deserialized = self._deserialize('SyncSet', pipeline_response)
+        deserialized = self._deserialize('SyncSet', pipeline_response)
 
         if cls:
             return cls(pipeline_response, deserialized, {})
diff --git a/swagger/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/preview/2021-09-01-preview/redhatopenshift.json b/swagger/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/preview/2021-09-01-preview/redhatopenshift.json
index c23f0e6f9..d4c1c8b1f 100644
--- a/swagger/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/preview/2021-09-01-preview/redhatopenshift.json
+++ b/swagger/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/preview/2021-09-01-preview/redhatopenshift.json
@@ -916,6 +916,17 @@
       }
     }
   },
+  "parameters": {
+    "api-version": {
+      "name": "api-version",
+      "in": "query",
+      "description": "The version of the API the caller wants to use.",
+      "required": true,
+      "type": "string",
+      "pattern": "^\\d{2}-\\d{2}-\\d{4}(-preview)?$",
+      "x-ms-parameter-location": "client"
+    }
+  },
   "securityDefinitions": {
     "azure_auth": {
       "type": "oauth2",
diff --git a/swagger/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/stable/2020-04-30/redhatopenshift.json b/swagger/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/stable/2020-04-30/redhatopenshift.json
index b65fb71da..e4d6b38d4 100644
--- a/swagger/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/stable/2020-04-30/redhatopenshift.json
+++ b/swagger/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/stable/2020-04-30/redhatopenshift.json
@@ -789,6 +789,17 @@
       }
     }
   },
+  "parameters": {
+    "api-version": {
+      "name": "api-version",
+      "in": "query",
+      "description": "The version of the API the caller wants to use.",
+      "required": true,
+      "type": "string",
+      "pattern": "^\\d{2}-\\d{2}-\\d{4}(-preview)?$",
+      "x-ms-parameter-location": "client"
+    }
+  },
   "securityDefinitions": {
     "azure_auth": {
       "type": "oauth2",
diff --git a/swagger/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/stable/2022-04-01/redhatopenshift.json b/swagger/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/stable/2022-04-01/redhatopenshift.json
index 8e87d69ac..78dd3b1ee 100644
--- a/swagger/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/stable/2022-04-01/redhatopenshift.json
+++ b/swagger/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/stable/2022-04-01/redhatopenshift.json
@@ -892,6 +892,17 @@
       }
     }
   },
+  "parameters": {
+    "api-version": {
+      "name": "api-version",
+      "in": "query",
+      "description": "The version of the API the caller wants to use.",
+      "required": true,
+      "type": "string",
+      "pattern": "^\\d{2}-\\d{2}-\\d{4}(-preview)?$",
+      "x-ms-parameter-location": "client"
+    }
+  },
   "securityDefinitions": {
     "azure_auth": {
       "type": "oauth2",
diff --git a/swagger/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/stable/2022-09-04/examples/MachinePools_Update.json b/swagger/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/stable/2022-09-04/examples/MachinePools_Update.json
index 8eee039d4..a008ed2f5 100644
--- a/swagger/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/stable/2022-09-04/examples/MachinePools_Update.json
+++ b/swagger/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/stable/2022-09-04/examples/MachinePools_Update.json
@@ -21,16 +21,6 @@
           "resources": "ewogICAgImFwaVZlcnNpb24iOiAiaGl2ZS5vcGVuc2hpZnQuaW8vdjEiLAogICAgImtpbmQiOiAiTWFjaGluZVBvb2wiLAogICAgIm1ldGFkYXRhIjogewogICAgICAgICJuYW1lIjogInRlc3QtY2x1c3Rlci13b3JrZXIiLAogICAgICAgICJuYW1lc3BhY2UiOiAiYXJvLWY2MGFlOGEyLWJjYTEtNDk4Ny05MDU2LVhYWFhYWFhYWFhYWCIKICAgIH0sCiAgICAic3BlYyI6IHsKICAgICAgICAiY2x1c3RlckRlcGxveW1lbnRSZWYiOiB7CiAgICAgICAgICAgICJuYW1lIjogInRlc3QtY2x1c3RlciIKICAgICAgICB9LAogICAgICAgICJuYW1lIjogIndvcmtlciIsCiAgICAgICAgInBsYXRmb3JtIjogewogICAgICAgICAgICAiYXdzIjogewogICAgICAgICAgICAgICAgInJvb3RWb2x1bWUiOiB7CiAgICAgICAgICAgICAgICAgICAgImlvcHMiOiAwLAogICAgICAgICAgICAgICAgICAgICJzaXplIjogMzAwLAogICAgICAgICAgICAgICAgICAgICJ0eXBlIjogImdwMyIKICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICAidHlwZSI6ICJtNS54bGFyZ2UiLAogICAgICAgICAgICAgICAgInpvbmVzIjogWwogICAgICAgICAgICAgICAgICAgICJ1cy1lYXN0LTFhIgogICAgICAgICAgICAgICAgXQogICAgICAgICAgICB9CiAgICAgICAgfSwKICAgICAgICAicmVwbGljYXMiOiAyCiAgICB9LAogICAgInN0YXR1cyI6IHsKICAgICAgICAiY29uZGl0aW9ucyI6IFsKICAgICAgICBdCiAgICB9Cn0K"
         }
       }
-    },
-    "201": {
-      "body": {
-        "id": "/subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.RedHatOpenShift/OpenShiftClusters/resourceName/machinePools/myMachinePool",
-        "name": "myMachinePool",
-        "type": "Microsoft.RedHatOpenShift/OpenShiftClusters/MachinePools",
-        "properties": {
-          "resources": "ewogICAgImFwaVZlcnNpb24iOiAiaGl2ZS5vcGVuc2hpZnQuaW8vdjEiLAogICAgImtpbmQiOiAiTWFjaGluZVBvb2wiLAogICAgIm1ldGFkYXRhIjogewogICAgICAgICJuYW1lIjogInRlc3QtY2x1c3Rlci13b3JrZXIiLAogICAgICAgICJuYW1lc3BhY2UiOiAiYXJvLWY2MGFlOGEyLWJjYTEtNDk4Ny05MDU2LVhYWFhYWFhYWFhYWCIKICAgIH0sCiAgICAic3BlYyI6IHsKICAgICAgICAiY2x1c3RlckRlcGxveW1lbnRSZWYiOiB7CiAgICAgICAgICAgICJuYW1lIjogInRlc3QtY2x1c3RlciIKICAgICAgICB9LAogICAgICAgICJuYW1lIjogIndvcmtlciIsCiAgICAgICAgInBsYXRmb3JtIjogewogICAgICAgICAgICAiYXdzIjogewogICAgICAgICAgICAgICAgInJvb3RWb2x1bWUiOiB7CiAgICAgICAgICAgICAgICAgICAgImlvcHMiOiAwLAogICAgICAgICAgICAgICAgICAgICJzaXplIjogMzAwLAogICAgICAgICAgICAgICAgICAgICJ0eXBlIjogImdwMyIKICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICAidHlwZSI6ICJtNS54bGFyZ2UiLAogICAgICAgICAgICAgICAgInpvbmVzIjogWwogICAgICAgICAgICAgICAgICAgICJ1cy1lYXN0LTFhIgogICAgICAgICAgICAgICAgXQogICAgICAgICAgICB9CiAgICAgICAgfSwKICAgICAgICAicmVwbGljYXMiOiAyCiAgICB9LAogICAgInN0YXR1cyI6IHsKICAgICAgICAiY29uZGl0aW9ucyI6IFsKICAgICAgICBdCiAgICB9Cn0K"
-        }
-      }
     }
   }
 }
diff --git a/swagger/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/stable/2022-09-04/examples/Secrets_Update.json b/swagger/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/stable/2022-09-04/examples/Secrets_Update.json
index 47b6bebc6..0f34f3afc 100644
--- a/swagger/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/stable/2022-09-04/examples/Secrets_Update.json
+++ b/swagger/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/stable/2022-09-04/examples/Secrets_Update.json
@@ -17,14 +17,6 @@
         "type": "Microsoft.RedHatOpenShift/OpenShiftClusters/Secrets",
         "properties": {}
       }
-    },
-    "201": {
-      "body": {
-        "id": "/subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.RedHatOpenShift/OpenShiftClusters/resourceName/secret/mySecret",
-        "name": "mySecret",
-        "type": "Microsoft.RedHatOpenShift/OpenShiftClusters/Secrets",
-        "properties": {}
-      }
     }
   }
 }
diff --git a/swagger/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/stable/2022-09-04/examples/SyncIdentityProviders_Update.json b/swagger/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/stable/2022-09-04/examples/SyncIdentityProviders_Update.json
index ee9fee5dc..6b7dbfa8c 100644
--- a/swagger/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/stable/2022-09-04/examples/SyncIdentityProviders_Update.json
+++ b/swagger/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/stable/2022-09-04/examples/SyncIdentityProviders_Update.json
@@ -21,16 +21,6 @@
           "resources": "ewogICAgImFwaVZlcnNpb24iOiAiaGl2ZS5vcGVuc2hpZnQuaW8vdjEiLAogICAgImtpbmQiOiAiU3luY0lkZW50aXR5UHJvdmlkZXIiLAogICAgIm1ldGFkYXRhIjogewogICAgICAgICJuYW1lIjogInRlc3QtY2x1c3RlciIsCiAgICAgICAgIm5hbWVzcGFjZSI6ICJhcm8tZjYwYWU4YTItYmNhMS00OTg3LTkwNTYtWFhYWFhYWFhYWFhYIgogICAgfSwKICAgICJzcGVjIjogewogICAgICAgICJjbHVzdGVyRGVwbG95bWVudFJlZnMiOiBbCiAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICJuYW1lIjogInRlc3QtY2x1c3RlciIKICAgICAgICAgICAgfQogICAgICAgIF0sCiAgICAgICAgImlkZW50aXR5UHJvdmlkZXJzIjogWwogICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAiaHRwYXNzd2QiOiB7CiAgICAgICAgICAgICAgICAgICAgImZpbGVEYXRhIjogewogICAgICAgICAgICAgICAgICAgICAgICAibmFtZSI6ICJodHBhc3N3ZC1zZWNyZXQiCiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgICJtYXBwaW5nTWV0aG9kIjogImNsYWltIiwKICAgICAgICAgICAgICAgICJuYW1lIjogIkhUUGFzc3dkIiwKICAgICAgICAgICAgICAgICJ0eXBlIjogIkhUUGFzc3dkIgogICAgICAgICAgICB9CiAgICAgICAgXQogICAgfSwKICAgICJzdGF0dXMiOiB7fQp9Cg=="
         }
       }
-    },
-    "201": {
-      "body": {
-        "id": "/subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.RedHatOpenShift/OpenShiftClusters/resourceName/syncidentityprovider/mySyncIdentityProvider",
-        "name": "mySyncIdentityProvider",
-        "type": "Microsoft.RedHatOpenShift/OpenShiftClusters/SyncIdentityProviders",
-        "properties": {
-          "resources": "ewogICAgImFwaVZlcnNpb24iOiAiaGl2ZS5vcGVuc2hpZnQuaW8vdjEiLAogICAgImtpbmQiOiAiU3luY0lkZW50aXR5UHJvdmlkZXIiLAogICAgIm1ldGFkYXRhIjogewogICAgICAgICJuYW1lIjogInRlc3QtY2x1c3RlciIsCiAgICAgICAgIm5hbWVzcGFjZSI6ICJhcm8tZjYwYWU4YTItYmNhMS00OTg3LTkwNTYtWFhYWFhYWFhYWFhYIgogICAgfSwKICAgICJzcGVjIjogewogICAgICAgICJjbHVzdGVyRGVwbG95bWVudFJlZnMiOiBbCiAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICJuYW1lIjogInRlc3QtY2x1c3RlciIKICAgICAgICAgICAgfQogICAgICAgIF0sCiAgICAgICAgImlkZW50aXR5UHJvdmlkZXJzIjogWwogICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAiaHRwYXNzd2QiOiB7CiAgICAgICAgICAgICAgICAgICAgImZpbGVEYXRhIjogewogICAgICAgICAgICAgICAgICAgICAgICAibmFtZSI6ICJodHBhc3N3ZC1zZWNyZXQiCiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgICJtYXBwaW5nTWV0aG9kIjogImNsYWltIiwKICAgICAgICAgICAgICAgICJuYW1lIjogIkhUUGFzc3dkIiwKICAgICAgICAgICAgICAgICJ0eXBlIjogIkhUUGFzc3dkIgogICAgICAgICAgICB9CiAgICAgICAgXQogICAgfSwKICAgICJzdGF0dXMiOiB7fQp9Cg=="
-        }
-      }
     }
   }
 }
diff --git a/swagger/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/stable/2022-09-04/examples/SyncSets_Update.json b/swagger/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/stable/2022-09-04/examples/SyncSets_Update.json
index 2cd69fbfa..3b6c51a4c 100644
--- a/swagger/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/stable/2022-09-04/examples/SyncSets_Update.json
+++ b/swagger/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/stable/2022-09-04/examples/SyncSets_Update.json
@@ -21,16 +21,6 @@
           "resources": "eyAKICAiYXBpVmVyc2lvbiI6ICJoaXZlLm9wZW5zaGlmdC5pby92MSIsCiAgImtpbmQiOiAiU3luY1NldCIsCiAgIm1ldGFkYXRhIjogewogICAgIm5hbWUiOiAic2FtcGxlIiwKICAgICJuYW1lc3BhY2UiOiAiYXJvLWY2MGFlOGEyLWJjYTEtNDk4Ny05MDU2LWYyZjZhMTgzN2NhYSIKICB9LAogICJzcGVjIjogewogICAgImNsdXN0ZXJEZXBsb3ltZW50UmVmcyI6IFtdLAogICAgInJlc291cmNlcyI6IFsKICAgICAgewogICAgICAgICJhcGlWZXJzaW9uIjogInYxIiwKICAgICAgICAia2luZCI6ICJDb25maWdNYXAiLAogICAgICAgICJtZXRhZGF0YSI6IHsKICAgICAgICAgICJuYW1lIjogIm15Y29uZmlnbWFwIgogICAgICAgIH0KICAgICAgfQogICAgXQogIH0KfQo="
         }
       }
-    },
-    "201": {
-      "body": {
-        "id": "/subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.RedHatOpenShift/OpenShiftClusters/resourceName/syncSets/mySyncSet",
-        "name": "mySyncSet",
-        "type": "Microsoft.RedHatOpenShift/OpenShiftClusters/SyncSets",
-        "properties": {
-          "resources": "eyAKICAiYXBpVmVyc2lvbiI6ICJoaXZlLm9wZW5zaGlmdC5pby92MSIsCiAgImtpbmQiOiAiU3luY1NldCIsCiAgIm1ldGFkYXRhIjogewogICAgIm5hbWUiOiAic2FtcGxlIiwKICAgICJuYW1lc3BhY2UiOiAiYXJvLWY2MGFlOGEyLWJjYTEtNDk4Ny05MDU2LWYyZjZhMTgzN2NhYSIKICB9LAogICJzcGVjIjogewogICAgImNsdXN0ZXJEZXBsb3ltZW50UmVmcyI6IFtdLAogICAgInJlc291cmNlcyI6IFsKICAgICAgewogICAgICAgICJhcGlWZXJzaW9uIjogInYxIiwKICAgICAgICAia2luZCI6ICJDb25maWdNYXAiLAogICAgICAgICJtZXRhZGF0YSI6IHsKICAgICAgICAgICJuYW1lIjogIm15Y29uZmlnbWFwIgogICAgICAgIH0KICAgICAgfQogICAgXQogIH0KfQo="
-        }
-      }
     }
   }
 }
diff --git a/swagger/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/stable/2022-09-04/redhatopenshift.json b/swagger/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/stable/2022-09-04/redhatopenshift.json
index af32fdcc1..4dfac3d78 100644
--- a/swagger/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/stable/2022-09-04/redhatopenshift.json
+++ b/swagger/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/stable/2022-09-04/redhatopenshift.json
@@ -53,7 +53,7 @@
         }
       }
     },
-    "/subscriptions/{subscriptionId}/providers/Microsoft.RedHatOpenShift/locations/{location}/listinstallversions": {
+    "/subscriptions/{subscriptionId}/providers/Microsoft.RedHatOpenShift/locations/{location}/openshiftversions": {
       "get": {
         "tags": [
           "OpenShiftVersions"
@@ -90,6 +90,9 @@
           "Lists all OpenShift versions available to install in the specified location.": {
             "$ref": "./examples/OpenShiftVersions_List.json"
           }
+        },
+        "x-ms-pageable": {
+          "nextLinkName": "nextLink"
         }
       }
     },
@@ -793,7 +796,7 @@
             }
           },
           "default": {
-            "description": "Error response describing why the operation failed.  If the resource doesn't exist, 404 (Not Found) is returned.  If any of the input parameters is wrong, 400 (Bad Request) is returned.",
+            "description": "Error response describing why the operation failed.  If any of the input parameters is wrong, 400 (Bad Request) is returned.",
             "schema": {
               "$ref": "#/definitions/CloudError"
             }
@@ -861,7 +864,7 @@
         "tags": [
           "MachinePools"
         ],
-        "summary": "Patches (create or update) a MachinePool with the specified subscription, resource group and resource name.",
+        "summary": "Updates a MachinePool with the specified subscription, resource group and resource name.",
         "description": "The operation returns properties of a MachinePool.",
         "operationId": "MachinePools_Update",
         "parameters": [
@@ -905,12 +908,6 @@
               "$ref": "#/definitions/MachinePool"
             }
           },
-          "201": {
-            "description": "Created",
-            "schema": {
-              "$ref": "#/definitions/MachinePool"
-            }
-          },
           "default": {
             "description": "Error response describing why the operation failed.  If the resource doesn't exist, 404 (Not Found) is returned.  If any of the input parameters is wrong, 400 (Bad Request) is returned.",
             "schema": {
@@ -919,7 +916,7 @@
           }
         },
         "x-ms-examples": {
-          "Patches (create or update) a MachinePool with the specified subscription, resource group and resource name.": {
+          "Updates a MachinePool with the specified subscription, resource group and resource name.": {
             "$ref": "./examples/MachinePools_Update.json"
           }
         }
@@ -1033,7 +1030,7 @@
             }
           },
           "default": {
-            "description": "Error response describing why the operation failed.  If the resource doesn't exist, 404 (Not Found) is returned.  If any of the input parameters is wrong, 400 (Bad Request) is returned.",
+            "description": "Error response describing why the operation failed.  If any of the input parameters is wrong, 400 (Bad Request) is returned.",
             "schema": {
               "$ref": "#/definitions/CloudError"
             }
@@ -1101,7 +1098,7 @@
         "tags": [
           "Secrets"
         ],
-        "summary": "Patches (create or update) a Secret with the specified subscription, resource group and resource name.",
+        "summary": "Updates a Secret with the specified subscription, resource group and resource name.",
         "description": "The operation returns properties of a Secret.",
         "operationId": "Secrets_Update",
         "parameters": [
@@ -1145,12 +1142,6 @@
               "$ref": "#/definitions/Secret"
             }
           },
-          "201": {
-            "description": "Created",
-            "schema": {
-              "$ref": "#/definitions/Secret"
-            }
-          },
           "default": {
             "description": "Error response describing why the operation failed.  If the resource doesn't exist, 404 (Not Found) is returned.  If any of the input parameters is wrong, 400 (Bad Request) is returned.",
             "schema": {
@@ -1159,7 +1150,7 @@
           }
         },
         "x-ms-examples": {
-          "Patches (create or update) a Secret with the specified subscription, resource group and resource name.": {
+          "Updates a Secret with the specified subscription, resource group and resource name.": {
             "$ref": "./examples/Secrets_Update.json"
           }
         }
@@ -1273,7 +1264,7 @@
             }
           },
           "default": {
-            "description": "Error response describing why the operation failed.  If the resource doesn't exist, 404 (Not Found) is returned.  If any of the input parameters is wrong, 400 (Bad Request) is returned.",
+            "description": "Error response describing why the operation failed.  If any of the input parameters is wrong, 400 (Bad Request) is returned.",
             "schema": {
               "$ref": "#/definitions/CloudError"
             }
@@ -1341,7 +1332,7 @@
         "tags": [
           "SyncIdentityProviders"
         ],
-        "summary": "Patches (create or update) a SyncIdentityProvider with the specified subscription, resource group and resource name.",
+        "summary": "Updates a SyncIdentityProvider with the specified subscription, resource group and resource name.",
         "description": "The operation returns properties of a SyncIdentityProvider.",
         "operationId": "SyncIdentityProviders_Update",
         "parameters": [
@@ -1385,12 +1376,6 @@
               "$ref": "#/definitions/SyncIdentityProvider"
             }
           },
-          "201": {
-            "description": "Created",
-            "schema": {
-              "$ref": "#/definitions/SyncIdentityProvider"
-            }
-          },
           "default": {
             "description": "Error response describing why the operation failed.  If the resource doesn't exist, 404 (Not Found) is returned.  If any of the input parameters is wrong, 400 (Bad Request) is returned.",
             "schema": {
@@ -1399,7 +1384,7 @@
           }
         },
         "x-ms-examples": {
-          "Patches (create or update) a SyncIdentityProvider with the specified subscription, resource group and resource name.": {
+          "Updates a SyncIdentityProvider with the specified subscription, resource group and resource name.": {
             "$ref": "./examples/SyncIdentityProviders_Update.json"
           }
         }
@@ -1513,7 +1498,7 @@
             }
           },
           "default": {
-            "description": "Error response describing why the operation failed.  If the resource doesn't exist, 404 (Not Found) is returned.  If any of the input parameters is wrong, 400 (Bad Request) is returned.",
+            "description": "Error response describing why the operation failed.  If any of the input parameters is wrong, 400 (Bad Request) is returned.",
             "schema": {
               "$ref": "#/definitions/CloudError"
             }
@@ -1581,7 +1566,7 @@
         "tags": [
           "SyncSets"
         ],
-        "summary": "Patches (create or update) a SyncSet with the specified subscription, resource group and resource name.",
+        "summary": "Updates a SyncSet with the specified subscription, resource group and resource name.",
         "description": "The operation returns properties of a SyncSet.",
         "operationId": "SyncSets_Update",
         "parameters": [
@@ -1625,12 +1610,6 @@
               "$ref": "#/definitions/SyncSet"
             }
           },
-          "201": {
-            "description": "Created",
-            "schema": {
-              "$ref": "#/definitions/SyncSet"
-            }
-          },
           "default": {
             "description": "Error response describing why the operation failed.  If the resource doesn't exist, 404 (Not Found) is returned.  If any of the input parameters is wrong, 400 (Bad Request) is returned.",
             "schema": {
@@ -1639,7 +1618,7 @@
           }
         },
         "x-ms-examples": {
-          "Patches (create or update) a SyncSet with the specified subscription, resource group and resource name.": {
+          "Updates a SyncSet with the specified subscription, resource group and resource name.": {
             "$ref": "./examples/SyncSets_Update.json"
           }
         }
@@ -2406,6 +2385,17 @@
       }
     }
   },
+  "parameters": {
+    "api-version": {
+      "name": "api-version",
+      "in": "query",
+      "description": "The version of the API the caller wants to use.",
+      "required": true,
+      "type": "string",
+      "pattern": "^\\d{2}-\\d{2}-\\d{4}(-preview)?$",
+      "x-ms-parameter-location": "client"
+    }
+  },
   "securityDefinitions": {
     "azure_auth": {
       "type": "oauth2",


Test patch:
diff --git a/pkg/frontend/clustermanager_putorpatch_test.go b/pkg/frontend/clustermanager_putorpatch_test.go
index d9c3e59ab..374e04ef1 100644
--- a/pkg/frontend/clustermanager_putorpatch_test.go
+++ b/pkg/frontend/clustermanager_putorpatch_test.go
@@ -72,6 +72,28 @@ func TestPutOrPatchClusterManagerConfiguration(t *testing.T) {
 			},
 		)
 	}
+	noDocuments := func(f *testdatabase.Fixture, tt *test, resourceKey string) {
+		f.AddSubscriptionDocuments(&api.SubscriptionDocument{
+			ID: mockSubscriptionId,
+			Subscription: &api.Subscription{
+				State: api.SubscriptionStateRegistered,
+				Properties: &api.SubscriptionProperties{
+					TenantID: tenantId,
+				},
+			},
+		})
+		f.AddOpenShiftClusterDocuments(&api.OpenShiftClusterDocument{
+			Key: strings.ToLower(testdatabase.GetResourcePath(mockSubscriptionId, "resourceName")),
+			OpenShiftCluster: &api.OpenShiftCluster{
+				ID: testdatabase.GetResourcePath(mockSubscriptionId, "resourceName"),
+				Properties: api.OpenShiftClusterProperties{
+					ClusterProfile: api.ClusterProfile{
+						ResourceGroupID: fmt.Sprintf("/subscriptions/%s/resourcegroups/%s", mockSubscriptionId, tt.clusterName),
+					},
+				},
+			},
+		})
+	}
 
 	for _, tt := range []*test{
 		{
@@ -114,31 +136,10 @@ func TestPutOrPatchClusterManagerConfiguration(t *testing.T) {
 			ocmResourceName: "putNewSyncSet",
 			clusterName:     "myCluster",
 			apiVersion:      "2022-09-04",
-			fixture: func(f *testdatabase.Fixture, tt *test, resourceKey string) {
-				f.AddSubscriptionDocuments(&api.SubscriptionDocument{
-					ID: mockSubscriptionId,
-					Subscription: &api.Subscription{
-						State: api.SubscriptionStateRegistered,
-						Properties: &api.SubscriptionProperties{
-							TenantID: tenantId,
-						},
-					},
-				})
-				f.AddOpenShiftClusterDocuments(&api.OpenShiftClusterDocument{
-					Key: strings.ToLower(testdatabase.GetResourcePath(mockSubscriptionId, "resourceName")),
-					OpenShiftCluster: &api.OpenShiftCluster{
-						ID: testdatabase.GetResourcePath(mockSubscriptionId, "resourceName"),
-						Properties: api.OpenShiftClusterProperties{
-							ClusterProfile: api.ClusterProfile{
-								ResourceGroupID: fmt.Sprintf("/subscriptions/%s/resourcegroups/%s", mockSubscriptionId, tt.clusterName),
-							},
-						},
-					},
-				})
-			},
-			requestMethod:  http.MethodPut,
-			requestBody:    modifiedPayload,
-			wantStatusCode: http.StatusOK,
+			fixture:         noDocuments,
+			requestMethod:   http.MethodPut,
+			requestBody:     modifiedPayload,
+			wantStatusCode:  http.StatusOK,
 			wantResponse: &v20220904.SyncSet{
 				Name: "putnewsyncset",
 				Type: "Microsoft.RedHatOpenShift/SyncSet",
@@ -148,6 +149,18 @@ func TestPutOrPatchClusterManagerConfiguration(t *testing.T) {
 				},
 			},
 		},
+		{
+			name:            "patching nonexistent syncset",
+			ocmResourceType: "syncSet",
+			ocmResourceName: "patchNewSyncSet",
+			clusterName:     "myCluster",
+			apiVersion:      "2022-09-04",
+			fixture:         noDocuments,
+			requestMethod:   http.MethodPatch,
+			requestBody:     modifiedPayload,
+			wantStatusCode:  http.StatusNotFound,
+			wantError:       "404: ResourceNotFound: : The Resource 'openshiftclusters/resourcename/syncset/patchnewsyncset' under resource group 'resourcegroup' was not found.",
+		},
 		{
 			name:            "unsupported api version",
 			ocmResourceType: "syncset",
diff --git a/pkg/frontend/openshiftversions_list_test.go b/pkg/frontend/openshiftversions_list_test.go
index a467c0be3..f1b1082c2 100644
--- a/pkg/frontend/openshiftversions_list_test.go
+++ b/pkg/frontend/openshiftversions_list_test.go
@@ -102,7 +102,7 @@ func TestListInstallVersions(t *testing.T) {
 			frontend.mu.Unlock()
 
 			resp, b, err := ti.request(method,
-				fmt.Sprintf("https://server/subscriptions/%s/providers/Microsoft.RedHatOpenShift/locations/%s/listinstallversions?api-version=%s", mockSubID, ti.env.Location(), tt.apiVersion),
+				fmt.Sprintf("https://server/subscriptions/%s/providers/Microsoft.RedHatOpenShift/locations/%s/openshiftversions?api-version=%s", mockSubID, ti.env.Location(), tt.apiVersion),
 				nil, nil)
 			if err != nil {
 				t.Fatal(err)