Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
241 commits
Select commit Hold shift + click to select a range
ac60d0e
Implement Get-AzureBatchPoolNodeCounts cmdlet.
antoniowmsft Apr 9, 2018
321d517
Fix Get-AzureBatchPoolNodeCounts cmdlet parameter sets
antoniowmsft Apr 9, 2018
bd1e28a
Implement Add-AzureBatchComputeNodeServiceLogsCommand
antoniowmsft Apr 11, 2018
5e0aee1
Fix help files
antoniowmsft Apr 11, 2018
047e121
Regenerate help files
antoniowmsft Apr 11, 2018
da889da
Add online version for Add-AzureBatchComputeNodeServiceLogs.md
antoniowmsft Apr 11, 2018
d131ea8
ChangeLog
antoniowmsft Apr 11, 2018
a7978e0
Update help file for Get-AzureBatchPoolNodeCounts
antoniowmsft Apr 16, 2018
c67c32f
Fix default command parameter sets on Get-AzureBatchPoolNodeCounts an…
antoniowmsft Apr 20, 2018
3fdad35
csproj fix
antoniowmsft Apr 20, 2018
3c6864b
Upgraded usage command on consumption
Apr 23, 2018
7cff053
Removed commented code on GetAzureRmConsumptionUsageDetail
Apr 23, 2018
809071c
Add change comments on md files
Apr 23, 2018
3fe6354
Update .Netcore package reference
Apr 23, 2018
c65f394
Enable gateway
taiwu Apr 24, 2018
6666142
Merge branch 'taiwu-gw-march' into taiwu-gw-424
taiwu Apr 24, 2018
f578d45
Fix indent and disassociate gateway
taiwu Apr 25, 2018
bdda3d5
Update change log
taiwu Apr 25, 2018
86b1997
Fix indent in test
taiwu Apr 25, 2018
89febba
Fix indent in Set-operation
taiwu Apr 25, 2018
ba8ef9d
Update gateway association using resource id
taiwu Apr 25, 2018
d7bfbc8
Implement PSNodeCounts.FormatObject to support printing node state co…
antoniowmsft Apr 25, 2018
64cbe45
Redesigned parameters on usage Cmdlet to mitigate break changes
Apr 26, 2018
36a17cd
Merge branch 'preview' of https://github.com/Azure/azure-powershell i…
Apr 26, 2018
db15652
Update help doc
taiwu Apr 26, 2018
47b1c29
Print PoolNodeCounts in table
antoniowmsft Apr 26, 2018
c14307a
new thing
Apr 26, 2018
54421f5
update to cover more scenarios
Apr 27, 2018
0879418
Enabled using network watcher by location
irrogozh Apr 28, 2018
6518af8
Integrate with Microsoft.Azure.Batch 8.1.1 libraries
antoniowmsft Apr 30, 2018
2caee73
Merge branch 'preview' into preview
antoniowmsft Apr 30, 2018
e418db1
Microsoft.Azure.Batch assembly should not be private
antoniowmsft Apr 30, 2018
942120a
Merge branch 'preview' of https://github.com/antoniowmsft/azure-power…
antoniowmsft Apr 30, 2018
13eaad6
Fix build break
antoniowmsft May 1, 2018
32a7fce
Add support for circuit connection product code
dedhar May 1, 2018
3781c9a
add files for help commands
dedhar May 1, 2018
ef35195
add documentation for circuit connection commands
dedhar May 1, 2018
e13d79f
Address PR comments
antoniowmsft May 2, 2018
ff7a1ad
Address PR comments
antoniowmsft May 2, 2018
3458020
add more documentation
dedhar May 2, 2018
5451714
add some more documentation
dedhar May 2, 2018
d446e3d
add example title
dedhar May 2, 2018
8844b5e
Add PSNodeCount serialization test
antoniowmsft May 2, 2018
326e908
Removed current break change and set as upcoming
May 2, 2018
8ca0304
Merge branch 'preview' of https://github.com/Azure/azure-powershell i…
May 2, 2018
f5d252f
Address PR comments
antoniowmsft May 2, 2018
ab841c3
Address PR Comments
antoniowmsft May 2, 2018
b2ee4b0
Undo unnecessary changes
antoniowmsft May 2, 2018
f85d51a
Address PR comments
antoniowmsft May 2, 2018
2a72533
Add sample output for Start-AzureBatchComputeNodeServiceLogUpload.md
antoniowmsft May 2, 2018
8f93550
Revert accidential AzureRM.psm1 change
antoniowmsft May 2, 2018
ba43d71
update OutputType in cmdlet
junyezhu May 2, 2018
1b79660
Merge branch 'preview' into preview
May 2, 2018
efef759
Merge branch 'preview' into preview
May 2, 2018
0e6b17a
add examples for add and remove cmds
dedhar May 2, 2018
65e8eda
Merge branch 'preview' of https://github.com/Azure/azure-powershell i…
dedhar May 2, 2018
50cf007
Merge branch 'preview' of https://github.com/dedhar/azure-powershell …
dedhar May 2, 2018
e1ffc4d
fix change log for circuit connection commands
dedhar May 2, 2018
40add9c
ValidateRange should specify max as 10
antoniowmsft May 2, 2018
1cdff23
add New-AzureRMNetworkWatcherProtocolConfiguration
junyezhu May 3, 2018
2226f48
start adding test for circuit connection
dedhar May 3, 2018
12e20a9
fix idictionary issue for header
junyezhu May 3, 2018
eefa141
record network watcher test
junyezhu May 3, 2018
ce13fe7
update session record for circuit connection
dedhar May 4, 2018
d496aa8
add circuit connection crud json file to session records
dedhar May 4, 2018
ba9f357
verify playback mode
dedhar May 4, 2018
0e78c01
Add usage detail markdown file
May 4, 2018
42b3974
Merge branch 'preview' of https://github.com/Azure/azure-powershell i…
May 4, 2018
f098865
Update paramter sets for gateway operations and help doc
taiwu May 4, 2018
d92e0c9
Merge branch 'preview' into taiwu-gw-424
taiwu May 4, 2018
d9592f4
Fix md by removing trailing yaml
taiwu May 4, 2018
1f7aa58
Addressed comments on Tag, csproj files, depreciated InvoiceName, mis…
May 4, 2018
dd70cd1
Merge branch 'preview' of https://github.com/Azure/azure-powershell i…
May 4, 2018
c970347
Bumped Network SDK version to 19.0.0-preview
anton-evseev May 7, 2018
e6602ef
Re-recorded test for VPN Gateway
anton-evseev May 7, 2018
69d1cfd
Remove dll-help.psd1 and .pshproj files
cormacpayne May 7, 2018
05cf227
update help docs for New-AzureRmNetworkWatcherProtocolConfiguration
junyezhu May 7, 2018
9caf218
Re-serialize module metadata and empty BreakingChangeIssues.csv
cormacpayne May 7, 2018
f024760
Fix issue #5998 - certificates created without server authentication …
juhacket May 7, 2018
9fefe2b
Remove missed dll-Help.psd1 reference
cormacpayne May 7, 2018
81ba939
Fix issue where default environments weren't being retrieved without …
cormacpayne May 7, 2018
ed051d8
Merge pull request #6134 from cormacpayne/dll-help-psd1
cormacpayne May 7, 2018
a5856ad
Recommitting to a new branch to untangle pulls
trgrie May 7, 2018
4b600cf
Merge pull request #6136 from cormacpayne/update-breaking-changes
May 8, 2018
48ebf19
remove support for set and new commands for circuit connection
dedhar May 8, 2018
123075e
Merge pull request #6141 from cormacpayne/fix-profile
markcowl May 8, 2018
b01acde
Add -ExtendedProperty parameter to New-AzureService and Set-AzureServ…
hyonholee May 8, 2018
0262509
Merge pull request #6145 from Azure/preview2
May 8, 2018
2782cc5
Fix bug in appveyor.yml
qinezh May 8, 2018
d415bef
Bumped Network's version in other packages
anton-evseev May 8, 2018
ea89796
Updated DNS zone recordings
anton-evseev May 8, 2018
dea1d00
Suppress credentials in VPN Gateway test
anton-evseev May 8, 2018
9d02b45
fixed type on example #3
sajal-mukherjee-git May 8, 2018
61a570b
Fixed incorrect credential suppression
anton-evseev May 8, 2018
21d1433
Merge pull request #6153 from Azure/qinezh-patch-1
cormacpayne May 8, 2018
8e1d325
Updated ChangeLog.md
anton-evseev May 8, 2018
0103df6
Merge pull request #6158 from sajal-mukherjee-git/preview
May 8, 2018
f64b4b8
Support piping on all circuit connection commands
dedhar May 8, 2018
a00ff31
Merge branch 'preview' of https://github.com/Azure/azure-powershell i…
dedhar May 8, 2018
d5c0668
Modify Commands.Sql.csproj and Commands.Sql.Test.csproj to use local …
payiAzure Mar 27, 2018
c071cbd
adding new parameters for create/update elastic pool and database cmd…
payiAzure Apr 11, 2018
27ba144
Fix issue in composing PUT request body for database and pool -- Sku …
payiAzure Apr 12, 2018
16fabc7
Update elasticPool adaptor and communicator to using new sdk when try…
payiAzure Apr 14, 2018
e4136c1
Update database replication related models and services to use new au…
payiAzure Apr 14, 2018
d0262cf
address comments on database/elastic pool cmdlets-- null check, remov…
payiAzure Apr 16, 2018
f91c4ce
address comments. Used -Edition -RequestedServiceObjectiveName for vc…
payiAzure Apr 17, 2018
59485e0
used the published SDK 1.14.0-preview. Update LocationCapabilities mo…
payiAzure Apr 18, 2018
559823d
Update all db creation related cmdlets to support vcore database
payiAzure Apr 24, 2018
f1b382c
Update db/elasticpool creation/update tests
payiAzure Apr 25, 2018
3ceb962
Add functions to get skuname when given tier for database and pool, t…
payiAzure Apr 25, 2018
b9457f7
use dictionary to mapping tier to skuname
payiAzure Apr 26, 2018
d01c230
re-record tests and update help file
payiAzure Apr 28, 2018
e09af77
Update restore cmdlet. Re-recording LTR restore test. Update changeLog.
payiAzure Apr 30, 2018
7c8cfd6
address comments. and revert all changes related with 'replication li…
payiAzure May 1, 2018
e842f89
using published sdk 1.15.0-preview for the build issue.
payiAzure May 2, 2018
0817ff9
Update cmds for creating/updating elasticpool. Use Patch way to do po…
payiAzure May 3, 2018
29199ec
fix the yaml trailing issue in help files
payiAzure May 3, 2018
97656ed
Add the removed properties back in DatabaseModel and ElasticPoolModel…
payiAzure May 3, 2018
96bce11
Update BreakingChangeIssues.csv
cormacpayne May 3, 2018
19254ae
Address comments. Re-recording part of the failed tests in CI build
payiAzure May 6, 2018
2e0dee6
re-recording part of the failed tests in CI build.
payiAzure May 6, 2018
b682d19
add new tests records to output dic
payiAzure May 8, 2018
0dfe254
Merge pull request #6132 from number213/network-sdk-19
May 8, 2018
82463e5
Addressed comments on parameter type and typo, and regenerated test s…
May 8, 2018
35468ac
Merge branch 'preview' of https://github.com/Azure/azure-powershell i…
May 8, 2018
fc74f4d
Merge branch 'preview' of https://github.com/Azure/azure-powershell i…
dedhar May 8, 2018
75003e9
revert changes to common.ps1
dedhar May 8, 2018
f01d012
link website for New-AzureRmNetworkWatcherProtocolConfiguration.md
junyezhu May 8, 2018
06b9652
Merge pull request #6127 from juhacket/preview
cormacpayne May 8, 2018
d911832
Merge branch 'preview' of https://github.com/antoniowmsft/azure-power…
antoniowmsft May 8, 2018
f75d8e2
Address PR comments
antoniowmsft May 8, 2018
0836bde
Merge pull request #6023 from bgsky/preview
MiYanni May 9, 2018
44b686a
Merge pull request #6162 from Azure/release-6.0.1
cormacpayne May 9, 2018
1da16cd
Merge pull request #6167 from Azure/master
May 9, 2018
0ac18a8
re-record backup LTR v2 tests, AuditingClassicStorageTests, ThreatDet…
payiAzure May 9, 2018
9b41a8f
address comments
May 9, 2018
d527eb0
re-record tests related with ClassicStorage
payiAzure May 9, 2018
f008839
Fix changelog and minor changes for comments
taiwu May 9, 2018
a77b4c1
Fix test TestExportDatabase and re-record it.
payiAzure May 9, 2018
d219426
Update Remove-AzureRmVirtualNetworkGatewayDefaultSite.md
mattbowes May 9, 2018
e102e83
Merge pull request #6147 from maddieclayton/asjobname
May 9, 2018
93fab11
Update azure-powershell-design-guidelines.md
May 9, 2018
b8f51ec
Fix null parameter for recurse i setaclentry
rahuldutta90 May 9, 2018
73f8fc7
fix issue with network watcher md files
junyezhu May 9, 2018
c187a4b
Merge pull request #6184 from mattbowes/patch-1
May 9, 2018
26156e3
Merge pull request #6187 from Azure/maddieclayton-patch-2
cormacpayne May 9, 2018
754ca52
Regenerate help files
antoniowmsft May 9, 2018
1cf82cb
Update Set-AzureRmVirtualNetwork.md
anavinahar May 9, 2018
47922c6
address vladimir comments
dedhar May 9, 2018
d30030b
add support to set command to allow piping
dedhar May 9, 2018
6c98abc
removing writing to peer to fix return type
dedhar May 9, 2018
8efe523
Merge branch 'preview' of https://github.com/Azure/azure-powershell i…
dedhar May 9, 2018
f339cbc
Merge pull request #6190 from Azure/anavinahar-patch-1
cormacpayne May 10, 2018
a2cbb6e
Update BreakingChangeIssues.csv
payiAzure May 10, 2018
8cb3b88
Record auditing & threat detection tests
jaredmoo May 10, 2018
0973946
Update LICENSE.txt
sphibbs May 10, 2018
0779edd
Update License.rtf
sphibbs May 10, 2018
d7886cb
revert change to set circuit command
dedhar May 10, 2018
6fd43e2
Merge branch 'preview' of https://github.com/Azure/azure-powershell i…
dedhar May 10, 2018
f30eff0
remove value from pipeline by property name from all circuit connecit…
dedhar May 10, 2018
d4ccc0a
Merge pull request #6195 from sphibbs/preview
MiYanni May 10, 2018
42a2939
Update License.rtf
sphibbs May 10, 2018
1f96ea2
fix merge conflits for protocol config
junyezhu May 10, 2018
2b7bfd3
Merge pull request #6094 from dedhar/preview
vladimir-shcherbakov May 10, 2018
917b2dd
Merge branch 'preview' into juliet/feat/addprotocolconfig
junyezhu May 10, 2018
1f52fe7
Skip severel tests that can only run in live mode (talked with test o…
payiAzure May 10, 2018
f52a3fd
fix test
May 10, 2018
c0be770
fix test
May 10, 2018
2114877
Merge pull request #6075 from antoniowmsft/preview
cormacpayne May 10, 2018
c9de84b
move from on demand to regular build
May 10, 2018
87df5ff
Merge pull request #6197 from sphibbs/preview
May 10, 2018
c841f10
Update AzureRM.Network.psd1
junyezhu May 10, 2018
2575c01
fix based on comments
May 11, 2018
6de551a
Merge pull request #6198 from maddieclayton/recordAks
May 11, 2018
ab30a35
Update New-AzureRmNetworkWatcherProtocolConfiguration.md
junyezhu May 11, 2018
8b06f8d
make protocol required
junyezhu May 11, 2018
ca5a272
Merge pull request #6200 from maddieclayton/fixAC
cormacpayne May 11, 2018
17b6a03
Merge pull request #6043 from taiwu/taiwu-gw-424
praries880 May 11, 2018
5082c8d
Add unittests for new apis
rahuldutta90 May 12, 2018
7648482
address comments. Remove Sku and PerDatabaseSettings from DatabaseMod…
payiAzure May 12, 2018
ff8a893
Update the elastic pool tests. fix bug.
payiAzure May 14, 2018
6d12377
Save export file to adl
rahuldutta90 May 14, 2018
4be746e
Merge pull request #6188 from Azure/task-adls-fix-setaclentry
cormacpayne May 14, 2018
9253ef1
Address comments. ReplicationLinkModel, DatabaseCopyModel, remove dup…
payiAzure May 14, 2018
d997b35
Add default parameter set for two cmdlets. Update ChangeLog.md and re…
payiAzure May 15, 2018
bae2e4a
small type fix
payiAzure May 15, 2018
9b750aa
Example fixes for `New-AzureRmStorageAccount`.
twitchax May 15, 2018
1cdeb09
Updating examples for BGP service communities..
ganesr May 15, 2018
646e704
Update Get-AzureRmBgpServiceCommunity.md
ganesr May 15, 2018
f12aa3f
Merge pull request #6213 from twitchax/storage_doc_fix
cormacpayne May 15, 2018
c92ef58
Update Get-AzureRmBgpServiceCommunity.md
ganesr May 15, 2018
e5d19bf
Fix the example for Export-AzureRmDataLakeStoreChildItemProperties
rahuldutta90 May 15, 2018
8e7a2d2
Update Test-AzureRmDnsAvailability Help File
markjbrown May 15, 2018
0f03afc
Merge pull request #1 from markjbrown/markjbrown-patch-1
markjbrown May 15, 2018
9b2f70f
Update changelog file
rahuldutta90 May 15, 2018
70679bd
Merge pull request #6220 from ganesr/preview
cormacpayne May 15, 2018
c853d13
Fixed header in Get-AzureRmVirtualNetworkPeering
markjbrown May 15, 2018
a289a71
Update Remove-AzureRmVirtualNetworkPeering.md
markjbrown May 15, 2018
ba854c2
Update AzureRM.Network.md
markjbrown May 15, 2018
ed2ffbc
fix breaking change issue and signature issue
junyezhu May 15, 2018
ca50007
Small fix. Use SkuName in the pool model to keep alignment with other…
payiAzure May 15, 2018
1c03e5f
Merge pull request #6222 from Azure/task-adls-fixhelpfiles
MiYanni May 15, 2018
9b9145a
Merge pull request #6221 from markjbrown/preview
MiYanni May 15, 2018
af2205d
Update ChangeLog.md
junyezhu May 16, 2018
ab32c1b
Update NewAzureNetworkWatcherProtocolConfiguration.cs
junyezhu May 16, 2018
f6468bb
Merge branch 'release-6.1.0' into juliet/feat/addprotocolconfig
junyezhu May 16, 2018
7c6b015
Merge pull request #6148 from hyonholee/asm
cormacpayne May 16, 2018
3f874a7
Fix to `New-AzureRmAks` help text.
twitchax May 16, 2018
c1c3700
Fix issue with Clear-AzureRmContext where old default context name wa…
cormacpayne May 16, 2018
5667520
Merge pull request #6235 from twitchax/aks_help_fix
cormacpayne May 16, 2018
fb314ad
Merge pull request #6117 from junyezhu/juliet/feat/addprotocolconfig
cormacpayne May 17, 2018
e6fe85b
Merge branch 'release-6.1.0' into database2017
cormacpayne May 17, 2018
16bd80d
update cmdlets based on autorest .net client 2018-01-01
solankisamir Mar 12, 2018
9afe33e
Refactor InputObject variables and other review comments
solankisamir May 15, 2018
c5169ce
get identity properties from InputObject and allow override by parame…
solankisamir May 17, 2018
8c6a5c9
Skip failing Batch tests in on-demand build (see issue #5006)
cormacpayne May 17, 2018
3b25381
Merge pull request #5949 from payiAzure/database2017
cormacpayne May 17, 2018
61191c8
Merge pull request #6237 from cormacpayne/fix-context
cormacpayne May 17, 2018
e020b32
Merge branch 'release-6.1.0' into apim_2018_01_01
cormacpayne May 17, 2018
849ffc8
Update SignatureIssues.csv
cormacpayne May 17, 2018
cc85084
Merge pull request #6189 from solankisamir/apim_2018_01_01
cormacpayne May 17, 2018
4b5fb79
Update modules for 6.1.0 release
cormacpayne May 17, 2018
b22be8f
Fix error in paths for Profile RequiredAssemblies
cormacpayne May 17, 2018
377fcd7
Merge pull request #6248 from cormacpayne/release-6.1.0
cormacpayne May 18, 2018
618b15c
Add short term retention cmdlets
adeal May 24, 2018
6246d5e
Add tests and vbump SqlManagement SDK
adeal May 25, 2018
0ed0089
Add session record
adeal May 25, 2018
e8db3ce
Add help files for ShortTermRetention cmdlets
adeal May 29, 2018
fb332dc
Update changelog to include new ShortTermRetention cmdlets
adeal May 29, 2018
84050f6
Merge branch 'AzureRM.Sql.STR' into 'AzureRM.Sql.ShortTermRetentionHo…
adeal May 29, 2018
90ceb69
Add online version to ShortTermRetention help files
adeal May 29, 2018
5874e40
Fix ShortTermRetention static analysis errors
adeal May 30, 2018
9c9c280
Rerecord test to see if it fixes failure
adeal May 31, 2018
72ece70
Fix static caching issue of SqlClient that was likely causing test fa…
adeal May 31, 2018
465c433
Improve ShorttermRetention test and improve parameter sets so ServerN…
adeal May 31, 2018
0018952
Fix changelog merge mistake.
adeal Jun 4, 2018
14f5d42
Add -ResourceId paramset with tests. Regen help docs.
adeal Jun 5, 2018
ff42f81
ShortTermRetention help files were misformatted during the regen.
adeal Jun 5, 2018
2fe2971
Switch back to ValueFromPipelineByPropertyName for ServerName and Dat…
adeal Jun 5, 2018
729eac0
Rename InputObject -> AzureSqlDatabase
adeal Jun 5, 2018
cc98b79
Rename InputObject->AzureSqlDatabase in test
adeal Jun 5, 2018
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
4 changes: 3 additions & 1 deletion src/ResourceManager/Sql/AzureRM.Sql.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,9 @@ CmdletsToExport = 'Get-AzureRmSqlDatabaseTransparentDataEncryption',
'Get-AzureRmSqlDatabaseGeoBackupPolicy',
'Set-AzureRmSqlDatabaseGeoBackupPolicy',
'Get-AzureRmSqlDatabaseBackupLongTermRetentionPolicy',
'Set-AzureRmSqlDatabaseBackupLongTermRetentionPolicy',
'Set-AzureRmSqlDatabaseBackupLongTermRetentionPolicy',
'Get-AzureRmSqlDatabaseBackupShortTermRetentionPolicy',
'Set-AzureRmSqlDatabaseBackupShortTermRetentionPolicy',
'Get-AzureRmSqlDatabaseLongTermRetentionBackup',
'Remove-AzureRmSqlDatabaseLongTermRetentionBackup',
'Get-AzureRmSqlDeletedDatabaseBackup',
Expand Down
19 changes: 10 additions & 9 deletions src/ResourceManager/Sql/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,18 @@
- Additional information about change #1
-->
## Current Release
* Add new cmdlets 'Get-AzureRmSqlDatabaseBackupShortTermRetention' and 'Set-AzureRmSqlDatabaseBackupShortTermRetention' to support getting/setting the retention policy for point-in-time-restore backups

## Version 4.5.0-preview
* Added new cmdlets for CRUD operations on Managed Instance and Managed Database
* Add commandlets for new feature - Instance Failover Groups
- Get-AzureRmSqlDatabaseInstanceFailoverGroup get the Instance Failover Group entity
- New-AzureRmSqlDatabaseInstanceFailoverGroup creates a new Instance Failover Group
- Remove-AzureRmSqlDatabaseInstanceFailoverGroup Instance Failover Group deletes the Failover Group
- Set-AzureRmSqlDatabaseInstanceFailoverGroup set Azure Sql Database Failover Policy and Grace Period entities of the Instance Failover Group
- Switch-AzureRmSqlDatabaseInstanceFailoverGroup issues the failover operation with data loss or without data loss
## Version 4.5.0
* Updated Auditing cmdlets to allow removing AuditActions or AuditActionGroups
* Fixed issue with Set-AzureRmSqlDatabaseBackupLongTermRetentionPolicy when setting a new flexible retention policy where the command would fail with "Configure long term retention policy with azure recovery service vault and policy is no longer supported. Please submit request with the new flexible retention policy".
* Fixed issue with Set-AzureRmSqlDatabaseBackupLongTermRetentionPolicy when setting a new flexible retention policy where the command would fail with 'Configure long term retention policy with azure recovery service vault and policy is no longer supported. Please submit request with the new flexible retention policy'.
* Update all Azure Sql Database/ElasticPool Creation/Update related cmdlets to use the new Database API, which support Sku property for scale and tier-related properties.
* The updated cmdlets including:
- New-AzureRmSqlDatabase; Set-AzureRmSqlDatabase
- New-AzureRmSqlElasticPool; Set-AzureRmSqlElasticPool
- New-AzureRmSqlDatabaseCopy
- New-AzureRmSqlDatabaseSecondary
- Restore-AzureRmSqlDatabase

## Version 4.4.1
* Set minimum dependency of module to PowerShell 5.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@
<Reference Include="Microsoft.Azure.Management.Network, Version=19.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Network.19.0.0-preview\lib\net452\Microsoft.Azure.Management.Network.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Azure.Management.Sql, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Sql.1.15.0-preview\lib\net452\Microsoft.Azure.Management.Sql.dll</HintPath>
<Private>True</Private>
<Reference Include="Microsoft.Azure.Management.Sql, Version=1.16.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Sql.1.16.0-preview\lib\net452\Microsoft.Azure.Management.Sql.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Azure.Management.Storage">
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Storage.2.4.0-preview\lib\net40\Microsoft.Azure.Management.Storage.dll</HintPath>
Expand Down Expand Up @@ -606,6 +606,9 @@
<None Include="SessionRecords\Microsoft.Azure.Commands.Sql.Test.ScenarioTests.DatabaseBackupTests\TestDatabaseGeoBackupPolicy.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.Azure.Commands.Sql.Test.ScenarioTests.DatabaseBackupTests\TestShortTermRetentionPolicy.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.Azure.Commands.Sql.Test.ScenarioTests.DatabaseCrudStretchTests\TestStretchDatabaseCreate.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,5 +147,11 @@ public void TestRemoveDatabaseRestorePoint()
RunPowerShellTest("Test-RemoveDatabaseRestorePoint");
}
}
[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestShortTermRetentionPolicy()
{
RunPowerShellTest("Test-ShortTermRetentionPolicy");
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -383,4 +383,73 @@ function Test-RemoveDatabaseRestorePoint
{
Remove-ResourceGroupForTest $rg
}
}

function Test-ShortTermRetentionPolicy
{
# Setup
$location = Get-Location "Microsoft.Sql" "servers" "West US 2"
$rg = Create-ResourceGroupForTest $location
$server = Create-ServerForTest $rg $location

# Not divisible by 7, client should error
$invalidRetention = 20

try
{
# Create db with default values
$databaseName = Get-DatabaseName
$db = New-AzureRmSqlDatabase -ResourceGroupName $rg.ResourceGroupName -ServerName $server.ServerName -DatabaseName $databaseName

# Test default parameter set
$retention = 28
$policy = Set-AzureRmSqlDatabaseBackupShortTermRetentionPolicy -ResourceGroupName $rg.ResourceGroupName -ServerName $server.ServerName -DatabaseName $databaseName -RetentionDays $retention
Assert-AreEqual $policy.Count 1
Assert-AreEqual $retention $policy[0].RetentionDays
$policy = Get-AzureRmSqlDatabaseBackupShortTermRetentionPolicy -ResourceGroupName $rg.ResourceGroupName -ServerName $server.ServerName -DatabaseName $databaseName
Assert-AreEqual $policy.Count 1
Assert-AreEqual $retention $policy[0].RetentionDays

# Test InputObject
$retention = 21
$policy = Set-AzureRmSqlDatabaseBackupShortTermRetentionPolicy -AzureSqlDatabase $db -RetentionDays $retention
Assert-AreEqual 1 $policy.Count
Assert-AreEqual $retention $policy[0].RetentionDays
$policy = Get-AzureRmSqlDatabaseBackupShortTermRetentionPolicy -AzureSqlDatabase $db
Assert-AreEqual 1 $policy.Count
Assert-AreEqual $retention $policy[0].RetentionDays

# Test ResourceId
$retention = 14
$resourceId = $db.ResourceId + "/backupShortTermRetentionPolicies/default"
$policy = Set-AzureRmSqlDatabaseBackupShortTermRetentionPolicy -ResourceId $resourceId -RetentionDays $retention
Assert-AreEqual 1 $policy.Count
Assert-AreEqual $retention $policy[0].RetentionDays
$policy = Get-AzureRmSqlDatabaseBackupShortTermRetentionPolicy -ResourceId $resourceId
Assert-AreEqual 1 $policy.Count
Assert-AreEqual $retention $policy[0].RetentionDays

# Test Piping
$retention = 7
$policy = $db | Set-AzureRmSqlDatabaseBackupShortTermRetentionPolicy -RetentionDays $retention
Assert-AreEqual 1 $policy.Count
Assert-AreEqual $retention $policy[0].RetentionDays
$policy = $db | Get-AzureRmSqlDatabaseBackupShortTermRetentionPolicy
Assert-AreEqual 1 $policy.Count
Assert-AreEqual $retention $policy[0].RetentionDays

# Test client-side error handling
try {
$db | Set-AzureRmSqlDatabaseBackupShortTermRetentionPolicy -RetentionDays $invalidRetention
}
catch [System.Management.Automation.PSArgumentException] {
# We expect an error here
Assert-AreEqual $_.Count 1
}

}
finally
{
Remove-ResourceGroupForTest $rg
}
}

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/ResourceManager/Sql/Commands.Sql.Test/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<package id="Microsoft.Azure.Management.Authorization" version="2.0.0" targetFramework="net45" />
<package id="Microsoft.Azure.Management.Network" version="19.0.0-preview" targetFramework="net452" />
<package id="Microsoft.Azure.Management.Resources" version="2.20.0-preview" targetFramework="net45" />
<package id="Microsoft.Azure.Management.Sql" version="1.15.0-preview" targetFramework="net452" />
<package id="Microsoft.Azure.Management.Sql" version="1.16.0-preview" targetFramework="net452" />
<package id="Microsoft.Azure.Management.Storage" version="2.4.0-preview" targetFramework="net45" />
<package id="Microsoft.Azure.Test.Framework" version="1.0.6179.26854-prerelease" targetFramework="net45" />
<package id="Microsoft.Azure.Test.HttpRecorder" version="1.6.7-preview" targetFramework="net45" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Azure.Management.Sql" Version="1.15.0-preview" />
<PackageReference Include="Microsoft.Azure.Management.Sql" Version="1.16.0-preview" />
<PackageReference Include="Microsoft.Azure.Management.Storage" Version="7.1.0-preview" />
<PackageReference Include="Microsoft.WindowsAzure.Management.Storage" Version="5.1.1" />
</ItemGroup>
Expand Down
6 changes: 5 additions & 1 deletion src/ResourceManager/Sql/Commands.Sql/Commands.Sql.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,13 @@
<Compile Include="Auditing\Model\DatabaseBlobAuditingSettingsModel.cs" />
<Compile Include="Auditing\Model\ServerBlobAuditingSettingsModel.cs" />
<Compile Include="Common\ResourceIdentityHelper.cs" />
<Compile Include="Database Backup\Cmdlet\AzureSqlDatabaseBackupShortTermRetentionPolicyCmdletBase.cs" />
<Compile Include="Database Backup\Cmdlet\AzureSqlDatabaseLongTermRetentionBackupCmdletBase.cs" />
<Compile Include="Database Backup\Cmdlet\GetAzureRmSqlDatabaseBackupShortTermRetentionPolicy.cs" />
<Compile Include="Database Backup\Cmdlet\RemoveAzureRmSqlDatabaseLongTermRetentionBackup.cs" />
<Compile Include="Database Backup\Cmdlet\GetAzureRmSqlDatabaseLongTermRetentionBackup.cs" />
<Compile Include="Database Backup\Cmdlet\SetAzureRmSqlDatabaseBackupShortTermRetentionPolicy.cs" />
<Compile Include="Database Backup\Model\AzureSqlDatabaseBackupShortTermRetentionPolicyModel.cs" />
<Compile Include="Database Backup\Model\AzureSqlDatabaseLongTermRetentionBackupModel.cs" />
<Compile Include="Database Backup\Model\AzureSqlDatabaseLongTermRetentionPolicyModel.cs" />
<Compile Include="Database\Cmdlet\StopAzureSqlDatabaseActivity.cs" />
Expand Down Expand Up @@ -486,7 +490,7 @@
</ProjectReference>
<Reference Include="Microsoft.Azure.Management.Sql, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Sql.1.15.0-preview\lib\net452\Microsoft.Azure.Management.Sql.dll</HintPath>
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Sql.1.16.0-preview\lib\net452\Microsoft.Azure.Management.Sql.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Azure.Management.Storage">
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
using System;
using System.Collections.Generic;
using Microsoft.Azure.Commands.Sql.Backup.Services;
using Microsoft.Azure.Commands.Sql.Common;
using System.Management.Automation;
using Microsoft.Azure.Commands.Common.Authentication.Abstractions;
using Microsoft.Azure.Commands.Sql.Database_Backup.Model;
using Microsoft.Azure.Commands.Sql.Database.Model;
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;

namespace Microsoft.Azure.Commands.Sql.Database_Backup.Cmdlet
{
public abstract class AzureSqlDatabaseBackupShortTermRetentionPolicyCmdletBase : AzureSqlCmdletBase<IEnumerable<AzureSqlDatabaseBackupShortTermRetentionPolicyModel>, AzureSqlDatabaseBackupAdapter>
{
/// <summary>
/// The expected number of segments in a short term retention policy resource id.
/// </summary>
private const int BackupShortTermRetentionPolicyResourceIdSegmentsLength = 12;

/// <summary>
/// Parameter set with ResourceGroup name, Server name and Database name.
/// </summary>
protected const string PolicyByResourceServerDatabaseSet = "PolicyByResourceServerDatabaseSet";

/// <summary>
/// Parameter set for using a Database Input Object.
/// </summary>
private const string PolicyByInputObjectSet = "PolicyByInputObjectSet";

/// <summary>
/// Parameter set for using a resource Id.
/// </summary>
private const string PolicyByResourceIdSet = "PolicyByResourceIdSet";

/// <summary>
/// Gets or sets the Database object to get the policy for.
/// </summary>
[Parameter(
ParameterSetName = PolicyByInputObjectSet,
Mandatory = true,
ValueFromPipeline = true,
HelpMessage = "The database object to get the policy for.")]
[ValidateNotNullOrEmpty]
public AzureSqlDatabaseModel AzureSqlDatabase { get; set; }

/// <summary>
/// Gets or sets the Database object to get the policy for.
/// </summary>
[Parameter(
ParameterSetName = PolicyByResourceIdSet,
Mandatory = true,
ValueFromPipelineByPropertyName = true,
HelpMessage = "The short term retention policy resource Id.")]
[ValidateNotNullOrEmpty]
public string ResourceId { get; set; }

/// <summary>
/// Gets or sets the name of the resource group to use.
/// </summary>
[Parameter(
ParameterSetName = PolicyByResourceServerDatabaseSet,
Mandatory = true,
ValueFromPipelineByPropertyName = true,
Position = 0,
HelpMessage = "The name of the resource group.")]
[ResourceGroupCompleter]
[ValidateNotNullOrEmpty]
public override string ResourceGroupName { get; set; }

/// <summary>
/// Gets or sets the name of the database server to use.
/// </summary>
[Parameter(ParameterSetName = PolicyByResourceServerDatabaseSet,
Mandatory = true,
ValueFromPipelineByPropertyName = true,
Position = 1,
HelpMessage = "The name of the Azure SQL Server the database is in.")]
[ValidateNotNullOrEmpty]
public string ServerName { get; set; }

/// <summary>
/// Gets or sets the name of the database to use.
/// </summary>
[Parameter(
ParameterSetName = PolicyByResourceServerDatabaseSet,
Mandatory = true,
ValueFromPipelineByPropertyName = true,
Position = 2,
HelpMessage = "The name of the Azure SQL Database to use.")]
[ValidateNotNullOrEmpty]
public string DatabaseName { get; set; }

/// <summary>
/// Initializes the adapter
/// </summary>
/// <param name="subscription">The subscription to operate on</param>
/// <returns></returns>
protected override AzureSqlDatabaseBackupAdapter InitModelAdapter(IAzureSubscription subscription)
{
return new AzureSqlDatabaseBackupAdapter(DefaultProfile.DefaultContext);
}

public override void ExecuteCmdlet()
{
if (AzureSqlDatabase != null)
{
this.ResourceGroupName = AzureSqlDatabase.ResourceGroupName;
this.ServerName = AzureSqlDatabase.ServerName;
this.DatabaseName = AzureSqlDatabase.DatabaseName;
}
else if (!string.IsNullOrEmpty(ResourceId))
{
ParseResourceId();
}

base.ExecuteCmdlet();
}

/// <summary>
/// Helper method to parse resourceGroupName, serverName, databaseName from resourceId
/// Ideally this would utilize Microsoft.Azure.Management.Internal.Resources.Utilities.Models.ResourceIdentifier
/// However, that class is not setup to handle resources that have an ancestry higher than just parent level.
/// That class could recursively create a parent ResourceIdentifier on a __get__ ParentResource,
/// rather than just a string, so a consumer could work all the way to the root resource easily.
/// Leave as a TODO for now, as many other cmdlets consume that class, and I will work on it in separate change.
/// </summary>
private void ParseResourceId()
{
string[] tokens = ResourceId.Split(new char[] { '/' }, StringSplitOptions.RemoveEmptyEntries);

// "/subscriptions/<subId>/resourceGroups/<resourceGroup>/providers/Microsoft.Sql/servers/<server>/databases/<database>/backupShortTermRetentionPolicies/default"
if (tokens.Length != BackupShortTermRetentionPolicyResourceIdSegmentsLength)
{
throw new ArgumentException("Invalid format of the resource identifier.", "ResourceId");
}

// Convert tokens into TYPE:NAME key value pairs, ignoring case
Dictionary<string, string> segments = new Dictionary<string, string>(StringComparer.InvariantCultureIgnoreCase);
int i = 0;
while (i < tokens.Length)
{
string type = tokens[i++];
string name = tokens[i++];
segments[type] = name;
}

try
{
this.ResourceGroupName = segments["resourceGroups"];
this.ServerName = segments["servers"];
this.DatabaseName = segments["databases"];
}
catch (KeyNotFoundException)
{
throw new ArgumentException(
"Invalid format of the resource identifier. ResourceID should follow format /subscriptions/<subscriptionId>/resourceGroups/<resourceGroupName>/providers/Microsoft.Sql/servers/<serverName>/databases/<databaseName>/backupShortTermRetentionPolicies/default");
}
}
}
}
Loading