diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/CHANGELOG.md b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/CHANGELOG.md
index c1972db0aa17f..49250bfaf86ec 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.4 (Unreleased)
+## 1.0.0-beta.1 (2023-03-01)
+
+- 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-2022-08. 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 fc2e4204793b0..539895933bd4f 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-2022-07. 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-preview-2022-08. 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.resourcemanager
azure-resourcemanager-sqlvirtualmachine
- 1.0.0-beta.3
+ 1.0.0-beta.4
```
[//]: # ({x-version-update-end})
@@ -41,19 +41,19 @@ Various documentation is available to help you get started
Azure Management Libraries require a `TokenCredential` implementation for authentication and an `HttpClient` implementation for HTTP client.
-[Azure Identity][azure_identity] package and [Azure Core Netty HTTP][azure_core_http_netty] package provide the default implementation.
+[Azure Identity][azure_identity] and [Azure Core Netty HTTP][azure_core_http_netty] packages provide the default implementation.
### Authentication
-By default, Azure Active Directory token authentication depends on correct configure of following environment variables.
+By default, Azure Active Directory token authentication depends on correct configuration of the following environment variables.
- `AZURE_CLIENT_ID` for Azure client ID.
- `AZURE_TENANT_ID` for Azure tenant ID.
- `AZURE_CLIENT_SECRET` or `AZURE_CLIENT_CERTIFICATE_PATH` for client secret or client certificate.
-In addition, Azure subscription ID can be configured via environment variable `AZURE_SUBSCRIPTION_ID`.
+In addition, Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment variable.
-With above configuration, `azure` client can be authenticated by following code:
+With above configuration, `azure` client can be authenticated using the following code:
```java
AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE);
@@ -83,13 +83,13 @@ See [API design][design] for general introduction on design and key concepts on
## Contributing
-For details on contributing to this repository, see the [contributing guide](https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md).
+For details on contributing to this repository, see the [contributing guide][cg].
-1. Fork it
-1. Create your feature branch (`git checkout -b my-new-feature`)
-1. Commit your changes (`git commit -am 'Add some feature'`)
-1. Push to the branch (`git push origin my-new-feature`)
-1. Create new Pull Request
+This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit .
+
+When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repositories using our CLA.
+
+This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For more information see the [Code of Conduct FAQ][coc_faq] or contact with any additional questions or comments.
[survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS
@@ -100,3 +100,6 @@ For details on contributing to this repository, see the [contributing guide](htt
[azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty
[authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/AUTH.md
[design]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/DESIGN.md
+[cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md
+[coc]: https://opensource.microsoft.com/codeofconduct/
+[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/SAMPLE.md b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/SAMPLE.md
index 29254831c28a8..6f710c51e77d2 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/SAMPLE.md
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/SAMPLE.md
@@ -21,6 +21,10 @@
- [ListByResourceGroup](#sqlvirtualmachinegroups_listbyresourcegroup)
- [Update](#sqlvirtualmachinegroups_update)
+## SqlVirtualMachineTroubleshoot
+
+- [Troubleshoot](#sqlvirtualmachinetroubleshoot_troubleshoot)
+
## SqlVirtualMachines
- [CreateOrUpdate](#sqlvirtualmachines_createorupdate)
@@ -43,7 +47,7 @@ import java.util.Arrays;
/** Samples for AvailabilityGroupListeners CreateOrUpdate. */
public final class AvailabilityGroupListenersCreateOrUpdateSamples {
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-07-01-preview/examples/CreateOrUpdateAvailabilityGroupListener.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-08-01-preview/examples/CreateOrUpdateAvailabilityGroupListener.json
*/
/**
* Sample code: Creates or updates an availability group listener using load balancer. This is used for VMs present
@@ -81,7 +85,7 @@ public final class AvailabilityGroupListenersCreateOrUpdateSamples {
}
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-07-01-preview/examples/CreateOrUpdateAvailabilityGroupListenerWithMultiSubnet.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-08-01-preview/examples/CreateOrUpdateAvailabilityGroupListenerWithMultiSubnet.json
*/
/**
* Sample code: Creates or updates an availability group listener. This is used for VMs present in multi subnet.
@@ -123,12 +127,10 @@ public final class AvailabilityGroupListenersCreateOrUpdateSamples {
### AvailabilityGroupListeners_Delete
```java
-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/2022-07-01-preview/examples/DeleteAvailabilityGroupListener.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-08-01-preview/examples/DeleteAvailabilityGroupListener.json
*/
/**
* Sample code: Deletes an availability group listener.
@@ -137,7 +139,9 @@ public final class AvailabilityGroupListenersDeleteSamples {
*/
public static void deletesAnAvailabilityGroupListener(
com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager manager) {
- manager.availabilityGroupListeners().delete("testrg", "testvmgroup", "agl-test", Context.NONE);
+ manager
+ .availabilityGroupListeners()
+ .delete("testrg", "testvmgroup", "agl-test", com.azure.core.util.Context.NONE);
}
}
```
@@ -145,12 +149,10 @@ public final class AvailabilityGroupListenersDeleteSamples {
### AvailabilityGroupListeners_Get
```java
-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/2022-07-01-preview/examples/GetAvailabilityGroupListener.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-08-01-preview/examples/GetAvailabilityGroupListener.json
*/
/**
* Sample code: Gets an availability group listener.
@@ -159,7 +161,9 @@ public final class AvailabilityGroupListenersGetSamples {
*/
public static void getsAnAvailabilityGroupListener(
com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager manager) {
- manager.availabilityGroupListeners().getWithResponse("testrg", "testvmgroup", "agl-test", null, Context.NONE);
+ manager
+ .availabilityGroupListeners()
+ .getWithResponse("testrg", "testvmgroup", "agl-test", null, com.azure.core.util.Context.NONE);
}
}
```
@@ -167,12 +171,10 @@ public final class AvailabilityGroupListenersGetSamples {
### AvailabilityGroupListeners_ListByGroup
```java
-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/2022-07-01-preview/examples/ListByGroupAvailabilityGroupListener.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-08-01-preview/examples/ListByGroupAvailabilityGroupListener.json
*/
/**
* Sample code: Lists all availability group listeners in a SQL virtual machine group.
@@ -181,7 +183,7 @@ public final class AvailabilityGroupListenersListByGroupSamples {
*/
public static void listsAllAvailabilityGroupListenersInASQLVirtualMachineGroup(
com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager manager) {
- manager.availabilityGroupListeners().listByGroup("testrg", "testvmgroup", Context.NONE);
+ manager.availabilityGroupListeners().listByGroup("testrg", "testvmgroup", com.azure.core.util.Context.NONE);
}
}
```
@@ -189,12 +191,10 @@ public final class AvailabilityGroupListenersListByGroupSamples {
### Operations_List
```java
-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/2022-07-01-preview/examples/ListOperation.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-08-01-preview/examples/ListOperation.json
*/
/**
* Sample code: Lists all of the available SQL Virtual Machine Rest API operations.
@@ -203,7 +203,7 @@ public final class OperationsListSamples {
*/
public static void listsAllOfTheAvailableSQLVirtualMachineRestAPIOperations(
com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager manager) {
- manager.operations().list(Context.NONE);
+ manager.operations().list(com.azure.core.util.Context.NONE);
}
}
```
@@ -220,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/2022-07-01-preview/examples/CreateOrUpdateSqlVirtualMachineGroup.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-08-01-preview/examples/CreateOrUpdateSqlVirtualMachineGroup.json
*/
/**
* Sample code: Creates or updates a SQL virtual machine group.
@@ -245,7 +245,7 @@ public final class SqlVirtualMachineGroupsCreateOrUpdateSamples {
.withClusterOperatorAccount("testrp@testdomain.com")
.withSqlServiceAccount("sqlservice@testdomain.com")
.withStorageAccountUrl("https://storgact.blob.core.windows.net/")
- .withStorageAccountPrimaryKey("")
+ .withStorageAccountPrimaryKey("fakeTokenPlaceholder")
.withClusterSubnetType(ClusterSubnetType.MULTI_SUBNET))
.create();
}
@@ -266,12 +266,10 @@ public final class SqlVirtualMachineGroupsCreateOrUpdateSamples {
### SqlVirtualMachineGroups_Delete
```java
-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/2022-07-01-preview/examples/DeleteSqlVirtualMachineGroup.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-08-01-preview/examples/DeleteSqlVirtualMachineGroup.json
*/
/**
* Sample code: Deletes a SQL virtual machine group.
@@ -280,7 +278,7 @@ public final class SqlVirtualMachineGroupsDeleteSamples {
*/
public static void deletesASQLVirtualMachineGroup(
com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager manager) {
- manager.sqlVirtualMachineGroups().delete("testrg", "testvmgroup", Context.NONE);
+ manager.sqlVirtualMachineGroups().delete("testrg", "testvmgroup", com.azure.core.util.Context.NONE);
}
}
```
@@ -288,12 +286,10 @@ public final class SqlVirtualMachineGroupsDeleteSamples {
### SqlVirtualMachineGroups_GetByResourceGroup
```java
-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/2022-07-01-preview/examples/GetSqlVirtualMachineGroup.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-08-01-preview/examples/GetSqlVirtualMachineGroup.json
*/
/**
* Sample code: Gets a SQL virtual machine group.
@@ -302,7 +298,9 @@ public final class SqlVirtualMachineGroupsGetByResourceGroupSamples {
*/
public static void getsASQLVirtualMachineGroup(
com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager manager) {
- manager.sqlVirtualMachineGroups().getByResourceGroupWithResponse("testrg", "testvmgroup", Context.NONE);
+ manager
+ .sqlVirtualMachineGroups()
+ .getByResourceGroupWithResponse("testrg", "testvmgroup", com.azure.core.util.Context.NONE);
}
}
```
@@ -310,12 +308,10 @@ public final class SqlVirtualMachineGroupsGetByResourceGroupSamples {
### SqlVirtualMachineGroups_List
```java
-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/2022-07-01-preview/examples/ListSubscriptionSqlVirtualMachineGroup.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-08-01-preview/examples/ListSubscriptionSqlVirtualMachineGroup.json
*/
/**
* Sample code: Gets all SQL virtual machine groups in a subscription.
@@ -324,7 +320,7 @@ public final class SqlVirtualMachineGroupsListSamples {
*/
public static void getsAllSQLVirtualMachineGroupsInASubscription(
com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager manager) {
- manager.sqlVirtualMachineGroups().list(Context.NONE);
+ manager.sqlVirtualMachineGroups().list(com.azure.core.util.Context.NONE);
}
}
```
@@ -332,12 +328,10 @@ public final class SqlVirtualMachineGroupsListSamples {
### SqlVirtualMachineGroups_ListByResourceGroup
```java
-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/2022-07-01-preview/examples/ListByResourceGroupSqlVirtualMachineGroup.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-08-01-preview/examples/ListByResourceGroupSqlVirtualMachineGroup.json
*/
/**
* Sample code: Gets all SQL virtual machine groups in a resource group.
@@ -346,7 +340,7 @@ public final class SqlVirtualMachineGroupsListByResourceGroupSamples {
*/
public static void getsAllSQLVirtualMachineGroupsInAResourceGroup(
com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager manager) {
- manager.sqlVirtualMachineGroups().listByResourceGroup("testrg", Context.NONE);
+ manager.sqlVirtualMachineGroups().listByResourceGroup("testrg", com.azure.core.util.Context.NONE);
}
}
```
@@ -354,7 +348,6 @@ public final class SqlVirtualMachineGroupsListByResourceGroupSamples {
### SqlVirtualMachineGroups_Update
```java
-import com.azure.core.util.Context;
import com.azure.resourcemanager.sqlvirtualmachine.models.SqlVirtualMachineGroup;
import java.util.HashMap;
import java.util.Map;
@@ -362,7 +355,7 @@ import java.util.Map;
/** Samples for SqlVirtualMachineGroups Update. */
public final class SqlVirtualMachineGroupsUpdateSamples {
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-07-01-preview/examples/UpdateSqlVirtualMachineGroup.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-08-01-preview/examples/UpdateSqlVirtualMachineGroup.json
*/
/**
* Sample code: Updates a SQL virtual machine group tags.
@@ -374,7 +367,7 @@ public final class SqlVirtualMachineGroupsUpdateSamples {
SqlVirtualMachineGroup resource =
manager
.sqlVirtualMachineGroups()
- .getByResourceGroupWithResponse("testrg", "testvmgroup", Context.NONE)
+ .getByResourceGroupWithResponse("testrg", "testvmgroup", com.azure.core.util.Context.NONE)
.getValue();
resource.update().withTags(mapOf("mytag", "myval")).apply();
}
@@ -392,9 +385,48 @@ public final class SqlVirtualMachineGroupsUpdateSamples {
}
```
+### SqlVirtualMachineTroubleshoot_Troubleshoot
+
+```java
+import com.azure.resourcemanager.sqlvirtualmachine.fluent.models.SqlVmTroubleshootingInner;
+import com.azure.resourcemanager.sqlvirtualmachine.models.TroubleshootingAdditionalProperties;
+import com.azure.resourcemanager.sqlvirtualmachine.models.TroubleshootingScenario;
+import com.azure.resourcemanager.sqlvirtualmachine.models.UnhealthyReplicaInfo;
+import java.time.OffsetDateTime;
+
+/** Samples for SqlVirtualMachineTroubleshoot Troubleshoot. */
+public final class SqlVirtualMachineTroubleshootTroubleshootSamples {
+ /*
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-08-01-preview/examples/TroubleshootSqlVirtualMachine.json
+ */
+ /**
+ * Sample code: Start SQL virtual machine troubleshooting operation.
+ *
+ * @param manager Entry point to SqlVirtualMachineManager.
+ */
+ public static void startSQLVirtualMachineTroubleshootingOperation(
+ com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager manager) {
+ manager
+ .sqlVirtualMachineTroubleshoots()
+ .troubleshoot(
+ "testrg",
+ "testvm",
+ new SqlVmTroubleshootingInner()
+ .withStartTimeUtc(OffsetDateTime.parse("2022-07-09T17:10:00Z"))
+ .withEndTimeUtc(OffsetDateTime.parse("2022-07-09T22:10:00Z"))
+ .withTroubleshootingScenario(TroubleshootingScenario.UNHEALTHY_REPLICA)
+ .withProperties(
+ new TroubleshootingAdditionalProperties()
+ .withUnhealthyReplicaInfo(new UnhealthyReplicaInfo().withAvailabilityGroupName("AG1"))),
+ com.azure.core.util.Context.NONE);
+ }
+}
+```
+
### SqlVirtualMachines_CreateOrUpdate
```java
+import com.azure.resourcemanager.sqlvirtualmachine.models.AadAuthenticationSettings;
import com.azure.resourcemanager.sqlvirtualmachine.models.AdditionalFeaturesServerConfigurations;
import com.azure.resourcemanager.sqlvirtualmachine.models.AssessmentDayOfWeek;
import com.azure.resourcemanager.sqlvirtualmachine.models.AssessmentSettings;
@@ -428,7 +460,7 @@ import java.util.Arrays;
/** Samples for SqlVirtualMachines CreateOrUpdate. */
public final class SqlVirtualMachinesCreateOrUpdateSamples {
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-07-01-preview/examples/CreateOrUpdateSqlVirtualMachineStorageConfigurationEXTEND.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-08-01-preview/examples/CreateOrUpdateSqlVirtualMachineStorageConfigurationEXTEND.json
*/
/**
* Sample code: Creates or updates a SQL virtual machine for Storage Configuration Settings to EXTEND Data, Log or
@@ -454,7 +486,7 @@ public final class SqlVirtualMachinesCreateOrUpdateSamples {
}
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-07-01-preview/examples/CreateOrUpdateVirtualMachineWithVMGroup.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-08-01-preview/examples/CreateOrUpdateVirtualMachineWithVMGroup.json
*/
/**
* Sample code: Creates or updates a SQL virtual machine and joins it to a SQL virtual machine group.
@@ -472,15 +504,15 @@ public final class SqlVirtualMachinesCreateOrUpdateSamples {
"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Compute/virtualMachines/testvm2")
.withWsfcDomainCredentials(
new WsfcDomainCredentials()
- .withClusterBootstrapAccountPassword("")
- .withClusterOperatorAccountPassword("")
- .withSqlServiceAccountPassword(""))
+ .withClusterBootstrapAccountPassword("fakeTokenPlaceholder")
+ .withClusterOperatorAccountPassword("fakeTokenPlaceholder")
+ .withSqlServiceAccountPassword("fakeTokenPlaceholder"))
.withWsfcStaticIp("10.0.0.7")
.create();
}
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-07-01-preview/examples/CreateOrUpdateSqlVirtualMachineAutomatedBackupWeekly.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-08-01-preview/examples/CreateOrUpdateSqlVirtualMachineAutomatedBackupWeekly.json
*/
/**
* Sample code: Creates or updates a SQL virtual machine for Automated Back up Settings with Weekly and Days of the
@@ -514,8 +546,8 @@ public final class SqlVirtualMachinesCreateOrUpdateSamples {
.withRetentionPeriod(17)
.withStorageAccountUrl("https://teststorage.blob.core.windows.net/")
.withStorageContainerName("testcontainer")
- .withStorageAccessKey("")
- .withPassword("")
+ .withStorageAccessKey("fakeTokenPlaceholder")
+ .withPassword("fakeTokenPlaceholder")
.withBackupSystemDbs(true)
.withBackupScheduleType(BackupScheduleType.MANUAL)
.withFullBackupFrequency(FullBackupFrequencyType.WEEKLY)
@@ -531,7 +563,7 @@ public final class SqlVirtualMachinesCreateOrUpdateSamples {
.withConnectivityType(ConnectivityType.PRIVATE)
.withPort(1433)
.withSqlAuthUpdateUsername("sqllogin")
- .withSqlAuthUpdatePassword(""))
+ .withSqlAuthUpdatePassword("fakeTokenPlaceholder"))
.withSqlWorkloadTypeUpdateSettings(
new SqlWorkloadTypeUpdateSettings().withSqlWorkloadType(SqlWorkloadType.OLTP))
.withSqlStorageUpdateSettings(
@@ -545,7 +577,7 @@ public final class SqlVirtualMachinesCreateOrUpdateSamples {
}
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-07-01-preview/examples/CreateOrUpdateSqlVirtualMachineStorageConfigurationNEW.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-08-01-preview/examples/CreateOrUpdateSqlVirtualMachineStorageConfigurationNEW.json
*/
/**
* Sample code: Creates or updates a SQL virtual machine for Storage Configuration Settings to NEW Data, Log and
@@ -584,7 +616,7 @@ public final class SqlVirtualMachinesCreateOrUpdateSamples {
}
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-07-01-preview/examples/CreateOrUpdateSqlVirtualMachineMAX.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-08-01-preview/examples/CreateOrUpdateSqlVirtualMachineMAX.json
*/
/**
* Sample code: Creates or updates a SQL virtual machine with max parameters.
@@ -617,8 +649,8 @@ public final class SqlVirtualMachinesCreateOrUpdateSamples {
.withRetentionPeriod(17)
.withStorageAccountUrl("https://teststorage.blob.core.windows.net/")
.withStorageContainerName("testcontainer")
- .withStorageAccessKey("")
- .withPassword("")
+ .withStorageAccessKey("fakeTokenPlaceholder")
+ .withPassword("fakeTokenPlaceholder")
.withBackupSystemDbs(true)
.withBackupScheduleType(BackupScheduleType.MANUAL)
.withFullBackupFrequency(FullBackupFrequencyType.DAILY)
@@ -633,7 +665,7 @@ public final class SqlVirtualMachinesCreateOrUpdateSamples {
.withConnectivityType(ConnectivityType.PRIVATE)
.withPort(1433)
.withSqlAuthUpdateUsername("sqllogin")
- .withSqlAuthUpdatePassword(""))
+ .withSqlAuthUpdatePassword("fakeTokenPlaceholder"))
.withSqlWorkloadTypeUpdateSettings(
new SqlWorkloadTypeUpdateSettings().withSqlWorkloadType(SqlWorkloadType.OLTP))
.withSqlStorageUpdateSettings(
@@ -651,7 +683,9 @@ public final class SqlVirtualMachinesCreateOrUpdateSamples {
.withMinServerMemoryMB(0)
.withMaxServerMemoryMB(128)
.withIsLpimEnabled(true)
- .withIsIfiEnabled(true)))
+ .withIsIfiEnabled(true))
+ .withAzureAdAuthenticationSettings(
+ new AadAuthenticationSettings().withClientId("11111111-2222-3333-4444-555555555555")))
.withAssessmentSettings(
new AssessmentSettings()
.withEnable(true)
@@ -667,7 +701,7 @@ public final class SqlVirtualMachinesCreateOrUpdateSamples {
}
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-07-01-preview/examples/CreateOrUpdateSqlVirtualMachineMIN.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-08-01-preview/examples/CreateOrUpdateSqlVirtualMachineMIN.json
*/
/**
* Sample code: Creates or updates a SQL virtual machine with min parameters.
@@ -691,12 +725,10 @@ public final class SqlVirtualMachinesCreateOrUpdateSamples {
### SqlVirtualMachines_Delete
```java
-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/2022-07-01-preview/examples/DeleteSqlVirtualMachine.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-08-01-preview/examples/DeleteSqlVirtualMachine.json
*/
/**
* Sample code: Deletes a SQL virtual machine.
@@ -705,7 +737,7 @@ public final class SqlVirtualMachinesDeleteSamples {
*/
public static void deletesASQLVirtualMachine(
com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager manager) {
- manager.sqlVirtualMachines().delete("testrg", "testvm1", Context.NONE);
+ manager.sqlVirtualMachines().delete("testrg", "testvm1", com.azure.core.util.Context.NONE);
}
}
```
@@ -713,12 +745,10 @@ public final class SqlVirtualMachinesDeleteSamples {
### SqlVirtualMachines_GetByResourceGroup
```java
-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/2022-07-01-preview/examples/GetSqlVirtualMachine.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-08-01-preview/examples/GetSqlVirtualMachine.json
*/
/**
* Sample code: Gets a SQL virtual machine.
@@ -727,7 +757,9 @@ public final class SqlVirtualMachinesGetByResourceGroupSamples {
*/
public static void getsASQLVirtualMachine(
com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager manager) {
- manager.sqlVirtualMachines().getByResourceGroupWithResponse("testrg", "testvm", null, Context.NONE);
+ manager
+ .sqlVirtualMachines()
+ .getByResourceGroupWithResponse("testrg", "testvm", null, com.azure.core.util.Context.NONE);
}
}
```
@@ -735,12 +767,10 @@ public final class SqlVirtualMachinesGetByResourceGroupSamples {
### SqlVirtualMachines_List
```java
-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/2022-07-01-preview/examples/ListSubscriptionSqlVirtualMachine.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-08-01-preview/examples/ListSubscriptionSqlVirtualMachine.json
*/
/**
* Sample code: Gets all SQL virtual machines in a subscription.
@@ -749,7 +779,7 @@ public final class SqlVirtualMachinesListSamples {
*/
public static void getsAllSQLVirtualMachinesInASubscription(
com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager manager) {
- manager.sqlVirtualMachines().list(Context.NONE);
+ manager.sqlVirtualMachines().list(com.azure.core.util.Context.NONE);
}
}
```
@@ -757,12 +787,10 @@ public final class SqlVirtualMachinesListSamples {
### SqlVirtualMachines_ListByResourceGroup
```java
-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/2022-07-01-preview/examples/ListByResourceGroupSqlVirtualMachine.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-08-01-preview/examples/ListByResourceGroupSqlVirtualMachine.json
*/
/**
* Sample code: Gets all SQL virtual machines in a resource group.
@@ -771,7 +799,7 @@ public final class SqlVirtualMachinesListByResourceGroupSamples {
*/
public static void getsAllSQLVirtualMachinesInAResourceGroup(
com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager manager) {
- manager.sqlVirtualMachines().listByResourceGroup("testrg", Context.NONE);
+ manager.sqlVirtualMachines().listByResourceGroup("testrg", com.azure.core.util.Context.NONE);
}
}
```
@@ -779,12 +807,10 @@ public final class SqlVirtualMachinesListByResourceGroupSamples {
### SqlVirtualMachines_ListBySqlVmGroup
```java
-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/2022-07-01-preview/examples/ListBySqlVirtualMachineGroupSqlVirtualMachine.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-08-01-preview/examples/ListBySqlVirtualMachineGroupSqlVirtualMachine.json
*/
/**
* Sample code: Gets the list of sql virtual machines in a SQL virtual machine group.
@@ -793,7 +819,7 @@ public final class SqlVirtualMachinesListBySqlVmGroupSamples {
*/
public static void getsTheListOfSqlVirtualMachinesInASQLVirtualMachineGroup(
com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager manager) {
- manager.sqlVirtualMachines().listBySqlVmGroup("testrg", "testvm", Context.NONE);
+ manager.sqlVirtualMachines().listBySqlVmGroup("testrg", "testvm", com.azure.core.util.Context.NONE);
}
}
```
@@ -801,21 +827,19 @@ public final class SqlVirtualMachinesListBySqlVmGroupSamples {
### SqlVirtualMachines_Redeploy
```java
-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/2022-07-01-preview/examples/RedeploySqlVirtualMachine.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-08-01-preview/examples/RedeploySqlVirtualMachine.json
*/
/**
- * Sample code: Uninstalls and reinstalls the SQL Iaas Extension.
+ * Sample code: Uninstalls and reinstalls the SQL IaaS Extension.
*
* @param manager Entry point to SqlVirtualMachineManager.
*/
- public static void uninstallsAndReinstallsTheSQLIaasExtension(
+ public static void uninstallsAndReinstallsTheSQLIaaSExtension(
com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager manager) {
- manager.sqlVirtualMachines().redeploy("testrg", "testvm", Context.NONE);
+ manager.sqlVirtualMachines().redeploy("testrg", "testvm", com.azure.core.util.Context.NONE);
}
}
```
@@ -823,21 +847,19 @@ public final class SqlVirtualMachinesRedeploySamples {
### SqlVirtualMachines_StartAssessment
```java
-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/2022-07-01-preview/examples/StartAssessmentOnSqlVirtualMachine.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-08-01-preview/examples/StartAssessmentOnSqlVirtualMachine.json
*/
/**
- * Sample code: Starts Assessment on SQL virtual machine.
+ * Sample code: Starts SQL best practices Assessment on SQL virtual machine.
*
* @param manager Entry point to SqlVirtualMachineManager.
*/
- public static void startsAssessmentOnSQLVirtualMachine(
+ public static void startsSQLBestPracticesAssessmentOnSQLVirtualMachine(
com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager manager) {
- manager.sqlVirtualMachines().startAssessment("testrg", "testvm", Context.NONE);
+ manager.sqlVirtualMachines().startAssessment("testrg", "testvm", com.azure.core.util.Context.NONE);
}
}
```
@@ -845,7 +867,6 @@ public final class SqlVirtualMachinesStartAssessmentSamples {
### SqlVirtualMachines_Update
```java
-import com.azure.core.util.Context;
import com.azure.resourcemanager.sqlvirtualmachine.models.SqlVirtualMachine;
import java.util.HashMap;
import java.util.Map;
@@ -853,7 +874,7 @@ import java.util.Map;
/** Samples for SqlVirtualMachines Update. */
public final class SqlVirtualMachinesUpdateSamples {
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-07-01-preview/examples/UpdateSqlVirtualMachine.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-08-01-preview/examples/UpdateSqlVirtualMachine.json
*/
/**
* Sample code: Updates a SQL virtual machine tags.
@@ -865,7 +886,7 @@ public final class SqlVirtualMachinesUpdateSamples {
SqlVirtualMachine resource =
manager
.sqlVirtualMachines()
- .getByResourceGroupWithResponse("testrg", "testvm", null, Context.NONE)
+ .getByResourceGroupWithResponse("testrg", "testvm", null, com.azure.core.util.Context.NONE)
.getValue();
resource.update().withTags(mapOf("mytag", "myval")).apply();
}
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/pom.xml b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/pom.xml
index 2bf9d17e3fb7a..553beb90a33a5 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/pom.xml
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/pom.xml
@@ -1,3 +1,8 @@
+
4.0.0
@@ -13,7 +18,7 @@
jar
Microsoft 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-2022-07.
+ 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-2022-08.
https://github.com/Azure/azure-sdk-for-java
@@ -38,7 +43,8 @@
UTF-8
- true
+ 0
+ 0
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 0ab9e1cf3756d..b9661d405704c 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
@@ -28,10 +28,12 @@
import com.azure.resourcemanager.sqlvirtualmachine.implementation.OperationsImpl;
import com.azure.resourcemanager.sqlvirtualmachine.implementation.SqlVirtualMachineGroupsImpl;
import com.azure.resourcemanager.sqlvirtualmachine.implementation.SqlVirtualMachineManagementClientBuilder;
+import com.azure.resourcemanager.sqlvirtualmachine.implementation.SqlVirtualMachineTroubleshootsImpl;
import com.azure.resourcemanager.sqlvirtualmachine.implementation.SqlVirtualMachinesImpl;
import com.azure.resourcemanager.sqlvirtualmachine.models.AvailabilityGroupListeners;
import com.azure.resourcemanager.sqlvirtualmachine.models.Operations;
import com.azure.resourcemanager.sqlvirtualmachine.models.SqlVirtualMachineGroups;
+import com.azure.resourcemanager.sqlvirtualmachine.models.SqlVirtualMachineTroubleshoots;
import com.azure.resourcemanager.sqlvirtualmachine.models.SqlVirtualMachines;
import java.time.Duration;
import java.time.temporal.ChronoUnit;
@@ -55,6 +57,8 @@ public final class SqlVirtualMachineManager {
private SqlVirtualMachines sqlVirtualMachines;
+ private SqlVirtualMachineTroubleshoots sqlVirtualMachineTroubleshoots;
+
private final SqlVirtualMachineManagementClient clientObject;
private SqlVirtualMachineManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) {
@@ -220,7 +224,7 @@ public SqlVirtualMachineManager authenticate(TokenCredential credential, AzurePr
.append("-")
.append("com.azure.resourcemanager.sqlvirtualmachine")
.append("/")
- .append("1.0.0-beta.3");
+ .append("1.0.0-beta.1");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder
.append(" (")
@@ -327,6 +331,19 @@ public SqlVirtualMachines sqlVirtualMachines() {
return sqlVirtualMachines;
}
+ /**
+ * Gets the resource collection API of SqlVirtualMachineTroubleshoots.
+ *
+ * @return Resource collection API of SqlVirtualMachineTroubleshoots.
+ */
+ public SqlVirtualMachineTroubleshoots sqlVirtualMachineTroubleshoots() {
+ if (this.sqlVirtualMachineTroubleshoots == null) {
+ this.sqlVirtualMachineTroubleshoots =
+ new SqlVirtualMachineTroubleshootsImpl(clientObject.getSqlVirtualMachineTroubleshoots(), this);
+ }
+ return sqlVirtualMachineTroubleshoots;
+ }
+
/**
* @return Wrapped service client SqlVirtualMachineManagementClient providing direct access to the underlying
* auto-generated API implementation, based on Azure REST API.
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/AvailabilityGroupListenersClient.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/AvailabilityGroupListenersClient.java
index cb42d8dd67e79..660ea62c9184f 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/AvailabilityGroupListenersClient.java
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/AvailabilityGroupListenersClient.java
@@ -22,14 +22,20 @@ public interface AvailabilityGroupListenersClient {
* the Azure Resource Manager API or the portal.
* @param sqlVirtualMachineGroupName Name of the SQL virtual machine group.
* @param availabilityGroupListenerName Name of the availability group listener.
+ * @param expand The child resources to include in the response.
+ * @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 an availability group listener.
+ * @return an availability group listener along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- AvailabilityGroupListenerInner get(
- String resourceGroupName, String sqlVirtualMachineGroupName, String availabilityGroupListenerName);
+ Response getWithResponse(
+ String resourceGroupName,
+ String sqlVirtualMachineGroupName,
+ String availabilityGroupListenerName,
+ String expand,
+ Context context);
/**
* Gets an availability group listener.
@@ -38,20 +44,14 @@ AvailabilityGroupListenerInner get(
* the Azure Resource Manager API or the portal.
* @param sqlVirtualMachineGroupName Name of the SQL virtual machine group.
* @param availabilityGroupListenerName Name of the availability group listener.
- * @param expand The child resources to include in the response.
- * @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 an availability group listener along with {@link Response}.
+ * @return an availability group listener.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response getWithResponse(
- String resourceGroupName,
- String sqlVirtualMachineGroupName,
- String availabilityGroupListenerName,
- String expand,
- Context context);
+ AvailabilityGroupListenerInner get(
+ String resourceGroupName, String sqlVirtualMachineGroupName, String availabilityGroupListenerName);
/**
* Creates or updates an availability group listener.
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/SqlVirtualMachineGroupsClient.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/SqlVirtualMachineGroupsClient.java
index 6eabd134d166e..60f7d6b52e793 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/SqlVirtualMachineGroupsClient.java
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/SqlVirtualMachineGroupsClient.java
@@ -22,13 +22,15 @@ public interface SqlVirtualMachineGroupsClient {
* @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 sqlVirtualMachineGroupName Name of the SQL virtual machine group.
+ * @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 a SQL virtual machine group.
+ * @return a SQL virtual machine group along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- SqlVirtualMachineGroupInner getByResourceGroup(String resourceGroupName, String sqlVirtualMachineGroupName);
+ Response getByResourceGroupWithResponse(
+ String resourceGroupName, String sqlVirtualMachineGroupName, Context context);
/**
* Gets a SQL virtual machine group.
@@ -36,15 +38,13 @@ public interface SqlVirtualMachineGroupsClient {
* @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 sqlVirtualMachineGroupName Name of the SQL virtual machine group.
- * @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 a SQL virtual machine group along with {@link Response}.
+ * @return a SQL virtual machine group.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response getByResourceGroupWithResponse(
- String resourceGroupName, String sqlVirtualMachineGroupName, Context context);
+ SqlVirtualMachineGroupInner getByResourceGroup(String resourceGroupName, String sqlVirtualMachineGroupName);
/**
* Creates or updates a SQL virtual machine group.
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/SqlVirtualMachineManagementClient.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/SqlVirtualMachineManagementClient.java
index 49139deb97022..1c423442e7c55 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/SqlVirtualMachineManagementClient.java
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/SqlVirtualMachineManagementClient.java
@@ -71,4 +71,11 @@ public interface SqlVirtualMachineManagementClient {
* @return the SqlVirtualMachinesClient object.
*/
SqlVirtualMachinesClient getSqlVirtualMachines();
+
+ /**
+ * Gets the SqlVirtualMachineTroubleshootsClient object to access its operations.
+ *
+ * @return the SqlVirtualMachineTroubleshootsClient object.
+ */
+ SqlVirtualMachineTroubleshootsClient getSqlVirtualMachineTroubleshoots();
}
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/SqlVirtualMachineTroubleshootsClient.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/SqlVirtualMachineTroubleshootsClient.java
new file mode 100644
index 0000000000000..dfef8b409cf9f
--- /dev/null
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/SqlVirtualMachineTroubleshootsClient.java
@@ -0,0 +1,81 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.sqlvirtualmachine.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.sqlvirtualmachine.fluent.models.SqlVmTroubleshootingInner;
+
+/** An instance of this class provides access to all the operations defined in SqlVirtualMachineTroubleshootsClient. */
+public interface SqlVirtualMachineTroubleshootsClient {
+ /**
+ * Starts SQL virtual machine troubleshooting.
+ *
+ * @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 parameters The SQL virtual machine troubleshooting entity.
+ * @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 details required for SQL VM troubleshooting.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, SqlVmTroubleshootingInner> beginTroubleshoot(
+ String resourceGroupName, String sqlVirtualMachineName, SqlVmTroubleshootingInner parameters);
+
+ /**
+ * Starts SQL virtual machine troubleshooting.
+ *
+ * @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 parameters The SQL virtual machine troubleshooting entity.
+ * @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 details required for SQL VM troubleshooting.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, SqlVmTroubleshootingInner> beginTroubleshoot(
+ String resourceGroupName, String sqlVirtualMachineName, SqlVmTroubleshootingInner parameters, Context context);
+
+ /**
+ * Starts SQL virtual machine troubleshooting.
+ *
+ * @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 parameters The SQL virtual machine troubleshooting entity.
+ * @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 details required for SQL VM troubleshooting.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SqlVmTroubleshootingInner troubleshoot(
+ String resourceGroupName, String sqlVirtualMachineName, SqlVmTroubleshootingInner parameters);
+
+ /**
+ * Starts SQL virtual machine troubleshooting.
+ *
+ * @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 parameters The SQL virtual machine troubleshooting entity.
+ * @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 details required for SQL VM troubleshooting.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SqlVmTroubleshootingInner troubleshoot(
+ String resourceGroupName, String sqlVirtualMachineName, SqlVmTroubleshootingInner parameters, Context context);
+}
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 8f98c4bbf55e4..9cc6c4e8f1e79 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
@@ -71,94 +71,104 @@ PagedIterable listBySqlVmGroup(
PagedIterable list(Context context);
/**
- * Starts Assessment on SQL virtual machine.
+ * Gets a SQL virtual machine.
*
* @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 expand The child resources to include in the response.
+ * @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.
+ * @return a SQL virtual machine along with {@link Response}.
*/
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, Void> beginStartAssessment(String resourceGroupName, String sqlVirtualMachineName);
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByResourceGroupWithResponse(
+ String resourceGroupName, String sqlVirtualMachineName, String expand, Context context);
/**
- * Starts Assessment on SQL virtual machine.
+ * Gets a SQL virtual machine.
*
* @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.
+ * @return a SQL virtual machine.
*/
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, Void> beginStartAssessment(
- String resourceGroupName, String sqlVirtualMachineName, Context context);
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SqlVirtualMachineInner getByResourceGroup(String resourceGroupName, String sqlVirtualMachineName);
/**
- * Starts Assessment on SQL virtual machine.
+ * Creates or updates a SQL virtual machine.
*
* @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 parameters 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 a SQL virtual machine.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- void startAssessment(String resourceGroupName, String sqlVirtualMachineName);
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, SqlVirtualMachineInner> beginCreateOrUpdate(
+ String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineInner parameters);
/**
- * Starts Assessment on SQL virtual machine.
+ * Creates or updates a SQL virtual machine.
*
* @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 parameters 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 a SQL virtual machine.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- void startAssessment(String resourceGroupName, String sqlVirtualMachineName, Context context);
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, SqlVirtualMachineInner> beginCreateOrUpdate(
+ String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineInner parameters, Context context);
/**
- * Uninstalls and reinstalls the SQL Iaas Extension.
+ * Creates or updates a SQL virtual machine.
*
* @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 parameters 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.
+ * @return a SQL virtual machine.
*/
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, Void> beginRedeploy(String resourceGroupName, String sqlVirtualMachineName);
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SqlVirtualMachineInner createOrUpdate(
+ String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineInner parameters);
/**
- * Uninstalls and reinstalls the SQL Iaas Extension.
+ * Creates or updates a SQL virtual machine.
*
* @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 parameters 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.
+ * @return a SQL virtual machine.
*/
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, Void> beginRedeploy(
- String resourceGroupName, String sqlVirtualMachineName, Context context);
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SqlVirtualMachineInner createOrUpdate(
+ String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineInner parameters, Context context);
/**
- * Uninstalls and reinstalls the SQL Iaas Extension.
+ * Deletes a SQL virtual machine.
*
* @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.
@@ -166,12 +176,13 @@ SyncPoller, Void> beginRedeploy(
* @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.SINGLE)
- void redeploy(String resourceGroupName, String sqlVirtualMachineName);
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String sqlVirtualMachineName);
/**
- * Uninstalls and reinstalls the SQL Iaas Extension.
+ * Deletes a SQL virtual machine.
*
* @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.
@@ -180,12 +191,14 @@ SyncPoller, Void> beginRedeploy(
* @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.SINGLE)
- void redeploy(String resourceGroupName, String sqlVirtualMachineName, Context context);
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(
+ String resourceGroupName, String sqlVirtualMachineName, Context context);
/**
- * Gets a SQL virtual machine.
+ * Deletes a SQL virtual machine.
*
* @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.
@@ -193,30 +206,26 @@ SyncPoller, Void> beginRedeploy(
* @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 a SQL virtual machine.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- SqlVirtualMachineInner getByResourceGroup(String resourceGroupName, String sqlVirtualMachineName);
+ void delete(String resourceGroupName, String sqlVirtualMachineName);
/**
- * Gets a SQL virtual machine.
+ * Deletes a SQL virtual machine.
*
* @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 expand The child resources to include in the response.
* @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 a SQL virtual machine along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response getByResourceGroupWithResponse(
- String resourceGroupName, String sqlVirtualMachineName, String expand, Context context);
+ void delete(String resourceGroupName, String sqlVirtualMachineName, Context context);
/**
- * Creates or updates a SQL virtual machine.
+ * Updates a SQL virtual machine.
*
* @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.
@@ -228,11 +237,11 @@ Response getByResourceGroupWithResponse(
* @return the {@link SyncPoller} for polling of a SQL virtual machine.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, SqlVirtualMachineInner> beginCreateOrUpdate(
- String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineInner parameters);
+ SyncPoller, SqlVirtualMachineInner> beginUpdate(
+ String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineUpdate parameters);
/**
- * Creates or updates a SQL virtual machine.
+ * Updates a SQL virtual machine.
*
* @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.
@@ -245,11 +254,11 @@ SyncPoller, SqlVirtualMachineInner> beginCrea
* @return the {@link SyncPoller} for polling of a SQL virtual machine.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, SqlVirtualMachineInner> beginCreateOrUpdate(
- String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineInner parameters, Context context);
+ SyncPoller, SqlVirtualMachineInner> beginUpdate(
+ String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineUpdate parameters, Context context);
/**
- * Creates or updates a SQL virtual machine.
+ * Updates a SQL virtual machine.
*
* @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.
@@ -261,11 +270,11 @@ SyncPoller, SqlVirtualMachineInner> beginCrea
* @return a SQL virtual machine.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- SqlVirtualMachineInner createOrUpdate(
- String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineInner parameters);
+ SqlVirtualMachineInner update(
+ String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineUpdate parameters);
/**
- * Creates or updates a SQL virtual machine.
+ * Updates a SQL virtual machine.
*
* @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.
@@ -278,41 +287,38 @@ SqlVirtualMachineInner createOrUpdate(
* @return a SQL virtual machine.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- SqlVirtualMachineInner createOrUpdate(
- String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineInner parameters, Context context);
+ SqlVirtualMachineInner update(
+ String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineUpdate parameters, Context context);
/**
- * Deletes a SQL virtual machine.
+ * Gets all SQL virtual machines in a resource group.
*
* @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.
+ * @return all SQL virtual machines in a resource group as paginated response with {@link PagedIterable}.
*/
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, Void> beginDelete(String resourceGroupName, String sqlVirtualMachineName);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName);
/**
- * Deletes a SQL virtual machine.
+ * Gets all SQL virtual machines in a resource group.
*
* @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.
+ * @return all SQL virtual machines in a resource group as paginated response with {@link PagedIterable}.
*/
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, Void> beginDelete(
- String resourceGroupName, String sqlVirtualMachineName, Context context);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName, Context context);
/**
- * Deletes a SQL virtual machine.
+ * Starts SQL best practices Assessment on SQL virtual machine.
*
* @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.
@@ -320,12 +326,13 @@ SyncPoller, Void> beginDelete(
* @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.SINGLE)
- void delete(String resourceGroupName, String sqlVirtualMachineName);
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginStartAssessment(String resourceGroupName, String sqlVirtualMachineName);
/**
- * Deletes a SQL virtual machine.
+ * Starts SQL best practices Assessment on SQL virtual machine.
*
* @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.
@@ -334,100 +341,93 @@ SyncPoller, Void> beginDelete(
* @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.SINGLE)
- void delete(String resourceGroupName, String sqlVirtualMachineName, Context context);
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginStartAssessment(
+ String resourceGroupName, String sqlVirtualMachineName, Context context);
/**
- * Updates a SQL virtual machine.
+ * Starts SQL best practices Assessment on SQL virtual machine.
*
* @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 parameters 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 a SQL virtual machine.
*/
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, SqlVirtualMachineInner> beginUpdate(
- String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineUpdate parameters);
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void startAssessment(String resourceGroupName, String sqlVirtualMachineName);
/**
- * Updates a SQL virtual machine.
+ * Starts SQL best practices Assessment on SQL virtual machine.
*
* @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 parameters 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 a SQL virtual machine.
*/
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, SqlVirtualMachineInner> beginUpdate(
- String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineUpdate parameters, Context context);
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void startAssessment(String resourceGroupName, String sqlVirtualMachineName, Context context);
/**
- * Updates a SQL virtual machine.
+ * 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 parameters 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 a SQL virtual machine.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- SqlVirtualMachineInner update(
- String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineUpdate parameters);
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginRedeploy(String resourceGroupName, String sqlVirtualMachineName);
/**
- * Updates a SQL virtual machine.
+ * 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 parameters 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 a SQL virtual machine.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- SqlVirtualMachineInner update(
- String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineUpdate parameters, Context context);
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginRedeploy(
+ String resourceGroupName, String sqlVirtualMachineName, Context context);
/**
- * Gets all SQL virtual machines in a resource group.
+ * 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 all SQL virtual machines in a resource group as paginated response with {@link PagedIterable}.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listByResourceGroup(String resourceGroupName);
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void redeploy(String resourceGroupName, String sqlVirtualMachineName);
/**
- * Gets all SQL virtual machines in a resource group.
+ * 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 all SQL virtual machines in a resource group as paginated response with {@link PagedIterable}.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listByResourceGroup(String resourceGroupName, Context context);
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void redeploy(String resourceGroupName, String sqlVirtualMachineName, Context context);
}
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 17075ad61dbef..0e815fb2a604b 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
@@ -28,6 +28,10 @@ public final class AvailabilityGroupListenerInner extends ProxyResource {
@JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
private SystemData systemData;
+ /** Creates an instance of AvailabilityGroupListenerInner class. */
+ public AvailabilityGroupListenerInner() {
+ }
+
/**
* Get the innerProperties property: Resource properties.
*
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 75cbd76bde04a..e5c04f8f4d4cc 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
@@ -56,6 +56,10 @@ public final class AvailabilityGroupListenerProperties {
@JsonProperty(value = "availabilityGroupConfiguration")
private AgConfiguration availabilityGroupConfiguration;
+ /** Creates an instance of AvailabilityGroupListenerProperties class. */
+ public AvailabilityGroupListenerProperties() {
+ }
+
/**
* Get the provisioningState property: Provisioning state to track the async operation status.
*
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 492497372282f..591b11e12d4e8 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
@@ -39,6 +39,10 @@ public final class OperationInner {
@JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
private Map properties;
+ /** Creates an instance of OperationInner class. */
+ public OperationInner() {
+ }
+
/**
* Get the name property: The name of the operation being performed on this particular object.
*
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 6de89bd0c3015..c7cfc94d26ae8 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
@@ -30,6 +30,10 @@ public final class SqlVirtualMachineGroupInner extends Resource {
@JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
private SystemData systemData;
+ /** Creates an instance of SqlVirtualMachineGroupInner class. */
+ public SqlVirtualMachineGroupInner() {
+ }
+
/**
* Get the innerProperties property: 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 e892dcac441b4..c815b38803466 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
@@ -58,6 +58,10 @@ public final class SqlVirtualMachineGroupProperties {
@JsonProperty(value = "wsfcDomainProfile")
private WsfcDomainProfile wsfcDomainProfile;
+ /** Creates an instance of SqlVirtualMachineGroupProperties class. */
+ public SqlVirtualMachineGroupProperties() {
+ }
+
/**
* Get the provisioningState property: Provisioning state to track the async operation status.
*
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 635fdf318ec06..a27bb5c9f974d 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
@@ -18,6 +18,7 @@
import com.azure.resourcemanager.sqlvirtualmachine.models.SqlManagementMode;
import com.azure.resourcemanager.sqlvirtualmachine.models.SqlServerLicenseType;
import com.azure.resourcemanager.sqlvirtualmachine.models.StorageConfigurationSettings;
+import com.azure.resourcemanager.sqlvirtualmachine.models.TroubleshootingStatus;
import com.azure.resourcemanager.sqlvirtualmachine.models.WsfcDomainCredentials;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;
@@ -43,6 +44,10 @@ public final class SqlVirtualMachineInner extends Resource {
@JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
private SystemData systemData;
+ /** Creates an instance of SqlVirtualMachineInner class. */
+ public SqlVirtualMachineInner() {
+ }
+
/**
* Get the identity property: Azure Active Directory identity of the server.
*
@@ -440,7 +445,16 @@ public SqlVirtualMachineInner withStorageConfigurationSettings(
}
/**
- * Get the assessmentSettings property: Assessment Settings.
+ * Get the troubleshootingStatus property: Troubleshooting status.
+ *
+ * @return the troubleshootingStatus value.
+ */
+ public TroubleshootingStatus troubleshootingStatus() {
+ return this.innerProperties() == null ? null : this.innerProperties().troubleshootingStatus();
+ }
+
+ /**
+ * Get the assessmentSettings property: SQL best practices Assessment Settings.
*
* @return the assessmentSettings value.
*/
@@ -449,7 +463,7 @@ public AssessmentSettings assessmentSettings() {
}
/**
- * Set the assessmentSettings property: Assessment Settings.
+ * Set the assessmentSettings property: SQL best practices Assessment Settings.
*
* @param assessmentSettings the assessmentSettings value to set.
* @return the SqlVirtualMachineInner object itself.
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 7dac19f416db5..61c055b9b6e6b 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
@@ -15,6 +15,7 @@
import com.azure.resourcemanager.sqlvirtualmachine.models.SqlManagementMode;
import com.azure.resourcemanager.sqlvirtualmachine.models.SqlServerLicenseType;
import com.azure.resourcemanager.sqlvirtualmachine.models.StorageConfigurationSettings;
+import com.azure.resourcemanager.sqlvirtualmachine.models.TroubleshootingStatus;
import com.azure.resourcemanager.sqlvirtualmachine.models.WsfcDomainCredentials;
import com.fasterxml.jackson.annotation.JsonProperty;
@@ -112,7 +113,13 @@ public final class SqlVirtualMachineProperties {
private StorageConfigurationSettings storageConfigurationSettings;
/*
- * Assessment Settings.
+ * Troubleshooting status
+ */
+ @JsonProperty(value = "troubleshootingStatus", access = JsonProperty.Access.WRITE_ONLY)
+ private TroubleshootingStatus troubleshootingStatus;
+
+ /*
+ * SQL best practices Assessment Settings.
*/
@JsonProperty(value = "assessmentSettings")
private AssessmentSettings assessmentSettings;
@@ -123,6 +130,10 @@ public final class SqlVirtualMachineProperties {
@JsonProperty(value = "enableAutomaticUpgrade")
private Boolean enableAutomaticUpgrade;
+ /** Creates an instance of SqlVirtualMachineProperties class. */
+ public SqlVirtualMachineProperties() {
+ }
+
/**
* Get the virtualMachineResourceId property: ARM Resource id of underlying virtual machine created from SQL
* marketplace image.
@@ -426,7 +437,16 @@ public SqlVirtualMachineProperties withStorageConfigurationSettings(
}
/**
- * Get the assessmentSettings property: Assessment Settings.
+ * Get the troubleshootingStatus property: Troubleshooting status.
+ *
+ * @return the troubleshootingStatus value.
+ */
+ public TroubleshootingStatus troubleshootingStatus() {
+ return this.troubleshootingStatus;
+ }
+
+ /**
+ * Get the assessmentSettings property: SQL best practices Assessment Settings.
*
* @return the assessmentSettings value.
*/
@@ -435,7 +455,7 @@ public AssessmentSettings assessmentSettings() {
}
/**
- * Set the assessmentSettings property: Assessment Settings.
+ * Set the assessmentSettings property: SQL best practices Assessment Settings.
*
* @param assessmentSettings the assessmentSettings value to set.
* @return the SqlVirtualMachineProperties object itself.
@@ -489,6 +509,9 @@ public void validate() {
if (storageConfigurationSettings() != null) {
storageConfigurationSettings().validate();
}
+ if (troubleshootingStatus() != null) {
+ troubleshootingStatus().validate();
+ }
if (assessmentSettings() != null) {
assessmentSettings().validate();
}
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/models/SqlVmTroubleshootingInner.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/models/SqlVmTroubleshootingInner.java
new file mode 100644
index 0000000000000..2467c29492f5a
--- /dev/null
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/models/SqlVmTroubleshootingInner.java
@@ -0,0 +1,149 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.sqlvirtualmachine.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.sqlvirtualmachine.models.TroubleshootingAdditionalProperties;
+import com.azure.resourcemanager.sqlvirtualmachine.models.TroubleshootingScenario;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+
+/** Details required for SQL VM troubleshooting. */
+@Fluent
+public final class SqlVmTroubleshootingInner {
+ /*
+ * Start time in UTC timezone.
+ */
+ @JsonProperty(value = "startTimeUtc")
+ private OffsetDateTime startTimeUtc;
+
+ /*
+ * End time in UTC timezone.
+ */
+ @JsonProperty(value = "endTimeUtc")
+ private OffsetDateTime endTimeUtc;
+
+ /*
+ * SQL VM troubleshooting scenario.
+ */
+ @JsonProperty(value = "troubleshootingScenario")
+ private TroubleshootingScenario troubleshootingScenario;
+
+ /*
+ * Troubleshooting properties
+ */
+ @JsonProperty(value = "properties")
+ private TroubleshootingAdditionalProperties properties;
+
+ /*
+ * Virtual machine resource id for response.
+ */
+ @JsonProperty(value = "virtualMachineResourceId", access = JsonProperty.Access.WRITE_ONLY)
+ private String virtualMachineResourceId;
+
+ /** Creates an instance of SqlVmTroubleshootingInner class. */
+ public SqlVmTroubleshootingInner() {
+ }
+
+ /**
+ * Get the startTimeUtc property: Start time in UTC timezone.
+ *
+ * @return the startTimeUtc value.
+ */
+ public OffsetDateTime startTimeUtc() {
+ return this.startTimeUtc;
+ }
+
+ /**
+ * Set the startTimeUtc property: Start time in UTC timezone.
+ *
+ * @param startTimeUtc the startTimeUtc value to set.
+ * @return the SqlVmTroubleshootingInner object itself.
+ */
+ public SqlVmTroubleshootingInner withStartTimeUtc(OffsetDateTime startTimeUtc) {
+ this.startTimeUtc = startTimeUtc;
+ return this;
+ }
+
+ /**
+ * Get the endTimeUtc property: End time in UTC timezone.
+ *
+ * @return the endTimeUtc value.
+ */
+ public OffsetDateTime endTimeUtc() {
+ return this.endTimeUtc;
+ }
+
+ /**
+ * Set the endTimeUtc property: End time in UTC timezone.
+ *
+ * @param endTimeUtc the endTimeUtc value to set.
+ * @return the SqlVmTroubleshootingInner object itself.
+ */
+ public SqlVmTroubleshootingInner withEndTimeUtc(OffsetDateTime endTimeUtc) {
+ this.endTimeUtc = endTimeUtc;
+ return this;
+ }
+
+ /**
+ * Get the troubleshootingScenario property: SQL VM troubleshooting scenario.
+ *
+ * @return the troubleshootingScenario value.
+ */
+ public TroubleshootingScenario troubleshootingScenario() {
+ return this.troubleshootingScenario;
+ }
+
+ /**
+ * Set the troubleshootingScenario property: SQL VM troubleshooting scenario.
+ *
+ * @param troubleshootingScenario the troubleshootingScenario value to set.
+ * @return the SqlVmTroubleshootingInner object itself.
+ */
+ public SqlVmTroubleshootingInner withTroubleshootingScenario(TroubleshootingScenario troubleshootingScenario) {
+ this.troubleshootingScenario = troubleshootingScenario;
+ return this;
+ }
+
+ /**
+ * Get the properties property: Troubleshooting properties.
+ *
+ * @return the properties value.
+ */
+ public TroubleshootingAdditionalProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: Troubleshooting properties.
+ *
+ * @param properties the properties value to set.
+ * @return the SqlVmTroubleshootingInner object itself.
+ */
+ public SqlVmTroubleshootingInner withProperties(TroubleshootingAdditionalProperties properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Get the virtualMachineResourceId property: Virtual machine resource id for response.
+ *
+ * @return the virtualMachineResourceId value.
+ */
+ public String virtualMachineResourceId() {
+ return this.virtualMachineResourceId;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (properties() != null) {
+ properties().validate();
+ }
+ }
+}
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 a5a454e37a7fc..5067bb2fd2945 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
@@ -65,7 +65,7 @@ public final class AvailabilityGroupListenersClientImpl implements AvailabilityG
*/
@Host("{$host}")
@ServiceInterface(name = "SqlVirtualMachineMan")
- private interface AvailabilityGroupListenersService {
+ public interface AvailabilityGroupListenersService {
@Headers({"Content-Type: application/json"})
@Get(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine"
@@ -102,7 +102,7 @@ Mono>> createOrUpdate(
@HeaderParam("Accept") String accept,
Context context);
- @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"})
+ @Headers({"Content-Type: application/json"})
@Delete(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine"
+ "/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/availabilityGroupListeners"
@@ -116,6 +116,7 @@ Mono>> delete(
@PathParam("availabilityGroupListenerName") String availabilityGroupListenerName,
@PathParam("subscriptionId") String subscriptionId,
@QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
Context context);
@Headers({"Content-Type: application/json"})
@@ -280,7 +281,6 @@ private Mono> getWithResponseAsync(
* the Azure Resource Manager API or the portal.
* @param sqlVirtualMachineGroupName Name of the SQL virtual machine group.
* @param availabilityGroupListenerName Name of the availability group listener.
- * @param expand The child resources to include in the response.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -288,10 +288,8 @@ private Mono> getWithResponseAsync(
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono getAsync(
- String resourceGroupName,
- String sqlVirtualMachineGroupName,
- String availabilityGroupListenerName,
- String expand) {
+ String resourceGroupName, String sqlVirtualMachineGroupName, String availabilityGroupListenerName) {
+ final String expand = null;
return getWithResponseAsync(
resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName, expand)
.flatMap(res -> Mono.justOrEmpty(res.getValue()));
@@ -304,18 +302,23 @@ private Mono getAsync(
* the Azure Resource Manager API or the portal.
* @param sqlVirtualMachineGroupName Name of the SQL virtual machine group.
* @param availabilityGroupListenerName Name of the availability group listener.
+ * @param expand The child resources to include in the response.
+ * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return an availability group listener on successful completion of {@link Mono}.
+ * @return an availability group listener along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono getAsync(
- String resourceGroupName, String sqlVirtualMachineGroupName, String availabilityGroupListenerName) {
- final String expand = null;
+ public Response getWithResponse(
+ String resourceGroupName,
+ String sqlVirtualMachineGroupName,
+ String availabilityGroupListenerName,
+ String expand,
+ Context context) {
return getWithResponseAsync(
- resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName, expand)
- .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName, expand, context)
+ .block();
}
/**
@@ -334,33 +337,9 @@ private Mono getAsync(
public AvailabilityGroupListenerInner get(
String resourceGroupName, String sqlVirtualMachineGroupName, String availabilityGroupListenerName) {
final String expand = null;
- return getAsync(resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName, expand).block();
- }
-
- /**
- * Gets an availability group listener.
- *
- * @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 sqlVirtualMachineGroupName Name of the SQL virtual machine group.
- * @param availabilityGroupListenerName Name of the availability group listener.
- * @param expand The child resources to include in the response.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return an availability group listener along with {@link Response}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Response getWithResponse(
- String resourceGroupName,
- String sqlVirtualMachineGroupName,
- String availabilityGroupListenerName,
- String expand,
- Context context) {
- return getWithResponseAsync(
- resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName, expand, context)
- .block();
+ return getWithResponse(
+ resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName, expand, Context.NONE)
+ .getValue();
}
/**
@@ -592,7 +571,8 @@ public SyncPoller, AvailabilityGroupL
String sqlVirtualMachineGroupName,
String availabilityGroupListenerName,
AvailabilityGroupListenerInner parameters) {
- return beginCreateOrUpdateAsync(
+ return this
+ .beginCreateOrUpdateAsync(
resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName, parameters)
.getSyncPoller();
}
@@ -618,7 +598,8 @@ public SyncPoller, AvailabilityGroupL
String availabilityGroupListenerName,
AvailabilityGroupListenerInner parameters,
Context context) {
- return beginCreateOrUpdateAsync(
+ return this
+ .beginCreateOrUpdateAsync(
resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName, parameters, context)
.getSyncPoller();
}
@@ -768,6 +749,7 @@ private Mono>> deleteWithResponseAsync(
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
+ final String accept = "application/json";
return FluxUtil
.withContext(
context ->
@@ -779,6 +761,7 @@ private Mono>> deleteWithResponseAsync(
availabilityGroupListenerName,
this.client.getSubscriptionId(),
this.client.getApiVersion(),
+ accept,
context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
@@ -830,6 +813,7 @@ private Mono>> deleteWithResponseAsync(
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
+ final String accept = "application/json";
context = this.client.mergeContext(context);
return service
.delete(
@@ -839,6 +823,7 @@ private Mono>> deleteWithResponseAsync(
availabilityGroupListenerName,
this.client.getSubscriptionId(),
this.client.getApiVersion(),
+ accept,
context);
}
@@ -908,7 +893,8 @@ private PollerFlux, Void> beginDeleteAsync(
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginDelete(
String resourceGroupName, String sqlVirtualMachineGroupName, String availabilityGroupListenerName) {
- return beginDeleteAsync(resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName)
+ return this
+ .beginDeleteAsync(resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName)
.getSyncPoller();
}
@@ -931,7 +917,8 @@ public SyncPoller, Void> beginDelete(
String sqlVirtualMachineGroupName,
String availabilityGroupListenerName,
Context context) {
- return beginDeleteAsync(resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName, context)
+ return this
+ .beginDeleteAsync(resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName, context)
.getSyncPoller();
}
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 348217a3a979d..97167c8255ff0 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
@@ -28,17 +28,6 @@ public AvailabilityGroupListenersImpl(
this.serviceManager = serviceManager;
}
- public AvailabilityGroupListener get(
- String resourceGroupName, String sqlVirtualMachineGroupName, String availabilityGroupListenerName) {
- AvailabilityGroupListenerInner inner =
- this.serviceClient().get(resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName);
- if (inner != null) {
- return new AvailabilityGroupListenerImpl(inner, this.manager());
- } else {
- return null;
- }
- }
-
public Response getWithResponse(
String resourceGroupName,
String sqlVirtualMachineGroupName,
@@ -61,6 +50,17 @@ public Response getWithResponse(
}
}
+ public AvailabilityGroupListener get(
+ String resourceGroupName, String sqlVirtualMachineGroupName, String availabilityGroupListenerName) {
+ AvailabilityGroupListenerInner inner =
+ this.serviceClient().get(resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName);
+ if (inner != null) {
+ return new AvailabilityGroupListenerImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
public void delete(
String resourceGroupName, String sqlVirtualMachineGroupName, String availabilityGroupListenerName) {
this.serviceClient().delete(resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName);
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 92e07495731a8..01ed433ff78e9 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
@@ -55,7 +55,7 @@ public final class OperationsClientImpl implements OperationsClient {
*/
@Host("{$host}")
@ServiceInterface(name = "SqlVirtualMachineMan")
- private interface OperationsService {
+ public interface OperationsService {
@Headers({"Content-Type: application/json"})
@Get("/providers/Microsoft.SqlVirtualMachine/operations")
@ExpectedResponses({200})
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 fb27fb0a33a5b..d917b0a2c8097 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
@@ -66,7 +66,7 @@ public final class SqlVirtualMachineGroupsClientImpl implements SqlVirtualMachin
*/
@Host("{$host}")
@ServiceInterface(name = "SqlVirtualMachineMan")
- private interface SqlVirtualMachineGroupsService {
+ public interface SqlVirtualMachineGroupsService {
@Headers({"Content-Type: application/json"})
@Get(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine"
@@ -98,7 +98,7 @@ Mono>> createOrUpdate(
@HeaderParam("Accept") String accept,
Context context);
- @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"})
+ @Headers({"Content-Type: application/json"})
@Delete(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine"
+ "/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}")
@@ -110,6 +110,7 @@ Mono>> delete(
@PathParam("sqlVirtualMachineGroupName") String sqlVirtualMachineGroupName,
@PathParam("subscriptionId") String subscriptionId,
@QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
Context context);
@Headers({"Content-Type: application/json"})
@@ -300,14 +301,16 @@ private Mono getByResourceGroupAsync(
* @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 sqlVirtualMachineGroupName Name of the SQL virtual machine group.
+ * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a SQL virtual machine group.
+ * @return a SQL virtual machine group along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public SqlVirtualMachineGroupInner getByResourceGroup(String resourceGroupName, String sqlVirtualMachineGroupName) {
- return getByResourceGroupAsync(resourceGroupName, sqlVirtualMachineGroupName).block();
+ public Response getByResourceGroupWithResponse(
+ String resourceGroupName, String sqlVirtualMachineGroupName, Context context) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, sqlVirtualMachineGroupName, context).block();
}
/**
@@ -316,16 +319,14 @@ public SqlVirtualMachineGroupInner getByResourceGroup(String resourceGroupName,
* @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 sqlVirtualMachineGroupName Name of the SQL virtual machine group.
- * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a SQL virtual machine group along with {@link Response}.
+ * @return a SQL virtual machine group.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response getByResourceGroupWithResponse(
- String resourceGroupName, String sqlVirtualMachineGroupName, Context context) {
- return getByResourceGroupWithResponseAsync(resourceGroupName, sqlVirtualMachineGroupName, context).block();
+ public SqlVirtualMachineGroupInner getByResourceGroup(String resourceGroupName, String sqlVirtualMachineGroupName) {
+ return getByResourceGroupWithResponse(resourceGroupName, sqlVirtualMachineGroupName, Context.NONE).getValue();
}
/**
@@ -521,7 +522,7 @@ private PollerFlux, SqlVirtualMachineGro
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, SqlVirtualMachineGroupInner> beginCreateOrUpdate(
String resourceGroupName, String sqlVirtualMachineGroupName, SqlVirtualMachineGroupInner parameters) {
- return beginCreateOrUpdateAsync(resourceGroupName, sqlVirtualMachineGroupName, parameters).getSyncPoller();
+ return this.beginCreateOrUpdateAsync(resourceGroupName, sqlVirtualMachineGroupName, parameters).getSyncPoller();
}
/**
@@ -543,7 +544,8 @@ public SyncPoller, SqlVirtualMachineGrou
String sqlVirtualMachineGroupName,
SqlVirtualMachineGroupInner parameters,
Context context) {
- return beginCreateOrUpdateAsync(resourceGroupName, sqlVirtualMachineGroupName, parameters, context)
+ return this
+ .beginCreateOrUpdateAsync(resourceGroupName, sqlVirtualMachineGroupName, parameters, context)
.getSyncPoller();
}
@@ -667,6 +669,7 @@ private Mono>> deleteWithResponseAsync(
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
+ final String accept = "application/json";
return FluxUtil
.withContext(
context ->
@@ -677,6 +680,7 @@ private Mono>> deleteWithResponseAsync(
sqlVirtualMachineGroupName,
this.client.getSubscriptionId(),
this.client.getApiVersion(),
+ accept,
context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
@@ -718,6 +722,7 @@ private Mono>> deleteWithResponseAsync(
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
+ final String accept = "application/json";
context = this.client.mergeContext(context);
return service
.delete(
@@ -726,6 +731,7 @@ private Mono>> deleteWithResponseAsync(
sqlVirtualMachineGroupName,
this.client.getSubscriptionId(),
this.client.getApiVersion(),
+ accept,
context);
}
@@ -786,7 +792,7 @@ private PollerFlux, Void> beginDeleteAsync(
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginDelete(String resourceGroupName, String sqlVirtualMachineGroupName) {
- return beginDeleteAsync(resourceGroupName, sqlVirtualMachineGroupName).getSyncPoller();
+ return this.beginDeleteAsync(resourceGroupName, sqlVirtualMachineGroupName).getSyncPoller();
}
/**
@@ -804,7 +810,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName,
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginDelete(
String resourceGroupName, String sqlVirtualMachineGroupName, Context context) {
- return beginDeleteAsync(resourceGroupName, sqlVirtualMachineGroupName, context).getSyncPoller();
+ return this.beginDeleteAsync(resourceGroupName, sqlVirtualMachineGroupName, context).getSyncPoller();
}
/**
@@ -1068,7 +1074,7 @@ private PollerFlux, SqlVirtualMachineGro
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, SqlVirtualMachineGroupInner> beginUpdate(
String resourceGroupName, String sqlVirtualMachineGroupName, SqlVirtualMachineGroupUpdate parameters) {
- return beginUpdateAsync(resourceGroupName, sqlVirtualMachineGroupName, parameters).getSyncPoller();
+ return this.beginUpdateAsync(resourceGroupName, sqlVirtualMachineGroupName, parameters).getSyncPoller();
}
/**
@@ -1090,7 +1096,9 @@ public SyncPoller, SqlVirtualMachineGrou
String sqlVirtualMachineGroupName,
SqlVirtualMachineGroupUpdate parameters,
Context context) {
- return beginUpdateAsync(resourceGroupName, sqlVirtualMachineGroupName, parameters, context).getSyncPoller();
+ return this
+ .beginUpdateAsync(resourceGroupName, sqlVirtualMachineGroupName, parameters, context)
+ .getSyncPoller();
}
/**
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 8710adb16f0d4..2c4b2f5899fce 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
@@ -28,16 +28,6 @@ public SqlVirtualMachineGroupsImpl(
this.serviceManager = serviceManager;
}
- public SqlVirtualMachineGroup getByResourceGroup(String resourceGroupName, String sqlVirtualMachineGroupName) {
- SqlVirtualMachineGroupInner inner =
- this.serviceClient().getByResourceGroup(resourceGroupName, sqlVirtualMachineGroupName);
- if (inner != null) {
- return new SqlVirtualMachineGroupImpl(inner, this.manager());
- } else {
- return null;
- }
- }
-
public Response getByResourceGroupWithResponse(
String resourceGroupName, String sqlVirtualMachineGroupName, Context context) {
Response inner =
@@ -53,6 +43,16 @@ public Response getByResourceGroupWithResponse(
}
}
+ public SqlVirtualMachineGroup getByResourceGroup(String resourceGroupName, String sqlVirtualMachineGroupName) {
+ SqlVirtualMachineGroupInner inner =
+ this.serviceClient().getByResourceGroup(resourceGroupName, sqlVirtualMachineGroupName);
+ if (inner != null) {
+ return new SqlVirtualMachineGroupImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
public void deleteByResourceGroup(String resourceGroupName, String sqlVirtualMachineGroupName) {
this.serviceClient().delete(resourceGroupName, sqlVirtualMachineGroupName);
}
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 f7afdf02b644a..7b5f434de2cc6 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
@@ -21,6 +21,7 @@
import com.azure.resourcemanager.sqlvirtualmachine.models.SqlVirtualMachine;
import com.azure.resourcemanager.sqlvirtualmachine.models.SqlVirtualMachineUpdate;
import com.azure.resourcemanager.sqlvirtualmachine.models.StorageConfigurationSettings;
+import com.azure.resourcemanager.sqlvirtualmachine.models.TroubleshootingStatus;
import com.azure.resourcemanager.sqlvirtualmachine.models.WsfcDomainCredentials;
import java.util.Collections;
import java.util.Map;
@@ -124,6 +125,10 @@ public StorageConfigurationSettings storageConfigurationSettings() {
return this.innerModel().storageConfigurationSettings();
}
+ public TroubleshootingStatus troubleshootingStatus() {
+ return this.innerModel().troubleshootingStatus();
+ }
+
public AssessmentSettings assessmentSettings() {
return this.innerModel().assessmentSettings();
}
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 2899a5797168b..4a2730034fdaf 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
@@ -26,6 +26,7 @@
import com.azure.resourcemanager.sqlvirtualmachine.fluent.OperationsClient;
import com.azure.resourcemanager.sqlvirtualmachine.fluent.SqlVirtualMachineGroupsClient;
import com.azure.resourcemanager.sqlvirtualmachine.fluent.SqlVirtualMachineManagementClient;
+import com.azure.resourcemanager.sqlvirtualmachine.fluent.SqlVirtualMachineTroubleshootsClient;
import com.azure.resourcemanager.sqlvirtualmachine.fluent.SqlVirtualMachinesClient;
import java.io.IOException;
import java.lang.reflect.Type;
@@ -159,6 +160,18 @@ public SqlVirtualMachinesClient getSqlVirtualMachines() {
return this.sqlVirtualMachines;
}
+ /** The SqlVirtualMachineTroubleshootsClient object to access its operations. */
+ private final SqlVirtualMachineTroubleshootsClient sqlVirtualMachineTroubleshoots;
+
+ /**
+ * Gets the SqlVirtualMachineTroubleshootsClient object to access its operations.
+ *
+ * @return the SqlVirtualMachineTroubleshootsClient object.
+ */
+ public SqlVirtualMachineTroubleshootsClient getSqlVirtualMachineTroubleshoots() {
+ return this.sqlVirtualMachineTroubleshoots;
+ }
+
/**
* Initializes an instance of SqlVirtualMachineManagementClient client.
*
@@ -181,11 +194,12 @@ public SqlVirtualMachinesClient getSqlVirtualMachines() {
this.defaultPollInterval = defaultPollInterval;
this.subscriptionId = subscriptionId;
this.endpoint = endpoint;
- this.apiVersion = "2022-07-01-preview";
+ this.apiVersion = "2022-08-01-preview";
this.availabilityGroupListeners = new AvailabilityGroupListenersClientImpl(this);
this.operations = new OperationsClientImpl(this);
this.sqlVirtualMachineGroups = new SqlVirtualMachineGroupsClientImpl(this);
this.sqlVirtualMachines = new SqlVirtualMachinesClientImpl(this);
+ this.sqlVirtualMachineTroubleshoots = new SqlVirtualMachineTroubleshootsClientImpl(this);
}
/**
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/SqlVirtualMachineTroubleshootsClientImpl.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/SqlVirtualMachineTroubleshootsClientImpl.java
new file mode 100644
index 0000000000000..6416c4fd75372
--- /dev/null
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/SqlVirtualMachineTroubleshootsClientImpl.java
@@ -0,0 +1,367 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.sqlvirtualmachine.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Post;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.sqlvirtualmachine.fluent.SqlVirtualMachineTroubleshootsClient;
+import com.azure.resourcemanager.sqlvirtualmachine.fluent.models.SqlVmTroubleshootingInner;
+import java.nio.ByteBuffer;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in SqlVirtualMachineTroubleshootsClient. */
+public final class SqlVirtualMachineTroubleshootsClientImpl implements SqlVirtualMachineTroubleshootsClient {
+ /** The proxy service used to perform REST calls. */
+ private final SqlVirtualMachineTroubleshootsService service;
+
+ /** The service client containing this operation class. */
+ private final SqlVirtualMachineManagementClientImpl client;
+
+ /**
+ * Initializes an instance of SqlVirtualMachineTroubleshootsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ SqlVirtualMachineTroubleshootsClientImpl(SqlVirtualMachineManagementClientImpl client) {
+ this.service =
+ RestProxy
+ .create(
+ SqlVirtualMachineTroubleshootsService.class,
+ client.getHttpPipeline(),
+ client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for SqlVirtualMachineManagementClientSqlVirtualMachineTroubleshoots to be
+ * used by the proxy service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "SqlVirtualMachineMan")
+ public interface SqlVirtualMachineTroubleshootsService {
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine"
+ + "/sqlVirtualMachines/{sqlVirtualMachineName}/troubleshoot")
+ @ExpectedResponses({200, 202})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> troubleshoot(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("sqlVirtualMachineName") String sqlVirtualMachineName,
+ @PathParam("subscriptionId") String subscriptionId,
+ @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") SqlVmTroubleshootingInner parameters,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Starts SQL virtual machine troubleshooting.
+ *
+ * @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 parameters The SQL virtual machine troubleshooting entity.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return details required for SQL VM troubleshooting along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> troubleshootWithResponseAsync(
+ String resourceGroupName, String sqlVirtualMachineName, SqlVmTroubleshootingInner parameters) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (sqlVirtualMachineName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter sqlVirtualMachineName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .troubleshoot(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ sqlVirtualMachineName,
+ this.client.getSubscriptionId(),
+ this.client.getApiVersion(),
+ parameters,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Starts SQL virtual machine troubleshooting.
+ *
+ * @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 parameters The SQL virtual machine troubleshooting entity.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return details required for SQL VM troubleshooting along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> troubleshootWithResponseAsync(
+ String resourceGroupName, String sqlVirtualMachineName, SqlVmTroubleshootingInner parameters, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (sqlVirtualMachineName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter sqlVirtualMachineName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .troubleshoot(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ sqlVirtualMachineName,
+ this.client.getSubscriptionId(),
+ this.client.getApiVersion(),
+ parameters,
+ accept,
+ context);
+ }
+
+ /**
+ * Starts SQL virtual machine troubleshooting.
+ *
+ * @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 parameters The SQL virtual machine troubleshooting entity.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 PollerFlux} for polling of details required for SQL VM troubleshooting.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, SqlVmTroubleshootingInner> beginTroubleshootAsync(
+ String resourceGroupName, String sqlVirtualMachineName, SqlVmTroubleshootingInner parameters) {
+ Mono>> mono =
+ troubleshootWithResponseAsync(resourceGroupName, sqlVirtualMachineName, parameters);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ SqlVmTroubleshootingInner.class,
+ SqlVmTroubleshootingInner.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Starts SQL virtual machine troubleshooting.
+ *
+ * @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 parameters The SQL virtual machine troubleshooting entity.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 PollerFlux} for polling of details required for SQL VM troubleshooting.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, SqlVmTroubleshootingInner> beginTroubleshootAsync(
+ String resourceGroupName, String sqlVirtualMachineName, SqlVmTroubleshootingInner parameters, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ troubleshootWithResponseAsync(resourceGroupName, sqlVirtualMachineName, parameters, context);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ SqlVmTroubleshootingInner.class,
+ SqlVmTroubleshootingInner.class,
+ context);
+ }
+
+ /**
+ * Starts SQL virtual machine troubleshooting.
+ *
+ * @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 parameters The SQL virtual machine troubleshooting entity.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 details required for SQL VM troubleshooting.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, SqlVmTroubleshootingInner> beginTroubleshoot(
+ String resourceGroupName, String sqlVirtualMachineName, SqlVmTroubleshootingInner parameters) {
+ return this.beginTroubleshootAsync(resourceGroupName, sqlVirtualMachineName, parameters).getSyncPoller();
+ }
+
+ /**
+ * Starts SQL virtual machine troubleshooting.
+ *
+ * @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 parameters The SQL virtual machine troubleshooting entity.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 details required for SQL VM troubleshooting.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, SqlVmTroubleshootingInner> beginTroubleshoot(
+ String resourceGroupName, String sqlVirtualMachineName, SqlVmTroubleshootingInner parameters, Context context) {
+ return this
+ .beginTroubleshootAsync(resourceGroupName, sqlVirtualMachineName, parameters, context)
+ .getSyncPoller();
+ }
+
+ /**
+ * Starts SQL virtual machine troubleshooting.
+ *
+ * @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 parameters The SQL virtual machine troubleshooting entity.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return details required for SQL VM troubleshooting on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono troubleshootAsync(
+ String resourceGroupName, String sqlVirtualMachineName, SqlVmTroubleshootingInner parameters) {
+ return beginTroubleshootAsync(resourceGroupName, sqlVirtualMachineName, parameters)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Starts SQL virtual machine troubleshooting.
+ *
+ * @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 parameters The SQL virtual machine troubleshooting entity.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return details required for SQL VM troubleshooting on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono troubleshootAsync(
+ String resourceGroupName, String sqlVirtualMachineName, SqlVmTroubleshootingInner parameters, Context context) {
+ return beginTroubleshootAsync(resourceGroupName, sqlVirtualMachineName, parameters, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Starts SQL virtual machine troubleshooting.
+ *
+ * @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 parameters The SQL virtual machine troubleshooting entity.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return details required for SQL VM troubleshooting.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SqlVmTroubleshootingInner troubleshoot(
+ String resourceGroupName, String sqlVirtualMachineName, SqlVmTroubleshootingInner parameters) {
+ return troubleshootAsync(resourceGroupName, sqlVirtualMachineName, parameters).block();
+ }
+
+ /**
+ * Starts SQL virtual machine troubleshooting.
+ *
+ * @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 parameters The SQL virtual machine troubleshooting entity.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return details required for SQL VM troubleshooting.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SqlVmTroubleshootingInner troubleshoot(
+ String resourceGroupName, String sqlVirtualMachineName, SqlVmTroubleshootingInner parameters, Context context) {
+ return troubleshootAsync(resourceGroupName, sqlVirtualMachineName, parameters, context).block();
+ }
+}
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/SqlVirtualMachineTroubleshootsImpl.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/SqlVirtualMachineTroubleshootsImpl.java
new file mode 100644
index 0000000000000..928be8ddba098
--- /dev/null
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/SqlVirtualMachineTroubleshootsImpl.java
@@ -0,0 +1,57 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.sqlvirtualmachine.implementation;
+
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.sqlvirtualmachine.fluent.SqlVirtualMachineTroubleshootsClient;
+import com.azure.resourcemanager.sqlvirtualmachine.fluent.models.SqlVmTroubleshootingInner;
+import com.azure.resourcemanager.sqlvirtualmachine.models.SqlVirtualMachineTroubleshoots;
+import com.azure.resourcemanager.sqlvirtualmachine.models.SqlVmTroubleshooting;
+
+public final class SqlVirtualMachineTroubleshootsImpl implements SqlVirtualMachineTroubleshoots {
+ private static final ClientLogger LOGGER = new ClientLogger(SqlVirtualMachineTroubleshootsImpl.class);
+
+ private final SqlVirtualMachineTroubleshootsClient innerClient;
+
+ private final com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager serviceManager;
+
+ public SqlVirtualMachineTroubleshootsImpl(
+ SqlVirtualMachineTroubleshootsClient innerClient,
+ com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public SqlVmTroubleshooting troubleshoot(
+ String resourceGroupName, String sqlVirtualMachineName, SqlVmTroubleshootingInner parameters) {
+ SqlVmTroubleshootingInner inner =
+ this.serviceClient().troubleshoot(resourceGroupName, sqlVirtualMachineName, parameters);
+ if (inner != null) {
+ return new SqlVmTroubleshootingImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public SqlVmTroubleshooting troubleshoot(
+ String resourceGroupName, String sqlVirtualMachineName, SqlVmTroubleshootingInner parameters, Context context) {
+ SqlVmTroubleshootingInner inner =
+ this.serviceClient().troubleshoot(resourceGroupName, sqlVirtualMachineName, parameters, context);
+ if (inner != null) {
+ return new SqlVmTroubleshootingImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ private SqlVirtualMachineTroubleshootsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/SqlVirtualMachinesClientImpl.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/SqlVirtualMachinesClientImpl.java
index 93d14191fc38a..22b2f0e4f725a 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/SqlVirtualMachinesClientImpl.java
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/SqlVirtualMachinesClientImpl.java
@@ -66,7 +66,7 @@ public final class SqlVirtualMachinesClientImpl implements SqlVirtualMachinesCli
*/
@Host("{$host}")
@ServiceInterface(name = "SqlVirtualMachineMan")
- private interface SqlVirtualMachinesService {
+ public interface SqlVirtualMachinesService {
@Headers({"Content-Type: application/json"})
@Get(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine"
@@ -93,34 +93,6 @@ Mono> list(
@HeaderParam("Accept") String accept,
Context context);
- @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"})
- @Post(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine"
- + "/sqlVirtualMachines/{sqlVirtualMachineName}/startAssessment")
- @ExpectedResponses({200, 202})
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono>> startAssessment(
- @HostParam("$host") String endpoint,
- @PathParam("resourceGroupName") String resourceGroupName,
- @PathParam("sqlVirtualMachineName") String sqlVirtualMachineName,
- @PathParam("subscriptionId") String subscriptionId,
- @QueryParam("api-version") String apiVersion,
- Context context);
-
- @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"})
- @Post(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine"
- + "/sqlVirtualMachines/{sqlVirtualMachineName}/redeploy")
- @ExpectedResponses({200, 202})
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono>> redeploy(
- @HostParam("$host") String endpoint,
- @PathParam("resourceGroupName") String resourceGroupName,
- @PathParam("sqlVirtualMachineName") String sqlVirtualMachineName,
- @PathParam("subscriptionId") String subscriptionId,
- @QueryParam("api-version") String apiVersion,
- Context context);
-
@Headers({"Content-Type: application/json"})
@Get(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine"
@@ -153,7 +125,7 @@ Mono>> createOrUpdate(
@HeaderParam("Accept") String accept,
Context context);
- @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"})
+ @Headers({"Content-Type: application/json"})
@Delete(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine"
+ "/sqlVirtualMachines/{sqlVirtualMachineName}")
@@ -165,6 +137,7 @@ Mono>> delete(
@PathParam("sqlVirtualMachineName") String sqlVirtualMachineName,
@PathParam("subscriptionId") String subscriptionId,
@QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
Context context);
@Headers({"Content-Type: application/json"})
@@ -197,6 +170,36 @@ Mono> listByResourceGroup(
@HeaderParam("Accept") String accept,
Context context);
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine"
+ + "/sqlVirtualMachines/{sqlVirtualMachineName}/startAssessment")
+ @ExpectedResponses({200, 202})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> startAssessment(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("sqlVirtualMachineName") String sqlVirtualMachineName,
+ @PathParam("subscriptionId") String subscriptionId,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine"
+ + "/sqlVirtualMachines/{sqlVirtualMachineName}/redeploy")
+ @ExpectedResponses({200, 202})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> redeploy(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("sqlVirtualMachineName") String sqlVirtualMachineName,
+ @PathParam("subscriptionId") String subscriptionId,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
@Headers({"Content-Type: application/json"})
@Get("{nextLink}")
@ExpectedResponses({200})
@@ -571,19 +574,20 @@ public PagedIterable list(Context context) {
}
/**
- * Starts Assessment on SQL virtual machine.
+ * Gets a SQL virtual machine.
*
* @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 expand The child resources to include in the response.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 Response} on successful completion of {@link Mono}.
+ * @return a SQL virtual machine along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> startAssessmentWithResponseAsync(
- String resourceGroupName, String sqlVirtualMachineName) {
+ private Mono> getByResourceGroupWithResponseAsync(
+ String resourceGroupName, String sqlVirtualMachineName, String expand) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
@@ -604,35 +608,39 @@ private Mono>> startAssessmentWithResponseAsync(
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
+ final String accept = "application/json";
return FluxUtil
.withContext(
context ->
service
- .startAssessment(
+ .getByResourceGroup(
this.client.getEndpoint(),
resourceGroupName,
sqlVirtualMachineName,
+ expand,
this.client.getSubscriptionId(),
this.client.getApiVersion(),
+ accept,
context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
- * Starts Assessment on SQL virtual machine.
+ * Gets a SQL virtual machine.
*
* @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 expand The child resources to include in the response.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 Response} on successful completion of {@link Mono}.
+ * @return a SQL virtual machine along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> startAssessmentWithResponseAsync(
- String resourceGroupName, String sqlVirtualMachineName, Context context) {
+ private Mono> getByResourceGroupWithResponseAsync(
+ String resourceGroupName, String sqlVirtualMachineName, String expand, Context context) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
@@ -653,99 +661,22 @@ private Mono>> startAssessmentWithResponseAsync(
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
+ final String accept = "application/json";
context = this.client.mergeContext(context);
return service
- .startAssessment(
+ .getByResourceGroup(
this.client.getEndpoint(),
resourceGroupName,
sqlVirtualMachineName,
+ expand,
this.client.getSubscriptionId(),
this.client.getApiVersion(),
+ accept,
context);
}
/**
- * Starts Assessment on SQL virtual machine.
- *
- * @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 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 PollerFlux} for polling of long-running operation.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, Void> beginStartAssessmentAsync(
- String resourceGroupName, String sqlVirtualMachineName) {
- Mono>> mono =
- startAssessmentWithResponseAsync(resourceGroupName, sqlVirtualMachineName);
- return this
- .client
- .getLroResult(
- mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext());
- }
-
- /**
- * Starts Assessment on SQL virtual machine.
- *
- * @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 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 PollerFlux} for polling of long-running operation.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, Void> beginStartAssessmentAsync(
- String resourceGroupName, String sqlVirtualMachineName, Context context) {
- context = this.client.mergeContext(context);
- Mono>> mono =
- startAssessmentWithResponseAsync(resourceGroupName, sqlVirtualMachineName, context);
- return this
- .client
- .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context);
- }
-
- /**
- * Starts Assessment on SQL virtual machine.
- *
- * @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 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)
- public SyncPoller, Void> beginStartAssessment(
- String resourceGroupName, String sqlVirtualMachineName) {
- return beginStartAssessmentAsync(resourceGroupName, sqlVirtualMachineName).getSyncPoller();
- }
-
- /**
- * Starts Assessment on SQL virtual machine.
- *
- * @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 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)
- public SyncPoller, Void> beginStartAssessment(
- String resourceGroupName, String sqlVirtualMachineName, Context context) {
- return beginStartAssessmentAsync(resourceGroupName, sqlVirtualMachineName, context).getSyncPoller();
- }
-
- /**
- * Starts Assessment on SQL virtual machine.
+ * Gets a SQL virtual machine.
*
* @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.
@@ -753,79 +684,68 @@ public SyncPoller, Void> beginStartAssessment(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return A {@link Mono} that completes when a successful response is received.
+ * @return a SQL virtual machine on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono startAssessmentAsync(String resourceGroupName, String sqlVirtualMachineName) {
- return beginStartAssessmentAsync(resourceGroupName, sqlVirtualMachineName)
- .last()
- .flatMap(this.client::getLroFinalResultOrError);
+ private Mono getByResourceGroupAsync(
+ String resourceGroupName, String sqlVirtualMachineName) {
+ final String expand = null;
+ return getByResourceGroupWithResponseAsync(resourceGroupName, sqlVirtualMachineName, expand)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
- * Starts Assessment on SQL virtual machine.
+ * Gets a SQL virtual machine.
*
* @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 expand The child resources to include in the response.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return A {@link Mono} that completes when a successful response is received.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono startAssessmentAsync(String resourceGroupName, String sqlVirtualMachineName, Context context) {
- return beginStartAssessmentAsync(resourceGroupName, sqlVirtualMachineName, context)
- .last()
- .flatMap(this.client::getLroFinalResultOrError);
- }
-
- /**
- * Starts Assessment on SQL virtual machine.
- *
- * @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 ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a SQL virtual machine along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public void startAssessment(String resourceGroupName, String sqlVirtualMachineName) {
- startAssessmentAsync(resourceGroupName, sqlVirtualMachineName).block();
+ public Response getByResourceGroupWithResponse(
+ String resourceGroupName, String sqlVirtualMachineName, String expand, Context context) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, sqlVirtualMachineName, expand, context).block();
}
/**
- * Starts Assessment on SQL virtual machine.
+ * Gets a SQL virtual machine.
*
* @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 ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a SQL virtual machine.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public void startAssessment(String resourceGroupName, String sqlVirtualMachineName, Context context) {
- startAssessmentAsync(resourceGroupName, sqlVirtualMachineName, context).block();
+ public SqlVirtualMachineInner getByResourceGroup(String resourceGroupName, String sqlVirtualMachineName) {
+ final String expand = null;
+ return getByResourceGroupWithResponse(resourceGroupName, sqlVirtualMachineName, expand, Context.NONE)
+ .getValue();
}
/**
- * Uninstalls and reinstalls the SQL Iaas Extension.
+ * Creates or updates a SQL virtual machine.
*
* @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 parameters The SQL virtual machine.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 Response} on successful completion of {@link Mono}.
+ * @return a SQL virtual machine along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> redeployWithResponseAsync(
- String resourceGroupName, String sqlVirtualMachineName) {
+ private Mono>> createOrUpdateWithResponseAsync(
+ String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineInner parameters) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
@@ -846,35 +766,44 @@ private Mono>> redeployWithResponseAsync(
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
+ if (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
return FluxUtil
.withContext(
context ->
service
- .redeploy(
+ .createOrUpdate(
this.client.getEndpoint(),
resourceGroupName,
sqlVirtualMachineName,
this.client.getSubscriptionId(),
this.client.getApiVersion(),
+ parameters,
+ accept,
context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
- * Uninstalls and reinstalls the SQL Iaas Extension.
+ * Creates or updates a SQL virtual machine.
*
* @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 parameters The SQL virtual machine.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 Response} on successful completion of {@link Mono}.
+ * @return a SQL virtual machine along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> redeployWithResponseAsync(
- String resourceGroupName, String sqlVirtualMachineName, Context context) {
+ private Mono>> createOrUpdateWithResponseAsync(
+ String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineInner parameters, Context context) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
@@ -895,178 +824,212 @@ private Mono>> redeployWithResponseAsync(
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
+ if (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
context = this.client.mergeContext(context);
return service
- .redeploy(
+ .createOrUpdate(
this.client.getEndpoint(),
resourceGroupName,
sqlVirtualMachineName,
this.client.getSubscriptionId(),
this.client.getApiVersion(),
+ parameters,
+ accept,
context);
}
/**
- * Uninstalls and reinstalls the SQL Iaas Extension.
+ * Creates or updates a SQL virtual machine.
*
* @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 parameters The SQL virtual machine.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 PollerFlux} for polling of long-running operation.
+ * @return the {@link PollerFlux} for polling of a SQL virtual machine.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, Void> beginRedeployAsync(
- String resourceGroupName, String sqlVirtualMachineName) {
- Mono>> mono = redeployWithResponseAsync(resourceGroupName, sqlVirtualMachineName);
+ private PollerFlux, SqlVirtualMachineInner> beginCreateOrUpdateAsync(
+ String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineInner parameters) {
+ Mono>> mono =
+ createOrUpdateWithResponseAsync(resourceGroupName, sqlVirtualMachineName, parameters);
return this
.client
- .getLroResult(
- mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext());
- }
-
- /**
- * Uninstalls and reinstalls the SQL Iaas Extension.
- *
- * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ SqlVirtualMachineInner.class,
+ SqlVirtualMachineInner.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Creates or updates a SQL virtual machine.
+ *
+ * @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 parameters The SQL virtual machine.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 PollerFlux} for polling of long-running operation.
+ * @return the {@link PollerFlux} for polling of a SQL virtual machine.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, Void> beginRedeployAsync(
- String resourceGroupName, String sqlVirtualMachineName, Context context) {
+ private PollerFlux, SqlVirtualMachineInner> beginCreateOrUpdateAsync(
+ String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineInner parameters, Context context) {
context = this.client.mergeContext(context);
Mono>> mono =
- redeployWithResponseAsync(resourceGroupName, sqlVirtualMachineName, context);
+ createOrUpdateWithResponseAsync(resourceGroupName, sqlVirtualMachineName, parameters, context);
return this
.client
- .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context);
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ SqlVirtualMachineInner.class,
+ SqlVirtualMachineInner.class,
+ context);
}
/**
- * Uninstalls and reinstalls the SQL Iaas Extension.
+ * Creates or updates a SQL virtual machine.
*
* @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 parameters The SQL virtual machine.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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.
+ * @return the {@link SyncPoller} for polling of a SQL virtual machine.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- public SyncPoller, Void> beginRedeploy(String resourceGroupName, String sqlVirtualMachineName) {
- return beginRedeployAsync(resourceGroupName, sqlVirtualMachineName).getSyncPoller();
+ public SyncPoller, SqlVirtualMachineInner> beginCreateOrUpdate(
+ String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineInner parameters) {
+ return this.beginCreateOrUpdateAsync(resourceGroupName, sqlVirtualMachineName, parameters).getSyncPoller();
}
/**
- * Uninstalls and reinstalls the SQL Iaas Extension.
+ * Creates or updates a SQL virtual machine.
*
* @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 parameters The SQL virtual machine.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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.
+ * @return the {@link SyncPoller} for polling of a SQL virtual machine.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- public SyncPoller, Void> beginRedeploy(
- String resourceGroupName, String sqlVirtualMachineName, Context context) {
- return beginRedeployAsync(resourceGroupName, sqlVirtualMachineName, context).getSyncPoller();
+ public SyncPoller, SqlVirtualMachineInner> beginCreateOrUpdate(
+ String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineInner parameters, Context context) {
+ return this
+ .beginCreateOrUpdateAsync(resourceGroupName, sqlVirtualMachineName, parameters, context)
+ .getSyncPoller();
}
/**
- * Uninstalls and reinstalls the SQL Iaas Extension.
+ * Creates or updates a SQL virtual machine.
*
* @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 parameters The SQL virtual machine.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return A {@link Mono} that completes when a successful response is received.
+ * @return a SQL virtual machine on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono redeployAsync(String resourceGroupName, String sqlVirtualMachineName) {
- return beginRedeployAsync(resourceGroupName, sqlVirtualMachineName)
+ private Mono createOrUpdateAsync(
+ String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineInner parameters) {
+ return beginCreateOrUpdateAsync(resourceGroupName, sqlVirtualMachineName, parameters)
.last()
.flatMap(this.client::getLroFinalResultOrError);
}
/**
- * Uninstalls and reinstalls the SQL Iaas Extension.
+ * Creates or updates a SQL virtual machine.
*
* @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 parameters The SQL virtual machine.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return A {@link Mono} that completes when a successful response is received.
+ * @return a SQL virtual machine on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono redeployAsync(String resourceGroupName, String sqlVirtualMachineName, Context context) {
- return beginRedeployAsync(resourceGroupName, sqlVirtualMachineName, context)
+ private Mono createOrUpdateAsync(
+ String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineInner parameters, Context context) {
+ return beginCreateOrUpdateAsync(resourceGroupName, sqlVirtualMachineName, parameters, context)
.last()
.flatMap(this.client::getLroFinalResultOrError);
}
/**
- * Uninstalls and reinstalls the SQL Iaas Extension.
+ * Creates or updates a SQL virtual machine.
*
* @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 parameters The SQL virtual machine.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a SQL virtual machine.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public void redeploy(String resourceGroupName, String sqlVirtualMachineName) {
- redeployAsync(resourceGroupName, sqlVirtualMachineName).block();
+ public SqlVirtualMachineInner createOrUpdate(
+ String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineInner parameters) {
+ return createOrUpdateAsync(resourceGroupName, sqlVirtualMachineName, parameters).block();
}
/**
- * Uninstalls and reinstalls the SQL Iaas Extension.
+ * Creates or updates a SQL virtual machine.
*
* @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 parameters The SQL virtual machine.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a SQL virtual machine.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public void redeploy(String resourceGroupName, String sqlVirtualMachineName, Context context) {
- redeployAsync(resourceGroupName, sqlVirtualMachineName, context).block();
+ public SqlVirtualMachineInner createOrUpdate(
+ String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineInner parameters, Context context) {
+ return createOrUpdateAsync(resourceGroupName, sqlVirtualMachineName, parameters, context).block();
}
/**
- * Gets a SQL virtual machine.
+ * Deletes a SQL virtual machine.
*
* @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 expand The child resources to include in the response.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a SQL virtual machine along with {@link Response} on successful completion of {@link Mono}.
+ * @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> getByResourceGroupWithResponseAsync(
- String resourceGroupName, String sqlVirtualMachineName, String expand) {
+ private Mono>> deleteWithResponseAsync(
+ String resourceGroupName, String sqlVirtualMachineName) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
@@ -1092,11 +1055,10 @@ private Mono> getByResourceGroupWithResponseAsy
.withContext(
context ->
service
- .getByResourceGroup(
+ .delete(
this.client.getEndpoint(),
resourceGroupName,
sqlVirtualMachineName,
- expand,
this.client.getSubscriptionId(),
this.client.getApiVersion(),
accept,
@@ -1105,21 +1067,20 @@ private Mono> getByResourceGroupWithResponseAsy
}
/**
- * Gets a SQL virtual machine.
+ * Deletes a SQL virtual machine.
*
* @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 expand The child resources to include in the response.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a SQL virtual machine along with {@link Response} on successful completion of {@link Mono}.
+ * @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> getByResourceGroupWithResponseAsync(
- String resourceGroupName, String sqlVirtualMachineName, String expand, Context context) {
+ private Mono>> deleteWithResponseAsync(
+ String resourceGroupName, String sqlVirtualMachineName, Context context) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
@@ -1143,11 +1104,10 @@ private Mono> getByResourceGroupWithResponseAsy
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
- .getByResourceGroup(
+ .delete(
this.client.getEndpoint(),
resourceGroupName,
sqlVirtualMachineName,
- expand,
this.client.getSubscriptionId(),
this.client.getApiVersion(),
accept,
@@ -1155,45 +1115,122 @@ private Mono> getByResourceGroupWithResponseAsy
}
/**
- * Gets a SQL virtual machine.
+ * Deletes a SQL virtual machine.
*
* @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 expand The child resources to include in the response.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a SQL virtual machine on successful completion of {@link Mono}.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginDeleteAsync(
+ String resourceGroupName, String sqlVirtualMachineName) {
+ Mono>> mono = deleteWithResponseAsync(resourceGroupName, sqlVirtualMachineName);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext());
+ }
+
+ /**
+ * Deletes a SQL virtual machine.
+ *
+ * @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 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 PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginDeleteAsync(
+ String resourceGroupName, String sqlVirtualMachineName, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ deleteWithResponseAsync(resourceGroupName, sqlVirtualMachineName, context);
+ return this
+ .client
+ .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context);
+ }
+
+ /**
+ * Deletes a SQL virtual machine.
+ *
+ * @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 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)
+ public SyncPoller, Void> beginDelete(String resourceGroupName, String sqlVirtualMachineName) {
+ return this.beginDeleteAsync(resourceGroupName, sqlVirtualMachineName).getSyncPoller();
+ }
+
+ /**
+ * Deletes a SQL virtual machine.
+ *
+ * @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 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)
+ public SyncPoller, Void> beginDelete(
+ String resourceGroupName, String sqlVirtualMachineName, Context context) {
+ return this.beginDeleteAsync(resourceGroupName, sqlVirtualMachineName, context).getSyncPoller();
+ }
+
+ /**
+ * Deletes a SQL virtual machine.
+ *
+ * @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 ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono getByResourceGroupAsync(
- String resourceGroupName, String sqlVirtualMachineName, String expand) {
- return getByResourceGroupWithResponseAsync(resourceGroupName, sqlVirtualMachineName, expand)
- .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ private Mono deleteAsync(String resourceGroupName, String sqlVirtualMachineName) {
+ return beginDeleteAsync(resourceGroupName, sqlVirtualMachineName)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
}
/**
- * Gets a SQL virtual machine.
+ * Deletes a SQL virtual machine.
*
* @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 ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a SQL virtual machine on successful completion of {@link Mono}.
+ * @return A {@link Mono} that completes when a successful response is received.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono getByResourceGroupAsync(
- String resourceGroupName, String sqlVirtualMachineName) {
- final String expand = null;
- return getByResourceGroupWithResponseAsync(resourceGroupName, sqlVirtualMachineName, expand)
- .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ private Mono deleteAsync(String resourceGroupName, String sqlVirtualMachineName, Context context) {
+ return beginDeleteAsync(resourceGroupName, sqlVirtualMachineName, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
}
/**
- * Gets a SQL virtual machine.
+ * Deletes a SQL virtual machine.
*
* @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.
@@ -1201,35 +1238,30 @@ private Mono getByResourceGroupAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a SQL virtual machine.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public SqlVirtualMachineInner getByResourceGroup(String resourceGroupName, String sqlVirtualMachineName) {
- final String expand = null;
- return getByResourceGroupAsync(resourceGroupName, sqlVirtualMachineName, expand).block();
+ public void delete(String resourceGroupName, String sqlVirtualMachineName) {
+ deleteAsync(resourceGroupName, sqlVirtualMachineName).block();
}
/**
- * Gets a SQL virtual machine.
+ * Deletes a SQL virtual machine.
*
* @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 expand The child resources to include in the response.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a SQL virtual machine along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response getByResourceGroupWithResponse(
- String resourceGroupName, String sqlVirtualMachineName, String expand, Context context) {
- return getByResourceGroupWithResponseAsync(resourceGroupName, sqlVirtualMachineName, expand, context).block();
+ public void delete(String resourceGroupName, String sqlVirtualMachineName, Context context) {
+ deleteAsync(resourceGroupName, sqlVirtualMachineName, context).block();
}
/**
- * Creates or updates a SQL virtual machine.
+ * Updates a SQL virtual machine.
*
* @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.
@@ -1241,8 +1273,8 @@ public Response getByResourceGroupWithResponse(
* @return a SQL virtual machine along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> createOrUpdateWithResponseAsync(
- String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineInner parameters) {
+ private Mono>> updateWithResponseAsync(
+ String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineUpdate parameters) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
@@ -1273,7 +1305,7 @@ private Mono>> createOrUpdateWithResponseAsync(
.withContext(
context ->
service
- .createOrUpdate(
+ .update(
this.client.getEndpoint(),
resourceGroupName,
sqlVirtualMachineName,
@@ -1286,7 +1318,7 @@ private Mono>> createOrUpdateWithResponseAsync(
}
/**
- * Creates or updates a SQL virtual machine.
+ * Updates a SQL virtual machine.
*
* @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.
@@ -1299,8 +1331,8 @@ private Mono>> createOrUpdateWithResponseAsync(
* @return a SQL virtual machine along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> createOrUpdateWithResponseAsync(
- String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineInner parameters, Context context) {
+ private Mono>> updateWithResponseAsync(
+ String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineUpdate parameters, Context context) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
@@ -1329,7 +1361,7 @@ private Mono>> createOrUpdateWithResponseAsync(
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
- .createOrUpdate(
+ .update(
this.client.getEndpoint(),
resourceGroupName,
sqlVirtualMachineName,
@@ -1341,7 +1373,7 @@ private Mono>> createOrUpdateWithResponseAsync(
}
/**
- * Creates or updates a SQL virtual machine.
+ * Updates a SQL virtual machine.
*
* @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.
@@ -1353,10 +1385,10 @@ private Mono>> createOrUpdateWithResponseAsync(
* @return the {@link PollerFlux} for polling of a SQL virtual machine.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, SqlVirtualMachineInner> beginCreateOrUpdateAsync(
- String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineInner parameters) {
+ private PollerFlux, SqlVirtualMachineInner> beginUpdateAsync(
+ String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineUpdate parameters) {
Mono>> mono =
- createOrUpdateWithResponseAsync(resourceGroupName, sqlVirtualMachineName, parameters);
+ updateWithResponseAsync(resourceGroupName, sqlVirtualMachineName, parameters);
return this
.client
.getLroResult(
@@ -1368,7 +1400,7 @@ private PollerFlux, SqlVirtualMachineInner> b
}
/**
- * Creates or updates a SQL virtual machine.
+ * Updates a SQL virtual machine.
*
* @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.
@@ -1381,11 +1413,11 @@ private PollerFlux, SqlVirtualMachineInner> b
* @return the {@link PollerFlux} for polling of a SQL virtual machine.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, SqlVirtualMachineInner> beginCreateOrUpdateAsync(
- String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineInner parameters, Context context) {
+ private PollerFlux, SqlVirtualMachineInner> beginUpdateAsync(
+ String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineUpdate parameters, Context context) {
context = this.client.mergeContext(context);
Mono>> mono =
- createOrUpdateWithResponseAsync(resourceGroupName, sqlVirtualMachineName, parameters, context);
+ updateWithResponseAsync(resourceGroupName, sqlVirtualMachineName, parameters, context);
return this
.client
.getLroResult(
@@ -1397,7 +1429,7 @@ private PollerFlux, SqlVirtualMachineInner> b
}
/**
- * Creates or updates a SQL virtual machine.
+ * Updates a SQL virtual machine.
*
* @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.
@@ -1409,13 +1441,13 @@ private PollerFlux, SqlVirtualMachineInner> b
* @return the {@link SyncPoller} for polling of a SQL virtual machine.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- public SyncPoller, SqlVirtualMachineInner> beginCreateOrUpdate(
- String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineInner parameters) {
- return beginCreateOrUpdateAsync(resourceGroupName, sqlVirtualMachineName, parameters).getSyncPoller();
+ public SyncPoller, SqlVirtualMachineInner> beginUpdate(
+ String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineUpdate parameters) {
+ return this.beginUpdateAsync(resourceGroupName, sqlVirtualMachineName, parameters).getSyncPoller();
}
/**
- * Creates or updates a SQL virtual machine.
+ * Updates a SQL virtual machine.
*
* @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.
@@ -1428,13 +1460,13 @@ public SyncPoller, SqlVirtualMachineInner> be
* @return the {@link SyncPoller} for polling of a SQL virtual machine.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- public SyncPoller, SqlVirtualMachineInner> beginCreateOrUpdate(
- String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineInner parameters, Context context) {
- return beginCreateOrUpdateAsync(resourceGroupName, sqlVirtualMachineName, parameters, context).getSyncPoller();
+ public SyncPoller, SqlVirtualMachineInner> beginUpdate(
+ String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineUpdate parameters, Context context) {
+ return this.beginUpdateAsync(resourceGroupName, sqlVirtualMachineName, parameters, context).getSyncPoller();
}
/**
- * Creates or updates a SQL virtual machine.
+ * Updates a SQL virtual machine.
*
* @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.
@@ -1446,15 +1478,15 @@ public SyncPoller, SqlVirtualMachineInner> be
* @return a SQL virtual machine on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono createOrUpdateAsync(
- String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineInner parameters) {
- return beginCreateOrUpdateAsync(resourceGroupName, sqlVirtualMachineName, parameters)
+ private Mono updateAsync(
+ String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineUpdate parameters) {
+ return beginUpdateAsync(resourceGroupName, sqlVirtualMachineName, parameters)
.last()
.flatMap(this.client::getLroFinalResultOrError);
}
/**
- * Creates or updates a SQL virtual machine.
+ * Updates a SQL virtual machine.
*
* @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.
@@ -1467,15 +1499,15 @@ private Mono createOrUpdateAsync(
* @return a SQL virtual machine on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono createOrUpdateAsync(
- String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineInner parameters, Context context) {
- return beginCreateOrUpdateAsync(resourceGroupName, sqlVirtualMachineName, parameters, context)
+ private Mono updateAsync(
+ String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineUpdate parameters, Context context) {
+ return beginUpdateAsync(resourceGroupName, sqlVirtualMachineName, parameters, context)
.last()
.flatMap(this.client::getLroFinalResultOrError);
}
/**
- * Creates or updates a SQL virtual machine.
+ * Updates a SQL virtual machine.
*
* @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.
@@ -1487,13 +1519,13 @@ private Mono createOrUpdateAsync(
* @return a SQL virtual machine.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public SqlVirtualMachineInner createOrUpdate(
- String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineInner parameters) {
- return createOrUpdateAsync(resourceGroupName, sqlVirtualMachineName, parameters).block();
+ public SqlVirtualMachineInner update(
+ String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineUpdate parameters) {
+ return updateAsync(resourceGroupName, sqlVirtualMachineName, parameters).block();
}
/**
- * Creates or updates a SQL virtual machine.
+ * Updates a SQL virtual machine.
*
* @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.
@@ -1506,25 +1538,24 @@ public SqlVirtualMachineInner createOrUpdate(
* @return a SQL virtual machine.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public SqlVirtualMachineInner createOrUpdate(
- String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineInner parameters, Context context) {
- return createOrUpdateAsync(resourceGroupName, sqlVirtualMachineName, parameters, context).block();
+ public SqlVirtualMachineInner update(
+ String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineUpdate parameters, Context context) {
+ return updateAsync(resourceGroupName, sqlVirtualMachineName, parameters, context).block();
}
/**
- * Deletes a SQL virtual machine.
+ * Gets all SQL virtual machines in a resource group.
*
* @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 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 Response} on successful completion of {@link Mono}.
+ * @return all SQL virtual machines in a resource group along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> deleteWithResponseAsync(
- String resourceGroupName, String sqlVirtualMachineName) {
+ private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
@@ -1535,45 +1566,51 @@ private Mono>> deleteWithResponseAsync(
return Mono
.error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
}
- if (sqlVirtualMachineName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter sqlVirtualMachineName is required and cannot be null."));
- }
if (this.client.getSubscriptionId() == null) {
return Mono
.error(
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
+ final String accept = "application/json";
return FluxUtil
.withContext(
context ->
service
- .delete(
+ .listByResourceGroup(
this.client.getEndpoint(),
resourceGroupName,
- sqlVirtualMachineName,
this.client.getSubscriptionId(),
this.client.getApiVersion(),
+ accept,
context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
- * Deletes a SQL virtual machine.
+ * Gets all SQL virtual machines in a resource group.
*
* @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 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 Response} on successful completion of {@link Mono}.
+ * @return all SQL virtual machines in a resource group along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> deleteWithResponseAsync(
- String resourceGroupName, String sqlVirtualMachineName, Context context) {
+ private Mono> listByResourceGroupSinglePageAsync(
+ String resourceGroupName, Context context) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
@@ -1584,188 +1621,113 @@ private Mono>> deleteWithResponseAsync(
return Mono
.error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
}
- if (sqlVirtualMachineName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter sqlVirtualMachineName is required and cannot be null."));
- }
if (this.client.getSubscriptionId() == null) {
return Mono
.error(
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
+ final String accept = "application/json";
context = this.client.mergeContext(context);
return service
- .delete(
+ .listByResourceGroup(
this.client.getEndpoint(),
resourceGroupName,
- sqlVirtualMachineName,
this.client.getSubscriptionId(),
this.client.getApiVersion(),
- context);
- }
-
- /**
- * Deletes a SQL virtual machine.
- *
- * @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 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 PollerFlux} for polling of long-running operation.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, Void> beginDeleteAsync(
- String resourceGroupName, String sqlVirtualMachineName) {
- Mono>> mono = deleteWithResponseAsync(resourceGroupName, sqlVirtualMachineName);
- return this
- .client
- .getLroResult(
- mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext());
- }
-
- /**
- * Deletes a SQL virtual machine.
- *
- * @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 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 PollerFlux} for polling of long-running operation.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, Void> beginDeleteAsync(
- String resourceGroupName, String sqlVirtualMachineName, Context context) {
- context = this.client.mergeContext(context);
- Mono>> mono =
- deleteWithResponseAsync(resourceGroupName, sqlVirtualMachineName, context);
- return this
- .client
- .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context);
- }
-
- /**
- * Deletes a SQL virtual machine.
- *
- * @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 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)
- public SyncPoller, Void> beginDelete(String resourceGroupName, String sqlVirtualMachineName) {
- return beginDeleteAsync(resourceGroupName, sqlVirtualMachineName).getSyncPoller();
- }
-
- /**
- * Deletes a SQL virtual machine.
- *
- * @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 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)
- public SyncPoller, Void> beginDelete(
- String resourceGroupName, String sqlVirtualMachineName, Context context) {
- return beginDeleteAsync(resourceGroupName, sqlVirtualMachineName, context).getSyncPoller();
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
}
/**
- * Deletes a SQL virtual machine.
+ * Gets all SQL virtual machines in a resource group.
*
* @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 ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return A {@link Mono} that completes when a successful response is received.
+ * @return all SQL virtual machines in a resource group as paginated response with {@link PagedFlux}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono deleteAsync(String resourceGroupName, String sqlVirtualMachineName) {
- return beginDeleteAsync(resourceGroupName, sqlVirtualMachineName)
- .last()
- .flatMap(this.client::getLroFinalResultOrError);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByResourceGroupAsync(String resourceGroupName) {
+ return new PagedFlux<>(
+ () -> listByResourceGroupSinglePageAsync(resourceGroupName),
+ nextLink -> listByResourceGroupNextSinglePageAsync(nextLink));
}
/**
- * Deletes a SQL virtual machine.
+ * Gets all SQL virtual machines in a resource group.
*
* @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 ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return A {@link Mono} that completes when a successful response is received.
+ * @return all SQL virtual machines in a resource group as paginated response with {@link PagedFlux}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono deleteAsync(String resourceGroupName, String sqlVirtualMachineName, Context context) {
- return beginDeleteAsync(resourceGroupName, sqlVirtualMachineName, context)
- .last()
- .flatMap(this.client::getLroFinalResultOrError);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) {
+ return new PagedFlux<>(
+ () -> listByResourceGroupSinglePageAsync(resourceGroupName, context),
+ nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context));
}
/**
- * Deletes a SQL virtual machine.
+ * Gets all SQL virtual machines in a resource group.
*
* @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 ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return all SQL virtual machines in a resource group as paginated response with {@link PagedIterable}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- public void delete(String resourceGroupName, String sqlVirtualMachineName) {
- deleteAsync(resourceGroupName, sqlVirtualMachineName).block();
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByResourceGroup(String resourceGroupName) {
+ return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName));
}
/**
- * Deletes a SQL virtual machine.
+ * Gets all SQL virtual machines in a resource group.
*
* @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 ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return all SQL virtual machines in a resource group as paginated response with {@link PagedIterable}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- public void delete(String resourceGroupName, String sqlVirtualMachineName, Context context) {
- deleteAsync(resourceGroupName, sqlVirtualMachineName, context).block();
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
+ return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context));
}
/**
- * Updates a SQL virtual machine.
+ * Starts SQL best practices Assessment on SQL virtual machine.
*
* @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 parameters The SQL virtual machine.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a SQL virtual machine along with {@link Response} on successful completion of {@link Mono}.
+ * @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> updateWithResponseAsync(
- String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineUpdate parameters) {
+ private Mono>> startAssessmentWithResponseAsync(
+ String resourceGroupName, String sqlVirtualMachineName) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
@@ -1786,44 +1748,37 @@ private Mono>> updateWithResponseAsync(
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
- if (parameters == null) {
- return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
- } else {
- parameters.validate();
- }
final String accept = "application/json";
return FluxUtil
.withContext(
context ->
service
- .update(
+ .startAssessment(
this.client.getEndpoint(),
resourceGroupName,
sqlVirtualMachineName,
this.client.getSubscriptionId(),
this.client.getApiVersion(),
- parameters,
accept,
context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
- * Updates a SQL virtual machine.
+ * Starts SQL best practices Assessment on SQL virtual machine.
*
* @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 parameters The SQL virtual machine.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a SQL virtual machine along with {@link Response} on successful completion of {@link Mono}.
+ * @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> updateWithResponseAsync(
- String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineUpdate parameters, Context context) {
+ private Mono>> startAssessmentWithResponseAsync(
+ String resourceGroupName, String sqlVirtualMachineName, Context context) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
@@ -1844,209 +1799,181 @@ private Mono>> updateWithResponseAsync(
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
- if (parameters == null) {
- return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
- } else {
- parameters.validate();
- }
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
- .update(
+ .startAssessment(
this.client.getEndpoint(),
resourceGroupName,
sqlVirtualMachineName,
this.client.getSubscriptionId(),
this.client.getApiVersion(),
- parameters,
accept,
context);
}
/**
- * Updates a SQL virtual machine.
+ * Starts SQL best practices Assessment on SQL virtual machine.
*
* @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 parameters The SQL virtual machine.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 PollerFlux} for polling of a SQL virtual machine.
+ * @return the {@link PollerFlux} for polling of long-running operation.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, SqlVirtualMachineInner> beginUpdateAsync(
- String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineUpdate parameters) {
+ private PollerFlux