diff --git a/eng/automation/api-specs.yaml b/eng/automation/api-specs.yaml
index 1099611e15fa..5b00ec3e97e2 100644
--- a/eng/automation/api-specs.yaml
+++ b/eng/automation/api-specs.yaml
@@ -110,6 +110,8 @@ offazurespringboot:
service: springappdiscovery
operationalinsights:
service: loganalytics
+operationalinsights/Microsoft.OperationalInsights/OperationalInsights:
+ service: loganalytics
oracle:
service: oracledatabase
paloaltonetworks:
diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt
index 37c62f75daba..9e332145b9d9 100644
--- a/eng/versioning/version_client.txt
+++ b/eng/versioning/version_client.txt
@@ -307,7 +307,7 @@ com.azure.resourcemanager:azure-resourcemanager-relay;1.0.0;1.1.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-costmanagement;1.0.0;1.1.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-recoveryservices;1.5.0;1.6.0
com.azure.resourcemanager:azure-resourcemanager-kusto;1.2.0;1.3.0-beta.1
-com.azure.resourcemanager:azure-resourcemanager-loganalytics;1.1.0;1.2.0-beta.1
+com.azure.resourcemanager:azure-resourcemanager-loganalytics;1.1.0;2.0.0
com.azure.resourcemanager:azure-resourcemanager-eventgrid;1.2.0;1.3.0-beta.2
com.azure.resourcemanager:azure-resourcemanager-healthbot;1.1.0;1.2.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-confluent;1.2.0;1.3.0-beta.1
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/CHANGELOG.md b/sdk/loganalytics/azure-resourcemanager-loganalytics/CHANGELOG.md
index 2dd0a420e7db..a2d2c16e79bf 100644
--- a/sdk/loganalytics/azure-resourcemanager-loganalytics/CHANGELOG.md
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/CHANGELOG.md
@@ -1,14 +1,208 @@
# Release History
-## 1.2.0-beta.1 (Unreleased)
+## 2.0.0 (2025-12-22)
-### Features Added
+- Azure Resource Manager LogAnalytics client library for Java. This package contains Microsoft Azure SDK for LogAnalytics Management SDK. Operational Insights Client. Package tag package-2025-07-01. 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.AzureResourceProperties` was removed
+
+#### `models.SystemDataAutoGenerated` was removed
+
+#### `models.CreatedByType` was removed
+
+#### `models.QueryPacksResource` was removed
+
+#### `models.Capacity` was removed
+
+#### `models.CapacityReservationLevel` was removed
+
+#### `models.CapacityReservationProperties` was modified
+
+* `java.lang.String lastSkuUpdate()` -> `java.time.OffsetDateTime lastSkuUpdate()`
+
+#### `models.WorkspacePatch` was modified
+
+* `java.lang.String createdDate()` -> `java.time.OffsetDateTime createdDate()`
+* `java.lang.String modifiedDate()` -> `java.time.OffsetDateTime modifiedDate()`
+
+#### `models.Workspace` was modified
+
+* `java.lang.String modifiedDate()` -> `java.time.OffsetDateTime modifiedDate()`
+* `models.SystemDataAutoGenerated systemData()` -> `com.azure.core.management.SystemData systemData()`
+* `java.lang.String createdDate()` -> `java.time.OffsetDateTime createdDate()`
+
+#### `models.WorkspaceSku` was modified
+
+* `java.lang.String lastSkuUpdate()` -> `java.time.OffsetDateTime lastSkuUpdate()`
+* `models.CapacityReservationLevel capacityReservationLevel()` -> `java.lang.Integer capacityReservationLevel()`
+* `withCapacityReservationLevel(models.CapacityReservationLevel)` was removed
+
+#### `models.AssociatedWorkspace` was modified
+
+* `java.lang.String associateDate()` -> `java.time.OffsetDateTime associateDate()`
+* `java.lang.String workspaceId()` -> `java.util.UUID workspaceId()`
+
+#### `models.Table` was modified
+
+* `models.SystemDataAutoGenerated systemData()` -> `com.azure.core.management.SystemData systemData()`
+
+#### `models.Cluster` was modified
+
+* `java.lang.String lastModifiedDate()` -> `java.time.OffsetDateTime lastModifiedDate()`
+* `java.lang.String createdDate()` -> `java.time.OffsetDateTime createdDate()`
+
+#### `models.IdentityType` was modified
+
+* `IdentityType()` was removed
+* `java.util.Collection values()` -> `models.IdentityType[] values()`
+
+#### `models.ClusterSku` was modified
+
+* `models.Capacity capacity()` -> `java.lang.Long capacity()`
+* `withCapacity(models.Capacity)` was removed
+
+### Features Added
+
+* `models.SummaryLogs$DefinitionStages` was added
+
+* `models.WorkspaceReplicationProperties` was added
+
+* `models.AccessRulePropertiesSubscriptionsItem` was added
+
+* `models.WorkspaceFailoverProperties` was added
+
+* `models.SummaryLogs$Definition` was added
+
+* `models.SummaryLogsListResult` was added
+
+* `models.ProvisioningIssue` was added
+
+* `models.AccessRuleProperties` was added
+
+* `models.ClusterReplicationProperties` was added
+
+* `models.ClusterReplicationState` was added
+
+* `models.SummaryLogsOperations` was added
+
+* `models.NetworkSecurityPerimeterConfigurationListResult` was added
+
+* `models.AccessRule` was added
+
+* `models.RuleDefinition` was added
+
+* `models.NetworkSecurityPerimeter` was added
+
+* `models.ResourceAssociation` was added
+
+* `models.NetworkSecurityProfile` was added
+
+* `models.NetworkSecurityPerimeterConfigurationProperties` was added
+
+* `models.SummaryLogs$UpdateStages` was added
+
+* `models.IssueType` was added
+
+* `models.AccessRuleDirection` was added
+
+* `models.SummaryLogsRetryBin` was added
+
+* `models.ResourceAssociationAccessMode` was added
+
+* `models.Severity` was added
+
+* `models.StatusCodeEnum` was added
+
+* `models.NetworkSecurityPerimeterConfigurationProvisioningState` was added
+
+* `models.SummaryLogs$Update` was added
+
+* `models.ProvisioningIssueProperties` was added
+
+* `models.NetworkSecurityPerimeterConfiguration` was added
+
+* `models.WorkspaceReplicationState` was added
+
+* `models.RuleTypeEnum` was added
+
+* `models.SummaryLogsRetryBinProperties` was added
+
+* `models.SummaryLogs` was added
+
+* `models.TimeSelectorEnum` was added
+
+* `models.WorkspaceFailoverState` was added
+
+#### `models.Cluster$Definition` was modified
+
+* `withReplication(models.ClusterReplicationProperties)` was added
+
+#### `LogAnalyticsManager` was modified
+
+* `summaryLogsOperations()` was added
+
+#### `models.WorkspaceFeatures` was modified
+
+* `unifiedSentinelBillingOnly()` was added
+* `associations()` was added
+
+#### `models.Workspace$Update` was modified
+
+* `withFailover(models.WorkspaceFailoverProperties)` was added
+* `withReplication(models.WorkspaceReplicationProperties)` was added
+
+#### `models.Workspace$Definition` was modified
+
+* `withFailover(models.WorkspaceFailoverProperties)` was added
+* `withReplication(models.WorkspaceReplicationProperties)` was added
+
+#### `models.WorkspacePatch` was modified
+
+* `failover()` was added
+* `withReplication(models.WorkspaceReplicationProperties)` was added
+* `replication()` was added
+* `withFailover(models.WorkspaceFailoverProperties)` was added
+
+#### `models.Workspace` was modified
+
+* `replication()` was added
+* `failover()` was added
+
+#### `models.LogAnalyticsQueryPack` was modified
+
+* `systemData()` was added
+
+#### `models.WorkspaceSku` was modified
+
+* `withCapacityReservationLevel(java.lang.Integer)` was added
+
+#### `models.Workspaces` was modified
+
+* `listNsp(java.lang.String,java.lang.String,com.azure.core.util.Context)` was added
+* `getNsp(java.lang.String,java.lang.String,java.lang.String)` was added
+* `failover(java.lang.String,java.lang.String,java.lang.String)` was added
+* `failback(java.lang.String,java.lang.String,com.azure.core.util.Context)` was added
+* `failover(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was added
+* `reconcileNsp(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was added
+* `failback(java.lang.String,java.lang.String)` was added
+* `getNspWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was added
+* `reconcileNsp(java.lang.String,java.lang.String,java.lang.String)` was added
+* `listNsp(java.lang.String,java.lang.String)` was added
+
+#### `models.Cluster` was modified
+
+* `replication()` was added
+
+#### `models.IdentityType` was modified
+
+* `valueOf(java.lang.String)` was added
+* `toString()` was added
+
+#### `models.ClusterSku` was modified
-### Other Changes
+* `withCapacity(java.lang.Long)` was added
## 1.1.0 (2024-12-13)
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/README.md b/sdk/loganalytics/azure-resourcemanager-loganalytics/README.md
index 0badc4533918..2d6a5400ad82 100644
--- a/sdk/loganalytics/azure-resourcemanager-loganalytics/README.md
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/README.md
@@ -2,7 +2,7 @@
Azure Resource Manager LogAnalytics client library for Java.
-This package contains Microsoft Azure SDK for LogAnalytics Management SDK. Operational Insights Client. Package tag package-2022-10. 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 LogAnalytics Management SDK. Operational Insights Client. Package tag package-2025-07-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
## We'd love to hear your feedback
@@ -32,7 +32,7 @@ Various documentation is available to help you get started
com.azure.resourcemanager
azure-resourcemanager-loganalytics
- 1.2.0-beta.1
+ 2.0.0
```
[//]: # ({x-version-update-end})
@@ -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 @@ LogAnalyticsManager manager = LogAnalyticsManager
.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.
@@ -107,5 +107,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/loganalytics/azure-resourcemanager-loganalytics/SAMPLE.md b/sdk/loganalytics/azure-resourcemanager-loganalytics/SAMPLE.md
index 672f15ccedf6..b42d29de4b1f 100644
--- a/sdk/loganalytics/azure-resourcemanager-loganalytics/SAMPLE.md
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/SAMPLE.md
@@ -111,6 +111,16 @@
- [Get](#storageinsightconfigs_get)
- [ListByWorkspace](#storageinsightconfigs_listbyworkspace)
+## SummaryLogsOperation
+
+- [CreateOrUpdate](#summarylogsoperation_createorupdate)
+- [Delete](#summarylogsoperation_delete)
+- [Get](#summarylogsoperation_get)
+- [ListByWorkspace](#summarylogsoperation_listbyworkspace)
+- [RetryBin](#summarylogsoperation_retrybin)
+- [Start](#summarylogsoperation_start)
+- [Stop](#summarylogsoperation_stop)
+
## Tables
- [CancelSearch](#tables_cancelsearch)
@@ -134,9 +144,14 @@
- [CreateOrUpdate](#workspaces_createorupdate)
- [Delete](#workspaces_delete)
+- [Failback](#workspaces_failback)
+- [Failover](#workspaces_failover)
- [GetByResourceGroup](#workspaces_getbyresourcegroup)
+- [GetNsp](#workspaces_getnsp)
- [List](#workspaces_list)
- [ListByResourceGroup](#workspaces_listbyresourcegroup)
+- [ListNsp](#workspaces_listnsp)
+- [ReconcileNsp](#workspaces_reconcilensp)
- [Update](#workspaces_update)
### AvailableServiceTiers_ListByWorkspace
@@ -147,8 +162,8 @@
public final class AvailableServiceTiersListByWorkspaceSamples {
/*
* x-ms-original-file:
- * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/
- * WorkspacesAvailableServiceTiers.json
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/WorkspacesAvailableServiceTiers.json
*/
/**
* Sample code: AvailableServiceTiers.
@@ -165,7 +180,6 @@ public final class AvailableServiceTiersListByWorkspaceSamples {
### Clusters_CreateOrUpdate
```java
-import com.azure.resourcemanager.loganalytics.models.Capacity;
import com.azure.resourcemanager.loganalytics.models.ClusterSku;
import com.azure.resourcemanager.loganalytics.models.ClusterSkuNameEnum;
import java.util.HashMap;
@@ -177,8 +191,8 @@ import java.util.Map;
public final class ClustersCreateOrUpdateSamples {
/*
* x-ms-original-file:
- * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2022-10-01/examples/
- * ClustersCreate.json
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/ClustersCreate.json
*/
/**
* Sample code: ClustersCreate.
@@ -188,11 +202,10 @@ public final class ClustersCreateOrUpdateSamples {
public static void clustersCreate(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) {
manager.clusters()
.define("oiautorest6685")
- .withRegion("australiasoutheast")
+ .withRegion("eastus")
.withExistingResourceGroup("oiautorest6685")
.withTags(mapOf("tag1", "val1"))
- .withSku(new ClusterSku().withCapacity(Capacity.ONE_ZERO_ZERO_ZERO)
- .withName(ClusterSkuNameEnum.CAPACITY_RESERVATION))
+ .withSku(new ClusterSku().withCapacity(100L).withName(ClusterSkuNameEnum.CAPACITY_RESERVATION))
.create();
}
@@ -219,8 +232,8 @@ public final class ClustersCreateOrUpdateSamples {
public final class ClustersDeleteSamples {
/*
* x-ms-original-file:
- * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2022-10-01/examples/
- * ClustersDelete.json
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/ClustersDelete.json
*/
/**
* Sample code: ClustersDelete.
@@ -242,8 +255,8 @@ public final class ClustersDeleteSamples {
public final class ClustersGetByResourceGroupSamples {
/*
* x-ms-original-file:
- * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2022-10-01/examples/
- * ClustersGet.json
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/ClustersGet.json
*/
/**
* Sample code: ClustersGet.
@@ -266,8 +279,8 @@ public final class ClustersGetByResourceGroupSamples {
public final class ClustersListSamples {
/*
* x-ms-original-file:
- * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2022-10-01/examples/
- * ClustersSubscriptionList.json
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/ClustersSubscriptionList.json
*/
/**
* Sample code: ClustersSubscriptionList.
@@ -289,8 +302,8 @@ public final class ClustersListSamples {
public final class ClustersListByResourceGroupSamples {
/*
* x-ms-original-file:
- * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2022-10-01/examples/
- * ClustersListByResourceGroup.json
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/ClustersListByResourceGroup.json
*/
/**
* Sample code: ClustersGet.
@@ -306,7 +319,6 @@ public final class ClustersListByResourceGroupSamples {
### Clusters_Update
```java
-import com.azure.resourcemanager.loganalytics.models.Capacity;
import com.azure.resourcemanager.loganalytics.models.Cluster;
import com.azure.resourcemanager.loganalytics.models.ClusterSku;
import com.azure.resourcemanager.loganalytics.models.ClusterSkuNameEnum;
@@ -323,8 +335,8 @@ import java.util.Map;
public final class ClustersUpdateSamples {
/*
* x-ms-original-file:
- * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2022-10-01/examples/
- * ClustersUpdate.json
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/ClustersUpdate.json
*/
/**
* Sample code: ClustersPatch.
@@ -341,8 +353,7 @@ public final class ClustersUpdateSamples {
.withUserAssignedIdentities(mapOf(
"/subscriptions/53bc36c5-91e1-4d09-92c9-63b89e571926/resourcegroups/oiautorest6685/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myidentity",
new UserAssignedIdentity())))
- .withSku(new ClusterSku().withCapacity(Capacity.ONE_ZERO_ZERO_ZERO)
- .withName(ClusterSkuNameEnum.CAPACITY_RESERVATION))
+ .withSku(new ClusterSku().withCapacity(1000L).withName(ClusterSkuNameEnum.CAPACITY_RESERVATION))
.withKeyVaultProperties(new KeyVaultProperties().withKeyVaultUri("fakeTokenPlaceholder")
.withKeyName("fakeTokenPlaceholder")
.withKeyVersion("fakeTokenPlaceholder")
@@ -375,8 +386,8 @@ import java.util.Arrays;
public final class DataExportsCreateOrUpdateSamples {
/*
* x-ms-original-file:
- * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/
- * DataExportCreateOrUpdate.json
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/DataExportCreateOrUpdate.json
*/
/**
* Sample code: DataExportCreate.
@@ -404,8 +415,8 @@ public final class DataExportsCreateOrUpdateSamples {
public final class DataExportsDeleteSamples {
/*
* x-ms-original-file:
- * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/
- * DataExportDelete.json
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/DataExportDelete.json
*/
/**
* Sample code: DataExportDelete.
@@ -428,8 +439,8 @@ public final class DataExportsDeleteSamples {
public final class DataExportsGetSamples {
/*
* x-ms-original-file:
- * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/
- * DataExportGet.json
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/DataExportGet.json
*/
/**
* Sample code: DataExportGet.
@@ -451,8 +462,8 @@ public final class DataExportsGetSamples {
public final class DataExportsListByWorkspaceSamples {
/*
* x-ms-original-file:
- * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/
- * DataExportListByWorkspace.json
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/DataExportListByWorkspace.json
*/
/**
* Sample code: DataExportGet.
@@ -479,8 +490,8 @@ import java.io.IOException;
public final class DataSourcesCreateOrUpdateSamples {
/*
* x-ms-original-file:
- * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/
- * DataSourcesCreate.json
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/DataSourcesCreate.json
*/
/**
* Sample code: DataSourcesCreate.
@@ -511,8 +522,8 @@ public final class DataSourcesCreateOrUpdateSamples {
public final class DataSourcesDeleteSamples {
/*
* x-ms-original-file:
- * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/
- * DataSourcesDelete.json
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/DataSourcesDelete.json
*/
/**
* Sample code: DataSourcesDelete.
@@ -535,8 +546,8 @@ public final class DataSourcesDeleteSamples {
public final class DataSourcesGetSamples {
/*
* x-ms-original-file:
- * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/
- * DataSourcesGet.json
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/DataSourcesGet.json
*/
/**
* Sample code: DataSourcesGet.
@@ -559,8 +570,8 @@ public final class DataSourcesGetSamples {
public final class DataSourcesListByWorkspaceSamples {
/*
* x-ms-original-file:
- * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/
- * DataSourcesListByWorkspace.json
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/DataSourcesListByWorkspace.json
*/
/**
* Sample code: DataSourcesListByWorkspace.
@@ -584,8 +595,8 @@ public final class DataSourcesListByWorkspaceSamples {
public final class DeletedWorkspacesListSamples {
/*
* x-ms-original-file:
- * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2022-10-01/examples/
- * WorkspacesSubscriptionList.json
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/WorkspacesSubscriptionList.json
*/
/**
* Sample code: WorkspacesSubscriptionList.
@@ -607,8 +618,8 @@ public final class DeletedWorkspacesListSamples {
public final class DeletedWorkspacesListByResourceGroupSamples {
/*
* x-ms-original-file:
- * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2022-10-01/examples/
- * WorkspacesListByResourceGroup.json
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/WorkspacesListByResourceGroup.json
*/
/**
* Sample code: WorkspacesGet.
@@ -630,8 +641,8 @@ public final class DeletedWorkspacesListByResourceGroupSamples {
public final class GatewaysDeleteSamples {
/*
* x-ms-original-file:
- * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/
- * WorkspacesGatewaysDelete.json
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/WorkspacesGatewaysDelete.json
*/
/**
* Sample code: DeleteGateways.
@@ -655,8 +666,8 @@ public final class GatewaysDeleteSamples {
public final class IntelligencePacksDisableSamples {
/*
* x-ms-original-file:
- * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/
- * WorkspacesDisableIntelligencePack.json
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/WorkspacesDisableIntelligencePack.json
*/
/**
* Sample code: IntelligencePacksDisable.
@@ -679,8 +690,8 @@ public final class IntelligencePacksDisableSamples {
public final class IntelligencePacksEnableSamples {
/*
* x-ms-original-file:
- * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/
- * WorkspacesEnableIntelligencePack.json
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/WorkspacesEnableIntelligencePack.json
*/
/**
* Sample code: IntelligencePacksEnable.
@@ -703,8 +714,8 @@ public final class IntelligencePacksEnableSamples {
public final class IntelligencePacksListSamples {
/*
* x-ms-original-file:
- * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/
- * WorkspacesListIntelligencePacks.json
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/WorkspacesListIntelligencePacks.json
*/
/**
* Sample code: IntelligencePacksList.
@@ -726,8 +737,8 @@ public final class IntelligencePacksListSamples {
public final class LinkedServicesCreateOrUpdateSamples {
/*
* x-ms-original-file:
- * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/
- * LinkedServicesCreate.json
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/LinkedServicesCreate.json
*/
/**
* Sample code: LinkedServicesCreate.
@@ -754,8 +765,8 @@ public final class LinkedServicesCreateOrUpdateSamples {
public final class LinkedServicesDeleteSamples {
/*
* x-ms-original-file:
- * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/
- * LinkedServicesDelete.json
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/LinkedServicesDelete.json
*/
/**
* Sample code: LinkedServicesDelete.
@@ -777,8 +788,8 @@ public final class LinkedServicesDeleteSamples {
public final class LinkedServicesGetSamples {
/*
* x-ms-original-file:
- * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/
- * LinkedServicesGet.json
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/LinkedServicesGet.json
*/
/**
* Sample code: LinkedServicesGet.
@@ -800,8 +811,8 @@ public final class LinkedServicesGetSamples {
public final class LinkedServicesListByWorkspaceSamples {
/*
* x-ms-original-file:
- * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/
- * LinkedServicesListByWorkspace.json
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/LinkedServicesListByWorkspace.json
*/
/**
* Sample code: LinkedServicesListByWorkspace.
@@ -827,8 +838,8 @@ import java.util.Arrays;
public final class LinkedStorageAccountsCreateOrUpdateSamples {
/*
* x-ms-original-file:
- * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/
- * LinkedStorageAccountsCreate.json
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/LinkedStorageAccountsCreate.json
*/
/**
* Sample code: LinkedStorageAccountsCreate.
@@ -858,8 +869,8 @@ import com.azure.resourcemanager.loganalytics.models.DataSourceType;
public final class LinkedStorageAccountsDeleteSamples {
/*
* x-ms-original-file:
- * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/
- * LinkedStorageAccountsDelete.json
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/LinkedStorageAccountsDelete.json
*/
/**
* Sample code: LinkedStorageAccountsDelete.
@@ -885,8 +896,8 @@ import com.azure.resourcemanager.loganalytics.models.DataSourceType;
public final class LinkedStorageAccountsGetSamples {
/*
* x-ms-original-file:
- * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/
- * LinkedStorageAccountsGet.json
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/LinkedStorageAccountsGet.json
*/
/**
* Sample code: LinkedStorageAccountsGet.
@@ -910,8 +921,8 @@ public final class LinkedStorageAccountsGetSamples {
public final class LinkedStorageAccountsListByWorkspaceSamples {
/*
* x-ms-original-file:
- * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/
- * LinkedStorageAccountsListByWorkspace.json
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/LinkedStorageAccountsListByWorkspace.json
*/
/**
* Sample code: Gets list of linked storage accounts on a workspace.
@@ -935,8 +946,8 @@ public final class LinkedStorageAccountsListByWorkspaceSamples {
public final class ManagementGroupsListSamples {
/*
* x-ms-original-file:
- * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/
- * WorkspacesListManagementGroups.json
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/WorkspacesListManagementGroups.json
*/
/**
* Sample code: WorkspacesListManagementGroups.
@@ -959,8 +970,8 @@ public final class ManagementGroupsListSamples {
public final class OperationStatusesGetSamples {
/*
* x-ms-original-file:
- * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/
- * OperationStatusesGet.json
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/OperationStatusesGet.json
*/
/**
* Sample code: Get specific operation status.
@@ -983,8 +994,8 @@ public final class OperationStatusesGetSamples {
public final class OperationsListSamples {
/*
* x-ms-original-file:
- * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2022-10-01/examples/
- * OperationsListByTenant.json
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/OperationsListByTenant.json
*/
/**
* Sample code: Get specific operation status.
@@ -1006,8 +1017,8 @@ public final class OperationsListSamples {
public final class QueriesDeleteSamples {
/*
* x-ms-original-file:
- * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/
- * QueryPackQueriesDelete.json
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/QueryPackQueriesDelete.json
*/
/**
* Sample code: QueryDelete.
@@ -1031,8 +1042,8 @@ public final class QueriesDeleteSamples {
public final class QueriesGetSamples {
/*
* x-ms-original-file:
- * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/
- * QueryPackQueriesGet.json
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/QueryPackQueriesGet.json
*/
/**
* Sample code: QueryGet.
@@ -1056,8 +1067,8 @@ public final class QueriesGetSamples {
public final class QueriesListSamples {
/*
* x-ms-original-file:
- * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/
- * QueryPackQueriesList.json
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/QueryPackQueriesList.json
*/
/**
* Sample code: QueryList.
@@ -1084,8 +1095,8 @@ import java.util.Map;
public final class QueriesPutSamples {
/*
* x-ms-original-file:
- * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/
- * QueryPackQueriesPut.json
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/QueryPackQueriesPut.json
*/
/**
* Sample code: QueryPut.
@@ -1134,8 +1145,8 @@ import java.util.Map;
public final class QueriesSearchSamples {
/*
* x-ms-original-file:
- * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/
- * QueryPackQueriesSearch.json
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/QueryPackQueriesSearch.json
*/
/**
* Sample code: QuerySearch.
@@ -1181,8 +1192,8 @@ import java.util.Map;
public final class QueriesUpdateSamples {
/*
* x-ms-original-file:
- * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/
- * QueryPackQueriesUpdate.json
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/QueryPackQueriesUpdate.json
*/
/**
* Sample code: QueryPatch.
@@ -1230,8 +1241,8 @@ import java.util.Map;
public final class QueryPacksCreateOrUpdateSamples {
/*
* x-ms-original-file:
- * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/
- * QueryPacksCreate.json
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/QueryPacksCreate.json
*/
/**
* Sample code: QueryPackCreate.
@@ -1248,8 +1259,8 @@ public final class QueryPacksCreateOrUpdateSamples {
/*
* x-ms-original-file:
- * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/
- * QueryPacksUpdate.json
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/QueryPacksUpdate.json
*/
/**
* Sample code: QueryPackUpdate.
@@ -1292,8 +1303,8 @@ import java.util.Map;
public final class QueryPacksCreateOrUpdateWithoutNameSamples {
/*
* x-ms-original-file:
- * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/
- * QueryPacksCreateNoName.json
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/QueryPacksCreateNoName.json
*/
/**
* Sample code: QueryPackCreateNoName.
@@ -1308,8 +1319,8 @@ public final class QueryPacksCreateOrUpdateWithoutNameSamples {
/*
* x-ms-original-file:
- * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/
- * QueryPackUpdateNoName.json
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/QueryPackUpdateNoName.json
*/
/**
* Sample code: QueryPackUpdateNoName.
@@ -1346,8 +1357,8 @@ public final class QueryPacksCreateOrUpdateWithoutNameSamples {
public final class QueryPacksDeleteSamples {
/*
* x-ms-original-file:
- * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/
- * QueryPacksDelete.json
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/QueryPacksDelete.json
*/
/**
* Sample code: QueryPacksDelete.
@@ -1370,8 +1381,8 @@ public final class QueryPacksDeleteSamples {
public final class QueryPacksGetByResourceGroupSamples {
/*
* x-ms-original-file:
- * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/
- * QueryPacksGet.json
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/QueryPacksGet.json
*/
/**
* Sample code: QueryPackGet.
@@ -1394,8 +1405,8 @@ public final class QueryPacksGetByResourceGroupSamples {
public final class QueryPacksListSamples {
/*
* x-ms-original-file:
- * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/
- * QueryPacksList.json
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/QueryPacksList.json
*/
/**
* Sample code: QueryPacksList.
@@ -1417,8 +1428,8 @@ public final class QueryPacksListSamples {
public final class QueryPacksListByResourceGroupSamples {
/*
* x-ms-original-file:
- * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/
- * QueryPacksListByResourceGroup.json
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/QueryPacksListByResourceGroup.json
*/
/**
* Sample code: QueryPackListByResourceGroup.
@@ -1445,8 +1456,8 @@ import java.util.Map;
public final class QueryPacksUpdateTagsSamples {
/*
* x-ms-original-file:
- * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/
- * QueryPacksUpdateTagsOnly.json
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/QueryPacksUpdateTagsOnly.json
*/
/**
* Sample code: QueryPackUpdateTagsOnly.
@@ -1486,8 +1497,8 @@ import java.util.Arrays;
public final class SavedSearchesCreateOrUpdateSamples {
/*
* x-ms-original-file:
- * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/
- * WorkspacesSavedSearchesCreateOrUpdate.json
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/WorkspacesSavedSearchesCreateOrUpdate.json
*/
/**
* Sample code: SavedSearchCreateOrUpdate.
@@ -1519,8 +1530,8 @@ public final class SavedSearchesCreateOrUpdateSamples {
public final class SavedSearchesDeleteSamples {
/*
* x-ms-original-file:
- * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/
- * WorkspacesDeleteSavedSearches.json
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/WorkspacesDeleteSavedSearches.json
*/
/**
* Sample code: SavedSearchesDelete.
@@ -1544,8 +1555,8 @@ public final class SavedSearchesDeleteSamples {
public final class SavedSearchesGetSamples {
/*
* x-ms-original-file:
- * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/
- * WorkspacesSavedSearchesGet.json
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/WorkspacesSavedSearchesGet.json
*/
/**
* Sample code: SavedSearchesGet.
@@ -1569,8 +1580,8 @@ public final class SavedSearchesGetSamples {
public final class SavedSearchesListByWorkspaceSamples {
/*
* x-ms-original-file:
- * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/
- * SavedSearchesListByWorkspace.json
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/SavedSearchesListByWorkspace.json
*/
/**
* Sample code: SavedSearchesList.
@@ -1592,8 +1603,8 @@ public final class SavedSearchesListByWorkspaceSamples {
public final class SchemaGetSamples {
/*
* x-ms-original-file:
- * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/
- * SavedSearchesGetSchema.json
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/SavedSearchesGetSchema.json
*/
/**
* Sample code: WorkspacesGetSchema.
@@ -1615,8 +1626,8 @@ public final class SchemaGetSamples {
public final class SharedKeysOperationGetSharedKeysSamples {
/*
* x-ms-original-file:
- * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/
- * WorkspacesGetSharedKeys.json
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/WorkspacesGetSharedKeys.json
*/
/**
* Sample code: SharedKeysList.
@@ -1638,8 +1649,8 @@ public final class SharedKeysOperationGetSharedKeysSamples {
public final class SharedKeysOperationRegenerateSamples {
/*
* x-ms-original-file:
- * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/
- * WorkspacesRegenerateSharedKeys.json
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/WorkspacesRegenerateSharedKeys.json
*/
/**
* Sample code: RegenerateSharedKeys.
@@ -1664,8 +1675,8 @@ import java.util.Arrays;
public final class StorageInsightConfigsCreateOrUpdateSamples {
/*
* x-ms-original-file:
- * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/
- * StorageInsightsCreateOrUpdate.json
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/StorageInsightsCreateOrUpdate.json
*/
/**
* Sample code: StorageInsightsCreate.
@@ -1695,8 +1706,8 @@ public final class StorageInsightConfigsCreateOrUpdateSamples {
public final class StorageInsightConfigsDeleteSamples {
/*
* x-ms-original-file:
- * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/
- * StorageInsightsDelete.json
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/StorageInsightsDelete.json
*/
/**
* Sample code: StorageInsightsDelete.
@@ -1719,8 +1730,8 @@ public final class StorageInsightConfigsDeleteSamples {
public final class StorageInsightConfigsGetSamples {
/*
* x-ms-original-file:
- * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/
- * StorageInsightsGet.json
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/StorageInsightsGet.json
*/
/**
* Sample code: StorageInsightsGet.
@@ -1743,8 +1754,8 @@ public final class StorageInsightConfigsGetSamples {
public final class StorageInsightConfigsListByWorkspaceSamples {
/*
* x-ms-original-file:
- * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/
- * StorageInsightsListByWorkspace.json
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/StorageInsightsListByWorkspace.json
*/
/**
* Sample code: StorageInsightsList.
@@ -1758,6 +1769,192 @@ public final class StorageInsightConfigsListByWorkspaceSamples {
}
```
+### SummaryLogsOperation_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.loganalytics.models.RuleDefinition;
+import com.azure.resourcemanager.loganalytics.models.RuleTypeEnum;
+import java.time.OffsetDateTime;
+
+/**
+ * Samples for SummaryLogsOperation CreateOrUpdate.
+ */
+public final class SummaryLogsOperationCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file:
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/SummaryLogsUpsert.json
+ */
+ /**
+ * Sample code: SummaryLogsUpsert.
+ *
+ * @param manager Entry point to LogAnalyticsManager.
+ */
+ public static void summaryLogsUpsert(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) {
+ manager.summaryLogsOperations()
+ .define("summarylogs1")
+ .withExistingWorkspace("oiautorest6685", "oiautorest6685")
+ .withRuleType(RuleTypeEnum.USER)
+ .withRuleDefinition(new RuleDefinition().withQuery("MyTable_CL")
+ .withBinSize(180)
+ .withBinDelay(10)
+ .withBinStartTime(OffsetDateTime.parse("2020-02-03T04:05:06Z")))
+ .create();
+ }
+}
+```
+
+### SummaryLogsOperation_Delete
+
+```java
+/**
+ * Samples for SummaryLogsOperation Delete.
+ */
+public final class SummaryLogsOperationDeleteSamples {
+ /*
+ * x-ms-original-file:
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/SummaryLogsDelete.json
+ */
+ /**
+ * Sample code: SummaryLogsDelete.
+ *
+ * @param manager Entry point to LogAnalyticsManager.
+ */
+ public static void summaryLogsDelete(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) {
+ manager.summaryLogsOperations()
+ .delete("oiautorest6685", "oiautorest6685", "summarylogs1", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### SummaryLogsOperation_Get
+
+```java
+/**
+ * Samples for SummaryLogsOperation Get.
+ */
+public final class SummaryLogsOperationGetSamples {
+ /*
+ * x-ms-original-file:
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/SummaryLogsGet.json
+ */
+ /**
+ * Sample code: SummaryLogsGet.
+ *
+ * @param manager Entry point to LogAnalyticsManager.
+ */
+ public static void summaryLogsGet(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) {
+ manager.summaryLogsOperations()
+ .getWithResponse("oiautorest6685", "oiautorest6685", "summarylogs1", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### SummaryLogsOperation_ListByWorkspace
+
+```java
+/**
+ * Samples for SummaryLogsOperation ListByWorkspace.
+ */
+public final class SummaryLogsOperationListByWorkspaceSamples {
+ /*
+ * x-ms-original-file:
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/SummaryLogsList.json
+ */
+ /**
+ * Sample code: SummaryLogsListByWorkspace.
+ *
+ * @param manager Entry point to LogAnalyticsManager.
+ */
+ public static void summaryLogsListByWorkspace(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) {
+ manager.summaryLogsOperations()
+ .listByWorkspace("oiautorest6685", "oiautorest6685", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### SummaryLogsOperation_RetryBin
+
+```java
+import com.azure.resourcemanager.loganalytics.models.SummaryLogsRetryBin;
+import com.azure.resourcemanager.loganalytics.models.SummaryLogsRetryBinProperties;
+import java.time.OffsetDateTime;
+
+/**
+ * Samples for SummaryLogsOperation RetryBin.
+ */
+public final class SummaryLogsOperationRetryBinSamples {
+ /*
+ * x-ms-original-file:
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/SummaryLogsRetryBin.json
+ */
+ /**
+ * Sample code: SummaryLogsRetryBin.
+ *
+ * @param manager Entry point to LogAnalyticsManager.
+ */
+ public static void summaryLogsRetryBin(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) {
+ manager.summaryLogsOperations()
+ .retryBin("oiautorest6685", "oiautorest6685", "summarylogs1",
+ new SummaryLogsRetryBin().withProperties(new SummaryLogsRetryBinProperties()
+ .withRetryBinStartTime(OffsetDateTime.parse("2020-02-03T04:00:00Z"))),
+ com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### SummaryLogsOperation_Start
+
+```java
+/**
+ * Samples for SummaryLogsOperation Start.
+ */
+public final class SummaryLogsOperationStartSamples {
+ /*
+ * x-ms-original-file:
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/SummaryLogsStart.json
+ */
+ /**
+ * Sample code: SummaryLogsStart.
+ *
+ * @param manager Entry point to LogAnalyticsManager.
+ */
+ public static void summaryLogsStart(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) {
+ manager.summaryLogsOperations()
+ .start("exampleresourcegroup", "exampleworkspace", "summarylogs3", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### SummaryLogsOperation_Stop
+
+```java
+/**
+ * Samples for SummaryLogsOperation Stop.
+ */
+public final class SummaryLogsOperationStopSamples {
+ /*
+ * x-ms-original-file:
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/SummaryLogsStop.json
+ */
+ /**
+ * Sample code: SummaryLogsStop.
+ *
+ * @param manager Entry point to LogAnalyticsManager.
+ */
+ public static void summaryLogsStop(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) {
+ manager.summaryLogsOperations()
+ .stopWithResponse("oiautorest6685", "oiautorest6685", "summarylogs1", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
### Tables_CancelSearch
```java
@@ -1767,8 +1964,8 @@ public final class StorageInsightConfigsListByWorkspaceSamples {
public final class TablesCancelSearchSamples {
/*
* x-ms-original-file:
- * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2022-10-01/examples/
- * TablesSearchCancel.json
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/TablesSearchCancel.json
*/
/**
* Sample code: TablesSearchCancel.
@@ -1797,8 +1994,8 @@ import java.util.Arrays;
public final class TablesCreateOrUpdateSamples {
/*
* x-ms-original-file:
- * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2022-10-01/examples/
- * TablesUpsert.json
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/TablesUpsert.json
*/
/**
* Sample code: TablesUpsert.
@@ -1827,8 +2024,8 @@ public final class TablesCreateOrUpdateSamples {
public final class TablesDeleteSamples {
/*
* x-ms-original-file:
- * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2022-10-01/examples/
- * TablesDelete.json
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/TablesDelete.json
*/
/**
* Sample code: TablesDelete.
@@ -1850,8 +2047,8 @@ public final class TablesDeleteSamples {
public final class TablesGetSamples {
/*
* x-ms-original-file:
- * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2022-10-01/examples/
- * TablesGet.json
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/TablesGet.json
*/
/**
* Sample code: TablesGet.
@@ -1874,8 +2071,8 @@ public final class TablesGetSamples {
public final class TablesListByWorkspaceSamples {
/*
* x-ms-original-file:
- * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2022-10-01/examples/
- * TablesList.json
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/TablesList.json
*/
/**
* Sample code: TablesListByWorkspace.
@@ -1897,8 +2094,8 @@ public final class TablesListByWorkspaceSamples {
public final class TablesMigrateSamples {
/*
* x-ms-original-file:
- * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2022-10-01/examples/
- * TablesMigrate.json
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/TablesMigrate.json
*/
/**
* Sample code: TablesMigrate.
@@ -1927,8 +2124,8 @@ import java.util.Arrays;
public final class TablesUpdateSamples {
/*
* x-ms-original-file:
- * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2022-10-01/examples/
- * TablesUpsert.json
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/TablesUpsert.json
*/
/**
* Sample code: TablesUpsert.
@@ -1958,8 +2155,8 @@ public final class TablesUpdateSamples {
public final class UsagesListSamples {
/*
* x-ms-original-file:
- * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/
- * WorkspacesListUsages.json
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/WorkspacesListUsages.json
*/
/**
* Sample code: UsagesList.
@@ -1981,8 +2178,8 @@ public final class UsagesListSamples {
public final class WorkspacePurgeGetPurgeStatusSamples {
/*
* x-ms-original-file:
- * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/
- * WorkspacesPurgeOperation.json
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/WorkspacesPurgeOperation.json
*/
/**
* Sample code: WorkspacePurgeOperation.
@@ -2010,8 +2207,8 @@ import java.util.Arrays;
public final class WorkspacePurgePurgeSamples {
/*
* x-ms-original-file:
- * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/
- * WorkspacesPurgeResourceId.json
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/WorkspacesPurgeResourceId.json
*/
/**
* Sample code: WorkspacePurgeResourceId.
@@ -2030,8 +2227,8 @@ public final class WorkspacePurgePurgeSamples {
/*
* x-ms-original-file:
- * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/
- * WorkspacesPurge.json
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/WorkspacesPurge.json
*/
/**
* Sample code: WorkspacePurge.
@@ -2064,8 +2261,8 @@ import java.util.Map;
public final class WorkspacesCreateOrUpdateSamples {
/*
* x-ms-original-file:
- * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2022-10-01/examples/
- * WorkspacesCreate.json
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/WorkspacesCreate.json
*/
/**
* Sample code: WorkspacesCreate.
@@ -2106,8 +2303,8 @@ public final class WorkspacesCreateOrUpdateSamples {
public final class WorkspacesDeleteSamples {
/*
* x-ms-original-file:
- * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2022-10-01/examples/
- * WorkspacesDelete.json
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/WorkspacesDelete.json
*/
/**
* Sample code: WorkspacesDelete.
@@ -2120,6 +2317,52 @@ public final class WorkspacesDeleteSamples {
}
```
+### Workspaces_Failback
+
+```java
+/**
+ * Samples for Workspaces Failback.
+ */
+public final class WorkspacesFailbackSamples {
+ /*
+ * x-ms-original-file:
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/WorkspacesFailback.json
+ */
+ /**
+ * Sample code: WorkspacesFailover.
+ *
+ * @param manager Entry point to LogAnalyticsManager.
+ */
+ public static void workspacesFailover(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) {
+ manager.workspaces().failback("oiautorest6685", "oiautorest6685", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### Workspaces_Failover
+
+```java
+/**
+ * Samples for Workspaces Failover.
+ */
+public final class WorkspacesFailoverSamples {
+ /*
+ * x-ms-original-file:
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/WorkspacesFailover.json
+ */
+ /**
+ * Sample code: WorkspacesFailover.
+ *
+ * @param manager Entry point to LogAnalyticsManager.
+ */
+ public static void workspacesFailover(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) {
+ manager.workspaces().failover("oiautorest6685", "eastus", "oiautorest6685", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
### Workspaces_GetByResourceGroup
```java
@@ -2129,8 +2372,8 @@ public final class WorkspacesDeleteSamples {
public final class WorkspacesGetByResourceGroupSamples {
/*
* x-ms-original-file:
- * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2022-10-01/examples/
- * WorkspacesGet.json
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/WorkspacesGet.json
*/
/**
* Sample code: WorkspaceGet.
@@ -2144,6 +2387,32 @@ public final class WorkspacesGetByResourceGroupSamples {
}
```
+### Workspaces_GetNsp
+
+```java
+/**
+ * Samples for Workspaces GetNsp.
+ */
+public final class WorkspacesGetNspSamples {
+ /*
+ * x-ms-original-file:
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/NSPForWorkspaces_Get.json
+ */
+ /**
+ * Sample code: Get NSP config by name for Scheduled Query Rule.
+ *
+ * @param manager Entry point to LogAnalyticsManager.
+ */
+ public static void
+ getNSPConfigByNameForScheduledQueryRule(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) {
+ manager.workspaces()
+ .getNspWithResponse("exampleRG", "someWorkspace", "somePerimeterConfiguration",
+ com.azure.core.util.Context.NONE);
+ }
+}
+```
+
### Workspaces_List
```java
@@ -2153,8 +2422,8 @@ public final class WorkspacesGetByResourceGroupSamples {
public final class WorkspacesListSamples {
/*
* x-ms-original-file:
- * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2022-10-01/examples/
- * WorkspacesSubscriptionList.json
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/WorkspacesSubscriptionList.json
*/
/**
* Sample code: WorkspacesSubscriptionList.
@@ -2176,8 +2445,8 @@ public final class WorkspacesListSamples {
public final class WorkspacesListByResourceGroupSamples {
/*
* x-ms-original-file:
- * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2022-10-01/examples/
- * WorkspacesListByResourceGroup.json
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/WorkspacesListByResourceGroup.json
*/
/**
* Sample code: WorkspacesGet.
@@ -2190,6 +2459,55 @@ public final class WorkspacesListByResourceGroupSamples {
}
```
+### Workspaces_ListNsp
+
+```java
+/**
+ * Samples for Workspaces ListNsp.
+ */
+public final class WorkspacesListNspSamples {
+ /*
+ * x-ms-original-file:
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/NSPForWorkspaces_List.json
+ */
+ /**
+ * Sample code: List NSP configs by Scheduled Query Rule.
+ *
+ * @param manager Entry point to LogAnalyticsManager.
+ */
+ public static void
+ listNSPConfigsByScheduledQueryRule(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) {
+ manager.workspaces().listNsp("exampleRG", "someWorkspace", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### Workspaces_ReconcileNsp
+
+```java
+/**
+ * Samples for Workspaces ReconcileNsp.
+ */
+public final class WorkspacesReconcileNspSamples {
+ /*
+ * x-ms-original-file:
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/NSPForWorkspaces_Reconcile.json
+ */
+ /**
+ * Sample code: Reconcile NSP config for Scheduled Query Rule.
+ *
+ * @param manager Entry point to LogAnalyticsManager.
+ */
+ public static void
+ reconcileNSPConfigForScheduledQueryRule(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) {
+ manager.workspaces()
+ .reconcileNsp("exampleRG", "someWorkspace", "somePerimeterConfiguration", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
### Workspaces_Update
```java
@@ -2204,8 +2522,8 @@ import com.azure.resourcemanager.loganalytics.models.WorkspaceSkuNameEnum;
public final class WorkspacesUpdateSamples {
/*
* x-ms-original-file:
- * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2022-10-01/examples/
- * WorkspacesUpdate.json
+ * specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/stable/2025-
+ * 07-01/examples/WorkspacesUpdate.json
*/
/**
* Sample code: WorkspacesPatch.
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/pom.xml b/sdk/loganalytics/azure-resourcemanager-loganalytics/pom.xml
index eb5b604f5d24..8e25000311ab 100644
--- a/sdk/loganalytics/azure-resourcemanager-loganalytics/pom.xml
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/pom.xml
@@ -14,11 +14,11 @@
com.azure.resourcemanager
azure-resourcemanager-loganalytics
- 1.2.0-beta.1
+ 2.0.0
jar
Microsoft Azure SDK for LogAnalytics Management
- This package contains Microsoft Azure SDK for LogAnalytics Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Operational Insights Client. Package tag package-2022-10.
+ This package contains Microsoft Azure SDK for LogAnalytics Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Operational Insights Client. Package tag package-2025-07-01.
https://github.com/Azure/azure-sdk-for-java
@@ -45,7 +45,6 @@
UTF-8
0
0
- false
true
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/LogAnalyticsManager.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/LogAnalyticsManager.java
index d6bdc947ef43..67e3a361ae94 100644
--- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/LogAnalyticsManager.java
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/LogAnalyticsManager.java
@@ -22,6 +22,7 @@
import com.azure.core.http.policy.UserAgentPolicy;
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.loganalytics.fluent.OperationalInsightsManagementClient;
import com.azure.resourcemanager.loganalytics.implementation.AvailableServiceTiersImpl;
@@ -43,6 +44,7 @@
import com.azure.resourcemanager.loganalytics.implementation.SchemasImpl;
import com.azure.resourcemanager.loganalytics.implementation.SharedKeysOperationsImpl;
import com.azure.resourcemanager.loganalytics.implementation.StorageInsightConfigsImpl;
+import com.azure.resourcemanager.loganalytics.implementation.SummaryLogsOperationsImpl;
import com.azure.resourcemanager.loganalytics.implementation.TablesImpl;
import com.azure.resourcemanager.loganalytics.implementation.UsagesImpl;
import com.azure.resourcemanager.loganalytics.implementation.WorkspacePurgesImpl;
@@ -65,6 +67,7 @@
import com.azure.resourcemanager.loganalytics.models.Schemas;
import com.azure.resourcemanager.loganalytics.models.SharedKeysOperations;
import com.azure.resourcemanager.loganalytics.models.StorageInsightConfigs;
+import com.azure.resourcemanager.loganalytics.models.SummaryLogsOperations;
import com.azure.resourcemanager.loganalytics.models.Tables;
import com.azure.resourcemanager.loganalytics.models.Usages;
import com.azure.resourcemanager.loganalytics.models.WorkspacePurges;
@@ -73,6 +76,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;
@@ -81,14 +85,16 @@
* Operational Insights Client.
*/
public final class LogAnalyticsManager {
- private QueryPacks queryPacks;
+ private AvailableServiceTiers availableServiceTiers;
- private Queries queries;
+ private Clusters clusters;
private DataExports dataExports;
private DataSources dataSources;
+ private Gateways gateways;
+
private IntelligencePacks intelligencePacks;
private LinkedServices linkedServices;
@@ -97,33 +103,33 @@ public final class LogAnalyticsManager {
private ManagementGroups managementGroups;
- private OperationStatuses operationStatuses;
+ private Operations operations;
- private SharedKeysOperations sharedKeysOperations;
+ private OperationStatuses operationStatuses;
- private Usages usages;
+ private Queries queries;
- private StorageInsightConfigs storageInsightConfigs;
+ private QueryPacks queryPacks;
private SavedSearches savedSearches;
- private AvailableServiceTiers availableServiceTiers;
+ private Schemas schemas;
- private Gateways gateways;
+ private SharedKeysOperations sharedKeysOperations;
- private Schemas schemas;
+ private StorageInsightConfigs storageInsightConfigs;
- private WorkspacePurges workspacePurges;
+ private Tables tables;
- private Clusters clusters;
+ private Usages usages;
- private Operations operations;
+ private WorkspacePurges workspacePurges;
private Workspaces workspaces;
private DeletedWorkspaces deletedWorkspaces;
- private Tables tables;
+ private SummaryLogsOperations summaryLogsOperations;
private final OperationalInsightsManagementClient clientObject;
@@ -177,6 +183,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-loganalytics.properties");
private HttpClient httpClient;
private HttpLogOptions httpLogOptions;
@@ -284,12 +293,14 @@ public LogAnalyticsManager authenticate(TokenCredential credential, AzureProfile
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.loganalytics")
.append("/")
- .append("1.1.0");
+ .append(clientVersion);
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder.append(" (")
.append(Configuration.getGlobalConfiguration().get("java.version"))
@@ -336,27 +347,27 @@ public LogAnalyticsManager authenticate(TokenCredential credential, AzureProfile
}
/**
- * Gets the resource collection API of QueryPacks. It manages LogAnalyticsQueryPack.
+ * Gets the resource collection API of AvailableServiceTiers.
*
- * @return Resource collection API of QueryPacks.
+ * @return Resource collection API of AvailableServiceTiers.
*/
- public QueryPacks queryPacks() {
- if (this.queryPacks == null) {
- this.queryPacks = new QueryPacksImpl(clientObject.getQueryPacks(), this);
+ public AvailableServiceTiers availableServiceTiers() {
+ if (this.availableServiceTiers == null) {
+ this.availableServiceTiers = new AvailableServiceTiersImpl(clientObject.getAvailableServiceTiers(), this);
}
- return queryPacks;
+ return availableServiceTiers;
}
/**
- * Gets the resource collection API of Queries. It manages LogAnalyticsQueryPackQuery.
+ * Gets the resource collection API of Clusters. It manages Cluster.
*
- * @return Resource collection API of Queries.
+ * @return Resource collection API of Clusters.
*/
- public Queries queries() {
- if (this.queries == null) {
- this.queries = new QueriesImpl(clientObject.getQueries(), this);
+ public Clusters clusters() {
+ if (this.clusters == null) {
+ this.clusters = new ClustersImpl(clientObject.getClusters(), this);
}
- return queries;
+ return clusters;
}
/**
@@ -383,6 +394,18 @@ public DataSources dataSources() {
return dataSources;
}
+ /**
+ * Gets the resource collection API of Gateways.
+ *
+ * @return Resource collection API of Gateways.
+ */
+ public Gateways gateways() {
+ if (this.gateways == null) {
+ this.gateways = new GatewaysImpl(clientObject.getGateways(), this);
+ }
+ return gateways;
+ }
+
/**
* Gets the resource collection API of IntelligencePacks.
*
@@ -432,51 +455,51 @@ public ManagementGroups managementGroups() {
}
/**
- * Gets the resource collection API of OperationStatuses.
+ * Gets the resource collection API of Operations.
*
- * @return Resource collection API of OperationStatuses.
+ * @return Resource collection API of Operations.
*/
- public OperationStatuses operationStatuses() {
- if (this.operationStatuses == null) {
- this.operationStatuses = new OperationStatusesImpl(clientObject.getOperationStatuses(), this);
+ public Operations operations() {
+ if (this.operations == null) {
+ this.operations = new OperationsImpl(clientObject.getOperations(), this);
}
- return operationStatuses;
+ return operations;
}
/**
- * Gets the resource collection API of SharedKeysOperations.
+ * Gets the resource collection API of OperationStatuses.
*
- * @return Resource collection API of SharedKeysOperations.
+ * @return Resource collection API of OperationStatuses.
*/
- public SharedKeysOperations sharedKeysOperations() {
- if (this.sharedKeysOperations == null) {
- this.sharedKeysOperations = new SharedKeysOperationsImpl(clientObject.getSharedKeysOperations(), this);
+ public OperationStatuses operationStatuses() {
+ if (this.operationStatuses == null) {
+ this.operationStatuses = new OperationStatusesImpl(clientObject.getOperationStatuses(), this);
}
- return sharedKeysOperations;
+ return operationStatuses;
}
/**
- * Gets the resource collection API of Usages.
+ * Gets the resource collection API of Queries. It manages LogAnalyticsQueryPackQuery.
*
- * @return Resource collection API of Usages.
+ * @return Resource collection API of Queries.
*/
- public Usages usages() {
- if (this.usages == null) {
- this.usages = new UsagesImpl(clientObject.getUsages(), this);
+ public Queries queries() {
+ if (this.queries == null) {
+ this.queries = new QueriesImpl(clientObject.getQueries(), this);
}
- return usages;
+ return queries;
}
/**
- * Gets the resource collection API of StorageInsightConfigs. It manages StorageInsight.
+ * Gets the resource collection API of QueryPacks. It manages LogAnalyticsQueryPack.
*
- * @return Resource collection API of StorageInsightConfigs.
+ * @return Resource collection API of QueryPacks.
*/
- public StorageInsightConfigs storageInsightConfigs() {
- if (this.storageInsightConfigs == null) {
- this.storageInsightConfigs = new StorageInsightConfigsImpl(clientObject.getStorageInsightConfigs(), this);
+ public QueryPacks queryPacks() {
+ if (this.queryPacks == null) {
+ this.queryPacks = new QueryPacksImpl(clientObject.getQueryPacks(), this);
}
- return storageInsightConfigs;
+ return queryPacks;
}
/**
@@ -492,75 +515,75 @@ public SavedSearches savedSearches() {
}
/**
- * Gets the resource collection API of AvailableServiceTiers.
+ * Gets the resource collection API of Schemas.
*
- * @return Resource collection API of AvailableServiceTiers.
+ * @return Resource collection API of Schemas.
*/
- public AvailableServiceTiers availableServiceTiers() {
- if (this.availableServiceTiers == null) {
- this.availableServiceTiers = new AvailableServiceTiersImpl(clientObject.getAvailableServiceTiers(), this);
+ public Schemas schemas() {
+ if (this.schemas == null) {
+ this.schemas = new SchemasImpl(clientObject.getSchemas(), this);
}
- return availableServiceTiers;
+ return schemas;
}
/**
- * Gets the resource collection API of Gateways.
+ * Gets the resource collection API of SharedKeysOperations.
*
- * @return Resource collection API of Gateways.
+ * @return Resource collection API of SharedKeysOperations.
*/
- public Gateways gateways() {
- if (this.gateways == null) {
- this.gateways = new GatewaysImpl(clientObject.getGateways(), this);
+ public SharedKeysOperations sharedKeysOperations() {
+ if (this.sharedKeysOperations == null) {
+ this.sharedKeysOperations = new SharedKeysOperationsImpl(clientObject.getSharedKeysOperations(), this);
}
- return gateways;
+ return sharedKeysOperations;
}
/**
- * Gets the resource collection API of Schemas.
+ * Gets the resource collection API of StorageInsightConfigs. It manages StorageInsight.
*
- * @return Resource collection API of Schemas.
+ * @return Resource collection API of StorageInsightConfigs.
*/
- public Schemas schemas() {
- if (this.schemas == null) {
- this.schemas = new SchemasImpl(clientObject.getSchemas(), this);
+ public StorageInsightConfigs storageInsightConfigs() {
+ if (this.storageInsightConfigs == null) {
+ this.storageInsightConfigs = new StorageInsightConfigsImpl(clientObject.getStorageInsightConfigs(), this);
}
- return schemas;
+ return storageInsightConfigs;
}
/**
- * Gets the resource collection API of WorkspacePurges.
+ * Gets the resource collection API of Tables. It manages Table.
*
- * @return Resource collection API of WorkspacePurges.
+ * @return Resource collection API of Tables.
*/
- public WorkspacePurges workspacePurges() {
- if (this.workspacePurges == null) {
- this.workspacePurges = new WorkspacePurgesImpl(clientObject.getWorkspacePurges(), this);
+ public Tables tables() {
+ if (this.tables == null) {
+ this.tables = new TablesImpl(clientObject.getTables(), this);
}
- return workspacePurges;
+ return tables;
}
/**
- * Gets the resource collection API of Clusters. It manages Cluster.
+ * Gets the resource collection API of Usages.
*
- * @return Resource collection API of Clusters.
+ * @return Resource collection API of Usages.
*/
- public Clusters clusters() {
- if (this.clusters == null) {
- this.clusters = new ClustersImpl(clientObject.getClusters(), this);
+ public Usages usages() {
+ if (this.usages == null) {
+ this.usages = new UsagesImpl(clientObject.getUsages(), this);
}
- return clusters;
+ return usages;
}
/**
- * Gets the resource collection API of Operations.
+ * Gets the resource collection API of WorkspacePurges.
*
- * @return Resource collection API of Operations.
+ * @return Resource collection API of WorkspacePurges.
*/
- public Operations operations() {
- if (this.operations == null) {
- this.operations = new OperationsImpl(clientObject.getOperations(), this);
+ public WorkspacePurges workspacePurges() {
+ if (this.workspacePurges == null) {
+ this.workspacePurges = new WorkspacePurgesImpl(clientObject.getWorkspacePurges(), this);
}
- return operations;
+ return workspacePurges;
}
/**
@@ -588,15 +611,15 @@ public DeletedWorkspaces deletedWorkspaces() {
}
/**
- * Gets the resource collection API of Tables. It manages Table.
+ * Gets the resource collection API of SummaryLogsOperations. It manages SummaryLogs.
*
- * @return Resource collection API of Tables.
+ * @return Resource collection API of SummaryLogsOperations.
*/
- public Tables tables() {
- if (this.tables == null) {
- this.tables = new TablesImpl(clientObject.getTables(), this);
+ public SummaryLogsOperations summaryLogsOperations() {
+ if (this.summaryLogsOperations == null) {
+ this.summaryLogsOperations = new SummaryLogsOperationsImpl(clientObject.getSummaryLogsOperations(), this);
}
- return tables;
+ return summaryLogsOperations;
}
/**
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/OperationalInsightsManagementClient.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/OperationalInsightsManagementClient.java
index 76c429b02fe3..876719a127c7 100644
--- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/OperationalInsightsManagementClient.java
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/OperationalInsightsManagementClient.java
@@ -25,6 +25,13 @@ public interface OperationalInsightsManagementClient {
*/
String getEndpoint();
+ /**
+ * Gets Api Version.
+ *
+ * @return the apiVersion value.
+ */
+ String getApiVersion();
+
/**
* Gets The HTTP pipeline to send requests through.
*
@@ -40,18 +47,18 @@ public interface OperationalInsightsManagementClient {
Duration getDefaultPollInterval();
/**
- * Gets the QueryPacksClient object to access its operations.
+ * Gets the AvailableServiceTiersClient object to access its operations.
*
- * @return the QueryPacksClient object.
+ * @return the AvailableServiceTiersClient object.
*/
- QueryPacksClient getQueryPacks();
+ AvailableServiceTiersClient getAvailableServiceTiers();
/**
- * Gets the QueriesClient object to access its operations.
+ * Gets the ClustersClient object to access its operations.
*
- * @return the QueriesClient object.
+ * @return the ClustersClient object.
*/
- QueriesClient getQueries();
+ ClustersClient getClusters();
/**
* Gets the DataExportsClient object to access its operations.
@@ -67,6 +74,13 @@ public interface OperationalInsightsManagementClient {
*/
DataSourcesClient getDataSources();
+ /**
+ * Gets the GatewaysClient object to access its operations.
+ *
+ * @return the GatewaysClient object.
+ */
+ GatewaysClient getGateways();
+
/**
* Gets the IntelligencePacksClient object to access its operations.
*
@@ -96,32 +110,32 @@ public interface OperationalInsightsManagementClient {
ManagementGroupsClient getManagementGroups();
/**
- * Gets the OperationStatusesClient object to access its operations.
+ * Gets the OperationsClient object to access its operations.
*
- * @return the OperationStatusesClient object.
+ * @return the OperationsClient object.
*/
- OperationStatusesClient getOperationStatuses();
+ OperationsClient getOperations();
/**
- * Gets the SharedKeysOperationsClient object to access its operations.
+ * Gets the OperationStatusesClient object to access its operations.
*
- * @return the SharedKeysOperationsClient object.
+ * @return the OperationStatusesClient object.
*/
- SharedKeysOperationsClient getSharedKeysOperations();
+ OperationStatusesClient getOperationStatuses();
/**
- * Gets the UsagesClient object to access its operations.
+ * Gets the QueriesClient object to access its operations.
*
- * @return the UsagesClient object.
+ * @return the QueriesClient object.
*/
- UsagesClient getUsages();
+ QueriesClient getQueries();
/**
- * Gets the StorageInsightConfigsClient object to access its operations.
+ * Gets the QueryPacksClient object to access its operations.
*
- * @return the StorageInsightConfigsClient object.
+ * @return the QueryPacksClient object.
*/
- StorageInsightConfigsClient getStorageInsightConfigs();
+ QueryPacksClient getQueryPacks();
/**
* Gets the SavedSearchesClient object to access its operations.
@@ -131,46 +145,46 @@ public interface OperationalInsightsManagementClient {
SavedSearchesClient getSavedSearches();
/**
- * Gets the AvailableServiceTiersClient object to access its operations.
+ * Gets the SchemasClient object to access its operations.
*
- * @return the AvailableServiceTiersClient object.
+ * @return the SchemasClient object.
*/
- AvailableServiceTiersClient getAvailableServiceTiers();
+ SchemasClient getSchemas();
/**
- * Gets the GatewaysClient object to access its operations.
+ * Gets the SharedKeysOperationsClient object to access its operations.
*
- * @return the GatewaysClient object.
+ * @return the SharedKeysOperationsClient object.
*/
- GatewaysClient getGateways();
+ SharedKeysOperationsClient getSharedKeysOperations();
/**
- * Gets the SchemasClient object to access its operations.
+ * Gets the StorageInsightConfigsClient object to access its operations.
*
- * @return the SchemasClient object.
+ * @return the StorageInsightConfigsClient object.
*/
- SchemasClient getSchemas();
+ StorageInsightConfigsClient getStorageInsightConfigs();
/**
- * Gets the WorkspacePurgesClient object to access its operations.
+ * Gets the TablesClient object to access its operations.
*
- * @return the WorkspacePurgesClient object.
+ * @return the TablesClient object.
*/
- WorkspacePurgesClient getWorkspacePurges();
+ TablesClient getTables();
/**
- * Gets the ClustersClient object to access its operations.
+ * Gets the UsagesClient object to access its operations.
*
- * @return the ClustersClient object.
+ * @return the UsagesClient object.
*/
- ClustersClient getClusters();
+ UsagesClient getUsages();
/**
- * Gets the OperationsClient object to access its operations.
+ * Gets the WorkspacePurgesClient object to access its operations.
*
- * @return the OperationsClient object.
+ * @return the WorkspacePurgesClient object.
*/
- OperationsClient getOperations();
+ WorkspacePurgesClient getWorkspacePurges();
/**
* Gets the WorkspacesClient object to access its operations.
@@ -187,9 +201,9 @@ public interface OperationalInsightsManagementClient {
DeletedWorkspacesClient getDeletedWorkspaces();
/**
- * Gets the TablesClient object to access its operations.
+ * Gets the SummaryLogsOperationsClient object to access its operations.
*
- * @return the TablesClient object.
+ * @return the SummaryLogsOperationsClient object.
*/
- TablesClient getTables();
+ SummaryLogsOperationsClient getSummaryLogsOperations();
}
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/SummaryLogsOperationsClient.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/SummaryLogsOperationsClient.java
new file mode 100644
index 000000000000..e00c3ef2b116
--- /dev/null
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/SummaryLogsOperationsClient.java
@@ -0,0 +1,354 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.loganalytics.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.loganalytics.fluent.models.SummaryLogsInner;
+import com.azure.resourcemanager.loganalytics.models.SummaryLogsRetryBin;
+
+/**
+ * An instance of this class provides access to all the operations defined in SummaryLogsOperationsClient.
+ */
+public interface SummaryLogsOperationsClient {
+ /**
+ * Gets all summary rules for the specified Log Analytics workspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return all summary rules for the specified Log Analytics workspace as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByWorkspace(String resourceGroupName, String workspaceName);
+
+ /**
+ * Gets all summary rules for the specified Log Analytics workspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return all summary rules for the specified Log Analytics workspace as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByWorkspace(String resourceGroupName, String workspaceName, Context context);
+
+ /**
+ * Creates or updates Log Analytics workspace Summary rules.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @param summaryLogsName The name of the summary logs. Must not contain '/'.
+ * @param parameters The parameters required to update summary rules properties.
+ * @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 workspace data summary rules definition.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, SummaryLogsInner> beginCreateOrUpdate(String resourceGroupName,
+ String workspaceName, String summaryLogsName, SummaryLogsInner parameters);
+
+ /**
+ * Creates or updates Log Analytics workspace Summary rules.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @param summaryLogsName The name of the summary logs. Must not contain '/'.
+ * @param parameters The parameters required to update summary rules 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 the {@link SyncPoller} for polling of workspace data summary rules definition.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, SummaryLogsInner> beginCreateOrUpdate(String resourceGroupName,
+ String workspaceName, String summaryLogsName, SummaryLogsInner parameters, Context context);
+
+ /**
+ * Creates or updates Log Analytics workspace Summary rules.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @param summaryLogsName The name of the summary logs. Must not contain '/'.
+ * @param parameters The parameters required to update summary rules properties.
+ * @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 workspace data summary rules definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SummaryLogsInner createOrUpdate(String resourceGroupName, String workspaceName, String summaryLogsName,
+ SummaryLogsInner parameters);
+
+ /**
+ * Creates or updates Log Analytics workspace Summary rules.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @param summaryLogsName The name of the summary logs. Must not contain '/'.
+ * @param parameters The parameters required to update summary rules 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 workspace data summary rules definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SummaryLogsInner createOrUpdate(String resourceGroupName, String workspaceName, String summaryLogsName,
+ SummaryLogsInner parameters, Context context);
+
+ /**
+ * Gets Log Analytics workspace Summary rules.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @param summaryLogsName The name of the summary logs. Must not contain '/'.
+ * @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 log Analytics workspace Summary rules along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String resourceGroupName, String workspaceName, String summaryLogsName,
+ Context context);
+
+ /**
+ * Gets Log Analytics workspace Summary rules.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @param summaryLogsName The name of the summary logs. Must not contain '/'.
+ * @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 log Analytics workspace Summary rules.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SummaryLogsInner get(String resourceGroupName, String workspaceName, String summaryLogsName);
+
+ /**
+ * Deletes Log Analytics workspace Summary rules.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @param summaryLogsName The name of the summary logs. Must not contain '/'.
+ * @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 workspaceName,
+ String summaryLogsName);
+
+ /**
+ * Deletes Log Analytics workspace Summary rules.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @param summaryLogsName The name of the summary logs. Must not contain '/'.
+ * @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 workspaceName,
+ String summaryLogsName, Context context);
+
+ /**
+ * Deletes Log Analytics workspace Summary rules.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @param summaryLogsName The name of the summary logs. Must not contain '/'.
+ * @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 workspaceName, String summaryLogsName);
+
+ /**
+ * Deletes Log Analytics workspace Summary rules.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @param summaryLogsName The name of the summary logs. Must not contain '/'.
+ * @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 workspaceName, String summaryLogsName, Context context);
+
+ /**
+ * Starts an inactive Summary rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @param summaryLogsName The name of the summary logs. Must not contain '/'.
+ * @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> beginStart(String resourceGroupName, String workspaceName,
+ String summaryLogsName);
+
+ /**
+ * Starts an inactive Summary rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @param summaryLogsName The name of the summary logs. Must not contain '/'.
+ * @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> beginStart(String resourceGroupName, String workspaceName,
+ String summaryLogsName, Context context);
+
+ /**
+ * Starts an inactive Summary rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @param summaryLogsName The name of the summary logs. Must not contain '/'.
+ * @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 start(String resourceGroupName, String workspaceName, String summaryLogsName);
+
+ /**
+ * Starts an inactive Summary rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @param summaryLogsName The name of the summary logs. Must not contain '/'.
+ * @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 start(String resourceGroupName, String workspaceName, String summaryLogsName, Context context);
+
+ /**
+ * Stops an active Summary rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @param summaryLogsName The name of the summary logs. Must not contain '/'.
+ * @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 Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response stopWithResponse(String resourceGroupName, String workspaceName, String summaryLogsName,
+ Context context);
+
+ /**
+ * Stops an active Summary rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @param summaryLogsName The name of the summary logs. Must not contain '/'.
+ * @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 stop(String resourceGroupName, String workspaceName, String summaryLogsName);
+
+ /**
+ * Retries a failed Summary rule bin.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @param summaryLogsName The name of the summary logs. Must not contain '/'.
+ * @param parameters The parameters required to retry a Summary rule bin.
+ * @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> beginRetryBin(String resourceGroupName, String workspaceName,
+ String summaryLogsName, SummaryLogsRetryBin parameters);
+
+ /**
+ * Retries a failed Summary rule bin.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @param summaryLogsName The name of the summary logs. Must not contain '/'.
+ * @param parameters The parameters required to retry a Summary rule bin.
+ * @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> beginRetryBin(String resourceGroupName, String workspaceName,
+ String summaryLogsName, SummaryLogsRetryBin parameters, Context context);
+
+ /**
+ * Retries a failed Summary rule bin.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @param summaryLogsName The name of the summary logs. Must not contain '/'.
+ * @param parameters The parameters required to retry a Summary rule bin.
+ * @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 retryBin(String resourceGroupName, String workspaceName, String summaryLogsName,
+ SummaryLogsRetryBin parameters);
+
+ /**
+ * Retries a failed Summary rule bin.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @param summaryLogsName The name of the summary logs. Must not contain '/'.
+ * @param parameters The parameters required to retry a Summary rule bin.
+ * @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 retryBin(String resourceGroupName, String workspaceName, String summaryLogsName,
+ SummaryLogsRetryBin parameters, Context context);
+}
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/WorkspacesClient.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/WorkspacesClient.java
index 9762af2104eb..03ec9dd954ce 100644
--- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/WorkspacesClient.java
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/WorkspacesClient.java
@@ -11,6 +11,7 @@
import com.azure.core.management.polling.PollResult;
import com.azure.core.util.Context;
import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.loganalytics.fluent.models.NetworkSecurityPerimeterConfigurationInner;
import com.azure.resourcemanager.loganalytics.fluent.models.WorkspaceInner;
import com.azure.resourcemanager.loganalytics.models.WorkspacePatch;
@@ -248,4 +249,259 @@ Response updateWithResponse(String resourceGroupName, String wor
*/
@ServiceMethod(returns = ReturnType.SINGLE)
WorkspaceInner update(String resourceGroupName, String workspaceName, WorkspacePatch parameters);
+
+ /**
+ * Activates failover for the specified workspace.
+ *
+ * The specified replication location must match the location of the enabled replication for this workspace. The
+ * failover operation is asynchronous and can take up to 30 minutes to complete. The status of the operation can be
+ * checked using the operationId returned in the response.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param location The name of the Azure region.
+ * @param workspaceName The name of the workspace.
+ * @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> beginFailover(String resourceGroupName, String location, String workspaceName);
+
+ /**
+ * Activates failover for the specified workspace.
+ *
+ * The specified replication location must match the location of the enabled replication for this workspace. The
+ * failover operation is asynchronous and can take up to 30 minutes to complete. The status of the operation can be
+ * checked using the operationId returned in the response.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param location The name of the Azure region.
+ * @param workspaceName The name of the workspace.
+ * @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> beginFailover(String resourceGroupName, String location, String workspaceName,
+ Context context);
+
+ /**
+ * Activates failover for the specified workspace.
+ *
+ * The specified replication location must match the location of the enabled replication for this workspace. The
+ * failover operation is asynchronous and can take up to 30 minutes to complete. The status of the operation can be
+ * checked using the operationId returned in the response.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param location The name of the Azure region.
+ * @param workspaceName The name of the workspace.
+ * @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 failover(String resourceGroupName, String location, String workspaceName);
+
+ /**
+ * Activates failover for the specified workspace.
+ *
+ * The specified replication location must match the location of the enabled replication for this workspace. The
+ * failover operation is asynchronous and can take up to 30 minutes to complete. The status of the operation can be
+ * checked using the operationId returned in the response.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param location The name of the Azure region.
+ * @param workspaceName The name of the workspace.
+ * @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 failover(String resourceGroupName, String location, String workspaceName, Context context);
+
+ /**
+ * Deactivates failover for the specified workspace.
+ *
+ * The failback operation is asynchronous and can take up to 30 minutes to complete. The status of the operation can
+ * be checked using the operationId returned in the response.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @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> beginFailback(String resourceGroupName, String workspaceName);
+
+ /**
+ * Deactivates failover for the specified workspace.
+ *
+ * The failback operation is asynchronous and can take up to 30 minutes to complete. The status of the operation can
+ * be checked using the operationId returned in the response.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @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> beginFailback(String resourceGroupName, String workspaceName, Context context);
+
+ /**
+ * Deactivates failover for the specified workspace.
+ *
+ * The failback operation is asynchronous and can take up to 30 minutes to complete. The status of the operation can
+ * be checked using the operationId returned in the response.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @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 failback(String resourceGroupName, String workspaceName);
+
+ /**
+ * Deactivates failover for the specified workspace.
+ *
+ * The failback operation is asynchronous and can take up to 30 minutes to complete. The status of the operation can
+ * be checked using the operationId returned in the response.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @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 failback(String resourceGroupName, String workspaceName, Context context);
+
+ /**
+ * Gets a list of NSP configurations for specified workspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @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 list of NSP configurations for specified workspace as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listNsp(String resourceGroupName, String workspaceName);
+
+ /**
+ * Gets a list of NSP configurations for specified workspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @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 list of NSP configurations for specified workspace as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listNsp(String resourceGroupName, String workspaceName,
+ Context context);
+
+ /**
+ * Gets a network security perimeter configuration.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @param networkSecurityPerimeterConfigurationName The name for a network security perimeter configuration.
+ * @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 network security perimeter configuration along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getNspWithResponse(String resourceGroupName,
+ String workspaceName, String networkSecurityPerimeterConfigurationName, Context context);
+
+ /**
+ * Gets a network security perimeter configuration.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @param networkSecurityPerimeterConfigurationName The name for a network security perimeter configuration.
+ * @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 network security perimeter configuration.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ NetworkSecurityPerimeterConfigurationInner getNsp(String resourceGroupName, String workspaceName,
+ String networkSecurityPerimeterConfigurationName);
+
+ /**
+ * Reconcile network security perimeter configuration for Workspace resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @param networkSecurityPerimeterConfigurationName The name for a network security perimeter configuration.
+ * @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> beginReconcileNsp(String resourceGroupName, String workspaceName,
+ String networkSecurityPerimeterConfigurationName);
+
+ /**
+ * Reconcile network security perimeter configuration for Workspace resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @param networkSecurityPerimeterConfigurationName The name for a network security perimeter configuration.
+ * @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> beginReconcileNsp(String resourceGroupName, String workspaceName,
+ String networkSecurityPerimeterConfigurationName, Context context);
+
+ /**
+ * Reconcile network security perimeter configuration for Workspace resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @param networkSecurityPerimeterConfigurationName The name for a network security perimeter configuration.
+ * @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 reconcileNsp(String resourceGroupName, String workspaceName, String networkSecurityPerimeterConfigurationName);
+
+ /**
+ * Reconcile network security perimeter configuration for Workspace resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @param networkSecurityPerimeterConfigurationName The name for a network security perimeter configuration.
+ * @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 reconcileNsp(String resourceGroupName, String workspaceName, String networkSecurityPerimeterConfigurationName,
+ Context context);
}
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/ClusterInner.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/ClusterInner.java
index dca539d1283f..695778d797e5 100644
--- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/ClusterInner.java
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/ClusterInner.java
@@ -13,10 +13,12 @@
import com.azure.resourcemanager.loganalytics.models.BillingType;
import com.azure.resourcemanager.loganalytics.models.CapacityReservationProperties;
import com.azure.resourcemanager.loganalytics.models.ClusterEntityStatus;
+import com.azure.resourcemanager.loganalytics.models.ClusterReplicationProperties;
import com.azure.resourcemanager.loganalytics.models.ClusterSku;
import com.azure.resourcemanager.loganalytics.models.KeyVaultProperties;
import com.azure.resourcemanager.loganalytics.models.ManagedServiceIdentity;
import java.io.IOException;
+import java.time.OffsetDateTime;
import java.util.List;
import java.util.Map;
@@ -279,7 +281,7 @@ public ClusterInner withKeyVaultProperties(KeyVaultProperties keyVaultProperties
*
* @return the lastModifiedDate value.
*/
- public String lastModifiedDate() {
+ public OffsetDateTime lastModifiedDate() {
return this.innerProperties() == null ? null : this.innerProperties().lastModifiedDate();
}
@@ -288,7 +290,7 @@ public String lastModifiedDate() {
*
* @return the createdDate value.
*/
- public String createdDate() {
+ public OffsetDateTime createdDate() {
return this.innerProperties() == null ? null : this.innerProperties().createdDate();
}
@@ -338,6 +340,29 @@ public ClusterInner withCapacityReservationProperties(CapacityReservationPropert
return this;
}
+ /**
+ * Get the replication property: Cluster's replication properties.
+ *
+ * @return the replication value.
+ */
+ public ClusterReplicationProperties replication() {
+ return this.innerProperties() == null ? null : this.innerProperties().replication();
+ }
+
+ /**
+ * Set the replication property: Cluster's replication properties.
+ *
+ * @param replication the replication value to set.
+ * @return the ClusterInner object itself.
+ */
+ public ClusterInner withReplication(ClusterReplicationProperties replication) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ClusterProperties();
+ }
+ this.innerProperties().withReplication(replication);
+ return this;
+ }
+
/**
* Validates the instance.
*
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/ClusterProperties.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/ClusterProperties.java
index 4e19d868af64..4e83811ad839 100644
--- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/ClusterProperties.java
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/ClusterProperties.java
@@ -5,6 +5,7 @@
package com.azure.resourcemanager.loganalytics.fluent.models;
import com.azure.core.annotation.Fluent;
+import com.azure.core.util.CoreUtils;
import com.azure.json.JsonReader;
import com.azure.json.JsonSerializable;
import com.azure.json.JsonToken;
@@ -13,8 +14,10 @@
import com.azure.resourcemanager.loganalytics.models.BillingType;
import com.azure.resourcemanager.loganalytics.models.CapacityReservationProperties;
import com.azure.resourcemanager.loganalytics.models.ClusterEntityStatus;
+import com.azure.resourcemanager.loganalytics.models.ClusterReplicationProperties;
import com.azure.resourcemanager.loganalytics.models.KeyVaultProperties;
import java.io.IOException;
+import java.time.OffsetDateTime;
import java.util.List;
/**
@@ -58,12 +61,12 @@ public final class ClusterProperties implements JsonSerializable writer.writeJson(element));
jsonWriter.writeJsonField("capacityReservationProperties", this.capacityReservationProperties);
+ jsonWriter.writeJsonField("replication", this.replication);
return jsonWriter.writeEndObject();
}
@@ -308,9 +340,11 @@ public static ClusterProperties fromJson(JsonReader jsonReader) throws IOExcepti
} else if ("keyVaultProperties".equals(fieldName)) {
deserializedClusterProperties.keyVaultProperties = KeyVaultProperties.fromJson(reader);
} else if ("lastModifiedDate".equals(fieldName)) {
- deserializedClusterProperties.lastModifiedDate = reader.getString();
+ deserializedClusterProperties.lastModifiedDate = reader
+ .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
} else if ("createdDate".equals(fieldName)) {
- deserializedClusterProperties.createdDate = reader.getString();
+ deserializedClusterProperties.createdDate = reader
+ .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
} else if ("associatedWorkspaces".equals(fieldName)) {
List associatedWorkspaces
= reader.readArray(reader1 -> AssociatedWorkspace.fromJson(reader1));
@@ -318,6 +352,8 @@ public static ClusterProperties fromJson(JsonReader jsonReader) throws IOExcepti
} else if ("capacityReservationProperties".equals(fieldName)) {
deserializedClusterProperties.capacityReservationProperties
= CapacityReservationProperties.fromJson(reader);
+ } else if ("replication".equals(fieldName)) {
+ deserializedClusterProperties.replication = ClusterReplicationProperties.fromJson(reader);
} else {
reader.skipChildren();
}
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/LogAnalyticsQueryPackInner.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/LogAnalyticsQueryPackInner.java
index e5fc73ff7755..855631fc4208 100644
--- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/LogAnalyticsQueryPackInner.java
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/LogAnalyticsQueryPackInner.java
@@ -5,11 +5,12 @@
package com.azure.resourcemanager.loganalytics.fluent.models;
import com.azure.core.annotation.Fluent;
+import com.azure.core.management.Resource;
+import com.azure.core.management.SystemData;
import com.azure.core.util.logging.ClientLogger;
import com.azure.json.JsonReader;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
-import com.azure.resourcemanager.loganalytics.models.QueryPacksResource;
import java.io.IOException;
import java.time.OffsetDateTime;
import java.util.Map;
@@ -18,12 +19,17 @@
* An Log Analytics QueryPack definition.
*/
@Fluent
-public final class LogAnalyticsQueryPackInner extends QueryPacksResource {
+public final class LogAnalyticsQueryPackInner extends Resource {
/*
* Properties that define a Log Analytics QueryPack resource.
*/
private LogAnalyticsQueryPackProperties innerProperties = new LogAnalyticsQueryPackProperties();
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ private SystemData systemData;
+
/*
* The type of the resource.
*/
@@ -54,6 +60,15 @@ private LogAnalyticsQueryPackProperties innerProperties() {
return this.innerProperties;
}
+ /**
+ * 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.
*
@@ -145,7 +160,6 @@ public String provisioningState() {
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
- @Override
public void validate() {
if (innerProperties() == null) {
throw LOGGER.atError()
@@ -200,6 +214,8 @@ public static LogAnalyticsQueryPackInner fromJson(JsonReader jsonReader) throws
} else if ("properties".equals(fieldName)) {
deserializedLogAnalyticsQueryPackInner.innerProperties
= LogAnalyticsQueryPackProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedLogAnalyticsQueryPackInner.systemData = SystemData.fromJson(reader);
} else {
reader.skipChildren();
}
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/LogAnalyticsQueryPackQueryInner.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/LogAnalyticsQueryPackQueryInner.java
index 2d3af3ceef01..baf421ce5d1b 100644
--- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/LogAnalyticsQueryPackQueryInner.java
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/LogAnalyticsQueryPackQueryInner.java
@@ -5,11 +5,11 @@
package com.azure.resourcemanager.loganalytics.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.loganalytics.models.AzureResourceProperties;
import com.azure.resourcemanager.loganalytics.models.LogAnalyticsQueryPackQueryPropertiesRelated;
import java.io.IOException;
import java.time.OffsetDateTime;
@@ -20,29 +20,29 @@
* A Log Analytics QueryPack-Query definition.
*/
@Fluent
-public final class LogAnalyticsQueryPackQueryInner extends AzureResourceProperties {
+public final class LogAnalyticsQueryPackQueryInner extends ProxyResource {
/*
* Properties that define an Log Analytics QueryPack-Query resource.
*/
private LogAnalyticsQueryPackQueryProperties innerProperties;
/*
- * Read only system data
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
*/
private SystemData systemData;
/*
- * Azure resource type
+ * The type of the resource.
*/
private String type;
/*
- * Azure resource name
+ * The name of the resource.
*/
private String name;
/*
- * Azure resource Id
+ * Fully qualified resource Id for the resource.
*/
private String id;
@@ -62,17 +62,16 @@ private LogAnalyticsQueryPackQueryProperties innerProperties() {
}
/**
- * Get the systemData property: Read only system data.
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
*
* @return the systemData value.
*/
- @Override
public SystemData systemData() {
return this.systemData;
}
/**
- * Get the type property: Azure resource type.
+ * Get the type property: The type of the resource.
*
* @return the type value.
*/
@@ -82,7 +81,7 @@ public String type() {
}
/**
- * Get the name property: Azure resource name.
+ * Get the name property: The name of the resource.
*
* @return the name value.
*/
@@ -92,7 +91,7 @@ public String name() {
}
/**
- * Get the id property: Azure resource Id.
+ * Get the id property: Fully qualified resource Id for the resource.
*
* @return the id value.
*/
@@ -280,7 +279,6 @@ public LogAnalyticsQueryPackQueryInner withProperties(Object properties) {
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
- @Override
public void validate() {
if (innerProperties() != null) {
innerProperties().validate();
@@ -303,6 +301,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
* @param jsonReader The JsonReader being read.
* @return An instance of LogAnalyticsQueryPackQueryInner 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 LogAnalyticsQueryPackQueryInner.
*/
public static LogAnalyticsQueryPackQueryInner fromJson(JsonReader jsonReader) throws IOException {
@@ -319,11 +318,11 @@ public static LogAnalyticsQueryPackQueryInner fromJson(JsonReader jsonReader) th
deserializedLogAnalyticsQueryPackQueryInner.name = reader.getString();
} else if ("type".equals(fieldName)) {
deserializedLogAnalyticsQueryPackQueryInner.type = reader.getString();
- } else if ("systemData".equals(fieldName)) {
- deserializedLogAnalyticsQueryPackQueryInner.systemData = SystemData.fromJson(reader);
} else if ("properties".equals(fieldName)) {
deserializedLogAnalyticsQueryPackQueryInner.innerProperties
= LogAnalyticsQueryPackQueryProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedLogAnalyticsQueryPackQueryInner.systemData = SystemData.fromJson(reader);
} else {
reader.skipChildren();
}
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/LogAnalyticsQueryPackQueryProperties.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/LogAnalyticsQueryPackQueryProperties.java
index ef7f75297643..81de1a33625d 100644
--- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/LogAnalyticsQueryPackQueryProperties.java
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/LogAnalyticsQueryPackQueryProperties.java
@@ -270,7 +270,9 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeJsonField("related", this.related);
jsonWriter.writeMapField("tags", this.tags,
(writer, element) -> writer.writeArray(element, (writer1, element1) -> writer1.writeString(element1)));
- jsonWriter.writeUntypedField("properties", this.properties);
+ if (this.properties != null) {
+ jsonWriter.writeUntypedField("properties", this.properties);
+ }
return jsonWriter.writeEndObject();
}
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/NetworkSecurityPerimeterConfigurationInner.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/NetworkSecurityPerimeterConfigurationInner.java
new file mode 100644
index 000000000000..737dec497890
--- /dev/null
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/NetworkSecurityPerimeterConfigurationInner.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.loganalytics.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.loganalytics.models.NetworkSecurityPerimeterConfigurationProperties;
+import java.io.IOException;
+
+/**
+ * Network security perimeter (NSP) configuration resource.
+ */
+@Fluent
+public final class NetworkSecurityPerimeterConfigurationInner extends ProxyResource {
+ /*
+ * Network security configuration properties.
+ */
+ private NetworkSecurityPerimeterConfigurationProperties 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 NetworkSecurityPerimeterConfigurationInner class.
+ */
+ public NetworkSecurityPerimeterConfigurationInner() {
+ }
+
+ /**
+ * Get the properties property: Network security configuration properties.
+ *
+ * @return the properties value.
+ */
+ public NetworkSecurityPerimeterConfigurationProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: Network security configuration properties.
+ *
+ * @param properties the properties value to set.
+ * @return the NetworkSecurityPerimeterConfigurationInner object itself.
+ */
+ public NetworkSecurityPerimeterConfigurationInner
+ withProperties(NetworkSecurityPerimeterConfigurationProperties 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 NetworkSecurityPerimeterConfigurationInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of NetworkSecurityPerimeterConfigurationInner 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 NetworkSecurityPerimeterConfigurationInner.
+ */
+ public static NetworkSecurityPerimeterConfigurationInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ NetworkSecurityPerimeterConfigurationInner deserializedNetworkSecurityPerimeterConfigurationInner
+ = new NetworkSecurityPerimeterConfigurationInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedNetworkSecurityPerimeterConfigurationInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedNetworkSecurityPerimeterConfigurationInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedNetworkSecurityPerimeterConfigurationInner.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedNetworkSecurityPerimeterConfigurationInner.properties
+ = NetworkSecurityPerimeterConfigurationProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedNetworkSecurityPerimeterConfigurationInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedNetworkSecurityPerimeterConfigurationInner;
+ });
+ }
+}
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/SummaryLogsInner.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/SummaryLogsInner.java
new file mode 100644
index 000000000000..dac9c5b8294c
--- /dev/null
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/SummaryLogsInner.java
@@ -0,0 +1,279 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.loganalytics.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.loganalytics.models.ProvisioningStateEnum;
+import com.azure.resourcemanager.loganalytics.models.RuleDefinition;
+import com.azure.resourcemanager.loganalytics.models.RuleTypeEnum;
+import com.azure.resourcemanager.loganalytics.models.StatusCodeEnum;
+import java.io.IOException;
+
+/**
+ * Workspace data summary rules definition.
+ */
+@Fluent
+public final class SummaryLogsInner extends ProxyResource {
+ /*
+ * Summary rule properties.
+ */
+ private SummaryLogsProperties innerProperties;
+
+ /*
+ * 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 SummaryLogsInner class.
+ */
+ public SummaryLogsInner() {
+ }
+
+ /**
+ * Get the innerProperties property: Summary rule properties.
+ *
+ * @return the innerProperties value.
+ */
+ private SummaryLogsProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * 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;
+ }
+
+ /**
+ * Get the ruleType property: SummaryRules rule type: User.
+ *
+ * @return the ruleType value.
+ */
+ public RuleTypeEnum ruleType() {
+ return this.innerProperties() == null ? null : this.innerProperties().ruleType();
+ }
+
+ /**
+ * Set the ruleType property: SummaryRules rule type: User.
+ *
+ * @param ruleType the ruleType value to set.
+ * @return the SummaryLogsInner object itself.
+ */
+ public SummaryLogsInner withRuleType(RuleTypeEnum ruleType) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new SummaryLogsProperties();
+ }
+ this.innerProperties().withRuleType(ruleType);
+ return this;
+ }
+
+ /**
+ * Get the displayName property: The display name of the Summary rule.
+ *
+ * @return the displayName value.
+ */
+ public String displayName() {
+ return this.innerProperties() == null ? null : this.innerProperties().displayName();
+ }
+
+ /**
+ * Set the displayName property: The display name of the Summary rule.
+ *
+ * @param displayName the displayName value to set.
+ * @return the SummaryLogsInner object itself.
+ */
+ public SummaryLogsInner withDisplayName(String displayName) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new SummaryLogsProperties();
+ }
+ this.innerProperties().withDisplayName(displayName);
+ return this;
+ }
+
+ /**
+ * Get the description property: The description of the Summary rule.
+ *
+ * @return the description value.
+ */
+ public String description() {
+ return this.innerProperties() == null ? null : this.innerProperties().description();
+ }
+
+ /**
+ * Set the description property: The description of the Summary rule.
+ *
+ * @param description the description value to set.
+ * @return the SummaryLogsInner object itself.
+ */
+ public SummaryLogsInner withDescription(String description) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new SummaryLogsProperties();
+ }
+ this.innerProperties().withDescription(description);
+ return this;
+ }
+
+ /**
+ * Get the isActive property: Indicates if Summary rule is active. If not, Summary rule execution stops.
+ *
+ * @return the isActive value.
+ */
+ public Boolean isActive() {
+ return this.innerProperties() == null ? null : this.innerProperties().isActive();
+ }
+
+ /**
+ * Get the statusCode property: Indicates the reason for rule deactivation.
+ *
+ * @return the statusCode value.
+ */
+ public StatusCodeEnum statusCode() {
+ return this.innerProperties() == null ? null : this.innerProperties().statusCode();
+ }
+
+ /**
+ * Get the provisioningState property: Summary rule is in provisioning state. If set to 'updating' or 'deleting',
+ * indicates a resource lock due to an ongoing operation, preventing any update to the Summary rule until the
+ * operation is complete.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningStateEnum provisioningState() {
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
+ }
+
+ /**
+ * Get the ruleDefinition property: Rule definition parameters.
+ *
+ * @return the ruleDefinition value.
+ */
+ public RuleDefinition ruleDefinition() {
+ return this.innerProperties() == null ? null : this.innerProperties().ruleDefinition();
+ }
+
+ /**
+ * Set the ruleDefinition property: Rule definition parameters.
+ *
+ * @param ruleDefinition the ruleDefinition value to set.
+ * @return the SummaryLogsInner object itself.
+ */
+ public SummaryLogsInner withRuleDefinition(RuleDefinition ruleDefinition) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new SummaryLogsProperties();
+ }
+ this.innerProperties().withRuleDefinition(ruleDefinition);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.innerProperties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of SummaryLogsInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of SummaryLogsInner 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 SummaryLogsInner.
+ */
+ public static SummaryLogsInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ SummaryLogsInner deserializedSummaryLogsInner = new SummaryLogsInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedSummaryLogsInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedSummaryLogsInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedSummaryLogsInner.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedSummaryLogsInner.innerProperties = SummaryLogsProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedSummaryLogsInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedSummaryLogsInner;
+ });
+ }
+}
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/SummaryLogsProperties.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/SummaryLogsProperties.java
new file mode 100644
index 000000000000..0f151e746cdb
--- /dev/null
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/SummaryLogsProperties.java
@@ -0,0 +1,236 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.loganalytics.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.loganalytics.models.ProvisioningStateEnum;
+import com.azure.resourcemanager.loganalytics.models.RuleDefinition;
+import com.azure.resourcemanager.loganalytics.models.RuleTypeEnum;
+import com.azure.resourcemanager.loganalytics.models.StatusCodeEnum;
+import java.io.IOException;
+
+/**
+ * Summary rule properties.
+ */
+@Fluent
+public final class SummaryLogsProperties implements JsonSerializable {
+ /*
+ * SummaryRules rule type: User.
+ */
+ private RuleTypeEnum ruleType;
+
+ /*
+ * The display name of the Summary rule.
+ */
+ private String displayName;
+
+ /*
+ * The description of the Summary rule.
+ */
+ private String description;
+
+ /*
+ * Indicates if Summary rule is active. If not, Summary rule execution stops.
+ */
+ private Boolean isActive;
+
+ /*
+ * Indicates the reason for rule deactivation.
+ */
+ private StatusCodeEnum statusCode;
+
+ /*
+ * Summary rule is in provisioning state. If set to 'updating' or 'deleting', indicates a resource lock due to an
+ * ongoing operation, preventing any update to the Summary rule until the operation is complete.
+ */
+ private ProvisioningStateEnum provisioningState;
+
+ /*
+ * Rule definition parameters.
+ */
+ private RuleDefinition ruleDefinition;
+
+ /**
+ * Creates an instance of SummaryLogsProperties class.
+ */
+ public SummaryLogsProperties() {
+ }
+
+ /**
+ * Get the ruleType property: SummaryRules rule type: User.
+ *
+ * @return the ruleType value.
+ */
+ public RuleTypeEnum ruleType() {
+ return this.ruleType;
+ }
+
+ /**
+ * Set the ruleType property: SummaryRules rule type: User.
+ *
+ * @param ruleType the ruleType value to set.
+ * @return the SummaryLogsProperties object itself.
+ */
+ public SummaryLogsProperties withRuleType(RuleTypeEnum ruleType) {
+ this.ruleType = ruleType;
+ return this;
+ }
+
+ /**
+ * Get the displayName property: The display name of the Summary rule.
+ *
+ * @return the displayName value.
+ */
+ public String displayName() {
+ return this.displayName;
+ }
+
+ /**
+ * Set the displayName property: The display name of the Summary rule.
+ *
+ * @param displayName the displayName value to set.
+ * @return the SummaryLogsProperties object itself.
+ */
+ public SummaryLogsProperties withDisplayName(String displayName) {
+ this.displayName = displayName;
+ return this;
+ }
+
+ /**
+ * Get the description property: The description of the Summary rule.
+ *
+ * @return the description value.
+ */
+ public String description() {
+ return this.description;
+ }
+
+ /**
+ * Set the description property: The description of the Summary rule.
+ *
+ * @param description the description value to set.
+ * @return the SummaryLogsProperties object itself.
+ */
+ public SummaryLogsProperties withDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * Get the isActive property: Indicates if Summary rule is active. If not, Summary rule execution stops.
+ *
+ * @return the isActive value.
+ */
+ public Boolean isActive() {
+ return this.isActive;
+ }
+
+ /**
+ * Get the statusCode property: Indicates the reason for rule deactivation.
+ *
+ * @return the statusCode value.
+ */
+ public StatusCodeEnum statusCode() {
+ return this.statusCode;
+ }
+
+ /**
+ * Get the provisioningState property: Summary rule is in provisioning state. If set to 'updating' or 'deleting',
+ * indicates a resource lock due to an ongoing operation, preventing any update to the Summary rule until the
+ * operation is complete.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningStateEnum provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Get the ruleDefinition property: Rule definition parameters.
+ *
+ * @return the ruleDefinition value.
+ */
+ public RuleDefinition ruleDefinition() {
+ return this.ruleDefinition;
+ }
+
+ /**
+ * Set the ruleDefinition property: Rule definition parameters.
+ *
+ * @param ruleDefinition the ruleDefinition value to set.
+ * @return the SummaryLogsProperties object itself.
+ */
+ public SummaryLogsProperties withRuleDefinition(RuleDefinition ruleDefinition) {
+ this.ruleDefinition = ruleDefinition;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (ruleDefinition() != null) {
+ ruleDefinition().validate();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("ruleType", this.ruleType == null ? null : this.ruleType.toString());
+ jsonWriter.writeStringField("displayName", this.displayName);
+ jsonWriter.writeStringField("description", this.description);
+ jsonWriter.writeJsonField("ruleDefinition", this.ruleDefinition);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of SummaryLogsProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of SummaryLogsProperties if the JsonReader was pointing to an instance of it, or null if it
+ * was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the SummaryLogsProperties.
+ */
+ public static SummaryLogsProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ SummaryLogsProperties deserializedSummaryLogsProperties = new SummaryLogsProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("ruleType".equals(fieldName)) {
+ deserializedSummaryLogsProperties.ruleType = RuleTypeEnum.fromString(reader.getString());
+ } else if ("displayName".equals(fieldName)) {
+ deserializedSummaryLogsProperties.displayName = reader.getString();
+ } else if ("description".equals(fieldName)) {
+ deserializedSummaryLogsProperties.description = reader.getString();
+ } else if ("isActive".equals(fieldName)) {
+ deserializedSummaryLogsProperties.isActive = reader.getNullable(JsonReader::getBoolean);
+ } else if ("statusCode".equals(fieldName)) {
+ deserializedSummaryLogsProperties.statusCode = StatusCodeEnum.fromString(reader.getString());
+ } else if ("provisioningState".equals(fieldName)) {
+ deserializedSummaryLogsProperties.provisioningState
+ = ProvisioningStateEnum.fromString(reader.getString());
+ } else if ("ruleDefinition".equals(fieldName)) {
+ deserializedSummaryLogsProperties.ruleDefinition = RuleDefinition.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedSummaryLogsProperties;
+ });
+ }
+}
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/TableInner.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/TableInner.java
index 4923dec7fdff..f9163289ea32 100644
--- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/TableInner.java
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/TableInner.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;
@@ -14,7 +15,6 @@
import com.azure.resourcemanager.loganalytics.models.ResultStatistics;
import com.azure.resourcemanager.loganalytics.models.Schema;
import com.azure.resourcemanager.loganalytics.models.SearchResults;
-import com.azure.resourcemanager.loganalytics.models.SystemDataAutoGenerated;
import com.azure.resourcemanager.loganalytics.models.TablePlanEnum;
import java.io.IOException;
@@ -31,7 +31,7 @@ public final class TableInner extends ProxyResource {
/*
* Metadata pertaining to creation and last modification of the resource.
*/
- private SystemDataAutoGenerated systemData;
+ private SystemData systemData;
/*
* The type of the resource.
@@ -68,7 +68,7 @@ private TableProperties innerProperties() {
*
* @return the systemData value.
*/
- public SystemDataAutoGenerated systemData() {
+ public SystemData systemData() {
return this.systemData;
}
@@ -103,8 +103,9 @@ public String id() {
}
/**
- * Get the retentionInDays property: The table retention in days, between 4 and 730. Setting this property to -1
- * will default to the workspace retention.
+ * Get the retentionInDays property: In Analytics table: the tables analytics retention in days, between 4 and 730.
+ * Setting this property to -1 will default to the workspace retention. In Basic and Auxiliary table: read only
+ * property.
*
* @return the retentionInDays value.
*/
@@ -113,8 +114,9 @@ public Integer retentionInDays() {
}
/**
- * Set the retentionInDays property: The table retention in days, between 4 and 730. Setting this property to -1
- * will default to the workspace retention.
+ * Set the retentionInDays property: In Analytics table: the tables analytics retention in days, between 4 and 730.
+ * Setting this property to -1 will default to the workspace retention. In Basic and Auxiliary table: read only
+ * property.
*
* @param retentionInDays the retentionInDays value to set.
* @return the TableInner object itself.
@@ -129,7 +131,7 @@ public TableInner withRetentionInDays(Integer retentionInDays) {
/**
* Get the totalRetentionInDays property: The table total retention in days, between 4 and 4383. Setting this
- * property to -1 will default to table retention.
+ * property to -1 will default to retentionInDays.
*
* @return the totalRetentionInDays value.
*/
@@ -139,7 +141,7 @@ public Integer totalRetentionInDays() {
/**
* Set the totalRetentionInDays property: The table total retention in days, between 4 and 4383. Setting this
- * property to -1 will default to table retention.
+ * property to -1 will default to retentionInDays.
*
* @param totalRetentionInDays the totalRetentionInDays value to set.
* @return the TableInner object itself.
@@ -153,7 +155,7 @@ public TableInner withTotalRetentionInDays(Integer totalRetentionInDays) {
}
/**
- * Get the archiveRetentionInDays property: The table data archive retention in days. Calculated as
+ * Get the archiveRetentionInDays property: The tables long-term retention in days. Calculated as
* (totalRetentionInDays-retentionInDays).
*
* @return the archiveRetentionInDays value.
@@ -312,9 +314,6 @@ public void validate() {
if (innerProperties() != null) {
innerProperties().validate();
}
- if (systemData() != null) {
- systemData().validate();
- }
}
/**
@@ -352,7 +351,7 @@ public static TableInner fromJson(JsonReader jsonReader) throws IOException {
} else if ("properties".equals(fieldName)) {
deserializedTableInner.innerProperties = TableProperties.fromJson(reader);
} else if ("systemData".equals(fieldName)) {
- deserializedTableInner.systemData = SystemDataAutoGenerated.fromJson(reader);
+ deserializedTableInner.systemData = SystemData.fromJson(reader);
} else {
reader.skipChildren();
}
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/TableProperties.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/TableProperties.java
index 224a110120ed..f3c825511b70 100644
--- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/TableProperties.java
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/TableProperties.java
@@ -23,19 +23,19 @@
@Fluent
public final class TableProperties implements JsonSerializable {
/*
- * The table retention in days, between 4 and 730. Setting this property to -1 will default to the workspace
- * retention.
+ * In Analytics table: the tables analytics retention in days, between 4 and 730. Setting this property to -1 will
+ * default to the workspace retention. In Basic and Auxiliary table: read only property.
*/
private Integer retentionInDays;
/*
- * The table total retention in days, between 4 and 4383. Setting this property to -1 will default to table
- * retention.
+ * The table total retention in days, between 4 and 4383. Setting this property to -1 will default to
+ * retentionInDays.
*/
private Integer totalRetentionInDays;
/*
- * The table data archive retention in days. Calculated as (totalRetentionInDays-retentionInDays)
+ * The tables long-term retention in days. Calculated as (totalRetentionInDays-retentionInDays).
*/
private Integer archiveRetentionInDays;
@@ -92,8 +92,9 @@ public TableProperties() {
}
/**
- * Get the retentionInDays property: The table retention in days, between 4 and 730. Setting this property to -1
- * will default to the workspace retention.
+ * Get the retentionInDays property: In Analytics table: the tables analytics retention in days, between 4 and 730.
+ * Setting this property to -1 will default to the workspace retention. In Basic and Auxiliary table: read only
+ * property.
*
* @return the retentionInDays value.
*/
@@ -102,8 +103,9 @@ public Integer retentionInDays() {
}
/**
- * Set the retentionInDays property: The table retention in days, between 4 and 730. Setting this property to -1
- * will default to the workspace retention.
+ * Set the retentionInDays property: In Analytics table: the tables analytics retention in days, between 4 and 730.
+ * Setting this property to -1 will default to the workspace retention. In Basic and Auxiliary table: read only
+ * property.
*
* @param retentionInDays the retentionInDays value to set.
* @return the TableProperties object itself.
@@ -115,7 +117,7 @@ public TableProperties withRetentionInDays(Integer retentionInDays) {
/**
* Get the totalRetentionInDays property: The table total retention in days, between 4 and 4383. Setting this
- * property to -1 will default to table retention.
+ * property to -1 will default to retentionInDays.
*
* @return the totalRetentionInDays value.
*/
@@ -125,7 +127,7 @@ public Integer totalRetentionInDays() {
/**
* Set the totalRetentionInDays property: The table total retention in days, between 4 and 4383. Setting this
- * property to -1 will default to table retention.
+ * property to -1 will default to retentionInDays.
*
* @param totalRetentionInDays the totalRetentionInDays value to set.
* @return the TableProperties object itself.
@@ -136,7 +138,7 @@ public TableProperties withTotalRetentionInDays(Integer totalRetentionInDays) {
}
/**
- * Get the archiveRetentionInDays property: The table data archive retention in days. Calculated as
+ * Get the archiveRetentionInDays property: The tables long-term retention in days. Calculated as
* (totalRetentionInDays-retentionInDays).
*
* @return the archiveRetentionInDays value.
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/WorkspaceInner.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/WorkspaceInner.java
index 629b221fc494..65c697daf679 100644
--- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/WorkspaceInner.java
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/WorkspaceInner.java
@@ -6,18 +6,21 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.Resource;
+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.loganalytics.models.Identity;
import com.azure.resourcemanager.loganalytics.models.PrivateLinkScopedResource;
import com.azure.resourcemanager.loganalytics.models.PublicNetworkAccessType;
-import com.azure.resourcemanager.loganalytics.models.SystemDataAutoGenerated;
import com.azure.resourcemanager.loganalytics.models.WorkspaceCapping;
import com.azure.resourcemanager.loganalytics.models.WorkspaceEntityStatus;
+import com.azure.resourcemanager.loganalytics.models.WorkspaceFailoverProperties;
import com.azure.resourcemanager.loganalytics.models.WorkspaceFeatures;
+import com.azure.resourcemanager.loganalytics.models.WorkspaceReplicationProperties;
import com.azure.resourcemanager.loganalytics.models.WorkspaceSku;
import java.io.IOException;
+import java.time.OffsetDateTime;
import java.util.List;
import java.util.Map;
@@ -39,7 +42,7 @@ public final class WorkspaceInner extends Resource {
/*
* Metadata pertaining to creation and last modification of the resource.
*/
- private SystemDataAutoGenerated systemData;
+ private SystemData systemData;
/*
* The etag of the workspace.
@@ -101,7 +104,7 @@ public WorkspaceInner withIdentity(Identity identity) {
*
* @return the systemData value.
*/
- public SystemDataAutoGenerated systemData() {
+ public SystemData systemData() {
return this.systemData;
}
@@ -267,7 +270,7 @@ public WorkspaceInner withWorkspaceCapping(WorkspaceCapping workspaceCapping) {
*
* @return the createdDate value.
*/
- public String createdDate() {
+ public OffsetDateTime createdDate() {
return this.innerProperties() == null ? null : this.innerProperties().createdDate();
}
@@ -276,7 +279,7 @@ public String createdDate() {
*
* @return the modifiedDate value.
*/
- public String modifiedDate() {
+ public OffsetDateTime modifiedDate() {
return this.innerProperties() == null ? null : this.innerProperties().modifiedDate();
}
@@ -408,6 +411,52 @@ public WorkspaceInner withDefaultDataCollectionRuleResourceId(String defaultData
return this;
}
+ /**
+ * Get the replication property: workspace replication properties.
+ *
+ * @return the replication value.
+ */
+ public WorkspaceReplicationProperties replication() {
+ return this.innerProperties() == null ? null : this.innerProperties().replication();
+ }
+
+ /**
+ * Set the replication property: workspace replication properties.
+ *
+ * @param replication the replication value to set.
+ * @return the WorkspaceInner object itself.
+ */
+ public WorkspaceInner withReplication(WorkspaceReplicationProperties replication) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new WorkspaceProperties();
+ }
+ this.innerProperties().withReplication(replication);
+ return this;
+ }
+
+ /**
+ * Get the failover property: workspace failover properties.
+ *
+ * @return the failover value.
+ */
+ public WorkspaceFailoverProperties failover() {
+ return this.innerProperties() == null ? null : this.innerProperties().failover();
+ }
+
+ /**
+ * Set the failover property: workspace failover properties.
+ *
+ * @param failover the failover value to set.
+ * @return the WorkspaceInner object itself.
+ */
+ public WorkspaceInner withFailover(WorkspaceFailoverProperties failover) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new WorkspaceProperties();
+ }
+ this.innerProperties().withFailover(failover);
+ return this;
+ }
+
/**
* Validates the instance.
*
@@ -420,9 +469,6 @@ public void validate() {
if (identity() != null) {
identity().validate();
}
- if (systemData() != null) {
- systemData().validate();
- }
}
/**
@@ -471,7 +517,7 @@ public static WorkspaceInner fromJson(JsonReader jsonReader) throws IOException
} else if ("identity".equals(fieldName)) {
deserializedWorkspaceInner.identity = Identity.fromJson(reader);
} else if ("systemData".equals(fieldName)) {
- deserializedWorkspaceInner.systemData = SystemDataAutoGenerated.fromJson(reader);
+ deserializedWorkspaceInner.systemData = SystemData.fromJson(reader);
} else if ("etag".equals(fieldName)) {
deserializedWorkspaceInner.etag = reader.getString();
} else {
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/WorkspaceProperties.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/WorkspaceProperties.java
index 53c89225a8c1..a951ec0ccf06 100644
--- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/WorkspaceProperties.java
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/WorkspaceProperties.java
@@ -5,6 +5,7 @@
package com.azure.resourcemanager.loganalytics.fluent.models;
import com.azure.core.annotation.Fluent;
+import com.azure.core.util.CoreUtils;
import com.azure.json.JsonReader;
import com.azure.json.JsonSerializable;
import com.azure.json.JsonToken;
@@ -13,9 +14,12 @@
import com.azure.resourcemanager.loganalytics.models.PublicNetworkAccessType;
import com.azure.resourcemanager.loganalytics.models.WorkspaceCapping;
import com.azure.resourcemanager.loganalytics.models.WorkspaceEntityStatus;
+import com.azure.resourcemanager.loganalytics.models.WorkspaceFailoverProperties;
import com.azure.resourcemanager.loganalytics.models.WorkspaceFeatures;
+import com.azure.resourcemanager.loganalytics.models.WorkspaceReplicationProperties;
import com.azure.resourcemanager.loganalytics.models.WorkspaceSku;
import java.io.IOException;
+import java.time.OffsetDateTime;
import java.util.List;
/**
@@ -52,12 +56,12 @@ public final class WorkspaceProperties implements JsonSerializable CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
} else if ("modifiedDate".equals(fieldName)) {
- deserializedWorkspaceProperties.modifiedDate = reader.getString();
+ deserializedWorkspaceProperties.modifiedDate = reader
+ .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
} else if ("publicNetworkAccessForIngestion".equals(fieldName)) {
deserializedWorkspaceProperties.publicNetworkAccessForIngestion
= PublicNetworkAccessType.fromString(reader.getString());
@@ -394,6 +458,10 @@ public static WorkspaceProperties fromJson(JsonReader jsonReader) throws IOExcep
deserializedWorkspaceProperties.features = WorkspaceFeatures.fromJson(reader);
} else if ("defaultDataCollectionRuleResourceId".equals(fieldName)) {
deserializedWorkspaceProperties.defaultDataCollectionRuleResourceId = reader.getString();
+ } else if ("replication".equals(fieldName)) {
+ deserializedWorkspaceProperties.replication = WorkspaceReplicationProperties.fromJson(reader);
+ } else if ("failover".equals(fieldName)) {
+ deserializedWorkspaceProperties.failover = WorkspaceFailoverProperties.fromJson(reader);
} else {
reader.skipChildren();
}
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/AvailableServiceTiersClientImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/AvailableServiceTiersClientImpl.java
index bf7d14fc433d..79cc76334190 100644
--- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/AvailableServiceTiersClientImpl.java
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/AvailableServiceTiersClientImpl.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.loganalytics.fluent.AvailableServiceTiersClient;
import com.azure.resourcemanager.loganalytics.fluent.models.AvailableServiceTierInner;
import java.util.List;
@@ -56,7 +57,7 @@ public final class AvailableServiceTiersClientImpl implements AvailableServiceTi
* by the proxy service to perform REST calls.
*/
@Host("{$host}")
- @ServiceInterface(name = "OperationalInsightsM")
+ @ServiceInterface(name = "OperationalInsightsManagementClientAvailableServiceTiers")
public interface AvailableServiceTiersService {
@Headers({ "Content-Type: application/json" })
@Get("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/availableServiceTiers")
@@ -66,6 +67,15 @@ Mono>> listByWorkspace(@HostParam("$hos
@PathParam("subscriptionId") String subscriptionId,
@PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName,
@QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/availableServiceTiers")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response> listByWorkspaceSync(@HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName,
+ @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context);
}
/**
@@ -97,51 +107,13 @@ private Mono>> listByWorkspaceWithRespo
if (workspaceName == null) {
return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null."));
}
- final String apiVersion = "2020-08-01";
final String accept = "application/json";
return FluxUtil
.withContext(context -> service.listByWorkspace(this.client.getEndpoint(), this.client.getSubscriptionId(),
- resourceGroupName, workspaceName, apiVersion, accept, context))
+ resourceGroupName, workspaceName, this.client.getApiVersion(), accept, context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
- /**
- * Gets the available service tiers for the workspace.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param workspaceName The name of the workspace.
- * @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 available service tiers for the workspace along with {@link Response} on successful completion of
- * {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> listByWorkspaceWithResponseAsync(String resourceGroupName,
- String workspaceName, 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 (workspaceName == null) {
- return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null."));
- }
- final String apiVersion = "2020-08-01";
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.listByWorkspace(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName,
- workspaceName, apiVersion, accept, context);
- }
-
/**
* Gets the available service tiers for the workspace.
*
@@ -172,7 +144,27 @@ private Mono> listByWorkspaceAsync(String resour
@ServiceMethod(returns = ReturnType.SINGLE)
public Response> listByWorkspaceWithResponse(String resourceGroupName,
String workspaceName, Context context) {
- return listByWorkspaceWithResponseAsync(resourceGroupName, workspaceName, 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 (workspaceName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter workspaceName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return service.listByWorkspaceSync(this.client.getEndpoint(), this.client.getSubscriptionId(),
+ resourceGroupName, workspaceName, this.client.getApiVersion(), accept, context);
}
/**
@@ -189,4 +181,6 @@ public Response> listByWorkspaceWithResponse(Str
public List listByWorkspace(String resourceGroupName, String workspaceName) {
return listByWorkspaceWithResponse(resourceGroupName, workspaceName, Context.NONE).getValue();
}
+
+ private static final ClientLogger LOGGER = new ClientLogger(AvailableServiceTiersClientImpl.class);
}
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/ClusterImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/ClusterImpl.java
index d8419d40e0e5..39cc9a799e6f 100644
--- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/ClusterImpl.java
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/ClusterImpl.java
@@ -13,9 +13,11 @@
import com.azure.resourcemanager.loganalytics.models.Cluster;
import com.azure.resourcemanager.loganalytics.models.ClusterEntityStatus;
import com.azure.resourcemanager.loganalytics.models.ClusterPatch;
+import com.azure.resourcemanager.loganalytics.models.ClusterReplicationProperties;
import com.azure.resourcemanager.loganalytics.models.ClusterSku;
import com.azure.resourcemanager.loganalytics.models.KeyVaultProperties;
import com.azure.resourcemanager.loganalytics.models.ManagedServiceIdentity;
+import java.time.OffsetDateTime;
import java.util.Collections;
import java.util.List;
import java.util.Map;
@@ -82,11 +84,11 @@ public KeyVaultProperties keyVaultProperties() {
return this.innerModel().keyVaultProperties();
}
- public String lastModifiedDate() {
+ public OffsetDateTime lastModifiedDate() {
return this.innerModel().lastModifiedDate();
}
- public String createdDate() {
+ public OffsetDateTime createdDate() {
return this.innerModel().createdDate();
}
@@ -103,6 +105,10 @@ public CapacityReservationProperties capacityReservationProperties() {
return this.innerModel().capacityReservationProperties();
}
+ public ClusterReplicationProperties replication() {
+ return this.innerModel().replication();
+ }
+
public Region region() {
return Region.fromName(this.regionName());
}
@@ -276,7 +282,12 @@ public ClusterImpl withCapacityReservationProperties(CapacityReservationProperti
return this;
}
+ public ClusterImpl withReplication(ClusterReplicationProperties replication) {
+ this.innerModel().withReplication(replication);
+ return this;
+ }
+
private boolean isInCreateMode() {
- return this.innerModel().id() == null;
+ return this.innerModel() == null || this.innerModel().id() == null;
}
}
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/ClustersClientImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/ClustersClientImpl.java
index 019b3c86f818..bd4e395d2728 100644
--- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/ClustersClientImpl.java
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/ClustersClientImpl.java
@@ -28,8 +28,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.loganalytics.fluent.ClustersClient;
@@ -69,7 +71,7 @@ public final class ClustersClientImpl implements ClustersClient {
* service to perform REST calls.
*/
@Host("{$host}")
- @ServiceInterface(name = "OperationalInsightsM")
+ @ServiceInterface(name = "OperationalInsightsManagementClientClusters")
public interface ClustersService {
@Headers({ "Content-Type: application/json" })
@Get("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/clusters")
@@ -79,6 +81,14 @@ Mono> listByResourceGroup(@HostParam("$host") String
@PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion,
@PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context);
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/clusters")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listByResourceGroupSync(@HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context);
+
@Headers({ "Content-Type: application/json" })
@Get("/subscriptions/{subscriptionId}/providers/Microsoft.OperationalInsights/clusters")
@ExpectedResponses({ 200 })
@@ -87,9 +97,17 @@ Mono> list(@HostParam("$host") String endpoint,
@QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
@HeaderParam("Accept") String accept, Context context);
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.OperationalInsights/clusters")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listSync(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @HeaderParam("Accept") String accept, Context context);
+
@Headers({ "Content-Type: application/json" })
@Put("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/clusters/{clusterName}")
- @ExpectedResponses({ 200, 201, 202 })
+ @ExpectedResponses({ 200, 202 })
@UnexpectedResponseExceptionType(ManagementException.class)
Mono>> createOrUpdate(@HostParam("$host") String endpoint,
@PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion,
@@ -97,6 +115,16 @@ Mono>> createOrUpdate(@HostParam("$host") String endpo
@BodyParam("application/json") ClusterInner parameters, @HeaderParam("Accept") String accept,
Context context);
+ @Headers({ "Content-Type: application/json" })
+ @Put("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/clusters/{clusterName}")
+ @ExpectedResponses({ 200, 202 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response createOrUpdateSync(@HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId, @PathParam("clusterName") String clusterName,
+ @BodyParam("application/json") ClusterInner parameters, @HeaderParam("Accept") String accept,
+ Context context);
+
@Headers({ "Content-Type: application/json" })
@Delete("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/clusters/{clusterName}")
@ExpectedResponses({ 200, 202, 204 })
@@ -106,6 +134,15 @@ Mono>> delete(@HostParam("$host") String endpoint,
@QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
@HeaderParam("Accept") String accept, Context context);
+ @Headers({ "Content-Type: application/json" })
+ @Delete("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/clusters/{clusterName}")
+ @ExpectedResponses({ 200, 202, 204 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response deleteSync(@HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @HeaderParam("Accept") String accept, Context context);
+
@Headers({ "Content-Type: application/json" })
@Get("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/clusters/{clusterName}")
@ExpectedResponses({ 200 })
@@ -116,15 +153,34 @@ Mono> getByResourceGroup(@HostParam("$host") String endpo
@PathParam("clusterName") String clusterName, @HeaderParam("Accept") String accept, Context context);
@Headers({ "Content-Type: application/json" })
- @Patch("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/clusters/{clusterName}")
+ @Get("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/clusters/{clusterName}")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
+ Response getByResourceGroupSync(@HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion,
+ @PathParam("clusterName") String clusterName, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Patch("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/clusters/{clusterName}")
+ @ExpectedResponses({ 200, 202 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
Mono>> update(@HostParam("$host") String endpoint,
@PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName,
@QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
@BodyParam("application/json") ClusterPatch parameters, @HeaderParam("Accept") String accept,
Context context);
+ @Headers({ "Content-Type: application/json" })
+ @Patch("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/clusters/{clusterName}")
+ @ExpectedResponses({ 200, 202 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response updateSync(@HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @BodyParam("application/json") ClusterPatch parameters, @HeaderParam("Accept") String accept,
+ Context context);
+
@Headers({ "Content-Type: application/json" })
@Get("{nextLink}")
@ExpectedResponses({ 200 })
@@ -133,12 +189,27 @@ Mono> listByResourceGroupNext(
@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 listByResourceGroupNextSync(
+ @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)
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);
}
/**
@@ -165,11 +236,10 @@ private Mono> listByResourceGroupSinglePageAsync(Str
return Mono.error(new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
- final String apiVersion = "2022-10-01";
final String accept = "application/json";
return FluxUtil
.withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), resourceGroupName,
- apiVersion, this.client.getSubscriptionId(), accept, context))
+ this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context))
.>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(),
res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
@@ -179,36 +249,15 @@ private Mono> listByResourceGroupSinglePageAsync(Str
* Gets Log Analytics clusters in a resource group.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @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 log Analytics clusters in a resource group along with {@link PagedResponse} on successful completion of
- * {@link Mono}.
+ * @return log Analytics clusters in a resource group as paginated response with {@link PagedFlux}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName,
- Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- final String apiVersion = "2022-10-01";
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service
- .listByResourceGroup(this.client.getEndpoint(), resourceGroupName, apiVersion,
- this.client.getSubscriptionId(), 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 listByResourceGroupAsync(String resourceGroupName) {
+ return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName),
+ nextLink -> listByResourceGroupNextSinglePageAsync(nextLink));
}
/**
@@ -218,12 +267,29 @@ private Mono> listByResourceGroupSinglePageAsync(Str
* @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 log Analytics clusters in a resource group as paginated response with {@link PagedFlux}.
+ * @return log Analytics clusters in a resource group along with {@link PagedResponse}.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listByResourceGroupAsync(String resourceGroupName) {
- return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName),
- nextLink -> listByResourceGroupNextSinglePageAsync(nextLink));
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) {
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter resourceGroupName 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."));
+ }
+ final String accept = "application/json";
+ Response res = service.listByResourceGroupSync(this.client.getEndpoint(), resourceGroupName,
+ this.client.getApiVersion(), this.client.getSubscriptionId(), accept, Context.NONE);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
}
/**
@@ -234,12 +300,29 @@ private PagedFlux listByResourceGroupAsync(String resourceGroupNam
* @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 log Analytics clusters in a resource group as paginated response with {@link PagedFlux}.
+ * @return log Analytics clusters in a resource group along with {@link PagedResponse}.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) {
- return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context),
- nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context));
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter resourceGroupName 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."));
+ }
+ final String accept = "application/json";
+ Response res = service.listByResourceGroupSync(this.client.getEndpoint(), resourceGroupName,
+ this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
}
/**
@@ -253,7 +336,8 @@ private PagedFlux listByResourceGroupAsync(String resourceGroupNam
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable listByResourceGroup(String resourceGroupName) {
- return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName));
+ return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName),
+ nextLink -> listByResourceGroupNextSinglePage(nextLink));
}
/**
@@ -268,7 +352,8 @@ public PagedIterable listByResourceGroup(String resourceGroupName)
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
- return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context));
+ return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context),
+ nextLink -> listByResourceGroupNextSinglePage(nextLink, context));
}
/**
@@ -289,11 +374,10 @@ private Mono> listSinglePageAsync() {
return Mono.error(new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
- final String apiVersion = "2022-10-01";
final String accept = "application/json";
return FluxUtil
- .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(),
- accept, context))
+ .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), accept, context))
.>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(),
res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
@@ -302,29 +386,13 @@ private Mono> listSinglePageAsync() {
/**
* Gets the Log Analytics clusters in a subscription.
*
- * @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 Log Analytics clusters in a subscription along with {@link PagedResponse} on successful completion of
- * {@link Mono}.
+ * @return the Log Analytics clusters in a subscription as paginated response with {@link PagedFlux}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listSinglePageAsync(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."));
- }
- final String apiVersion = "2022-10-01";
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), 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() {
+ return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink));
}
/**
@@ -332,11 +400,25 @@ private Mono> listSinglePageAsync(Context context) {
*
* @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 Log Analytics clusters in a subscription as paginated response with {@link PagedFlux}.
+ * @return the Log Analytics clusters in a subscription along with {@link PagedResponse}.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listAsync() {
- return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink));
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listSinglePage() {
+ 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."));
+ }
+ final String accept = "application/json";
+ Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), accept, Context.NONE);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
}
/**
@@ -346,12 +428,25 @@ private PagedFlux listAsync() {
* @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 Log Analytics clusters in a subscription as paginated response with {@link PagedFlux}.
+ * @return the Log Analytics clusters in a subscription along with {@link PagedResponse}.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listAsync(Context context) {
- return new PagedFlux<>(() -> listSinglePageAsync(context),
- nextLink -> listNextSinglePageAsync(nextLink, context));
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listSinglePage(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."));
+ }
+ final String accept = "application/json";
+ Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
}
/**
@@ -363,7 +458,7 @@ private PagedFlux listAsync(Context context) {
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list() {
- return new PagedIterable<>(listAsync());
+ return new PagedIterable<>(() -> listSinglePage(), nextLink -> listNextSinglePage(nextLink));
}
/**
@@ -377,7 +472,7 @@ public PagedIterable list() {
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list(Context context) {
- return new PagedIterable<>(listAsync(context));
+ return new PagedIterable<>(() -> listSinglePage(context), nextLink -> listNextSinglePage(nextLink, context));
}
/**
@@ -415,11 +510,10 @@ private Mono>> createOrUpdateWithResponseAsync(String
} else {
parameters.validate();
}
- final String apiVersion = "2022-10-01";
final String accept = "application/json";
return FluxUtil
- .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, apiVersion,
- this.client.getSubscriptionId(), clusterName, parameters, accept, context))
+ .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName,
+ this.client.getApiVersion(), this.client.getSubscriptionId(), clusterName, parameters, accept, context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
@@ -429,41 +523,41 @@ private Mono>> createOrUpdateWithResponseAsync(String
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param clusterName The name of the Log Analytics cluster.
* @param parameters The parameters required to create or update a Log Analytics cluster.
- * @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 top level Log Analytics cluster resource container along with {@link Response} on successful
- * completion of {@link Mono}.
+ * @return the top level Log Analytics cluster resource container along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName,
- String clusterName, ClusterInner parameters, Context context) {
+ private Response createOrUpdateWithResponse(String resourceGroupName, String clusterName,
+ ClusterInner parameters) {
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 (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 (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 (clusterName == null) {
- return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
}
if (parameters == null) {
- return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
} else {
parameters.validate();
}
- final String apiVersion = "2022-10-01";
final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, apiVersion,
- this.client.getSubscriptionId(), clusterName, parameters, accept, context);
+ return service.createOrUpdateSync(this.client.getEndpoint(), resourceGroupName, this.client.getApiVersion(),
+ this.client.getSubscriptionId(), clusterName, parameters, accept, Context.NONE);
}
/**
@@ -472,18 +566,42 @@ private Mono>> createOrUpdateWithResponseAsync(String
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param clusterName The name of the Log Analytics cluster.
* @param parameters The parameters required to create or update a Log Analytics cluster.
+ * @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 the top level Log Analytics cluster resource container.
+ * @return the top level Log Analytics cluster resource container along with {@link Response}.
*/
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, ClusterInner> beginCreateOrUpdateAsync(String resourceGroupName,
- String clusterName, ClusterInner parameters) {
- Mono>> mono
- = createOrUpdateWithResponseAsync(resourceGroupName, clusterName, parameters);
- return this.client.getLroResult(mono, this.client.getHttpPipeline(),
- ClusterInner.class, ClusterInner.class, this.client.getContext());
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Response createOrUpdateWithResponse(String resourceGroupName, String clusterName,
+ ClusterInner parameters, Context context) {
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter resourceGroupName 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 (clusterName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ if (parameters == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
+ return service.createOrUpdateSync(this.client.getEndpoint(), resourceGroupName, this.client.getApiVersion(),
+ this.client.getSubscriptionId(), clusterName, parameters, accept, context);
}
/**
@@ -492,7 +610,6 @@ private PollerFlux, ClusterInner> beginCreateOrUpdateAs
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param clusterName The name of the Log Analytics cluster.
* @param parameters The parameters required to create or update a Log Analytics cluster.
- * @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.
@@ -500,12 +617,11 @@ private PollerFlux, ClusterInner> beginCreateOrUpdateAs
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, ClusterInner> beginCreateOrUpdateAsync(String resourceGroupName,
- String clusterName, ClusterInner parameters, Context context) {
- context = this.client.mergeContext(context);
+ String clusterName, ClusterInner parameters) {
Mono>> mono
- = createOrUpdateWithResponseAsync(resourceGroupName, clusterName, parameters, context);
+ = createOrUpdateWithResponseAsync(resourceGroupName, clusterName, parameters);
return this.client.getLroResult(mono, this.client.getHttpPipeline(),
- ClusterInner.class, ClusterInner.class, context);
+ ClusterInner.class, ClusterInner.class, this.client.getContext());
}
/**
@@ -522,7 +638,9 @@ private PollerFlux, ClusterInner> beginCreateOrUpdateAs
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, ClusterInner> beginCreateOrUpdate(String resourceGroupName,
String clusterName, ClusterInner parameters) {
- return this.beginCreateOrUpdateAsync(resourceGroupName, clusterName, parameters).getSyncPoller();
+ Response response = createOrUpdateWithResponse(resourceGroupName, clusterName, parameters);
+ return this.client.getLroResult(response, ClusterInner.class, ClusterInner.class,
+ Context.NONE);
}
/**
@@ -540,7 +658,9 @@ public SyncPoller, ClusterInner> beginCreateOrUpdate(St
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, ClusterInner> beginCreateOrUpdate(String resourceGroupName,
String clusterName, ClusterInner parameters, Context context) {
- return this.beginCreateOrUpdateAsync(resourceGroupName, clusterName, parameters, context).getSyncPoller();
+ Response response = createOrUpdateWithResponse(resourceGroupName, clusterName, parameters, context);
+ return this.client.getLroResult(response, ClusterInner.class, ClusterInner.class,
+ context);
}
/**
@@ -561,25 +681,6 @@ private Mono createOrUpdateAsync(String resourceGroupName, String
.flatMap(this.client::getLroFinalResultOrError);
}
- /**
- * Create or update a Log Analytics cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param clusterName The name of the Log Analytics cluster.
- * @param parameters The parameters required to create or update a Log Analytics cluster.
- * @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 top level Log Analytics cluster resource container on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono createOrUpdateAsync(String resourceGroupName, String clusterName,
- ClusterInner parameters, Context context) {
- return beginCreateOrUpdateAsync(resourceGroupName, clusterName, parameters, context).last()
- .flatMap(this.client::getLroFinalResultOrError);
- }
-
/**
* Create or update a Log Analytics cluster.
*
@@ -593,7 +694,7 @@ private Mono createOrUpdateAsync(String resourceGroupName, String
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public ClusterInner createOrUpdate(String resourceGroupName, String clusterName, ClusterInner parameters) {
- return createOrUpdateAsync(resourceGroupName, clusterName, parameters).block();
+ return beginCreateOrUpdate(resourceGroupName, clusterName, parameters).getFinalResult();
}
/**
@@ -611,7 +712,7 @@ public ClusterInner createOrUpdate(String resourceGroupName, String clusterName,
@ServiceMethod(returns = ReturnType.SINGLE)
public ClusterInner createOrUpdate(String resourceGroupName, String clusterName, ClusterInner parameters,
Context context) {
- return createOrUpdateAsync(resourceGroupName, clusterName, parameters, context).block();
+ return beginCreateOrUpdate(resourceGroupName, clusterName, parameters, context).getFinalResult();
}
/**
@@ -641,11 +742,10 @@ private Mono>> deleteWithResponseAsync(String resource
return Mono.error(new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
- final String apiVersion = "2022-10-01";
final String accept = "application/json";
return FluxUtil
.withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, clusterName,
- apiVersion, this.client.getSubscriptionId(), accept, context))
+ this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
@@ -654,35 +754,34 @@ private Mono>> deleteWithResponseAsync(String resource
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param clusterName Name of the Log Analytics Cluster.
- * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link Response} on successful completion of {@link Mono}.
+ * @return the response body along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterName,
- Context context) {
+ private Response deleteWithResponse(String resourceGroupName, String clusterName) {
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 (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 (clusterName == null) {
- return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter clusterName 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."));
}
- final String apiVersion = "2022-10-01";
final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.delete(this.client.getEndpoint(), resourceGroupName, clusterName, apiVersion,
- this.client.getSubscriptionId(), accept, context);
+ return service.deleteSync(this.client.getEndpoint(), resourceGroupName, clusterName,
+ this.client.getApiVersion(), this.client.getSubscriptionId(), accept, Context.NONE);
}
/**
@@ -690,16 +789,35 @@ private Mono>> deleteWithResponseAsync(String resource
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param clusterName Name of the Log Analytics Cluster.
+ * @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 response body along with {@link Response}.
*/
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String clusterName) {
- Mono>> mono = deleteWithResponseAsync(resourceGroupName, clusterName);
- return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
- this.client.getContext());
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Response deleteWithResponse(String resourceGroupName, String clusterName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (clusterName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter clusterName 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."));
+ }
+ final String accept = "application/json";
+ return service.deleteSync(this.client.getEndpoint(), resourceGroupName, clusterName,
+ this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context);
}
/**
@@ -707,19 +825,16 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param clusterName Name of the Log Analytics Cluster.
- * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the {@link PollerFlux} for polling of long-running operation.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String clusterName,
- Context context) {
- context = this.client.mergeContext(context);
- Mono>> mono = deleteWithResponseAsync(resourceGroupName, clusterName, context);
+ private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String clusterName) {
+ Mono>> mono = deleteWithResponseAsync(resourceGroupName, clusterName);
return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
- context);
+ this.client.getContext());
}
/**
@@ -734,7 +849,8 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName) {
- return this.beginDeleteAsync(resourceGroupName, clusterName).getSyncPoller();
+ Response response = deleteWithResponse(resourceGroupName, clusterName);
+ return this.client.getLroResult(response, Void.class, Void.class, Context.NONE);
}
/**
@@ -751,7 +867,8 @@ public SyncPoller, Void> beginDelete(String resourceGroupName,
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName,
Context context) {
- return this.beginDeleteAsync(resourceGroupName, clusterName, context).getSyncPoller();
+ Response response = deleteWithResponse(resourceGroupName, clusterName, context);
+ return this.client.getLroResult(response, Void.class, Void.class, context);
}
/**
@@ -769,23 +886,6 @@ private Mono deleteAsync(String resourceGroupName, String clusterName) {
return beginDeleteAsync(resourceGroupName, clusterName).last().flatMap(this.client::getLroFinalResultOrError);
}
- /**
- * Deletes a cluster instance.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param clusterName Name of the Log Analytics Cluster.
- * @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 deleteAsync(String resourceGroupName, String clusterName, Context context) {
- return beginDeleteAsync(resourceGroupName, clusterName, context).last()
- .flatMap(this.client::getLroFinalResultOrError);
- }
-
/**
* Deletes a cluster instance.
*
@@ -797,7 +897,7 @@ private Mono deleteAsync(String resourceGroupName, String clusterName, Con
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public void delete(String resourceGroupName, String clusterName) {
- deleteAsync(resourceGroupName, clusterName).block();
+ beginDelete(resourceGroupName, clusterName).getFinalResult();
}
/**
@@ -812,7 +912,7 @@ public void delete(String resourceGroupName, String clusterName) {
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public void delete(String resourceGroupName, String clusterName, Context context) {
- deleteAsync(resourceGroupName, clusterName, context).block();
+ beginDelete(resourceGroupName, clusterName, context).getFinalResult();
}
/**
@@ -843,50 +943,14 @@ private Mono> getByResourceGroupWithResponseAsync(String
if (clusterName == null) {
return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
}
- final String apiVersion = "2022-10-01";
final String accept = "application/json";
return FluxUtil
- .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(),
- this.client.getSubscriptionId(), resourceGroupName, apiVersion, clusterName, accept, context))
+ .withContext(
+ context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(),
+ resourceGroupName, this.client.getApiVersion(), clusterName, accept, context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
- /**
- * Gets a Log Analytics cluster instance.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param clusterName Name of the Log Analytics Cluster.
- * @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 Log Analytics cluster instance along with {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName,
- String clusterName, 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 (clusterName == null) {
- return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
- }
- final String apiVersion = "2022-10-01";
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName,
- apiVersion, clusterName, accept, context);
- }
-
/**
* Gets a Log Analytics cluster instance.
*
@@ -917,7 +981,27 @@ private Mono getByResourceGroupAsync(String resourceGroupName, Str
@ServiceMethod(returns = ReturnType.SINGLE)
public Response getByResourceGroupWithResponse(String resourceGroupName, String clusterName,
Context context) {
- return getByResourceGroupWithResponseAsync(resourceGroupName, clusterName, 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 (clusterName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getSubscriptionId(),
+ resourceGroupName, this.client.getApiVersion(), clusterName, accept, context);
}
/**
@@ -970,11 +1054,10 @@ private Mono>> updateWithResponseAsync(String resource
} else {
parameters.validate();
}
- final String apiVersion = "2022-10-01";
final String accept = "application/json";
return FluxUtil
.withContext(context -> service.update(this.client.getEndpoint(), resourceGroupName, clusterName,
- apiVersion, this.client.getSubscriptionId(), parameters, accept, context))
+ this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, accept, context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
@@ -984,41 +1067,41 @@ private Mono>> updateWithResponseAsync(String resource
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param clusterName Name of the Log Analytics Cluster.
* @param parameters The parameters required to patch a Log Analytics cluster.
- * @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 top level Log Analytics cluster resource container along with {@link Response} on successful
- * completion of {@link Mono}.
+ * @return the top level Log Analytics cluster resource container along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> updateWithResponseAsync(String resourceGroupName, String clusterName,
- ClusterPatch parameters, Context context) {
+ private Response updateWithResponse(String resourceGroupName, String clusterName,
+ ClusterPatch parameters) {
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 (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 (clusterName == null) {
- return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter clusterName 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 (parameters == null) {
- return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
} else {
parameters.validate();
}
- final String apiVersion = "2022-10-01";
final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.update(this.client.getEndpoint(), resourceGroupName, clusterName, apiVersion,
- this.client.getSubscriptionId(), parameters, accept, context);
+ return service.updateSync(this.client.getEndpoint(), resourceGroupName, clusterName,
+ this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, accept, Context.NONE);
}
/**
@@ -1027,17 +1110,42 @@ private Mono>> updateWithResponseAsync(String resource
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param clusterName Name of the Log Analytics Cluster.
* @param parameters The parameters required to patch a Log Analytics cluster.
+ * @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 the top level Log Analytics cluster resource container.
+ * @return the top level Log Analytics cluster resource container along with {@link Response}.
*/
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, ClusterInner> beginUpdateAsync(String resourceGroupName,
- String clusterName, ClusterPatch parameters) {
- Mono>> mono = updateWithResponseAsync(resourceGroupName, clusterName, parameters);
- return this.client.getLroResult(mono, this.client.getHttpPipeline(),
- ClusterInner.class, ClusterInner.class, this.client.getContext());
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Response updateWithResponse(String resourceGroupName, String clusterName,
+ ClusterPatch parameters, Context context) {
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (clusterName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter clusterName 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 (parameters == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
+ return service.updateSync(this.client.getEndpoint(), resourceGroupName, clusterName,
+ this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, accept, context);
}
/**
@@ -1046,7 +1154,6 @@ private PollerFlux, ClusterInner> beginUpdateAsync(Stri
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param clusterName Name of the Log Analytics Cluster.
* @param parameters The parameters required to patch a Log Analytics cluster.
- * @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.
@@ -1054,12 +1161,10 @@ private PollerFlux, ClusterInner> beginUpdateAsync(Stri
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, ClusterInner> beginUpdateAsync(String resourceGroupName,
- String clusterName, ClusterPatch parameters, Context context) {
- context = this.client.mergeContext(context);
- Mono>> mono
- = updateWithResponseAsync(resourceGroupName, clusterName, parameters, context);
+ String clusterName, ClusterPatch parameters) {
+ Mono>> mono = updateWithResponseAsync(resourceGroupName, clusterName, parameters);
return this.client.getLroResult(mono, this.client.getHttpPipeline(),
- ClusterInner.class, ClusterInner.class, context);
+ ClusterInner.class, ClusterInner.class, this.client.getContext());
}
/**
@@ -1076,7 +1181,9 @@ private PollerFlux, ClusterInner> beginUpdateAsync(Stri
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, ClusterInner> beginUpdate(String resourceGroupName, String clusterName,
ClusterPatch parameters) {
- return this.beginUpdateAsync(resourceGroupName, clusterName, parameters).getSyncPoller();
+ Response response = updateWithResponse(resourceGroupName, clusterName, parameters);
+ return this.client.getLroResult(response, ClusterInner.class, ClusterInner.class,
+ Context.NONE);
}
/**
@@ -1094,7 +1201,9 @@ public SyncPoller, ClusterInner> beginUpdate(String res
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, ClusterInner> beginUpdate(String resourceGroupName, String clusterName,
ClusterPatch parameters, Context context) {
- return this.beginUpdateAsync(resourceGroupName, clusterName, parameters, context).getSyncPoller();
+ Response response = updateWithResponse(resourceGroupName, clusterName, parameters, context);
+ return this.client.getLroResult(response, ClusterInner.class, ClusterInner.class,
+ context);
}
/**
@@ -1114,25 +1223,6 @@ private Mono updateAsync(String resourceGroupName, String clusterN
.flatMap(this.client::getLroFinalResultOrError);
}
- /**
- * Updates a Log Analytics cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param clusterName Name of the Log Analytics Cluster.
- * @param parameters The parameters required to patch a Log Analytics cluster.
- * @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 top level Log Analytics cluster resource container on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono updateAsync(String resourceGroupName, String clusterName, ClusterPatch parameters,
- Context context) {
- return beginUpdateAsync(resourceGroupName, clusterName, parameters, context).last()
- .flatMap(this.client::getLroFinalResultOrError);
- }
-
/**
* Updates a Log Analytics cluster.
*
@@ -1146,7 +1236,7 @@ private Mono updateAsync(String resourceGroupName, String clusterN
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public ClusterInner update(String resourceGroupName, String clusterName, ClusterPatch parameters) {
- return updateAsync(resourceGroupName, clusterName, parameters).block();
+ return beginUpdate(resourceGroupName, clusterName, parameters).getFinalResult();
}
/**
@@ -1163,7 +1253,7 @@ public ClusterInner update(String resourceGroupName, String clusterName, Cluster
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public ClusterInner update(String resourceGroupName, String clusterName, ClusterPatch parameters, Context context) {
- return updateAsync(resourceGroupName, clusterName, parameters, context).block();
+ return beginUpdate(resourceGroupName, clusterName, parameters, context).getFinalResult();
}
/**
@@ -1173,7 +1263,7 @@ public ClusterInner update(String resourceGroupName, String clusterName, Cluster
* @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 clusters operation response along with {@link PagedResponse} on successful completion of
+ * @return log Analytics clusters in a resource group along with {@link PagedResponse} on successful completion of
* {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
@@ -1194,6 +1284,33 @@ private Mono> listByResourceGroupNextSinglePageAsync
.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 log Analytics clusters in a resource group along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listByResourceGroupNextSinglePage(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.listByResourceGroupNextSync(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.
*
@@ -1202,23 +1319,24 @@ private Mono> listByResourceGroupNextSinglePageAsync
* @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 clusters operation response along with {@link PagedResponse} on successful completion of
- * {@link Mono}.
+ * @return log Analytics clusters in a resource group along with {@link PagedResponse}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, Context context) {
+ private PagedResponse listByResourceGroupNextSinglePage(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.listByResourceGroupNext(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.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
}
/**
@@ -1228,7 +1346,7 @@ private Mono> listByResourceGroupNextSinglePageAsync
* @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 clusters operation response along with {@link PagedResponse} on successful completion of
+ * @return the Log Analytics clusters in a subscription along with {@link PagedResponse} on successful completion of
* {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
@@ -1247,6 +1365,33 @@ private Mono> listNextSinglePageAsync(String nextLin
.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 the Log Analytics clusters in a subscription 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.
*
@@ -1255,22 +1400,24 @@ private Mono> listNextSinglePageAsync(String nextLin
* @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 clusters operation response along with {@link PagedResponse} on successful completion of
- * {@link Mono}.
+ * @return the Log Analytics clusters in a subscription 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(ClustersClientImpl.class);
}
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/DataExportsClientImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/DataExportsClientImpl.java
index cc3f35ee6341..30251c939268 100644
--- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/DataExportsClientImpl.java
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/DataExportsClientImpl.java
@@ -28,6 +28,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.loganalytics.fluent.DataExportsClient;
import com.azure.resourcemanager.loganalytics.fluent.models.DataExportInner;
import com.azure.resourcemanager.loganalytics.models.DataExportListResult;
@@ -63,7 +64,7 @@ public final class DataExportsClientImpl implements DataExportsClient {
* proxy service to perform REST calls.
*/
@Host("{$host}")
- @ServiceInterface(name = "OperationalInsightsM")
+ @ServiceInterface(name = "OperationalInsightsManagementClientDataExports")
public interface DataExportsService {
@Headers({ "Content-Type: application/json" })
@Get("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataExports")
@@ -74,6 +75,15 @@ Mono> listByWorkspace(@HostParam("$host") String
@PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName,
@QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context);
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataExports")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listByWorkspaceSync(@HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName,
+ @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context);
+
@Headers({ "Content-Type: application/json" })
@Put("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataExports/{dataExportName}")
@ExpectedResponses({ 200, 201 })
@@ -85,6 +95,17 @@ Mono> createOrUpdate(@HostParam("$host") String endpoi
@BodyParam("application/json") DataExportInner parameters, @HeaderParam("Accept") String accept,
Context context);
+ @Headers({ "Content-Type: application/json" })
+ @Put("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataExports/{dataExportName}")
+ @ExpectedResponses({ 200, 201 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response createOrUpdateSync(@HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName,
+ @PathParam("dataExportName") String dataExportName, @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") DataExportInner parameters, @HeaderParam("Accept") String accept,
+ Context context);
+
@Headers({ "Content-Type: application/json" })
@Get("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataExports/{dataExportName}")
@ExpectedResponses({ 200 })
@@ -95,6 +116,16 @@ Mono> get(@HostParam("$host") String endpoint,
@PathParam("dataExportName") String dataExportName, @QueryParam("api-version") String apiVersion,
@HeaderParam("Accept") String accept, Context context);
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataExports/{dataExportName}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response getSync(@HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName,
+ @PathParam("dataExportName") String dataExportName, @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept, Context context);
+
@Headers({ "Content-Type: application/json" })
@Delete("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataExports/{dataExportName}")
@ExpectedResponses({ 200, 404 })
@@ -104,6 +135,16 @@ Mono> delete(@HostParam("$host") String endpoint,
@PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName,
@PathParam("dataExportName") String dataExportName, @QueryParam("api-version") String apiVersion,
@HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Delete("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataExports/{dataExportName}")
+ @ExpectedResponses({ 200, 404 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response deleteSync(@HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName,
+ @PathParam("dataExportName") String dataExportName, @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept, Context context);
}
/**
@@ -135,11 +176,10 @@ private Mono> listByWorkspaceSinglePageAsync(Stri
if (workspaceName == null) {
return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null."));
}
- final String apiVersion = "2020-08-01";
final String accept = "application/json";
return FluxUtil
.withContext(context -> service.listByWorkspace(this.client.getEndpoint(), this.client.getSubscriptionId(),
- resourceGroupName, workspaceName, apiVersion, accept, context))
+ resourceGroupName, workspaceName, this.client.getApiVersion(), accept, context))
.>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(),
res.getHeaders(), res.getValue().value(), null, null))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
@@ -150,39 +190,14 @@ private Mono> listByWorkspaceSinglePageAsync(Stri
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param workspaceName The name of the workspace.
- * @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 result of the request to list data exports along with {@link PagedResponse} on successful completion of
- * {@link Mono}.
+ * @return result of the request to list data exports as paginated response with {@link PagedFlux}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listByWorkspaceSinglePageAsync(String resourceGroupName,
- String workspaceName, 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 (workspaceName == null) {
- return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null."));
- }
- final String apiVersion = "2020-08-01";
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service
- .listByWorkspace(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName,
- workspaceName, apiVersion, accept, context)
- .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
- res.getValue().value(), null, null));
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByWorkspaceAsync(String resourceGroupName, String workspaceName) {
+ return new PagedFlux<>(() -> listByWorkspaceSinglePageAsync(resourceGroupName, workspaceName));
}
/**
@@ -193,11 +208,34 @@ private Mono> listByWorkspaceSinglePageAsync(Stri
* @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 result of the request to list data exports as paginated response with {@link PagedFlux}.
+ * @return result of the request to list data exports along with {@link PagedResponse}.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listByWorkspaceAsync(String resourceGroupName, String workspaceName) {
- return new PagedFlux<>(() -> listByWorkspaceSinglePageAsync(resourceGroupName, workspaceName));
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listByWorkspaceSinglePage(String resourceGroupName, String workspaceName) {
+ 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 (workspaceName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter workspaceName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ Response res
+ = service.listByWorkspaceSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName,
+ workspaceName, this.client.getApiVersion(), accept, Context.NONE);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ null, null);
}
/**
@@ -209,12 +247,35 @@ private PagedFlux listByWorkspaceAsync(String resourceGroupName
* @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 result of the request to list data exports as paginated response with {@link PagedFlux}.
+ * @return result of the request to list data exports along with {@link PagedResponse}.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listByWorkspaceAsync(String resourceGroupName, String workspaceName,
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listByWorkspaceSinglePage(String resourceGroupName, String workspaceName,
Context context) {
- return new PagedFlux<>(() -> listByWorkspaceSinglePageAsync(resourceGroupName, workspaceName, 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 (workspaceName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter workspaceName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ Response res
+ = service.listByWorkspaceSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName,
+ workspaceName, this.client.getApiVersion(), accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ null, null);
}
/**
@@ -229,7 +290,7 @@ private PagedFlux listByWorkspaceAsync(String resourceGroupName
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable listByWorkspace(String resourceGroupName, String workspaceName) {
- return new PagedIterable<>(listByWorkspaceAsync(resourceGroupName, workspaceName));
+ return new PagedIterable<>(() -> listByWorkspaceSinglePage(resourceGroupName, workspaceName));
}
/**
@@ -246,7 +307,7 @@ public PagedIterable listByWorkspace(String resourceGroupName,
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable listByWorkspace(String resourceGroupName, String workspaceName,
Context context) {
- return new PagedIterable<>(listByWorkspaceAsync(resourceGroupName, workspaceName, context));
+ return new PagedIterable<>(() -> listByWorkspaceSinglePage(resourceGroupName, workspaceName, context));
}
/**
@@ -288,61 +349,14 @@ private Mono> createOrUpdateWithResponseAsync(String r
} else {
parameters.validate();
}
- final String apiVersion = "2020-08-01";
final String accept = "application/json";
return FluxUtil
.withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(),
- resourceGroupName, workspaceName, dataExportName, apiVersion, parameters, accept, context))
+ resourceGroupName, workspaceName, dataExportName, this.client.getApiVersion(), parameters, accept,
+ context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
- /**
- * Create or update a data export.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param workspaceName The name of the workspace.
- * @param dataExportName The data export rule name.
- * @param parameters The parameters required to create or update a data export.
- * @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 top level data export resource container along with {@link Response} on successful completion of
- * {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> createOrUpdateWithResponseAsync(String resourceGroupName,
- String workspaceName, String dataExportName, DataExportInner parameters, 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 (workspaceName == null) {
- return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null."));
- }
- if (dataExportName == null) {
- return Mono.error(new IllegalArgumentException("Parameter dataExportName is required and cannot be null."));
- }
- if (parameters == null) {
- return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
- } else {
- parameters.validate();
- }
- final String apiVersion = "2020-08-01";
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName,
- workspaceName, dataExportName, apiVersion, parameters, accept, context);
- }
-
/**
* Create or update a data export.
*
@@ -378,8 +392,37 @@ private Mono createOrUpdateAsync(String resourceGroupName, Stri
@ServiceMethod(returns = ReturnType.SINGLE)
public Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName,
String dataExportName, DataExportInner parameters, Context context) {
- return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, dataExportName, parameters, 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 (workspaceName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter workspaceName is required and cannot be null."));
+ }
+ if (dataExportName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter dataExportName is required and cannot be null."));
+ }
+ if (parameters == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
+ return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName,
+ workspaceName, dataExportName, this.client.getApiVersion(), parameters, accept, context);
}
/**
@@ -433,54 +476,13 @@ private Mono> getWithResponseAsync(String resourceGrou
if (dataExportName == null) {
return Mono.error(new IllegalArgumentException("Parameter dataExportName is required and cannot be null."));
}
- final String apiVersion = "2020-08-01";
final String accept = "application/json";
return FluxUtil
.withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(),
- resourceGroupName, workspaceName, dataExportName, apiVersion, accept, context))
+ resourceGroupName, workspaceName, dataExportName, this.client.getApiVersion(), accept, context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
- /**
- * Gets a data export instance.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param workspaceName The name of the workspace.
- * @param dataExportName The data export rule 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 a data export instance along with {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName,
- String dataExportName, 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 (workspaceName == null) {
- return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null."));
- }
- if (dataExportName == null) {
- return Mono.error(new IllegalArgumentException("Parameter dataExportName is required and cannot be null."));
- }
- final String apiVersion = "2020-08-01";
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, workspaceName,
- dataExportName, apiVersion, accept, context);
- }
-
/**
* Gets a data export instance.
*
@@ -513,7 +515,31 @@ private Mono getAsync(String resourceGroupName, String workspac
@ServiceMethod(returns = ReturnType.SINGLE)
public Response getWithResponse(String resourceGroupName, String workspaceName,
String dataExportName, Context context) {
- return getWithResponseAsync(resourceGroupName, workspaceName, dataExportName, 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 (workspaceName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter workspaceName is required and cannot be null."));
+ }
+ if (dataExportName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter dataExportName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return service.getSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName,
+ workspaceName, dataExportName, this.client.getApiVersion(), accept, context);
}
/**
@@ -564,54 +590,13 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S
if (dataExportName == null) {
return Mono.error(new IllegalArgumentException("Parameter dataExportName is required and cannot be null."));
}
- final String apiVersion = "2020-08-01";
final String accept = "application/json";
return FluxUtil
.withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(),
- resourceGroupName, workspaceName, dataExportName, apiVersion, accept, context))
+ resourceGroupName, workspaceName, dataExportName, this.client.getApiVersion(), accept, context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
- /**
- * Deletes the specified data export in a given workspace..
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param workspaceName The name of the workspace.
- * @param dataExportName The data export rule 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 {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> deleteWithResponseAsync(String resourceGroupName, String workspaceName,
- String dataExportName, 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 (workspaceName == null) {
- return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null."));
- }
- if (dataExportName == null) {
- return Mono.error(new IllegalArgumentException("Parameter dataExportName is required and cannot be null."));
- }
- final String apiVersion = "2020-08-01";
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName,
- workspaceName, dataExportName, apiVersion, accept, context);
- }
-
/**
* Deletes the specified data export in a given workspace..
*
@@ -644,7 +629,31 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S
@ServiceMethod(returns = ReturnType.SINGLE)
public Response deleteWithResponse(String resourceGroupName, String workspaceName, String dataExportName,
Context context) {
- return deleteWithResponseAsync(resourceGroupName, workspaceName, dataExportName, 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 (workspaceName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter workspaceName is required and cannot be null."));
+ }
+ if (dataExportName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter dataExportName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return service.deleteSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName,
+ workspaceName, dataExportName, this.client.getApiVersion(), accept, context);
}
/**
@@ -661,4 +670,6 @@ public Response deleteWithResponse(String resourceGroupName, String worksp
public void delete(String resourceGroupName, String workspaceName, String dataExportName) {
deleteWithResponse(resourceGroupName, workspaceName, dataExportName, Context.NONE);
}
+
+ private static final ClientLogger LOGGER = new ClientLogger(DataExportsClientImpl.class);
}
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/DataSourcesClientImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/DataSourcesClientImpl.java
index 79fcd6463169..f1f8487cacb5 100644
--- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/DataSourcesClientImpl.java
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/DataSourcesClientImpl.java
@@ -28,6 +28,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.loganalytics.fluent.DataSourcesClient;
import com.azure.resourcemanager.loganalytics.fluent.models.DataSourceInner;
import com.azure.resourcemanager.loganalytics.models.DataSourceListResult;
@@ -63,7 +64,7 @@ public final class DataSourcesClientImpl implements DataSourcesClient {
* proxy service to perform REST calls.
*/
@Host("{$host}")
- @ServiceInterface(name = "OperationalInsightsM")
+ @ServiceInterface(name = "OperationalInsightsManagementClientDataSources")
public interface DataSourcesService {
@Headers({ "Content-Type: application/json" })
@Put("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataSources/{dataSourceName}")
@@ -76,6 +77,17 @@ Mono> createOrUpdate(@HostParam("$host") String endpoi
@BodyParam("application/json") DataSourceInner parameters, @HeaderParam("Accept") String accept,
Context context);
+ @Headers({ "Content-Type: application/json" })
+ @Put("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataSources/{dataSourceName}")
+ @ExpectedResponses({ 200, 201 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response createOrUpdateSync(@HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName,
+ @PathParam("dataSourceName") String dataSourceName, @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @BodyParam("application/json") DataSourceInner parameters, @HeaderParam("Accept") String accept,
+ Context context);
+
@Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" })
@Delete("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataSources/{dataSourceName}")
@ExpectedResponses({ 200, 204 })
@@ -85,6 +97,15 @@ Mono> delete(@HostParam("$host") String endpoint,
@PathParam("dataSourceName") String dataSourceName, @QueryParam("api-version") String apiVersion,
@PathParam("subscriptionId") String subscriptionId, Context context);
+ @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" })
+ @Delete("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataSources/{dataSourceName}")
+ @ExpectedResponses({ 200, 204 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response deleteSync(@HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName,
+ @PathParam("dataSourceName") String dataSourceName, @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId, Context context);
+
@Headers({ "Content-Type: application/json" })
@Get("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataSources/{dataSourceName}")
@ExpectedResponses({ 200 })
@@ -94,6 +115,15 @@ Mono> get(@HostParam("$host") String endpoint,
@PathParam("dataSourceName") String dataSourceName, @QueryParam("api-version") String apiVersion,
@PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context);
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataSources/{dataSourceName}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response getSync(@HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName,
+ @PathParam("dataSourceName") String dataSourceName, @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context);
+
@Headers({ "Content-Type: application/json" })
@Get("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataSources")
@ExpectedResponses({ 200 })
@@ -104,6 +134,16 @@ Mono> listByWorkspace(@HostParam("$host") String
@QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
@HeaderParam("Accept") String accept, Context context);
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataSources")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listByWorkspaceSync(@HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName,
+ @QueryParam("$filter") String filter, @QueryParam("$skiptoken") String skiptoken,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @HeaderParam("Accept") String accept, Context context);
+
@Headers({ "Content-Type: application/json" })
@Get("{nextLink}")
@ExpectedResponses({ 200 })
@@ -111,6 +151,14 @@ Mono> listByWorkspace(@HostParam("$host") String
Mono> listByWorkspaceNext(
@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 listByWorkspaceNextSync(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
}
/**
@@ -151,60 +199,14 @@ private Mono> createOrUpdateWithResponseAsync(String r
} else {
parameters.validate();
}
- final String apiVersion = "2020-08-01";
final String accept = "application/json";
return FluxUtil
.withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, workspaceName,
- dataSourceName, apiVersion, this.client.getSubscriptionId(), parameters, accept, context))
+ dataSourceName, this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, accept,
+ context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
- /**
- * Create or update a data source.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param workspaceName The name of the workspace.
- * @param dataSourceName The name of the datasource resource.
- * @param parameters The parameters required to create or update a datasource.
- * @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 datasources under OMS Workspace along with {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> createOrUpdateWithResponseAsync(String resourceGroupName,
- String workspaceName, String dataSourceName, DataSourceInner parameters, Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (workspaceName == null) {
- return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null."));
- }
- if (dataSourceName == null) {
- return Mono.error(new IllegalArgumentException("Parameter dataSourceName is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (parameters == null) {
- return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
- } else {
- parameters.validate();
- }
- final String apiVersion = "2020-08-01";
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, workspaceName, dataSourceName,
- apiVersion, this.client.getSubscriptionId(), parameters, accept, context);
- }
-
/**
* Create or update a data source.
*
@@ -240,8 +242,37 @@ private Mono createOrUpdateAsync(String resourceGroupName, Stri
@ServiceMethod(returns = ReturnType.SINGLE)
public Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName,
String dataSourceName, DataSourceInner parameters, Context context) {
- return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, dataSourceName, parameters, context)
- .block();
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (workspaceName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter workspaceName is required and cannot be null."));
+ }
+ if (dataSourceName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter dataSourceName 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 (parameters == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
+ return service.createOrUpdateSync(this.client.getEndpoint(), resourceGroupName, workspaceName, dataSourceName,
+ this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, accept, context);
}
/**
@@ -295,52 +326,12 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S
return Mono.error(new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
- final String apiVersion = "2020-08-01";
return FluxUtil
.withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, workspaceName,
- dataSourceName, apiVersion, this.client.getSubscriptionId(), context))
+ dataSourceName, this.client.getApiVersion(), this.client.getSubscriptionId(), context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
- /**
- * Deletes a data source instance.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param workspaceName The name of the workspace.
- * @param dataSourceName Name of the datasource.
- * @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 workspaceName,
- String dataSourceName, Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (workspaceName == null) {
- return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null."));
- }
- if (dataSourceName == null) {
- return Mono.error(new IllegalArgumentException("Parameter dataSourceName is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- final String apiVersion = "2020-08-01";
- context = this.client.mergeContext(context);
- return service.delete(this.client.getEndpoint(), resourceGroupName, workspaceName, dataSourceName, apiVersion,
- this.client.getSubscriptionId(), context);
- }
-
/**
* Deletes a data source instance.
*
@@ -373,7 +364,30 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S
@ServiceMethod(returns = ReturnType.SINGLE)
public Response deleteWithResponse(String resourceGroupName, String workspaceName, String dataSourceName,
Context context) {
- return deleteWithResponseAsync(resourceGroupName, workspaceName, dataSourceName, context).block();
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (workspaceName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter workspaceName is required and cannot be null."));
+ }
+ if (dataSourceName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter dataSourceName 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."));
+ }
+ return service.deleteSync(this.client.getEndpoint(), resourceGroupName, workspaceName, dataSourceName,
+ this.client.getApiVersion(), this.client.getSubscriptionId(), context);
}
/**
@@ -423,54 +437,13 @@ private Mono> getWithResponseAsync(String resourceGrou
return Mono.error(new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
- final String apiVersion = "2020-08-01";
final String accept = "application/json";
return FluxUtil
.withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, workspaceName,
- dataSourceName, apiVersion, this.client.getSubscriptionId(), accept, context))
+ dataSourceName, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
- /**
- * Gets a datasource instance.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param workspaceName The name of the workspace.
- * @param dataSourceName Name of the datasource.
- * @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 datasource instance along with {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName,
- String dataSourceName, Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (workspaceName == null) {
- return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null."));
- }
- if (dataSourceName == null) {
- return Mono.error(new IllegalArgumentException("Parameter dataSourceName is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- final String apiVersion = "2020-08-01";
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.get(this.client.getEndpoint(), resourceGroupName, workspaceName, dataSourceName, apiVersion,
- this.client.getSubscriptionId(), accept, context);
- }
-
/**
* Gets a datasource instance.
*
@@ -503,7 +476,31 @@ private Mono getAsync(String resourceGroupName, String workspac
@ServiceMethod(returns = ReturnType.SINGLE)
public Response getWithResponse(String resourceGroupName, String workspaceName,
String dataSourceName, Context context) {
- return getWithResponseAsync(resourceGroupName, workspaceName, dataSourceName, context).block();
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (workspaceName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter workspaceName is required and cannot be null."));
+ }
+ if (dataSourceName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter dataSourceName 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."));
+ }
+ final String accept = "application/json";
+ return service.getSync(this.client.getEndpoint(), resourceGroupName, workspaceName, dataSourceName,
+ this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context);
}
/**
@@ -556,11 +553,10 @@ private Mono> listByWorkspaceSinglePageAsync(Stri
return Mono.error(new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
- final String apiVersion = "2020-08-01";
final String accept = "application/json";
return FluxUtil
.withContext(context -> service.listByWorkspace(this.client.getEndpoint(), resourceGroupName, workspaceName,
- filter, skiptoken, apiVersion, this.client.getSubscriptionId(), accept, context))
+ filter, skiptoken, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context))
.>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(),
res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
@@ -573,42 +569,18 @@ private Mono> listByWorkspaceSinglePageAsync(Stri
* @param workspaceName The name of the workspace.
* @param filter The filter to apply on the operation.
* @param skiptoken Starting point of the collection of data source instances.
- * @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 first page of data source instances in a workspace with the link to the next page along with
- * {@link PagedResponse} on successful completion of {@link Mono}.
+ * @return the first page of data source instances in a workspace with the link to the next page as paginated
+ * response with {@link PagedFlux}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listByWorkspaceSinglePageAsync(String resourceGroupName,
- String workspaceName, String filter, String skiptoken, Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (workspaceName == null) {
- return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null."));
- }
- if (filter == null) {
- return Mono.error(new IllegalArgumentException("Parameter filter is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- final String apiVersion = "2020-08-01";
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service
- .listByWorkspace(this.client.getEndpoint(), resourceGroupName, workspaceName, filter, skiptoken, apiVersion,
- this.client.getSubscriptionId(), 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 listByWorkspaceAsync(String resourceGroupName, String workspaceName,
+ String filter, String skiptoken) {
+ return new PagedFlux<>(
+ () -> listByWorkspaceSinglePageAsync(resourceGroupName, workspaceName, filter, skiptoken),
+ nextLink -> listByWorkspaceNextSinglePageAsync(nextLink));
}
/**
@@ -617,7 +589,6 @@ private Mono> listByWorkspaceSinglePageAsync(Stri
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param workspaceName The name of the workspace.
* @param filter The filter to apply on the operation.
- * @param skiptoken Starting point of the collection of data source instances.
* @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.
@@ -626,7 +597,8 @@ private Mono> listByWorkspaceSinglePageAsync(Stri
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listByWorkspaceAsync(String resourceGroupName, String workspaceName,
- String filter, String skiptoken) {
+ String filter) {
+ final String skiptoken = null;
return new PagedFlux<>(
() -> listByWorkspaceSinglePageAsync(resourceGroupName, workspaceName, filter, skiptoken),
nextLink -> listByWorkspaceNextSinglePageAsync(nextLink));
@@ -638,19 +610,44 @@ private PagedFlux