Skip to content

Commit bc07db7

Browse files
fengzhou-msftsofiar-msft
authored andcommitted
[Sql] Address self-review comments (Azure#29489)
1 parent 68a392c commit bc07db7

File tree

87 files changed

+833
-659
lines changed

Some content is hidden

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

87 files changed

+833
-659
lines changed

sdk/sqlmanagement/Azure.ResourceManager.Sql/api/Azure.ResourceManager.Sql.netstandard2.0.cs

Lines changed: 103 additions & 112 deletions
Large diffs are not rendered by default.

sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Sample1_ManagingManagedInstance.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ var vnetData = new VirtualNetworkData()
8080
vnetData.AddressPrefixes.Add("10.10.0.0/16");
8181
string vnetName = "myVnet";
8282
var vnet = await resourceGroup.GetVirtualNetworks().CreateOrUpdateAsync(WaitUntil.Completed, vnetName, vnetData);
83-
string subnetId = $"{vnet.Value.Data.Id}/subnets/ManagedInstance";
83+
ResourceIdentifier subnetId = new ResourceIdentifier($"{vnet.Value.Data.Id}/subnets/ManagedInstance");
8484

8585
//4. create ManagedInstance
8686
ManagedInstanceData data = new ManagedInstanceData(AzureLocation.WestUS2)
@@ -89,7 +89,7 @@ ManagedInstanceData data = new ManagedInstanceData(AzureLocation.WestUS2)
8989
AdministratorLoginPassword = "abcdef123456789*",
9090
SubnetId = subnetId,
9191
PublicDataEndpointEnabled = false,
92-
MaintenanceConfigurationId = "/subscriptions/0000-0000-0000-0000/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_Default",
92+
MaintenanceConfigurationId = new ResourceIdentifier("/subscriptions/0000-0000-0000-0000/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_Default"),
9393
ProxyOverride = new ManagedInstanceProxyOverride("Proxy") { },
9494
TimezoneId = "UTC",
9595
ZoneRedundant = false,
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License.
3+
4+
#nullable disable
5+
6+
using System;
7+
using Azure.Core;
8+
using Azure.ResourceManager.Models;
9+
10+
namespace Azure.ResourceManager.Sql
11+
{
12+
/// <summary> A class representing the ManagedDatabase data model. </summary>
13+
public partial class ManagedDatabaseData : TrackedResourceData
14+
{
15+
/// <summary> Conditional. If createMode is PointInTimeRestore, this value is required. Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database. </summary>
16+
[CodeGenMember("RestorePointInOn")]
17+
public DateTimeOffset? RestorePointInTime { get; set; }
18+
}
19+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License.
3+
4+
// <auto-generated/>
5+
6+
#nullable disable
7+
8+
using System;
9+
using System.Collections.Generic;
10+
using Azure.Core;
11+
12+
namespace Azure.ResourceManager.Sql.Models
13+
{
14+
/// <summary> An managed database update. </summary>
15+
public partial class ManagedDatabasePatch
16+
{
17+
/// <summary> Conditional. If createMode is PointInTimeRestore, this value is required. Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database. </summary>
18+
[CodeGenMember("RestorePointInOn")]
19+
public DateTimeOffset? RestorePointInTime { get; set; }
20+
}
21+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License.
3+
4+
// <auto-generated/>
5+
6+
#nullable disable
7+
8+
using System;
9+
using System.Collections.Generic;
10+
using Azure.Core;
11+
using Azure.ResourceManager.Models;
12+
using Azure.ResourceManager.Sql.Models;
13+
14+
namespace Azure.ResourceManager.Sql
15+
{
16+
/// <summary> A class representing the ManagedInstance data model. </summary>
17+
public partial class ManagedInstanceData : TrackedResourceData
18+
{
19+
/// <summary> Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database. </summary>
20+
[CodeGenMember("RestorePointInOn")]
21+
public DateTimeOffset? RestorePointInTime { get; set; }
22+
}
23+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License.
3+
4+
// <auto-generated/>
5+
6+
#nullable disable
7+
8+
using System;
9+
using System.Collections.Generic;
10+
using Azure.Core;
11+
using Azure.ResourceManager.Models;
12+
13+
namespace Azure.ResourceManager.Sql.Models
14+
{
15+
/// <summary> An update request for an Azure SQL Database managed instance. </summary>
16+
public partial class ManagedInstancePatch
17+
{
18+
/// <summary> Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database. </summary>
19+
[CodeGenMember("RestorePointInOn")]
20+
public DateTimeOffset? RestorePointInTime { get; set; }
21+
}
22+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License.
3+
4+
// <auto-generated/>
5+
6+
#nullable disable
7+
8+
using System;
9+
using System.Collections.Generic;
10+
using Azure.Core;
11+
using Azure.ResourceManager.Models;
12+
using Azure.ResourceManager.Sql.Models;
13+
14+
namespace Azure.ResourceManager.Sql
15+
{
16+
/// <summary> A class representing the SqlDatabase data model. </summary>
17+
public partial class SqlDatabaseData : TrackedResourceData
18+
{
19+
/// <summary> Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database. </summary>
20+
[CodeGenMember("RestorePointInOn")]
21+
public DateTimeOffset? RestorePointInTime { get; set; }
22+
}
23+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License.
3+
4+
// <auto-generated/>
5+
6+
#nullable disable
7+
8+
using System;
9+
using System.Collections.Generic;
10+
using Azure.Core;
11+
12+
namespace Azure.ResourceManager.Sql.Models
13+
{
14+
/// <summary> A database update resource. </summary>
15+
public partial class SqlDatabasePatch
16+
{
17+
/// <summary> Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database. </summary>
18+
[CodeGenMember("RestorePointInOn")]
19+
public DateTimeOffset? RestorePointInTime { get; set; }
20+
}
21+
}

sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/DatabaseSecurityAlertPolicyData.cs

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/DeletedServerData.cs

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)