diff --git a/sdk/elastic/azure-resourcemanager-elastic/CHANGELOG.md b/sdk/elastic/azure-resourcemanager-elastic/CHANGELOG.md
index 11f0452a7f3b..d0889b08ea49 100644
--- a/sdk/elastic/azure-resourcemanager-elastic/CHANGELOG.md
+++ b/sdk/elastic/azure-resourcemanager-elastic/CHANGELOG.md
@@ -1,14 +1,107 @@
# Release History
-## 1.1.0-beta.1 (Unreleased)
+## 1.0.0-beta.1 (2025-05-13)
-### Features Added
+- Azure Resource Manager Elastic client library for Java. This package contains Microsoft Azure SDK for Elastic Management SDK. Package tag package-2025-01-15-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
### Breaking Changes
-### Bugs Fixed
+#### `models.MonitorProperties` was modified
+
+* `withProvisioningState(models.ProvisioningState)` was removed
+
+#### `models.MonitoringTagRulesProperties` was modified
+
+* `withProvisioningState(models.ProvisioningState)` was removed
+
+#### `models.Organizations` was modified
+
+* `getApiKey()` was removed
+
+### Features Added
+
+* `models.MonitoredSubscriptionProperties$Definition` was added
+
+* `models.ConfigurationType` was added
+
+* `models.MonitoredSubscription` was added
+
+* `models.ResubscribeProperties` was added
+
+* `models.ProjectType` was added
+
+* `models.MonitoredSubscriptionProperties` was added
+
+* `models.MonitoredSubscriptionPropertiesList` was added
+
+* `models.MonitoredSubscriptionProperties$Update` was added
+
+* `models.MonitoredSubscriptionProperties$DefinitionStages` was added
+
+* `models.HostingType` was added
+
+* `models.MonitoredSubscriptionProperties$UpdateStages` was added
+
+* `models.ProjectDetails` was added
+
+* `models.MonitoredSubscriptions` was added
+
+* `models.Status` was added
+
+* `models.SubscriptionList` was added
+
+* `models.Operation` was added
+
+#### `models.ConnectedPartnerResourceProperties` was modified
+
+* `withType(java.lang.String)` was added
+* `type()` was added
+
+#### `models.OpenAIIntegrationRPModel` was modified
+
+* `systemData()` was added
+
+#### `models.MarketplaceSaaSInfoMarketplaceSubscription` was modified
+
+* `offerId()` was added
+* `publisherId()` was added
+* `withPublisherId(java.lang.String)` was added
+* `withOfferId(java.lang.String)` was added
+
+#### `models.DeploymentInfoResponse` was modified
+
+* `projectType()` was added
+* `configurationType()` was added
+
+#### `models.ElasticMonitorResource` was modified
+
+* `kind()` was added
+
+#### `models.MonitorProperties` was modified
+
+* `hostingType()` was added
+* `projectDetails()` was added
+* `withProjectDetails(models.ProjectDetails)` was added
+* `withHostingType(models.HostingType)` was added
+
+#### `ElasticManager` was modified
+
+* `monitoredSubscriptions()` was added
+
+#### `models.OpenAIIntegrationProperties` was modified
+
+* `withOpenAIConnectorId(java.lang.String)` was added
+* `openAIConnectorId()` was added
+
+#### `models.Organizations` was modified
+
+* `resubscribe(java.lang.String,java.lang.String,models.ResubscribeProperties,com.azure.core.util.Context)` was added
+* `resubscribe(java.lang.String,java.lang.String)` was added
+* `getApiKey(models.UserEmailId)` was added
+
+#### `models.ElasticMonitorResource$Definition` was modified
-### Other Changes
+* `withKind(java.lang.String)` was added
## 1.0.0 (2024-10-21)
diff --git a/sdk/elastic/azure-resourcemanager-elastic/README.md b/sdk/elastic/azure-resourcemanager-elastic/README.md
index 9a83f5c06c4d..f90a5f0a7515 100644
--- a/sdk/elastic/azure-resourcemanager-elastic/README.md
+++ b/sdk/elastic/azure-resourcemanager-elastic/README.md
@@ -2,7 +2,7 @@
Azure Resource Manager Elastic client library for Java.
-This package contains Microsoft Azure SDK for Elastic Management SDK. Package tag package-2024-03-01. 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 Elastic Management SDK. Package tag package-2025-01-15-preview. 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
@@ -52,7 +52,7 @@ Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment
Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code:
```java
-AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE);
+AzureProfile profile = new AzureProfile(AzureCloud.AZURE_PUBLIC_CLOUD);
TokenCredential credential = new DefaultAzureCredentialBuilder()
.authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint())
.build();
@@ -60,7 +60,7 @@ ElasticManager manager = ElasticManager
.authenticate(credential, profile);
```
-The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise.
+The sample code assumes global Azure. Please change the `AzureCloud.AZURE_PUBLIC_CLOUD` variable if otherwise.
See [Authentication][authenticate] for more options.
@@ -100,5 +100,3 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m
[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/elastic/azure-resourcemanager-elastic/SAMPLE.md b/sdk/elastic/azure-resourcemanager-elastic/SAMPLE.md
index a17c3adb71e8..8d523a03f65f 100644
--- a/sdk/elastic/azure-resourcemanager-elastic/SAMPLE.md
+++ b/sdk/elastic/azure-resourcemanager-elastic/SAMPLE.md
@@ -57,6 +57,14 @@
- [List](#monitoredresources_list)
+## MonitoredSubscriptions
+
+- [CreateorUpdate](#monitoredsubscriptions_createorupdate)
+- [Delete](#monitoredsubscriptions_delete)
+- [Get](#monitoredsubscriptions_get)
+- [List](#monitoredsubscriptions_list)
+- [Update](#monitoredsubscriptions_update)
+
## Monitors
- [Create](#monitors_create)
@@ -82,6 +90,7 @@
- [GetApiKey](#organizations_getapikey)
- [GetElasticToAzureSubscriptionMapping](#organizations_getelastictoazuresubscriptionmapping)
+- [Resubscribe](#organizations_resubscribe)
## TagRules
@@ -113,20 +122,22 @@
```java
/**
- * Samples for AllTrafficFilters List.
+ * Samples for TrafficFilters Delete.
*/
-public final class AllTrafficFiltersListSamples {
+public final class TrafficFiltersDeleteSamples {
/*
- * x-ms-original-file:
- * specification/elastic/resource-manager/Microsoft.Elastic/stable/2024-03-01/examples/AllTrafficFilters_list.json
+ * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2025-01-15-preview/examples/
+ * TrafficFilters_Delete.json
*/
/**
- * Sample code: AllTrafficFilters_list.
+ * Sample code: TrafficFilters_Delete.
*
* @param manager Entry point to ElasticManager.
*/
- public static void allTrafficFiltersList(com.azure.resourcemanager.elastic.ElasticManager manager) {
- manager.allTrafficFilters().listWithResponse("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE);
+ public static void trafficFiltersDelete(com.azure.resourcemanager.elastic.ElasticManager manager) {
+ manager.trafficFilters()
+ .deleteWithResponse("myResourceGroup", "myMonitor", "31d91b5afb6f4c2eaaf104c97b1991dd",
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -135,23 +146,21 @@ public final class AllTrafficFiltersListSamples {
```java
/**
- * Samples for AssociateTrafficFilter Associate.
+ * Samples for VMIngestion Details.
*/
-public final class AssociateTrafficFilterAssociateSamples {
+public final class VMIngestionDetailsSamples {
/*
* x-ms-original-file:
- * specification/elastic/resource-manager/Microsoft.Elastic/stable/2024-03-01/examples/AssociateTrafficFilter_Update
- * .json
+ * specification/elastic/resource-manager/Microsoft.Elastic/preview/2025-01-15-preview/examples/VMIngestion_Details.
+ * json
*/
/**
- * Sample code: AssociateTrafficFilter_Associate.
+ * Sample code: VMIngestion_Details.
*
* @param manager Entry point to ElasticManager.
*/
- public static void associateTrafficFilterAssociate(com.azure.resourcemanager.elastic.ElasticManager manager) {
- manager.associateTrafficFilters()
- .associate("myResourceGroup", "myMonitor", "31d91b5afb6f4c2eaaf104c97b1991dd",
- com.azure.core.util.Context.NONE);
+ public static void vMIngestionDetails(com.azure.resourcemanager.elastic.ElasticManager manager) {
+ manager.vMIngestions().detailsWithResponse("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE);
}
}
```
@@ -160,20 +169,21 @@ public final class AssociateTrafficFilterAssociateSamples {
```java
/**
- * Samples for BillingInfo Get.
+ * Samples for MonitoredSubscriptions Delete.
*/
-public final class BillingInfoGetSamples {
+public final class MonitoredSubscriptionsDeleteSamples {
/*
- * x-ms-original-file:
- * specification/elastic/resource-manager/Microsoft.Elastic/stable/2024-03-01/examples/BillingInfo_Get.json
+ * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2025-01-15-preview/examples/
+ * MonitoredSubscriptions_Delete.json
*/
/**
- * Sample code: BillingInfo_Get.
+ * Sample code: Monitors_DeleteMonitoredSubscriptions.
*
* @param manager Entry point to ElasticManager.
*/
- public static void billingInfoGet(com.azure.resourcemanager.elastic.ElasticManager manager) {
- manager.billingInfoes().getWithResponse("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE);
+ public static void monitorsDeleteMonitoredSubscriptions(com.azure.resourcemanager.elastic.ElasticManager manager) {
+ manager.monitoredSubscriptions()
+ .delete("myResourceGroup", "myMonitor", "default", com.azure.core.util.Context.NONE);
}
}
```
@@ -181,21 +191,22 @@ public final class BillingInfoGetSamples {
### ConnectedPartnerResources_List
```java
+
/**
- * Samples for ConnectedPartnerResources List.
+ * Samples for Organizations GetApiKey.
*/
-public final class ConnectedPartnerResourcesListSamples {
+public final class OrganizationsGetApiKeySamples {
/*
- * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/stable/2024-03-01/examples/
- * ConnectedPartnerResources_List.json
+ * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2025-01-15-preview/examples/
+ * Organizations_GetApiKey.json
*/
/**
- * Sample code: ConnectedPartnerResources_List.
+ * Sample code: Organizations_GetApiKey.
*
* @param manager Entry point to ElasticManager.
*/
- public static void connectedPartnerResourcesList(com.azure.resourcemanager.elastic.ElasticManager manager) {
- manager.connectedPartnerResources().list("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE);
+ public static void organizationsGetApiKey(com.azure.resourcemanager.elastic.ElasticManager manager) {
+ manager.organizations().getApiKeyWithResponse(null, com.azure.core.util.Context.NONE);
}
}
```
@@ -204,22 +215,20 @@ public final class ConnectedPartnerResourcesListSamples {
```java
/**
- * Samples for CreateAndAssociateIpFilter Create.
+ * Samples for OpenAI List.
*/
-public final class CreateAndAssociateIpFilterCreateSamples {
+public final class OpenAIListSamples {
/*
* x-ms-original-file:
- * specification/elastic/resource-manager/Microsoft.Elastic/stable/2024-03-01/examples/IPTrafficFilter_Create.json
+ * specification/elastic/resource-manager/Microsoft.Elastic/preview/2025-01-15-preview/examples/OpenAI_List.json
*/
/**
- * Sample code: createAndAssociateIPFilter_Create.
+ * Sample code: OpenAI_List.
*
* @param manager Entry point to ElasticManager.
*/
- public static void createAndAssociateIPFilterCreate(com.azure.resourcemanager.elastic.ElasticManager manager) {
- manager.createAndAssociateIpFilters()
- .create("myResourceGroup", "myMonitor", "192.168.131.0, 192.168.132.6/22", null,
- com.azure.core.util.Context.NONE);
+ public static void openAIList(com.azure.resourcemanager.elastic.ElasticManager manager) {
+ manager.openAIs().list("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE);
}
}
```
@@ -228,21 +237,21 @@ public final class CreateAndAssociateIpFilterCreateSamples {
```java
/**
- * Samples for CreateAndAssociatePLFilter Create.
+ * Samples for DetachAndDeleteTrafficFilter Delete.
*/
-public final class CreateAndAssociatePLFilterCreateSamples {
+public final class DetachAndDeleteTrafficFilterDeleteSamples {
/*
- * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/stable/2024-03-01/examples/
- * PrivateLinkTrafficFilters_Create.json
+ * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2025-01-15-preview/examples/
+ * DetachAndDeleteTrafficFilter_Delete.json
*/
/**
- * Sample code: createAndAssociatePLFilter_Create.
+ * Sample code: DetachAndDeleteTrafficFilter_Delete.
*
* @param manager Entry point to ElasticManager.
*/
- public static void createAndAssociatePLFilterCreate(com.azure.resourcemanager.elastic.ElasticManager manager) {
- manager.createAndAssociatePLFilters()
- .create("myResourceGroup", "myMonitor", null, "fdb54d3b-e85e-4d08-8958-0d2f7g523df9", "myPrivateEndpoint",
+ public static void detachAndDeleteTrafficFilterDelete(com.azure.resourcemanager.elastic.ElasticManager manager) {
+ manager.detachAndDeleteTrafficFilters()
+ .deleteWithResponse("myResourceGroup", "myMonitor", "31d91b5afb6f4c2eaaf104c97b1991dd",
com.azure.core.util.Context.NONE);
}
}
@@ -252,20 +261,21 @@ public final class CreateAndAssociatePLFilterCreateSamples {
```java
/**
- * Samples for DeploymentInfo List.
+ * Samples for ListAssociatedTrafficFilters List.
*/
-public final class DeploymentInfoListSamples {
+public final class ListAssociatedTrafficFiltersListSamples {
/*
- * x-ms-original-file:
- * specification/elastic/resource-manager/Microsoft.Elastic/stable/2024-03-01/examples/DeploymentInfo_List.json
+ * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2025-01-15-preview/examples/
+ * AssociatedFiltersForDeployment_list.json
*/
/**
- * Sample code: DeploymentInfo_List.
+ * Sample code: listAssociatedTrafficFilters_list.
*
* @param manager Entry point to ElasticManager.
*/
- public static void deploymentInfoList(com.azure.resourcemanager.elastic.ElasticManager manager) {
- manager.deploymentInfoes().listWithResponse("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE);
+ public static void listAssociatedTrafficFiltersList(com.azure.resourcemanager.elastic.ElasticManager manager) {
+ manager.listAssociatedTrafficFilters()
+ .listWithResponse("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE);
}
}
```
@@ -274,22 +284,20 @@ public final class DeploymentInfoListSamples {
```java
/**
- * Samples for DetachAndDeleteTrafficFilter Delete.
+ * Samples for AllTrafficFilters List.
*/
-public final class DetachAndDeleteTrafficFilterDeleteSamples {
+public final class AllTrafficFiltersListSamples {
/*
- * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/stable/2024-03-01/examples/
- * DetachAndDeleteTrafficFilter_Delete.json
+ * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2025-01-15-preview/examples/
+ * AllTrafficFilters_list.json
*/
/**
- * Sample code: DetachAndDeleteTrafficFilter_Delete.
+ * Sample code: AllTrafficFilters_list.
*
* @param manager Entry point to ElasticManager.
*/
- public static void detachAndDeleteTrafficFilterDelete(com.azure.resourcemanager.elastic.ElasticManager manager) {
- manager.detachAndDeleteTrafficFilters()
- .deleteWithResponse("myResourceGroup", "myMonitor", "31d91b5afb6f4c2eaaf104c97b1991dd",
- com.azure.core.util.Context.NONE);
+ public static void allTrafficFiltersList(com.azure.resourcemanager.elastic.ElasticManager manager) {
+ manager.allTrafficFilters().listWithResponse("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE);
}
}
```
@@ -298,23 +306,20 @@ public final class DetachAndDeleteTrafficFilterDeleteSamples {
```java
/**
- * Samples for DetachTrafficFilter Update.
+ * Samples for TagRules CreateOrUpdate.
*/
-public final class DetachTrafficFilterUpdateSamples {
+public final class TagRulesCreateOrUpdateSamples {
/*
- * x-ms-original-file:
- * specification/elastic/resource-manager/Microsoft.Elastic/stable/2024-03-01/examples/DetachTrafficFilters_Update.
- * json
+ * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2025-01-15-preview/examples/
+ * TagRules_CreateOrUpdate.json
*/
/**
- * Sample code: DetachTrafficFilter_Update.
+ * Sample code: TagRules_CreateOrUpdate.
*
* @param manager Entry point to ElasticManager.
*/
- public static void detachTrafficFilterUpdate(com.azure.resourcemanager.elastic.ElasticManager manager) {
- manager.detachTrafficFilters()
- .update("myResourceGroup", "myMonitor", "31d91b5afb6f4c2eaaf104c97b1991dd",
- com.azure.core.util.Context.NONE);
+ public static void tagRulesCreateOrUpdate(com.azure.resourcemanager.elastic.ElasticManager manager) {
+ manager.tagRules().define("default").withExistingMonitor("myResourceGroup", "myMonitor").create();
}
}
```
@@ -323,20 +328,20 @@ public final class DetachTrafficFilterUpdateSamples {
```java
/**
- * Samples for ElasticVersions List.
+ * Samples for Monitors Delete.
*/
-public final class ElasticVersionsListSamples {
+public final class MonitorsDeleteSamples {
/*
* x-ms-original-file:
- * specification/elastic/resource-manager/Microsoft.Elastic/stable/2024-03-01/examples/ElasticVersions_List.json
+ * specification/elastic/resource-manager/Microsoft.Elastic/preview/2025-01-15-preview/examples/Monitors_Delete.json
*/
/**
- * Sample code: ElasticVersions_List.
+ * Sample code: Monitors_Delete.
*
* @param manager Entry point to ElasticManager.
*/
- public static void elasticVersionsList(com.azure.resourcemanager.elastic.ElasticManager manager) {
- manager.elasticVersions().list("myregion", com.azure.core.util.Context.NONE);
+ public static void monitorsDelete(com.azure.resourcemanager.elastic.ElasticManager manager) {
+ manager.monitors().delete("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE);
}
}
```
@@ -344,23 +349,22 @@ public final class ElasticVersionsListSamples {
### ExternalUser_CreateOrUpdate
```java
-
/**
- * Samples for ExternalUser CreateOrUpdate.
+ * Samples for ElasticVersions List.
*/
-public final class ExternalUserCreateOrUpdateSamples {
+public final class ElasticVersionsListSamples {
/*
* x-ms-original-file:
- * specification/elastic/resource-manager/Microsoft.Elastic/stable/2024-03-01/examples/ExternalUserInfo.json
+ * specification/elastic/resource-manager/Microsoft.Elastic/preview/2025-01-15-preview/examples/ElasticVersions_List
+ * .json
*/
/**
- * Sample code: ExternalUser_CreateOrUpdate.
+ * Sample code: ElasticVersions_List.
*
* @param manager Entry point to ElasticManager.
*/
- public static void externalUserCreateOrUpdate(com.azure.resourcemanager.elastic.ElasticManager manager) {
- manager.externalUsers()
- .createOrUpdateWithResponse("myResourceGroup", "myMonitor", null, com.azure.core.util.Context.NONE);
+ public static void elasticVersionsList(com.azure.resourcemanager.elastic.ElasticManager manager) {
+ manager.elasticVersions().list("myregion", com.azure.core.util.Context.NONE);
}
}
```
@@ -369,21 +373,21 @@ public final class ExternalUserCreateOrUpdateSamples {
```java
/**
- * Samples for ListAssociatedTrafficFilters List.
+ * Samples for Organizations GetElasticToAzureSubscriptionMapping.
*/
-public final class ListAssociatedTrafficFiltersListSamples {
+public final class OrganizationsGetElasticToAzureSubscriptionMappingSamples {
/*
- * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/stable/2024-03-01/examples/
- * AssociatedFiltersForDeployment_list.json
+ * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2025-01-15-preview/examples/
+ * Organizations_GetElasticToAzureSubscriptionMapping.json
*/
/**
- * Sample code: listAssociatedTrafficFilters_list.
+ * Sample code: Organizations_GetElasticToAzureSubscriptionMapping.
*
* @param manager Entry point to ElasticManager.
*/
- public static void listAssociatedTrafficFiltersList(com.azure.resourcemanager.elastic.ElasticManager manager) {
- manager.listAssociatedTrafficFilters()
- .listWithResponse("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE);
+ public static void
+ organizationsGetElasticToAzureSubscriptionMapping(com.azure.resourcemanager.elastic.ElasticManager manager) {
+ manager.organizations().getElasticToAzureSubscriptionMappingWithResponse(com.azure.core.util.Context.NONE);
}
}
```
@@ -391,22 +395,22 @@ public final class ListAssociatedTrafficFiltersListSamples {
### MonitorOperation_Upgrade
```java
-
/**
- * Samples for MonitorOperation Upgrade.
+ * Samples for UpgradableVersions Details.
*/
-public final class MonitorOperationUpgradeSamples {
+public final class UpgradableVersionsDetailsSamples {
/*
- * x-ms-original-file:
- * specification/elastic/resource-manager/Microsoft.Elastic/stable/2024-03-01/examples/Monitor_Upgrade.json
+ * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2025-01-15-preview/examples/
+ * UpgradableVersions_Details.json
*/
/**
- * Sample code: Monitor_Upgrade.
+ * Sample code: UpgradableVersions_Details.
*
* @param manager Entry point to ElasticManager.
*/
- public static void monitorUpgrade(com.azure.resourcemanager.elastic.ElasticManager manager) {
- manager.monitorOperations().upgrade("myResourceGroup", "myMonitor", null, com.azure.core.util.Context.NONE);
+ public static void upgradableVersionsDetails(com.azure.resourcemanager.elastic.ElasticManager manager) {
+ manager.upgradableVersions()
+ .detailsWithResponse("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE);
}
}
```
@@ -415,190 +419,283 @@ public final class MonitorOperationUpgradeSamples {
```java
/**
- * Samples for MonitoredResources List.
+ * Samples for MonitoredSubscriptions CreateorUpdate.
*/
-public final class MonitoredResourcesListSamples {
+public final class MonitoredSubscriptionsCreateorUpdateSamples {
/*
- * x-ms-original-file:
- * specification/elastic/resource-manager/Microsoft.Elastic/stable/2024-03-01/examples/MonitoredResources_List.json
+ * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2025-01-15-preview/examples/
+ * MonitoredSubscriptions_CreateorUpdate.json
*/
/**
- * Sample code: MonitoredResources_List.
+ * Sample code: Monitors_AddMonitoredSubscriptions.
*
* @param manager Entry point to ElasticManager.
*/
- public static void monitoredResourcesList(com.azure.resourcemanager.elastic.ElasticManager manager) {
- manager.monitoredResources().list("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE);
+ public static void monitorsAddMonitoredSubscriptions(com.azure.resourcemanager.elastic.ElasticManager manager) {
+ manager.monitoredSubscriptions().define("default").withExistingMonitor("myResourceGroup", "myMonitor").create();
}
}
```
-### Monitors_Create
+### MonitoredSubscriptions_CreateorUpdate
```java
/**
- * Samples for Monitors Create.
+ * Samples for TagRules Delete.
*/
-public final class MonitorsCreateSamples {
+public final class TagRulesDeleteSamples {
/*
* x-ms-original-file:
- * specification/elastic/resource-manager/Microsoft.Elastic/stable/2024-03-01/examples/Monitors_Create.json
+ * specification/elastic/resource-manager/Microsoft.Elastic/preview/2025-01-15-preview/examples/TagRules_Delete.json
*/
/**
- * Sample code: Monitors_Create.
+ * Sample code: TagRules_Delete.
*
* @param manager Entry point to ElasticManager.
*/
- public static void monitorsCreate(com.azure.resourcemanager.elastic.ElasticManager manager) {
- manager.monitors()
- .define("myMonitor")
- .withRegion((String) null)
- .withExistingResourceGroup("myResourceGroup")
- .create();
+ public static void tagRulesDelete(com.azure.resourcemanager.elastic.ElasticManager manager) {
+ manager.tagRules().delete("myResourceGroup", "myMonitor", "default", com.azure.core.util.Context.NONE);
}
}
```
-### Monitors_Delete
+### MonitoredSubscriptions_Delete
```java
+
/**
- * Samples for Monitors Delete.
+ * Samples for VMCollection Update.
*/
-public final class MonitorsDeleteSamples {
+public final class VMCollectionUpdateSamples {
/*
* x-ms-original-file:
- * specification/elastic/resource-manager/Microsoft.Elastic/stable/2024-03-01/examples/Monitors_Delete.json
+ * specification/elastic/resource-manager/Microsoft.Elastic/preview/2025-01-15-preview/examples/VMCollection_Update.
+ * json
*/
/**
- * Sample code: Monitors_Delete.
+ * Sample code: VMCollection_Update.
*
* @param manager Entry point to ElasticManager.
*/
- public static void monitorsDelete(com.azure.resourcemanager.elastic.ElasticManager manager) {
- manager.monitors().delete("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE);
+ public static void vMCollectionUpdate(com.azure.resourcemanager.elastic.ElasticManager manager) {
+ manager.vMCollections()
+ .updateWithResponse("myResourceGroup", "myMonitor", null, com.azure.core.util.Context.NONE);
}
}
```
-### Monitors_GetByResourceGroup
+### MonitoredSubscriptions_Get
```java
/**
- * Samples for Monitors GetByResourceGroup.
+ * Samples for Monitors Create.
*/
-public final class MonitorsGetByResourceGroupSamples {
+public final class MonitorsCreateSamples {
/*
* x-ms-original-file:
- * specification/elastic/resource-manager/Microsoft.Elastic/stable/2024-03-01/examples/Monitors_Get.json
+ * specification/elastic/resource-manager/Microsoft.Elastic/preview/2025-01-15-preview/examples/Monitors_Create.json
*/
/**
- * Sample code: Monitors_Get.
+ * Sample code: Monitors_Create.
*
* @param manager Entry point to ElasticManager.
*/
- public static void monitorsGet(com.azure.resourcemanager.elastic.ElasticManager manager) {
+ public static void monitorsCreate(com.azure.resourcemanager.elastic.ElasticManager manager) {
manager.monitors()
- .getByResourceGroupWithResponse("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE);
+ .define("myMonitor")
+ .withRegion((String) null)
+ .withExistingResourceGroup("myResourceGroup")
+ .create();
}
}
```
-### Monitors_List
+### MonitoredSubscriptions_List
```java
/**
- * Samples for Monitors List.
+ * Samples for BillingInfo Get.
*/
-public final class MonitorsListSamples {
+public final class BillingInfoGetSamples {
/*
* x-ms-original-file:
- * specification/elastic/resource-manager/Microsoft.Elastic/stable/2024-03-01/examples/Monitors_List.json
+ * specification/elastic/resource-manager/Microsoft.Elastic/preview/2025-01-15-preview/examples/BillingInfo_Get.json
*/
/**
- * Sample code: Monitors_List.
+ * Sample code: BillingInfo_Get.
*
* @param manager Entry point to ElasticManager.
*/
- public static void monitorsList(com.azure.resourcemanager.elastic.ElasticManager manager) {
- manager.monitors().list(com.azure.core.util.Context.NONE);
+ public static void billingInfoGet(com.azure.resourcemanager.elastic.ElasticManager manager) {
+ manager.billingInfoes().getWithResponse("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE);
}
}
```
-### Monitors_ListByResourceGroup
+### MonitoredSubscriptions_Update
```java
/**
- * Samples for Monitors ListByResourceGroup.
+ * Samples for VMHost List.
*/
-public final class MonitorsListByResourceGroupSamples {
+public final class VMHostListSamples {
/*
* x-ms-original-file:
- * specification/elastic/resource-manager/Microsoft.Elastic/stable/2024-03-01/examples/Monitors_ListByResourceGroup.
- * json
+ * specification/elastic/resource-manager/Microsoft.Elastic/preview/2025-01-15-preview/examples/VMHost_List.json
*/
/**
- * Sample code: Monitors_ListByResourceGroup.
+ * Sample code: VMHost_List.
*
* @param manager Entry point to ElasticManager.
*/
- public static void monitorsListByResourceGroup(com.azure.resourcemanager.elastic.ElasticManager manager) {
- manager.monitors().listByResourceGroup("myResourceGroup", com.azure.core.util.Context.NONE);
+ public static void vMHostList(com.azure.resourcemanager.elastic.ElasticManager manager) {
+ manager.vMHosts().list("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE);
}
}
```
-### Monitors_Update
+### Monitors_Create
```java
-import com.azure.resourcemanager.elastic.models.ElasticMonitorResource;
/**
- * Samples for Monitors Update.
+ * Samples for MonitorOperation Upgrade.
*/
-public final class MonitorsUpdateSamples {
+public final class MonitorOperationUpgradeSamples {
/*
* x-ms-original-file:
- * specification/elastic/resource-manager/Microsoft.Elastic/stable/2024-03-01/examples/Monitors_Update.json
+ * specification/elastic/resource-manager/Microsoft.Elastic/preview/2025-01-15-preview/examples/Monitor_Upgrade.json
*/
/**
- * Sample code: Monitors_Update.
+ * Sample code: Monitor_Upgrade.
*
* @param manager Entry point to ElasticManager.
*/
- public static void monitorsUpdate(com.azure.resourcemanager.elastic.ElasticManager manager) {
- ElasticMonitorResource resource = manager.monitors()
- .getByResourceGroupWithResponse("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE)
- .getValue();
- resource.update().apply();
+ public static void monitorUpgrade(com.azure.resourcemanager.elastic.ElasticManager manager) {
+ manager.monitorOperations().upgrade("myResourceGroup", "myMonitor", null, com.azure.core.util.Context.NONE);
}
}
```
-### OpenAI_CreateOrUpdate
+### Monitors_Delete
```java
/**
- * Samples for OpenAI CreateOrUpdate.
+ * Samples for DeploymentInfo List.
*/
-public final class OpenAICreateOrUpdateSamples {
+public final class DeploymentInfoListSamples {
/*
* x-ms-original-file:
- * specification/elastic/resource-manager/Microsoft.Elastic/stable/2024-03-01/examples/OpenAI_CreateOrUpdate.json
+ * specification/elastic/resource-manager/Microsoft.Elastic/preview/2025-01-15-preview/examples/DeploymentInfo_List.
+ * json
*/
/**
- * Sample code: OpenAI_CreateOrUpdate.
+ * Sample code: DeploymentInfo_List.
*
* @param manager Entry point to ElasticManager.
*/
- public static void openAICreateOrUpdate(com.azure.resourcemanager.elastic.ElasticManager manager) {
- manager.openAIs().define("default").withExistingMonitor("myResourceGroup", "myMonitor").create();
+ public static void deploymentInfoList(com.azure.resourcemanager.elastic.ElasticManager manager) {
+ manager.deploymentInfoes().listWithResponse("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE);
}
}
```
-### OpenAI_Delete
+### Monitors_GetByResourceGroup
+
+```java
+/**
+ * Samples for CreateAndAssociateIpFilter Create.
+ */
+public final class CreateAndAssociateIpFilterCreateSamples {
+ /*
+ * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2025-01-15-preview/examples/
+ * IPTrafficFilter_Create.json
+ */
+ /**
+ * Sample code: createAndAssociateIPFilter_Create.
+ *
+ * @param manager Entry point to ElasticManager.
+ */
+ public static void createAndAssociateIPFilterCreate(com.azure.resourcemanager.elastic.ElasticManager manager) {
+ manager.createAndAssociateIpFilters()
+ .create("myResourceGroup", "myMonitor", "192.168.131.0, 192.168.132.6/22", null,
+ com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### Monitors_List
+
+```java
+import com.azure.resourcemanager.elastic.models.MonitoredSubscriptionProperties;
+
+/**
+ * Samples for MonitoredSubscriptions Update.
+ */
+public final class MonitoredSubscriptionsUpdateSamples {
+ /*
+ * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2025-01-15-preview/examples/
+ * MonitoredSubscriptions_Update.json
+ */
+ /**
+ * Sample code: Monitors_UpdateMonitoredSubscriptions.
+ *
+ * @param manager Entry point to ElasticManager.
+ */
+ public static void monitorsUpdateMonitoredSubscriptions(com.azure.resourcemanager.elastic.ElasticManager manager) {
+ MonitoredSubscriptionProperties resource = manager.monitoredSubscriptions()
+ .getWithResponse("myResourceGroup", "myMonitor", "default", com.azure.core.util.Context.NONE)
+ .getValue();
+ resource.update().apply();
+ }
+}
+```
+
+### Monitors_ListByResourceGroup
+
+```java
+/**
+ * Samples for TagRules List.
+ */
+public final class TagRulesListSamples {
+ /*
+ * x-ms-original-file:
+ * specification/elastic/resource-manager/Microsoft.Elastic/preview/2025-01-15-preview/examples/TagRules_List.json
+ */
+ /**
+ * Sample code: TagRules_List.
+ *
+ * @param manager Entry point to ElasticManager.
+ */
+ public static void tagRulesList(com.azure.resourcemanager.elastic.ElasticManager manager) {
+ manager.tagRules().list("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### Monitors_Update
+
+```java
+/**
+ * Samples for ConnectedPartnerResources List.
+ */
+public final class ConnectedPartnerResourcesListSamples {
+ /*
+ * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2025-01-15-preview/examples/
+ * ConnectedPartnerResources_List.json
+ */
+ /**
+ * Sample code: ConnectedPartnerResources_List.
+ *
+ * @param manager Entry point to ElasticManager.
+ */
+ public static void connectedPartnerResourcesList(com.azure.resourcemanager.elastic.ElasticManager manager) {
+ manager.connectedPartnerResources().list("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### OpenAI_CreateOrUpdate
```java
/**
@@ -607,7 +704,7 @@ public final class OpenAICreateOrUpdateSamples {
public final class OpenAIDeleteSamples {
/*
* x-ms-original-file:
- * specification/elastic/resource-manager/Microsoft.Elastic/stable/2024-03-01/examples/OpenAI_Delete.json
+ * specification/elastic/resource-manager/Microsoft.Elastic/preview/2025-01-15-preview/examples/OpenAI_Delete.json
*/
/**
* Sample code: OpenAI_Delete.
@@ -621,24 +718,48 @@ public final class OpenAIDeleteSamples {
}
```
+### OpenAI_Delete
+
+```java
+/**
+ * Samples for OpenAI GetStatus.
+ */
+public final class OpenAIGetStatusSamples {
+ /*
+ * x-ms-original-file:
+ * specification/elastic/resource-manager/Microsoft.Elastic/preview/2025-01-15-preview/examples/OpenAI_GetStatus.
+ * json
+ */
+ /**
+ * Sample code: OpenAI_GetStatus.
+ *
+ * @param manager Entry point to ElasticManager.
+ */
+ public static void openAIGetStatus(com.azure.resourcemanager.elastic.ElasticManager manager) {
+ manager.openAIs()
+ .getStatusWithResponse("myResourceGroup", "myMonitor", "default", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
### OpenAI_Get
```java
/**
- * Samples for OpenAI Get.
+ * Samples for Operations List.
*/
-public final class OpenAIGetSamples {
+public final class OperationsListSamples {
/*
* x-ms-original-file:
- * specification/elastic/resource-manager/Microsoft.Elastic/stable/2024-03-01/examples/OpenAI_Get.json
+ * specification/elastic/resource-manager/Microsoft.Elastic/preview/2025-01-15-preview/examples/Operations_List.json
*/
/**
- * Sample code: OpenAI_Get.
+ * Sample code: Operations_List.
*
* @param manager Entry point to ElasticManager.
*/
- public static void openAIGet(com.azure.resourcemanager.elastic.ElasticManager manager) {
- manager.openAIs().getWithResponse("myResourceGroup", "myMonitor", "default", com.azure.core.util.Context.NONE);
+ public static void operationsList(com.azure.resourcemanager.elastic.ElasticManager manager) {
+ manager.operations().list(com.azure.core.util.Context.NONE);
}
}
```
@@ -646,22 +767,22 @@ public final class OpenAIGetSamples {
### OpenAI_GetStatus
```java
+
/**
- * Samples for OpenAI GetStatus.
+ * Samples for Organizations Resubscribe.
*/
-public final class OpenAIGetStatusSamples {
+public final class OrganizationsResubscribeSamples {
/*
- * x-ms-original-file:
- * specification/elastic/resource-manager/Microsoft.Elastic/stable/2024-03-01/examples/OpenAI_GetStatus.json
+ * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2025-01-15-preview/examples/
+ * Organizations_Resubscribe.json
*/
/**
- * Sample code: OpenAI_GetStatus.
+ * Sample code: Organizations_Resubscribe.
*
* @param manager Entry point to ElasticManager.
*/
- public static void openAIGetStatus(com.azure.resourcemanager.elastic.ElasticManager manager) {
- manager.openAIs()
- .getStatusWithResponse("myResourceGroup", "myMonitor", "default", com.azure.core.util.Context.NONE);
+ public static void organizationsResubscribe(com.azure.resourcemanager.elastic.ElasticManager manager) {
+ manager.organizations().resubscribe("myResourceGroup", "myMonitor", null, com.azure.core.util.Context.NONE);
}
}
```
@@ -670,20 +791,22 @@ public final class OpenAIGetStatusSamples {
```java
/**
- * Samples for OpenAI List.
+ * Samples for CreateAndAssociatePLFilter Create.
*/
-public final class OpenAIListSamples {
+public final class CreateAndAssociatePLFilterCreateSamples {
/*
- * x-ms-original-file:
- * specification/elastic/resource-manager/Microsoft.Elastic/stable/2024-03-01/examples/OpenAI_List.json
+ * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2025-01-15-preview/examples/
+ * PrivateLinkTrafficFilters_Create.json
*/
/**
- * Sample code: OpenAI_List.
+ * Sample code: createAndAssociatePLFilter_Create.
*
* @param manager Entry point to ElasticManager.
*/
- public static void openAIList(com.azure.resourcemanager.elastic.ElasticManager manager) {
- manager.openAIs().list("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE);
+ public static void createAndAssociatePLFilterCreate(com.azure.resourcemanager.elastic.ElasticManager manager) {
+ manager.createAndAssociatePLFilters()
+ .create("myResourceGroup", "myMonitor", null, "fdb54d3b-e85e-4d08-8958-0d2f7g523df9", "myPrivateEndpoint",
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -692,66 +815,90 @@ public final class OpenAIListSamples {
```java
/**
- * Samples for Operations List.
+ * Samples for TagRules Get.
*/
-public final class OperationsListSamples {
+public final class TagRulesGetSamples {
/*
* x-ms-original-file:
- * specification/elastic/resource-manager/Microsoft.Elastic/stable/2024-03-01/examples/Operations_List.json
+ * specification/elastic/resource-manager/Microsoft.Elastic/preview/2025-01-15-preview/examples/TagRules_Get.json
*/
/**
- * Sample code: Operations_List.
+ * Sample code: TagRules_Get.
*
* @param manager Entry point to ElasticManager.
*/
- public static void operationsList(com.azure.resourcemanager.elastic.ElasticManager manager) {
- manager.operations().list(com.azure.core.util.Context.NONE);
+ public static void tagRulesGet(com.azure.resourcemanager.elastic.ElasticManager manager) {
+ manager.tagRules().getWithResponse("myResourceGroup", "myMonitor", "default", com.azure.core.util.Context.NONE);
}
}
```
### Organizations_GetApiKey
+```java
+/**
+ * Samples for MonitoredResources List.
+ */
+public final class MonitoredResourcesListSamples {
+ /*
+ * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2025-01-15-preview/examples/
+ * MonitoredResources_List.json
+ */
+ /**
+ * Sample code: MonitoredResources_List.
+ *
+ * @param manager Entry point to ElasticManager.
+ */
+ public static void monitoredResourcesList(com.azure.resourcemanager.elastic.ElasticManager manager) {
+ manager.monitoredResources().list("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### Organizations_GetElasticToAzureSubscriptionMapping
+
```java
/**
- * Samples for Organizations GetApiKey.
+ * Samples for ExternalUser CreateOrUpdate.
*/
-public final class OrganizationsGetApiKeySamples {
+public final class ExternalUserCreateOrUpdateSamples {
/*
* x-ms-original-file:
- * specification/elastic/resource-manager/Microsoft.Elastic/stable/2024-03-01/examples/Organizations_GetApiKey.json
+ * specification/elastic/resource-manager/Microsoft.Elastic/preview/2025-01-15-preview/examples/ExternalUserInfo.
+ * json
*/
/**
- * Sample code: Organizations_GetApiKey.
+ * Sample code: ExternalUser_CreateOrUpdate.
*
* @param manager Entry point to ElasticManager.
*/
- public static void organizationsGetApiKey(com.azure.resourcemanager.elastic.ElasticManager manager) {
- manager.organizations().getApiKeyWithResponse(null, com.azure.core.util.Context.NONE);
+ public static void externalUserCreateOrUpdate(com.azure.resourcemanager.elastic.ElasticManager manager) {
+ manager.externalUsers()
+ .createOrUpdateWithResponse("myResourceGroup", "myMonitor", null, com.azure.core.util.Context.NONE);
}
}
```
-### Organizations_GetElasticToAzureSubscriptionMapping
+### Organizations_Resubscribe
```java
/**
- * Samples for Organizations GetElasticToAzureSubscriptionMapping.
+ * Samples for Monitors GetByResourceGroup.
*/
-public final class OrganizationsGetElasticToAzureSubscriptionMappingSamples {
+public final class MonitorsGetByResourceGroupSamples {
/*
- * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/stable/2024-03-01/examples/
- * Organizations_GetElasticToAzureSubscriptionMapping.json
+ * x-ms-original-file:
+ * specification/elastic/resource-manager/Microsoft.Elastic/preview/2025-01-15-preview/examples/Monitors_Get.json
*/
/**
- * Sample code: Organizations_GetElasticToAzureSubscriptionMapping.
+ * Sample code: Monitors_Get.
*
* @param manager Entry point to ElasticManager.
*/
- public static void
- organizationsGetElasticToAzureSubscriptionMapping(com.azure.resourcemanager.elastic.ElasticManager manager) {
- manager.organizations().getElasticToAzureSubscriptionMappingWithResponse(com.azure.core.util.Context.NONE);
+ public static void monitorsGet(com.azure.resourcemanager.elastic.ElasticManager manager) {
+ manager.monitors()
+ .getByResourceGroupWithResponse("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE);
}
}
```
@@ -759,21 +906,26 @@ public final class OrganizationsGetElasticToAzureSubscriptionMappingSamples {
### TagRules_CreateOrUpdate
```java
+import com.azure.resourcemanager.elastic.models.ElasticMonitorResource;
+
/**
- * Samples for TagRules CreateOrUpdate.
+ * Samples for Monitors Update.
*/
-public final class TagRulesCreateOrUpdateSamples {
+public final class MonitorsUpdateSamples {
/*
* x-ms-original-file:
- * specification/elastic/resource-manager/Microsoft.Elastic/stable/2024-03-01/examples/TagRules_CreateOrUpdate.json
+ * specification/elastic/resource-manager/Microsoft.Elastic/preview/2025-01-15-preview/examples/Monitors_Update.json
*/
/**
- * Sample code: TagRules_CreateOrUpdate.
+ * Sample code: Monitors_Update.
*
* @param manager Entry point to ElasticManager.
*/
- public static void tagRulesCreateOrUpdate(com.azure.resourcemanager.elastic.ElasticManager manager) {
- manager.tagRules().define("default").withExistingMonitor("myResourceGroup", "myMonitor").create();
+ public static void monitorsUpdate(com.azure.resourcemanager.elastic.ElasticManager manager) {
+ ElasticMonitorResource resource = manager.monitors()
+ .getByResourceGroupWithResponse("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE)
+ .getValue();
+ resource.update().apply();
}
}
```
@@ -782,20 +934,21 @@ public final class TagRulesCreateOrUpdateSamples {
```java
/**
- * Samples for TagRules Delete.
+ * Samples for MonitoredSubscriptions Get.
*/
-public final class TagRulesDeleteSamples {
+public final class MonitoredSubscriptionsGetSamples {
/*
- * x-ms-original-file:
- * specification/elastic/resource-manager/Microsoft.Elastic/stable/2024-03-01/examples/TagRules_Delete.json
+ * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2025-01-15-preview/examples/
+ * MonitoredSubscriptions_Get.json
*/
/**
- * Sample code: TagRules_Delete.
+ * Sample code: Monitors_GetMonitoredSubscriptions.
*
* @param manager Entry point to ElasticManager.
*/
- public static void tagRulesDelete(com.azure.resourcemanager.elastic.ElasticManager manager) {
- manager.tagRules().delete("myResourceGroup", "myMonitor", "default", com.azure.core.util.Context.NONE);
+ public static void monitorsGetMonitoredSubscriptions(com.azure.resourcemanager.elastic.ElasticManager manager) {
+ manager.monitoredSubscriptions()
+ .getWithResponse("myResourceGroup", "myMonitor", "default", com.azure.core.util.Context.NONE);
}
}
```
@@ -804,20 +957,20 @@ public final class TagRulesDeleteSamples {
```java
/**
- * Samples for TagRules Get.
+ * Samples for Monitors List.
*/
-public final class TagRulesGetSamples {
+public final class MonitorsListSamples {
/*
* x-ms-original-file:
- * specification/elastic/resource-manager/Microsoft.Elastic/stable/2024-03-01/examples/TagRules_Get.json
+ * specification/elastic/resource-manager/Microsoft.Elastic/preview/2025-01-15-preview/examples/Monitors_List.json
*/
/**
- * Sample code: TagRules_Get.
+ * Sample code: Monitors_List.
*
* @param manager Entry point to ElasticManager.
*/
- public static void tagRulesGet(com.azure.resourcemanager.elastic.ElasticManager manager) {
- manager.tagRules().getWithResponse("myResourceGroup", "myMonitor", "default", com.azure.core.util.Context.NONE);
+ public static void monitorsList(com.azure.resourcemanager.elastic.ElasticManager manager) {
+ manager.monitors().list(com.azure.core.util.Context.NONE);
}
}
```
@@ -826,20 +979,20 @@ public final class TagRulesGetSamples {
```java
/**
- * Samples for TagRules List.
+ * Samples for OpenAI Get.
*/
-public final class TagRulesListSamples {
+public final class OpenAIGetSamples {
/*
* x-ms-original-file:
- * specification/elastic/resource-manager/Microsoft.Elastic/stable/2024-03-01/examples/TagRules_List.json
+ * specification/elastic/resource-manager/Microsoft.Elastic/preview/2025-01-15-preview/examples/OpenAI_Get.json
*/
/**
- * Sample code: TagRules_List.
+ * Sample code: OpenAI_Get.
*
* @param manager Entry point to ElasticManager.
*/
- public static void tagRulesList(com.azure.resourcemanager.elastic.ElasticManager manager) {
- manager.tagRules().list("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE);
+ public static void openAIGet(com.azure.resourcemanager.elastic.ElasticManager manager) {
+ manager.openAIs().getWithResponse("myResourceGroup", "myMonitor", "default", com.azure.core.util.Context.NONE);
}
}
```
@@ -848,21 +1001,21 @@ public final class TagRulesListSamples {
```java
/**
- * Samples for TrafficFilters Delete.
+ * Samples for AssociateTrafficFilter Associate.
*/
-public final class TrafficFiltersDeleteSamples {
+public final class AssociateTrafficFilterAssociateSamples {
/*
- * x-ms-original-file:
- * specification/elastic/resource-manager/Microsoft.Elastic/stable/2024-03-01/examples/TrafficFilters_Delete.json
+ * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2025-01-15-preview/examples/
+ * AssociateTrafficFilter_Update.json
*/
/**
- * Sample code: TrafficFilters_Delete.
+ * Sample code: AssociateTrafficFilter_Associate.
*
* @param manager Entry point to ElasticManager.
*/
- public static void trafficFiltersDelete(com.azure.resourcemanager.elastic.ElasticManager manager) {
- manager.trafficFilters()
- .deleteWithResponse("myResourceGroup", "myMonitor", "31d91b5afb6f4c2eaaf104c97b1991dd",
+ public static void associateTrafficFilterAssociate(com.azure.resourcemanager.elastic.ElasticManager manager) {
+ manager.associateTrafficFilters()
+ .associate("myResourceGroup", "myMonitor", "31d91b5afb6f4c2eaaf104c97b1991dd",
com.azure.core.util.Context.NONE);
}
}
@@ -872,22 +1025,20 @@ public final class TrafficFiltersDeleteSamples {
```java
/**
- * Samples for UpgradableVersions Details.
+ * Samples for OpenAI CreateOrUpdate.
*/
-public final class UpgradableVersionsDetailsSamples {
+public final class OpenAICreateOrUpdateSamples {
/*
- * x-ms-original-file:
- * specification/elastic/resource-manager/Microsoft.Elastic/stable/2024-03-01/examples/UpgradableVersions_Details.
- * json
+ * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2025-01-15-preview/examples/
+ * OpenAI_CreateOrUpdate.json
*/
/**
- * Sample code: UpgradableVersions_Details.
+ * Sample code: OpenAI_CreateOrUpdate.
*
* @param manager Entry point to ElasticManager.
*/
- public static void upgradableVersionsDetails(com.azure.resourcemanager.elastic.ElasticManager manager) {
- manager.upgradableVersions()
- .detailsWithResponse("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE);
+ public static void openAICreateOrUpdate(com.azure.resourcemanager.elastic.ElasticManager manager) {
+ manager.openAIs().define("default").withExistingMonitor("myResourceGroup", "myMonitor").create();
}
}
```
@@ -895,23 +1046,21 @@ public final class UpgradableVersionsDetailsSamples {
### VMCollection_Update
```java
-
/**
- * Samples for VMCollection Update.
+ * Samples for Monitors ListByResourceGroup.
*/
-public final class VMCollectionUpdateSamples {
+public final class MonitorsListByResourceGroupSamples {
/*
- * x-ms-original-file:
- * specification/elastic/resource-manager/Microsoft.Elastic/stable/2024-03-01/examples/VMCollection_Update.json
+ * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2025-01-15-preview/examples/
+ * Monitors_ListByResourceGroup.json
*/
/**
- * Sample code: VMCollection_Update.
+ * Sample code: Monitors_ListByResourceGroup.
*
* @param manager Entry point to ElasticManager.
*/
- public static void vMCollectionUpdate(com.azure.resourcemanager.elastic.ElasticManager manager) {
- manager.vMCollections()
- .updateWithResponse("myResourceGroup", "myMonitor", null, com.azure.core.util.Context.NONE);
+ public static void monitorsListByResourceGroup(com.azure.resourcemanager.elastic.ElasticManager manager) {
+ manager.monitors().listByResourceGroup("myResourceGroup", com.azure.core.util.Context.NONE);
}
}
```
@@ -920,20 +1069,22 @@ public final class VMCollectionUpdateSamples {
```java
/**
- * Samples for VMHost List.
+ * Samples for DetachTrafficFilter Update.
*/
-public final class VMHostListSamples {
+public final class DetachTrafficFilterUpdateSamples {
/*
- * x-ms-original-file:
- * specification/elastic/resource-manager/Microsoft.Elastic/stable/2024-03-01/examples/VMHost_List.json
+ * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2025-01-15-preview/examples/
+ * DetachTrafficFilters_Update.json
*/
/**
- * Sample code: VMHost_List.
+ * Sample code: DetachTrafficFilter_Update.
*
* @param manager Entry point to ElasticManager.
*/
- public static void vMHostList(com.azure.resourcemanager.elastic.ElasticManager manager) {
- manager.vMHosts().list("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE);
+ public static void detachTrafficFilterUpdate(com.azure.resourcemanager.elastic.ElasticManager manager) {
+ manager.detachTrafficFilters()
+ .update("myResourceGroup", "myMonitor", "31d91b5afb6f4c2eaaf104c97b1991dd",
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -942,20 +1093,20 @@ public final class VMHostListSamples {
```java
/**
- * Samples for VMIngestion Details.
+ * Samples for MonitoredSubscriptions List.
*/
-public final class VMIngestionDetailsSamples {
+public final class MonitoredSubscriptionsListSamples {
/*
- * x-ms-original-file:
- * specification/elastic/resource-manager/Microsoft.Elastic/stable/2024-03-01/examples/VMIngestion_Details.json
+ * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2025-01-15-preview/examples/
+ * MonitoredSubscriptions_List.json
*/
/**
- * Sample code: VMIngestion_Details.
+ * Sample code: Monitors_GetMonitoredSubscriptions.
*
* @param manager Entry point to ElasticManager.
*/
- public static void vMIngestionDetails(com.azure.resourcemanager.elastic.ElasticManager manager) {
- manager.vMIngestions().detailsWithResponse("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE);
+ public static void monitorsGetMonitoredSubscriptions(com.azure.resourcemanager.elastic.ElasticManager manager) {
+ manager.monitoredSubscriptions().list("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE);
}
}
```
diff --git a/sdk/elastic/azure-resourcemanager-elastic/pom.xml b/sdk/elastic/azure-resourcemanager-elastic/pom.xml
index 261a51ab6985..4b0909e8539f 100644
--- a/sdk/elastic/azure-resourcemanager-elastic/pom.xml
+++ b/sdk/elastic/azure-resourcemanager-elastic/pom.xml
@@ -18,7 +18,7 @@
jar
Microsoft Azure SDK for Elastic Management
- This package contains Microsoft Azure SDK for Elastic Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Package tag package-2024-03-01.
+ This package contains Microsoft Azure SDK for Elastic Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Package tag package-2025-01-15-preview.
https://github.com/Azure/azure-sdk-for-java
@@ -45,6 +45,7 @@
UTF-8
0
0
+ true
diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/ElasticManager.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/ElasticManager.java
index e4f13187b7f5..8b17ed2a1761 100644
--- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/ElasticManager.java
+++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/ElasticManager.java
@@ -11,6 +11,7 @@
import com.azure.core.http.HttpPipelinePosition;
import com.azure.core.http.policy.AddDatePolicy;
import com.azure.core.http.policy.AddHeadersFromContextPolicy;
+import com.azure.core.http.policy.BearerTokenAuthenticationPolicy;
import com.azure.core.http.policy.HttpLogOptions;
import com.azure.core.http.policy.HttpLoggingPolicy;
import com.azure.core.http.policy.HttpPipelinePolicy;
@@ -19,9 +20,9 @@
import com.azure.core.http.policy.RetryOptions;
import com.azure.core.http.policy.RetryPolicy;
import com.azure.core.http.policy.UserAgentPolicy;
-import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy;
import com.azure.core.management.profile.AzureProfile;
import com.azure.core.util.Configuration;
+import com.azure.core.util.CoreUtils;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.elastic.fluent.ElasticManagementClient;
import com.azure.resourcemanager.elastic.implementation.AllTrafficFiltersImpl;
@@ -39,6 +40,7 @@
import com.azure.resourcemanager.elastic.implementation.ListAssociatedTrafficFiltersImpl;
import com.azure.resourcemanager.elastic.implementation.MonitorOperationsImpl;
import com.azure.resourcemanager.elastic.implementation.MonitoredResourcesImpl;
+import com.azure.resourcemanager.elastic.implementation.MonitoredSubscriptionsImpl;
import com.azure.resourcemanager.elastic.implementation.MonitorsImpl;
import com.azure.resourcemanager.elastic.implementation.OpenAIsImpl;
import com.azure.resourcemanager.elastic.implementation.OperationsImpl;
@@ -63,6 +65,7 @@
import com.azure.resourcemanager.elastic.models.ListAssociatedTrafficFilters;
import com.azure.resourcemanager.elastic.models.MonitorOperations;
import com.azure.resourcemanager.elastic.models.MonitoredResources;
+import com.azure.resourcemanager.elastic.models.MonitoredSubscriptions;
import com.azure.resourcemanager.elastic.models.Monitors;
import com.azure.resourcemanager.elastic.models.OpenAIs;
import com.azure.resourcemanager.elastic.models.Operations;
@@ -77,6 +80,7 @@
import java.time.temporal.ChronoUnit;
import java.util.ArrayList;
import java.util.List;
+import java.util.Map;
import java.util.Objects;
import java.util.stream.Collectors;
@@ -86,51 +90,53 @@
public final class ElasticManager {
private Operations operations;
+ private ElasticVersions elasticVersions;
+
+ private Organizations organizations;
+
private Monitors monitors;
- private ElasticVersions elasticVersions;
+ private AssociateTrafficFilters associateTrafficFilters;
- private MonitoredResources monitoredResources;
+ private CreateAndAssociateIpFilters createAndAssociateIpFilters;
- private DeploymentInfoes deploymentInfoes;
+ private CreateAndAssociatePLFilters createAndAssociatePLFilters;
private ExternalUsers externalUsers;
- private BillingInfoes billingInfoes;
-
- private ConnectedPartnerResources connectedPartnerResources;
+ private TrafficFilters trafficFilters;
- private OpenAIs openAIs;
+ private DetachAndDeleteTrafficFilters detachAndDeleteTrafficFilters;
- private TagRules tagRules;
+ private DetachTrafficFilters detachTrafficFilters;
- private VMHosts vMHosts;
+ private BillingInfoes billingInfoes;
- private VMIngestions vMIngestions;
+ private AllTrafficFilters allTrafficFilters;
- private VMCollections vMCollections;
+ private ListAssociatedTrafficFilters listAssociatedTrafficFilters;
- private UpgradableVersions upgradableVersions;
+ private ConnectedPartnerResources connectedPartnerResources;
- private MonitorOperations monitorOperations;
+ private DeploymentInfoes deploymentInfoes;
- private AllTrafficFilters allTrafficFilters;
+ private MonitoredResources monitoredResources;
- private ListAssociatedTrafficFilters listAssociatedTrafficFilters;
+ private UpgradableVersions upgradableVersions;
- private CreateAndAssociateIpFilters createAndAssociateIpFilters;
+ private VMHosts vMHosts;
- private CreateAndAssociatePLFilters createAndAssociatePLFilters;
+ private MonitoredSubscriptions monitoredSubscriptions;
- private AssociateTrafficFilters associateTrafficFilters;
+ private OpenAIs openAIs;
- private DetachAndDeleteTrafficFilters detachAndDeleteTrafficFilters;
+ private TagRules tagRules;
- private DetachTrafficFilters detachTrafficFilters;
+ private MonitorOperations monitorOperations;
- private TrafficFilters trafficFilters;
+ private VMCollections vMCollections;
- private Organizations organizations;
+ private VMIngestions vMIngestions;
private final ElasticManagementClient clientObject;
@@ -184,6 +190,9 @@ public static Configurable configure() {
*/
public static final class Configurable {
private static final ClientLogger LOGGER = new ClientLogger(Configurable.class);
+ private static final String SDK_VERSION = "version";
+ private static final Map PROPERTIES
+ = CoreUtils.getProperties("azure-resourcemanager-elastic.properties");
private HttpClient httpClient;
private HttpLogOptions httpLogOptions;
@@ -291,12 +300,14 @@ public ElasticManager authenticate(TokenCredential credential, AzureProfile prof
Objects.requireNonNull(credential, "'credential' cannot be null.");
Objects.requireNonNull(profile, "'profile' cannot be null.");
+ String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion");
+
StringBuilder userAgentBuilder = new StringBuilder();
userAgentBuilder.append("azsdk-java")
.append("-")
.append("com.azure.resourcemanager.elastic")
.append("/")
- .append("1.0.0");
+ .append(clientVersion);
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder.append(" (")
.append(Configuration.getGlobalConfiguration().get("java.version"))
@@ -329,7 +340,7 @@ public ElasticManager authenticate(TokenCredential credential, AzureProfile prof
HttpPolicyProviders.addBeforeRetryPolicies(policies);
policies.add(retryPolicy);
policies.add(new AddDatePolicy());
- policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0])));
+ policies.add(new BearerTokenAuthenticationPolicy(credential, scopes.toArray(new String[0])));
policies.addAll(this.policies.stream()
.filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
.collect(Collectors.toList()));
@@ -354,6 +365,30 @@ public Operations operations() {
return operations;
}
+ /**
+ * Gets the resource collection API of ElasticVersions.
+ *
+ * @return Resource collection API of ElasticVersions.
+ */
+ public ElasticVersions elasticVersions() {
+ if (this.elasticVersions == null) {
+ this.elasticVersions = new ElasticVersionsImpl(clientObject.getElasticVersions(), this);
+ }
+ return elasticVersions;
+ }
+
+ /**
+ * Gets the resource collection API of Organizations.
+ *
+ * @return Resource collection API of Organizations.
+ */
+ public Organizations organizations() {
+ if (this.organizations == null) {
+ this.organizations = new OrganizationsImpl(clientObject.getOrganizations(), this);
+ }
+ return organizations;
+ }
+
/**
* Gets the resource collection API of Monitors. It manages ElasticMonitorResource.
*
@@ -367,39 +402,42 @@ public Monitors monitors() {
}
/**
- * Gets the resource collection API of ElasticVersions.
+ * Gets the resource collection API of AssociateTrafficFilters.
*
- * @return Resource collection API of ElasticVersions.
+ * @return Resource collection API of AssociateTrafficFilters.
*/
- public ElasticVersions elasticVersions() {
- if (this.elasticVersions == null) {
- this.elasticVersions = new ElasticVersionsImpl(clientObject.getElasticVersions(), this);
+ public AssociateTrafficFilters associateTrafficFilters() {
+ if (this.associateTrafficFilters == null) {
+ this.associateTrafficFilters
+ = new AssociateTrafficFiltersImpl(clientObject.getAssociateTrafficFilters(), this);
}
- return elasticVersions;
+ return associateTrafficFilters;
}
/**
- * Gets the resource collection API of MonitoredResources.
+ * Gets the resource collection API of CreateAndAssociateIpFilters.
*
- * @return Resource collection API of MonitoredResources.
+ * @return Resource collection API of CreateAndAssociateIpFilters.
*/
- public MonitoredResources monitoredResources() {
- if (this.monitoredResources == null) {
- this.monitoredResources = new MonitoredResourcesImpl(clientObject.getMonitoredResources(), this);
+ public CreateAndAssociateIpFilters createAndAssociateIpFilters() {
+ if (this.createAndAssociateIpFilters == null) {
+ this.createAndAssociateIpFilters
+ = new CreateAndAssociateIpFiltersImpl(clientObject.getCreateAndAssociateIpFilters(), this);
}
- return monitoredResources;
+ return createAndAssociateIpFilters;
}
/**
- * Gets the resource collection API of DeploymentInfoes.
+ * Gets the resource collection API of CreateAndAssociatePLFilters.
*
- * @return Resource collection API of DeploymentInfoes.
+ * @return Resource collection API of CreateAndAssociatePLFilters.
*/
- public DeploymentInfoes deploymentInfoes() {
- if (this.deploymentInfoes == null) {
- this.deploymentInfoes = new DeploymentInfoesImpl(clientObject.getDeploymentInfoes(), this);
+ public CreateAndAssociatePLFilters createAndAssociatePLFilters() {
+ if (this.createAndAssociatePLFilters == null) {
+ this.createAndAssociatePLFilters
+ = new CreateAndAssociatePLFiltersImpl(clientObject.getCreateAndAssociatePLFilters(), this);
}
- return deploymentInfoes;
+ return createAndAssociatePLFilters;
}
/**
@@ -415,225 +453,211 @@ public ExternalUsers externalUsers() {
}
/**
- * Gets the resource collection API of BillingInfoes.
- *
- * @return Resource collection API of BillingInfoes.
- */
- public BillingInfoes billingInfoes() {
- if (this.billingInfoes == null) {
- this.billingInfoes = new BillingInfoesImpl(clientObject.getBillingInfoes(), this);
- }
- return billingInfoes;
- }
-
- /**
- * Gets the resource collection API of ConnectedPartnerResources.
+ * Gets the resource collection API of TrafficFilters.
*
- * @return Resource collection API of ConnectedPartnerResources.
+ * @return Resource collection API of TrafficFilters.
*/
- public ConnectedPartnerResources connectedPartnerResources() {
- if (this.connectedPartnerResources == null) {
- this.connectedPartnerResources
- = new ConnectedPartnerResourcesImpl(clientObject.getConnectedPartnerResources(), this);
+ public TrafficFilters trafficFilters() {
+ if (this.trafficFilters == null) {
+ this.trafficFilters = new TrafficFiltersImpl(clientObject.getTrafficFilters(), this);
}
- return connectedPartnerResources;
+ return trafficFilters;
}
/**
- * Gets the resource collection API of OpenAIs. It manages OpenAIIntegrationRPModel.
+ * Gets the resource collection API of DetachAndDeleteTrafficFilters.
*
- * @return Resource collection API of OpenAIs.
+ * @return Resource collection API of DetachAndDeleteTrafficFilters.
*/
- public OpenAIs openAIs() {
- if (this.openAIs == null) {
- this.openAIs = new OpenAIsImpl(clientObject.getOpenAIs(), this);
+ public DetachAndDeleteTrafficFilters detachAndDeleteTrafficFilters() {
+ if (this.detachAndDeleteTrafficFilters == null) {
+ this.detachAndDeleteTrafficFilters
+ = new DetachAndDeleteTrafficFiltersImpl(clientObject.getDetachAndDeleteTrafficFilters(), this);
}
- return openAIs;
+ return detachAndDeleteTrafficFilters;
}
/**
- * Gets the resource collection API of TagRules. It manages MonitoringTagRules.
+ * Gets the resource collection API of DetachTrafficFilters.
*
- * @return Resource collection API of TagRules.
+ * @return Resource collection API of DetachTrafficFilters.
*/
- public TagRules tagRules() {
- if (this.tagRules == null) {
- this.tagRules = new TagRulesImpl(clientObject.getTagRules(), this);
+ public DetachTrafficFilters detachTrafficFilters() {
+ if (this.detachTrafficFilters == null) {
+ this.detachTrafficFilters = new DetachTrafficFiltersImpl(clientObject.getDetachTrafficFilters(), this);
}
- return tagRules;
+ return detachTrafficFilters;
}
/**
- * Gets the resource collection API of VMHosts.
+ * Gets the resource collection API of BillingInfoes.
*
- * @return Resource collection API of VMHosts.
+ * @return Resource collection API of BillingInfoes.
*/
- public VMHosts vMHosts() {
- if (this.vMHosts == null) {
- this.vMHosts = new VMHostsImpl(clientObject.getVMHosts(), this);
+ public BillingInfoes billingInfoes() {
+ if (this.billingInfoes == null) {
+ this.billingInfoes = new BillingInfoesImpl(clientObject.getBillingInfoes(), this);
}
- return vMHosts;
+ return billingInfoes;
}
/**
- * Gets the resource collection API of VMIngestions.
+ * Gets the resource collection API of AllTrafficFilters.
*
- * @return Resource collection API of VMIngestions.
+ * @return Resource collection API of AllTrafficFilters.
*/
- public VMIngestions vMIngestions() {
- if (this.vMIngestions == null) {
- this.vMIngestions = new VMIngestionsImpl(clientObject.getVMIngestions(), this);
+ public AllTrafficFilters allTrafficFilters() {
+ if (this.allTrafficFilters == null) {
+ this.allTrafficFilters = new AllTrafficFiltersImpl(clientObject.getAllTrafficFilters(), this);
}
- return vMIngestions;
+ return allTrafficFilters;
}
/**
- * Gets the resource collection API of VMCollections.
+ * Gets the resource collection API of ListAssociatedTrafficFilters.
*
- * @return Resource collection API of VMCollections.
+ * @return Resource collection API of ListAssociatedTrafficFilters.
*/
- public VMCollections vMCollections() {
- if (this.vMCollections == null) {
- this.vMCollections = new VMCollectionsImpl(clientObject.getVMCollections(), this);
+ public ListAssociatedTrafficFilters listAssociatedTrafficFilters() {
+ if (this.listAssociatedTrafficFilters == null) {
+ this.listAssociatedTrafficFilters
+ = new ListAssociatedTrafficFiltersImpl(clientObject.getListAssociatedTrafficFilters(), this);
}
- return vMCollections;
+ return listAssociatedTrafficFilters;
}
/**
- * Gets the resource collection API of UpgradableVersions.
+ * Gets the resource collection API of ConnectedPartnerResources.
*
- * @return Resource collection API of UpgradableVersions.
+ * @return Resource collection API of ConnectedPartnerResources.
*/
- public UpgradableVersions upgradableVersions() {
- if (this.upgradableVersions == null) {
- this.upgradableVersions = new UpgradableVersionsImpl(clientObject.getUpgradableVersions(), this);
+ public ConnectedPartnerResources connectedPartnerResources() {
+ if (this.connectedPartnerResources == null) {
+ this.connectedPartnerResources
+ = new ConnectedPartnerResourcesImpl(clientObject.getConnectedPartnerResources(), this);
}
- return upgradableVersions;
+ return connectedPartnerResources;
}
/**
- * Gets the resource collection API of MonitorOperations.
+ * Gets the resource collection API of DeploymentInfoes.
*
- * @return Resource collection API of MonitorOperations.
+ * @return Resource collection API of DeploymentInfoes.
*/
- public MonitorOperations monitorOperations() {
- if (this.monitorOperations == null) {
- this.monitorOperations = new MonitorOperationsImpl(clientObject.getMonitorOperations(), this);
+ public DeploymentInfoes deploymentInfoes() {
+ if (this.deploymentInfoes == null) {
+ this.deploymentInfoes = new DeploymentInfoesImpl(clientObject.getDeploymentInfoes(), this);
}
- return monitorOperations;
+ return deploymentInfoes;
}
/**
- * Gets the resource collection API of AllTrafficFilters.
+ * Gets the resource collection API of MonitoredResources.
*
- * @return Resource collection API of AllTrafficFilters.
+ * @return Resource collection API of MonitoredResources.
*/
- public AllTrafficFilters allTrafficFilters() {
- if (this.allTrafficFilters == null) {
- this.allTrafficFilters = new AllTrafficFiltersImpl(clientObject.getAllTrafficFilters(), this);
+ public MonitoredResources monitoredResources() {
+ if (this.monitoredResources == null) {
+ this.monitoredResources = new MonitoredResourcesImpl(clientObject.getMonitoredResources(), this);
}
- return allTrafficFilters;
+ return monitoredResources;
}
/**
- * Gets the resource collection API of ListAssociatedTrafficFilters.
+ * Gets the resource collection API of UpgradableVersions.
*
- * @return Resource collection API of ListAssociatedTrafficFilters.
+ * @return Resource collection API of UpgradableVersions.
*/
- public ListAssociatedTrafficFilters listAssociatedTrafficFilters() {
- if (this.listAssociatedTrafficFilters == null) {
- this.listAssociatedTrafficFilters
- = new ListAssociatedTrafficFiltersImpl(clientObject.getListAssociatedTrafficFilters(), this);
+ public UpgradableVersions upgradableVersions() {
+ if (this.upgradableVersions == null) {
+ this.upgradableVersions = new UpgradableVersionsImpl(clientObject.getUpgradableVersions(), this);
}
- return listAssociatedTrafficFilters;
+ return upgradableVersions;
}
/**
- * Gets the resource collection API of CreateAndAssociateIpFilters.
+ * Gets the resource collection API of VMHosts.
*
- * @return Resource collection API of CreateAndAssociateIpFilters.
+ * @return Resource collection API of VMHosts.
*/
- public CreateAndAssociateIpFilters createAndAssociateIpFilters() {
- if (this.createAndAssociateIpFilters == null) {
- this.createAndAssociateIpFilters
- = new CreateAndAssociateIpFiltersImpl(clientObject.getCreateAndAssociateIpFilters(), this);
+ public VMHosts vMHosts() {
+ if (this.vMHosts == null) {
+ this.vMHosts = new VMHostsImpl(clientObject.getVMHosts(), this);
}
- return createAndAssociateIpFilters;
+ return vMHosts;
}
/**
- * Gets the resource collection API of CreateAndAssociatePLFilters.
+ * Gets the resource collection API of MonitoredSubscriptions. It manages MonitoredSubscriptionProperties.
*
- * @return Resource collection API of CreateAndAssociatePLFilters.
+ * @return Resource collection API of MonitoredSubscriptions.
*/
- public CreateAndAssociatePLFilters createAndAssociatePLFilters() {
- if (this.createAndAssociatePLFilters == null) {
- this.createAndAssociatePLFilters
- = new CreateAndAssociatePLFiltersImpl(clientObject.getCreateAndAssociatePLFilters(), this);
+ public MonitoredSubscriptions monitoredSubscriptions() {
+ if (this.monitoredSubscriptions == null) {
+ this.monitoredSubscriptions
+ = new MonitoredSubscriptionsImpl(clientObject.getMonitoredSubscriptions(), this);
}
- return createAndAssociatePLFilters;
+ return monitoredSubscriptions;
}
/**
- * Gets the resource collection API of AssociateTrafficFilters.
+ * Gets the resource collection API of OpenAIs. It manages OpenAIIntegrationRPModel.
*
- * @return Resource collection API of AssociateTrafficFilters.
+ * @return Resource collection API of OpenAIs.
*/
- public AssociateTrafficFilters associateTrafficFilters() {
- if (this.associateTrafficFilters == null) {
- this.associateTrafficFilters
- = new AssociateTrafficFiltersImpl(clientObject.getAssociateTrafficFilters(), this);
+ public OpenAIs openAIs() {
+ if (this.openAIs == null) {
+ this.openAIs = new OpenAIsImpl(clientObject.getOpenAIs(), this);
}
- return associateTrafficFilters;
+ return openAIs;
}
/**
- * Gets the resource collection API of DetachAndDeleteTrafficFilters.
+ * Gets the resource collection API of TagRules. It manages MonitoringTagRules.
*
- * @return Resource collection API of DetachAndDeleteTrafficFilters.
+ * @return Resource collection API of TagRules.
*/
- public DetachAndDeleteTrafficFilters detachAndDeleteTrafficFilters() {
- if (this.detachAndDeleteTrafficFilters == null) {
- this.detachAndDeleteTrafficFilters
- = new DetachAndDeleteTrafficFiltersImpl(clientObject.getDetachAndDeleteTrafficFilters(), this);
+ public TagRules tagRules() {
+ if (this.tagRules == null) {
+ this.tagRules = new TagRulesImpl(clientObject.getTagRules(), this);
}
- return detachAndDeleteTrafficFilters;
+ return tagRules;
}
/**
- * Gets the resource collection API of DetachTrafficFilters.
+ * Gets the resource collection API of MonitorOperations.
*
- * @return Resource collection API of DetachTrafficFilters.
+ * @return Resource collection API of MonitorOperations.
*/
- public DetachTrafficFilters detachTrafficFilters() {
- if (this.detachTrafficFilters == null) {
- this.detachTrafficFilters = new DetachTrafficFiltersImpl(clientObject.getDetachTrafficFilters(), this);
+ public MonitorOperations monitorOperations() {
+ if (this.monitorOperations == null) {
+ this.monitorOperations = new MonitorOperationsImpl(clientObject.getMonitorOperations(), this);
}
- return detachTrafficFilters;
+ return monitorOperations;
}
/**
- * Gets the resource collection API of TrafficFilters.
+ * Gets the resource collection API of VMCollections.
*
- * @return Resource collection API of TrafficFilters.
+ * @return Resource collection API of VMCollections.
*/
- public TrafficFilters trafficFilters() {
- if (this.trafficFilters == null) {
- this.trafficFilters = new TrafficFiltersImpl(clientObject.getTrafficFilters(), this);
+ public VMCollections vMCollections() {
+ if (this.vMCollections == null) {
+ this.vMCollections = new VMCollectionsImpl(clientObject.getVMCollections(), this);
}
- return trafficFilters;
+ return vMCollections;
}
/**
- * Gets the resource collection API of Organizations.
+ * Gets the resource collection API of VMIngestions.
*
- * @return Resource collection API of Organizations.
+ * @return Resource collection API of VMIngestions.
*/
- public Organizations organizations() {
- if (this.organizations == null) {
- this.organizations = new OrganizationsImpl(clientObject.getOrganizations(), this);
+ public VMIngestions vMIngestions() {
+ if (this.vMIngestions == null) {
+ this.vMIngestions = new VMIngestionsImpl(clientObject.getVMIngestions(), this);
}
- return organizations;
+ return vMIngestions;
}
/**
diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/ElasticManagementClient.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/ElasticManagementClient.java
index 828a80ef1989..e235148671ab 100644
--- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/ElasticManagementClient.java
+++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/ElasticManagementClient.java
@@ -53,6 +53,20 @@ public interface ElasticManagementClient {
*/
OperationsClient getOperations();
+ /**
+ * Gets the ElasticVersionsClient object to access its operations.
+ *
+ * @return the ElasticVersionsClient object.
+ */
+ ElasticVersionsClient getElasticVersions();
+
+ /**
+ * Gets the OrganizationsClient object to access its operations.
+ *
+ * @return the OrganizationsClient object.
+ */
+ OrganizationsClient getOrganizations();
+
/**
* Gets the MonitorsClient object to access its operations.
*
@@ -61,25 +75,25 @@ public interface ElasticManagementClient {
MonitorsClient getMonitors();
/**
- * Gets the ElasticVersionsClient object to access its operations.
+ * Gets the AssociateTrafficFiltersClient object to access its operations.
*
- * @return the ElasticVersionsClient object.
+ * @return the AssociateTrafficFiltersClient object.
*/
- ElasticVersionsClient getElasticVersions();
+ AssociateTrafficFiltersClient getAssociateTrafficFilters();
/**
- * Gets the MonitoredResourcesClient object to access its operations.
+ * Gets the CreateAndAssociateIpFiltersClient object to access its operations.
*
- * @return the MonitoredResourcesClient object.
+ * @return the CreateAndAssociateIpFiltersClient object.
*/
- MonitoredResourcesClient getMonitoredResources();
+ CreateAndAssociateIpFiltersClient getCreateAndAssociateIpFilters();
/**
- * Gets the DeploymentInfoesClient object to access its operations.
+ * Gets the CreateAndAssociatePLFiltersClient object to access its operations.
*
- * @return the DeploymentInfoesClient object.
+ * @return the CreateAndAssociatePLFiltersClient object.
*/
- DeploymentInfoesClient getDeploymentInfoes();
+ CreateAndAssociatePLFiltersClient getCreateAndAssociatePLFilters();
/**
* Gets the ExternalUsersClient object to access its operations.
@@ -89,128 +103,121 @@ public interface ElasticManagementClient {
ExternalUsersClient getExternalUsers();
/**
- * Gets the BillingInfoesClient object to access its operations.
- *
- * @return the BillingInfoesClient object.
- */
- BillingInfoesClient getBillingInfoes();
-
- /**
- * Gets the ConnectedPartnerResourcesClient object to access its operations.
+ * Gets the TrafficFiltersClient object to access its operations.
*
- * @return the ConnectedPartnerResourcesClient object.
+ * @return the TrafficFiltersClient object.
*/
- ConnectedPartnerResourcesClient getConnectedPartnerResources();
+ TrafficFiltersClient getTrafficFilters();
/**
- * Gets the OpenAIsClient object to access its operations.
+ * Gets the DetachAndDeleteTrafficFiltersClient object to access its operations.
*
- * @return the OpenAIsClient object.
+ * @return the DetachAndDeleteTrafficFiltersClient object.
*/
- OpenAIsClient getOpenAIs();
+ DetachAndDeleteTrafficFiltersClient getDetachAndDeleteTrafficFilters();
/**
- * Gets the TagRulesClient object to access its operations.
+ * Gets the DetachTrafficFiltersClient object to access its operations.
*
- * @return the TagRulesClient object.
+ * @return the DetachTrafficFiltersClient object.
*/
- TagRulesClient getTagRules();
+ DetachTrafficFiltersClient getDetachTrafficFilters();
/**
- * Gets the VMHostsClient object to access its operations.
+ * Gets the BillingInfoesClient object to access its operations.
*
- * @return the VMHostsClient object.
+ * @return the BillingInfoesClient object.
*/
- VMHostsClient getVMHosts();
+ BillingInfoesClient getBillingInfoes();
/**
- * Gets the VMIngestionsClient object to access its operations.
+ * Gets the AllTrafficFiltersClient object to access its operations.
*
- * @return the VMIngestionsClient object.
+ * @return the AllTrafficFiltersClient object.
*/
- VMIngestionsClient getVMIngestions();
+ AllTrafficFiltersClient getAllTrafficFilters();
/**
- * Gets the VMCollectionsClient object to access its operations.
+ * Gets the ListAssociatedTrafficFiltersClient object to access its operations.
*
- * @return the VMCollectionsClient object.
+ * @return the ListAssociatedTrafficFiltersClient object.
*/
- VMCollectionsClient getVMCollections();
+ ListAssociatedTrafficFiltersClient getListAssociatedTrafficFilters();
/**
- * Gets the UpgradableVersionsClient object to access its operations.
+ * Gets the ConnectedPartnerResourcesClient object to access its operations.
*
- * @return the UpgradableVersionsClient object.
+ * @return the ConnectedPartnerResourcesClient object.
*/
- UpgradableVersionsClient getUpgradableVersions();
+ ConnectedPartnerResourcesClient getConnectedPartnerResources();
/**
- * Gets the MonitorOperationsClient object to access its operations.
+ * Gets the DeploymentInfoesClient object to access its operations.
*
- * @return the MonitorOperationsClient object.
+ * @return the DeploymentInfoesClient object.
*/
- MonitorOperationsClient getMonitorOperations();
+ DeploymentInfoesClient getDeploymentInfoes();
/**
- * Gets the AllTrafficFiltersClient object to access its operations.
+ * Gets the MonitoredResourcesClient object to access its operations.
*
- * @return the AllTrafficFiltersClient object.
+ * @return the MonitoredResourcesClient object.
*/
- AllTrafficFiltersClient getAllTrafficFilters();
+ MonitoredResourcesClient getMonitoredResources();
/**
- * Gets the ListAssociatedTrafficFiltersClient object to access its operations.
+ * Gets the UpgradableVersionsClient object to access its operations.
*
- * @return the ListAssociatedTrafficFiltersClient object.
+ * @return the UpgradableVersionsClient object.
*/
- ListAssociatedTrafficFiltersClient getListAssociatedTrafficFilters();
+ UpgradableVersionsClient getUpgradableVersions();
/**
- * Gets the CreateAndAssociateIpFiltersClient object to access its operations.
+ * Gets the VMHostsClient object to access its operations.
*
- * @return the CreateAndAssociateIpFiltersClient object.
+ * @return the VMHostsClient object.
*/
- CreateAndAssociateIpFiltersClient getCreateAndAssociateIpFilters();
+ VMHostsClient getVMHosts();
/**
- * Gets the CreateAndAssociatePLFiltersClient object to access its operations.
+ * Gets the MonitoredSubscriptionsClient object to access its operations.
*
- * @return the CreateAndAssociatePLFiltersClient object.
+ * @return the MonitoredSubscriptionsClient object.
*/
- CreateAndAssociatePLFiltersClient getCreateAndAssociatePLFilters();
+ MonitoredSubscriptionsClient getMonitoredSubscriptions();
/**
- * Gets the AssociateTrafficFiltersClient object to access its operations.
+ * Gets the OpenAIsClient object to access its operations.
*
- * @return the AssociateTrafficFiltersClient object.
+ * @return the OpenAIsClient object.
*/
- AssociateTrafficFiltersClient getAssociateTrafficFilters();
+ OpenAIsClient getOpenAIs();
/**
- * Gets the DetachAndDeleteTrafficFiltersClient object to access its operations.
+ * Gets the TagRulesClient object to access its operations.
*
- * @return the DetachAndDeleteTrafficFiltersClient object.
+ * @return the TagRulesClient object.
*/
- DetachAndDeleteTrafficFiltersClient getDetachAndDeleteTrafficFilters();
+ TagRulesClient getTagRules();
/**
- * Gets the DetachTrafficFiltersClient object to access its operations.
+ * Gets the MonitorOperationsClient object to access its operations.
*
- * @return the DetachTrafficFiltersClient object.
+ * @return the MonitorOperationsClient object.
*/
- DetachTrafficFiltersClient getDetachTrafficFilters();
+ MonitorOperationsClient getMonitorOperations();
/**
- * Gets the TrafficFiltersClient object to access its operations.
+ * Gets the VMCollectionsClient object to access its operations.
*
- * @return the TrafficFiltersClient object.
+ * @return the VMCollectionsClient object.
*/
- TrafficFiltersClient getTrafficFilters();
+ VMCollectionsClient getVMCollections();
/**
- * Gets the OrganizationsClient object to access its operations.
+ * Gets the VMIngestionsClient object to access its operations.
*
- * @return the OrganizationsClient object.
+ * @return the VMIngestionsClient object.
*/
- OrganizationsClient getOrganizations();
+ VMIngestionsClient getVMIngestions();
}
diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/MonitoredSubscriptionsClient.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/MonitoredSubscriptionsClient.java
new file mode 100644
index 000000000000..08f9f77f329a
--- /dev/null
+++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/MonitoredSubscriptionsClient.java
@@ -0,0 +1,278 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.elastic.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.elastic.fluent.models.MonitoredSubscriptionPropertiesInner;
+
+/**
+ * An instance of this class provides access to all the operations defined in MonitoredSubscriptionsClient.
+ */
+public interface MonitoredSubscriptionsClient {
+ /**
+ * List all the subscriptions currently being monitored by the Elastic monitor resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Monitor resource name.
+ * @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 paged collection of MonitoredSubscriptionProperties items as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String monitorName);
+
+ /**
+ * List all the subscriptions currently being monitored by the Elastic monitor resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Monitor resource name.
+ * @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 paged collection of MonitoredSubscriptionProperties items as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String monitorName,
+ Context context);
+
+ /**
+ * List all the subscriptions currently being monitored by the Elastic monitor resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Monitor resource name.
+ * @param configurationName The configuration name. Only 'default' value is supported.
+ * @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 request to update subscriptions needed to be monitored by the Elastic monitor resource along with
+ * {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String resourceGroupName, String monitorName,
+ String configurationName, Context context);
+
+ /**
+ * List all the subscriptions currently being monitored by the Elastic monitor resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Monitor resource name.
+ * @param configurationName The configuration name. Only 'default' value is supported.
+ * @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 request to update subscriptions needed to be monitored by the Elastic monitor resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ MonitoredSubscriptionPropertiesInner get(String resourceGroupName, String monitorName, String configurationName);
+
+ /**
+ * Add the subscriptions that should be monitored by the Elastic monitor resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Monitor resource name.
+ * @param configurationName The configuration name. Only 'default' value is supported.
+ * @param body The body parameter.
+ * @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 the request to update subscriptions needed to be monitored by the
+ * Elastic monitor resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, MonitoredSubscriptionPropertiesInner>
+ beginCreateorUpdate(String resourceGroupName, String monitorName, String configurationName,
+ MonitoredSubscriptionPropertiesInner body);
+
+ /**
+ * Add the subscriptions that should be monitored by the Elastic monitor resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Monitor resource name.
+ * @param configurationName The configuration name. Only 'default' value is supported.
+ * @param body The body parameter.
+ * @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 the request to update subscriptions needed to be monitored by the
+ * Elastic monitor resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, MonitoredSubscriptionPropertiesInner>
+ beginCreateorUpdate(String resourceGroupName, String monitorName, String configurationName,
+ MonitoredSubscriptionPropertiesInner body, Context context);
+
+ /**
+ * Add the subscriptions that should be monitored by the Elastic monitor resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Monitor resource name.
+ * @param configurationName The configuration name. Only 'default' value is supported.
+ * @param body The body parameter.
+ * @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 request to update subscriptions needed to be monitored by the Elastic monitor resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ MonitoredSubscriptionPropertiesInner createorUpdate(String resourceGroupName, String monitorName,
+ String configurationName, MonitoredSubscriptionPropertiesInner body);
+
+ /**
+ * Add the subscriptions that should be monitored by the Elastic monitor resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Monitor resource name.
+ * @param configurationName The configuration name. Only 'default' value is supported.
+ * @param body The body parameter.
+ * @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 request to update subscriptions needed to be monitored by the Elastic monitor resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ MonitoredSubscriptionPropertiesInner createorUpdate(String resourceGroupName, String monitorName,
+ String configurationName, MonitoredSubscriptionPropertiesInner body, Context context);
+
+ /**
+ * Updates the subscriptions that are being monitored by the Elastic monitor resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Monitor resource name.
+ * @param configurationName The configuration name. Only 'default' value is supported.
+ * @param body The body parameter.
+ * @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 the request to update subscriptions needed to be monitored by the
+ * Elastic monitor resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, MonitoredSubscriptionPropertiesInner> beginUpdate(
+ String resourceGroupName, String monitorName, String configurationName,
+ MonitoredSubscriptionPropertiesInner body);
+
+ /**
+ * Updates the subscriptions that are being monitored by the Elastic monitor resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Monitor resource name.
+ * @param configurationName The configuration name. Only 'default' value is supported.
+ * @param body The body parameter.
+ * @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 the request to update subscriptions needed to be monitored by the
+ * Elastic monitor resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, MonitoredSubscriptionPropertiesInner> beginUpdate(
+ String resourceGroupName, String monitorName, String configurationName,
+ MonitoredSubscriptionPropertiesInner body, Context context);
+
+ /**
+ * Updates the subscriptions that are being monitored by the Elastic monitor resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Monitor resource name.
+ * @param configurationName The configuration name. Only 'default' value is supported.
+ * @param body The body parameter.
+ * @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 request to update subscriptions needed to be monitored by the Elastic monitor resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ MonitoredSubscriptionPropertiesInner update(String resourceGroupName, String monitorName, String configurationName,
+ MonitoredSubscriptionPropertiesInner body);
+
+ /**
+ * Updates the subscriptions that are being monitored by the Elastic monitor resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Monitor resource name.
+ * @param configurationName The configuration name. Only 'default' value is supported.
+ * @param body The body parameter.
+ * @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 request to update subscriptions needed to be monitored by the Elastic monitor resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ MonitoredSubscriptionPropertiesInner update(String resourceGroupName, String monitorName, String configurationName,
+ MonitoredSubscriptionPropertiesInner body, Context context);
+
+ /**
+ * Updates the subscriptions that are being monitored by the Elastic monitor resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Monitor resource name.
+ * @param configurationName The configuration name. Only 'default' value is supported.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String monitorName,
+ String configurationName);
+
+ /**
+ * Updates the subscriptions that are being monitored by the Elastic monitor resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Monitor resource name.
+ * @param configurationName The configuration name. Only 'default' value is supported.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String monitorName,
+ String configurationName, Context context);
+
+ /**
+ * Updates the subscriptions that are being monitored by the Elastic monitor resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Monitor resource name.
+ * @param configurationName The configuration name. Only 'default' value is supported.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String monitorName, String configurationName);
+
+ /**
+ * Updates the subscriptions that are being monitored by the Elastic monitor resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Monitor resource name.
+ * @param configurationName The configuration name. Only 'default' value is supported.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String monitorName, String configurationName, Context context);
+}
diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/MonitorsClient.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/MonitorsClient.java
index c11a7159df22..13382aa4a27e 100644
--- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/MonitorsClient.java
+++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/MonitorsClient.java
@@ -98,6 +98,7 @@ Response getByResourceGroupWithResponse(String reso
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Monitor resource name.
+ * @param body Elastic monitor resource model.
* @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.
@@ -105,7 +106,7 @@ Response getByResourceGroupWithResponse(String reso
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, ElasticMonitorResourceInner>
- beginCreate(String resourceGroupName, String monitorName);
+ beginCreate(String resourceGroupName, String monitorName, ElasticMonitorResourceInner body);
/**
* Create a monitor resource.
@@ -128,13 +129,14 @@ Response getByResourceGroupWithResponse(String reso
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Monitor resource name.
+ * @param body Elastic monitor resource model.
* @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 monitor resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- ElasticMonitorResourceInner create(String resourceGroupName, String monitorName);
+ ElasticMonitorResourceInner create(String resourceGroupName, String monitorName, ElasticMonitorResourceInner body);
/**
* Create a monitor resource.
@@ -152,6 +154,21 @@ Response getByResourceGroupWithResponse(String reso
ElasticMonitorResourceInner create(String resourceGroupName, String monitorName, ElasticMonitorResourceInner body,
Context context);
+ /**
+ * Update a monitor resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Monitor resource name.
+ * @param body Elastic resource model update parameters.
+ * @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 monitor resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ElasticMonitorResourceInner>
+ beginUpdate(String resourceGroupName, String monitorName, ElasticMonitorResourceUpdateParameters body);
+
/**
* Update a monitor resource.
*
@@ -162,24 +179,42 @@ ElasticMonitorResourceInner create(String resourceGroupName, String monitorName,
* @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 monitor resource along with {@link Response}.
+ * @return the {@link SyncPoller} for polling of monitor resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ElasticMonitorResourceInner> beginUpdate(
+ String resourceGroupName, String monitorName, ElasticMonitorResourceUpdateParameters body, Context context);
+
+ /**
+ * Update a monitor resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Monitor resource name.
+ * @param body Elastic resource model update parameters.
+ * @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 monitor resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response updateWithResponse(String resourceGroupName, String monitorName,
- ElasticMonitorResourceUpdateParameters body, Context context);
+ ElasticMonitorResourceInner update(String resourceGroupName, String monitorName,
+ ElasticMonitorResourceUpdateParameters body);
/**
* Update a monitor resource.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Monitor resource name.
+ * @param body Elastic resource model update parameters.
+ * @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 monitor resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- ElasticMonitorResourceInner update(String resourceGroupName, String monitorName);
+ ElasticMonitorResourceInner update(String resourceGroupName, String monitorName,
+ ElasticMonitorResourceUpdateParameters body, Context context);
/**
* Delete a monitor resource.
diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/OpenAIsClient.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/OpenAIsClient.java
index 0874f364e09c..1d660fed8168 100644
--- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/OpenAIsClient.java
+++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/OpenAIsClient.java
@@ -96,13 +96,15 @@ Response createOrUpdateWithResponse(String resour
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Monitor resource name.
* @param integrationName OpenAI Integration name.
+ * @param body The body parameter.
* @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 capture properties of Open AI resource Integration.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- OpenAIIntegrationRPModelInner createOrUpdate(String resourceGroupName, String monitorName, String integrationName);
+ OpenAIIntegrationRPModelInner createOrUpdate(String resourceGroupName, String monitorName, String integrationName,
+ OpenAIIntegrationRPModelInner body);
/**
* Delete OpenAI integration rule for a given monitor resource.
diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/OperationsClient.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/OperationsClient.java
index b1a10f1f5ee4..f953a99c13d9 100644
--- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/OperationsClient.java
+++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/OperationsClient.java
@@ -15,25 +15,23 @@
*/
public interface OperationsClient {
/**
- * List all operations provided by Microsoft.Elastic.
+ * List the operations for the provider.
*
* @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 result of GET request to list the Microsoft.Elastic operations as paginated response with
- * {@link PagedIterable}.
+ * @return represents a paginated list of operations as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list();
/**
- * List all operations provided by Microsoft.Elastic.
+ * List the operations for the provider.
*
* @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 result of GET request to list the Microsoft.Elastic operations as paginated response with
- * {@link PagedIterable}.
+ * @return represents a paginated list of operations as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(Context context);
diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/OrganizationsClient.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/OrganizationsClient.java
index 6a4fe7e8c923..e2fb86a18132 100644
--- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/OrganizationsClient.java
+++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/OrganizationsClient.java
@@ -7,20 +7,56 @@
import com.azure.core.annotation.ReturnType;
import com.azure.core.annotation.ServiceMethod;
import com.azure.core.http.rest.Response;
+import com.azure.core.management.polling.PollResult;
import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.elastic.fluent.models.ElasticMonitorResourceInner;
import com.azure.resourcemanager.elastic.fluent.models.ElasticOrganizationToAzureSubscriptionMappingResponseInner;
import com.azure.resourcemanager.elastic.fluent.models.UserApiKeyResponseInner;
+import com.azure.resourcemanager.elastic.models.ResubscribeProperties;
import com.azure.resourcemanager.elastic.models.UserEmailId;
/**
* An instance of this class provides access to all the operations defined in OrganizationsClient.
*/
public interface OrganizationsClient {
+ /**
+ * Get Elastic Organization To Azure Subscription Mapping details for the logged-in user.
+ *
+ * >;
+ * /**
+ * Get Elastic Organization To Azure Subscription Mapping details for the logged-in user.
+ *
+ * @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 Azure Subscription ID to which the Organization of the logged in user belongs and gets billed into
+ * along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response
+ getElasticToAzureSubscriptionMappingWithResponse(Context context);
+
+ /**
+ * Get Elastic Organization To Azure Subscription Mapping details for the logged-in user.
+ *
+ * >;
+ * /**
+ * Get Elastic Organization To Azure Subscription Mapping details for the logged-in user.
+ *
+ * @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 Azure Subscription ID to which the Organization of the logged in user belongs and gets billed into.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ElasticOrganizationToAzureSubscriptionMappingResponseInner getElasticToAzureSubscriptionMapping();
+
/**
* Fetch User API Key from internal database, if it was generated and stored while creating the Elasticsearch
* Organization.
*
- * @param body Email Id parameter of the User Organization, of which the API Key must be returned.
+ * @param body The request body.
* @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.
@@ -35,35 +71,72 @@ public interface OrganizationsClient {
* Fetch User API Key from internal database, if it was generated and stored while creating the Elasticsearch
* Organization.
*
+ * @param body The request body.
+ * @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 User Api Key created for the Organization associated with the User Email Id that was passed in the
* request.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- UserApiKeyResponseInner getApiKey();
+ UserApiKeyResponseInner getApiKey(UserEmailId body);
/**
- * Get Elastic Organization To Azure Subscription Mapping details for the logged-in user.
+ * Resubscribe the Elasticsearch Organization.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Monitor resource name.
+ * @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 monitor resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ElasticMonitorResourceInner>
+ beginResubscribe(String resourceGroupName, String monitorName);
+
+ /**
+ * Resubscribe the Elasticsearch Organization.
*
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Monitor resource name.
+ * @param body Resubscribe Properties.
* @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 elastic Organization To Azure Subscription Mapping details for the logged-in user along with
- * {@link Response}.
+ * @return the {@link SyncPoller} for polling of monitor resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ElasticMonitorResourceInner>
+ beginResubscribe(String resourceGroupName, String monitorName, ResubscribeProperties body, Context context);
+
+ /**
+ * Resubscribe the Elasticsearch Organization.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Monitor resource name.
+ * @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 monitor resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response
- getElasticToAzureSubscriptionMappingWithResponse(Context context);
+ ElasticMonitorResourceInner resubscribe(String resourceGroupName, String monitorName);
/**
- * Get Elastic Organization To Azure Subscription Mapping details for the logged-in user.
+ * Resubscribe the Elasticsearch Organization.
*
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Monitor resource name.
+ * @param body Resubscribe Properties.
+ * @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 elastic Organization To Azure Subscription Mapping details for the logged-in user.
+ * @return monitor resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- ElasticOrganizationToAzureSubscriptionMappingResponseInner getElasticToAzureSubscriptionMapping();
+ ElasticMonitorResourceInner resubscribe(String resourceGroupName, String monitorName, ResubscribeProperties body,
+ Context context);
}
diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/TagRulesClient.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/TagRulesClient.java
index c9556b6f65dd..d8efcff0886e 100644
--- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/TagRulesClient.java
+++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/TagRulesClient.java
@@ -45,24 +45,23 @@ public interface TagRulesClient {
PagedIterable list(String resourceGroupName, String monitorName, Context context);
/**
- * Create or update a tag rule set for a given monitor resource.
+ * Get a tag rule set for a given monitor resource.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Monitor resource name.
* @param ruleSetName Tag Rule Set resource name.
- * @param body request body of MonitoringTagRules.
* @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 capture logs and metrics of Azure resources based on ARM tags along with {@link Response}.
+ * @return a tag rule set for a given monitor resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response createOrUpdateWithResponse(String resourceGroupName, String monitorName,
- String ruleSetName, MonitoringTagRulesInner body, Context context);
+ Response getWithResponse(String resourceGroupName, String monitorName, String ruleSetName,
+ Context context);
/**
- * Create or update a tag rule set for a given monitor resource.
+ * Get a tag rule set for a given monitor resource.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Monitor resource name.
@@ -70,40 +69,43 @@ Response createOrUpdateWithResponse(String resourceGrou
* @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 capture logs and metrics of Azure resources based on ARM tags.
+ * @return a tag rule set for a given monitor resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- MonitoringTagRulesInner createOrUpdate(String resourceGroupName, String monitorName, String ruleSetName);
+ MonitoringTagRulesInner get(String resourceGroupName, String monitorName, String ruleSetName);
/**
- * Get a tag rule set for a given monitor resource.
+ * Create or update a tag rule set for a given monitor resource.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Monitor resource name.
* @param ruleSetName Tag Rule Set resource name.
+ * @param body request body of MonitoringTagRules.
* @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 tag rule set for a given monitor resource along with {@link Response}.
+ * @return capture logs and metrics of Azure resources based on ARM tags along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response getWithResponse(String resourceGroupName, String monitorName, String ruleSetName,
- Context context);
+ Response createOrUpdateWithResponse(String resourceGroupName, String monitorName,
+ String ruleSetName, MonitoringTagRulesInner body, Context context);
/**
- * Get a tag rule set for a given monitor resource.
+ * Create or update a tag rule set for a given monitor resource.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Monitor resource name.
* @param ruleSetName Tag Rule Set resource name.
+ * @param body request body of MonitoringTagRules.
* @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 tag rule set for a given monitor resource.
+ * @return capture logs and metrics of Azure resources based on ARM tags.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- MonitoringTagRulesInner get(String resourceGroupName, String monitorName, String ruleSetName);
+ MonitoringTagRulesInner createOrUpdate(String resourceGroupName, String monitorName, String ruleSetName,
+ MonitoringTagRulesInner body);
/**
* Delete a tag rule set for a given monitor resource.
diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/models/DeploymentInfoResponseInner.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/models/DeploymentInfoResponseInner.java
index 5c7bc52bc0a8..1b28d1e57f58 100644
--- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/models/DeploymentInfoResponseInner.java
+++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/models/DeploymentInfoResponseInner.java
@@ -54,6 +54,16 @@ public final class DeploymentInfoResponseInner implements JsonSerializable tags) {
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
- if (sku() != null) {
- sku().validate();
- }
if (properties() != null) {
properties().validate();
}
+ if (sku() != null) {
+ sku().validate();
+ }
if (identity() != null) {
identity().validate();
}
@@ -204,8 +229,9 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
jsonWriter.writeStringField("location", location());
jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element));
- jsonWriter.writeJsonField("sku", this.sku);
jsonWriter.writeJsonField("properties", this.properties);
+ jsonWriter.writeStringField("kind", this.kind);
+ jsonWriter.writeJsonField("sku", this.sku);
jsonWriter.writeJsonField("identity", this.identity);
return jsonWriter.writeEndObject();
}
@@ -237,10 +263,12 @@ public static ElasticMonitorResourceInner fromJson(JsonReader jsonReader) throws
} else if ("tags".equals(fieldName)) {
Map tags = reader.readMap(reader1 -> reader1.getString());
deserializedElasticMonitorResourceInner.withTags(tags);
- } else if ("sku".equals(fieldName)) {
- deserializedElasticMonitorResourceInner.sku = ResourceSku.fromJson(reader);
} else if ("properties".equals(fieldName)) {
deserializedElasticMonitorResourceInner.properties = MonitorProperties.fromJson(reader);
+ } else if ("kind".equals(fieldName)) {
+ deserializedElasticMonitorResourceInner.kind = reader.getString();
+ } else if ("sku".equals(fieldName)) {
+ deserializedElasticMonitorResourceInner.sku = ResourceSku.fromJson(reader);
} else if ("identity".equals(fieldName)) {
deserializedElasticMonitorResourceInner.identity = IdentityProperties.fromJson(reader);
} else if ("systemData".equals(fieldName)) {
diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/models/MonitoredSubscriptionPropertiesInner.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/models/MonitoredSubscriptionPropertiesInner.java
new file mode 100644
index 000000000000..ec33669cfbf2
--- /dev/null
+++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/models/MonitoredSubscriptionPropertiesInner.java
@@ -0,0 +1,169 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.elastic.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.elastic.models.SubscriptionList;
+import java.io.IOException;
+
+/**
+ * The request to update subscriptions needed to be monitored by the Elastic monitor resource.
+ */
+@Fluent
+public final class MonitoredSubscriptionPropertiesInner extends ProxyResource {
+ /*
+ * The request to update subscriptions needed to be monitored by the Elastic monitor resource.
+ */
+ private SubscriptionList properties;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ private SystemData systemData;
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /**
+ * Creates an instance of MonitoredSubscriptionPropertiesInner class.
+ */
+ public MonitoredSubscriptionPropertiesInner() {
+ }
+
+ /**
+ * Get the properties property: The request to update subscriptions needed to be monitored by the Elastic monitor
+ * resource.
+ *
+ * @return the properties value.
+ */
+ public SubscriptionList properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: The request to update subscriptions needed to be monitored by the Elastic monitor
+ * resource.
+ *
+ * @param properties the properties value to set.
+ * @return the MonitoredSubscriptionPropertiesInner object itself.
+ */
+ public MonitoredSubscriptionPropertiesInner withProperties(SubscriptionList properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (properties() != null) {
+ properties().validate();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.properties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of MonitoredSubscriptionPropertiesInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of MonitoredSubscriptionPropertiesInner if the JsonReader was pointing to an instance of it,
+ * or null if it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the MonitoredSubscriptionPropertiesInner.
+ */
+ public static MonitoredSubscriptionPropertiesInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ MonitoredSubscriptionPropertiesInner deserializedMonitoredSubscriptionPropertiesInner
+ = new MonitoredSubscriptionPropertiesInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedMonitoredSubscriptionPropertiesInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedMonitoredSubscriptionPropertiesInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedMonitoredSubscriptionPropertiesInner.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedMonitoredSubscriptionPropertiesInner.properties = SubscriptionList.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedMonitoredSubscriptionPropertiesInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedMonitoredSubscriptionPropertiesInner;
+ });
+ }
+}
diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/models/MonitoringTagRulesInner.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/models/MonitoringTagRulesInner.java
index 8e0601ee525b..76540d594ae4 100644
--- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/models/MonitoringTagRulesInner.java
+++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/models/MonitoringTagRulesInner.java
@@ -24,7 +24,7 @@ public final class MonitoringTagRulesInner extends ProxyResource {
private MonitoringTagRulesProperties properties;
/*
- * The system metadata relating to this resource
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
*/
private SystemData systemData;
@@ -70,7 +70,7 @@ public MonitoringTagRulesInner withProperties(MonitoringTagRulesProperties prope
}
/**
- * Get the systemData property: The system metadata relating to this resource.
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
*
* @return the systemData value.
*/
diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/models/OpenAIIntegrationRPModelInner.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/models/OpenAIIntegrationRPModelInner.java
index 3a525d365a35..4aa26cf53d4f 100644
--- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/models/OpenAIIntegrationRPModelInner.java
+++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/models/OpenAIIntegrationRPModelInner.java
@@ -6,6 +6,7 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
import com.azure.json.JsonReader;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
@@ -22,6 +23,11 @@ public final class OpenAIIntegrationRPModelInner extends ProxyResource {
*/
private OpenAIIntegrationProperties properties;
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ private SystemData systemData;
+
/*
* The type of the resource.
*/
@@ -63,6 +69,15 @@ public OpenAIIntegrationRPModelInner withProperties(OpenAIIntegrationProperties
return this;
}
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
/**
* Get the type property: The type of the resource.
*
@@ -139,6 +154,8 @@ public static OpenAIIntegrationRPModelInner fromJson(JsonReader jsonReader) thro
deserializedOpenAIIntegrationRPModelInner.type = reader.getString();
} else if ("properties".equals(fieldName)) {
deserializedOpenAIIntegrationRPModelInner.properties = OpenAIIntegrationProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedOpenAIIntegrationRPModelInner.systemData = SystemData.fromJson(reader);
} else {
reader.skipChildren();
}
diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/AllTrafficFiltersClientImpl.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/AllTrafficFiltersClientImpl.java
index 8045e5ea76b1..730cf8099411 100644
--- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/AllTrafficFiltersClientImpl.java
+++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/AllTrafficFiltersClientImpl.java
@@ -21,6 +21,7 @@
import com.azure.core.management.exception.ManagementException;
import com.azure.core.util.Context;
import com.azure.core.util.FluxUtil;
+import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.elastic.fluent.AllTrafficFiltersClient;
import com.azure.resourcemanager.elastic.fluent.models.ElasticTrafficFilterResponseInner;
import reactor.core.publisher.Mono;
@@ -65,6 +66,15 @@ Mono> list(@HostParam("$host") Strin
@QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
@PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName,
@HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Elastic/monitors/{monitorName}/listAllTrafficFilters")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listSync(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName,
+ @HeaderParam("Accept") String accept, Context context);
}
/**
@@ -103,42 +113,6 @@ private Mono> listWithResponseAsync(
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
- /**
- * Get the list of all traffic filters for the account.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param monitorName Monitor resource name.
- * @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 list of all traffic filters for the account along with {@link Response} on successful completion of
- * {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listWithResponseAsync(String resourceGroupName,
- String monitorName, Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() 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 (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (monitorName == null) {
- return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
- resourceGroupName, monitorName, accept, context);
- }
-
/**
* Get the list of all traffic filters for the account.
*
@@ -168,7 +142,27 @@ private Mono listAsync(String resourceGroupNa
@ServiceMethod(returns = ReturnType.SINGLE)
public Response listWithResponse(String resourceGroupName, String monitorName,
Context context) {
- return listWithResponseAsync(resourceGroupName, monitorName, context).block();
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (monitorName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, monitorName, accept, context);
}
/**
@@ -185,4 +179,6 @@ public Response listWithResponse(String resou
public ElasticTrafficFilterResponseInner list(String resourceGroupName, String monitorName) {
return listWithResponse(resourceGroupName, monitorName, Context.NONE).getValue();
}
+
+ private static final ClientLogger LOGGER = new ClientLogger(AllTrafficFiltersClientImpl.class);
}
diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/AssociateTrafficFiltersClientImpl.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/AssociateTrafficFiltersClientImpl.java
index 5f31a078f150..40ff575de390 100644
--- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/AssociateTrafficFiltersClientImpl.java
+++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/AssociateTrafficFiltersClientImpl.java
@@ -20,8 +20,10 @@
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.BinaryData;
import com.azure.core.util.Context;
import com.azure.core.util.FluxUtil;
+import com.azure.core.util.logging.ClientLogger;
import com.azure.core.util.polling.PollerFlux;
import com.azure.core.util.polling.SyncPoller;
import com.azure.resourcemanager.elastic.fluent.AssociateTrafficFiltersClient;
@@ -69,6 +71,15 @@ Mono>> associate(@HostParam("$host") String endpoint,
@QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
@PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName,
@QueryParam("rulesetId") String rulesetId, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Elastic/monitors/{monitorName}/associateTrafficFilter")
+ @ExpectedResponses({ 202 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response associateSync(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName,
+ @QueryParam("rulesetId") String rulesetId, @HeaderParam("Accept") String accept, Context context);
}
/**
@@ -107,6 +118,42 @@ private Mono>> associateWithResponseAsync(String resou
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
+ /**
+ * Associate traffic filter for the given deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Monitor resource name.
+ * @param rulesetId Ruleset Id of the filter.
+ * @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 response body along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Response associateWithResponse(String resourceGroupName, String monitorName, String rulesetId) {
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (monitorName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return service.associateSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, monitorName, rulesetId, accept, Context.NONE);
+ }
+
/**
* Associate traffic filter for the given deployment.
*
@@ -117,29 +164,31 @@ private Mono>> associateWithResponseAsync(String resou
* @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 the response body along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> associateWithResponseAsync(String resourceGroupName, String monitorName,
- String rulesetId, Context context) {
+ private Response associateWithResponse(String resourceGroupName, String monitorName, String rulesetId,
+ Context context) {
if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() 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."));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
}
if (monitorName == null) {
- return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null."));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null."));
}
final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.associate(this.client.getEndpoint(), this.client.getApiVersion(),
+ return service.associateSync(this.client.getEndpoint(), this.client.getApiVersion(),
this.client.getSubscriptionId(), resourceGroupName, monitorName, rulesetId, accept, context);
}
@@ -186,20 +235,16 @@ private PollerFlux, Void> beginAssociateAsync(String resourceGr
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Monitor resource name.
* @param rulesetId Ruleset Id of the filter.
- * @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 SyncPoller} for polling of long-running operation.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, Void> beginAssociateAsync(String resourceGroupName, String monitorName,
- String rulesetId, Context context) {
- context = this.client.mergeContext(context);
- Mono>> mono
- = associateWithResponseAsync(resourceGroupName, monitorName, rulesetId, context);
- return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
- context);
+ public SyncPoller, Void> beginAssociate(String resourceGroupName, String monitorName,
+ String rulesetId) {
+ Response response = associateWithResponse(resourceGroupName, monitorName, rulesetId);
+ return this.client.getLroResult(response, Void.class, Void.class, Context.NONE);
}
/**
@@ -215,7 +260,8 @@ private PollerFlux, Void> beginAssociateAsync(String resourceGr
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginAssociate(String resourceGroupName, String monitorName) {
final String rulesetId = null;
- return this.beginAssociateAsync(resourceGroupName, monitorName, rulesetId).getSyncPoller();
+ Response response = associateWithResponse(resourceGroupName, monitorName, rulesetId);
+ return this.client.getLroResult(response, Void.class, Void.class, Context.NONE);
}
/**
@@ -233,7 +279,8 @@ public SyncPoller, Void> beginAssociate(String resourceGroupNam
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginAssociate(String resourceGroupName, String monitorName,
String rulesetId, Context context) {
- return this.beginAssociateAsync(resourceGroupName, monitorName, rulesetId, context).getSyncPoller();
+ Response response = associateWithResponse(resourceGroupName, monitorName, rulesetId, context);
+ return this.client.getLroResult(response, Void.class, Void.class, context);
}
/**
@@ -270,24 +317,6 @@ private Mono associateAsync(String resourceGroupName, String monitorName)
.flatMap(this.client::getLroFinalResultOrError);
}
- /**
- * Associate traffic filter for the given deployment.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param monitorName Monitor resource name.
- * @param rulesetId Ruleset Id of the filter.
- * @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 associateAsync(String resourceGroupName, String monitorName, String rulesetId, Context context) {
- return beginAssociateAsync(resourceGroupName, monitorName, rulesetId, context).last()
- .flatMap(this.client::getLroFinalResultOrError);
- }
-
/**
* Associate traffic filter for the given deployment.
*
@@ -300,7 +329,7 @@ private Mono associateAsync(String resourceGroupName, String monitorName,
@ServiceMethod(returns = ReturnType.SINGLE)
public void associate(String resourceGroupName, String monitorName) {
final String rulesetId = null;
- associateAsync(resourceGroupName, monitorName, rulesetId).block();
+ beginAssociate(resourceGroupName, monitorName, rulesetId).getFinalResult();
}
/**
@@ -316,6 +345,8 @@ public void associate(String resourceGroupName, String monitorName) {
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public void associate(String resourceGroupName, String monitorName, String rulesetId, Context context) {
- associateAsync(resourceGroupName, monitorName, rulesetId, context).block();
+ beginAssociate(resourceGroupName, monitorName, rulesetId, context).getFinalResult();
}
+
+ private static final ClientLogger LOGGER = new ClientLogger(AssociateTrafficFiltersClientImpl.class);
}
diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/BillingInfoesClientImpl.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/BillingInfoesClientImpl.java
index d8ac7d4696a5..edcb9a98b22a 100644
--- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/BillingInfoesClientImpl.java
+++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/BillingInfoesClientImpl.java
@@ -21,6 +21,7 @@
import com.azure.core.management.exception.ManagementException;
import com.azure.core.util.Context;
import com.azure.core.util.FluxUtil;
+import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.elastic.fluent.BillingInfoesClient;
import com.azure.resourcemanager.elastic.fluent.models.BillingInfoResponseInner;
import reactor.core.publisher.Mono;
@@ -65,6 +66,15 @@ Mono> get(@HostParam("$host") String endpoint
@QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
@PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName,
@HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Elastic/monitors/{monitorName}/getBillingInfo")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response getSync(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName,
+ @HeaderParam("Accept") String accept, Context context);
}
/**
@@ -103,42 +113,6 @@ private Mono> getWithResponseAsync(String res
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
- /**
- * Get marketplace and organization info mapped to the given monitor.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param monitorName Monitor resource name.
- * @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 marketplace and organization info mapped to the given monitor along with {@link Response} on successful
- * completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> getWithResponseAsync(String resourceGroupName, String monitorName,
- Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() 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 (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (monitorName == null) {
- return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
- resourceGroupName, monitorName, accept, context);
- }
-
/**
* Get marketplace and organization info mapped to the given monitor.
*
@@ -168,7 +142,27 @@ private Mono getAsync(String resourceGroupName, String
@ServiceMethod(returns = ReturnType.SINGLE)
public Response getWithResponse(String resourceGroupName, String monitorName,
Context context) {
- return getWithResponseAsync(resourceGroupName, monitorName, context).block();
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (monitorName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, monitorName, accept, context);
}
/**
@@ -185,4 +179,6 @@ public Response getWithResponse(String resourceGroupNa
public BillingInfoResponseInner get(String resourceGroupName, String monitorName) {
return getWithResponse(resourceGroupName, monitorName, Context.NONE).getValue();
}
+
+ private static final ClientLogger LOGGER = new ClientLogger(BillingInfoesClientImpl.class);
}
diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/ConnectedPartnerResourcesClientImpl.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/ConnectedPartnerResourcesClientImpl.java
index cd1658ec4a97..304c688513a5 100644
--- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/ConnectedPartnerResourcesClientImpl.java
+++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/ConnectedPartnerResourcesClientImpl.java
@@ -26,6 +26,7 @@
import com.azure.core.management.exception.ManagementException;
import com.azure.core.util.Context;
import com.azure.core.util.FluxUtil;
+import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.elastic.fluent.ConnectedPartnerResourcesClient;
import com.azure.resourcemanager.elastic.fluent.models.ConnectedPartnerResourcesListFormatInner;
import com.azure.resourcemanager.elastic.models.ConnectedPartnerResourcesListResponse;
@@ -72,6 +73,15 @@ Mono> list(@HostParam("$host") S
@PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName,
@HeaderParam("Accept") String accept, Context context);
+ @Headers({ "Content-Type: application/json" })
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Elastic/monitors/{monitorName}/listConnectedPartnerResources")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listSync(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName,
+ @HeaderParam("Accept") String accept, Context context);
+
@Headers({ "Content-Type: application/json" })
@Get("{nextLink}")
@ExpectedResponses({ 200 })
@@ -79,6 +89,14 @@ Mono> list(@HostParam("$host") S
Mono> listNext(
@PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint,
@HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listNextSync(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
}
/**
@@ -125,38 +143,16 @@ private Mono> listSingle
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Monitor resource name.
- * @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 list of all active elastic deployments along with {@link PagedResponse} on successful completion of
- * {@link Mono}.
+ * @return list of all active elastic deployments as paginated response with {@link PagedFlux}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listSinglePageAsync(String resourceGroupName,
- String monitorName, Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() 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 (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (monitorName == null) {
- return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service
- .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
- resourceGroupName, monitorName, accept, context)
- .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
- res.getValue().value(), res.getValue().nextLink(), null));
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String resourceGroupName,
+ String monitorName) {
+ return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, monitorName),
+ nextLink -> listNextSinglePageAsync(nextLink));
}
/**
@@ -167,13 +163,35 @@ private Mono> listSingle
* @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 list of all active elastic deployments as paginated response with {@link PagedFlux}.
+ * @return list of all active elastic deployments along with {@link PagedResponse}.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listAsync(String resourceGroupName,
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listSinglePage(String resourceGroupName,
String monitorName) {
- return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, monitorName),
- nextLink -> listNextSinglePageAsync(nextLink));
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (monitorName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ Response res
+ = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, monitorName, accept, Context.NONE);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
}
/**
@@ -185,13 +203,35 @@ private PagedFlux listAsync(String res
* @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 list of all active elastic deployments as paginated response with {@link PagedFlux}.
+ * @return list of all active elastic deployments along with {@link PagedResponse}.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listAsync(String resourceGroupName, String monitorName,
- Context context) {
- return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, monitorName, context),
- nextLink -> listNextSinglePageAsync(nextLink, context));
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listSinglePage(String resourceGroupName,
+ String monitorName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (monitorName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ Response res
+ = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, monitorName, accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
}
/**
@@ -206,7 +246,8 @@ private PagedFlux listAsync(String res
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list(String resourceGroupName, String monitorName) {
- return new PagedIterable<>(listAsync(resourceGroupName, monitorName));
+ return new PagedIterable<>(() -> listSinglePage(resourceGroupName, monitorName),
+ nextLink -> listNextSinglePage(nextLink));
}
/**
@@ -223,7 +264,8 @@ public PagedIterable list(String resou
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list(String resourceGroupName, String monitorName,
Context context) {
- return new PagedIterable<>(listAsync(resourceGroupName, monitorName, context));
+ return new PagedIterable<>(() -> listSinglePage(resourceGroupName, monitorName, context),
+ nextLink -> listNextSinglePage(nextLink, context));
}
/**
@@ -253,6 +295,33 @@ private Mono> listNextSi
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @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 list of all active elastic deployments along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listNextSinglePage(String nextLink) {
+ if (nextLink == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ Response res
+ = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
/**
* Get the next page of items.
*
@@ -261,23 +330,26 @@ private Mono> listNextSi
* @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 list of all active elastic deployments along with {@link PagedResponse} on successful completion of
- * {@link Mono}.
+ * @return list of all active elastic deployments along with {@link PagedResponse}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listNextSinglePageAsync(String nextLink,
+ private PagedResponse listNextSinglePage(String nextLink,
Context context) {
if (nextLink == null) {
- return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
}
if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
}
final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.listNext(nextLink, this.client.getEndpoint(), accept, context)
- .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
- res.getValue().value(), res.getValue().nextLink(), null));
+ Response res
+ = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
}
+
+ private static final ClientLogger LOGGER = new ClientLogger(ConnectedPartnerResourcesClientImpl.class);
}
diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/CreateAndAssociateIpFiltersClientImpl.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/CreateAndAssociateIpFiltersClientImpl.java
index ae42d3a0a325..ca49bdb59485 100644
--- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/CreateAndAssociateIpFiltersClientImpl.java
+++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/CreateAndAssociateIpFiltersClientImpl.java
@@ -20,8 +20,10 @@
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.BinaryData;
import com.azure.core.util.Context;
import com.azure.core.util.FluxUtil;
+import com.azure.core.util.logging.ClientLogger;
import com.azure.core.util.polling.PollerFlux;
import com.azure.core.util.polling.SyncPoller;
import com.azure.resourcemanager.elastic.fluent.CreateAndAssociateIpFiltersClient;
@@ -70,6 +72,16 @@ Mono>> create(@HostParam("$host") String endpoint,
@PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName,
@QueryParam("ips") String ips, @QueryParam("name") String name, @HeaderParam("Accept") String accept,
Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Elastic/monitors/{monitorName}/createAndAssociateIPFilter")
+ @ExpectedResponses({ 200, 202 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response createSync(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName,
+ @QueryParam("ips") String ips, @QueryParam("name") String name, @HeaderParam("Accept") String accept,
+ Context context);
}
/**
@@ -109,6 +121,44 @@ private Mono>> createWithResponseAsync(String resource
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
+ /**
+ * Create and Associate IP traffic filter for the given deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Monitor resource name.
+ * @param ips List of ips.
+ * @param name Name of the traffic filter.
+ * @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 response body along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Response createWithResponse(String resourceGroupName, String monitorName, String ips,
+ String name) {
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (monitorName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, monitorName, ips, name, accept, Context.NONE);
+ }
+
/**
* Create and Associate IP traffic filter for the given deployment.
*
@@ -120,30 +170,32 @@ private Mono>> createWithResponseAsync(String resource
* @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 the response body along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> createWithResponseAsync(String resourceGroupName, String monitorName,
- String ips, String name, Context context) {
+ private Response createWithResponse(String resourceGroupName, String monitorName, String ips,
+ String name, Context context) {
if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() 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."));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
}
if (monitorName == null) {
- return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null."));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null."));
}
final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
- resourceGroupName, monitorName, ips, name, accept, context);
+ return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, monitorName, ips, name, accept, context);
}
/**
@@ -192,20 +244,16 @@ private PollerFlux, Void> beginCreateAsync(String resourceGroup
* @param monitorName Monitor resource name.
* @param ips List of ips.
* @param name Name of the traffic filter.
- * @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 SyncPoller} for polling of long-running operation.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, Void> beginCreateAsync(String resourceGroupName, String monitorName,
- String ips, String name, Context context) {
- context = this.client.mergeContext(context);
- Mono>> mono
- = createWithResponseAsync(resourceGroupName, monitorName, ips, name, context);
- return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
- context);
+ public SyncPoller, Void> beginCreate(String resourceGroupName, String monitorName, String ips,
+ String name) {
+ Response response = createWithResponse(resourceGroupName, monitorName, ips, name);
+ return this.client.getLroResult(response, Void.class, Void.class, Context.NONE);
}
/**
@@ -222,7 +270,8 @@ private PollerFlux, Void> beginCreateAsync(String resourceGroup
public SyncPoller, Void> beginCreate(String resourceGroupName, String monitorName) {
final String ips = null;
final String name = null;
- return this.beginCreateAsync(resourceGroupName, monitorName, ips, name).getSyncPoller();
+ Response response = createWithResponse(resourceGroupName, monitorName, ips, name);
+ return this.client.getLroResult(response, Void.class, Void.class, Context.NONE);
}
/**
@@ -241,7 +290,8 @@ public SyncPoller, Void> beginCreate(String resourceGroupName,
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginCreate(String resourceGroupName, String monitorName, String ips,
String name, Context context) {
- return this.beginCreateAsync(resourceGroupName, monitorName, ips, name, context).getSyncPoller();
+ Response response = createWithResponse(resourceGroupName, monitorName, ips, name, context);
+ return this.client.getLroResult(response, Void.class, Void.class, context);
}
/**
@@ -280,26 +330,6 @@ private Mono createAsync(String resourceGroupName, String monitorName) {
.flatMap(this.client::getLroFinalResultOrError);
}
- /**
- * Create and Associate IP traffic filter for the given deployment.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param monitorName Monitor resource name.
- * @param ips List of ips.
- * @param name Name of the traffic filter.
- * @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 createAsync(String resourceGroupName, String monitorName, String ips, String name,
- Context context) {
- return beginCreateAsync(resourceGroupName, monitorName, ips, name, context).last()
- .flatMap(this.client::getLroFinalResultOrError);
- }
-
/**
* Create and Associate IP traffic filter for the given deployment.
*
@@ -313,7 +343,7 @@ private Mono createAsync(String resourceGroupName, String monitorName, Str
public void create(String resourceGroupName, String monitorName) {
final String ips = null;
final String name = null;
- createAsync(resourceGroupName, monitorName, ips, name).block();
+ beginCreate(resourceGroupName, monitorName, ips, name).getFinalResult();
}
/**
@@ -330,6 +360,8 @@ public void create(String resourceGroupName, String monitorName) {
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public void create(String resourceGroupName, String monitorName, String ips, String name, Context context) {
- createAsync(resourceGroupName, monitorName, ips, name, context).block();
+ beginCreate(resourceGroupName, monitorName, ips, name, context).getFinalResult();
}
+
+ private static final ClientLogger LOGGER = new ClientLogger(CreateAndAssociateIpFiltersClientImpl.class);
}
diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/CreateAndAssociatePLFiltersClientImpl.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/CreateAndAssociatePLFiltersClientImpl.java
index 550609d0f0ff..564cb9f30941 100644
--- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/CreateAndAssociatePLFiltersClientImpl.java
+++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/CreateAndAssociatePLFiltersClientImpl.java
@@ -20,8 +20,10 @@
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.BinaryData;
import com.azure.core.util.Context;
import com.azure.core.util.FluxUtil;
+import com.azure.core.util.logging.ClientLogger;
import com.azure.core.util.polling.PollerFlux;
import com.azure.core.util.polling.SyncPoller;
import com.azure.resourcemanager.elastic.fluent.CreateAndAssociatePLFiltersClient;
@@ -71,6 +73,17 @@ Mono>> create(@HostParam("$host") String endpoint,
@QueryParam("name") String name, @QueryParam("privateEndpointGuid") String privateEndpointGuid,
@QueryParam("privateEndpointName") String privateEndpointName, @HeaderParam("Accept") String accept,
Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Elastic/monitors/{monitorName}/createAndAssociatePLFilter")
+ @ExpectedResponses({ 200, 202 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response createSync(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName,
+ @QueryParam("name") String name, @QueryParam("privateEndpointGuid") String privateEndpointGuid,
+ @QueryParam("privateEndpointName") String privateEndpointName, @HeaderParam("Accept") String accept,
+ Context context);
}
/**
@@ -112,6 +125,46 @@ private Mono>> createWithResponseAsync(String resource
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
+ /**
+ * Create and Associate private link traffic filter for the given deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Monitor resource name.
+ * @param name Name of the traffic filter.
+ * @param privateEndpointGuid Guid of the private endpoint.
+ * @param privateEndpointName Name of the private endpoint.
+ * @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 response body along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Response createWithResponse(String resourceGroupName, String monitorName, String name,
+ String privateEndpointGuid, String privateEndpointName) {
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (monitorName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, monitorName, name, privateEndpointGuid,
+ privateEndpointName, accept, Context.NONE);
+ }
+
/**
* Create and Associate private link traffic filter for the given deployment.
*
@@ -124,30 +177,33 @@ private Mono>> createWithResponseAsync(String resource
* @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 the response body along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> createWithResponseAsync(String resourceGroupName, String monitorName,
- String name, String privateEndpointGuid, String privateEndpointName, Context context) {
+ private Response createWithResponse(String resourceGroupName, String monitorName, String name,
+ String privateEndpointGuid, String privateEndpointName, Context context) {
if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() 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."));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
}
if (monitorName == null) {
- return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null."));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null."));
}
final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
- resourceGroupName, monitorName, name, privateEndpointGuid, privateEndpointName, accept, context);
+ return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, monitorName, name, privateEndpointGuid,
+ privateEndpointName, accept, context);
}
/**
@@ -201,20 +257,17 @@ private PollerFlux, Void> beginCreateAsync(String resourceGroup
* @param name Name of the traffic filter.
* @param privateEndpointGuid Guid of the private endpoint.
* @param privateEndpointName Name of the private endpoint.
- * @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 SyncPoller} for polling of long-running operation.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, Void> beginCreateAsync(String resourceGroupName, String monitorName,
- String name, String privateEndpointGuid, String privateEndpointName, Context context) {
- context = this.client.mergeContext(context);
- Mono>> mono = createWithResponseAsync(resourceGroupName, monitorName, name,
- privateEndpointGuid, privateEndpointName, context);
- return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
- context);
+ public SyncPoller, Void> beginCreate(String resourceGroupName, String monitorName, String name,
+ String privateEndpointGuid, String privateEndpointName) {
+ Response response
+ = createWithResponse(resourceGroupName, monitorName, name, privateEndpointGuid, privateEndpointName);
+ return this.client.getLroResult(response, Void.class, Void.class, Context.NONE);
}
/**
@@ -232,8 +285,9 @@ public SyncPoller, Void> beginCreate(String resourceGroupName,
final String name = null;
final String privateEndpointGuid = null;
final String privateEndpointName = null;
- return this.beginCreateAsync(resourceGroupName, monitorName, name, privateEndpointGuid, privateEndpointName)
- .getSyncPoller();
+ Response response
+ = createWithResponse(resourceGroupName, monitorName, name, privateEndpointGuid, privateEndpointName);
+ return this.client.getLroResult(response, Void.class, Void.class, Context.NONE);
}
/**
@@ -253,9 +307,9 @@ public SyncPoller, Void> beginCreate(String resourceGroupName,
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginCreate(String resourceGroupName, String monitorName, String name,
String privateEndpointGuid, String privateEndpointName, Context context) {
- return this
- .beginCreateAsync(resourceGroupName, monitorName, name, privateEndpointGuid, privateEndpointName, context)
- .getSyncPoller();
+ Response response = createWithResponse(resourceGroupName, monitorName, name, privateEndpointGuid,
+ privateEndpointName, context);
+ return this.client.getLroResult(response, Void.class, Void.class, context);
}
/**
@@ -297,28 +351,6 @@ private Mono createAsync(String resourceGroupName, String monitorName) {
.flatMap(this.client::getLroFinalResultOrError);
}
- /**
- * Create and Associate private link traffic filter for the given deployment.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param monitorName Monitor resource name.
- * @param name Name of the traffic filter.
- * @param privateEndpointGuid Guid of the private endpoint.
- * @param privateEndpointName Name of the private endpoint.
- * @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 createAsync(String resourceGroupName, String monitorName, String name,
- String privateEndpointGuid, String privateEndpointName, Context context) {
- return beginCreateAsync(resourceGroupName, monitorName, name, privateEndpointGuid, privateEndpointName, context)
- .last()
- .flatMap(this.client::getLroFinalResultOrError);
- }
-
/**
* Create and Associate private link traffic filter for the given deployment.
*
@@ -333,7 +365,7 @@ public void create(String resourceGroupName, String monitorName) {
final String name = null;
final String privateEndpointGuid = null;
final String privateEndpointName = null;
- createAsync(resourceGroupName, monitorName, name, privateEndpointGuid, privateEndpointName).block();
+ beginCreate(resourceGroupName, monitorName, name, privateEndpointGuid, privateEndpointName).getFinalResult();
}
/**
@@ -352,6 +384,9 @@ public void create(String resourceGroupName, String monitorName) {
@ServiceMethod(returns = ReturnType.SINGLE)
public void create(String resourceGroupName, String monitorName, String name, String privateEndpointGuid,
String privateEndpointName, Context context) {
- createAsync(resourceGroupName, monitorName, name, privateEndpointGuid, privateEndpointName, context).block();
+ beginCreate(resourceGroupName, monitorName, name, privateEndpointGuid, privateEndpointName, context)
+ .getFinalResult();
}
+
+ private static final ClientLogger LOGGER = new ClientLogger(CreateAndAssociatePLFiltersClientImpl.class);
}
diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/DeploymentInfoResponseImpl.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/DeploymentInfoResponseImpl.java
index 281b1cec7ebf..dc57bda481f3 100644
--- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/DeploymentInfoResponseImpl.java
+++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/DeploymentInfoResponseImpl.java
@@ -48,6 +48,14 @@ public MarketplaceSaaSInfo marketplaceSaasInfo() {
return this.innerModel().marketplaceSaasInfo();
}
+ public String projectType() {
+ return this.innerModel().projectType();
+ }
+
+ public String configurationType() {
+ return this.innerModel().configurationType();
+ }
+
public DeploymentInfoResponseInner innerModel() {
return this.innerObject;
}
diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/DeploymentInfoesClientImpl.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/DeploymentInfoesClientImpl.java
index 5d0c5c35034b..5597ce7e6b04 100644
--- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/DeploymentInfoesClientImpl.java
+++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/DeploymentInfoesClientImpl.java
@@ -21,6 +21,7 @@
import com.azure.core.management.exception.ManagementException;
import com.azure.core.util.Context;
import com.azure.core.util.FluxUtil;
+import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.elastic.fluent.DeploymentInfoesClient;
import com.azure.resourcemanager.elastic.fluent.models.DeploymentInfoResponseInner;
import reactor.core.publisher.Mono;
@@ -65,6 +66,15 @@ Mono> list(@HostParam("$host") String endp
@QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
@PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName,
@HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Elastic/monitors/{monitorName}/listDeploymentInfo")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listSync(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName,
+ @HeaderParam("Accept") String accept, Context context);
}
/**
@@ -103,42 +113,6 @@ private Mono> listWithResponseAsync(String
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
- /**
- * Fetch information regarding Elastic cloud deployment corresponding to the Elastic monitor resource.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param monitorName Monitor resource name.
- * @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 properties of deployment in Elastic cloud corresponding to the Elastic monitor resource along with
- * {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listWithResponseAsync(String resourceGroupName,
- String monitorName, Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() 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 (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (monitorName == null) {
- return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
- resourceGroupName, monitorName, accept, context);
- }
-
/**
* Fetch information regarding Elastic cloud deployment corresponding to the Elastic monitor resource.
*
@@ -170,7 +144,27 @@ private Mono listAsync(String resourceGroupName, St
@ServiceMethod(returns = ReturnType.SINGLE)
public Response listWithResponse(String resourceGroupName, String monitorName,
Context context) {
- return listWithResponseAsync(resourceGroupName, monitorName, context).block();
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (monitorName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, monitorName, accept, context);
}
/**
@@ -187,4 +181,6 @@ public Response listWithResponse(String resourceGro
public DeploymentInfoResponseInner list(String resourceGroupName, String monitorName) {
return listWithResponse(resourceGroupName, monitorName, Context.NONE).getValue();
}
+
+ private static final ClientLogger LOGGER = new ClientLogger(DeploymentInfoesClientImpl.class);
}
diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/DetachAndDeleteTrafficFiltersClientImpl.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/DetachAndDeleteTrafficFiltersClientImpl.java
index c33df54af0af..dbb1b028cf07 100644
--- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/DetachAndDeleteTrafficFiltersClientImpl.java
+++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/DetachAndDeleteTrafficFiltersClientImpl.java
@@ -21,6 +21,7 @@
import com.azure.core.management.exception.ManagementException;
import com.azure.core.util.Context;
import com.azure.core.util.FluxUtil;
+import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.elastic.fluent.DetachAndDeleteTrafficFiltersClient;
import reactor.core.publisher.Mono;
@@ -64,6 +65,15 @@ Mono> delete(@HostParam("$host") String endpoint, @QueryParam("ap
@PathParam("subscriptionId") String subscriptionId,
@PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName,
@QueryParam("rulesetId") String rulesetId, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Elastic/monitors/{monitorName}/detachAndDeleteTrafficFilter")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response deleteSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName,
+ @QueryParam("rulesetId") String rulesetId, @HeaderParam("Accept") String accept, Context context);
}
/**
@@ -102,42 +112,6 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
- /**
- * Detach and Delete traffic filter from the given deployment.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param monitorName Monitor resource name.
- * @param rulesetId Ruleset Id of the filter.
- * @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}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> deleteWithResponseAsync(String resourceGroupName, String monitorName, String rulesetId,
- Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() 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 (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (monitorName == null) {
- return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
- resourceGroupName, monitorName, rulesetId, accept, context);
- }
-
/**
* Detach and Delete traffic filter from the given deployment.
*
@@ -169,7 +143,27 @@ private Mono deleteAsync(String resourceGroupName, String monitorName) {
@ServiceMethod(returns = ReturnType.SINGLE)
public Response deleteWithResponse(String resourceGroupName, String monitorName, String rulesetId,
Context context) {
- return deleteWithResponseAsync(resourceGroupName, monitorName, rulesetId, context).block();
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (monitorName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, monitorName, rulesetId, accept, context);
}
/**
@@ -186,4 +180,6 @@ public void delete(String resourceGroupName, String monitorName) {
final String rulesetId = null;
deleteWithResponse(resourceGroupName, monitorName, rulesetId, Context.NONE);
}
+
+ private static final ClientLogger LOGGER = new ClientLogger(DetachAndDeleteTrafficFiltersClientImpl.class);
}
diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/DetachTrafficFiltersClientImpl.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/DetachTrafficFiltersClientImpl.java
index c0f51295a402..441929ebd1a9 100644
--- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/DetachTrafficFiltersClientImpl.java
+++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/DetachTrafficFiltersClientImpl.java
@@ -20,8 +20,10 @@
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.BinaryData;
import com.azure.core.util.Context;
import com.azure.core.util.FluxUtil;
+import com.azure.core.util.logging.ClientLogger;
import com.azure.core.util.polling.PollerFlux;
import com.azure.core.util.polling.SyncPoller;
import com.azure.resourcemanager.elastic.fluent.DetachTrafficFiltersClient;
@@ -69,6 +71,15 @@ Mono>> update(@HostParam("$host") String endpoint,
@QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
@PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName,
@QueryParam("rulesetId") String rulesetId, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Elastic/monitors/{monitorName}/detachTrafficFilter")
+ @ExpectedResponses({ 202 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response updateSync(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName,
+ @QueryParam("rulesetId") String rulesetId, @HeaderParam("Accept") String accept, Context context);
}
/**
@@ -107,6 +118,42 @@ private Mono>> updateWithResponseAsync(String resource
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
+ /**
+ * Detach traffic filter for the given deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Monitor resource name.
+ * @param rulesetId Ruleset Id of the filter.
+ * @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 response body along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Response updateWithResponse(String resourceGroupName, String monitorName, String rulesetId) {
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (monitorName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, monitorName, rulesetId, accept, Context.NONE);
+ }
+
/**
* Detach traffic filter for the given deployment.
*
@@ -117,30 +164,32 @@ private Mono>> updateWithResponseAsync(String resource
* @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 the response body along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> updateWithResponseAsync(String resourceGroupName, String monitorName,
- String rulesetId, Context context) {
+ private Response updateWithResponse(String resourceGroupName, String monitorName, String rulesetId,
+ Context context) {
if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() 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."));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
}
if (monitorName == null) {
- return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null."));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null."));
}
final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
- resourceGroupName, monitorName, rulesetId, accept, context);
+ return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, monitorName, rulesetId, accept, context);
}
/**
@@ -186,20 +235,16 @@ private PollerFlux, Void> beginUpdateAsync(String resourceGroup
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Monitor resource name.
* @param rulesetId Ruleset Id of the filter.
- * @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 SyncPoller} for polling of long-running operation.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, Void> beginUpdateAsync(String resourceGroupName, String monitorName,
- String rulesetId, Context context) {
- context = this.client.mergeContext(context);
- Mono>> mono
- = updateWithResponseAsync(resourceGroupName, monitorName, rulesetId, context);
- return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
- context);
+ public SyncPoller, Void> beginUpdate(String resourceGroupName, String monitorName,
+ String rulesetId) {
+ Response response = updateWithResponse(resourceGroupName, monitorName, rulesetId);
+ return this.client.getLroResult(response, Void.class, Void.class, Context.NONE);
}
/**
@@ -215,7 +260,8 @@ private PollerFlux, Void> beginUpdateAsync(String resourceGroup
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginUpdate(String resourceGroupName, String monitorName) {
final String rulesetId = null;
- return this.beginUpdateAsync(resourceGroupName, monitorName, rulesetId).getSyncPoller();
+ Response response = updateWithResponse(resourceGroupName, monitorName, rulesetId);
+ return this.client.getLroResult(response, Void.class, Void.class, Context.NONE);
}
/**
@@ -233,7 +279,8 @@ public SyncPoller, Void> beginUpdate(String resourceGroupName,
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginUpdate(String resourceGroupName, String monitorName,
String rulesetId, Context context) {
- return this.beginUpdateAsync(resourceGroupName, monitorName, rulesetId, context).getSyncPoller();
+ Response response = updateWithResponse(resourceGroupName, monitorName, rulesetId, context);
+ return this.client.getLroResult(response, Void.class, Void.class, context);
}
/**
@@ -270,24 +317,6 @@ private Mono updateAsync(String resourceGroupName, String monitorName) {
.flatMap(this.client::getLroFinalResultOrError);
}
- /**
- * Detach traffic filter for the given deployment.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param monitorName Monitor resource name.
- * @param rulesetId Ruleset Id of the filter.
- * @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 updateAsync(String resourceGroupName, String monitorName, String rulesetId, Context context) {
- return beginUpdateAsync(resourceGroupName, monitorName, rulesetId, context).last()
- .flatMap(this.client::getLroFinalResultOrError);
- }
-
/**
* Detach traffic filter for the given deployment.
*
@@ -300,7 +329,7 @@ private Mono updateAsync(String resourceGroupName, String monitorName, Str
@ServiceMethod(returns = ReturnType.SINGLE)
public void update(String resourceGroupName, String monitorName) {
final String rulesetId = null;
- updateAsync(resourceGroupName, monitorName, rulesetId).block();
+ beginUpdate(resourceGroupName, monitorName, rulesetId).getFinalResult();
}
/**
@@ -316,6 +345,8 @@ public void update(String resourceGroupName, String monitorName) {
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public void update(String resourceGroupName, String monitorName, String rulesetId, Context context) {
- updateAsync(resourceGroupName, monitorName, rulesetId, context).block();
+ beginUpdate(resourceGroupName, monitorName, rulesetId, context).getFinalResult();
}
+
+ private static final ClientLogger LOGGER = new ClientLogger(DetachTrafficFiltersClientImpl.class);
}
diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/ElasticManagementClientImpl.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/ElasticManagementClientImpl.java
index edff50f7099b..2e22aba9e2f6 100644
--- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/ElasticManagementClientImpl.java
+++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/ElasticManagementClientImpl.java
@@ -15,12 +15,15 @@
import com.azure.core.management.exception.ManagementException;
import com.azure.core.management.polling.PollResult;
import com.azure.core.management.polling.PollerFactory;
+import com.azure.core.management.polling.SyncPollerFactory;
+import com.azure.core.util.BinaryData;
import com.azure.core.util.Context;
import com.azure.core.util.CoreUtils;
import com.azure.core.util.logging.ClientLogger;
import com.azure.core.util.polling.AsyncPollResponse;
import com.azure.core.util.polling.LongRunningOperationStatus;
import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
import com.azure.core.util.serializer.SerializerAdapter;
import com.azure.core.util.serializer.SerializerEncoding;
import com.azure.resourcemanager.elastic.fluent.AllTrafficFiltersClient;
@@ -38,6 +41,7 @@
import com.azure.resourcemanager.elastic.fluent.ListAssociatedTrafficFiltersClient;
import com.azure.resourcemanager.elastic.fluent.MonitorOperationsClient;
import com.azure.resourcemanager.elastic.fluent.MonitoredResourcesClient;
+import com.azure.resourcemanager.elastic.fluent.MonitoredSubscriptionsClient;
import com.azure.resourcemanager.elastic.fluent.MonitorsClient;
import com.azure.resourcemanager.elastic.fluent.OpenAIsClient;
import com.azure.resourcemanager.elastic.fluent.OperationsClient;
@@ -160,6 +164,34 @@ public OperationsClient getOperations() {
return this.operations;
}
+ /**
+ * The ElasticVersionsClient object to access its operations.
+ */
+ private final ElasticVersionsClient elasticVersions;
+
+ /**
+ * Gets the ElasticVersionsClient object to access its operations.
+ *
+ * @return the ElasticVersionsClient object.
+ */
+ public ElasticVersionsClient getElasticVersions() {
+ return this.elasticVersions;
+ }
+
+ /**
+ * The OrganizationsClient object to access its operations.
+ */
+ private final OrganizationsClient organizations;
+
+ /**
+ * Gets the OrganizationsClient object to access its operations.
+ *
+ * @return the OrganizationsClient object.
+ */
+ public OrganizationsClient getOrganizations() {
+ return this.organizations;
+ }
+
/**
* The MonitorsClient object to access its operations.
*/
@@ -175,45 +207,45 @@ public MonitorsClient getMonitors() {
}
/**
- * The ElasticVersionsClient object to access its operations.
+ * The AssociateTrafficFiltersClient object to access its operations.
*/
- private final ElasticVersionsClient elasticVersions;
+ private final AssociateTrafficFiltersClient associateTrafficFilters;
/**
- * Gets the ElasticVersionsClient object to access its operations.
+ * Gets the AssociateTrafficFiltersClient object to access its operations.
*
- * @return the ElasticVersionsClient object.
+ * @return the AssociateTrafficFiltersClient object.
*/
- public ElasticVersionsClient getElasticVersions() {
- return this.elasticVersions;
+ public AssociateTrafficFiltersClient getAssociateTrafficFilters() {
+ return this.associateTrafficFilters;
}
/**
- * The MonitoredResourcesClient object to access its operations.
+ * The CreateAndAssociateIpFiltersClient object to access its operations.
*/
- private final MonitoredResourcesClient monitoredResources;
+ private final CreateAndAssociateIpFiltersClient createAndAssociateIpFilters;
/**
- * Gets the MonitoredResourcesClient object to access its operations.
+ * Gets the CreateAndAssociateIpFiltersClient object to access its operations.
*
- * @return the MonitoredResourcesClient object.
+ * @return the CreateAndAssociateIpFiltersClient object.
*/
- public MonitoredResourcesClient getMonitoredResources() {
- return this.monitoredResources;
+ public CreateAndAssociateIpFiltersClient getCreateAndAssociateIpFilters() {
+ return this.createAndAssociateIpFilters;
}
/**
- * The DeploymentInfoesClient object to access its operations.
+ * The CreateAndAssociatePLFiltersClient object to access its operations.
*/
- private final DeploymentInfoesClient deploymentInfoes;
+ private final CreateAndAssociatePLFiltersClient createAndAssociatePLFilters;
/**
- * Gets the DeploymentInfoesClient object to access its operations.
+ * Gets the CreateAndAssociatePLFiltersClient object to access its operations.
*
- * @return the DeploymentInfoesClient object.
+ * @return the CreateAndAssociatePLFiltersClient object.
*/
- public DeploymentInfoesClient getDeploymentInfoes() {
- return this.deploymentInfoes;
+ public CreateAndAssociatePLFiltersClient getCreateAndAssociatePLFilters() {
+ return this.createAndAssociatePLFilters;
}
/**
@@ -231,255 +263,241 @@ public ExternalUsersClient getExternalUsers() {
}
/**
- * The BillingInfoesClient object to access its operations.
- */
- private final BillingInfoesClient billingInfoes;
-
- /**
- * Gets the BillingInfoesClient object to access its operations.
- *
- * @return the BillingInfoesClient object.
- */
- public BillingInfoesClient getBillingInfoes() {
- return this.billingInfoes;
- }
-
- /**
- * The ConnectedPartnerResourcesClient object to access its operations.
+ * The TrafficFiltersClient object to access its operations.
*/
- private final ConnectedPartnerResourcesClient connectedPartnerResources;
+ private final TrafficFiltersClient trafficFilters;
/**
- * Gets the ConnectedPartnerResourcesClient object to access its operations.
+ * Gets the TrafficFiltersClient object to access its operations.
*
- * @return the ConnectedPartnerResourcesClient object.
+ * @return the TrafficFiltersClient object.
*/
- public ConnectedPartnerResourcesClient getConnectedPartnerResources() {
- return this.connectedPartnerResources;
+ public TrafficFiltersClient getTrafficFilters() {
+ return this.trafficFilters;
}
/**
- * The OpenAIsClient object to access its operations.
+ * The DetachAndDeleteTrafficFiltersClient object to access its operations.
*/
- private final OpenAIsClient openAIs;
+ private final DetachAndDeleteTrafficFiltersClient detachAndDeleteTrafficFilters;
/**
- * Gets the OpenAIsClient object to access its operations.
+ * Gets the DetachAndDeleteTrafficFiltersClient object to access its operations.
*
- * @return the OpenAIsClient object.
+ * @return the DetachAndDeleteTrafficFiltersClient object.
*/
- public OpenAIsClient getOpenAIs() {
- return this.openAIs;
+ public DetachAndDeleteTrafficFiltersClient getDetachAndDeleteTrafficFilters() {
+ return this.detachAndDeleteTrafficFilters;
}
/**
- * The TagRulesClient object to access its operations.
+ * The DetachTrafficFiltersClient object to access its operations.
*/
- private final TagRulesClient tagRules;
+ private final DetachTrafficFiltersClient detachTrafficFilters;
/**
- * Gets the TagRulesClient object to access its operations.
+ * Gets the DetachTrafficFiltersClient object to access its operations.
*
- * @return the TagRulesClient object.
+ * @return the DetachTrafficFiltersClient object.
*/
- public TagRulesClient getTagRules() {
- return this.tagRules;
+ public DetachTrafficFiltersClient getDetachTrafficFilters() {
+ return this.detachTrafficFilters;
}
/**
- * The VMHostsClient object to access its operations.
+ * The BillingInfoesClient object to access its operations.
*/
- private final VMHostsClient vMHosts;
+ private final BillingInfoesClient billingInfoes;
/**
- * Gets the VMHostsClient object to access its operations.
+ * Gets the BillingInfoesClient object to access its operations.
*
- * @return the VMHostsClient object.
+ * @return the BillingInfoesClient object.
*/
- public VMHostsClient getVMHosts() {
- return this.vMHosts;
+ public BillingInfoesClient getBillingInfoes() {
+ return this.billingInfoes;
}
/**
- * The VMIngestionsClient object to access its operations.
+ * The AllTrafficFiltersClient object to access its operations.
*/
- private final VMIngestionsClient vMIngestions;
+ private final AllTrafficFiltersClient allTrafficFilters;
/**
- * Gets the VMIngestionsClient object to access its operations.
+ * Gets the AllTrafficFiltersClient object to access its operations.
*
- * @return the VMIngestionsClient object.
+ * @return the AllTrafficFiltersClient object.
*/
- public VMIngestionsClient getVMIngestions() {
- return this.vMIngestions;
+ public AllTrafficFiltersClient getAllTrafficFilters() {
+ return this.allTrafficFilters;
}
/**
- * The VMCollectionsClient object to access its operations.
+ * The ListAssociatedTrafficFiltersClient object to access its operations.
*/
- private final VMCollectionsClient vMCollections;
+ private final ListAssociatedTrafficFiltersClient listAssociatedTrafficFilters;
/**
- * Gets the VMCollectionsClient object to access its operations.
+ * Gets the ListAssociatedTrafficFiltersClient object to access its operations.
*
- * @return the VMCollectionsClient object.
+ * @return the ListAssociatedTrafficFiltersClient object.
*/
- public VMCollectionsClient getVMCollections() {
- return this.vMCollections;
+ public ListAssociatedTrafficFiltersClient getListAssociatedTrafficFilters() {
+ return this.listAssociatedTrafficFilters;
}
/**
- * The UpgradableVersionsClient object to access its operations.
+ * The ConnectedPartnerResourcesClient object to access its operations.
*/
- private final UpgradableVersionsClient upgradableVersions;
+ private final ConnectedPartnerResourcesClient connectedPartnerResources;
/**
- * Gets the UpgradableVersionsClient object to access its operations.
+ * Gets the ConnectedPartnerResourcesClient object to access its operations.
*
- * @return the UpgradableVersionsClient object.
+ * @return the ConnectedPartnerResourcesClient object.
*/
- public UpgradableVersionsClient getUpgradableVersions() {
- return this.upgradableVersions;
+ public ConnectedPartnerResourcesClient getConnectedPartnerResources() {
+ return this.connectedPartnerResources;
}
/**
- * The MonitorOperationsClient object to access its operations.
+ * The DeploymentInfoesClient object to access its operations.
*/
- private final MonitorOperationsClient monitorOperations;
+ private final DeploymentInfoesClient deploymentInfoes;
/**
- * Gets the MonitorOperationsClient object to access its operations.
+ * Gets the DeploymentInfoesClient object to access its operations.
*
- * @return the MonitorOperationsClient object.
+ * @return the DeploymentInfoesClient object.
*/
- public MonitorOperationsClient getMonitorOperations() {
- return this.monitorOperations;
+ public DeploymentInfoesClient getDeploymentInfoes() {
+ return this.deploymentInfoes;
}
/**
- * The AllTrafficFiltersClient object to access its operations.
+ * The MonitoredResourcesClient object to access its operations.
*/
- private final AllTrafficFiltersClient allTrafficFilters;
+ private final MonitoredResourcesClient monitoredResources;
/**
- * Gets the AllTrafficFiltersClient object to access its operations.
+ * Gets the MonitoredResourcesClient object to access its operations.
*
- * @return the AllTrafficFiltersClient object.
+ * @return the MonitoredResourcesClient object.
*/
- public AllTrafficFiltersClient getAllTrafficFilters() {
- return this.allTrafficFilters;
+ public MonitoredResourcesClient getMonitoredResources() {
+ return this.monitoredResources;
}
/**
- * The ListAssociatedTrafficFiltersClient object to access its operations.
+ * The UpgradableVersionsClient object to access its operations.
*/
- private final ListAssociatedTrafficFiltersClient listAssociatedTrafficFilters;
+ private final UpgradableVersionsClient upgradableVersions;
/**
- * Gets the ListAssociatedTrafficFiltersClient object to access its operations.
+ * Gets the UpgradableVersionsClient object to access its operations.
*
- * @return the ListAssociatedTrafficFiltersClient object.
+ * @return the UpgradableVersionsClient object.
*/
- public ListAssociatedTrafficFiltersClient getListAssociatedTrafficFilters() {
- return this.listAssociatedTrafficFilters;
+ public UpgradableVersionsClient getUpgradableVersions() {
+ return this.upgradableVersions;
}
/**
- * The CreateAndAssociateIpFiltersClient object to access its operations.
+ * The VMHostsClient object to access its operations.
*/
- private final CreateAndAssociateIpFiltersClient createAndAssociateIpFilters;
+ private final VMHostsClient vMHosts;
/**
- * Gets the CreateAndAssociateIpFiltersClient object to access its operations.
+ * Gets the VMHostsClient object to access its operations.
*
- * @return the CreateAndAssociateIpFiltersClient object.
+ * @return the VMHostsClient object.
*/
- public CreateAndAssociateIpFiltersClient getCreateAndAssociateIpFilters() {
- return this.createAndAssociateIpFilters;
+ public VMHostsClient getVMHosts() {
+ return this.vMHosts;
}
/**
- * The CreateAndAssociatePLFiltersClient object to access its operations.
+ * The MonitoredSubscriptionsClient object to access its operations.
*/
- private final CreateAndAssociatePLFiltersClient createAndAssociatePLFilters;
+ private final MonitoredSubscriptionsClient monitoredSubscriptions;
/**
- * Gets the CreateAndAssociatePLFiltersClient object to access its operations.
+ * Gets the MonitoredSubscriptionsClient object to access its operations.
*
- * @return the CreateAndAssociatePLFiltersClient object.
+ * @return the MonitoredSubscriptionsClient object.
*/
- public CreateAndAssociatePLFiltersClient getCreateAndAssociatePLFilters() {
- return this.createAndAssociatePLFilters;
+ public MonitoredSubscriptionsClient getMonitoredSubscriptions() {
+ return this.monitoredSubscriptions;
}
/**
- * The AssociateTrafficFiltersClient object to access its operations.
+ * The OpenAIsClient object to access its operations.
*/
- private final AssociateTrafficFiltersClient associateTrafficFilters;
+ private final OpenAIsClient openAIs;
/**
- * Gets the AssociateTrafficFiltersClient object to access its operations.
+ * Gets the OpenAIsClient object to access its operations.
*
- * @return the AssociateTrafficFiltersClient object.
+ * @return the OpenAIsClient object.
*/
- public AssociateTrafficFiltersClient getAssociateTrafficFilters() {
- return this.associateTrafficFilters;
+ public OpenAIsClient getOpenAIs() {
+ return this.openAIs;
}
/**
- * The DetachAndDeleteTrafficFiltersClient object to access its operations.
+ * The TagRulesClient object to access its operations.
*/
- private final DetachAndDeleteTrafficFiltersClient detachAndDeleteTrafficFilters;
+ private final TagRulesClient tagRules;
/**
- * Gets the DetachAndDeleteTrafficFiltersClient object to access its operations.
+ * Gets the TagRulesClient object to access its operations.
*
- * @return the DetachAndDeleteTrafficFiltersClient object.
+ * @return the TagRulesClient object.
*/
- public DetachAndDeleteTrafficFiltersClient getDetachAndDeleteTrafficFilters() {
- return this.detachAndDeleteTrafficFilters;
+ public TagRulesClient getTagRules() {
+ return this.tagRules;
}
/**
- * The DetachTrafficFiltersClient object to access its operations.
+ * The MonitorOperationsClient object to access its operations.
*/
- private final DetachTrafficFiltersClient detachTrafficFilters;
+ private final MonitorOperationsClient monitorOperations;
/**
- * Gets the DetachTrafficFiltersClient object to access its operations.
+ * Gets the MonitorOperationsClient object to access its operations.
*
- * @return the DetachTrafficFiltersClient object.
+ * @return the MonitorOperationsClient object.
*/
- public DetachTrafficFiltersClient getDetachTrafficFilters() {
- return this.detachTrafficFilters;
+ public MonitorOperationsClient getMonitorOperations() {
+ return this.monitorOperations;
}
/**
- * The TrafficFiltersClient object to access its operations.
+ * The VMCollectionsClient object to access its operations.
*/
- private final TrafficFiltersClient trafficFilters;
+ private final VMCollectionsClient vMCollections;
/**
- * Gets the TrafficFiltersClient object to access its operations.
+ * Gets the VMCollectionsClient object to access its operations.
*
- * @return the TrafficFiltersClient object.
+ * @return the VMCollectionsClient object.
*/
- public TrafficFiltersClient getTrafficFilters() {
- return this.trafficFilters;
+ public VMCollectionsClient getVMCollections() {
+ return this.vMCollections;
}
/**
- * The OrganizationsClient object to access its operations.
+ * The VMIngestionsClient object to access its operations.
*/
- private final OrganizationsClient organizations;
+ private final VMIngestionsClient vMIngestions;
/**
- * Gets the OrganizationsClient object to access its operations.
+ * Gets the VMIngestionsClient object to access its operations.
*
- * @return the OrganizationsClient object.
+ * @return the VMIngestionsClient object.
*/
- public OrganizationsClient getOrganizations() {
- return this.organizations;
+ public VMIngestionsClient getVMIngestions() {
+ return this.vMIngestions;
}
/**
@@ -499,31 +517,32 @@ public OrganizationsClient getOrganizations() {
this.defaultPollInterval = defaultPollInterval;
this.subscriptionId = subscriptionId;
this.endpoint = endpoint;
- this.apiVersion = "2024-03-01";
+ this.apiVersion = "2025-01-15-preview";
this.operations = new OperationsClientImpl(this);
- this.monitors = new MonitorsClientImpl(this);
this.elasticVersions = new ElasticVersionsClientImpl(this);
- this.monitoredResources = new MonitoredResourcesClientImpl(this);
- this.deploymentInfoes = new DeploymentInfoesClientImpl(this);
+ this.organizations = new OrganizationsClientImpl(this);
+ this.monitors = new MonitorsClientImpl(this);
+ this.associateTrafficFilters = new AssociateTrafficFiltersClientImpl(this);
+ this.createAndAssociateIpFilters = new CreateAndAssociateIpFiltersClientImpl(this);
+ this.createAndAssociatePLFilters = new CreateAndAssociatePLFiltersClientImpl(this);
this.externalUsers = new ExternalUsersClientImpl(this);
+ this.trafficFilters = new TrafficFiltersClientImpl(this);
+ this.detachAndDeleteTrafficFilters = new DetachAndDeleteTrafficFiltersClientImpl(this);
+ this.detachTrafficFilters = new DetachTrafficFiltersClientImpl(this);
this.billingInfoes = new BillingInfoesClientImpl(this);
+ this.allTrafficFilters = new AllTrafficFiltersClientImpl(this);
+ this.listAssociatedTrafficFilters = new ListAssociatedTrafficFiltersClientImpl(this);
this.connectedPartnerResources = new ConnectedPartnerResourcesClientImpl(this);
+ this.deploymentInfoes = new DeploymentInfoesClientImpl(this);
+ this.monitoredResources = new MonitoredResourcesClientImpl(this);
+ this.upgradableVersions = new UpgradableVersionsClientImpl(this);
+ this.vMHosts = new VMHostsClientImpl(this);
+ this.monitoredSubscriptions = new MonitoredSubscriptionsClientImpl(this);
this.openAIs = new OpenAIsClientImpl(this);
this.tagRules = new TagRulesClientImpl(this);
- this.vMHosts = new VMHostsClientImpl(this);
- this.vMIngestions = new VMIngestionsClientImpl(this);
- this.vMCollections = new VMCollectionsClientImpl(this);
- this.upgradableVersions = new UpgradableVersionsClientImpl(this);
this.monitorOperations = new MonitorOperationsClientImpl(this);
- this.allTrafficFilters = new AllTrafficFiltersClientImpl(this);
- this.listAssociatedTrafficFilters = new ListAssociatedTrafficFiltersClientImpl(this);
- this.createAndAssociateIpFilters = new CreateAndAssociateIpFiltersClientImpl(this);
- this.createAndAssociatePLFilters = new CreateAndAssociatePLFiltersClientImpl(this);
- this.associateTrafficFilters = new AssociateTrafficFiltersClientImpl(this);
- this.detachAndDeleteTrafficFilters = new DetachAndDeleteTrafficFiltersClientImpl(this);
- this.detachTrafficFilters = new DetachTrafficFiltersClientImpl(this);
- this.trafficFilters = new TrafficFiltersClientImpl(this);
- this.organizations = new OrganizationsClientImpl(this);
+ this.vMCollections = new VMCollectionsClientImpl(this);
+ this.vMIngestions = new VMIngestionsClientImpl(this);
}
/**
@@ -563,6 +582,23 @@ public PollerFlux, U> getLroResult(Mono type of poll result.
+ * @param type of final result.
+ * @return SyncPoller for poll result and final result.
+ */
+ public SyncPoller, U> getLroResult(Response activationResponse,
+ Type pollResultType, Type finalResultType, Context context) {
+ return SyncPollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType,
+ defaultPollInterval, () -> activationResponse, context);
+ }
+
/**
* Gets the final result, or an error, based on last async poll response.
*
diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/ElasticMonitorResourceImpl.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/ElasticMonitorResourceImpl.java
index ebe8026022e0..e3d5a2ab4eb6 100644
--- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/ElasticMonitorResourceImpl.java
+++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/ElasticMonitorResourceImpl.java
@@ -47,14 +47,18 @@ public Map tags() {
}
}
- public ResourceSku sku() {
- return this.innerModel().sku();
- }
-
public MonitorProperties properties() {
return this.innerModel().properties();
}
+ public String kind() {
+ return this.innerModel().kind();
+ }
+
+ public ResourceSku sku() {
+ return this.innerModel().sku();
+ }
+
public IdentityProperties identity() {
return this.innerModel().identity();
}
@@ -122,16 +126,13 @@ public ElasticMonitorResourceImpl update() {
public ElasticMonitorResource apply() {
this.innerObject = serviceManager.serviceClient()
.getMonitors()
- .updateWithResponse(resourceGroupName, monitorName, updateBody, Context.NONE)
- .getValue();
+ .update(resourceGroupName, monitorName, updateBody, Context.NONE);
return this;
}
public ElasticMonitorResource apply(Context context) {
- this.innerObject = serviceManager.serviceClient()
- .getMonitors()
- .updateWithResponse(resourceGroupName, monitorName, updateBody, context)
- .getValue();
+ this.innerObject
+ = serviceManager.serviceClient().getMonitors().update(resourceGroupName, monitorName, updateBody, context);
return this;
}
@@ -179,13 +180,18 @@ public ElasticMonitorResourceImpl withTags(Map tags) {
}
}
- public ElasticMonitorResourceImpl withSku(ResourceSku sku) {
- this.innerModel().withSku(sku);
+ public ElasticMonitorResourceImpl withProperties(MonitorProperties properties) {
+ this.innerModel().withProperties(properties);
return this;
}
- public ElasticMonitorResourceImpl withProperties(MonitorProperties properties) {
- this.innerModel().withProperties(properties);
+ public ElasticMonitorResourceImpl withKind(String kind) {
+ this.innerModel().withKind(kind);
+ return this;
+ }
+
+ public ElasticMonitorResourceImpl withSku(ResourceSku sku) {
+ this.innerModel().withSku(sku);
return this;
}
diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/ElasticVersionsClientImpl.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/ElasticVersionsClientImpl.java
index 387804eee20a..3784fb47f225 100644
--- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/ElasticVersionsClientImpl.java
+++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/ElasticVersionsClientImpl.java
@@ -25,6 +25,7 @@
import com.azure.core.management.exception.ManagementException;
import com.azure.core.util.Context;
import com.azure.core.util.FluxUtil;
+import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.elastic.fluent.ElasticVersionsClient;
import com.azure.resourcemanager.elastic.fluent.models.ElasticVersionListFormatInner;
import com.azure.resourcemanager.elastic.models.ElasticVersionsListResponse;
@@ -70,6 +71,14 @@ Mono> list(@HostParam("$host") String endp
@QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
@QueryParam("region") String region, @HeaderParam("Accept") String accept, Context context);
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Elastic/elasticVersions")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listSync(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @QueryParam("region") String region, @HeaderParam("Accept") String accept, Context context);
+
@Headers({ "Content-Type: application/json" })
@Get("{nextLink}")
@ExpectedResponses({ 200 })
@@ -77,6 +86,14 @@ Mono> list(@HostParam("$host") String endp
Mono> listNext(
@PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint,
@HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listNextSync(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
}
/**
@@ -115,33 +132,14 @@ private Mono> listSinglePageAsync(S
* Get a list of available versions for a region.
*
* @param region Region where elastic deployment will take place.
- * @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 list of available versions for a region along with {@link PagedResponse} on successful completion of
- * {@link Mono}.
+ * @return a list of available versions for a region as paginated response with {@link PagedFlux}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listSinglePageAsync(String region, Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() 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 (region == null) {
- return Mono.error(new IllegalArgumentException("Parameter region is required and cannot be null."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service
- .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), region,
- accept, context)
- .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
- res.getValue().value(), res.getValue().nextLink(), null));
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String region) {
+ return new PagedFlux<>(() -> listSinglePageAsync(region), nextLink -> listNextSinglePageAsync(nextLink));
}
/**
@@ -151,11 +149,29 @@ private Mono> listSinglePageAsync(S
* @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 list of available versions for a region as paginated response with {@link PagedFlux}.
+ * @return a list of available versions for a region along with {@link PagedResponse}.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listAsync(String region) {
- return new PagedFlux<>(() -> listSinglePageAsync(region), nextLink -> listNextSinglePageAsync(nextLink));
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listSinglePage(String region) {
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (region == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter region is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ Response res = service.listSync(this.client.getEndpoint(),
+ this.client.getApiVersion(), this.client.getSubscriptionId(), region, accept, Context.NONE);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
}
/**
@@ -166,12 +182,29 @@ private PagedFlux listAsync(String region) {
* @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 list of available versions for a region as paginated response with {@link PagedFlux}.
+ * @return a list of available versions for a region along with {@link PagedResponse}.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listAsync(String region, Context context) {
- return new PagedFlux<>(() -> listSinglePageAsync(region, context),
- nextLink -> listNextSinglePageAsync(nextLink, context));
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listSinglePage(String region, Context context) {
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (region == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter region is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ Response res = service.listSync(this.client.getEndpoint(),
+ this.client.getApiVersion(), this.client.getSubscriptionId(), region, accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
}
/**
@@ -185,7 +218,7 @@ private PagedFlux listAsync(String region, Contex
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list(String region) {
- return new PagedIterable<>(listAsync(region));
+ return new PagedIterable<>(() -> listSinglePage(region), nextLink -> listNextSinglePage(nextLink));
}
/**
@@ -200,7 +233,8 @@ public PagedIterable list(String region) {
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list(String region, Context context) {
- return new PagedIterable<>(listAsync(region, context));
+ return new PagedIterable<>(() -> listSinglePage(region, context),
+ nextLink -> listNextSinglePage(nextLink, context));
}
/**
@@ -229,6 +263,33 @@ private Mono> listNextSinglePageAsy
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @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 list of elastic versions available in a region along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listNextSinglePage(String nextLink) {
+ if (nextLink == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ Response res
+ = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
/**
* Get the next page of items.
*
@@ -237,23 +298,25 @@ private Mono> listNextSinglePageAsy
* @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 list of elastic versions available in a region along with {@link PagedResponse} on successful completion
- * of {@link Mono}.
+ * @return list of elastic versions available in a region along with {@link PagedResponse}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listNextSinglePageAsync(String nextLink,
- Context context) {
+ private PagedResponse listNextSinglePage(String nextLink, Context context) {
if (nextLink == null) {
- return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
}
if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
}
final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.listNext(nextLink, this.client.getEndpoint(), accept, context)
- .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
- res.getValue().value(), res.getValue().nextLink(), null));
+ Response res
+ = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
}
+
+ private static final ClientLogger LOGGER = new ClientLogger(ElasticVersionsClientImpl.class);
}
diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/ExternalUsersClientImpl.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/ExternalUsersClientImpl.java
index 1d36f9a11717..a484f8214655 100644
--- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/ExternalUsersClientImpl.java
+++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/ExternalUsersClientImpl.java
@@ -22,6 +22,7 @@
import com.azure.core.management.exception.ManagementException;
import com.azure.core.util.Context;
import com.azure.core.util.FluxUtil;
+import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.elastic.fluent.ExternalUsersClient;
import com.azure.resourcemanager.elastic.fluent.models.ExternalUserCreationResponseInner;
import com.azure.resourcemanager.elastic.models.ExternalUserInfo;
@@ -68,6 +69,16 @@ Mono> createOrUpdate(@HostParam("$ho
@PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName,
@BodyParam("application/json") ExternalUserInfo body, @HeaderParam("Accept") String accept,
Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Elastic/monitors/{monitorName}/createOrUpdateExternalUser")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response createOrUpdateSync(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName,
+ @BodyParam("application/json") ExternalUserInfo body, @HeaderParam("Accept") String accept,
+ Context context);
}
/**
@@ -111,47 +122,6 @@ private Mono> createOrUpdateWithResp
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
- /**
- * Create User inside elastic deployment which are used by customers to perform operations on the elastic
- * deployment.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param monitorName Monitor resource name.
- * @param body Elastic External User Creation Parameters.
- * @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 properties of the response we got from elastic while creating external user along with
- * {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> createOrUpdateWithResponseAsync(String resourceGroupName,
- String monitorName, ExternalUserInfo body, Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() 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 (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (monitorName == null) {
- return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null."));
- }
- if (body != null) {
- body.validate();
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(),
- this.client.getSubscriptionId(), resourceGroupName, monitorName, body, accept, context);
- }
-
/**
* Create User inside elastic deployment which are used by customers to perform operations on the elastic
* deployment.
@@ -188,7 +158,30 @@ private Mono createOrUpdateAsync(String resou
@ServiceMethod(returns = ReturnType.SINGLE)
public Response createOrUpdateWithResponse(String resourceGroupName,
String monitorName, ExternalUserInfo body, Context context) {
- return createOrUpdateWithResponseAsync(resourceGroupName, monitorName, body, context).block();
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (monitorName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null."));
+ }
+ if (body != null) {
+ body.validate();
+ }
+ final String accept = "application/json";
+ return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, monitorName, body, accept, context);
}
/**
@@ -207,4 +200,6 @@ public ExternalUserCreationResponseInner createOrUpdate(String resourceGroupName
final ExternalUserInfo body = null;
return createOrUpdateWithResponse(resourceGroupName, monitorName, body, Context.NONE).getValue();
}
+
+ private static final ClientLogger LOGGER = new ClientLogger(ExternalUsersClientImpl.class);
}
diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/ListAssociatedTrafficFiltersClientImpl.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/ListAssociatedTrafficFiltersClientImpl.java
index 1b9c4a97ca2b..ecd643c04b8b 100644
--- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/ListAssociatedTrafficFiltersClientImpl.java
+++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/ListAssociatedTrafficFiltersClientImpl.java
@@ -21,6 +21,7 @@
import com.azure.core.management.exception.ManagementException;
import com.azure.core.util.Context;
import com.azure.core.util.FluxUtil;
+import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.elastic.fluent.ListAssociatedTrafficFiltersClient;
import com.azure.resourcemanager.elastic.fluent.models.ElasticTrafficFilterResponseInner;
import reactor.core.publisher.Mono;
@@ -65,6 +66,15 @@ Mono> list(@HostParam("$host") Strin
@QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
@PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName,
@HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Elastic/monitors/{monitorName}/listAssociatedTrafficFilters")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listSync(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName,
+ @HeaderParam("Accept") String accept, Context context);
}
/**
@@ -103,42 +113,6 @@ private Mono> listWithResponseAsync(
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
- /**
- * Get the list of all associated traffic filters for the given deployment.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param monitorName Monitor resource name.
- * @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 list of all associated traffic filters for the given deployment along with {@link Response} on
- * successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listWithResponseAsync(String resourceGroupName,
- String monitorName, Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() 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 (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (monitorName == null) {
- return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
- resourceGroupName, monitorName, accept, context);
- }
-
/**
* Get the list of all associated traffic filters for the given deployment.
*
@@ -169,7 +143,27 @@ private Mono listAsync(String resourceGroupNa
@ServiceMethod(returns = ReturnType.SINGLE)
public Response listWithResponse(String resourceGroupName, String monitorName,
Context context) {
- return listWithResponseAsync(resourceGroupName, monitorName, context).block();
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (monitorName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, monitorName, accept, context);
}
/**
@@ -186,4 +180,6 @@ public Response listWithResponse(String resou
public ElasticTrafficFilterResponseInner list(String resourceGroupName, String monitorName) {
return listWithResponse(resourceGroupName, monitorName, Context.NONE).getValue();
}
+
+ private static final ClientLogger LOGGER = new ClientLogger(ListAssociatedTrafficFiltersClientImpl.class);
}
diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/MonitorOperationsClientImpl.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/MonitorOperationsClientImpl.java
index 4644299b4524..c3469156d879 100644
--- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/MonitorOperationsClientImpl.java
+++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/MonitorOperationsClientImpl.java
@@ -21,8 +21,10 @@
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.BinaryData;
import com.azure.core.util.Context;
import com.azure.core.util.FluxUtil;
+import com.azure.core.util.logging.ClientLogger;
import com.azure.core.util.polling.PollerFlux;
import com.azure.core.util.polling.SyncPoller;
import com.azure.resourcemanager.elastic.fluent.MonitorOperationsClient;
@@ -72,6 +74,16 @@ Mono>> upgrade(@HostParam("$host") String endpoint,
@PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName,
@BodyParam("application/json") ElasticMonitorUpgrade body, @HeaderParam("Accept") String accept,
Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Elastic/monitors/{monitorName}/upgrade")
+ @ExpectedResponses({ 202 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response upgradeSync(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName,
+ @BodyParam("application/json") ElasticMonitorUpgrade body, @HeaderParam("Accept") String accept,
+ Context context);
}
/**
@@ -113,6 +125,46 @@ private Mono>> upgradeWithResponseAsync(String resourc
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
+ /**
+ * Upgradable version for a monitor resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Monitor resource name.
+ * @param body Elastic Monitor Upgrade Parameters.
+ * @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 response body along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Response upgradeWithResponse(String resourceGroupName, String monitorName,
+ ElasticMonitorUpgrade body) {
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (monitorName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null."));
+ }
+ if (body != null) {
+ body.validate();
+ }
+ final String accept = "application/json";
+ return service.upgradeSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, monitorName, body, accept, Context.NONE);
+ }
+
/**
* Upgradable version for a monitor resource.
*
@@ -123,33 +175,35 @@ private Mono>> upgradeWithResponseAsync(String resourc
* @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 the response body along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> upgradeWithResponseAsync(String resourceGroupName, String monitorName,
+ private Response upgradeWithResponse(String resourceGroupName, String monitorName,
ElasticMonitorUpgrade body, Context context) {
if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() 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."));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
}
if (monitorName == null) {
- return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null."));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null."));
}
if (body != null) {
body.validate();
}
final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.upgrade(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
- resourceGroupName, monitorName, body, accept, context);
+ return service.upgradeSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, monitorName, body, accept, context);
}
/**
@@ -195,19 +249,16 @@ private PollerFlux, Void> beginUpgradeAsync(String resourceGrou
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Monitor resource name.
* @param body Elastic Monitor Upgrade Parameters.
- * @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 SyncPoller} for polling of long-running operation.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, Void> beginUpgradeAsync(String resourceGroupName, String monitorName,
- ElasticMonitorUpgrade body, Context context) {
- context = this.client.mergeContext(context);
- Mono>> mono = upgradeWithResponseAsync(resourceGroupName, monitorName, body, context);
- return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
- context);
+ public SyncPoller, Void> beginUpgrade(String resourceGroupName, String monitorName,
+ ElasticMonitorUpgrade body) {
+ Response response = upgradeWithResponse(resourceGroupName, monitorName, body);
+ return this.client.getLroResult(response, Void.class, Void.class, Context.NONE);
}
/**
@@ -223,7 +274,8 @@ private PollerFlux, Void> beginUpgradeAsync(String resourceGrou
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginUpgrade(String resourceGroupName, String monitorName) {
final ElasticMonitorUpgrade body = null;
- return this.beginUpgradeAsync(resourceGroupName, monitorName, body).getSyncPoller();
+ Response response = upgradeWithResponse(resourceGroupName, monitorName, body);
+ return this.client.