diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/CHANGELOG.md b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/CHANGELOG.md
index 3c3705fa8e0cc..5eb34cc2f6241 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/CHANGELOG.md
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/CHANGELOG.md
@@ -1,6 +1,8 @@
# Release History
-## 1.0.0-beta.3 (Unreleased)
+## 1.0.0-beta.1 (2022-08-05)
+
+- Azure Resource Manager SqlVirtualMachine client library for Java. This package contains Microsoft Azure SDK for SqlVirtualMachine Management SDK. The SQL virtual machine management API provides a RESTful set of web APIs that interact with Azure Compute, Network & Storage services to manage your SQL Server virtual machine. The API enables users to create, delete and retrieve a SQL virtual machine, SQL virtual machine group or availability group listener. Package tag package-2022-02. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
### Features Added
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/README.md b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/README.md
index 5de0f82cc7c92..4597c96d55a08 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/README.md
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/README.md
@@ -2,7 +2,7 @@
Azure Resource Manager SqlVirtualMachine client library for Java.
-This package contains Microsoft Azure SDK for SqlVirtualMachine Management SDK. The SQL virtual machine management API provides a RESTful set of web APIs that interact with Azure Compute, Network & Storage services to manage your SQL Server virtual machine. The API enables users to create, delete and retrieve a SQL virtual machine, SQL virtual machine group or availability group listener. Package tag package-preview-2021-11. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
+This package contains Microsoft Azure SDK for SqlVirtualMachine Management SDK. The SQL virtual machine management API provides a RESTful set of web APIs that interact with Azure Compute, Network & Storage services to manage your SQL Server virtual machine. The API enables users to create, delete and retrieve a SQL virtual machine, SQL virtual machine group or availability group listener. Package tag package-2022-02. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
## We'd love to hear your feedback
@@ -32,7 +32,7 @@ Various documentation is available to help you get started
com.azure.resourcemanagerazure-resourcemanager-sqlvirtualmachine
- 1.0.0-beta.2
+ 1.0.0-beta.3
```
[//]: # ({x-version-update-end})
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/SAMPLE.md b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/SAMPLE.md
index 633760ff8f4e6..fa595751b6bf4 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/SAMPLE.md
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/SAMPLE.md
@@ -36,21 +36,24 @@
```java
import com.azure.resourcemanager.sqlvirtualmachine.models.LoadBalancerConfiguration;
+import com.azure.resourcemanager.sqlvirtualmachine.models.MultiSubnetIpConfiguration;
import com.azure.resourcemanager.sqlvirtualmachine.models.PrivateIpAddress;
import java.util.Arrays;
/** Samples for AvailabilityGroupListeners CreateOrUpdate. */
public final class AvailabilityGroupListenersCreateOrUpdateSamples {
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/CreateOrUpdateAvailabilityGroupListener.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/examples/CreateOrUpdateAvailabilityGroupListener.json
*/
/**
- * Sample code: Creates or updates an availability group listener.
+ * Sample code: Creates or updates an availability group listener using load balancer. This is used for VMs present
+ * in single subnet.
*
* @param manager Entry point to SqlVirtualMachineManager.
*/
- public static void createsOrUpdatesAnAvailabilityGroupListener(
- com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager manager) {
+ public static void
+ createsOrUpdatesAnAvailabilityGroupListenerUsingLoadBalancerThisIsUsedForVMsPresentInSingleSubnet(
+ com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager manager) {
manager
.availabilityGroupListeners()
.define("agl-test")
@@ -76,6 +79,44 @@ public final class AvailabilityGroupListenersCreateOrUpdateSamples {
.withPort(1433)
.create();
}
+
+ /*
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/examples/CreateOrUpdateAvailabilityGroupListenerWithMultiSubnet.json
+ */
+ /**
+ * Sample code: Creates or updates an availability group listener. This is used for VMs present in multi subnet.
+ *
+ * @param manager Entry point to SqlVirtualMachineManager.
+ */
+ public static void createsOrUpdatesAnAvailabilityGroupListenerThisIsUsedForVMsPresentInMultiSubnet(
+ com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager manager) {
+ manager
+ .availabilityGroupListeners()
+ .define("agl-test")
+ .withExistingSqlVirtualMachineGroup("testrg", "testvmgroup")
+ .withAvailabilityGroupName("ag-test")
+ .withMultiSubnetIpConfigurations(
+ Arrays
+ .asList(
+ new MultiSubnetIpConfiguration()
+ .withPrivateIpAddress(
+ new PrivateIpAddress()
+ .withIpAddress("10.0.0.112")
+ .withSubnetResourceId(
+ "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/default"))
+ .withSqlVirtualMachineInstance(
+ "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm2"),
+ new MultiSubnetIpConfiguration()
+ .withPrivateIpAddress(
+ new PrivateIpAddress()
+ .withIpAddress("10.0.1.112")
+ .withSubnetResourceId(
+ "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/alternate"))
+ .withSqlVirtualMachineInstance(
+ "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm1")))
+ .withPort(1433)
+ .create();
+ }
}
```
@@ -87,7 +128,7 @@ import com.azure.core.util.Context;
/** Samples for AvailabilityGroupListeners Delete. */
public final class AvailabilityGroupListenersDeleteSamples {
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/DeleteAvailabilityGroupListener.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/examples/DeleteAvailabilityGroupListener.json
*/
/**
* Sample code: Deletes an availability group listener.
@@ -109,7 +150,7 @@ import com.azure.core.util.Context;
/** Samples for AvailabilityGroupListeners Get. */
public final class AvailabilityGroupListenersGetSamples {
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/GetAvailabilityGroupListener.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/examples/GetAvailabilityGroupListener.json
*/
/**
* Sample code: Gets an availability group listener.
@@ -131,7 +172,7 @@ import com.azure.core.util.Context;
/** Samples for AvailabilityGroupListeners ListByGroup. */
public final class AvailabilityGroupListenersListByGroupSamples {
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/ListByGroupAvailabilityGroupListener.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/examples/ListByGroupAvailabilityGroupListener.json
*/
/**
* Sample code: Lists all availability group listeners in a SQL virtual machine group.
@@ -153,7 +194,7 @@ import com.azure.core.util.Context;
/** Samples for Operations List. */
public final class OperationsListSamples {
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/ListOperation.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/examples/ListOperation.json
*/
/**
* Sample code: Lists all of the available SQL Virtual Machine Rest API operations.
@@ -170,6 +211,7 @@ public final class OperationsListSamples {
### SqlVirtualMachineGroups_CreateOrUpdate
```java
+import com.azure.resourcemanager.sqlvirtualmachine.models.ClusterSubnetType;
import com.azure.resourcemanager.sqlvirtualmachine.models.SqlVmGroupImageSku;
import com.azure.resourcemanager.sqlvirtualmachine.models.WsfcDomainProfile;
import java.util.HashMap;
@@ -178,7 +220,7 @@ import java.util.Map;
/** Samples for SqlVirtualMachineGroups CreateOrUpdate. */
public final class SqlVirtualMachineGroupsCreateOrUpdateSamples {
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/CreateOrUpdateSqlVirtualMachineGroup.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/examples/CreateOrUpdateSqlVirtualMachineGroup.json
*/
/**
* Sample code: Creates or updates a SQL virtual machine group.
@@ -203,7 +245,8 @@ public final class SqlVirtualMachineGroupsCreateOrUpdateSamples {
.withClusterOperatorAccount("testrp@testdomain.com")
.withSqlServiceAccount("sqlservice@testdomain.com")
.withStorageAccountUrl("https://storgact.blob.core.windows.net/")
- .withStorageAccountPrimaryKey(""))
+ .withStorageAccountPrimaryKey("")
+ .withClusterSubnetType(ClusterSubnetType.MULTI_SUBNET))
.create();
}
@@ -228,7 +271,7 @@ import com.azure.core.util.Context;
/** Samples for SqlVirtualMachineGroups Delete. */
public final class SqlVirtualMachineGroupsDeleteSamples {
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/DeleteSqlVirtualMachineGroup.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/examples/DeleteSqlVirtualMachineGroup.json
*/
/**
* Sample code: Deletes a SQL virtual machine group.
@@ -250,7 +293,7 @@ import com.azure.core.util.Context;
/** Samples for SqlVirtualMachineGroups GetByResourceGroup. */
public final class SqlVirtualMachineGroupsGetByResourceGroupSamples {
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/GetSqlVirtualMachineGroup.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/examples/GetSqlVirtualMachineGroup.json
*/
/**
* Sample code: Gets a SQL virtual machine group.
@@ -272,7 +315,7 @@ import com.azure.core.util.Context;
/** Samples for SqlVirtualMachineGroups List. */
public final class SqlVirtualMachineGroupsListSamples {
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/ListSubscriptionSqlVirtualMachineGroup.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/examples/ListSubscriptionSqlVirtualMachineGroup.json
*/
/**
* Sample code: Gets all SQL virtual machine groups in a subscription.
@@ -294,7 +337,7 @@ import com.azure.core.util.Context;
/** Samples for SqlVirtualMachineGroups ListByResourceGroup. */
public final class SqlVirtualMachineGroupsListByResourceGroupSamples {
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/ListByResourceGroupSqlVirtualMachineGroup.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/examples/ListByResourceGroupSqlVirtualMachineGroup.json
*/
/**
* Sample code: Gets all SQL virtual machine groups in a resource group.
@@ -319,7 +362,7 @@ import java.util.Map;
/** Samples for SqlVirtualMachineGroups Update. */
public final class SqlVirtualMachineGroupsUpdateSamples {
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/UpdateSqlVirtualMachineGroup.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/examples/UpdateSqlVirtualMachineGroup.json
*/
/**
* Sample code: Updates a SQL virtual machine group tags.
@@ -353,13 +396,14 @@ public final class SqlVirtualMachineGroupsUpdateSamples {
```java
import com.azure.resourcemanager.sqlvirtualmachine.models.AdditionalFeaturesServerConfigurations;
+import com.azure.resourcemanager.sqlvirtualmachine.models.AssessmentDayOfWeek;
import com.azure.resourcemanager.sqlvirtualmachine.models.AssessmentSettings;
+import com.azure.resourcemanager.sqlvirtualmachine.models.AutoBackupDaysOfWeek;
import com.azure.resourcemanager.sqlvirtualmachine.models.AutoBackupSettings;
import com.azure.resourcemanager.sqlvirtualmachine.models.AutoPatchingSettings;
import com.azure.resourcemanager.sqlvirtualmachine.models.BackupScheduleType;
import com.azure.resourcemanager.sqlvirtualmachine.models.ConnectivityType;
import com.azure.resourcemanager.sqlvirtualmachine.models.DayOfWeek;
-import com.azure.resourcemanager.sqlvirtualmachine.models.DaysOfWeek;
import com.azure.resourcemanager.sqlvirtualmachine.models.DiskConfigurationType;
import com.azure.resourcemanager.sqlvirtualmachine.models.FullBackupFrequencyType;
import com.azure.resourcemanager.sqlvirtualmachine.models.KeyVaultCredentialSettings;
@@ -383,7 +427,7 @@ import java.util.Arrays;
/** Samples for SqlVirtualMachines CreateOrUpdate. */
public final class SqlVirtualMachinesCreateOrUpdateSamples {
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/CreateOrUpdateSqlVirtualMachineStorageConfigurationEXTEND.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/examples/CreateOrUpdateSqlVirtualMachineStorageConfigurationEXTEND.json
*/
/**
* Sample code: Creates or updates a SQL virtual machine for Storage Configuration Settings to EXTEND Data, Log or
@@ -409,7 +453,7 @@ public final class SqlVirtualMachinesCreateOrUpdateSamples {
}
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/CreateOrUpdateVirtualMachineWithVMGroup.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/examples/CreateOrUpdateVirtualMachineWithVMGroup.json
*/
/**
* Sample code: Creates or updates a SQL virtual machine and joins it to a SQL virtual machine group.
@@ -430,11 +474,12 @@ public final class SqlVirtualMachinesCreateOrUpdateSamples {
.withClusterBootstrapAccountPassword("")
.withClusterOperatorAccountPassword("")
.withSqlServiceAccountPassword(""))
+ .withWsfcStaticIp("10.0.0.7")
.create();
}
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/CreateOrUpdateSqlVirtualMachineAutomatedBackupWeekly.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/examples/CreateOrUpdateSqlVirtualMachineAutomatedBackupWeekly.json
*/
/**
* Sample code: Creates or updates a SQL virtual machine for Automated Back up Settings with Weekly and Days of the
@@ -473,7 +518,7 @@ public final class SqlVirtualMachinesCreateOrUpdateSamples {
.withBackupSystemDbs(true)
.withBackupScheduleType(BackupScheduleType.MANUAL)
.withFullBackupFrequency(FullBackupFrequencyType.WEEKLY)
- .withDaysOfWeek(Arrays.asList(DaysOfWeek.MONDAY, DaysOfWeek.FRIDAY))
+ .withDaysOfWeek(Arrays.asList(AutoBackupDaysOfWeek.MONDAY, AutoBackupDaysOfWeek.FRIDAY))
.withFullBackupStartTime(6)
.withFullBackupWindowHours(11)
.withLogBackupFrequency(10))
@@ -499,7 +544,7 @@ public final class SqlVirtualMachinesCreateOrUpdateSamples {
}
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/CreateOrUpdateSqlVirtualMachineStorageConfigurationNEW.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/examples/CreateOrUpdateSqlVirtualMachineStorageConfigurationNEW.json
*/
/**
* Sample code: Creates or updates a SQL virtual machine for Storage Configuration Settings to NEW Data, Log and
@@ -538,7 +583,7 @@ public final class SqlVirtualMachinesCreateOrUpdateSamples {
}
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/CreateOrUpdateSqlVirtualMachineMAX.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/examples/CreateOrUpdateSqlVirtualMachineMAX.json
*/
/**
* Sample code: Creates or updates a SQL virtual machine with max parameters.
@@ -602,7 +647,9 @@ public final class SqlVirtualMachinesCreateOrUpdateSamples {
.withMaxDop(8)
.withIsOptimizeForAdHocWorkloadsEnabled(true)
.withMinServerMemoryMB(0)
- .withMaxServerMemoryMB(128)))
+ .withMaxServerMemoryMB(128)
+ .withIsLpimEnabled(true)
+ .withIsIfiEnabled(true)))
.withAssessmentSettings(
new AssessmentSettings()
.withEnable(true)
@@ -611,13 +658,13 @@ public final class SqlVirtualMachinesCreateOrUpdateSamples {
new Schedule()
.withEnable(true)
.withWeeklyInterval(1)
- .withDayOfWeek(DayOfWeek.SUNDAY)
+ .withDayOfWeek(AssessmentDayOfWeek.SUNDAY)
.withStartTime("23:17")))
.create();
}
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/CreateOrUpdateSqlVirtualMachineMIN.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/examples/CreateOrUpdateSqlVirtualMachineMIN.json
*/
/**
* Sample code: Creates or updates a SQL virtual machine with min parameters.
@@ -646,7 +693,7 @@ import com.azure.core.util.Context;
/** Samples for SqlVirtualMachines Delete. */
public final class SqlVirtualMachinesDeleteSamples {
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/DeleteSqlVirtualMachine.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/examples/DeleteSqlVirtualMachine.json
*/
/**
* Sample code: Deletes a SQL virtual machine.
@@ -668,7 +715,7 @@ import com.azure.core.util.Context;
/** Samples for SqlVirtualMachines GetByResourceGroup. */
public final class SqlVirtualMachinesGetByResourceGroupSamples {
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/GetSqlVirtualMachine.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/examples/GetSqlVirtualMachine.json
*/
/**
* Sample code: Gets a SQL virtual machine.
@@ -690,7 +737,7 @@ import com.azure.core.util.Context;
/** Samples for SqlVirtualMachines List. */
public final class SqlVirtualMachinesListSamples {
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/ListSubscriptionSqlVirtualMachine.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/examples/ListSubscriptionSqlVirtualMachine.json
*/
/**
* Sample code: Gets all SQL virtual machines in a subscription.
@@ -712,7 +759,7 @@ import com.azure.core.util.Context;
/** Samples for SqlVirtualMachines ListByResourceGroup. */
public final class SqlVirtualMachinesListByResourceGroupSamples {
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/ListByResourceGroupSqlVirtualMachine.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/examples/ListByResourceGroupSqlVirtualMachine.json
*/
/**
* Sample code: Gets all SQL virtual machines in a resource group.
@@ -734,7 +781,7 @@ import com.azure.core.util.Context;
/** Samples for SqlVirtualMachines ListBySqlVmGroup. */
public final class SqlVirtualMachinesListBySqlVmGroupSamples {
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/ListBySqlVirtualMachineGroupSqlVirtualMachine.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/examples/ListBySqlVirtualMachineGroupSqlVirtualMachine.json
*/
/**
* Sample code: Gets the list of sql virtual machines in a SQL virtual machine group.
@@ -756,7 +803,7 @@ import com.azure.core.util.Context;
/** Samples for SqlVirtualMachines Redeploy. */
public final class SqlVirtualMachinesRedeploySamples {
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/RedeploySqlVirtualMachine.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/examples/RedeploySqlVirtualMachine.json
*/
/**
* Sample code: Uninstalls and reinstalls the SQL Iaas Extension.
@@ -778,7 +825,7 @@ import com.azure.core.util.Context;
/** Samples for SqlVirtualMachines StartAssessment. */
public final class SqlVirtualMachinesStartAssessmentSamples {
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/StartAssessmentOnSqlVirtualMachine.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/examples/StartAssessmentOnSqlVirtualMachine.json
*/
/**
* Sample code: Starts Assessment on SQL virtual machine.
@@ -803,7 +850,7 @@ import java.util.Map;
/** Samples for SqlVirtualMachines Update. */
public final class SqlVirtualMachinesUpdateSamples {
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/UpdateSqlVirtualMachine.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/examples/UpdateSqlVirtualMachine.json
*/
/**
* Sample code: Updates a SQL virtual machine tags.
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/pom.xml b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/pom.xml
index 63987fb8a1b82..520f5834909c2 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/pom.xml
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/pom.xml
@@ -13,7 +13,7 @@
jarMicrosoft Azure SDK for SqlVirtualMachine Management
- This package contains Microsoft Azure SDK for SqlVirtualMachine Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. The SQL virtual machine management API provides a RESTful set of web APIs that interact with Azure Compute, Network & Storage services to manage your SQL Server virtual machine. The API enables users to create, delete and retrieve a SQL virtual machine, SQL virtual machine group or availability group listener. Package tag package-preview-2021-11.
+ This package contains Microsoft Azure SDK for SqlVirtualMachine Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. The SQL virtual machine management API provides a RESTful set of web APIs that interact with Azure Compute, Network & Storage services to manage your SQL Server virtual machine. The API enables users to create, delete and retrieve a SQL virtual machine, SQL virtual machine group or availability group listener. Package tag package-2022-02.https://github.com/Azure/azure-sdk-for-java
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/SqlVirtualMachineManager.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/SqlVirtualMachineManager.java
index 95f09977ae6b8..244d403d814a3 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/SqlVirtualMachineManager.java
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/SqlVirtualMachineManager.java
@@ -10,11 +10,13 @@
import com.azure.core.http.HttpPipelineBuilder;
import com.azure.core.http.HttpPipelinePosition;
import com.azure.core.http.policy.AddDatePolicy;
+import com.azure.core.http.policy.AddHeadersFromContextPolicy;
import com.azure.core.http.policy.HttpLogOptions;
import com.azure.core.http.policy.HttpLoggingPolicy;
import com.azure.core.http.policy.HttpPipelinePolicy;
import com.azure.core.http.policy.HttpPolicyProviders;
import com.azure.core.http.policy.RequestIdPolicy;
+import com.azure.core.http.policy.RetryOptions;
import com.azure.core.http.policy.RetryPolicy;
import com.azure.core.http.policy.UserAgentPolicy;
import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy;
@@ -80,6 +82,19 @@ public static SqlVirtualMachineManager authenticate(TokenCredential credential,
return configure().authenticate(credential, profile);
}
+ /**
+ * Creates an instance of SqlVirtualMachine service API entry point.
+ *
+ * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential.
+ * @param profile the Azure profile for client.
+ * @return the SqlVirtualMachine service API instance.
+ */
+ public static SqlVirtualMachineManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) {
+ Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
+ Objects.requireNonNull(profile, "'profile' cannot be null.");
+ return new SqlVirtualMachineManager(httpPipeline, profile, null);
+ }
+
/**
* Gets a Configurable instance that can be used to create SqlVirtualMachineManager with optional configuration.
*
@@ -91,13 +106,14 @@ public static Configurable configure() {
/** The Configurable allowing configurations to be set. */
public static final class Configurable {
- private final ClientLogger logger = new ClientLogger(Configurable.class);
+ private static final ClientLogger LOGGER = new ClientLogger(Configurable.class);
private HttpClient httpClient;
private HttpLogOptions httpLogOptions;
private final List policies = new ArrayList<>();
private final List scopes = new ArrayList<>();
private RetryPolicy retryPolicy;
+ private RetryOptions retryOptions;
private Duration defaultPollInterval;
private Configurable() {
@@ -158,6 +174,19 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
return this;
}
+ /**
+ * Sets the retry options for the HTTP pipeline retry policy.
+ *
+ *
This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}.
+ *
+ * @param retryOptions the retry options for the HTTP pipeline retry policy.
+ * @return the configurable object itself.
+ */
+ public Configurable withRetryOptions(RetryOptions retryOptions) {
+ this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' cannot be null.");
+ return this;
+ }
+
/**
* Sets the default poll interval, used when service does not provide "Retry-After" header.
*
@@ -165,9 +194,11 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
* @return the configurable object itself.
*/
public Configurable withDefaultPollInterval(Duration defaultPollInterval) {
- this.defaultPollInterval = Objects.requireNonNull(defaultPollInterval, "'retryPolicy' cannot be null.");
+ this.defaultPollInterval =
+ Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null.");
if (this.defaultPollInterval.isNegative()) {
- throw logger.logExceptionAsError(new IllegalArgumentException("'httpPipeline' cannot be negative"));
+ throw LOGGER
+ .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative"));
}
return this;
}
@@ -189,7 +220,7 @@ public SqlVirtualMachineManager authenticate(TokenCredential credential, AzurePr
.append("-")
.append("com.azure.resourcemanager.sqlvirtualmachine")
.append("/")
- .append("1.0.0-beta.2");
+ .append("1.0.0-beta.1");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder
.append(" (")
@@ -207,10 +238,15 @@ public SqlVirtualMachineManager authenticate(TokenCredential credential, AzurePr
scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default");
}
if (retryPolicy == null) {
- retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
+ if (retryOptions != null) {
+ retryPolicy = new RetryPolicy(retryOptions);
+ } else {
+ retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
+ }
}
List policies = new ArrayList<>();
policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
+ policies.add(new AddHeadersFromContextPolicy());
policies.add(new RequestIdPolicy());
policies
.addAll(
@@ -241,7 +277,11 @@ public SqlVirtualMachineManager authenticate(TokenCredential credential, AzurePr
}
}
- /** @return Resource collection API of AvailabilityGroupListeners. */
+ /**
+ * Gets the resource collection API of AvailabilityGroupListeners. It manages AvailabilityGroupListener.
+ *
+ * @return Resource collection API of AvailabilityGroupListeners.
+ */
public AvailabilityGroupListeners availabilityGroupListeners() {
if (this.availabilityGroupListeners == null) {
this.availabilityGroupListeners =
@@ -250,7 +290,11 @@ public AvailabilityGroupListeners availabilityGroupListeners() {
return availabilityGroupListeners;
}
- /** @return Resource collection API of Operations. */
+ /**
+ * Gets the resource collection API of Operations.
+ *
+ * @return Resource collection API of Operations.
+ */
public Operations operations() {
if (this.operations == null) {
this.operations = new OperationsImpl(clientObject.getOperations(), this);
@@ -258,7 +302,11 @@ public Operations operations() {
return operations;
}
- /** @return Resource collection API of SqlVirtualMachineGroups. */
+ /**
+ * Gets the resource collection API of SqlVirtualMachineGroups. It manages SqlVirtualMachineGroup.
+ *
+ * @return Resource collection API of SqlVirtualMachineGroups.
+ */
public SqlVirtualMachineGroups sqlVirtualMachineGroups() {
if (this.sqlVirtualMachineGroups == null) {
this.sqlVirtualMachineGroups =
@@ -267,7 +315,11 @@ public SqlVirtualMachineGroups sqlVirtualMachineGroups() {
return sqlVirtualMachineGroups;
}
- /** @return Resource collection API of SqlVirtualMachines. */
+ /**
+ * Gets the resource collection API of SqlVirtualMachines. It manages SqlVirtualMachine.
+ *
+ * @return Resource collection API of SqlVirtualMachines.
+ */
public SqlVirtualMachines sqlVirtualMachines() {
if (this.sqlVirtualMachines == null) {
this.sqlVirtualMachines = new SqlVirtualMachinesImpl(clientObject.getSqlVirtualMachines(), this);
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/SqlVirtualMachinesClient.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/SqlVirtualMachinesClient.java
index 4ebf4f68c6e25..ab022b0a4c20e 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/SqlVirtualMachinesClient.java
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/SqlVirtualMachinesClient.java
@@ -70,63 +70,6 @@ PagedIterable listBySqlVmGroup(
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(Context context);
- /**
- * Uninstalls and reinstalls the SQL Iaas Extension.
- *
- * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
- * the Azure Resource Manager API or the portal.
- * @param sqlVirtualMachineName Name of the SQL virtual machine.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link SyncPoller} for polling of long-running operation.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, Void> beginRedeploy(String resourceGroupName, String sqlVirtualMachineName);
-
- /**
- * Uninstalls and reinstalls the SQL Iaas Extension.
- *
- * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
- * the Azure Resource Manager API or the portal.
- * @param sqlVirtualMachineName Name of the SQL virtual machine.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link SyncPoller} for polling of long-running operation.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, Void> beginRedeploy(
- String resourceGroupName, String sqlVirtualMachineName, Context context);
-
- /**
- * Uninstalls and reinstalls the SQL Iaas Extension.
- *
- * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
- * the Azure Resource Manager API or the portal.
- * @param sqlVirtualMachineName Name of the SQL virtual machine.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- void redeploy(String resourceGroupName, String sqlVirtualMachineName);
-
- /**
- * Uninstalls and reinstalls the SQL Iaas Extension.
- *
- * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
- * the Azure Resource Manager API or the portal.
- * @param sqlVirtualMachineName Name of the SQL virtual machine.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- void redeploy(String resourceGroupName, String sqlVirtualMachineName, Context context);
-
/**
* Gets a SQL virtual machine.
*
@@ -374,6 +317,63 @@ SqlVirtualMachineInner update(
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByResourceGroup(String resourceGroupName, Context context);
+ /**
+ * Uninstalls and reinstalls the SQL Iaas Extension.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlVirtualMachineName Name of the SQL virtual machine.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginRedeploy(String resourceGroupName, String sqlVirtualMachineName);
+
+ /**
+ * Uninstalls and reinstalls the SQL Iaas Extension.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlVirtualMachineName Name of the SQL virtual machine.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginRedeploy(
+ String resourceGroupName, String sqlVirtualMachineName, Context context);
+
+ /**
+ * Uninstalls and reinstalls the SQL Iaas Extension.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlVirtualMachineName Name of the SQL virtual machine.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void redeploy(String resourceGroupName, String sqlVirtualMachineName);
+
+ /**
+ * Uninstalls and reinstalls the SQL Iaas Extension.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlVirtualMachineName Name of the SQL virtual machine.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void redeploy(String resourceGroupName, String sqlVirtualMachineName, Context context);
+
/**
* Starts Assessment on SQL virtual machine.
*
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/models/AvailabilityGroupListenerInner.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/models/AvailabilityGroupListenerInner.java
index db15c49ec3190..17075ad61dbef 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/models/AvailabilityGroupListenerInner.java
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/models/AvailabilityGroupListenerInner.java
@@ -7,18 +7,15 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
import com.azure.core.management.SystemData;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.sqlvirtualmachine.models.AgConfiguration;
import com.azure.resourcemanager.sqlvirtualmachine.models.LoadBalancerConfiguration;
-import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.azure.resourcemanager.sqlvirtualmachine.models.MultiSubnetIpConfiguration;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
/** A SQL Server availability group listener. */
@Fluent
public final class AvailabilityGroupListenerInner extends ProxyResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(AvailabilityGroupListenerInner.class);
-
/*
* Resource properties.
*/
@@ -107,6 +104,30 @@ public AvailabilityGroupListenerInner withLoadBalancerConfigurations(
return this;
}
+ /**
+ * Get the multiSubnetIpConfigurations property: List of multi subnet IP configurations for an AG listener.
+ *
+ * @return the multiSubnetIpConfigurations value.
+ */
+ public List multiSubnetIpConfigurations() {
+ return this.innerProperties() == null ? null : this.innerProperties().multiSubnetIpConfigurations();
+ }
+
+ /**
+ * Set the multiSubnetIpConfigurations property: List of multi subnet IP configurations for an AG listener.
+ *
+ * @param multiSubnetIpConfigurations the multiSubnetIpConfigurations value to set.
+ * @return the AvailabilityGroupListenerInner object itself.
+ */
+ public AvailabilityGroupListenerInner withMultiSubnetIpConfigurations(
+ List multiSubnetIpConfigurations) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new AvailabilityGroupListenerProperties();
+ }
+ this.innerProperties().withMultiSubnetIpConfigurations(multiSubnetIpConfigurations);
+ return this;
+ }
+
/**
* Get the createDefaultAvailabilityGroupIfNotExist property: Create a default availability group if it does not
* exist.
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/models/AvailabilityGroupListenerProperties.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/models/AvailabilityGroupListenerProperties.java
index ef8f4ad9abc67..75cbd76bde04a 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/models/AvailabilityGroupListenerProperties.java
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/models/AvailabilityGroupListenerProperties.java
@@ -5,18 +5,15 @@
package com.azure.resourcemanager.sqlvirtualmachine.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.sqlvirtualmachine.models.AgConfiguration;
import com.azure.resourcemanager.sqlvirtualmachine.models.LoadBalancerConfiguration;
-import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.azure.resourcemanager.sqlvirtualmachine.models.MultiSubnetIpConfiguration;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
/** The properties of an availability group listener. */
@Fluent
public final class AvailabilityGroupListenerProperties {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(AvailabilityGroupListenerProperties.class);
-
/*
* Provisioning state to track the async operation status.
*/
@@ -35,6 +32,12 @@ public final class AvailabilityGroupListenerProperties {
@JsonProperty(value = "loadBalancerConfigurations")
private List loadBalancerConfigurations;
+ /*
+ * List of multi subnet IP configurations for an AG listener.
+ */
+ @JsonProperty(value = "multiSubnetIpConfigurations")
+ private List multiSubnetIpConfigurations;
+
/*
* Create a default availability group if it does not exist.
*/
@@ -105,6 +108,27 @@ public AvailabilityGroupListenerProperties withLoadBalancerConfigurations(
return this;
}
+ /**
+ * Get the multiSubnetIpConfigurations property: List of multi subnet IP configurations for an AG listener.
+ *
+ * @return the multiSubnetIpConfigurations value.
+ */
+ public List multiSubnetIpConfigurations() {
+ return this.multiSubnetIpConfigurations;
+ }
+
+ /**
+ * Set the multiSubnetIpConfigurations property: List of multi subnet IP configurations for an AG listener.
+ *
+ * @param multiSubnetIpConfigurations the multiSubnetIpConfigurations value to set.
+ * @return the AvailabilityGroupListenerProperties object itself.
+ */
+ public AvailabilityGroupListenerProperties withMultiSubnetIpConfigurations(
+ List multiSubnetIpConfigurations) {
+ this.multiSubnetIpConfigurations = multiSubnetIpConfigurations;
+ return this;
+ }
+
/**
* Get the createDefaultAvailabilityGroupIfNotExist property: Create a default availability group if it does not
* exist.
@@ -178,6 +202,9 @@ public void validate() {
if (loadBalancerConfigurations() != null) {
loadBalancerConfigurations().forEach(e -> e.validate());
}
+ if (multiSubnetIpConfigurations() != null) {
+ multiSubnetIpConfigurations().forEach(e -> e.validate());
+ }
if (availabilityGroupConfiguration() != null) {
availabilityGroupConfiguration().validate();
}
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/models/OperationInner.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/models/OperationInner.java
index b7eb2ffbc9f51..492497372282f 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/models/OperationInner.java
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/models/OperationInner.java
@@ -5,10 +5,8 @@
package com.azure.resourcemanager.sqlvirtualmachine.fluent.models;
import com.azure.core.annotation.Immutable;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.sqlvirtualmachine.models.OperationDisplay;
import com.azure.resourcemanager.sqlvirtualmachine.models.OperationOrigin;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;
@@ -16,8 +14,6 @@
/** SQL REST API operation definition. */
@Immutable
public final class OperationInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationInner.class);
-
/*
* The name of the operation being performed on this particular object.
*/
@@ -25,8 +21,7 @@ public final class OperationInner {
private String name;
/*
- * The localized display information for this particular operation /
- * action.
+ * The localized display information for this particular operation / action.
*/
@JsonProperty(value = "display", access = JsonProperty.Access.WRITE_ONLY)
private OperationDisplay display;
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/models/SqlVirtualMachineGroupInner.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/models/SqlVirtualMachineGroupInner.java
index 1cbca3acb829c..6de89bd0c3015 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/models/SqlVirtualMachineGroupInner.java
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/models/SqlVirtualMachineGroupInner.java
@@ -7,21 +7,17 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.Resource;
import com.azure.core.management.SystemData;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.sqlvirtualmachine.models.ClusterConfiguration;
import com.azure.resourcemanager.sqlvirtualmachine.models.ClusterManagerType;
import com.azure.resourcemanager.sqlvirtualmachine.models.ScaleType;
import com.azure.resourcemanager.sqlvirtualmachine.models.SqlVmGroupImageSku;
import com.azure.resourcemanager.sqlvirtualmachine.models.WsfcDomainProfile;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;
/** A SQL virtual machine group. */
@Fluent
public final class SqlVirtualMachineGroupInner extends Resource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(SqlVirtualMachineGroupInner.class);
-
/*
* Resource properties.
*/
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/models/SqlVirtualMachineGroupProperties.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/models/SqlVirtualMachineGroupProperties.java
index 3294061efdc2c..e892dcac441b4 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/models/SqlVirtualMachineGroupProperties.java
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/models/SqlVirtualMachineGroupProperties.java
@@ -5,20 +5,16 @@
package com.azure.resourcemanager.sqlvirtualmachine.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.sqlvirtualmachine.models.ClusterConfiguration;
import com.azure.resourcemanager.sqlvirtualmachine.models.ClusterManagerType;
import com.azure.resourcemanager.sqlvirtualmachine.models.ScaleType;
import com.azure.resourcemanager.sqlvirtualmachine.models.SqlVmGroupImageSku;
import com.azure.resourcemanager.sqlvirtualmachine.models.WsfcDomainProfile;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/** The properties of a SQL virtual machine group. */
@Fluent
public final class SqlVirtualMachineGroupProperties {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(SqlVirtualMachineGroupProperties.class);
-
/*
* Provisioning state to track the async operation status.
*/
@@ -44,8 +40,8 @@ public final class SqlVirtualMachineGroupProperties {
private ScaleType scaleType;
/*
- * Type of cluster manager: Windows Server Failover Cluster (WSFC), implied
- * by the scale type of the group and the OS type.
+ * Type of cluster manager: Windows Server Failover Cluster (WSFC), implied by the scale type of the group and the
+ * OS type.
*/
@JsonProperty(value = "clusterManagerType", access = JsonProperty.Access.WRITE_ONLY)
private ClusterManagerType clusterManagerType;
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/models/SqlVirtualMachineInner.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/models/SqlVirtualMachineInner.java
index eac89001ab04c..1205e6e9670ef 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/models/SqlVirtualMachineInner.java
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/models/SqlVirtualMachineInner.java
@@ -7,7 +7,6 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.Resource;
import com.azure.core.management.SystemData;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.sqlvirtualmachine.models.AssessmentSettings;
import com.azure.resourcemanager.sqlvirtualmachine.models.AutoBackupSettings;
import com.azure.resourcemanager.sqlvirtualmachine.models.AutoPatchingSettings;
@@ -19,15 +18,12 @@
import com.azure.resourcemanager.sqlvirtualmachine.models.SqlServerLicenseType;
import com.azure.resourcemanager.sqlvirtualmachine.models.StorageConfigurationSettings;
import com.azure.resourcemanager.sqlvirtualmachine.models.WsfcDomainCredentials;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;
/** A SQL virtual machine. */
@Fluent
public final class SqlVirtualMachineInner extends Resource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(SqlVirtualMachineInner.class);
-
/*
* Azure Active Directory identity of the server.
*/
@@ -274,6 +270,31 @@ public SqlVirtualMachineInner withWsfcDomainCredentials(WsfcDomainCredentials ws
return this;
}
+ /**
+ * Get the wsfcStaticIp property: Domain credentials for setting up Windows Server Failover Cluster for SQL
+ * availability group.
+ *
+ * @return the wsfcStaticIp value.
+ */
+ public String wsfcStaticIp() {
+ return this.innerProperties() == null ? null : this.innerProperties().wsfcStaticIp();
+ }
+
+ /**
+ * Set the wsfcStaticIp property: Domain credentials for setting up Windows Server Failover Cluster for SQL
+ * availability group.
+ *
+ * @param wsfcStaticIp the wsfcStaticIp value to set.
+ * @return the SqlVirtualMachineInner object itself.
+ */
+ public SqlVirtualMachineInner withWsfcStaticIp(String wsfcStaticIp) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new SqlVirtualMachineProperties();
+ }
+ this.innerProperties().withWsfcStaticIp(wsfcStaticIp);
+ return this;
+ }
+
/**
* Get the autoPatchingSettings property: Auto patching settings for applying critical security updates to SQL
* virtual machine.
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/models/SqlVirtualMachineProperties.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/models/SqlVirtualMachineProperties.java
index 070f5c530dcc3..f739d1ec914c4 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/models/SqlVirtualMachineProperties.java
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/models/SqlVirtualMachineProperties.java
@@ -5,7 +5,6 @@
package com.azure.resourcemanager.sqlvirtualmachine.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.sqlvirtualmachine.models.AssessmentSettings;
import com.azure.resourcemanager.sqlvirtualmachine.models.AutoBackupSettings;
import com.azure.resourcemanager.sqlvirtualmachine.models.AutoPatchingSettings;
@@ -16,17 +15,13 @@
import com.azure.resourcemanager.sqlvirtualmachine.models.SqlServerLicenseType;
import com.azure.resourcemanager.sqlvirtualmachine.models.StorageConfigurationSettings;
import com.azure.resourcemanager.sqlvirtualmachine.models.WsfcDomainCredentials;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/** The SQL virtual machine properties. */
@Fluent
public final class SqlVirtualMachineProperties {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(SqlVirtualMachineProperties.class);
-
/*
- * ARM Resource id of underlying virtual machine created from SQL
- * marketplace image.
+ * ARM Resource id of underlying virtual machine created from SQL marketplace image.
*/
@JsonProperty(value = "virtualMachineResourceId")
private String virtualMachineResourceId;
@@ -62,22 +57,25 @@ public final class SqlVirtualMachineProperties {
private SqlImageSku sqlImageSku;
/*
- * ARM resource id of the SQL virtual machine group this SQL virtual
- * machine is or will be part of.
+ * ARM resource id of the SQL virtual machine group this SQL virtual machine is or will be part of.
*/
@JsonProperty(value = "sqlVirtualMachineGroupResourceId")
private String sqlVirtualMachineGroupResourceId;
/*
- * Domain credentials for setting up Windows Server Failover Cluster for
- * SQL availability group.
+ * Domain credentials for setting up Windows Server Failover Cluster for SQL availability group.
*/
@JsonProperty(value = "wsfcDomainCredentials")
private WsfcDomainCredentials wsfcDomainCredentials;
/*
- * Auto patching settings for applying critical security updates to SQL
- * virtual machine.
+ * Domain credentials for setting up Windows Server Failover Cluster for SQL availability group.
+ */
+ @JsonProperty(value = "wsfcStaticIp")
+ private String wsfcStaticIp;
+
+ /*
+ * Auto patching settings for applying critical security updates to SQL virtual machine.
*/
@JsonProperty(value = "autoPatchingSettings")
private AutoPatchingSettings autoPatchingSettings;
@@ -267,6 +265,28 @@ public SqlVirtualMachineProperties withWsfcDomainCredentials(WsfcDomainCredentia
return this;
}
+ /**
+ * Get the wsfcStaticIp property: Domain credentials for setting up Windows Server Failover Cluster for SQL
+ * availability group.
+ *
+ * @return the wsfcStaticIp value.
+ */
+ public String wsfcStaticIp() {
+ return this.wsfcStaticIp;
+ }
+
+ /**
+ * Set the wsfcStaticIp property: Domain credentials for setting up Windows Server Failover Cluster for SQL
+ * availability group.
+ *
+ * @param wsfcStaticIp the wsfcStaticIp value to set.
+ * @return the SqlVirtualMachineProperties object itself.
+ */
+ public SqlVirtualMachineProperties withWsfcStaticIp(String wsfcStaticIp) {
+ this.wsfcStaticIp = wsfcStaticIp;
+ return this;
+ }
+
/**
* Get the autoPatchingSettings property: Auto patching settings for applying critical security updates to SQL
* virtual machine.
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/AvailabilityGroupListenerImpl.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/AvailabilityGroupListenerImpl.java
index d531bd7e371e3..9fc52048dfbb6 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/AvailabilityGroupListenerImpl.java
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/AvailabilityGroupListenerImpl.java
@@ -10,6 +10,7 @@
import com.azure.resourcemanager.sqlvirtualmachine.models.AgConfiguration;
import com.azure.resourcemanager.sqlvirtualmachine.models.AvailabilityGroupListener;
import com.azure.resourcemanager.sqlvirtualmachine.models.LoadBalancerConfiguration;
+import com.azure.resourcemanager.sqlvirtualmachine.models.MultiSubnetIpConfiguration;
import java.util.Collections;
import java.util.List;
@@ -52,6 +53,15 @@ public List loadBalancerConfigurations() {
}
}
+ public List multiSubnetIpConfigurations() {
+ List inner = this.innerModel().multiSubnetIpConfigurations();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
public Boolean createDefaultAvailabilityGroupIfNotExist() {
return this.innerModel().createDefaultAvailabilityGroupIfNotExist();
}
@@ -64,6 +74,10 @@ public AgConfiguration availabilityGroupConfiguration() {
return this.innerModel().availabilityGroupConfiguration();
}
+ public String resourceGroupName() {
+ return resourceGroupName;
+ }
+
public AvailabilityGroupListenerInner innerModel() {
return this.innerObject;
}
@@ -201,6 +215,12 @@ public AvailabilityGroupListenerImpl withLoadBalancerConfigurations(
return this;
}
+ public AvailabilityGroupListenerImpl withMultiSubnetIpConfigurations(
+ List multiSubnetIpConfigurations) {
+ this.innerModel().withMultiSubnetIpConfigurations(multiSubnetIpConfigurations);
+ return this;
+ }
+
public AvailabilityGroupListenerImpl withCreateDefaultAvailabilityGroupIfNotExist(
Boolean createDefaultAvailabilityGroupIfNotExist) {
this.innerModel().withCreateDefaultAvailabilityGroupIfNotExist(createDefaultAvailabilityGroupIfNotExist);
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/AvailabilityGroupListenersClientImpl.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/AvailabilityGroupListenersClientImpl.java
index e6e36ddc54f51..67b47220a511c 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/AvailabilityGroupListenersClientImpl.java
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/AvailabilityGroupListenersClientImpl.java
@@ -29,7 +29,6 @@
import com.azure.core.management.polling.PollResult;
import com.azure.core.util.Context;
import com.azure.core.util.FluxUtil;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.core.util.polling.PollerFlux;
import com.azure.core.util.polling.SyncPoller;
import com.azure.resourcemanager.sqlvirtualmachine.fluent.AvailabilityGroupListenersClient;
@@ -41,8 +40,6 @@
/** An instance of this class provides access to all the operations defined in AvailabilityGroupListenersClient. */
public final class AvailabilityGroupListenersClientImpl implements AvailabilityGroupListenersClient {
- private final ClientLogger logger = new ClientLogger(AvailabilityGroupListenersClientImpl.class);
-
/** The proxy service used to perform REST calls. */
private final AvailabilityGroupListenersService service;
@@ -297,14 +294,7 @@ private Mono getAsync(
String expand) {
return getWithResponseAsync(
resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName, expand)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
@@ -325,14 +315,7 @@ private Mono getAsync(
final String expand = null;
return getWithResponseAsync(
resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName, expand)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/AvailabilityGroupListenersImpl.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/AvailabilityGroupListenersImpl.java
index e5e356e32b5b7..348217a3a979d 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/AvailabilityGroupListenersImpl.java
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/AvailabilityGroupListenersImpl.java
@@ -13,10 +13,9 @@
import com.azure.resourcemanager.sqlvirtualmachine.fluent.models.AvailabilityGroupListenerInner;
import com.azure.resourcemanager.sqlvirtualmachine.models.AvailabilityGroupListener;
import com.azure.resourcemanager.sqlvirtualmachine.models.AvailabilityGroupListeners;
-import com.fasterxml.jackson.annotation.JsonIgnore;
public final class AvailabilityGroupListenersImpl implements AvailabilityGroupListeners {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(AvailabilityGroupListenersImpl.class);
+ private static final ClientLogger LOGGER = new ClientLogger(AvailabilityGroupListenersImpl.class);
private final AvailabilityGroupListenersClient innerClient;
@@ -94,7 +93,7 @@ public PagedIterable listByGroup(
public AvailabilityGroupListener getById(String id) {
String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -102,7 +101,7 @@ public AvailabilityGroupListener getById(String id) {
}
String sqlVirtualMachineGroupName = Utils.getValueFromIdByName(id, "sqlVirtualMachineGroups");
if (sqlVirtualMachineGroupName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -112,7 +111,7 @@ public AvailabilityGroupListener getById(String id) {
}
String availabilityGroupListenerName = Utils.getValueFromIdByName(id, "availabilityGroupListeners");
if (availabilityGroupListenerName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -130,7 +129,7 @@ public AvailabilityGroupListener getById(String id) {
public Response getByIdWithResponse(String id, String expand, Context context) {
String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -138,7 +137,7 @@ public Response getByIdWithResponse(String id, String
}
String sqlVirtualMachineGroupName = Utils.getValueFromIdByName(id, "sqlVirtualMachineGroups");
if (sqlVirtualMachineGroupName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -148,7 +147,7 @@ public Response getByIdWithResponse(String id, String
}
String availabilityGroupListenerName = Utils.getValueFromIdByName(id, "availabilityGroupListeners");
if (availabilityGroupListenerName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -164,7 +163,7 @@ public Response getByIdWithResponse(String id, String
public void deleteById(String id) {
String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -172,7 +171,7 @@ public void deleteById(String id) {
}
String sqlVirtualMachineGroupName = Utils.getValueFromIdByName(id, "sqlVirtualMachineGroups");
if (sqlVirtualMachineGroupName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -182,7 +181,7 @@ public void deleteById(String id) {
}
String availabilityGroupListenerName = Utils.getValueFromIdByName(id, "availabilityGroupListeners");
if (availabilityGroupListenerName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -196,7 +195,7 @@ public void deleteById(String id) {
public void deleteByIdWithResponse(String id, Context context) {
String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -204,7 +203,7 @@ public void deleteByIdWithResponse(String id, Context context) {
}
String sqlVirtualMachineGroupName = Utils.getValueFromIdByName(id, "sqlVirtualMachineGroups");
if (sqlVirtualMachineGroupName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -214,7 +213,7 @@ public void deleteByIdWithResponse(String id, Context context) {
}
String availabilityGroupListenerName = Utils.getValueFromIdByName(id, "availabilityGroupListeners");
if (availabilityGroupListenerName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/OperationsClientImpl.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/OperationsClientImpl.java
index c1ca667f2faba..6c1fe43e52b52 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/OperationsClientImpl.java
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/OperationsClientImpl.java
@@ -25,7 +25,6 @@
import com.azure.core.management.exception.ManagementException;
import com.azure.core.util.Context;
import com.azure.core.util.FluxUtil;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.sqlvirtualmachine.fluent.OperationsClient;
import com.azure.resourcemanager.sqlvirtualmachine.fluent.models.OperationInner;
import com.azure.resourcemanager.sqlvirtualmachine.models.OperationListResult;
@@ -33,8 +32,6 @@
/** An instance of this class provides access to all the operations defined in OperationsClient. */
public final class OperationsClientImpl implements OperationsClient {
- private final ClientLogger logger = new ClientLogger(OperationsClientImpl.class);
-
/** The proxy service used to perform REST calls. */
private final OperationsService service;
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/OperationsImpl.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/OperationsImpl.java
index ced421e7130e5..56f4eece132dd 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/OperationsImpl.java
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/OperationsImpl.java
@@ -11,10 +11,9 @@
import com.azure.resourcemanager.sqlvirtualmachine.fluent.models.OperationInner;
import com.azure.resourcemanager.sqlvirtualmachine.models.Operation;
import com.azure.resourcemanager.sqlvirtualmachine.models.Operations;
-import com.fasterxml.jackson.annotation.JsonIgnore;
public final class OperationsImpl implements Operations {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationsImpl.class);
+ private static final ClientLogger LOGGER = new ClientLogger(OperationsImpl.class);
private final OperationsClient innerClient;
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/SqlVirtualMachineGroupImpl.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/SqlVirtualMachineGroupImpl.java
index 3ac75bfb76ea5..2bbf72f5253d1 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/SqlVirtualMachineGroupImpl.java
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/SqlVirtualMachineGroupImpl.java
@@ -89,6 +89,10 @@ public String regionName() {
return this.location();
}
+ public String resourceGroupName() {
+ return resourceGroupName;
+ }
+
public SqlVirtualMachineGroupInner innerModel() {
return this.innerObject;
}
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/SqlVirtualMachineGroupsClientImpl.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/SqlVirtualMachineGroupsClientImpl.java
index cee813883adc6..3a2129dcf6e82 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/SqlVirtualMachineGroupsClientImpl.java
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/SqlVirtualMachineGroupsClientImpl.java
@@ -30,7 +30,6 @@
import com.azure.core.management.polling.PollResult;
import com.azure.core.util.Context;
import com.azure.core.util.FluxUtil;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.core.util.polling.PollerFlux;
import com.azure.core.util.polling.SyncPoller;
import com.azure.resourcemanager.sqlvirtualmachine.fluent.SqlVirtualMachineGroupsClient;
@@ -43,8 +42,6 @@
/** An instance of this class provides access to all the operations defined in SqlVirtualMachineGroupsClient. */
public final class SqlVirtualMachineGroupsClientImpl implements SqlVirtualMachineGroupsClient {
- private final ClientLogger logger = new ClientLogger(SqlVirtualMachineGroupsClientImpl.class);
-
/** The proxy service used to perform REST calls. */
private final SqlVirtualMachineGroupsService service;
@@ -294,14 +291,7 @@ private Mono> getByResourceGroupWithRespon
private Mono getByResourceGroupAsync(
String resourceGroupName, String sqlVirtualMachineGroupName) {
return getByResourceGroupWithResponseAsync(resourceGroupName, sqlVirtualMachineGroupName)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/SqlVirtualMachineGroupsImpl.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/SqlVirtualMachineGroupsImpl.java
index a8fe079458c65..8710adb16f0d4 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/SqlVirtualMachineGroupsImpl.java
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/SqlVirtualMachineGroupsImpl.java
@@ -13,10 +13,9 @@
import com.azure.resourcemanager.sqlvirtualmachine.fluent.models.SqlVirtualMachineGroupInner;
import com.azure.resourcemanager.sqlvirtualmachine.models.SqlVirtualMachineGroup;
import com.azure.resourcemanager.sqlvirtualmachine.models.SqlVirtualMachineGroups;
-import com.fasterxml.jackson.annotation.JsonIgnore;
public final class SqlVirtualMachineGroupsImpl implements SqlVirtualMachineGroups {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(SqlVirtualMachineGroupsImpl.class);
+ private static final ClientLogger LOGGER = new ClientLogger(SqlVirtualMachineGroupsImpl.class);
private final SqlVirtualMachineGroupsClient innerClient;
@@ -86,7 +85,7 @@ public PagedIterable list(Context context) {
public SqlVirtualMachineGroup getById(String id) {
String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -94,7 +93,7 @@ public SqlVirtualMachineGroup getById(String id) {
}
String sqlVirtualMachineGroupName = Utils.getValueFromIdByName(id, "sqlVirtualMachineGroups");
if (sqlVirtualMachineGroupName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -110,7 +109,7 @@ public SqlVirtualMachineGroup getById(String id) {
public Response getByIdWithResponse(String id, Context context) {
String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -118,7 +117,7 @@ public Response getByIdWithResponse(String id, Context c
}
String sqlVirtualMachineGroupName = Utils.getValueFromIdByName(id, "sqlVirtualMachineGroups");
if (sqlVirtualMachineGroupName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -132,7 +131,7 @@ public Response getByIdWithResponse(String id, Context c
public void deleteById(String id) {
String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -140,7 +139,7 @@ public void deleteById(String id) {
}
String sqlVirtualMachineGroupName = Utils.getValueFromIdByName(id, "sqlVirtualMachineGroups");
if (sqlVirtualMachineGroupName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -154,7 +153,7 @@ public void deleteById(String id) {
public void deleteByIdWithResponse(String id, Context context) {
String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -162,7 +161,7 @@ public void deleteByIdWithResponse(String id, Context context) {
}
String sqlVirtualMachineGroupName = Utils.getValueFromIdByName(id, "sqlVirtualMachineGroups");
if (sqlVirtualMachineGroupName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/SqlVirtualMachineImpl.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/SqlVirtualMachineImpl.java
index cf033a8ba0510..07bd5ecaccd37 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/SqlVirtualMachineImpl.java
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/SqlVirtualMachineImpl.java
@@ -95,6 +95,10 @@ public WsfcDomainCredentials wsfcDomainCredentials() {
return this.innerModel().wsfcDomainCredentials();
}
+ public String wsfcStaticIp() {
+ return this.innerModel().wsfcStaticIp();
+ }
+
public AutoPatchingSettings autoPatchingSettings() {
return this.innerModel().autoPatchingSettings();
}
@@ -127,6 +131,10 @@ public String regionName() {
return this.location();
}
+ public String resourceGroupName() {
+ return resourceGroupName;
+ }
+
public SqlVirtualMachineInner innerModel() {
return this.innerObject;
}
@@ -296,6 +304,11 @@ public SqlVirtualMachineImpl withWsfcDomainCredentials(WsfcDomainCredentials wsf
return this;
}
+ public SqlVirtualMachineImpl withWsfcStaticIp(String wsfcStaticIp) {
+ this.innerModel().withWsfcStaticIp(wsfcStaticIp);
+ return this;
+ }
+
public SqlVirtualMachineImpl withAutoPatchingSettings(AutoPatchingSettings autoPatchingSettings) {
this.innerModel().withAutoPatchingSettings(autoPatchingSettings);
return this;
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/SqlVirtualMachineManagementClientBuilder.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/SqlVirtualMachineManagementClientBuilder.java
index ce28dcb231628..62bccf2343c28 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/SqlVirtualMachineManagementClientBuilder.java
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/SqlVirtualMachineManagementClientBuilder.java
@@ -7,7 +7,6 @@
import com.azure.core.annotation.ServiceClientBuilder;
import com.azure.core.http.HttpPipeline;
import com.azure.core.http.HttpPipelineBuilder;
-import com.azure.core.http.policy.CookiePolicy;
import com.azure.core.http.policy.RetryPolicy;
import com.azure.core.http.policy.UserAgentPolicy;
import com.azure.core.management.AzureEnvironment;
@@ -67,34 +66,34 @@ public SqlVirtualMachineManagementClientBuilder environment(AzureEnvironment env
}
/*
- * The default poll interval for long-running operation
+ * The HTTP pipeline to send requests through
*/
- private Duration defaultPollInterval;
+ private HttpPipeline pipeline;
/**
- * Sets The default poll interval for long-running operation.
+ * Sets The HTTP pipeline to send requests through.
*
- * @param defaultPollInterval the defaultPollInterval value.
+ * @param pipeline the pipeline value.
* @return the SqlVirtualMachineManagementClientBuilder.
*/
- public SqlVirtualMachineManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) {
- this.defaultPollInterval = defaultPollInterval;
+ public SqlVirtualMachineManagementClientBuilder pipeline(HttpPipeline pipeline) {
+ this.pipeline = pipeline;
return this;
}
/*
- * The HTTP pipeline to send requests through
+ * The default poll interval for long-running operation
*/
- private HttpPipeline pipeline;
+ private Duration defaultPollInterval;
/**
- * Sets The HTTP pipeline to send requests through.
+ * Sets The default poll interval for long-running operation.
*
- * @param pipeline the pipeline value.
+ * @param defaultPollInterval the defaultPollInterval value.
* @return the SqlVirtualMachineManagementClientBuilder.
*/
- public SqlVirtualMachineManagementClientBuilder pipeline(HttpPipeline pipeline) {
- this.pipeline = pipeline;
+ public SqlVirtualMachineManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) {
+ this.defaultPollInterval = defaultPollInterval;
return this;
}
@@ -120,27 +119,26 @@ public SqlVirtualMachineManagementClientBuilder serializerAdapter(SerializerAdap
* @return an instance of SqlVirtualMachineManagementClientImpl.
*/
public SqlVirtualMachineManagementClientImpl buildClient() {
- if (endpoint == null) {
- this.endpoint = "https://management.azure.com";
- }
- if (environment == null) {
- this.environment = AzureEnvironment.AZURE;
- }
- if (defaultPollInterval == null) {
- this.defaultPollInterval = Duration.ofSeconds(30);
- }
- if (pipeline == null) {
- this.pipeline =
- new HttpPipelineBuilder()
- .policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy())
- .build();
- }
- if (serializerAdapter == null) {
- this.serializerAdapter = SerializerFactory.createDefaultManagementSerializerAdapter();
- }
+ String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com";
+ AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE;
+ HttpPipeline localPipeline =
+ (pipeline != null)
+ ? pipeline
+ : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build();
+ Duration localDefaultPollInterval =
+ (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30);
+ SerializerAdapter localSerializerAdapter =
+ (serializerAdapter != null)
+ ? serializerAdapter
+ : SerializerFactory.createDefaultManagementSerializerAdapter();
SqlVirtualMachineManagementClientImpl client =
new SqlVirtualMachineManagementClientImpl(
- pipeline, serializerAdapter, defaultPollInterval, environment, subscriptionId, endpoint);
+ localPipeline,
+ localSerializerAdapter,
+ localDefaultPollInterval,
+ localEnvironment,
+ subscriptionId,
+ localEndpoint);
return client;
}
}
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/SqlVirtualMachineManagementClientImpl.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/SqlVirtualMachineManagementClientImpl.java
index b8333e94a48bb..83277c97a76d2 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/SqlVirtualMachineManagementClientImpl.java
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/SqlVirtualMachineManagementClientImpl.java
@@ -15,6 +15,7 @@
import com.azure.core.management.polling.PollResult;
import com.azure.core.management.polling.PollerFactory;
import com.azure.core.util.Context;
+import com.azure.core.util.CoreUtils;
import com.azure.core.util.logging.ClientLogger;
import com.azure.core.util.polling.AsyncPollResponse;
import com.azure.core.util.polling.LongRunningOperationStatus;
@@ -32,15 +33,12 @@
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.time.Duration;
-import java.util.Map;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
/** Initializes a new instance of the SqlVirtualMachineManagementClientImpl type. */
@ServiceClient(builder = SqlVirtualMachineManagementClientBuilder.class)
public final class SqlVirtualMachineManagementClientImpl implements SqlVirtualMachineManagementClient {
- private final ClientLogger logger = new ClientLogger(SqlVirtualMachineManagementClientImpl.class);
-
/** Subscription ID that identifies an Azure subscription. */
private final String subscriptionId;
@@ -183,7 +181,7 @@ public SqlVirtualMachinesClient getSqlVirtualMachines() {
this.defaultPollInterval = defaultPollInterval;
this.subscriptionId = subscriptionId;
this.endpoint = endpoint;
- this.apiVersion = "2021-11-01-preview";
+ this.apiVersion = "2022-02-01";
this.availabilityGroupListeners = new AvailabilityGroupListenersClientImpl(this);
this.operations = new OperationsClientImpl(this);
this.sqlVirtualMachineGroups = new SqlVirtualMachineGroupsClientImpl(this);
@@ -206,10 +204,7 @@ public Context getContext() {
* @return the merged context.
*/
public Context mergeContext(Context context) {
- for (Map.Entry