Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DO NOT SQUASH] [Az.RecoveryServices.Backup] syncing Az.RecoveryServices-preview branch with master #14462

Merged
Changes from 1 commit
Commits
Show all changes
157 commits
Select commit Hold shift + click to select a range
1695bb0
Fix top value when top is not provided (#14051)
najagasi Jan 29, 2021
01a24cd
breaking change message (#14050)
grizzlytheodore Jan 29, 2021
e82da65
Update WAF Sdk to support RequestBodyCheck and JSON exclussions (#14044)
digavino Jan 29, 2021
350cead
rename VMWare to VMware, and set confirmimpact to 'High' for remove-a…
VeryEarly Jan 29, 2021
5d9d398
Fix predicate expression for server audit (#14063)
OlegSternbergIBM Jan 31, 2021
23694e8
Add ExpressRoutePort MACsec SCI state (#13928)
francescanarea Jan 31, 2021
8d0a01a
change name from virtual router to route server (#14061)
litchiyangMSFT Jan 31, 2021
b52f042
Update service principal warning (#14064)
rolyon Feb 1, 2021
1a05cac
Azure VMware Solution (#14059)
ctaggart Feb 1, 2021
270f1e2
Add codeowner for policyInsights (#14052)
pilor Feb 1, 2021
d902ad7
Enable Get-AzVM piping to Get-AzVMExtension cmdlet (#14039)
Sandido Feb 1, 2021
3f0d038
Fix Microsoft.Azure.Management.ResourceManager dll conflict (#14072)
msJinLei Feb 1, 2021
b1f6084
Upgrade common, implement getserviceclient credential, invoke listene…
VeryEarly Feb 1, 2021
b07aa0b
Using the latest version of autorest to generate code for 'costmanage…
Youri970410 Feb 1, 2021
40a0d70
[Storage] Upgrade XSCL and Azure.Core 1.8.1 (#14058)
blueww Feb 2, 2021
db3e027
Remove tools/VersionController/packages.config (#14065)
dingmeng-xue Feb 2, 2021
b4abd5d
Webapp: [Documentation]Adding Linux property for New-AzAppServicePlan…
ThejaChoudary Feb 2, 2021
91d9ee6
Set-AzDataLakeGen2AclRecursive.md - Fix typo (directiry -> directory)…
bergmeister Feb 2, 2021
c216fcd
Using the latest version of autorest to generate code for 'Databricks…
Youri970410 Feb 2, 2021
7cbd0d2
Add CloudError code into exception for tracking (#14077)
dingmeng-xue Feb 2, 2021
6c87ccf
Improve error handling and bug fix (#14033)
erich-wang Feb 2, 2021
de2e66c
add ACR repository operations (#13946)
VeryEarly Feb 2, 2021
1d445dc
polish changelog for upcoming release (#14076)
dingmeng-xue Feb 2, 2021
2b73fd2
Polish changelog for az.accounts (#14080)
VeryEarly Feb 2, 2021
2eddc95
Update Az.Accounts help (#14090)
msJinLei Feb 2, 2021
f7b74d8
Added cmdlet Test-AzMySqlFlexibleServerConnect (#14091)
msJinLei Feb 2, 2021
930959c
Revert module version (#14098)
dingmeng-xue Feb 2, 2021
f2ccdd3
Add cmdlet Test-AzPostgreSqlFlexibleServerConnect (#14096)
msJinLei Feb 3, 2021
16fe31d
Cover New-AzSqlElasticPool case for SQL maintenance (#14102)
hotsnr Feb 3, 2021
76b08f4
Remove incorrect changelog (#14099)
dingmeng-xue Feb 3, 2021
966c440
add cmdlets Get/Start/convert-SynapseVulnerabilityAssessmentScan (#13…
zesluo Feb 3, 2021
2697237
Get-AzSynapseSqlPoolGeoBackup and Get-AzSynapseDroppedSqlPool. (#13621)
zesluo Feb 4, 2021
9a2eefe
Type fox: changed SshKeyVaule to SshKeyValue (#14087)
jdnark Feb 4, 2021
028993b
Examples used New-AzAks which is legacy cmdlet and the alias for New-…
jdnark Feb 4, 2021
97e5352
Fixed a typo in the cmdlet (#14112)
ehrnst Feb 4, 2021
99ade36
Add legal term and parameter -AcceptEULA to 'New-AzVMwarePrivateCloud…
VeryEarly Feb 4, 2021
3ecb37d
Revert "Pass principal type during role assignment put operations" (#…
VeryEarly Feb 4, 2021
73e42d6
Honoring UseManagedDisk input for HyperV to Azure scenario in site re…
dingmeng-xue Feb 4, 2021
37c1f4c
Added support for -QueryString parameters to cmdlets hitting /validat…
Xynoclafe Feb 5, 2021
1bb0c1d
release-2021-02-09 (#14137)
dingmeng-xue Feb 5, 2021
ffa64ca
switch param best practice (#14142)
isra-fel Feb 5, 2021
9d214a3
Merge pull request #14141 from Azure/release-2021-02-09
VeryEarly Feb 5, 2021
a31eaed
add local parameter map saving to a local file (#14018) (#14140)
dingmeng-xue Feb 5, 2021
80250b7
Remove culture from help markdown files (#14047)
Youri970410 Feb 7, 2021
aeb124d
Optimize for CI filter. (#13994)
wyunchi-ms Feb 7, 2021
069bfa5
[Tools] Use type fullname to avoid issue from class renaming. (#14147)
wyunchi-ms Feb 7, 2021
eaf74e6
Fix example doc syntax (#14146)
isra-fel Feb 7, 2021
1ff6b2f
[Tools] Fix the issue of different name of module and folder when run…
wyunchi-ms Feb 8, 2021
44d48af
[DataFactory]Upgrade sdk version to 4.14.0 (#14149)
Jingshu923 Feb 8, 2021
f1e6360
Azure Automation documentation update for Get-AzAutomationWebhook and…
shivamT95-msft Feb 9, 2021
ebfd682
Small spelling, formatting changes (#14155)
alunmj Feb 9, 2021
dd2e94b
Update Set-AzNetworkSecurityRuleConfig.md (#14176)
webguynj Feb 11, 2021
db56960
Added an additional cmdline to the example which applies the changes …
yannickdils Feb 12, 2021
8dbbb6a
Add cmdlet to enable/disable az predictor (#14188)
kceiw Feb 12, 2021
6a5d296
Fixed issues with TemplateSpec deployments in New-AzTenantDeployment …
Xynoclafe Feb 13, 2021
1decdb5
Acr fix (#14177) (#14189)
VeryEarly Feb 13, 2021
fcaddf8
Blueprint: Unregister API delegating handler (#14200)
filizt Feb 17, 2021
a941e86
Fix the issue that PR changed files list is empty (#14202)
wyunchi-ms Feb 18, 2021
d78b04a
update parameter descriptions: -CustomData for Set-AzVMOperatingSyste…
grizzlytheodore Feb 18, 2021
566fea4
Update the cmdlet parameters according to feedback. (#14217)
kceiw Feb 18, 2021
e38e1a3
[DPS] Add attestation mechanism updates to device enrollment and enro…
c-ryan-k Feb 18, 2021
319b8e6
Add prompt for usage and survey (#13965)
kceiw Feb 19, 2021
24bd84a
[Tools] Fix the issue of CI Pipeline (#14222)
wyunchi-ms Feb 19, 2021
c1a7cbe
Cosmos DB: Update to 2.0.0 and Add support for NetworkAclBypass in Ac…
kristynhamasaki Feb 19, 2021
81e86e6
Fixed invalid ts deployment error message (#14236)
Xynoclafe Feb 19, 2021
53fdcfe
[AzRecoveryServices.Backup] Adding null check for target storage acco…
hiaga Feb 19, 2021
106f2f8
Add support for Python 3 Runbook Type (#14226)
mahakjain314 Feb 19, 2021
bac8b2c
Update Add-AzLoadBalancerInboundNatPoolConfig.md (#14231)
chakra146 Feb 19, 2021
9dea193
Log Analytics .md files updates (#14203)
Sandido Feb 19, 2021
acdfb15
[Az.Network] Add and sort private links (#14239)
BethanyZhou Feb 19, 2021
ef6a150
[Tools] Skip test phase if there is no test project in CI pipeline (#…
wyunchi-ms Feb 19, 2021
a44c879
Add clear element to Nuget.config
wyunchi-ms Feb 19, 2021
1959d3c
Add sql mi maintenance configuration examples (#14216)
kukislav Feb 19, 2021
6be762f
Update sign pipeline of Az.Tools.Predictor (#14241)
dingmeng-xue Feb 20, 2021
8ffff38
Adjust the request header and body sent to the server. (#14250)
kceiw Feb 20, 2021
6c41e9c
Add Debug info for test phase (#14245)
wyunchi-ms Feb 20, 2021
22358aa
[Storage] Support several new SRP features on API version 2021-01-01 …
blueww Feb 20, 2021
731de15
Update ChangeLog.md (#14254)
VeryEarly Feb 20, 2021
63c3b4d
[Websites] Cmdlets for ASE v2 (and v3 in preview) (#14214)
madsd Feb 20, 2021
7c4918b
[Storage] Remove secure SMB feature (#14262)
blueww Feb 22, 2021
93f959e
Upgrade Azure.Identity to fix ADFS auth issue (#14228)
erich-wang Feb 22, 2021
6d56fba
[Storage] Support copy block blob from Uri (#14261)
blueww Feb 22, 2021
446db11
Update website helper to follow assembly setting (#14264)
dingmeng-xue Feb 22, 2021
55f0be8
GA Az.Migrate (#14265)
VeryEarly Feb 22, 2021
daf9563
[Storage] Fix issue 14234 (#14266)
blueww Feb 22, 2021
cf3c038
[Tools] Fix the issue of processing empty list in CI pipeline. (#14263)
wyunchi-ms Feb 22, 2021
c2dc522
Adjust order of "vmware" in mapping rules. (#14267)
VeryEarly Feb 22, 2021
2941472
[KeyVault] Update Az 5.0 migration guide (#14242)
isra-fel Feb 22, 2021
8a017cf
Update to latest CosmosDB client libraray and allow ServerVersion to …
craigtmc-msft Feb 23, 2021
5f9d41d
[BotService] Fix the issue that didn't pack resources files of bot se…
wyunchi-ms Feb 23, 2021
fe0e48d
Remove ContainerService cmdlets and documentation (#14270)
Sandido Feb 23, 2021
16e4c12
Support deploying Azure resources described with the Bicep language (…
BethanyZhou Feb 23, 2021
141d64a
Add "[Breaking Change]" (#14276)
VeryEarly Feb 23, 2021
677d1bd
Polish changelog for upcoming release (#14279)
dingmeng-xue Feb 23, 2021
b126c85
[Storage] Fix help by remove a not exist parameter (#14286)
blueww Feb 23, 2021
4829cfc
Remove removed cmdlet from psd1 (#14291)
dingmeng-xue Feb 23, 2021
14d4edb
Add module name to csproj of Helper (#14292)
dingmeng-xue Feb 24, 2021
68f8ecb
Update Set-AzSqlInstanceDatabaseBackupShortTermRetentionPolicy.md (#1…
alexhanms Feb 24, 2021
9a11862
fix #13763- webapp:Increased timout to 300000 MS for Publish-AzWebApp…
Kotasudhakarreddy Feb 24, 2021
5d128b2
Better way to get test project count. (#14285)
wyunchi-ms Feb 24, 2021
505bb3e
update to 3.1.0 (#14269)
poanchen Feb 24, 2021
c24e4ca
Update NewAzureRmVmssConfigCommand.cs (#14295)
Sandido Feb 24, 2021
bc2c213
Move MySql to master (#14278)
msJinLei Feb 24, 2021
320cf96
Move PostgreSql to master (#14282)
msJinLei Feb 24, 2021
b7558f3
Customer requests on Policy CRUD cmdlets (#14298)
mentat9 Feb 24, 2021
f8638f9
Fix a issue cause SDK breaking change (#14307)
blueww Feb 24, 2021
75e94c4
link BicepNotFound error to installation guidance (#14304)
BethanyZhou Feb 24, 2021
8e7038c
Move ResourceMover to release-2021-03-02 (#14310)
VeryEarly Feb 24, 2021
6904f19
[Automation]Fix the issue of automation in string (#14314)
wyunchi-ms Feb 24, 2021
71de355
Update api version of kubernetes configuration to 2021-03-01 (#14306)
wyunchi-ms Feb 24, 2021
a137c3f
[ConnectedKubernetes] Update api-version of ConnectedKubernetes to 20…
wyunchi-ms Feb 24, 2021
78af49e
Move Confluent to master (#14301)
dolauli Feb 24, 2021
6fdea67
Fix a bug showing the intercept (#14329)
kceiw Feb 25, 2021
93908bb
Kusto: Adding Example to Update-AzKustoCluster.md (#14322)
astauben Feb 25, 2021
8d1dcea
initial version of Azure Powershell swagger ci (#14308)
dolauli Feb 25, 2021
2dfecc0
Updated Az Predictor cmdlet help (#14331)
dcaro Feb 26, 2021
18a8321
Update Redis Enterprise API version (#14337)
greenms Feb 26, 2021
21b39ca
Create XML-based help (#14334)
dingmeng-xue Feb 26, 2021
14076fc
Fixed 3 typos in the document (#14335)
liambarnett Feb 26, 2021
bed48d3
Update test matrix per Az.Accounts (#14343)
erich-wang Feb 26, 2021
17f780b
Correlate the suggestion related events (#14041)
kceiw Feb 26, 2021
1eb322b
PatchMode and PatchStatus parameters added to Set-AzVMOperatingSystem…
Sandido Feb 26, 2021
f3d4716
[Automation] Fix the issue for string value (#14346)
wyunchi-ms Feb 26, 2021
eb0223c
release-2021-03-02 (#14349)
dingmeng-xue Feb 26, 2021
97c7a05
Update appveyor.yml (#14356)
yishengjin1413 Feb 28, 2021
be76055
Update New-AzSqlVM.md (#14355)
rchlkm Mar 1, 2021
3967b0e
Merge pull request #14358 from Azure/release-2021-03-02
wyunchi-ms Mar 1, 2021
6b0d9dd
Update Set-AzSqlDatabaseBackupShortTermRetentionPolicy.md (#14317)
alexhanms Mar 1, 2021
6a2cecc
[AppService] Fix #13818 Subnet in different subscription (#14344)
madsd Mar 1, 2021
455fabe
Update sign-tool-predictor.yml for Azure Pipelines (#14350)
dingmeng-xue Mar 1, 2021
f70d243
Fix issue for PVS-Stduio (#14369)
Youri970410 Mar 2, 2021
930f309
fix issue for monitor (#14364)
Youri970410 Mar 2, 2021
3110e68
delete useless code for RemoveAzureRmExpressRouteConnection (#14362)
Youri970410 Mar 2, 2021
05aa2d5
fix the repeated judgment conditions (#14363)
Youri970410 Mar 2, 2021
96df89c
fix issue for PVS-Studio (#14365)
Youri970410 Mar 2, 2021
ab4ab77
Fix issue for PVS-Studio (#14370)
Youri970410 Mar 2, 2021
232d517
Fix issue for PVS-Studio (#14371)
Youri970410 Mar 2, 2021
0f3b349
Fix issue for PVS-Studio (#14372)
Youri970410 Mar 2, 2021
0b09d42
Fix issue for PVS-Stduio (#14367)
Youri970410 Mar 2, 2021
852b303
Fix issue for PVS-Studio (#14366)
Youri970410 Mar 2, 2021
6705540
Update help for Az.Tools.Predictor (#14376)
dingmeng-xue Mar 2, 2021
155ad42
IoT Hub SDK upgrade and test updates (#14300)
c-ryan-k Mar 2, 2021
9a5e18f
Correct psd1 file and remove space charactor from tag (#14386)
dingmeng-xue Mar 2, 2021
ea9ac21
[Synapse] - Use Az Powershell defined exception types and refine test…
idear1203 Mar 2, 2021
56405b0
Fixed output object type for Get-AzPrivateEndpointConnection (#14396)
dcaro Mar 3, 2021
5bf8582
[Aks] Update test case (#14410)
wyunchi-ms Mar 3, 2021
bb26b3f
Fix PVS-Studio issues related to 'Recoveryservices' (#14373)
Youri970410 Mar 4, 2021
39d4da8
[KeyVault] Fixed several typos in cmdlet messages (#14428)
isra-fel Mar 4, 2021
613d39a
[Tools] Fix the issue of StaticAnalysis (#14408)
wyunchi-ms Mar 4, 2021
d87afe0
Remove resource group from get-azloadbalancer this results in a regio…
yannickdils Mar 5, 2021
9aae19e
Remove the logic of coping file to temp folder (#14444)
BethanyZhou Mar 5, 2021
46292af
[Storage] Fix nextlink is lost in list account from resourceGroup (#1…
blueww Mar 5, 2021
3c53c13
remove the description about the deprecated template gallery feature.…
BethanyZhou Mar 5, 2021
9a7a164
[CloudService] Update cloudservice (#14360)
wyunchi-ms Mar 5, 2021
5957b6f
Update Set-AzSqlDatabaseVulnerabilityAssessmentRuleBaseline.md (#14432)
sbojjawar-Msft Mar 5, 2021
9cacc8a
[DataFactory]Upgrade sdk version to 4.15.0 (#14461)
Jingshu923 Mar 8, 2021
4704bab
[Az.Resources] Redirect bicep message to verbose stream (#14449)
BethanyZhou Mar 8, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add CloudError code into exception for tracking (#14077)
* Update error kind when context is incorrect

* Add cloud error code into exception data

* Add changelog
dingmeng-xue authored Feb 2, 2021
commit 7cbd0d2fd741b002dd39569c24a6e4dd6aeac63c
1 change: 1 addition & 0 deletions src/Accounts/Accounts/ChangeLog.md
Original file line number Diff line number Diff line change
@@ -18,6 +18,7 @@
- Additional information about change #1
-->
## Upcoming Release
* Tracked CloudError code in exception
* Invoked on clear context listener in Azure session to be cleared when `Clear-AzContext` was executed

## Version 2.2.4
50 changes: 43 additions & 7 deletions src/Accounts/Accounts/CommonModule/AzModule.cs
Original file line number Diff line number Diff line change
@@ -16,7 +16,10 @@
using Microsoft.Azure.Commands.Common.Exceptions;
using Microsoft.Azure.Commands.Profile.CommonModule;
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Microsoft.Rest.Serialization;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -42,14 +45,35 @@ public class AzModule : IDisposable
ICommandRuntime _runtime;
TelemetryProvider _telemetry;
AdalLogger _logger;
internal static readonly string[] ClientHeaders = {"x-ms-client-request-id", "client-request-id", "x-ms-request-id", "request-id" };
internal static readonly string[] ClientHeaders = { "x-ms-client-request-id", "client-request-id", "x-ms-request-id", "request-id" };

private static JsonSerializerSettings DeserializationSettings = null;
static AzModule()
{
DeserializationSettings = new JsonSerializerSettings
{
DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc,
NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore,
ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
ContractResolver = new ReadOnlyJsonContractResolver(),
Converters = new List<JsonConverter>
{
new Iso8601TimeSpanConverter()
}
};
DeserializationSettings.Converters.Add(new TransformationJsonConverter());
DeserializationSettings.Converters.Add(new CloudErrorJsonConverter());
}


public AzModule(ICommandRuntime runtime, IEventStore eventHandler)
{
_runtime = runtime;
_deferredEvents = eventHandler;
_logger = new AdalLogger(_deferredEvents.GetDebugLogger());
_telemetry = TelemetryProvider.Create(
_deferredEvents.GetWarningLogger(), _deferredEvents.GetDebugLogger());
_deferredEvents.GetWarningLogger(), _deferredEvents.GetDebugLogger());
}

public AzModule(ICommandRuntime runtime) : this(runtime, new EventStore())
@@ -174,9 +198,9 @@ await signal(Events.Debug, cancellationToken,
if (data?.ResponseMessage is HttpResponseMessage response)
{
try {
// Print formatted response message
await signal(Events.Debug, cancellationToken,
() => EventHelper.CreateLogEvent(GeneralUtilities.GetLog(response)));
// Print formatted response message
await signal(Events.Debug, cancellationToken,
() => EventHelper.CreateLogEvent(GeneralUtilities.GetLog(response)));
} catch {
// response was disposed, ignore
}
@@ -221,9 +245,21 @@ internal async Task OnFinally(string id, CancellationToken cancellationToken, Ge
{
if(!response.IsSuccessStatusCode && qos.Exception == null)
{
// add "InternalException" as message because it is just for telemtry tracking.
AzPSCloudException ex = (response.StatusCode == HttpStatusCode.NotFound) ?
new AzPSResourceNotFoundCloudException(String.Empty) : new AzPSCloudException(String.Empty);
ex.Response = new HttpResponseMessageWrapper(response, String.Empty);
new AzPSResourceNotFoundCloudException("InternalException") : new AzPSCloudException("InternalException");
try
{
string responseContent = await response.Content.ReadAsStringAsync().ConfigureAwait(false);
CloudError cloudError = SafeJsonConvert.DeserializeObject<CloudError>(responseContent, DeserializationSettings);
ex.Body = cloudError;
ex.Data[AzurePSErrorDataKeys.CloudErrorCodeKey] = cloudError.Code;
}
catch (Exception exception)
{
await signal(Events.Debug, cancellationToken,
() => EventHelper.CreateLogEvent($"[{id}]: Cannot deserialize due to {exception.Message}"));
}
qos.Exception = ex;
await signal(Events.Debug, cancellationToken,
() => EventHelper.CreateLogEvent($"[{id}]: Getting exception '{qos.Exception}' from response"));