Skip to content

Commit 6686078

Browse files
authored
[Synapse] Sync link connection for Synapse Link (#19650)
* update link connection models * add breaking change record and update change log * Update BreakingChangeIssues.csv add double quotes
1 parent f09e745 commit 6686078

13 files changed

+140
-6
lines changed

src/Synapse/Synapse/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
-->
2020

2121
## Upcoming Release
22+
* [Breaking Change] Updated models of Synapse Link for Azure Sql Database
2223
* Updated `New-AzSynapseWorkspace` and `Update-AzSynapseWorkspace` to support for user assigned managed identity (UAMI) by `-UserAssignedIdentityAction` and `-UserAssignedIdentityId`
2324
* Added EnablePublicNetworkAccess parameter to `New-AzureSynapseWorkspace` and `Update-AzSynapseWorkspace`
2425

src/Synapse/Synapse/Models/DataPlaneModels/Artifact/LinkConnection/PSLinkConnectionCompute.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,13 @@ public PSLinkConnectionCompute(LinkConnectionCompute linkConnectionCompute)
2222
{
2323
this.CoreCount = linkConnectionCompute?.CoreCount;
2424
this.ComputeType = linkConnectionCompute?.ComputeType;
25+
this.DataProcessIntervalMinutes = linkConnectionCompute?.DataProcessIntervalMinutes;
2526
}
26-
27+
2728
public int? CoreCount { get; set; }
2829

2930
public string ComputeType { get; set; }
31+
32+
public int? DataProcessIntervalMinutes { get; set; }
3033
}
3134
}

src/Synapse/Synapse/Models/DataPlaneModels/Artifact/LinkConnection/PSLinkConnectionDetailedStatus.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
// ----------------------------------------------------------------------------------using Azure.Analytics.Synapse.Artifacts.Models;
1414

1515
using Azure.Analytics.Synapse.Artifacts.Models;
16+
using System;
1617

1718
namespace Microsoft.Azure.Commands.Synapse.Models
1819
{
@@ -30,6 +31,8 @@ public PSLinkConnectionDetailedStatus(LinkConnectionDetailedStatus detailedStatu
3031
this.Status = detailedStatus?.Status;
3132
this.ContinuousRunId = detailedStatus?.ContinuousRunId;
3233
this.Error = detailedStatus?.Error;
34+
this.RefreshStatus = detailedStatus?.RefreshStatus != null? new PSLinkConnectionRefreshStatus(detailedStatus?.RefreshStatus) : null;
35+
this.LandingZoneCredentialExpireTime = detailedStatus?.LandingZoneCredentialExpireTime;
3336
}
3437

3538
public string WorkspaceName { get; set; }
@@ -51,5 +54,9 @@ public PSLinkConnectionDetailedStatus(LinkConnectionDetailedStatus detailedStatu
5154
public string ContinuousRunId { get; }
5255

5356
public object Error { get; }
57+
58+
public PSLinkConnectionRefreshStatus RefreshStatus { get; }
59+
60+
public DateTimeOffset? LandingZoneCredentialExpireTime { get; }
5461
}
5562
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
// ----------------------------------------------------------------------------------
2+
//
3+
// Copyright Microsoft Corporation
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
// Unless required by applicable law or agreed to in writing, software
9+
// distributed under the License is distributed on an "AS IS" BASIS,
10+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
// See the License for the specific language governing permissions and
12+
// limitations under the License.
13+
// ----------------------------------------------------------------------------------
14+
15+
using Azure.Analytics.Synapse.Artifacts.Models;
16+
17+
namespace Microsoft.Azure.Commands.Synapse.Models
18+
{
19+
public class PSLinkConnectionRefreshStatus
20+
{
21+
public PSLinkConnectionRefreshStatus(LinkConnectionRefreshStatus refreshStatus)
22+
{
23+
this.RefreshStatus = refreshStatus?.RefreshStatus;
24+
this.ErrorMessage = refreshStatus?.ErrorMessage;
25+
}
26+
27+
public string RefreshStatus { get; }
28+
29+
public string ErrorMessage { get; }
30+
}
31+
}

src/Synapse/Synapse/Models/DataPlaneModels/Artifact/LinkConnection/PSLinkConnectionResource.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ public PSLinkConnectionResource(LinkConnectionResource linkConnectionResource, s
2424
this.Id = linkConnectionResource?.Id;
2525
this.Name = linkConnectionResource?.Name;
2626
this.Type = linkConnectionResource?.Type;
27-
this.Properties = linkConnectionResource?.Properties;
27+
this.Properties = linkConnectionResource?.Properties != null? new PSLinkConnection(linkConnectionResource?.Properties) : null;
28+
this.Description = linkConnectionResource?.Description;
2829
}
2930

3031
public string WorkspaceName { get; set; }
@@ -35,6 +36,8 @@ public PSLinkConnectionResource(LinkConnectionResource linkConnectionResource, s
3536

3637
public string Type { get; set; }
3738

38-
public LinkConnection Properties { get; set; }
39+
public PSLinkConnection Properties { get; set; }
40+
41+
public string Description { get; set; }
3942
}
4043
}

src/Synapse/Synapse/Models/DataPlaneModels/Artifact/LinkConnection/PSLinkConnectionTargetDatabase.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,11 @@ public class PSLinkConnectionTargetDatabase
2121
public PSLinkConnectionTargetDatabase(LinkConnectionTargetDatabase targetDatabase)
2222
{
2323
this.LinkedService = targetDatabase?.LinkedService != null ? new PSLinkedServiceReference(targetDatabase?.LinkedService) : null;
24+
this.TypeProperties = targetDatabase?.TypeProperties != null ? new PSLinkConnectionTargetDatabaseTypeProperties(targetDatabase.TypeProperties) : null;
2425
}
2526

2627
public PSLinkedServiceReference LinkedService { get; set; }
28+
29+
public PSLinkConnectionTargetDatabaseTypeProperties TypeProperties { get; set; }
2730
}
2831
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
// ----------------------------------------------------------------------------------
2+
//
3+
// Copyright Microsoft Corporation
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
// Unless required by applicable law or agreed to in writing, software
9+
// distributed under the License is distributed on an "AS IS" BASIS,
10+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
// See the License for the specific language governing permissions and
12+
// limitations under the License.
13+
// ----------------------------------------------------------------------------------
14+
15+
using Azure.Analytics.Synapse.Artifacts.Models;
16+
17+
namespace Microsoft.Azure.Commands.Synapse.Models
18+
{
19+
public class PSLinkConnectionTargetDatabaseTypeProperties
20+
{
21+
public PSLinkConnectionTargetDatabaseTypeProperties(LinkConnectionTargetDatabaseTypeProperties properties)
22+
{
23+
this.CrossTableTransaction = properties?.CrossTableTransaction;
24+
this.DropExistingTargetTableOnStart = properties?.DropExistingTargetTableOnStart;
25+
}
26+
27+
public bool? CrossTableTransaction { get; set; }
28+
29+
public bool? DropExistingTargetTableOnStart { get; set; }
30+
}
31+
}

src/Synapse/Synapse/Models/DataPlaneModels/Artifact/LinkConnection/PSLinkTableRequestTarget.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,16 @@ public PSLinkTableRequestTarget(LinkTableRequestTarget linkTableRequestTarget)
2222
{
2323
this.TableName = linkTableRequestTarget?.TableName;
2424
this.SchemaName = linkTableRequestTarget?.SchemaName;
25-
this.DistributionOptions = new PSLinkTableRequestTargetDistributionOptions(linkTableRequestTarget?.DistributionOptions);
25+
this.DistributionOptions = linkTableRequestTarget?.DistributionOptions != null ? new PSLinkTableRequestTargetDistributionOptions(linkTableRequestTarget?.DistributionOptions) : null;
26+
this.StructureOptions = linkTableRequestTarget.StructureOptions != null ? new PSLinkTableRequestTargetStructureOptions(linkTableRequestTarget?.StructureOptions) : null;
2627
}
2728

2829
public string TableName { get; set; }
2930

3031
public string SchemaName { get; set; }
3132

3233
public PSLinkTableRequestTargetDistributionOptions DistributionOptions { get; set; }
34+
35+
public PSLinkTableRequestTargetStructureOptions StructureOptions { get; set; }
3336
}
3437
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// ----------------------------------------------------------------------------------
2+
//
3+
// Copyright Microsoft Corporation
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
// Unless required by applicable law or agreed to in writing, software
9+
// distributed under the License is distributed on an "AS IS" BASIS,
10+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
// See the License for the specific language governing permissions and
12+
// limitations under the License.
13+
// ----------------------------------------------------------------------------------
14+
15+
using Azure.Analytics.Synapse.Artifacts.Models;
16+
17+
namespace Microsoft.Azure.Commands.Synapse.Models
18+
{
19+
public class PSLinkTableRequestTargetStructureOptions
20+
{
21+
public PSLinkTableRequestTargetStructureOptions(LinkTableRequestTargetStructureOptions linkTableRequestTargetStructureOptions)
22+
{
23+
this.Type = linkTableRequestTargetStructureOptions?.Type;
24+
}
25+
26+
public string Type { get; set; }
27+
}
28+
}

src/Synapse/Synapse/Models/DataPlaneModels/Artifact/LinkConnection/PSLinkTableStatus.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
// ----------------------------------------------------------------------------------
1414

1515
using Azure.Analytics.Synapse.Artifacts.Models;
16+
using System;
1617

1718
namespace Microsoft.Azure.Commands.Synapse.Models
1819
{
@@ -25,6 +26,10 @@ public PSLinkTableStatus(LinkTableStatus linkTableStatus)
2526
this.ErrorMessage = linkTableStatus?.ErrorMessage;
2627
this.StartTime = linkTableStatus?.StartTime;
2728
this.StopTime = linkTableStatus?.StopTime;
29+
this.LinkTableId = linkTableStatus?.LinkTableId;
30+
this.ErrorCode = linkTableStatus?.ErrorCode;
31+
this.LastProcessedData = linkTableStatus?.LastProcessedData;
32+
this.LastTransactionCommitTime = linkTableStatus?.LastTransactionCommitTime;
2833
}
2934

3035
public string Id { get; }
@@ -36,5 +41,13 @@ public PSLinkTableStatus(LinkTableStatus linkTableStatus)
3641
public object StartTime { get; }
3742

3843
public object StopTime { get; }
44+
45+
public string LinkTableId { get; }
46+
47+
public string ErrorCode { get; }
48+
49+
public DateTimeOffset? LastProcessedData { get; }
50+
51+
public DateTimeOffset? LastTransactionCommitTime { get; }
3952
}
4053
}

0 commit comments

Comments
 (0)