From cbf543dfc40130571aa725fa37710c8723fcf5de Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Sat, 17 Feb 2024 16:04:27 +0000 Subject: [PATCH] CodeGen from PR 27417 in Azure/azure-rest-api-specs Merge ee17bfb640c092954550e5c9ec5b39d92ab52240 into 181346fe74ee9d743d816aa4b504798ad0ebaa08 --- ...ample_LongTermRetentionPolicyCollection.cs | 2 - .../Sample_LongTermRetentionPolicyResource.cs | 2 - .../Samples/Sample_SqlServerCollection.cs | 18 +- .../Samples/Sample_SqlServerResource.cs | 24 +- .../src/Generated/ArmSqlModelFactory.cs | 258 +++++----- .../Extensions/MockableSqlArmClient.cs | 24 +- .../MockableSqlResourceGroupResource.cs | 142 +++--- .../MockableSqlSubscriptionResource.cs | 300 ++++++------ .../src/Generated/Extensions/SqlExtensions.cs | 456 +++++++++--------- .../LongTermRetentionPolicyCollection.cs | 4 +- .../Generated/LongTermRetentionPolicyData.cs | 11 +- .../LongTermRetentionPolicyResource.cs | 4 +- ...ngTermRetentionPolicyData.Serialization.cs | 33 +- .../Generated/Models/SqlMinimalTlsVersion.cs | 49 -- .../Models/SqlServerData.Serialization.cs | 12 +- .../Models/SqlServerPatch.Serialization.cs | 12 +- .../src/Generated/Models/SqlServerPatch.cs | 8 +- .../LongTermRetentionBackupsRestOperations.cs | 2 - ...LongTermRetentionPoliciesRestOperations.cs | 4 +- .../RestOperations/ServersRestOperations.cs | 3 +- .../src/Generated/SqlServerCollection.cs | 20 +- .../src/Generated/SqlServerData.cs | 8 +- .../src/Generated/SqlServerResource.cs | 32 +- .../Azure.ResourceManager.Sql/src/autorest.md | 2 +- 24 files changed, 662 insertions(+), 768 deletions(-) delete mode 100644 sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlMinimalTlsVersion.cs diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_LongTermRetentionPolicyCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_LongTermRetentionPolicyCollection.cs index b07dec12e2bc..19681b123b9c 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_LongTermRetentionPolicyCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_LongTermRetentionPolicyCollection.cs @@ -197,8 +197,6 @@ public async Task CreateOrUpdate_CreateOrUpdateTheLongTermRetentionPolicyForTheD LongTermRetentionPolicyName policyName = LongTermRetentionPolicyName.Default; LongTermRetentionPolicyData data = new LongTermRetentionPolicyData() { - MakeBackupsImmutable = true, - BackupStorageAccessTier = SqlBackupStorageAccessTier.Hot, WeeklyRetention = "P1M", MonthlyRetention = "P1Y", YearlyRetention = "P5Y", diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_LongTermRetentionPolicyResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_LongTermRetentionPolicyResource.cs index c6e743ddbee7..3b44ca89ac91 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_LongTermRetentionPolicyResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_LongTermRetentionPolicyResource.cs @@ -77,8 +77,6 @@ public async Task Update_CreateOrUpdateTheLongTermRetentionPolicyForTheDatabase( // invoke the operation LongTermRetentionPolicyData data = new LongTermRetentionPolicyData() { - MakeBackupsImmutable = true, - BackupStorageAccessTier = SqlBackupStorageAccessTier.Hot, WeeklyRetention = "P1M", MonthlyRetention = "P1Y", YearlyRetention = "P5Y", diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerCollection.cs index 043bf0513619..7aaf02c5f688 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerCollection.cs @@ -24,7 +24,7 @@ public partial class Sample_SqlServerCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListServersByResourceGroup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerListByResourceGroup.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/ServerListByResourceGroup.json // this example is just showing the usage of "Servers_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -60,7 +60,7 @@ public async Task GetAll_ListServersByResourceGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListServersByResourceGroupWithExpandAdministratorsActivedirectory() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerListByResourceGroupWithExpandEqualsAdministrators.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/ServerListByResourceGroupWithExpandEqualsAdministrators.json // this example is just showing the usage of "Servers_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -96,7 +96,7 @@ public async Task GetAll_ListServersByResourceGroupWithExpandAdministratorsActiv [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetServer() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/ServerGet.json // this example is just showing the usage of "Servers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -130,7 +130,7 @@ public async Task Get_GetServer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetServer() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/ServerGet.json // this example is just showing the usage of "Servers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -160,7 +160,7 @@ public async Task Exists_GetServer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetServer() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/ServerGet.json // this example is just showing the usage of "Servers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -202,7 +202,7 @@ public async Task GetIfExists_GetServer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetServerWithExpandAdministratorsActivedirectory() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerGetWithExpandEqualsAdministrators.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/ServerGetWithExpandEqualsAdministrators.json // this example is just showing the usage of "Servers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -236,7 +236,7 @@ public async Task Get_GetServerWithExpandAdministratorsActivedirectory() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetServerWithExpandAdministratorsActivedirectory() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerGetWithExpandEqualsAdministrators.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/ServerGetWithExpandEqualsAdministrators.json // this example is just showing the usage of "Servers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -266,7 +266,7 @@ public async Task Exists_GetServerWithExpandAdministratorsActivedirectory() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetServerWithExpandAdministratorsActivedirectory() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerGetWithExpandEqualsAdministrators.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/ServerGetWithExpandEqualsAdministrators.json // this example is just showing the usage of "Servers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -308,7 +308,7 @@ public async Task GetIfExists_GetServerWithExpandAdministratorsActivedirectory() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateServer() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerCreate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/ServerCreate.json // this example is just showing the usage of "Servers_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerResource.cs index 34a10983038c..0c88d473e028 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerResource.cs @@ -183,7 +183,7 @@ public async Task GetInaccessibleDatabases_GetsAListOfInaccessibleDatabasesInALo [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CheckSqlServerNameAvailability_CheckForAServerNameThatAlreadyExists() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CheckNameAvailabilityServerAlreadyExists.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/CheckNameAvailabilityServerAlreadyExists.json // this example is just showing the usage of "Servers_CheckNameAvailability" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -209,7 +209,7 @@ public async Task CheckSqlServerNameAvailability_CheckForAServerNameThatAlreadyE [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CheckSqlServerNameAvailability_CheckForAServerNameThatIsAvailable() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CheckNameAvailabilityServerAvailable.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/CheckNameAvailabilityServerAvailable.json // this example is just showing the usage of "Servers_CheckNameAvailability" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -235,7 +235,7 @@ public async Task CheckSqlServerNameAvailability_CheckForAServerNameThatIsAvaila [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CheckSqlServerNameAvailability_CheckForAServerNameThatIsInvalid() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CheckNameAvailabilityServerInvalid.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/CheckNameAvailabilityServerInvalid.json // this example is just showing the usage of "Servers_CheckNameAvailability" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -261,7 +261,7 @@ public async Task CheckSqlServerNameAvailability_CheckForAServerNameThatIsInvali [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetSqlServers_ListServers() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerList.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/ServerList.json // this example is just showing the usage of "Servers_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -293,7 +293,7 @@ public async Task GetSqlServers_ListServers() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetSqlServers_ListServersWithExpandAdministratorsActivedirectory() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerListWithExpandEqualsAdministrators.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/ServerListWithExpandEqualsAdministrators.json // this example is just showing the usage of "Servers_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -325,7 +325,7 @@ public async Task GetSqlServers_ListServersWithExpandAdministratorsActivedirecto [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetServer() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/ServerGet.json // this example is just showing the usage of "Servers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -356,7 +356,7 @@ public async Task Get_GetServer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetServerWithExpandAdministratorsActivedirectory() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerGetWithExpandEqualsAdministrators.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/ServerGetWithExpandEqualsAdministrators.json // this example is just showing the usage of "Servers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -387,7 +387,7 @@ public async Task Get_GetServerWithExpandAdministratorsActivedirectory() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteServer() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerDelete.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/ServerDelete.json // this example is just showing the usage of "Servers_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -414,7 +414,7 @@ public async Task Delete_DeleteServer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateAServer() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerUpdate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/ServerUpdate.json // this example is just showing the usage of "Servers_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -454,7 +454,7 @@ public async Task Update_UpdateAServer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task ImportDatabase_ImportsToANewDatabaseUsingPrivateLinkForTheSQLServerAndStorageAccount() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ImportNewDatabaseWithNetworkIsolation.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/ImportNewDatabaseWithNetworkIsolation.json // this example is just showing the usage of "Servers_ImportDatabase" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -492,7 +492,7 @@ public async Task ImportDatabase_ImportsToANewDatabaseUsingPrivateLinkForTheSQLS [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task ImportDatabase_ImportsToANewDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ImportNewDatabase.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/ImportNewDatabase.json // this example is just showing the usage of "Servers_ImportDatabase" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -525,7 +525,7 @@ public async Task ImportDatabase_ImportsToANewDatabase() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task RefreshStatus_RefreshExternalGovernanceEnablementStatus() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/RefreshExternalGovernanceStatus.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/RefreshExternalGovernanceStatus.json // this example is just showing the usage of "Servers_RefreshStatus" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ArmSqlModelFactory.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ArmSqlModelFactory.cs index f46a5a631b6a..43f72ca163fc 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ArmSqlModelFactory.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ArmSqlModelFactory.cs @@ -3982,132 +3982,6 @@ public static SqlVulnerabilityAssessmentData SqlVulnerabilityAssessmentData(Reso return new SqlVulnerabilityAssessmentData(id, name, resourceType, systemData, state, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Resource location. - /// Resource tags. - /// Read-write endpoint of the failover group instance. - /// Read-only endpoint of the failover group instance. - /// Local replication role of the failover group instance. - /// Replication state of the failover group instance. - /// List of partner server information for the failover group. - /// List of databases in the failover group. - /// A new instance for mocking. - public static FailoverGroupData FailoverGroupData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, AzureLocation? location = null, IDictionary tags = null, FailoverGroupReadWriteEndpoint readWriteEndpoint = null, FailoverGroupReadOnlyEndpoint readOnlyEndpoint = null, FailoverGroupReplicationRole? replicationRole = null, string replicationState = null, IEnumerable partnerServers = null, IEnumerable failoverDatabases = null) - { - tags ??= new Dictionary(); - partnerServers ??= new List(); - failoverDatabases ??= new List(); - - return new FailoverGroupData(id, name, resourceType, systemData, location, tags, readWriteEndpoint, readOnlyEndpoint, replicationRole, replicationState, partnerServers?.ToList(), failoverDatabases?.ToList(), serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Resource identifier of the partner server. - /// Geo location of the partner server. - /// Replication role of the partner server. - /// A new instance for mocking. - public static PartnerServerInfo PartnerServerInfo(ResourceIdentifier id = null, AzureLocation? location = null, FailoverGroupReplicationRole? replicationRole = null) - { - return new PartnerServerInfo(id, location, replicationRole, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The tags. - /// The location. - /// The name and tier of the SKU. - /// Resource ID of the subnet to place this instance pool in. - /// Count of vCores belonging to this instance pool. - /// The license type. Possible values are 'LicenseIncluded' (price for SQL license is included) and 'BasePrice' (without SQL license price). - /// The Dns Zone that the managed instance pool is in. - /// Specifies maintenance configuration id to apply to this managed instance. - /// A new instance for mocking. - public static InstancePoolData InstancePoolData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, SqlSku sku = null, ResourceIdentifier subnetId = null, int? vCores = null, InstancePoolLicenseType? licenseType = null, string dnsZone = null, ResourceIdentifier maintenanceConfigurationId = null) - { - tags ??= new Dictionary(); - - return new InstancePoolData(id, name, resourceType, systemData, tags, location, sku, subnetId, vCores, licenseType, dnsZone, maintenanceConfigurationId, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The name and tier of the SKU. - /// Resource tags. - /// Resource ID of the subnet to place this instance pool in. - /// Count of vCores belonging to this instance pool. - /// The license type. Possible values are 'LicenseIncluded' (price for SQL license is included) and 'BasePrice' (without SQL license price). - /// The Dns Zone that the managed instance pool is in. - /// Specifies maintenance configuration id to apply to this managed instance. - /// A new instance for mocking. - public static InstancePoolPatch InstancePoolPatch(SqlSku sku = null, IDictionary tags = null, ResourceIdentifier subnetId = null, int? vCores = null, InstancePoolLicenseType? licenseType = null, string dnsZone = null, ResourceIdentifier maintenanceConfigurationId = null) - { - tags ??= new Dictionary(); - - return new InstancePoolPatch(sku, tags, subnetId, vCores, licenseType, dnsZone, maintenanceConfigurationId, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The server name that the backup database belong to. - /// The create time of the server. - /// The name of the database the backup belong to. - /// The delete time of the database. - /// The time the backup was taken. - /// The time the long term retention backup will expire. - /// The storage redundancy type of the backup. - /// The storage redundancy type of the backup. - /// The setting whether the LTR backup is immutable. - /// The BackupStorageAccessTier for the LTR backup. - /// A new instance for mocking. - public static LongTermRetentionBackupData LongTermRetentionBackupData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string serverName = null, DateTimeOffset? serverCreateOn = null, string databaseName = null, DateTimeOffset? databaseDeletedOn = null, DateTimeOffset? backupOn = null, DateTimeOffset? backupExpireOn = null, SqlBackupStorageRedundancy? backupStorageRedundancy = null, SqlBackupStorageRedundancy? requestedBackupStorageRedundancy = null, bool? isBackupImmutable = null, SqlBackupStorageAccessTier? backupStorageAccessTier = null) - { - return new LongTermRetentionBackupData(id, name, resourceType, systemData, serverName, serverCreateOn, databaseName, databaseDeletedOn, backupOn, backupExpireOn, backupStorageRedundancy, requestedBackupStorageRedundancy, isBackupImmutable, backupStorageAccessTier, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Request Id. - /// Operation type. - /// Source backup resource id. - /// Target backup resource id. - /// The storage redundancy type of the copied backup. - /// Operation status. - /// Progress message. - /// A new instance for mocking. - public static LongTermRetentionBackupOperationResult LongTermRetentionBackupOperationResult(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, Guid? requestId = null, string operationType = null, ResourceIdentifier fromBackupResourceId = null, ResourceIdentifier toBackupResourceId = null, SqlBackupStorageRedundancy? targetBackupStorageRedundancy = null, string status = null, string message = null) - { - return new LongTermRetentionBackupOperationResult(id, name, resourceType, systemData, requestId, operationType, fromBackupResourceId, toBackupResourceId, targetBackupStorageRedundancy, status, message, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The setting whether to make LTR backups immutable. - /// The BackupStorageAccessTier for the LTR backups. - /// The weekly retention policy for an LTR backup in an ISO 8601 format. - /// The monthly retention policy for an LTR backup in an ISO 8601 format. - /// The yearly retention policy for an LTR backup in an ISO 8601 format. - /// The week of year to take the yearly backup in an ISO 8601 format. - /// A new instance for mocking. - public static LongTermRetentionPolicyData LongTermRetentionPolicyData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, bool? makeBackupsImmutable = null, SqlBackupStorageAccessTier? backupStorageAccessTier = null, string weeklyRetention = null, string monthlyRetention = null, string yearlyRetention = null, int? weekOfYear = null) - { - return new LongTermRetentionPolicyData(id, name, resourceType, systemData, makeBackupsImmutable, backupStorageAccessTier, weeklyRetention, monthlyRetention, yearlyRetention, weekOfYear, serializedAdditionalRawData: null); - } - /// Initializes a new instance of . /// /// @@ -4143,7 +4017,7 @@ public static SqlNameAvailabilityResponse SqlNameAvailabilityResponse(string nam /// The state of the server. /// The fully qualified domain name of the server. /// List of private endpoint connections on a server. - /// Minimal TLS version. Allowed values: 'None', 1.0', '1.1', '1.2', '1.3'. + /// Minimal TLS version. Allowed values: 'None', '1.0', '1.1', '1.2'. /// Whether or not public endpoint access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled' or 'SecuredByPerimeter'. /// Whether or not existing server has a workspace created and if it allows connection from workspace. /// The resource id of a user assigned identity to be used by default. @@ -4154,7 +4028,7 @@ public static SqlNameAvailabilityResponse SqlNameAvailabilityResponse(string nam /// Whether or not to enable IPv6 support for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. /// Status of external governance. /// A new instance for mocking. - public static SqlServerData SqlServerData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, string kind = null, string administratorLogin = null, string administratorLoginPassword = null, string version = null, string state = null, string fullyQualifiedDomainName = null, IEnumerable privateEndpointConnections = null, SqlMinimalTlsVersion? minTlsVersion = null, ServerNetworkAccessFlag? publicNetworkAccess = null, ServerWorkspaceFeature? workspaceFeature = null, ResourceIdentifier primaryUserAssignedIdentityId = null, Guid? federatedClientId = null, Uri keyId = null, ServerExternalAdministrator administrators = null, ServerNetworkAccessFlag? restrictOutboundNetworkAccess = null, ServerNetworkAccessFlag? isIPv6Enabled = null, ExternalGovernanceStatus? externalGovernanceStatus = null) + public static SqlServerData SqlServerData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, string kind = null, string administratorLogin = null, string administratorLoginPassword = null, string version = null, string state = null, string fullyQualifiedDomainName = null, IEnumerable privateEndpointConnections = null, string minTlsVersion = null, ServerNetworkAccessFlag? publicNetworkAccess = null, ServerWorkspaceFeature? workspaceFeature = null, ResourceIdentifier primaryUserAssignedIdentityId = null, Guid? federatedClientId = null, Uri keyId = null, ServerExternalAdministrator administrators = null, ServerNetworkAccessFlag? restrictOutboundNetworkAccess = null, ServerNetworkAccessFlag? isIPv6Enabled = null, ExternalGovernanceStatus? externalGovernanceStatus = null) { tags ??= new Dictionary(); privateEndpointConnections ??= new List(); @@ -4180,7 +4054,7 @@ public static SqlServerPrivateEndpointConnection SqlServerPrivateEndpointConnect /// The state of the server. /// The fully qualified domain name of the server. /// List of private endpoint connections on a server. - /// Minimal TLS version. Allowed values: 'None', 1.0', '1.1', '1.2', '1.3'. + /// Minimal TLS version. Allowed values: 'None', '1.0', '1.1', '1.2'. /// Whether or not public endpoint access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled' or 'SecuredByPerimeter'. /// Whether or not existing server has a workspace created and if it allows connection from workspace. /// The resource id of a user assigned identity to be used by default. @@ -4191,7 +4065,7 @@ public static SqlServerPrivateEndpointConnection SqlServerPrivateEndpointConnect /// Whether or not to enable IPv6 support for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. /// Status of external governance. /// A new instance for mocking. - public static SqlServerPatch SqlServerPatch(ManagedServiceIdentity identity = null, IDictionary tags = null, string administratorLogin = null, string administratorLoginPassword = null, string version = null, string state = null, string fullyQualifiedDomainName = null, IEnumerable privateEndpointConnections = null, SqlMinimalTlsVersion? minTlsVersion = null, ServerNetworkAccessFlag? publicNetworkAccess = null, ServerWorkspaceFeature? workspaceFeature = null, ResourceIdentifier primaryUserAssignedIdentityId = null, Guid? federatedClientId = null, Uri keyId = null, ServerExternalAdministrator administrators = null, ServerNetworkAccessFlag? restrictOutboundNetworkAccess = null, ServerNetworkAccessFlag? isIPv6Enabled = null, ExternalGovernanceStatus? externalGovernanceStatus = null) + public static SqlServerPatch SqlServerPatch(ManagedServiceIdentity identity = null, IDictionary tags = null, string administratorLogin = null, string administratorLoginPassword = null, string version = null, string state = null, string fullyQualifiedDomainName = null, IEnumerable privateEndpointConnections = null, string minTlsVersion = null, ServerNetworkAccessFlag? publicNetworkAccess = null, ServerWorkspaceFeature? workspaceFeature = null, ResourceIdentifier primaryUserAssignedIdentityId = null, Guid? federatedClientId = null, Uri keyId = null, ServerExternalAdministrator administrators = null, ServerNetworkAccessFlag? restrictOutboundNetworkAccess = null, ServerNetworkAccessFlag? isIPv6Enabled = null, ExternalGovernanceStatus? externalGovernanceStatus = null) { tags ??= new Dictionary(); privateEndpointConnections ??= new List(); @@ -4233,5 +4107,129 @@ public static RefreshExternalGovernanceStatusOperationResult RefreshExternalGove { return new RefreshExternalGovernanceStatusOperationResult(id, name, resourceType, systemData, requestId, requestType, queuedTime, serverName, status, errorMessage, serializedAdditionalRawData: null); } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Resource location. + /// Resource tags. + /// Read-write endpoint of the failover group instance. + /// Read-only endpoint of the failover group instance. + /// Local replication role of the failover group instance. + /// Replication state of the failover group instance. + /// List of partner server information for the failover group. + /// List of databases in the failover group. + /// A new instance for mocking. + public static FailoverGroupData FailoverGroupData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, AzureLocation? location = null, IDictionary tags = null, FailoverGroupReadWriteEndpoint readWriteEndpoint = null, FailoverGroupReadOnlyEndpoint readOnlyEndpoint = null, FailoverGroupReplicationRole? replicationRole = null, string replicationState = null, IEnumerable partnerServers = null, IEnumerable failoverDatabases = null) + { + tags ??= new Dictionary(); + partnerServers ??= new List(); + failoverDatabases ??= new List(); + + return new FailoverGroupData(id, name, resourceType, systemData, location, tags, readWriteEndpoint, readOnlyEndpoint, replicationRole, replicationState, partnerServers?.ToList(), failoverDatabases?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Resource identifier of the partner server. + /// Geo location of the partner server. + /// Replication role of the partner server. + /// A new instance for mocking. + public static PartnerServerInfo PartnerServerInfo(ResourceIdentifier id = null, AzureLocation? location = null, FailoverGroupReplicationRole? replicationRole = null) + { + return new PartnerServerInfo(id, location, replicationRole, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The name and tier of the SKU. + /// Resource ID of the subnet to place this instance pool in. + /// Count of vCores belonging to this instance pool. + /// The license type. Possible values are 'LicenseIncluded' (price for SQL license is included) and 'BasePrice' (without SQL license price). + /// The Dns Zone that the managed instance pool is in. + /// Specifies maintenance configuration id to apply to this managed instance. + /// A new instance for mocking. + public static InstancePoolData InstancePoolData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, SqlSku sku = null, ResourceIdentifier subnetId = null, int? vCores = null, InstancePoolLicenseType? licenseType = null, string dnsZone = null, ResourceIdentifier maintenanceConfigurationId = null) + { + tags ??= new Dictionary(); + + return new InstancePoolData(id, name, resourceType, systemData, tags, location, sku, subnetId, vCores, licenseType, dnsZone, maintenanceConfigurationId, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The name and tier of the SKU. + /// Resource tags. + /// Resource ID of the subnet to place this instance pool in. + /// Count of vCores belonging to this instance pool. + /// The license type. Possible values are 'LicenseIncluded' (price for SQL license is included) and 'BasePrice' (without SQL license price). + /// The Dns Zone that the managed instance pool is in. + /// Specifies maintenance configuration id to apply to this managed instance. + /// A new instance for mocking. + public static InstancePoolPatch InstancePoolPatch(SqlSku sku = null, IDictionary tags = null, ResourceIdentifier subnetId = null, int? vCores = null, InstancePoolLicenseType? licenseType = null, string dnsZone = null, ResourceIdentifier maintenanceConfigurationId = null) + { + tags ??= new Dictionary(); + + return new InstancePoolPatch(sku, tags, subnetId, vCores, licenseType, dnsZone, maintenanceConfigurationId, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The server name that the backup database belong to. + /// The create time of the server. + /// The name of the database the backup belong to. + /// The delete time of the database. + /// The time the backup was taken. + /// The time the long term retention backup will expire. + /// The storage redundancy type of the backup. + /// The storage redundancy type of the backup. + /// The setting whether the LTR backup is immutable. + /// The BackupStorageAccessTier for the LTR backup. + /// A new instance for mocking. + public static LongTermRetentionBackupData LongTermRetentionBackupData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string serverName = null, DateTimeOffset? serverCreateOn = null, string databaseName = null, DateTimeOffset? databaseDeletedOn = null, DateTimeOffset? backupOn = null, DateTimeOffset? backupExpireOn = null, SqlBackupStorageRedundancy? backupStorageRedundancy = null, SqlBackupStorageRedundancy? requestedBackupStorageRedundancy = null, bool? isBackupImmutable = null, SqlBackupStorageAccessTier? backupStorageAccessTier = null) + { + return new LongTermRetentionBackupData(id, name, resourceType, systemData, serverName, serverCreateOn, databaseName, databaseDeletedOn, backupOn, backupExpireOn, backupStorageRedundancy, requestedBackupStorageRedundancy, isBackupImmutable, backupStorageAccessTier, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Request Id. + /// Operation type. + /// Source backup resource id. + /// Target backup resource id. + /// The storage redundancy type of the copied backup. + /// Operation status. + /// Progress message. + /// A new instance for mocking. + public static LongTermRetentionBackupOperationResult LongTermRetentionBackupOperationResult(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, Guid? requestId = null, string operationType = null, ResourceIdentifier fromBackupResourceId = null, ResourceIdentifier toBackupResourceId = null, SqlBackupStorageRedundancy? targetBackupStorageRedundancy = null, string status = null, string message = null) + { + return new LongTermRetentionBackupOperationResult(id, name, resourceType, systemData, requestId, operationType, fromBackupResourceId, toBackupResourceId, targetBackupStorageRedundancy, status, message, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The weekly retention policy for an LTR backup in an ISO 8601 format. + /// The monthly retention policy for an LTR backup in an ISO 8601 format. + /// The yearly retention policy for an LTR backup in an ISO 8601 format. + /// The week of year to take the yearly backup in an ISO 8601 format. + /// A new instance for mocking. + public static LongTermRetentionPolicyData LongTermRetentionPolicyData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string weeklyRetention = null, string monthlyRetention = null, string yearlyRetention = null, int? weekOfYear = null) + { + return new LongTermRetentionPolicyData(id, name, resourceType, systemData, weeklyRetention, monthlyRetention, yearlyRetention, weekOfYear, serializedAdditionalRawData: null); + } } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/MockableSqlArmClient.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/MockableSqlArmClient.cs index bf0c65e70a1e..395d8c91e3b2 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/MockableSqlArmClient.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/MockableSqlArmClient.cs @@ -1476,6 +1476,18 @@ public virtual SqlDatabaseSqlVulnerabilityAssessmentResource GetSqlDatabaseSqlVu return new SqlDatabaseSqlVulnerabilityAssessmentResource(Client, id); } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual SqlServerResource GetSqlServerResource(ResourceIdentifier id) + { + SqlServerResource.ValidateResourceId(id); + return new SqlServerResource(Client, id); + } + /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -1535,17 +1547,5 @@ public virtual LongTermRetentionPolicyResource GetLongTermRetentionPolicyResourc LongTermRetentionPolicyResource.ValidateResourceId(id); return new LongTermRetentionPolicyResource(Client, id); } - - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// The resource ID of the resource to get. - /// Returns a object. - public virtual SqlServerResource GetSqlServerResource(ResourceIdentifier id) - { - SqlServerResource.ValidateResourceId(id); - return new SqlServerResource(Client, id); - } } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/MockableSqlResourceGroupResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/MockableSqlResourceGroupResource.cs index 1b25c8f33566..3cbed7d5e5b5 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/MockableSqlResourceGroupResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/MockableSqlResourceGroupResource.cs @@ -413,6 +413,77 @@ public virtual Response GetManagedInstance(string manag return GetManagedInstances().Get(managedInstanceName, expand, cancellationToken); } + /// Gets a collection of SqlServerResources in the ResourceGroupResource. + /// An object representing collection of SqlServerResources and their operations over a SqlServerResource. + public virtual SqlServerCollection GetSqlServers() + { + return GetCachedClient(client => new SqlServerCollection(client, Id)); + } + + /// + /// Gets a server. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName} + /// + /// + /// Operation Id + /// Servers_Get + /// + /// + /// Default Api Version + /// 2023-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the server. + /// The child resources to include in the response. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetSqlServerAsync(string serverName, string expand = null, CancellationToken cancellationToken = default) + { + return await GetSqlServers().GetAsync(serverName, expand, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets a server. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName} + /// + /// + /// Operation Id + /// Servers_Get + /// + /// + /// Default Api Version + /// 2023-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the server. + /// The child resources to include in the response. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetSqlServer(string serverName, string expand = null, CancellationToken cancellationToken = default) + { + return GetSqlServers().Get(serverName, expand, cancellationToken); + } + /// Gets a collection of InstancePoolResources in the ResourceGroupResource. /// An object representing collection of InstancePoolResources and their operations over a InstancePoolResource. public virtual InstancePoolCollection GetInstancePools() @@ -562,77 +633,6 @@ public virtual Response GetResourc return GetResourceGroupLongTermRetentionBackups(locationName, longTermRetentionServerName, longTermRetentionDatabaseName).Get(backupName, cancellationToken); } - /// Gets a collection of SqlServerResources in the ResourceGroupResource. - /// An object representing collection of SqlServerResources and their operations over a SqlServerResource. - public virtual SqlServerCollection GetSqlServers() - { - return GetCachedClient(client => new SqlServerCollection(client, Id)); - } - - /// - /// Gets a server. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName} - /// - /// - /// Operation Id - /// Servers_Get - /// - /// - /// Default Api Version - /// 2023-05-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the server. - /// The child resources to include in the response. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual async Task> GetSqlServerAsync(string serverName, string expand = null, CancellationToken cancellationToken = default) - { - return await GetSqlServers().GetAsync(serverName, expand, cancellationToken).ConfigureAwait(false); - } - - /// - /// Gets a server. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName} - /// - /// - /// Operation Id - /// Servers_Get - /// - /// - /// Default Api Version - /// 2023-05-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the server. - /// The child resources to include in the response. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual Response GetSqlServer(string serverName, string expand = null, CancellationToken cancellationToken = default) - { - return GetSqlServers().Get(serverName, expand, cancellationToken); - } - /// /// Lists the long term retention backups for a given managed instance. /// diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/MockableSqlSubscriptionResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/MockableSqlSubscriptionResource.cs index 89177040fb0c..e278797286aa 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/MockableSqlSubscriptionResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/MockableSqlSubscriptionResource.cs @@ -35,12 +35,12 @@ public partial class MockableSqlSubscriptionResource : ArmResource private VirtualClustersRestOperations _virtualClusterRestClient; private ClientDiagnostics _managedInstanceClientDiagnostics; private ManagedInstancesRestOperations _managedInstanceRestClient; + private ClientDiagnostics _sqlServerServersClientDiagnostics; + private ServersRestOperations _sqlServerServersRestClient; private ClientDiagnostics _instancePoolClientDiagnostics; private InstancePoolsRestOperations _instancePoolRestClient; private ClientDiagnostics _longTermRetentionBackupsClientDiagnostics; private LongTermRetentionBackupsRestOperations _longTermRetentionBackupsRestClient; - private ClientDiagnostics _sqlServerServersClientDiagnostics; - private ServersRestOperations _sqlServerServersRestClient; /// Initializes a new instance of the class for mocking. protected MockableSqlSubscriptionResource() @@ -66,12 +66,12 @@ internal MockableSqlSubscriptionResource(ArmClient client, ResourceIdentifier id private VirtualClustersRestOperations VirtualClusterRestClient => _virtualClusterRestClient ??= new VirtualClustersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(VirtualClusterResource.ResourceType)); private ClientDiagnostics ManagedInstanceClientDiagnostics => _managedInstanceClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Sql", ManagedInstanceResource.ResourceType.Namespace, Diagnostics); private ManagedInstancesRestOperations ManagedInstanceRestClient => _managedInstanceRestClient ??= new ManagedInstancesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(ManagedInstanceResource.ResourceType)); + private ClientDiagnostics SqlServerServersClientDiagnostics => _sqlServerServersClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Sql", SqlServerResource.ResourceType.Namespace, Diagnostics); + private ServersRestOperations SqlServerServersRestClient => _sqlServerServersRestClient ??= new ServersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(SqlServerResource.ResourceType)); private ClientDiagnostics InstancePoolClientDiagnostics => _instancePoolClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Sql", InstancePoolResource.ResourceType.Namespace, Diagnostics); private InstancePoolsRestOperations InstancePoolRestClient => _instancePoolRestClient ??= new InstancePoolsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(InstancePoolResource.ResourceType)); private ClientDiagnostics LongTermRetentionBackupsClientDiagnostics => _longTermRetentionBackupsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Sql", ProviderConstants.DefaultProviderNamespace, Diagnostics); private LongTermRetentionBackupsRestOperations LongTermRetentionBackupsRestClient => _longTermRetentionBackupsRestClient ??= new LongTermRetentionBackupsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); - private ClientDiagnostics SqlServerServersClientDiagnostics => _sqlServerServersClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Sql", SqlServerResource.ResourceType.Namespace, Diagnostics); - private ServersRestOperations SqlServerServersRestClient => _sqlServerServersRestClient ??= new ServersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(SqlServerResource.ResourceType)); private string GetApiVersionOrNull(ResourceType resourceType) { @@ -897,6 +897,152 @@ public virtual Pageable GetManagedInstances(string expa return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ManagedInstanceResource(Client, ManagedInstanceData.DeserializeManagedInstanceData(e)), ManagedInstanceClientDiagnostics, Pipeline, "MockableSqlSubscriptionResource.GetManagedInstances", "value", "nextLink", cancellationToken); } + /// + /// Determines whether a resource can be created with the specified name. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Sql/checkNameAvailability + /// + /// + /// Operation Id + /// Servers_CheckNameAvailability + /// + /// + /// Default Api Version + /// 2023-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name availability request parameters. + /// The cancellation token to use. + /// is null. + public virtual async Task> CheckSqlServerNameAvailabilityAsync(SqlNameAvailabilityContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = SqlServerServersClientDiagnostics.CreateScope("MockableSqlSubscriptionResource.CheckSqlServerNameAvailability"); + scope.Start(); + try + { + var response = await SqlServerServersRestClient.CheckNameAvailabilityAsync(Id.SubscriptionId, content, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Determines whether a resource can be created with the specified name. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Sql/checkNameAvailability + /// + /// + /// Operation Id + /// Servers_CheckNameAvailability + /// + /// + /// Default Api Version + /// 2023-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name availability request parameters. + /// The cancellation token to use. + /// is null. + public virtual Response CheckSqlServerNameAvailability(SqlNameAvailabilityContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = SqlServerServersClientDiagnostics.CreateScope("MockableSqlSubscriptionResource.CheckSqlServerNameAvailability"); + scope.Start(); + try + { + var response = SqlServerServersRestClient.CheckNameAvailability(Id.SubscriptionId, content, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a list of all servers in the subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Sql/servers + /// + /// + /// Operation Id + /// Servers_List + /// + /// + /// Default Api Version + /// 2023-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The child resources to include in the response. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetSqlServersAsync(string expand = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => SqlServerServersRestClient.CreateListRequest(Id.SubscriptionId, expand); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => SqlServerServersRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, expand); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new SqlServerResource(Client, SqlServerData.DeserializeSqlServerData(e)), SqlServerServersClientDiagnostics, Pipeline, "MockableSqlSubscriptionResource.GetSqlServers", "value", "nextLink", cancellationToken); + } + + /// + /// Gets a list of all servers in the subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Sql/servers + /// + /// + /// Operation Id + /// Servers_List + /// + /// + /// Default Api Version + /// 2023-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The child resources to include in the response. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetSqlServers(string expand = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => SqlServerServersRestClient.CreateListRequest(Id.SubscriptionId, expand); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => SqlServerServersRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, expand); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new SqlServerResource(Client, SqlServerData.DeserializeSqlServerData(e)), SqlServerServersClientDiagnostics, Pipeline, "MockableSqlSubscriptionResource.GetSqlServers", "value", "nextLink", cancellationToken); + } + /// /// Gets a list of all instance pools in the subscription. /// @@ -1082,151 +1228,5 @@ public virtual Pageable GetLongTermRetentionBackups HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => LongTermRetentionBackupsRestClient.CreateListByServerNextPageRequest(nextLink, Id.SubscriptionId, locationName, longTermRetentionServerName, onlyLatestPerDatabase, databaseState); return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => LongTermRetentionBackupData.DeserializeLongTermRetentionBackupData(e), LongTermRetentionBackupsClientDiagnostics, Pipeline, "MockableSqlSubscriptionResource.GetLongTermRetentionBackupsWithServer", "value", "nextLink", cancellationToken); } - - /// - /// Determines whether a resource can be created with the specified name. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.Sql/checkNameAvailability - /// - /// - /// Operation Id - /// Servers_CheckNameAvailability - /// - /// - /// Default Api Version - /// 2023-05-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The name availability request parameters. - /// The cancellation token to use. - /// is null. - public virtual async Task> CheckSqlServerNameAvailabilityAsync(SqlNameAvailabilityContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = SqlServerServersClientDiagnostics.CreateScope("MockableSqlSubscriptionResource.CheckSqlServerNameAvailability"); - scope.Start(); - try - { - var response = await SqlServerServersRestClient.CheckNameAvailabilityAsync(Id.SubscriptionId, content, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Determines whether a resource can be created with the specified name. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.Sql/checkNameAvailability - /// - /// - /// Operation Id - /// Servers_CheckNameAvailability - /// - /// - /// Default Api Version - /// 2023-05-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The name availability request parameters. - /// The cancellation token to use. - /// is null. - public virtual Response CheckSqlServerNameAvailability(SqlNameAvailabilityContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = SqlServerServersClientDiagnostics.CreateScope("MockableSqlSubscriptionResource.CheckSqlServerNameAvailability"); - scope.Start(); - try - { - var response = SqlServerServersRestClient.CheckNameAvailability(Id.SubscriptionId, content, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets a list of all servers in the subscription. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.Sql/servers - /// - /// - /// Operation Id - /// Servers_List - /// - /// - /// Default Api Version - /// 2023-05-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The child resources to include in the response. - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetSqlServersAsync(string expand = null, CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => SqlServerServersRestClient.CreateListRequest(Id.SubscriptionId, expand); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => SqlServerServersRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, expand); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new SqlServerResource(Client, SqlServerData.DeserializeSqlServerData(e)), SqlServerServersClientDiagnostics, Pipeline, "MockableSqlSubscriptionResource.GetSqlServers", "value", "nextLink", cancellationToken); - } - - /// - /// Gets a list of all servers in the subscription. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.Sql/servers - /// - /// - /// Operation Id - /// Servers_List - /// - /// - /// Default Api Version - /// 2023-05-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The child resources to include in the response. - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetSqlServers(string expand = null, CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => SqlServerServersRestClient.CreateListRequest(Id.SubscriptionId, expand); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => SqlServerServersRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, expand); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new SqlServerResource(Client, SqlServerData.DeserializeSqlServerData(e)), SqlServerServersClientDiagnostics, Pipeline, "MockableSqlSubscriptionResource.GetSqlServers", "value", "nextLink", cancellationToken); - } } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/SqlExtensions.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/SqlExtensions.cs index de957c95809b..4e18b2f7d0b7 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/SqlExtensions.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/SqlExtensions.cs @@ -2316,6 +2316,25 @@ public static SqlDatabaseSqlVulnerabilityAssessmentResource GetSqlDatabaseSqlVul return GetMockableSqlArmClient(client).GetSqlDatabaseSqlVulnerabilityAssessmentResource(id); } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static SqlServerResource GetSqlServerResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableSqlArmClient(client).GetSqlServerResource(id); + } + /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -2411,25 +2430,6 @@ public static LongTermRetentionPolicyResource GetLongTermRetentionPolicyResource return GetMockableSqlArmClient(client).GetLongTermRetentionPolicyResource(id); } - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// The resource ID of the resource to get. - /// is null. - /// Returns a object. - public static SqlServerResource GetSqlServerResource(this ArmClient client, ResourceIdentifier id) - { - Argument.AssertNotNull(client, nameof(client)); - - return GetMockableSqlArmClient(client).GetSqlServerResource(id); - } - /// /// Gets a collection of SqlServerTrustGroupResources in the ResourceGroupResource. /// @@ -2914,129 +2914,127 @@ public static Response GetManagedInstance(this Resource } /// - /// Gets a collection of InstancePoolResources in the ResourceGroupResource. + /// Gets a collection of SqlServerResources in the ResourceGroupResource. /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// is null. - /// An object representing collection of InstancePoolResources and their operations over a InstancePoolResource. - public static InstancePoolCollection GetInstancePools(this ResourceGroupResource resourceGroupResource) + /// An object representing collection of SqlServerResources and their operations over a SqlServerResource. + public static SqlServerCollection GetSqlServers(this ResourceGroupResource resourceGroupResource) { Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - return GetMockableSqlResourceGroupResource(resourceGroupResource).GetInstancePools(); + return GetMockableSqlResourceGroupResource(resourceGroupResource).GetSqlServers(); } /// - /// Gets an instance pool. + /// Gets a server. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName} /// /// /// Operation Id - /// InstancePools_Get + /// Servers_Get /// /// /// Default Api Version - /// 2023-05-01-preview + /// 2023-02-01-preview /// /// /// Resource - /// + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. - /// The name of the instance pool to be retrieved. + /// The name of the server. + /// The child resources to include in the response. /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. + /// or is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public static async Task> GetInstancePoolAsync(this ResourceGroupResource resourceGroupResource, string instancePoolName, CancellationToken cancellationToken = default) + public static async Task> GetSqlServerAsync(this ResourceGroupResource resourceGroupResource, string serverName, string expand = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - return await GetMockableSqlResourceGroupResource(resourceGroupResource).GetInstancePoolAsync(instancePoolName, cancellationToken).ConfigureAwait(false); + return await GetMockableSqlResourceGroupResource(resourceGroupResource).GetSqlServerAsync(serverName, expand, cancellationToken).ConfigureAwait(false); } /// - /// Gets an instance pool. + /// Gets a server. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName} /// /// /// Operation Id - /// InstancePools_Get + /// Servers_Get /// /// /// Default Api Version - /// 2023-05-01-preview + /// 2023-02-01-preview /// /// /// Resource - /// + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. - /// The name of the instance pool to be retrieved. + /// The name of the server. + /// The child resources to include in the response. /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. + /// or is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public static Response GetInstancePool(this ResourceGroupResource resourceGroupResource, string instancePoolName, CancellationToken cancellationToken = default) + public static Response GetSqlServer(this ResourceGroupResource resourceGroupResource, string serverName, string expand = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - return GetMockableSqlResourceGroupResource(resourceGroupResource).GetInstancePool(instancePoolName, cancellationToken); + return GetMockableSqlResourceGroupResource(resourceGroupResource).GetSqlServer(serverName, expand, cancellationToken); } /// - /// Gets a collection of ResourceGroupLongTermRetentionBackupResources in the ResourceGroupResource. + /// Gets a collection of InstancePoolResources in the ResourceGroupResource. /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. - /// The location of the database. - /// The name of the server. - /// The name of the database. - /// , or is null. - /// or is an empty string, and was expected to be non-empty. - /// An object representing collection of ResourceGroupLongTermRetentionBackupResources and their operations over a ResourceGroupLongTermRetentionBackupResource. - public static ResourceGroupLongTermRetentionBackupCollection GetResourceGroupLongTermRetentionBackups(this ResourceGroupResource resourceGroupResource, AzureLocation locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName) + /// is null. + /// An object representing collection of InstancePoolResources and their operations over a InstancePoolResource. + public static InstancePoolCollection GetInstancePools(this ResourceGroupResource resourceGroupResource) { Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - return GetMockableSqlResourceGroupResource(resourceGroupResource).GetResourceGroupLongTermRetentionBackups(locationName, longTermRetentionServerName, longTermRetentionDatabaseName); + return GetMockableSqlResourceGroupResource(resourceGroupResource).GetInstancePools(); } /// - /// Gets a long term retention backup. + /// Gets an instance pool. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName} /// /// /// Operation Id - /// LongTermRetentionBackups_GetByResourceGroup + /// InstancePools_Get /// /// /// Default Api Version @@ -3044,40 +3042,37 @@ public static ResourceGroupLongTermRetentionBackupCollection GetResourceGroupLon /// /// /// Resource - /// + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. - /// The location of the database. - /// The name of the server. - /// The name of the database. - /// The backup name. + /// The name of the instance pool to be retrieved. /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. + /// or is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public static async Task> GetResourceGroupLongTermRetentionBackupAsync(this ResourceGroupResource resourceGroupResource, AzureLocation locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, string backupName, CancellationToken cancellationToken = default) + public static async Task> GetInstancePoolAsync(this ResourceGroupResource resourceGroupResource, string instancePoolName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - return await GetMockableSqlResourceGroupResource(resourceGroupResource).GetResourceGroupLongTermRetentionBackupAsync(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, cancellationToken).ConfigureAwait(false); + return await GetMockableSqlResourceGroupResource(resourceGroupResource).GetInstancePoolAsync(instancePoolName, cancellationToken).ConfigureAwait(false); } /// - /// Gets a long term retention backup. + /// Gets an instance pool. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName} /// /// /// Operation Id - /// LongTermRetentionBackups_GetByResourceGroup + /// InstancePools_Get /// /// /// Default Api Version @@ -3085,57 +3080,58 @@ public static async Task> /// /// /// Resource - /// + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. - /// The location of the database. - /// The name of the server. - /// The name of the database. - /// The backup name. + /// The name of the instance pool to be retrieved. /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. + /// or is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public static Response GetResourceGroupLongTermRetentionBackup(this ResourceGroupResource resourceGroupResource, AzureLocation locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, string backupName, CancellationToken cancellationToken = default) + public static Response GetInstancePool(this ResourceGroupResource resourceGroupResource, string instancePoolName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - return GetMockableSqlResourceGroupResource(resourceGroupResource).GetResourceGroupLongTermRetentionBackup(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, cancellationToken); + return GetMockableSqlResourceGroupResource(resourceGroupResource).GetInstancePool(instancePoolName, cancellationToken); } /// - /// Gets a collection of SqlServerResources in the ResourceGroupResource. + /// Gets a collection of ResourceGroupLongTermRetentionBackupResources in the ResourceGroupResource. /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. - /// is null. - /// An object representing collection of SqlServerResources and their operations over a SqlServerResource. - public static SqlServerCollection GetSqlServers(this ResourceGroupResource resourceGroupResource) + /// The location of the database. + /// The name of the server. + /// The name of the database. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// An object representing collection of ResourceGroupLongTermRetentionBackupResources and their operations over a ResourceGroupLongTermRetentionBackupResource. + public static ResourceGroupLongTermRetentionBackupCollection GetResourceGroupLongTermRetentionBackups(this ResourceGroupResource resourceGroupResource, AzureLocation locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName) { Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - return GetMockableSqlResourceGroupResource(resourceGroupResource).GetSqlServers(); + return GetMockableSqlResourceGroupResource(resourceGroupResource).GetResourceGroupLongTermRetentionBackups(locationName, longTermRetentionServerName, longTermRetentionDatabaseName); } /// - /// Gets a server. + /// Gets a long term retention backup. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName} /// /// /// Operation Id - /// Servers_Get + /// LongTermRetentionBackups_GetByResourceGroup /// /// /// Default Api Version @@ -3143,38 +3139,40 @@ public static SqlServerCollection GetSqlServers(this ResourceGroupResource resou /// /// /// Resource - /// + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. - /// The name of the server. - /// The child resources to include in the response. + /// The location of the database. + /// The name of the server. + /// The name of the database. + /// The backup name. /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public static async Task> GetSqlServerAsync(this ResourceGroupResource resourceGroupResource, string serverName, string expand = null, CancellationToken cancellationToken = default) + public static async Task> GetResourceGroupLongTermRetentionBackupAsync(this ResourceGroupResource resourceGroupResource, AzureLocation locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, string backupName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - return await GetMockableSqlResourceGroupResource(resourceGroupResource).GetSqlServerAsync(serverName, expand, cancellationToken).ConfigureAwait(false); + return await GetMockableSqlResourceGroupResource(resourceGroupResource).GetResourceGroupLongTermRetentionBackupAsync(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, cancellationToken).ConfigureAwait(false); } /// - /// Gets a server. + /// Gets a long term retention backup. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName} /// /// /// Operation Id - /// Servers_Get + /// LongTermRetentionBackups_GetByResourceGroup /// /// /// Default Api Version @@ -3182,26 +3180,28 @@ public static async Task> GetSqlServerAsync(this Res /// /// /// Resource - /// + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. - /// The name of the server. - /// The child resources to include in the response. + /// The location of the database. + /// The name of the server. + /// The name of the database. + /// The backup name. /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public static Response GetSqlServer(this ResourceGroupResource resourceGroupResource, string serverName, string expand = null, CancellationToken cancellationToken = default) + public static Response GetResourceGroupLongTermRetentionBackup(this ResourceGroupResource resourceGroupResource, AzureLocation locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, string backupName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - return GetMockableSqlResourceGroupResource(resourceGroupResource).GetSqlServer(serverName, expand, cancellationToken); + return GetMockableSqlResourceGroupResource(resourceGroupResource).GetResourceGroupLongTermRetentionBackup(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, cancellationToken); } /// @@ -4489,365 +4489,365 @@ public static Pageable GetManagedInstances(this Subscri } /// - /// Gets a list of all instance pools in the subscription. + /// Determines whether a resource can be created with the specified name. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.Sql/instancePools + /// /subscriptions/{subscriptionId}/providers/Microsoft.Sql/checkNameAvailability /// /// /// Operation Id - /// InstancePools_List + /// Servers_CheckNameAvailability /// /// /// Default Api Version - /// 2023-05-01-preview + /// 2023-02-01-preview /// /// /// Resource - /// + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. + /// The name availability request parameters. /// The cancellation token to use. - /// is null. - /// An async collection of that may take multiple service requests to iterate over. - public static AsyncPageable GetInstancePoolsAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + /// or is null. + public static async Task> CheckSqlServerNameAvailabilityAsync(this SubscriptionResource subscriptionResource, SqlNameAvailabilityContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableSqlSubscriptionResource(subscriptionResource).GetInstancePoolsAsync(cancellationToken); + return await GetMockableSqlSubscriptionResource(subscriptionResource).CheckSqlServerNameAvailabilityAsync(content, cancellationToken).ConfigureAwait(false); } /// - /// Gets a list of all instance pools in the subscription. + /// Determines whether a resource can be created with the specified name. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.Sql/instancePools + /// /subscriptions/{subscriptionId}/providers/Microsoft.Sql/checkNameAvailability /// /// /// Operation Id - /// InstancePools_List + /// Servers_CheckNameAvailability /// /// /// Default Api Version - /// 2023-05-01-preview + /// 2023-02-01-preview /// /// /// Resource - /// + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. + /// The name availability request parameters. /// The cancellation token to use. - /// is null. - /// A collection of that may take multiple service requests to iterate over. - public static Pageable GetInstancePools(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + /// or is null. + public static Response CheckSqlServerNameAvailability(this SubscriptionResource subscriptionResource, SqlNameAvailabilityContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableSqlSubscriptionResource(subscriptionResource).GetInstancePools(cancellationToken); + return GetMockableSqlSubscriptionResource(subscriptionResource).CheckSqlServerNameAvailability(content, cancellationToken); } /// - /// Lists the long term retention backups for a given location. + /// Gets a list of all servers in the subscription. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionBackups + /// /subscriptions/{subscriptionId}/providers/Microsoft.Sql/servers /// /// /// Operation Id - /// LongTermRetentionBackups_ListByLocation + /// Servers_List /// /// /// Default Api Version - /// 2023-05-01-preview + /// 2023-02-01-preview + /// + /// + /// Resource + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. - /// The location of the database. - /// Whether or not to only get the latest backup for each database. - /// Whether to query against just live databases, just deleted databases, or all databases. + /// The child resources to include in the response. /// The cancellation token to use. /// is null. - /// An async collection of that may take multiple service requests to iterate over. - public static AsyncPageable GetLongTermRetentionBackupsWithLocationAsync(this SubscriptionResource subscriptionResource, AzureLocation locationName, bool? onlyLatestPerDatabase = null, SqlDatabaseState? databaseState = null, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetSqlServersAsync(this SubscriptionResource subscriptionResource, string expand = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableSqlSubscriptionResource(subscriptionResource).GetLongTermRetentionBackupsWithLocationAsync(locationName, onlyLatestPerDatabase, databaseState, cancellationToken); + return GetMockableSqlSubscriptionResource(subscriptionResource).GetSqlServersAsync(expand, cancellationToken); } /// - /// Lists the long term retention backups for a given location. + /// Gets a list of all servers in the subscription. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionBackups + /// /subscriptions/{subscriptionId}/providers/Microsoft.Sql/servers /// /// /// Operation Id - /// LongTermRetentionBackups_ListByLocation + /// Servers_List /// /// /// Default Api Version - /// 2023-05-01-preview + /// 2023-02-01-preview + /// + /// + /// Resource + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. - /// The location of the database. - /// Whether or not to only get the latest backup for each database. - /// Whether to query against just live databases, just deleted databases, or all databases. + /// The child resources to include in the response. /// The cancellation token to use. /// is null. - /// A collection of that may take multiple service requests to iterate over. - public static Pageable GetLongTermRetentionBackupsWithLocation(this SubscriptionResource subscriptionResource, AzureLocation locationName, bool? onlyLatestPerDatabase = null, SqlDatabaseState? databaseState = null, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetSqlServers(this SubscriptionResource subscriptionResource, string expand = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableSqlSubscriptionResource(subscriptionResource).GetLongTermRetentionBackupsWithLocation(locationName, onlyLatestPerDatabase, databaseState, cancellationToken); + return GetMockableSqlSubscriptionResource(subscriptionResource).GetSqlServers(expand, cancellationToken); } /// - /// Lists the long term retention backups for a given server. + /// Gets a list of all instance pools in the subscription. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionBackups + /// /subscriptions/{subscriptionId}/providers/Microsoft.Sql/instancePools /// /// /// Operation Id - /// LongTermRetentionBackups_ListByServer + /// InstancePools_List /// /// /// Default Api Version /// 2023-05-01-preview /// + /// + /// Resource + /// + /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. - /// The location of the database. - /// The name of the server. - /// Whether or not to only get the latest backup for each database. - /// Whether to query against just live databases, just deleted databases, or all databases. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - /// An async collection of that may take multiple service requests to iterate over. - public static AsyncPageable GetLongTermRetentionBackupsWithServerAsync(this SubscriptionResource subscriptionResource, AzureLocation locationName, string longTermRetentionServerName, bool? onlyLatestPerDatabase = null, SqlDatabaseState? databaseState = null, CancellationToken cancellationToken = default) + /// is null. + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetInstancePoolsAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableSqlSubscriptionResource(subscriptionResource).GetLongTermRetentionBackupsWithServerAsync(locationName, longTermRetentionServerName, onlyLatestPerDatabase, databaseState, cancellationToken); + return GetMockableSqlSubscriptionResource(subscriptionResource).GetInstancePoolsAsync(cancellationToken); } /// - /// Lists the long term retention backups for a given server. + /// Gets a list of all instance pools in the subscription. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionBackups + /// /subscriptions/{subscriptionId}/providers/Microsoft.Sql/instancePools /// /// /// Operation Id - /// LongTermRetentionBackups_ListByServer + /// InstancePools_List /// /// /// Default Api Version /// 2023-05-01-preview /// + /// + /// Resource + /// + /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. - /// The location of the database. - /// The name of the server. - /// Whether or not to only get the latest backup for each database. - /// Whether to query against just live databases, just deleted databases, or all databases. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - /// A collection of that may take multiple service requests to iterate over. - public static Pageable GetLongTermRetentionBackupsWithServer(this SubscriptionResource subscriptionResource, AzureLocation locationName, string longTermRetentionServerName, bool? onlyLatestPerDatabase = null, SqlDatabaseState? databaseState = null, CancellationToken cancellationToken = default) + /// is null. + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetInstancePools(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableSqlSubscriptionResource(subscriptionResource).GetLongTermRetentionBackupsWithServer(locationName, longTermRetentionServerName, onlyLatestPerDatabase, databaseState, cancellationToken); + return GetMockableSqlSubscriptionResource(subscriptionResource).GetInstancePools(cancellationToken); } /// - /// Determines whether a resource can be created with the specified name. + /// Lists the long term retention backups for a given location. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.Sql/checkNameAvailability + /// /subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionBackups /// /// /// Operation Id - /// Servers_CheckNameAvailability + /// LongTermRetentionBackups_ListByLocation /// /// /// Default Api Version /// 2023-05-01-preview /// - /// - /// Resource - /// - /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. - /// The name availability request parameters. + /// The location of the database. + /// Whether or not to only get the latest backup for each database. + /// Whether to query against just live databases, just deleted databases, or all databases. /// The cancellation token to use. - /// or is null. - public static async Task> CheckSqlServerNameAvailabilityAsync(this SubscriptionResource subscriptionResource, SqlNameAvailabilityContent content, CancellationToken cancellationToken = default) + /// is null. + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetLongTermRetentionBackupsWithLocationAsync(this SubscriptionResource subscriptionResource, AzureLocation locationName, bool? onlyLatestPerDatabase = null, SqlDatabaseState? databaseState = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return await GetMockableSqlSubscriptionResource(subscriptionResource).CheckSqlServerNameAvailabilityAsync(content, cancellationToken).ConfigureAwait(false); + return GetMockableSqlSubscriptionResource(subscriptionResource).GetLongTermRetentionBackupsWithLocationAsync(locationName, onlyLatestPerDatabase, databaseState, cancellationToken); } /// - /// Determines whether a resource can be created with the specified name. + /// Lists the long term retention backups for a given location. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.Sql/checkNameAvailability + /// /subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionBackups /// /// /// Operation Id - /// Servers_CheckNameAvailability + /// LongTermRetentionBackups_ListByLocation /// /// /// Default Api Version /// 2023-05-01-preview /// - /// - /// Resource - /// - /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. - /// The name availability request parameters. + /// The location of the database. + /// Whether or not to only get the latest backup for each database. + /// Whether to query against just live databases, just deleted databases, or all databases. /// The cancellation token to use. - /// or is null. - public static Response CheckSqlServerNameAvailability(this SubscriptionResource subscriptionResource, SqlNameAvailabilityContent content, CancellationToken cancellationToken = default) + /// is null. + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetLongTermRetentionBackupsWithLocation(this SubscriptionResource subscriptionResource, AzureLocation locationName, bool? onlyLatestPerDatabase = null, SqlDatabaseState? databaseState = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableSqlSubscriptionResource(subscriptionResource).CheckSqlServerNameAvailability(content, cancellationToken); + return GetMockableSqlSubscriptionResource(subscriptionResource).GetLongTermRetentionBackupsWithLocation(locationName, onlyLatestPerDatabase, databaseState, cancellationToken); } /// - /// Gets a list of all servers in the subscription. + /// Lists the long term retention backups for a given server. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.Sql/servers + /// /subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionBackups /// /// /// Operation Id - /// Servers_List + /// LongTermRetentionBackups_ListByServer /// /// /// Default Api Version /// 2023-05-01-preview /// - /// - /// Resource - /// - /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. - /// The child resources to include in the response. + /// The location of the database. + /// The name of the server. + /// Whether or not to only get the latest backup for each database. + /// Whether to query against just live databases, just deleted databases, or all databases. /// The cancellation token to use. - /// is null. - /// An async collection of that may take multiple service requests to iterate over. - public static AsyncPageable GetSqlServersAsync(this SubscriptionResource subscriptionResource, string expand = null, CancellationToken cancellationToken = default) + /// is an empty string, and was expected to be non-empty. + /// or is null. + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetLongTermRetentionBackupsWithServerAsync(this SubscriptionResource subscriptionResource, AzureLocation locationName, string longTermRetentionServerName, bool? onlyLatestPerDatabase = null, SqlDatabaseState? databaseState = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableSqlSubscriptionResource(subscriptionResource).GetSqlServersAsync(expand, cancellationToken); + return GetMockableSqlSubscriptionResource(subscriptionResource).GetLongTermRetentionBackupsWithServerAsync(locationName, longTermRetentionServerName, onlyLatestPerDatabase, databaseState, cancellationToken); } /// - /// Gets a list of all servers in the subscription. + /// Lists the long term retention backups for a given server. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.Sql/servers + /// /subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionBackups /// /// /// Operation Id - /// Servers_List + /// LongTermRetentionBackups_ListByServer /// /// /// Default Api Version /// 2023-05-01-preview /// - /// - /// Resource - /// - /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. - /// The child resources to include in the response. + /// The location of the database. + /// The name of the server. + /// Whether or not to only get the latest backup for each database. + /// Whether to query against just live databases, just deleted databases, or all databases. /// The cancellation token to use. - /// is null. - /// A collection of that may take multiple service requests to iterate over. - public static Pageable GetSqlServers(this SubscriptionResource subscriptionResource, string expand = null, CancellationToken cancellationToken = default) + /// is an empty string, and was expected to be non-empty. + /// or is null. + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetLongTermRetentionBackupsWithServer(this SubscriptionResource subscriptionResource, AzureLocation locationName, string longTermRetentionServerName, bool? onlyLatestPerDatabase = null, SqlDatabaseState? databaseState = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableSqlSubscriptionResource(subscriptionResource).GetSqlServers(expand, cancellationToken); + return GetMockableSqlSubscriptionResource(subscriptionResource).GetLongTermRetentionBackupsWithServer(locationName, longTermRetentionServerName, onlyLatestPerDatabase, databaseState, cancellationToken); } } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/LongTermRetentionPolicyCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/LongTermRetentionPolicyCollection.cs index aa81e004c556..7ccde7eaa7c5 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/LongTermRetentionPolicyCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/LongTermRetentionPolicyCollection.cs @@ -55,7 +55,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) } /// - /// Set or update a database's long term retention policy. + /// Sets a database's long term retention policy. /// /// /// Request Path @@ -102,7 +102,7 @@ public virtual async Task> CreateO } /// - /// Set or update a database's long term retention policy. + /// Sets a database's long term retention policy. /// /// /// Request Path diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/LongTermRetentionPolicyData.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/LongTermRetentionPolicyData.cs index 15d839227793..6243d12b586a 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/LongTermRetentionPolicyData.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/LongTermRetentionPolicyData.cs @@ -9,7 +9,6 @@ using System.Collections.Generic; using Azure.Core; using Azure.ResourceManager.Models; -using Azure.ResourceManager.Sql.Models; namespace Azure.ResourceManager.Sql { @@ -61,17 +60,13 @@ public LongTermRetentionPolicyData() /// The name. /// The resourceType. /// The systemData. - /// The setting whether to make LTR backups immutable. - /// The BackupStorageAccessTier for the LTR backups. /// The weekly retention policy for an LTR backup in an ISO 8601 format. /// The monthly retention policy for an LTR backup in an ISO 8601 format. /// The yearly retention policy for an LTR backup in an ISO 8601 format. /// The week of year to take the yearly backup in an ISO 8601 format. /// Keeps track of any properties unknown to the library. - internal LongTermRetentionPolicyData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, bool? makeBackupsImmutable, SqlBackupStorageAccessTier? backupStorageAccessTier, string weeklyRetention, string monthlyRetention, string yearlyRetention, int? weekOfYear, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal LongTermRetentionPolicyData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string weeklyRetention, string monthlyRetention, string yearlyRetention, int? weekOfYear, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { - MakeBackupsImmutable = makeBackupsImmutable; - BackupStorageAccessTier = backupStorageAccessTier; WeeklyRetention = weeklyRetention; MonthlyRetention = monthlyRetention; YearlyRetention = yearlyRetention; @@ -79,10 +74,6 @@ internal LongTermRetentionPolicyData(ResourceIdentifier id, string name, Resourc _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The setting whether to make LTR backups immutable. - public bool? MakeBackupsImmutable { get; set; } - /// The BackupStorageAccessTier for the LTR backups. - public SqlBackupStorageAccessTier? BackupStorageAccessTier { get; set; } /// The weekly retention policy for an LTR backup in an ISO 8601 format. public string WeeklyRetention { get; set; } /// The monthly retention policy for an LTR backup in an ISO 8601 format. diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/LongTermRetentionPolicyResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/LongTermRetentionPolicyResource.cs index fe90b6b66cce..ce8f47d5898a 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/LongTermRetentionPolicyResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/LongTermRetentionPolicyResource.cs @@ -173,7 +173,7 @@ public virtual Response Get(CancellationToken c } /// - /// Set or update a database's long term retention policy. + /// Sets a database's long term retention policy. /// /// /// Request Path @@ -219,7 +219,7 @@ public virtual async Task> UpdateA } /// - /// Set or update a database's long term retention policy. + /// Sets a database's long term retention policy. /// /// /// Request Path diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/LongTermRetentionPolicyData.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/LongTermRetentionPolicyData.Serialization.cs index a2651a6a8823..96e5bab1826a 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/LongTermRetentionPolicyData.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/LongTermRetentionPolicyData.Serialization.cs @@ -11,7 +11,6 @@ using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Models; -using Azure.ResourceManager.Sql.Models; namespace Azure.ResourceManager.Sql { @@ -50,16 +49,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); - if (Optional.IsDefined(MakeBackupsImmutable)) - { - writer.WritePropertyName("makeBackupsImmutable"u8); - writer.WriteBooleanValue(MakeBackupsImmutable.Value); - } - if (Optional.IsDefined(BackupStorageAccessTier)) - { - writer.WritePropertyName("backupStorageAccessTier"u8); - writer.WriteStringValue(BackupStorageAccessTier.Value.ToString()); - } if (Optional.IsDefined(WeeklyRetention)) { writer.WritePropertyName("weeklyRetention"u8); @@ -123,8 +112,6 @@ internal static LongTermRetentionPolicyData DeserializeLongTermRetentionPolicyDa string name = default; ResourceType type = default; Optional systemData = default; - Optional makeBackupsImmutable = default; - Optional backupStorageAccessTier = default; Optional weeklyRetention = default; Optional monthlyRetention = default; Optional yearlyRetention = default; @@ -166,24 +153,6 @@ internal static LongTermRetentionPolicyData DeserializeLongTermRetentionPolicyDa } foreach (var property0 in property.Value.EnumerateObject()) { - if (property0.NameEquals("makeBackupsImmutable"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - makeBackupsImmutable = property0.Value.GetBoolean(); - continue; - } - if (property0.NameEquals("backupStorageAccessTier"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - backupStorageAccessTier = new SqlBackupStorageAccessTier(property0.Value.GetString()); - continue; - } if (property0.NameEquals("weeklyRetention"u8)) { weeklyRetention = property0.Value.GetString(); @@ -217,7 +186,7 @@ internal static LongTermRetentionPolicyData DeserializeLongTermRetentionPolicyDa } } serializedAdditionalRawData = additionalPropertiesDictionary; - return new LongTermRetentionPolicyData(id, name, type, systemData.Value, Optional.ToNullable(makeBackupsImmutable), Optional.ToNullable(backupStorageAccessTier), weeklyRetention.Value, monthlyRetention.Value, yearlyRetention.Value, Optional.ToNullable(weekOfYear), serializedAdditionalRawData); + return new LongTermRetentionPolicyData(id, name, type, systemData.Value, weeklyRetention.Value, monthlyRetention.Value, yearlyRetention.Value, Optional.ToNullable(weekOfYear), serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlMinimalTlsVersion.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlMinimalTlsVersion.cs deleted file mode 100644 index 9ce70ca9a9d1..000000000000 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlMinimalTlsVersion.cs +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.Sql.Models -{ - /// Minimal TLS version. Allowed values: 'None', 1.0', '1.1', '1.2', '1.3'. - public readonly partial struct SqlMinimalTlsVersion : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public SqlMinimalTlsVersion(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string TlsNoneValue = "None"; - private const string Tls1_0Value = "1.0"; - private const string Tls1_1Value = "1.1"; - private const string Tls1_2Value = "1.2"; - private const string Tls1_3Value = "1.3"; - /// Determines if two values are the same. - public static bool operator ==(SqlMinimalTlsVersion left, SqlMinimalTlsVersion right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(SqlMinimalTlsVersion left, SqlMinimalTlsVersion right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator SqlMinimalTlsVersion(string value) => new SqlMinimalTlsVersion(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is SqlMinimalTlsVersion other && Equals(other); - /// - public bool Equals(SqlMinimalTlsVersion other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlServerData.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlServerData.Serialization.cs index d6b4413d5eb3..df10bbe083b3 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlServerData.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlServerData.Serialization.cs @@ -112,7 +112,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt if (Optional.IsDefined(MinTlsVersion)) { writer.WritePropertyName("minimalTlsVersion"u8); - writer.WriteStringValue(MinTlsVersion.Value.ToString()); + writer.WriteStringValue(MinTlsVersion); } if (Optional.IsDefined(PublicNetworkAccess)) { @@ -212,7 +212,7 @@ internal static SqlServerData DeserializeSqlServerData(JsonElement element, Mode Optional state = default; Optional fullyQualifiedDomainName = default; Optional> privateEndpointConnections = default; - Optional minimalTlsVersion = default; + Optional minimalTlsVersion = default; Optional publicNetworkAccess = default; Optional workspaceFeature = default; Optional primaryUserAssignedIdentityId = default; @@ -334,11 +334,7 @@ internal static SqlServerData DeserializeSqlServerData(JsonElement element, Mode } if (property0.NameEquals("minimalTlsVersion"u8)) { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - minimalTlsVersion = new SqlMinimalTlsVersion(property0.Value.GetString()); + minimalTlsVersion = property0.Value.GetString(); continue; } if (property0.NameEquals("publicNetworkAccess"u8)) @@ -431,7 +427,7 @@ internal static SqlServerData DeserializeSqlServerData(JsonElement element, Mode } } serializedAdditionalRawData = additionalPropertiesDictionary; - return new SqlServerData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, identity, kind.Value, administratorLogin.Value, administratorLoginPassword.Value, version.Value, state.Value, fullyQualifiedDomainName.Value, Optional.ToList(privateEndpointConnections), Optional.ToNullable(minimalTlsVersion), Optional.ToNullable(publicNetworkAccess), Optional.ToNullable(workspaceFeature), primaryUserAssignedIdentityId.Value, Optional.ToNullable(federatedClientId), keyId.Value, administrators.Value, Optional.ToNullable(restrictOutboundNetworkAccess), Optional.ToNullable(isIPv6Enabled), Optional.ToNullable(externalGovernanceStatus), serializedAdditionalRawData); + return new SqlServerData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, identity, kind.Value, administratorLogin.Value, administratorLoginPassword.Value, version.Value, state.Value, fullyQualifiedDomainName.Value, Optional.ToList(privateEndpointConnections), minimalTlsVersion.Value, Optional.ToNullable(publicNetworkAccess), Optional.ToNullable(workspaceFeature), primaryUserAssignedIdentityId.Value, Optional.ToNullable(federatedClientId), keyId.Value, administrators.Value, Optional.ToNullable(restrictOutboundNetworkAccess), Optional.ToNullable(isIPv6Enabled), Optional.ToNullable(externalGovernanceStatus), serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlServerPatch.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlServerPatch.Serialization.cs index 8914a6f113b5..4241664b2ae5 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlServerPatch.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlServerPatch.Serialization.cs @@ -84,7 +84,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp if (Optional.IsDefined(MinTlsVersion)) { writer.WritePropertyName("minimalTlsVersion"u8); - writer.WriteStringValue(MinTlsVersion.Value.ToString()); + writer.WriteStringValue(MinTlsVersion); } if (Optional.IsDefined(PublicNetworkAccess)) { @@ -178,7 +178,7 @@ internal static SqlServerPatch DeserializeSqlServerPatch(JsonElement element, Mo Optional state = default; Optional fullyQualifiedDomainName = default; Optional> privateEndpointConnections = default; - Optional minimalTlsVersion = default; + Optional minimalTlsVersion = default; Optional publicNetworkAccess = default; Optional workspaceFeature = default; Optional primaryUserAssignedIdentityId = default; @@ -266,11 +266,7 @@ internal static SqlServerPatch DeserializeSqlServerPatch(JsonElement element, Mo } if (property0.NameEquals("minimalTlsVersion"u8)) { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - minimalTlsVersion = new SqlMinimalTlsVersion(property0.Value.GetString()); + minimalTlsVersion = property0.Value.GetString(); continue; } if (property0.NameEquals("publicNetworkAccess"u8)) @@ -363,7 +359,7 @@ internal static SqlServerPatch DeserializeSqlServerPatch(JsonElement element, Mo } } serializedAdditionalRawData = additionalPropertiesDictionary; - return new SqlServerPatch(identity, Optional.ToDictionary(tags), administratorLogin.Value, administratorLoginPassword.Value, version.Value, state.Value, fullyQualifiedDomainName.Value, Optional.ToList(privateEndpointConnections), Optional.ToNullable(minimalTlsVersion), Optional.ToNullable(publicNetworkAccess), Optional.ToNullable(workspaceFeature), primaryUserAssignedIdentityId.Value, Optional.ToNullable(federatedClientId), keyId.Value, administrators.Value, Optional.ToNullable(restrictOutboundNetworkAccess), Optional.ToNullable(isIPv6Enabled), Optional.ToNullable(externalGovernanceStatus), serializedAdditionalRawData); + return new SqlServerPatch(identity, Optional.ToDictionary(tags), administratorLogin.Value, administratorLoginPassword.Value, version.Value, state.Value, fullyQualifiedDomainName.Value, Optional.ToList(privateEndpointConnections), minimalTlsVersion.Value, Optional.ToNullable(publicNetworkAccess), Optional.ToNullable(workspaceFeature), primaryUserAssignedIdentityId.Value, Optional.ToNullable(federatedClientId), keyId.Value, administrators.Value, Optional.ToNullable(restrictOutboundNetworkAccess), Optional.ToNullable(isIPv6Enabled), Optional.ToNullable(externalGovernanceStatus), serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlServerPatch.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlServerPatch.cs index 8de5d0d4e4eb..2e890c50b9b9 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlServerPatch.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlServerPatch.cs @@ -63,7 +63,7 @@ public SqlServerPatch() /// The state of the server. /// The fully qualified domain name of the server. /// List of private endpoint connections on a server. - /// Minimal TLS version. Allowed values: 'None', 1.0', '1.1', '1.2', '1.3'. + /// Minimal TLS version. Allowed values: 'None', '1.0', '1.1', '1.2'. /// Whether or not public endpoint access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled' or 'SecuredByPerimeter'. /// Whether or not existing server has a workspace created and if it allows connection from workspace. /// The resource id of a user assigned identity to be used by default. @@ -74,7 +74,7 @@ public SqlServerPatch() /// Whether or not to enable IPv6 support for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. /// Status of external governance. /// Keeps track of any properties unknown to the library. - internal SqlServerPatch(ManagedServiceIdentity identity, IDictionary tags, string administratorLogin, string administratorLoginPassword, string version, string state, string fullyQualifiedDomainName, IReadOnlyList privateEndpointConnections, SqlMinimalTlsVersion? minTlsVersion, ServerNetworkAccessFlag? publicNetworkAccess, ServerWorkspaceFeature? workspaceFeature, ResourceIdentifier primaryUserAssignedIdentityId, Guid? federatedClientId, Uri keyId, ServerExternalAdministrator administrators, ServerNetworkAccessFlag? restrictOutboundNetworkAccess, ServerNetworkAccessFlag? isIPv6Enabled, ExternalGovernanceStatus? externalGovernanceStatus, IDictionary serializedAdditionalRawData) + internal SqlServerPatch(ManagedServiceIdentity identity, IDictionary tags, string administratorLogin, string administratorLoginPassword, string version, string state, string fullyQualifiedDomainName, IReadOnlyList privateEndpointConnections, string minTlsVersion, ServerNetworkAccessFlag? publicNetworkAccess, ServerWorkspaceFeature? workspaceFeature, ResourceIdentifier primaryUserAssignedIdentityId, Guid? federatedClientId, Uri keyId, ServerExternalAdministrator administrators, ServerNetworkAccessFlag? restrictOutboundNetworkAccess, ServerNetworkAccessFlag? isIPv6Enabled, ExternalGovernanceStatus? externalGovernanceStatus, IDictionary serializedAdditionalRawData) { Identity = identity; Tags = tags; @@ -113,8 +113,8 @@ internal SqlServerPatch(ManagedServiceIdentity identity, IDictionary List of private endpoint connections on a server. public IReadOnlyList PrivateEndpointConnections { get; } - /// Minimal TLS version. Allowed values: 'None', 1.0', '1.1', '1.2', '1.3'. - public SqlMinimalTlsVersion? MinTlsVersion { get; set; } + /// Minimal TLS version. Allowed values: 'None', '1.0', '1.1', '1.2'. + public string MinTlsVersion { get; set; } /// Whether or not public endpoint access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled' or 'SecuredByPerimeter'. public ServerNetworkAccessFlag? PublicNetworkAccess { get; set; } /// Whether or not existing server has a workspace created and if it allows connection from workspace. diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/LongTermRetentionBackupsRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/LongTermRetentionBackupsRestOperations.cs index ce1857e91cbb..43e2462b62fa 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/LongTermRetentionBackupsRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/LongTermRetentionBackupsRestOperations.cs @@ -415,7 +415,6 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, AzureLocation lo uri.AppendPath(backupName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; - request.Headers.Add("Accept", "application/json"); _userAgent.Apply(message); return message; } @@ -1147,7 +1146,6 @@ internal HttpMessage CreateDeleteByResourceGroupRequest(string subscriptionId, s uri.AppendPath(backupName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; - request.Headers.Add("Accept", "application/json"); _userAgent.Apply(message); return message; } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/LongTermRetentionPoliciesRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/LongTermRetentionPoliciesRestOperations.cs index f4e2fbd86697..e2753c3cdd96 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/LongTermRetentionPoliciesRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/LongTermRetentionPoliciesRestOperations.cs @@ -242,7 +242,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r return message; } - /// Set or update a database's long term retention policy. + /// Sets a database's long term retention policy. /// The subscription ID that identifies an Azure subscription. /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. /// The name of the server. @@ -272,7 +272,7 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re } } - /// Set or update a database's long term retention policy. + /// Sets a database's long term retention policy. /// The subscription ID that identifies an Azure subscription. /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. /// The name of the server. diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ServersRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ServersRestOperations.cs index 0c1e7fdc2188..d57541dfcf16 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ServersRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ServersRestOperations.cs @@ -33,7 +33,7 @@ public ServersRestOperations(HttpPipeline pipeline, string applicationId, Uri en { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-05-01-preview"; + _apiVersion = apiVersion ?? "2023-02-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -447,7 +447,6 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG uri.AppendPath(serverName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; - request.Headers.Add("Accept", "application/json"); _userAgent.Apply(message); return message; } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerCollection.cs index 9e2c7540f94d..be685ce95552 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerCollection.cs @@ -67,7 +67,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-05-01-preview + /// 2023-02-01-preview /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> CreateOrUpdateAsync(W /// /// /// Default Api Version - /// 2023-05-01-preview + /// 2023-02-01-preview /// /// /// Resource @@ -165,7 +165,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUnti /// /// /// Default Api Version - /// 2023-05-01-preview + /// 2023-02-01-preview /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync(string serverNam /// /// /// Default Api Version - /// 2023-05-01-preview + /// 2023-02-01-preview /// /// /// Resource @@ -257,7 +257,7 @@ public virtual Response Get(string serverName, string expand /// /// /// Default Api Version - /// 2023-05-01-preview + /// 2023-02-01-preview /// /// /// Resource @@ -288,7 +288,7 @@ public virtual AsyncPageable GetAllAsync(string expand = null /// /// /// Default Api Version - /// 2023-05-01-preview + /// 2023-02-01-preview /// /// /// Resource @@ -319,7 +319,7 @@ public virtual Pageable GetAll(string expand = null, Cancella /// /// /// Default Api Version - /// 2023-05-01-preview + /// 2023-02-01-preview /// /// /// Resource @@ -363,7 +363,7 @@ public virtual async Task> ExistsAsync(string serverName, string /// /// /// Default Api Version - /// 2023-05-01-preview + /// 2023-02-01-preview /// /// /// Resource @@ -407,7 +407,7 @@ public virtual Response Exists(string serverName, string expand = null, Ca /// /// /// Default Api Version - /// 2023-05-01-preview + /// 2023-02-01-preview /// /// /// Resource @@ -453,7 +453,7 @@ public virtual async Task> GetIfExistsAsync( /// /// /// Default Api Version - /// 2023-05-01-preview + /// 2023-02-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerData.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerData.cs index 973a0ced5f2a..a8bddba05e4b 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerData.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerData.cs @@ -73,7 +73,7 @@ public SqlServerData(AzureLocation location) : base(location) /// The state of the server. /// The fully qualified domain name of the server. /// List of private endpoint connections on a server. - /// Minimal TLS version. Allowed values: 'None', 1.0', '1.1', '1.2', '1.3'. + /// Minimal TLS version. Allowed values: 'None', '1.0', '1.1', '1.2'. /// Whether or not public endpoint access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled' or 'SecuredByPerimeter'. /// Whether or not existing server has a workspace created and if it allows connection from workspace. /// The resource id of a user assigned identity to be used by default. @@ -84,7 +84,7 @@ public SqlServerData(AzureLocation location) : base(location) /// Whether or not to enable IPv6 support for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. /// Status of external governance. /// Keeps track of any properties unknown to the library. - internal SqlServerData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, string kind, string administratorLogin, string administratorLoginPassword, string version, string state, string fullyQualifiedDomainName, IReadOnlyList privateEndpointConnections, SqlMinimalTlsVersion? minTlsVersion, ServerNetworkAccessFlag? publicNetworkAccess, ServerWorkspaceFeature? workspaceFeature, ResourceIdentifier primaryUserAssignedIdentityId, Guid? federatedClientId, Uri keyId, ServerExternalAdministrator administrators, ServerNetworkAccessFlag? restrictOutboundNetworkAccess, ServerNetworkAccessFlag? isIPv6Enabled, ExternalGovernanceStatus? externalGovernanceStatus, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + internal SqlServerData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, string kind, string administratorLogin, string administratorLoginPassword, string version, string state, string fullyQualifiedDomainName, IReadOnlyList privateEndpointConnections, string minTlsVersion, ServerNetworkAccessFlag? publicNetworkAccess, ServerWorkspaceFeature? workspaceFeature, ResourceIdentifier primaryUserAssignedIdentityId, Guid? federatedClientId, Uri keyId, ServerExternalAdministrator administrators, ServerNetworkAccessFlag? restrictOutboundNetworkAccess, ServerNetworkAccessFlag? isIPv6Enabled, ExternalGovernanceStatus? externalGovernanceStatus, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { Identity = identity; Kind = kind; @@ -128,8 +128,8 @@ internal SqlServerData() public string FullyQualifiedDomainName { get; } /// List of private endpoint connections on a server. public IReadOnlyList PrivateEndpointConnections { get; } - /// Minimal TLS version. Allowed values: 'None', 1.0', '1.1', '1.2', '1.3'. - public SqlMinimalTlsVersion? MinTlsVersion { get; set; } + /// Minimal TLS version. Allowed values: 'None', '1.0', '1.1', '1.2'. + public string MinTlsVersion { get; set; } /// Whether or not public endpoint access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled' or 'SecuredByPerimeter'. public ServerNetworkAccessFlag? PublicNetworkAccess { get; set; } /// Whether or not existing server has a workspace created and if it allows connection from workspace. diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerResource.cs index 2ad356c79c65..8ffb3fe749ca 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerResource.cs @@ -2108,7 +2108,7 @@ public virtual Response GetFailoverGroup(string failoverG /// /// /// Default Api Version - /// 2023-05-01-preview + /// 2023-02-01-preview /// /// /// Resource @@ -2149,7 +2149,7 @@ public virtual async Task> GetAsync(string expand = /// /// /// Default Api Version - /// 2023-05-01-preview + /// 2023-02-01-preview /// /// /// Resource @@ -2190,7 +2190,7 @@ public virtual Response Get(string expand = null, Cancellatio /// /// /// Default Api Version - /// 2023-05-01-preview + /// 2023-02-01-preview /// /// /// Resource @@ -2232,7 +2232,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-05-01-preview + /// 2023-02-01-preview /// /// /// Resource @@ -2274,7 +2274,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-05-01-preview + /// 2023-02-01-preview /// /// /// Resource @@ -2320,7 +2320,7 @@ public virtual async Task> UpdateAsync(WaitUntil /// /// /// Default Api Version - /// 2023-05-01-preview + /// 2023-02-01-preview /// /// /// Resource @@ -2672,7 +2672,7 @@ public virtual Pageable GetInaccessibleDatabases(Cancellati /// /// /// Default Api Version - /// 2023-05-01-preview + /// 2023-02-01-preview /// /// /// Resource @@ -2718,7 +2718,7 @@ public virtual async Task> ImportDatab /// /// /// Default Api Version - /// 2023-05-01-preview + /// 2023-02-01-preview /// /// /// Resource @@ -2764,7 +2764,7 @@ public virtual ArmOperation ImportDatabase(WaitUnti /// /// /// Default Api Version - /// 2023-05-01-preview + /// 2023-02-01-preview /// /// /// Resource @@ -2806,7 +2806,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-05-01-preview + /// 2023-02-01-preview /// /// /// Resource @@ -2848,7 +2848,7 @@ public virtual ArmOperation Refr /// /// /// Default Api Version - /// 2023-05-01-preview + /// 2023-02-01-preview /// /// /// Resource @@ -2910,7 +2910,7 @@ public virtual async Task> AddTagAsync(string key, s /// /// /// Default Api Version - /// 2023-05-01-preview + /// 2023-02-01-preview /// /// /// Resource @@ -2972,7 +2972,7 @@ public virtual Response AddTag(string key, string value, Canc /// /// /// Default Api Version - /// 2023-05-01-preview + /// 2023-02-01-preview /// /// /// Resource @@ -3029,7 +3029,7 @@ public virtual async Task> SetTagsAsync(IDictionary< /// /// /// Default Api Version - /// 2023-05-01-preview + /// 2023-02-01-preview /// /// /// Resource @@ -3086,7 +3086,7 @@ public virtual Response SetTags(IDictionary t /// /// /// Default Api Version - /// 2023-05-01-preview + /// 2023-02-01-preview /// /// /// Resource @@ -3146,7 +3146,7 @@ public virtual async Task> RemoveTagAsync(string key /// /// /// Default Api Version - /// 2023-05-01-preview + /// 2023-02-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/autorest.md b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/autorest.md index c455008e7265..cb0486866a63 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/autorest.md +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/autorest.md @@ -5,7 +5,7 @@ Run `dotnet build /t:GenerateCode` to generate code. ``` yaml azure-arm: true tag: package-composite-v5 -require: https://github.com/Azure/azure-rest-api-specs/blob/e7e476ba9cd5dcaacb4b344a0ca9677ba731686b/specification/sql/resource-manager/readme.md +require: /mnt/vss/_work/1/s/azure-rest-api-specs/specification/sql/resource-manager/readme.md namespace: Azure.ResourceManager.Sql output-folder: $(this-folder)/Generated clear-output-folder: true