Skip to content

Commit fa60001

Browse files
ostojicbMDCS-sql
andauthored
[SQL] Update managed database restore details model (#19635)
* Add new parameter and nuget that is prereleased * record tests * remove pijson files * re-record db tests * more recording * moree * Generate new sdk files * test target group remove record * Recorded all tests * Update ManagedDatabaseRestoreDetails model * Simplify stop-lrs logic * rerecord tests * bump changelog.md Co-authored-by: Milan Brkic <[email protected]>
1 parent ed15cb9 commit fa60001

File tree

75 files changed

+30012
-19025
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+30012
-19025
lines changed

src/Sql/Sql.Sdk/Generated/DatabaseAdvancedThreatProtectionSettingsOperations.cs

Lines changed: 881 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 209 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,209 @@
1+
// <auto-generated>
2+
// Copyright (c) Microsoft Corporation. All rights reserved.
3+
// Licensed under the MIT License. See License.txt in the project root for
4+
// license information.
5+
//
6+
// Code generated by Microsoft (R) AutoRest Code Generator.
7+
// Changes may cause incorrect behavior and will be lost if the code is
8+
// regenerated.
9+
// </auto-generated>
10+
11+
namespace Microsoft.Azure.Management.Sql
12+
{
13+
using Microsoft.Rest;
14+
using Microsoft.Rest.Azure;
15+
using Models;
16+
using System.Threading;
17+
using System.Threading.Tasks;
18+
19+
/// <summary>
20+
/// Extension methods for DatabaseAdvancedThreatProtectionSettingsOperations.
21+
/// </summary>
22+
public static partial class DatabaseAdvancedThreatProtectionSettingsOperationsExtensions
23+
{
24+
/// <summary>
25+
/// Gets a list of database's Advanced Threat Protection states.
26+
/// </summary>
27+
/// <param name='operations'>
28+
/// The operations group for this extension method.
29+
/// </param>
30+
/// <param name='resourceGroupName'>
31+
/// The name of the resource group that contains the resource. You can obtain
32+
/// this value from the Azure Resource Manager API or the portal.
33+
/// </param>
34+
/// <param name='serverName'>
35+
/// The name of the server.
36+
/// </param>
37+
/// <param name='databaseName'>
38+
/// The name of the database.
39+
/// </param>
40+
public static IPage<DatabaseAdvancedThreatProtection> ListByDatabase(this IDatabaseAdvancedThreatProtectionSettingsOperations operations, string resourceGroupName, string serverName, string databaseName)
41+
{
42+
return operations.ListByDatabaseAsync(resourceGroupName, serverName, databaseName).GetAwaiter().GetResult();
43+
}
44+
45+
/// <summary>
46+
/// Gets a list of database's Advanced Threat Protection states.
47+
/// </summary>
48+
/// <param name='operations'>
49+
/// The operations group for this extension method.
50+
/// </param>
51+
/// <param name='resourceGroupName'>
52+
/// The name of the resource group that contains the resource. You can obtain
53+
/// this value from the Azure Resource Manager API or the portal.
54+
/// </param>
55+
/// <param name='serverName'>
56+
/// The name of the server.
57+
/// </param>
58+
/// <param name='databaseName'>
59+
/// The name of the database.
60+
/// </param>
61+
/// <param name='cancellationToken'>
62+
/// The cancellation token.
63+
/// </param>
64+
public static async Task<IPage<DatabaseAdvancedThreatProtection>> ListByDatabaseAsync(this IDatabaseAdvancedThreatProtectionSettingsOperations operations, string resourceGroupName, string serverName, string databaseName, CancellationToken cancellationToken = default(CancellationToken))
65+
{
66+
using (var _result = await operations.ListByDatabaseWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, null, cancellationToken).ConfigureAwait(false))
67+
{
68+
return _result.Body;
69+
}
70+
}
71+
72+
/// <summary>
73+
/// Gets a database's Advanced Threat Protection state.
74+
/// </summary>
75+
/// <param name='operations'>
76+
/// The operations group for this extension method.
77+
/// </param>
78+
/// <param name='resourceGroupName'>
79+
/// The name of the resource group that contains the resource. You can obtain
80+
/// this value from the Azure Resource Manager API or the portal.
81+
/// </param>
82+
/// <param name='serverName'>
83+
/// The name of the server.
84+
/// </param>
85+
/// <param name='databaseName'>
86+
/// The name of the database.
87+
/// </param>
88+
public static DatabaseAdvancedThreatProtection Get(this IDatabaseAdvancedThreatProtectionSettingsOperations operations, string resourceGroupName, string serverName, string databaseName)
89+
{
90+
return operations.GetAsync(resourceGroupName, serverName, databaseName).GetAwaiter().GetResult();
91+
}
92+
93+
/// <summary>
94+
/// Gets a database's Advanced Threat Protection state.
95+
/// </summary>
96+
/// <param name='operations'>
97+
/// The operations group for this extension method.
98+
/// </param>
99+
/// <param name='resourceGroupName'>
100+
/// The name of the resource group that contains the resource. You can obtain
101+
/// this value from the Azure Resource Manager API or the portal.
102+
/// </param>
103+
/// <param name='serverName'>
104+
/// The name of the server.
105+
/// </param>
106+
/// <param name='databaseName'>
107+
/// The name of the database.
108+
/// </param>
109+
/// <param name='cancellationToken'>
110+
/// The cancellation token.
111+
/// </param>
112+
public static async Task<DatabaseAdvancedThreatProtection> GetAsync(this IDatabaseAdvancedThreatProtectionSettingsOperations operations, string resourceGroupName, string serverName, string databaseName, CancellationToken cancellationToken = default(CancellationToken))
113+
{
114+
using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, null, cancellationToken).ConfigureAwait(false))
115+
{
116+
return _result.Body;
117+
}
118+
}
119+
120+
/// <summary>
121+
/// Creates or updates a database's Advanced Threat Protection state.
122+
/// </summary>
123+
/// <param name='operations'>
124+
/// The operations group for this extension method.
125+
/// </param>
126+
/// <param name='resourceGroupName'>
127+
/// The name of the resource group that contains the resource. You can obtain
128+
/// this value from the Azure Resource Manager API or the portal.
129+
/// </param>
130+
/// <param name='serverName'>
131+
/// The name of the server.
132+
/// </param>
133+
/// <param name='databaseName'>
134+
/// The name of the database.
135+
/// </param>
136+
/// <param name='parameters'>
137+
/// The database Advanced Threat Protection state.
138+
/// </param>
139+
public static DatabaseAdvancedThreatProtection CreateOrUpdate(this IDatabaseAdvancedThreatProtectionSettingsOperations operations, string resourceGroupName, string serverName, string databaseName, DatabaseAdvancedThreatProtection parameters)
140+
{
141+
return operations.CreateOrUpdateAsync(resourceGroupName, serverName, databaseName, parameters).GetAwaiter().GetResult();
142+
}
143+
144+
/// <summary>
145+
/// Creates or updates a database's Advanced Threat Protection state.
146+
/// </summary>
147+
/// <param name='operations'>
148+
/// The operations group for this extension method.
149+
/// </param>
150+
/// <param name='resourceGroupName'>
151+
/// The name of the resource group that contains the resource. You can obtain
152+
/// this value from the Azure Resource Manager API or the portal.
153+
/// </param>
154+
/// <param name='serverName'>
155+
/// The name of the server.
156+
/// </param>
157+
/// <param name='databaseName'>
158+
/// The name of the database.
159+
/// </param>
160+
/// <param name='parameters'>
161+
/// The database Advanced Threat Protection state.
162+
/// </param>
163+
/// <param name='cancellationToken'>
164+
/// The cancellation token.
165+
/// </param>
166+
public static async Task<DatabaseAdvancedThreatProtection> CreateOrUpdateAsync(this IDatabaseAdvancedThreatProtectionSettingsOperations operations, string resourceGroupName, string serverName, string databaseName, DatabaseAdvancedThreatProtection parameters, CancellationToken cancellationToken = default(CancellationToken))
167+
{
168+
using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, parameters, null, cancellationToken).ConfigureAwait(false))
169+
{
170+
return _result.Body;
171+
}
172+
}
173+
174+
/// <summary>
175+
/// Gets a list of database's Advanced Threat Protection states.
176+
/// </summary>
177+
/// <param name='operations'>
178+
/// The operations group for this extension method.
179+
/// </param>
180+
/// <param name='nextPageLink'>
181+
/// The NextLink from the previous successful call to List operation.
182+
/// </param>
183+
public static IPage<DatabaseAdvancedThreatProtection> ListByDatabaseNext(this IDatabaseAdvancedThreatProtectionSettingsOperations operations, string nextPageLink)
184+
{
185+
return operations.ListByDatabaseNextAsync(nextPageLink).GetAwaiter().GetResult();
186+
}
187+
188+
/// <summary>
189+
/// Gets a list of database's Advanced Threat Protection states.
190+
/// </summary>
191+
/// <param name='operations'>
192+
/// The operations group for this extension method.
193+
/// </param>
194+
/// <param name='nextPageLink'>
195+
/// The NextLink from the previous successful call to List operation.
196+
/// </param>
197+
/// <param name='cancellationToken'>
198+
/// The cancellation token.
199+
/// </param>
200+
public static async Task<IPage<DatabaseAdvancedThreatProtection>> ListByDatabaseNextAsync(this IDatabaseAdvancedThreatProtectionSettingsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
201+
{
202+
using (var _result = await operations.ListByDatabaseNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
203+
{
204+
return _result.Body;
205+
}
206+
}
207+
208+
}
209+
}

src/Sql/Sql.Sdk/Generated/DatabasesOperations.cs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ internal DatabasesOperations(SqlManagementClient client)
517517
{
518518
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
519519
}
520-
string apiVersion = "2021-05-01-preview";
520+
string apiVersion = "2022-02-01-preview";
521521
// Tracing
522522
bool _shouldTrace = ServiceClientTracing.IsEnabled;
523523
string _invocationId = null;
@@ -724,7 +724,7 @@ internal DatabasesOperations(SqlManagementClient client)
724724
{
725725
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
726726
}
727-
string apiVersion = "2021-05-01-preview";
727+
string apiVersion = "2022-02-01-preview";
728728
// Tracing
729729
bool _shouldTrace = ServiceClientTracing.IsEnabled;
730730
string _invocationId = null;
@@ -1108,7 +1108,7 @@ internal DatabasesOperations(SqlManagementClient client)
11081108
{
11091109
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
11101110
}
1111-
string apiVersion = "2021-05-01-preview";
1111+
string apiVersion = "2022-02-01-preview";
11121112
// Tracing
11131113
bool _shouldTrace = ServiceClientTracing.IsEnabled;
11141114
string _invocationId = null;
@@ -1379,7 +1379,7 @@ internal DatabasesOperations(SqlManagementClient client)
13791379
{
13801380
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
13811381
}
1382-
string apiVersion = "2021-05-01-preview";
1382+
string apiVersion = "2022-02-01-preview";
13831383
// Tracing
13841384
bool _shouldTrace = ServiceClientTracing.IsEnabled;
13851385
string _invocationId = null;
@@ -1576,7 +1576,7 @@ internal DatabasesOperations(SqlManagementClient client)
15761576
{
15771577
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
15781578
}
1579-
string apiVersion = "2021-05-01-preview";
1579+
string apiVersion = "2022-02-01-preview";
15801580
// Tracing
15811581
bool _shouldTrace = ServiceClientTracing.IsEnabled;
15821582
string _invocationId = null;
@@ -1789,7 +1789,7 @@ internal DatabasesOperations(SqlManagementClient client)
17891789
{
17901790
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
17911791
}
1792-
string apiVersion = "2021-05-01-preview";
1792+
string apiVersion = "2022-02-01-preview";
17931793
// Tracing
17941794
bool _shouldTrace = ServiceClientTracing.IsEnabled;
17951795
string _invocationId = null;
@@ -2015,7 +2015,7 @@ internal DatabasesOperations(SqlManagementClient client)
20152015
{
20162016
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
20172017
}
2018-
string apiVersion = "2021-05-01-preview";
2018+
string apiVersion = "2022-02-01-preview";
20192019
// Tracing
20202020
bool _shouldTrace = ServiceClientTracing.IsEnabled;
20212021
string _invocationId = null;
@@ -2208,7 +2208,7 @@ internal DatabasesOperations(SqlManagementClient client)
22082208
{
22092209
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
22102210
}
2211-
string apiVersion = "2021-05-01-preview";
2211+
string apiVersion = "2022-02-01-preview";
22122212
// Tracing
22132213
bool _shouldTrace = ServiceClientTracing.IsEnabled;
22142214
string _invocationId = null;
@@ -2430,7 +2430,7 @@ internal DatabasesOperations(SqlManagementClient client)
24302430
{
24312431
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
24322432
}
2433-
string apiVersion = "2021-05-01-preview";
2433+
string apiVersion = "2022-02-01-preview";
24342434
// Tracing
24352435
bool _shouldTrace = ServiceClientTracing.IsEnabled;
24362436
string _invocationId = null;
@@ -2642,7 +2642,7 @@ internal DatabasesOperations(SqlManagementClient client)
26422642
{
26432643
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
26442644
}
2645-
string apiVersion = "2021-05-01-preview";
2645+
string apiVersion = "2022-02-01-preview";
26462646
// Tracing
26472647
bool _shouldTrace = ServiceClientTracing.IsEnabled;
26482648
string _invocationId = null;
@@ -2844,7 +2844,7 @@ internal DatabasesOperations(SqlManagementClient client)
28442844
{
28452845
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
28462846
}
2847-
string apiVersion = "2021-05-01-preview";
2847+
string apiVersion = "2022-02-01-preview";
28482848
// Tracing
28492849
bool _shouldTrace = ServiceClientTracing.IsEnabled;
28502850
string _invocationId = null;
@@ -3055,7 +3055,7 @@ internal DatabasesOperations(SqlManagementClient client)
30553055
{
30563056
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
30573057
}
3058-
string apiVersion = "2021-05-01-preview";
3058+
string apiVersion = "2022-02-01-preview";
30593059
// Tracing
30603060
bool _shouldTrace = ServiceClientTracing.IsEnabled;
30613061
string _invocationId = null;
@@ -3259,7 +3259,7 @@ internal DatabasesOperations(SqlManagementClient client)
32593259
{
32603260
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
32613261
}
3262-
string apiVersion = "2021-05-01-preview";
3262+
string apiVersion = "2022-02-01-preview";
32633263
// Tracing
32643264
bool _shouldTrace = ServiceClientTracing.IsEnabled;
32653265
string _invocationId = null;
@@ -3460,7 +3460,7 @@ internal DatabasesOperations(SqlManagementClient client)
34603460
{
34613461
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
34623462
}
3463-
string apiVersion = "2021-05-01-preview";
3463+
string apiVersion = "2022-02-01-preview";
34643464
// Tracing
34653465
bool _shouldTrace = ServiceClientTracing.IsEnabled;
34663466
string _invocationId = null;

0 commit comments

Comments
 (0)