This repository was archived by the owner on Sep 4, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 348
Merged
Changes from all commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
c7b0df6
Using ARG query to list & get Sql data
ArthurMa1978 a6f267e
update
ArthurMa1978 6348e68
update
ArthurMa1978 762f37d
update doc
ArthurMa1978 d856d23
update
ArthurMa1978 d57e70d
update
ArthurMa1978 9e1d572
update
ArthurMa1978 5aa0562
update
ArthurMa1978 eca7dd4
update
ArthurMa1978 f6856c6
Merge branch 'main' into mgmt-sql
ArthurMa1978 57dd806
update
ArthurMa1978 a39d6bc
update
ArthurMa1978 e4e324a
update
ArthurMa1978 c6b4574
Merge branch 'main' into mgmt-sql
ArthurMa1978 fe8ed38
update
ArthurMa1978 e588fad
revert vscode/README.md
ArthurMa1978 228ffc0
udpate
ArthurMa1978 a7c3c06
update
ArthurMa1978 b7d3879
Merge branch 'main' into mgmt-sql
ArthurMa1978 0661eac
Merge branch 'main' into mgmt-sql
ArthurMa1978 e391dab
update changelog
ArthurMa1978 84acd0b
update changelog
ArthurMa1978 54986bf
update checklist
ArthurMa1978 04b5116
Update the identify unused properteis check
ArthurMa1978 caecb2e
update
ArthurMa1978 631c25e
fix typo
ArthurMa1978 7f1cc08
Merge branch 'main' into mgmt-sql
ArthurMa1978 9a5418e
Merge branch 'main' into mgmt-sql
ArthurMa1978 3bdb737
Merge branch 'main' into mgmt-sql
ArthurMa1978 4bd863c
Merge branch 'main' into mgmt-sql
ArthurMa1978 67818a9
Merge branch 'main' into mgmt-sql
ArthurMa1978 c985dbe
update changelog
ArthurMa1978 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
areas/sql/src/AzureMcp.Sql/Services/Models/SqlDatabaseData.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| // Copyright (c) Microsoft Corporation. All rights reserved. | ||
| // Licensed under the MIT License. | ||
|
|
||
| using System.Text.Json; | ||
| using System.Text.Json.Serialization; | ||
| using AzureMcp.Sql.Commands; | ||
|
|
||
| namespace AzureMcp.Sql.Services.Models | ||
| { | ||
| /// <summary> | ||
| /// A class representing the SqlDatabase data model. | ||
| /// A database resource. | ||
| /// </summary> | ||
| internal sealed class SqlDatabaseData | ||
| { | ||
| /// <summary> The resource ID for the resource. </summary> | ||
| [JsonPropertyName("id")] | ||
| public string? ResourceId { get; set; } | ||
| /// <summary> The type of the resource. </summary> | ||
| [JsonPropertyName("type")] | ||
| public string? ResourceType { get; set; } | ||
| /// <summary> The name of the resource. </summary> | ||
| [JsonPropertyName("name")] | ||
| public string? ResourceName { get; set; } | ||
| /// <summary> The location of the resource. </summary> | ||
| public string? Location { get; set; } | ||
| /// <summary> The database SKU. </summary> | ||
| public SqlSku? Sku { get; set; } | ||
| /// <summary> Properties of the Sql database. </summary> | ||
| public SqlDatabaseProperties? Properties { get; set; } | ||
|
|
||
| // Read the JSON response content and create a model instance from it. | ||
| public static SqlDatabaseData? FromJson(JsonElement source) | ||
| { | ||
| return JsonSerializer.Deserialize<SqlDatabaseData>(source, SqlJsonContext.Default.SqlDatabaseData); | ||
| } | ||
| } | ||
| } |
38 changes: 38 additions & 0 deletions
38
areas/sql/src/AzureMcp.Sql/Services/Models/SqlDatabaseProperties.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| // Copyright (c) Microsoft Corporation. All rights reserved. | ||
| // Licensed under the MIT License. | ||
| using System.Text.Json.Serialization; | ||
|
|
||
| namespace AzureMcp.Sql.Services.Models | ||
| { | ||
| /// <summary> | ||
| /// A class representing the SqlDatabase properties model. | ||
| /// A database resource properties. | ||
| /// </summary> | ||
| internal sealed class SqlDatabaseProperties | ||
ArthurMa1978 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| { | ||
| /// <summary> The collation of the database. </summary> | ||
| public string? Collation { get; set; } | ||
| /// <summary> The max size of the database expressed in bytes. </summary> | ||
| public long? MaxSizeBytes { get; set; } | ||
| /// <summary> The resource identifier of the elastic pool containing this database. </summary> | ||
| public string? ElasticPoolId { get; set; } | ||
| /// <summary> The status of the database. </summary> | ||
| public string? Status { get; set; } | ||
| /// <summary> The creation date of the database (ISO8601 format). </summary> | ||
| [JsonPropertyName("creationDate")] | ||
| public DateTimeOffset? CreatedOn { get; set; } | ||
| /// <summary> The current service level objective name of the database. </summary> | ||
| public string? CurrentServiceObjectiveName { get; set; } | ||
| /// <summary> The license type to apply for this database. `LicenseIncluded` if you need a license, or `BasePrice` if you have a license and are eligible for the Azure Hybrid Benefit. </summary> | ||
| public string? LicenseType { get; set; } | ||
| /// <summary> This records the earliest start date and time that restore is available for this database (ISO8601 format). </summary> | ||
| [JsonPropertyName("earliestRestoreDate")] | ||
| public DateTimeOffset? EarliestRestoreOn { get; set; } | ||
| /// <summary> The state of read-only routing. If enabled, connections that have application intent set to readonly in their connection string may be routed to a readonly secondary replica in the same region. Not applicable to a Hyperscale database within an elastic pool. </summary> | ||
| public string? ReadScale { get; set; } | ||
| /// <summary> Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones. </summary> | ||
| public bool? IsZoneRedundant { get; set; } | ||
| /// <summary> The name and tier of the SKU. </summary> | ||
| public SqlSku? CurrentSku { get; set; } | ||
| } | ||
| } | ||
38 changes: 38 additions & 0 deletions
38
areas/sql/src/AzureMcp.Sql/Services/Models/SqlElasticPoolData.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| // Copyright (c) Microsoft Corporation. All rights reserved. | ||
| // Licensed under the MIT License. | ||
|
|
||
| using System.Text.Json; | ||
| using System.Text.Json.Serialization; | ||
| using AzureMcp.Sql.Commands; | ||
|
|
||
| namespace AzureMcp.Sql.Services.Models | ||
| { | ||
| /// <summary> | ||
| /// A class representing the ElasticPool data model. | ||
| /// An elastic pool. | ||
| /// </summary> | ||
| internal sealed class SqlElasticPoolData | ||
| { | ||
| /// <summary> The resource ID for the resource. </summary> | ||
| [JsonPropertyName("id")] | ||
| public string? ResourceId { get; set; } | ||
| /// <summary> The type of the resource. </summary> | ||
| [JsonPropertyName("type")] | ||
| public string? ResourceType { get; set; } | ||
| /// <summary> The name of the resource. </summary> | ||
| [JsonPropertyName("name")] | ||
| public string? ResourceName { get; set; } | ||
| /// <summary> The location of the resource. </summary> | ||
| public string? Location { get; set; } | ||
| /// <summary> The database SKU. </summary> | ||
| public SqlSku? Sku { get; set; } | ||
| /// <summary> The properties of elastic pool. </summary> | ||
| public SqlElasticPoolProperties? Properties { get; set; } | ||
|
|
||
| // Read the JSON response content and create a model instance from it. | ||
| public static SqlElasticPoolData? FromJson(JsonElement source) | ||
| { | ||
| return JsonSerializer.Deserialize<SqlElasticPoolData>(source, SqlJsonContext.Default.SqlElasticPoolData); | ||
| } | ||
| } | ||
| } |
14 changes: 14 additions & 0 deletions
14
areas/sql/src/AzureMcp.Sql/Services/Models/SqlElasticPoolPerDatabaseSettings.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| // Copyright (c) Microsoft Corporation. All rights reserved. | ||
| // Licensed under the MIT License. | ||
|
|
||
| namespace AzureMcp.Sql.Services.Models | ||
| { | ||
| /// <summary> Per database settings of an elastic pool. </summary> | ||
| internal sealed class SqlElasticPoolPerDatabaseSettings | ||
| { | ||
| /// <summary> The minimum capacity all databases are guaranteed. </summary> | ||
| public double? MinCapacity { get; set; } | ||
| /// <summary> The maximum capacity any one database can consume. </summary> | ||
| public double? MaxCapacity { get; set; } | ||
| } | ||
| } |
29 changes: 29 additions & 0 deletions
29
areas/sql/src/AzureMcp.Sql/Services/Models/SqlElasticPoolProperties.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| // Copyright (c) Microsoft Corporation. All rights reserved. | ||
| // Licensed under the MIT License. | ||
|
|
||
| using System.Text.Json.Serialization; | ||
|
|
||
| namespace AzureMcp.Sql.Services.Models | ||
| { | ||
| /// <summary> | ||
| /// A class representing the ElasticPool properties model. | ||
| /// An elastic pool properties. | ||
| /// </summary> | ||
| internal sealed class SqlElasticPoolProperties | ||
| { | ||
| /// <summary> The state of the elastic pool. </summary> | ||
| public string? State { get; set; } | ||
| /// <summary> The creation date of the elastic pool (ISO8601 format). </summary> | ||
| [JsonPropertyName("creationDate")] | ||
| public DateTimeOffset? CreatedOn { get; set; } | ||
| /// <summary> The storage limit for the database elastic pool in bytes. </summary> | ||
| public long? MaxSizeBytes { get; set; } | ||
| /// <summary> The per database settings for the elastic pool. </summary> | ||
| public SqlElasticPoolPerDatabaseSettings? PerDatabaseSettings { get; set; } | ||
| /// <summary> Whether or not this elastic pool is zone redundant, which means the replicas of this elastic pool will be spread across multiple availability zones. </summary> | ||
| [JsonPropertyName("zoneRedundant")] | ||
| public bool? IsZoneRedundant { get; set; } | ||
| /// <summary> The license type to apply for this elastic pool. </summary> | ||
| public string? LicenseType { get; set; } | ||
| } | ||
| } |
34 changes: 34 additions & 0 deletions
34
areas/sql/src/AzureMcp.Sql/Services/Models/SqlFirewallRuleData.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| // Copyright (c) Microsoft Corporation. All rights reserved. | ||
| // Licensed under the MIT License. | ||
|
|
||
| using System.Text.Json; | ||
| using System.Text.Json.Serialization; | ||
| using AzureMcp.Sql.Commands; | ||
|
|
||
| namespace AzureMcp.Sql.Services.Models | ||
| { | ||
| /// <summary> | ||
| /// A class representing the SqlFirewallRule data model. | ||
| /// A server firewall rule. | ||
| /// </summary> | ||
| internal sealed class SqlFirewallRuleData | ||
| { | ||
| /// <summary> The resource ID for the resource. </summary> | ||
| [JsonPropertyName("id")] | ||
| public string? ResourceId { get; set; } | ||
| /// <summary> The type of the resource. </summary> | ||
| [JsonPropertyName("type")] | ||
| public string? ResourceType { get; set; } | ||
| /// <summary> The name of the resource. </summary> | ||
| [JsonPropertyName("name")] | ||
| public string? ResourceName { get; set; } | ||
| /// <summary> The properties of the firewall rule. </summary> | ||
| public SqlFirewallRuleProperties? Properties { get; set; } | ||
|
|
||
| // Read the JSON response content and create a model instance from it. | ||
| public static SqlFirewallRuleData? FromJson(JsonElement source) | ||
| { | ||
| return JsonSerializer.Deserialize<SqlFirewallRuleData>(source, SqlJsonContext.Default.SqlFirewallRuleData); | ||
| } | ||
| } | ||
| } |
21 changes: 21 additions & 0 deletions
21
areas/sql/src/AzureMcp.Sql/Services/Models/SqlFirewallRuleProperties.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| // Copyright (c) Microsoft Corporation. All rights reserved. | ||
| // Licensed under the MIT License. | ||
|
|
||
| using System.Text.Json.Serialization; | ||
|
|
||
| namespace AzureMcp.Sql.Services.Models | ||
| { | ||
| /// <summary> | ||
| /// A class representing the SqlFirewallRule properties data model. | ||
| /// A server firewall rule properties. | ||
| /// </summary> | ||
| internal sealed class SqlFirewallRuleProperties | ||
| { | ||
| /// <summary> The start IP address of the firewall rule. Must be IPv4 format. Use value '0.0.0.0' for all Azure-internal IP addresses. </summary> | ||
| [JsonPropertyName("startIpAddress")] | ||
| public string? StartIPAddress { get; set; } | ||
| /// <summary> The end IP address of the firewall rule. Must be IPv4 format. Must be greater than or equal to startIpAddress. Use value '0.0.0.0' for all Azure-internal IP addresses. </summary> | ||
| [JsonPropertyName("endIpAddress")] | ||
ArthurMa1978 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| public string? EndIPAddress { get; set; } | ||
| } | ||
| } | ||
34 changes: 34 additions & 0 deletions
34
areas/sql/src/AzureMcp.Sql/Services/Models/SqlServerAadAdministratorData.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| // Copyright (c) Microsoft Corporation. All rights reserved. | ||
| // Licensed under the MIT License. | ||
|
|
||
| using System.Text.Json; | ||
| using System.Text.Json.Serialization; | ||
| using AzureMcp.Sql.Commands; | ||
|
|
||
| namespace AzureMcp.Sql.Services.Models | ||
| { | ||
| /// <summary> | ||
| /// A class representing the SqlServerAadAdministrator data model. | ||
| /// Azure Active Directory administrator. | ||
| /// </summary> | ||
| internal sealed class SqlServerAadAdministratorData | ||
| { | ||
| /// <summary> The resource ID for the resource. </summary> | ||
| [JsonPropertyName("id")] | ||
| public string? ResourceId { get; set; } | ||
| /// <summary> The type of the resource. </summary> | ||
| [JsonPropertyName("type")] | ||
| public string? ResourceType { get; set; } | ||
| /// <summary> The name of the resource. </summary> | ||
| [JsonPropertyName("name")] | ||
| public string? ResourceName { get; set; } | ||
| /// <summary> Properties of the Azure Active Directory administrator. </summary> | ||
| public SqlServerAadAdministratorProperties? Properties { get; set; } | ||
|
|
||
| // Read the JSON response content and create a model instance from it. | ||
| public static SqlServerAadAdministratorData? FromJson(JsonElement source) | ||
| { | ||
| return JsonSerializer.Deserialize<SqlServerAadAdministratorData>(source, SqlJsonContext.Default.SqlServerAadAdministratorData); | ||
| } | ||
| } | ||
| } |
26 changes: 26 additions & 0 deletions
26
areas/sql/src/AzureMcp.Sql/Services/Models/SqlServerAadAdministratorProperties.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| // Copyright (c) Microsoft Corporation. All rights reserved. | ||
| // Licensed under the MIT License. | ||
|
|
||
| using System.Text.Json.Serialization; | ||
|
|
||
| namespace AzureMcp.Sql.Services.Models | ||
| { | ||
| /// <summary> | ||
| /// A class representing the SqlServerAadAdministrator properties model. | ||
| /// Azure Active Directory administrator properties. | ||
| /// </summary> | ||
| internal sealed class SqlServerAadAdministratorProperties | ||
| { | ||
| /// <summary> Type of the sever administrator. </summary> | ||
| public string? AdministratorType { get; set; } | ||
| /// <summary> Login name of the server administrator. </summary> | ||
| public string? Login { get; set; } | ||
| /// <summary> SID (object ID) of the server administrator. </summary> | ||
| public Guid? Sid { get; set; } | ||
| /// <summary> Tenant ID of the administrator. </summary> | ||
| public Guid? TenantId { get; set; } | ||
| /// <summary> Azure Active Directory only Authentication enabled. </summary> | ||
| [JsonPropertyName("azureADOnlyAuthentication")] | ||
| public bool? IsAzureADOnlyAuthenticationEnabled { get; set; } | ||
| } | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.