Skip to content

Commit

Permalink
Update Azure Cloud Shell API to the newer version (#17115)
Browse files Browse the repository at this point in the history
Updates the `api-version` to `2023-02-01-preview` when requesting for
CloudShell settings and shell

## Validation Steps Performed
Can still use Azure Cloud Shell through Windows Terminal

(cherry picked from commit ce4e0df)
Service-Card-Id: 92411551
Service-Version: 1.19
  • Loading branch information
PankajBhojwani authored and DHowett committed Apr 26, 2024
1 parent 42639f4 commit bf0bc91
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cascadia/TerminalConnection/AzureConnection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -956,7 +956,7 @@ namespace winrt::Microsoft::Terminal::TerminalConnection::implementation
// - the user's cloud shell settings
WDJ::JsonObject AzureConnection::_GetCloudShellUserSettings()
{
auto uri{ fmt::format(L"{}providers/Microsoft.Portal/userSettings/cloudconsole?api-version=2020-04-01-preview", _resourceUri) };
auto uri{ fmt::format(L"{}providers/Microsoft.Portal/userSettings/cloudconsole?api-version=2023-02-01-preview", _resourceUri) };
return _SendRequestReturningJson(uri, nullptr);
}

Expand All @@ -966,7 +966,7 @@ namespace winrt::Microsoft::Terminal::TerminalConnection::implementation
// - the uri for the cloud shell
winrt::hstring AzureConnection::_GetCloudShell()
{
auto uri{ fmt::format(L"{}providers/Microsoft.Portal/consoles/default?api-version=2020-04-01-preview", _resourceUri) };
auto uri{ fmt::format(L"{}providers/Microsoft.Portal/consoles/default?api-version=2023-02-01-preview", _resourceUri) };

WWH::HttpStringContent content{
LR"-({"properties": {"osType": "linux"}})-",
Expand Down

0 comments on commit bf0bc91

Please sign in to comment.