Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into youri/pvsissue-Au…
Browse files Browse the repository at this point in the history
…tomation
  • Loading branch information
Youri committed Mar 1, 2021
2 parents 9eb230c + 455fabe commit eaf92c2
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .azure-pipelines/sign-tool-predictor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ steps:
inputs:
command: custom
custom: msbuild
arguments: 'tools\Az.Tools.Predictor\build.proj /target:"Clean;Build;GenerateHelp" /p:Configuration=Release'
arguments: 'tools\Az.Tools.Predictor\build.proj /target:"Clean;Build;GenerateHelp" /p:Configuration=Release /p:PowerShellCoreCommandPrefix="$(Pipeline.Workspace)\\PowerShell-7.2.0-preview.3\\pwsh.exe -NonInteractive -NoLogo -NoProfile -Command"'

- task: UseDotNet@2
displayName: 'Install DotNet 2.1 Runtime for Signing'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Set-AzSqlDatabaseBackupShortTermRetentionPolicy [-RetentionDays] <Int32> -Resour
```

## DESCRIPTION
The **Set-AzSqlDatabaseBackupShortTermRetentionPolicy** cmdlet gets the short term retention policy registered to this database.
The **Set-AzSqlDatabaseBackupShortTermRetentionPolicy** cmdlet sets the short term retention policy for this database.
The policy is the retention period, in days, for point-in-time restore backups.

## EXAMPLES
Expand Down
1 change: 1 addition & 0 deletions src/Websites/Websites/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
- `Remove-AzAppServiceEnvironment`
- `Get-AzAppServiceEnvironment`
- `New-AzAppServiceEnvironmentInboundServices`
* Add-AzWebAppAccessRestrictionRule: When using subnet from another subscription, -IgnoreMissingServiceEndpoint must be used. Descriptive error message added.

## Version 2.3.0
* Added support for Importing a key vault certificate to WebApp.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,9 @@ public override void ExecuteCmdlet()
CheckDuplicateServiceEndpointRestriction(subnetResourceId, accessRestrictionList);
if (!IgnoreMissingServiceEndpoint)
{
var subnetSubcriptionId = CmdletHelpers.GetSubscriptionIdFromResourceId(subnetResourceId);
if (subnetSubcriptionId != DefaultContext.Subscription.Id)
throw new Exception("Service endpoint cannot be validated. Subnet is in another subscription. Use -IgnoreMissingServiceEndpoint and manually verify that 'Microsoft.Web' service endpoint is enabled on the subnet.");
var serviceEndpointServiceName = "Microsoft.Web";
var serviceEndpointLocations = new List<string>() { "*" };
NetworkClient.EnsureSubnetServiceEndpoint(subnetResourceId, serviceEndpointServiceName, serviceEndpointLocations);
Expand Down
5 changes: 5 additions & 0 deletions src/Websites/Websites/Utilities/CmdletHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,11 @@ internal static string GetResourceGroupFromResourceId(string resourceId)
return new ResourceIdentifier(resourceId).ResourceGroupName;
}

internal static string GetSubscriptionIdFromResourceId(string resourceId)
{
return new ResourceIdentifier(resourceId).Subscription;
}

internal static void ExtractWebAppPropertiesFromWebApp(Site webapp, out string resourceGroupName, out string webAppName, out string slot)
{
resourceGroupName = GetResourceGroupFromResourceId(webapp.Id);
Expand Down

0 comments on commit eaf92c2

Please sign in to comment.