diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/CHANGELOG.md b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/CHANGELOG.md
index c33a6a0f4e61..18214ccf16e0 100644
--- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/CHANGELOG.md
+++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/CHANGELOG.md
@@ -1,14 +1,90 @@
# Release History
-## 1.3.0-beta.1 (Unreleased)
+## 1.3.0-beta.1 (2025-11-07)
-### Features Added
+- Azure Resource Manager NewRelicObservability client library for Java. This package contains Microsoft Azure SDK for NewRelicObservability Management SDK. Package tag package-2025-05-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
### Breaking Changes
-### Bugs Fixed
+#### `models.MonitorsSwitchBillingResponse` was removed
+
+#### `models.MonitorsSwitchBillingHeaders` was removed
+
+#### `models.BillingCycle` was removed
+
+#### `models.PlanData` was modified
+
+* `models.BillingCycle billingCycle()` -> `java.lang.String billingCycle()`
+* `withBillingCycle(models.BillingCycle)` was removed
+
+### Features Added
+
+* `models.SaaS` was added
+
+* `models.LatestLinkedSaaSResponse` was added
+
+* `models.ActivateSaaSParameterRequest` was added
+
+* `models.ResubscribeProperties` was added
+
+* `models.SaaSData` was added
+
+* `models.SaaSResourceDetailsResponse` was added
+
+#### `models.PlanData` was modified
+
+* `withBillingCycle(java.lang.String)` was added
+
+#### `models.MarketplaceSaaSInfo` was modified
+
+* `withPublisherId(java.lang.String)` was added
+* `withOfferId(java.lang.String)` was added
+* `publisherId()` was added
+* `offerId()` was added
+
+#### `models.NewRelicMonitorResource$Update` was modified
+
+* `withSaaSData(models.SaaSData)` was added
+
+#### `models.NewRelicMonitorResource` was modified
+
+* `latestLinkedSaaS()` was added
+* `linkSaaS(models.SaaSData)` was added
+* `refreshIngestionKeyWithResponse(com.azure.core.util.Context)` was added
+* `linkSaaS(models.SaaSData,com.azure.core.util.Context)` was added
+* `refreshIngestionKey()` was added
+* `resubscribe()` was added
+* `latestLinkedSaaSWithResponse(com.azure.core.util.Context)` was added
+* `saaSData()` was added
+* `resubscribe(models.ResubscribeProperties,com.azure.core.util.Context)` was added
+
+#### `models.NewRelicMonitorResource$Definition` was modified
+
+* `withSaaSData(models.SaaSData)` was added
+
+#### `models.NewRelicMonitorResourceUpdate` was modified
+
+* `withSaaSData(models.SaaSData)` was added
+* `saaSData()` was added
+
+#### `models.MonitoredSubscriptionProperties` was modified
+
+* `systemData()` was added
+
+#### `models.Monitors` was modified
+
+* `resubscribe(java.lang.String,java.lang.String,models.ResubscribeProperties,com.azure.core.util.Context)` was added
+* `latestLinkedSaaS(java.lang.String,java.lang.String)` was added
+* `refreshIngestionKeyWithResponse(java.lang.String,java.lang.String,com.azure.core.util.Context)` was added
+* `resubscribe(java.lang.String,java.lang.String)` was added
+* `latestLinkedSaaSWithResponse(java.lang.String,java.lang.String,com.azure.core.util.Context)` was added
+* `linkSaaS(java.lang.String,java.lang.String,models.SaaSData,com.azure.core.util.Context)` was added
+* `linkSaaS(java.lang.String,java.lang.String,models.SaaSData)` was added
+* `refreshIngestionKey(java.lang.String,java.lang.String)` was added
+
+#### `NewRelicObservabilityManager` was modified
-### Other Changes
+* `saaS()` was added
## 1.2.0 (2024-12-19)
diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/README.md b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/README.md
index c59c56d1ba2b..def001411d76 100644
--- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/README.md
+++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/README.md
@@ -2,7 +2,7 @@
Azure Resource Manager NewRelicObservability client library for Java.
-This package contains Microsoft Azure SDK for NewRelicObservability Management SDK. Package tag package-2024-01-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
+This package contains Microsoft Azure SDK for NewRelicObservability Management SDK. Package tag package-2025-05-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
## We'd love to hear your feedback
@@ -52,7 +52,7 @@ Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment
Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code:
```java
-AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE);
+AzureProfile profile = new AzureProfile(AzureCloud.AZURE_PUBLIC_CLOUD);
TokenCredential credential = new DefaultAzureCredentialBuilder()
.authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint())
.build();
@@ -60,7 +60,7 @@ NewRelicObservabilityManager manager = NewRelicObservabilityManager
.authenticate(credential, profile);
```
-The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise.
+The sample code assumes global Azure. Please change the `AzureCloud.AZURE_PUBLIC_CLOUD` variable if otherwise.
See [Authentication][authenticate] for more options.
@@ -100,5 +100,3 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m
[cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md
[coc]: https://opensource.microsoft.com/codeofconduct/
[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/
-
-
diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/SAMPLE.md b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/SAMPLE.md
index c2df2326dd3b..9be8fa73682a 100644
--- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/SAMPLE.md
+++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/SAMPLE.md
@@ -15,7 +15,7 @@
## MonitoredSubscriptions
-- [CreateorUpdate](#monitoredsubscriptions_createorupdate)
+- [CreateOrUpdate](#monitoredsubscriptions_createorupdate)
- [Delete](#monitoredsubscriptions_delete)
- [Get](#monitoredsubscriptions_get)
- [List](#monitoredsubscriptions_list)
@@ -28,12 +28,16 @@
- [GetByResourceGroup](#monitors_getbyresourcegroup)
- [GetMetricRules](#monitors_getmetricrules)
- [GetMetricStatus](#monitors_getmetricstatus)
+- [LatestLinkedSaaS](#monitors_latestlinkedsaas)
+- [LinkSaaS](#monitors_linksaas)
- [List](#monitors_list)
- [ListAppServices](#monitors_listappservices)
- [ListByResourceGroup](#monitors_listbyresourcegroup)
- [ListHosts](#monitors_listhosts)
- [ListLinkedResources](#monitors_listlinkedresources)
- [ListMonitoredResources](#monitors_listmonitoredresources)
+- [RefreshIngestionKey](#monitors_refreshingestionkey)
+- [Resubscribe](#monitors_resubscribe)
- [SwitchBilling](#monitors_switchbilling)
- [Update](#monitors_update)
- [VmHostPayload](#monitors_vmhostpayload)
@@ -50,6 +54,10 @@
- [List](#plans_list)
+## SaaS
+
+- [ActivateResource](#saas_activateresource)
+
## TagRules
- [CreateOrUpdate](#tagrules_createorupdate)
@@ -65,7 +73,8 @@
*/
public final class AccountsListSamples {
/*
- * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/
+ * x-ms-original-file:
+ * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/
* Accounts_List_MinimumSet_Gen.json
*/
/**
@@ -79,7 +88,8 @@ public final class AccountsListSamples {
}
/*
- * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/
+ * x-ms-original-file:
+ * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/
* Accounts_List_MaximumSet_Gen.json
*/
/**
@@ -103,7 +113,8 @@ public final class AccountsListSamples {
public final class BillingInfoGetSamples {
/*
* x-ms-original-file:
- * specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/BillingInfo_Get.json
+ * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/
+ * BillingInfo_Get.json
*/
/**
* Sample code: BillingInfo_Get.
@@ -125,7 +136,8 @@ public final class BillingInfoGetSamples {
*/
public final class ConnectedPartnerResourcesListSamples {
/*
- * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/
+ * x-ms-original-file:
+ * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/
* ConnectedPartnerResources_List.json
*/
/**
@@ -141,18 +153,19 @@ public final class ConnectedPartnerResourcesListSamples {
}
```
-### MonitoredSubscriptions_CreateorUpdate
+### MonitoredSubscriptions_CreateOrUpdate
```java
import com.azure.resourcemanager.newrelicobservability.models.ConfigurationName;
/**
- * Samples for MonitoredSubscriptions CreateorUpdate.
+ * Samples for MonitoredSubscriptions CreateOrUpdate.
*/
-public final class MonitoredSubscriptionsCreateorUpdateSamples {
+public final class MonitoredSubscriptionsCreateOrUpdateSamples {
/*
- * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/
- * MonitoredSubscriptions_CreateorUpdate.json
+ * x-ms-original-file:
+ * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/
+ * MonitoredSubscriptions_CreateOrUpdate.json
*/
/**
* Sample code: Monitors_AddMonitoredSubscriptions.
@@ -179,7 +192,8 @@ import com.azure.resourcemanager.newrelicobservability.models.ConfigurationName;
*/
public final class MonitoredSubscriptionsDeleteSamples {
/*
- * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/
+ * x-ms-original-file:
+ * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/
* MonitoredSubscriptions_Delete.json
*/
/**
@@ -205,7 +219,8 @@ import com.azure.resourcemanager.newrelicobservability.models.ConfigurationName;
*/
public final class MonitoredSubscriptionsGetSamples {
/*
- * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/
+ * x-ms-original-file:
+ * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/
* MonitoredSubscriptions_Get.json
*/
/**
@@ -230,7 +245,8 @@ public final class MonitoredSubscriptionsGetSamples {
*/
public final class MonitoredSubscriptionsListSamples {
/*
- * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/
+ * x-ms-original-file:
+ * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/
* MonitoredSubscriptions_List.json
*/
/**
@@ -256,7 +272,8 @@ import com.azure.resourcemanager.newrelicobservability.models.MonitoredSubscript
*/
public final class MonitoredSubscriptionsUpdateSamples {
/*
- * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/
+ * x-ms-original-file:
+ * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/
* MonitoredSubscriptions_Update.json
*/
/**
@@ -280,7 +297,6 @@ public final class MonitoredSubscriptionsUpdateSamples {
```java
import com.azure.resourcemanager.newrelicobservability.models.AccountCreationSource;
import com.azure.resourcemanager.newrelicobservability.models.AccountInfo;
-import com.azure.resourcemanager.newrelicobservability.models.BillingCycle;
import com.azure.resourcemanager.newrelicobservability.models.ManagedServiceIdentity;
import com.azure.resourcemanager.newrelicobservability.models.ManagedServiceIdentityType;
import com.azure.resourcemanager.newrelicobservability.models.NewRelicAccountProperties;
@@ -289,6 +305,7 @@ import com.azure.resourcemanager.newrelicobservability.models.OrgCreationSource;
import com.azure.resourcemanager.newrelicobservability.models.OrganizationInfo;
import com.azure.resourcemanager.newrelicobservability.models.PlanData;
import com.azure.resourcemanager.newrelicobservability.models.ProvisioningState;
+import com.azure.resourcemanager.newrelicobservability.models.SaaSData;
import com.azure.resourcemanager.newrelicobservability.models.SingleSignOnStates;
import com.azure.resourcemanager.newrelicobservability.models.UsageType;
import com.azure.resourcemanager.newrelicobservability.models.UserAssignedIdentity;
@@ -302,7 +319,8 @@ import java.util.Map;
*/
public final class MonitorsCreateOrUpdateSamples {
/*
- * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/
+ * x-ms-original-file:
+ * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/
* Monitors_CreateOrUpdate_MaximumSet_Gen.json
*/
/**
@@ -335,9 +353,11 @@ public final class MonitorsCreateOrUpdateSamples {
.withPhoneNumber("krf")
.withCountry("hslqnwdanrconqyekwbnttaetv"))
.withPlanData(new PlanData().withUsageType(UsageType.PAYG)
- .withBillingCycle(BillingCycle.YEARLY)
+ .withBillingCycle("Yearly")
.withPlanDetails("tbbiaga")
.withEffectiveDate(OffsetDateTime.parse("2022-12-05T14:11:37.786Z")))
+ .withSaaSData(new SaaSData().withSaaSResourceId(
+ "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgNewRelic/providers/Microsoft.SaaS/resources/abcd"))
.withOrgCreationSource(OrgCreationSource.LIFTR)
.withAccountCreationSource(AccountCreationSource.LIFTR)
.withSubscriptionState("Suspended")
@@ -367,7 +387,8 @@ public final class MonitorsCreateOrUpdateSamples {
*/
public final class MonitorsDeleteSamples {
/*
- * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/
+ * x-ms-original-file:
+ * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/
* Monitors_Delete_MinimumSet_Gen.json
*/
/**
@@ -378,12 +399,13 @@ public final class MonitorsDeleteSamples {
public static void monitorsDeleteMinimumSetGen(
com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager) {
manager.monitors()
- .delete("rgopenapi", "ruxvg@xqkmdhrnoo.hlmbpm", "ipxmlcbonyxtolzejcjshkmlron",
+ .delete("rgopenapi", "ipxmlcbonyxtolzejcjshkmlron", "ruxvg@xqkmdhrnoo.hlmbpm",
com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/
+ * x-ms-original-file:
+ * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/
* Monitors_Delete_MaximumSet_Gen.json
*/
/**
@@ -394,7 +416,7 @@ public final class MonitorsDeleteSamples {
public static void monitorsDeleteMaximumSetGen(
com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager) {
manager.monitors()
- .delete("rgopenapi", "ruxvg@xqkmdhrnoo.hlmbpm", "ipxmlcbonyxtolzejcjshkmlron",
+ .delete("rgopenapi", "ipxmlcbonyxtolzejcjshkmlron", "ruxvg@xqkmdhrnoo.hlmbpm",
com.azure.core.util.Context.NONE);
}
}
@@ -408,7 +430,8 @@ public final class MonitorsDeleteSamples {
*/
public final class MonitorsGetByResourceGroupSamples {
/*
- * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/
+ * x-ms-original-file:
+ * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/
* Monitors_Get_MaximumSet_Gen.json
*/
/**
@@ -433,7 +456,8 @@ import com.azure.resourcemanager.newrelicobservability.models.MetricsRequest;
*/
public final class MonitorsGetMetricRulesSamples {
/*
- * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/
+ * x-ms-original-file:
+ * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/
* Monitors_GetMetricRules_MinimumSet_Gen.json
*/
/**
@@ -449,7 +473,8 @@ public final class MonitorsGetMetricRulesSamples {
}
/*
- * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/
+ * x-ms-original-file:
+ * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/
* Monitors_GetMetricRules_MaximumSet_Gen.json
*/
/**
@@ -477,7 +502,8 @@ import java.util.Arrays;
*/
public final class MonitorsGetMetricStatusSamples {
/*
- * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/
+ * x-ms-original-file:
+ * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/
* Monitors_GetMetricStatus_MinimumSet_Gen.json
*/
/**
@@ -496,7 +522,8 @@ public final class MonitorsGetMetricStatusSamples {
}
/*
- * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/
+ * x-ms-original-file:
+ * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/
* Monitors_GetMetricStatus_MaximumSet_Gen.json
*/
/**
@@ -516,6 +543,76 @@ public final class MonitorsGetMetricStatusSamples {
}
```
+### Monitors_LatestLinkedSaaS
+
+```java
+/**
+ * Samples for Monitors LatestLinkedSaaS.
+ */
+public final class MonitorsLatestLinkedSaaSSamples {
+ /*
+ * x-ms-original-file:
+ * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/
+ * Monitors_LatestLinkedSaaS_MinimumSet_Gen.json
+ */
+ /**
+ * Sample code: Monitors_LatestLinkedSaaS_MinimumSet_Gen.
+ *
+ * @param manager Entry point to NewRelicObservabilityManager.
+ */
+ public static void monitorsLatestLinkedSaaSMinimumSetGen(
+ com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager) {
+ manager.monitors()
+ .latestLinkedSaaSWithResponse("rgopenapi", "ipxmlcbonyxtolzejcjshkmlron", com.azure.core.util.Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file:
+ * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/
+ * Monitors_LatestLinkedSaaS_MaximumSet_Gen.json
+ */
+ /**
+ * Sample code: Monitors_LatestLinkedSaaS_MaximumSet_Gen.
+ *
+ * @param manager Entry point to NewRelicObservabilityManager.
+ */
+ public static void monitorsLatestLinkedSaaSMaximumSetGen(
+ com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager) {
+ manager.monitors()
+ .latestLinkedSaaSWithResponse("rgopenapi", "ipxmlcbonyxtolzejcjshkmlron", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### Monitors_LinkSaaS
+
+```java
+import com.azure.resourcemanager.newrelicobservability.models.SaaSData;
+
+/**
+ * Samples for Monitors LinkSaaS.
+ */
+public final class MonitorsLinkSaaSSamples {
+ /*
+ * x-ms-original-file:
+ * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/
+ * Monitors_LinkSaaS.json
+ */
+ /**
+ * Sample code: Monitors_LinkSaaS.
+ *
+ * @param manager Entry point to NewRelicObservabilityManager.
+ */
+ public static void
+ monitorsLinkSaaS(com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager) {
+ manager.monitors()
+ .linkSaaS("myResourceGroup", "myMonitor", new SaaSData().withSaaSResourceId(
+ "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgNewRelic/providers/Microsoft.SaaS/resources/abcd"),
+ com.azure.core.util.Context.NONE);
+ }
+}
+```
+
### Monitors_List
```java
@@ -524,7 +621,8 @@ public final class MonitorsGetMetricStatusSamples {
*/
public final class MonitorsListSamples {
/*
- * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/
+ * x-ms-original-file:
+ * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/
* Monitors_ListBySubscription_MaximumSet_Gen.json
*/
/**
@@ -550,7 +648,8 @@ import java.util.Arrays;
*/
public final class MonitorsListAppServicesSamples {
/*
- * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/
+ * x-ms-original-file:
+ * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/
* Monitors_ListAppServices_MaximumSet_Gen.json
*/
/**
@@ -569,7 +668,8 @@ public final class MonitorsListAppServicesSamples {
}
/*
- * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/
+ * x-ms-original-file:
+ * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/
* Monitors_ListAppServices_MinimumSet_Gen.json
*/
/**
@@ -597,7 +697,8 @@ public final class MonitorsListAppServicesSamples {
*/
public final class MonitorsListByResourceGroupSamples {
/*
- * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/
+ * x-ms-original-file:
+ * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/
* Monitors_ListByResourceGroup_MaximumSet_Gen.json
*/
/**
@@ -623,7 +724,8 @@ import java.util.Arrays;
*/
public final class MonitorsListHostsSamples {
/*
- * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/
+ * x-ms-original-file:
+ * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/
* Monitors_ListHosts_MinimumSet_Gen.json
*/
/**
@@ -641,7 +743,8 @@ public final class MonitorsListHostsSamples {
}
/*
- * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/
+ * x-ms-original-file:
+ * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/
* Monitors_ListHosts_MaximumSet_Gen.json
*/
/**
@@ -669,8 +772,8 @@ public final class MonitorsListHostsSamples {
public final class MonitorsListLinkedResourcesSamples {
/*
* x-ms-original-file:
- * specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/LinkedResources_List.
- * json
+ * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/
+ * LinkedResources_List.json
*/
/**
* Sample code: Monitors_ListLinkedResources.
@@ -692,7 +795,8 @@ public final class MonitorsListLinkedResourcesSamples {
*/
public final class MonitorsListMonitoredResourcesSamples {
/*
- * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/
+ * x-ms-original-file:
+ * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/
* Monitors_ListMonitoredResources_MinimumSet_Gen.json
*/
/**
@@ -707,7 +811,8 @@ public final class MonitorsListMonitoredResourcesSamples {
}
/*
- * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/
+ * x-ms-original-file:
+ * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/
* Monitors_ListMonitoredResources_MaximumSet_Gen.json
*/
/**
@@ -723,10 +828,59 @@ public final class MonitorsListMonitoredResourcesSamples {
}
```
+### Monitors_RefreshIngestionKey
+
+```java
+/**
+ * Samples for Monitors RefreshIngestionKey.
+ */
+public final class MonitorsRefreshIngestionKeySamples {
+ /*
+ * x-ms-original-file:
+ * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/
+ * Monitors_RefreshIngestionKey.json
+ */
+ /**
+ * Sample code: Monitors_RefreshIngestionKey.
+ *
+ * @param manager Entry point to NewRelicObservabilityManager.
+ */
+ public static void monitorsRefreshIngestionKey(
+ com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager) {
+ manager.monitors()
+ .refreshIngestionKeyWithResponse("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### Monitors_Resubscribe
+
+```java
+
+/**
+ * Samples for Monitors Resubscribe.
+ */
+public final class MonitorsResubscribeSamples {
+ /*
+ * x-ms-original-file:
+ * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/
+ * Monitors_Resubscribe.json
+ */
+ /**
+ * Sample code: Monitors_Resubscribe.
+ *
+ * @param manager Entry point to NewRelicObservabilityManager.
+ */
+ public static void
+ monitorsResubscribe(com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager) {
+ manager.monitors().resubscribe("myResourceGroup", "myMonitor", null, com.azure.core.util.Context.NONE);
+ }
+}
+```
+
### Monitors_SwitchBilling
```java
-import com.azure.resourcemanager.newrelicobservability.models.BillingCycle;
import com.azure.resourcemanager.newrelicobservability.models.PlanData;
import com.azure.resourcemanager.newrelicobservability.models.SwitchBillingRequest;
import com.azure.resourcemanager.newrelicobservability.models.UsageType;
@@ -737,7 +891,8 @@ import java.time.OffsetDateTime;
*/
public final class MonitorsSwitchBillingSamples {
/*
- * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/
+ * x-ms-original-file:
+ * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/
* Monitors_SwitchBilling_MinimumSet_Gen.json
*/
/**
@@ -753,7 +908,8 @@ public final class MonitorsSwitchBillingSamples {
}
/*
- * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/
+ * x-ms-original-file:
+ * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/
* Monitors_SwitchBilling_MaximumSet_Gen.json
*/
/**
@@ -769,7 +925,7 @@ public final class MonitorsSwitchBillingSamples {
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgNewRelic/providers/NewRelic.Observability/monitors/fhcjxnxumkdlgpwanewtkdnyuz")
.withOrganizationId("k")
.withPlanData(new PlanData().withUsageType(UsageType.PAYG)
- .withBillingCycle(BillingCycle.YEARLY)
+ .withBillingCycle("Yearly")
.withPlanDetails("tbbiaga")
.withEffectiveDate(OffsetDateTime.parse("2022-12-05T14:11:37.786Z")))
.withUserEmail("ruxvg@xqkmdhrnoo.hlmbpm"),
@@ -783,7 +939,6 @@ public final class MonitorsSwitchBillingSamples {
```java
import com.azure.resourcemanager.newrelicobservability.models.AccountCreationSource;
import com.azure.resourcemanager.newrelicobservability.models.AccountInfo;
-import com.azure.resourcemanager.newrelicobservability.models.BillingCycle;
import com.azure.resourcemanager.newrelicobservability.models.ManagedServiceIdentity;
import com.azure.resourcemanager.newrelicobservability.models.ManagedServiceIdentityType;
import com.azure.resourcemanager.newrelicobservability.models.NewRelicAccountProperties;
@@ -806,7 +961,8 @@ import java.util.Map;
*/
public final class MonitorsUpdateSamples {
/*
- * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/
+ * x-ms-original-file:
+ * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/
* Monitors_Update_MaximumSet_Gen.json
*/
/**
@@ -839,7 +995,7 @@ public final class MonitorsUpdateSamples {
.withPhoneNumber("krf")
.withCountry("hslqnwdanrconqyekwbnttaetv"))
.withPlanData(new PlanData().withUsageType(UsageType.PAYG)
- .withBillingCycle(BillingCycle.YEARLY)
+ .withBillingCycle("Yearly")
.withPlanDetails("tbbiaga")
.withEffectiveDate(OffsetDateTime.parse("2022-12-05T14:11:37.786Z")))
.withOrgCreationSource(OrgCreationSource.LIFTR)
@@ -869,7 +1025,8 @@ public final class MonitorsUpdateSamples {
*/
public final class MonitorsVmHostPayloadSamples {
/*
- * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/
+ * x-ms-original-file:
+ * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/
* Monitors_VmHostPayload_MinimumSet_Gen.json
*/
/**
@@ -884,7 +1041,8 @@ public final class MonitorsVmHostPayloadSamples {
}
/*
- * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/
+ * x-ms-original-file:
+ * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/
* Monitors_VmHostPayload_MaximumSet_Gen.json
*/
/**
@@ -908,7 +1066,8 @@ public final class MonitorsVmHostPayloadSamples {
*/
public final class OperationsListSamples {
/*
- * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/
+ * x-ms-original-file:
+ * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/
* Operations_List_MinimumSet_Gen.json
*/
/**
@@ -922,7 +1081,8 @@ public final class OperationsListSamples {
}
/*
- * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/
+ * x-ms-original-file:
+ * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/
* Operations_List_MaximumSet_Gen.json
*/
/**
@@ -945,7 +1105,8 @@ public final class OperationsListSamples {
*/
public final class OrganizationsListSamples {
/*
- * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/
+ * x-ms-original-file:
+ * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/
* Organizations_List_MinimumSet_Gen.json
*/
/**
@@ -959,7 +1120,8 @@ public final class OrganizationsListSamples {
}
/*
- * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/
+ * x-ms-original-file:
+ * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/
* Organizations_List_MaximumSet_Gen.json
*/
/**
@@ -982,7 +1144,8 @@ public final class OrganizationsListSamples {
*/
public final class PlansListSamples {
/*
- * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/
+ * x-ms-original-file:
+ * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/
* Plans_List_MaximumSet_Gen.json
*/
/**
@@ -996,7 +1159,8 @@ public final class PlansListSamples {
}
/*
- * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/
+ * x-ms-original-file:
+ * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/
* Plans_List_MinimumSet_Gen.json
*/
/**
@@ -1011,6 +1175,36 @@ public final class PlansListSamples {
}
```
+### SaaS_ActivateResource
+
+```java
+import com.azure.resourcemanager.newrelicobservability.models.ActivateSaaSParameterRequest;
+
+/**
+ * Samples for SaaS ActivateResource.
+ */
+public final class SaaSActivateResourceSamples {
+ /*
+ * x-ms-original-file:
+ * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ActivateSaaS.
+ * json
+ */
+ /**
+ * Sample code: ActivateSaaS.
+ *
+ * @param manager Entry point to NewRelicObservabilityManager.
+ */
+ public static void
+ activateSaaS(com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager) {
+ manager.saaS()
+ .activateResourceWithResponse(
+ new ActivateSaaSParameterRequest().withSaasGuid("00000000-0000-0000-0000-000005430000")
+ .withPublisherId("publisherId"),
+ com.azure.core.util.Context.NONE);
+ }
+}
+```
+
### TagRules_CreateOrUpdate
```java
@@ -1028,7 +1222,8 @@ import java.util.Arrays;
*/
public final class TagRulesCreateOrUpdateSamples {
/*
- * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/
+ * x-ms-original-file:
+ * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/
* TagRules_CreateOrUpdate_MaximumSet_Gen.json
*/
/**
@@ -1056,7 +1251,8 @@ public final class TagRulesCreateOrUpdateSamples {
}
/*
- * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/
+ * x-ms-original-file:
+ * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/
* TagRules_CreateOrUpdate_MinimumSet_Gen.json
*/
/**
@@ -1082,7 +1278,8 @@ public final class TagRulesCreateOrUpdateSamples {
*/
public final class TagRulesDeleteSamples {
/*
- * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/
+ * x-ms-original-file:
+ * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/
* TagRules_Delete_MinimumSet_Gen.json
*/
/**
@@ -1098,7 +1295,8 @@ public final class TagRulesDeleteSamples {
}
/*
- * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/
+ * x-ms-original-file:
+ * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/
* TagRules_Delete_MaximumSet_Gen.json
*/
/**
@@ -1123,7 +1321,8 @@ public final class TagRulesDeleteSamples {
*/
public final class TagRulesGetSamples {
/*
- * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/
+ * x-ms-original-file:
+ * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/
* TagRules_Get_MinimumSet_Gen.json
*/
/**
@@ -1139,7 +1338,8 @@ public final class TagRulesGetSamples {
}
/*
- * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/
+ * x-ms-original-file:
+ * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/
* TagRules_Get_MaximumSet_Gen.json
*/
/**
@@ -1164,7 +1364,8 @@ public final class TagRulesGetSamples {
*/
public final class TagRulesListByNewRelicMonitorResourceSamples {
/*
- * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/
+ * x-ms-original-file:
+ * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/
* TagRules_ListByNewRelicMonitorResource_MinimumSet_Gen.json
*/
/**
@@ -1180,7 +1381,8 @@ public final class TagRulesListByNewRelicMonitorResourceSamples {
}
/*
- * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/
+ * x-ms-original-file:
+ * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/
* TagRules_ListByNewRelicMonitorResource_MaximumSet_Gen.json
*/
/**
@@ -1215,7 +1417,8 @@ import java.util.Arrays;
*/
public final class TagRulesUpdateSamples {
/*
- * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/
+ * x-ms-original-file:
+ * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/
* TagRules_Update_MaximumSet_Gen.json
*/
/**
@@ -1245,7 +1448,8 @@ public final class TagRulesUpdateSamples {
}
/*
- * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/
+ * x-ms-original-file:
+ * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/
* TagRules_Update_MinimumSet_Gen.json
*/
/**
diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/pom.xml b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/pom.xml
index 639c2590f2ca..8d4aebe84ea3 100644
--- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/pom.xml
+++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/pom.xml
@@ -18,7 +18,7 @@
jar
Microsoft Azure SDK for NewRelicObservability Management
- This package contains Microsoft Azure SDK for NewRelicObservability Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Package tag package-2024-01-01.
+ This package contains Microsoft Azure SDK for NewRelicObservability Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Package tag package-2025-05-01-preview.
https://github.com/Azure/azure-sdk-for-java
@@ -45,7 +45,7 @@
UTF-8
0
0
- false
+ true
diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/NewRelicObservabilityManager.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/NewRelicObservabilityManager.java
index 37e31488cc71..065dbe346afe 100644
--- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/NewRelicObservabilityManager.java
+++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/NewRelicObservabilityManager.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.newrelicobservability.fluent.NewRelicObservability;
import com.azure.resourcemanager.newrelicobservability.implementation.AccountsImpl;
@@ -33,6 +34,7 @@
import com.azure.resourcemanager.newrelicobservability.implementation.OperationsImpl;
import com.azure.resourcemanager.newrelicobservability.implementation.OrganizationsImpl;
import com.azure.resourcemanager.newrelicobservability.implementation.PlansImpl;
+import com.azure.resourcemanager.newrelicobservability.implementation.SaaSImpl;
import com.azure.resourcemanager.newrelicobservability.implementation.TagRulesImpl;
import com.azure.resourcemanager.newrelicobservability.models.Accounts;
import com.azure.resourcemanager.newrelicobservability.models.BillingInfoes;
@@ -42,11 +44,13 @@
import com.azure.resourcemanager.newrelicobservability.models.Operations;
import com.azure.resourcemanager.newrelicobservability.models.Organizations;
import com.azure.resourcemanager.newrelicobservability.models.Plans;
+import com.azure.resourcemanager.newrelicobservability.models.SaaS;
import com.azure.resourcemanager.newrelicobservability.models.TagRules;
import java.time.Duration;
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;
@@ -58,6 +62,8 @@ public final class NewRelicObservabilityManager {
private Accounts accounts;
+ private SaaS saaS;
+
private Monitors monitors;
private Organizations organizations;
@@ -68,10 +74,10 @@ public final class NewRelicObservabilityManager {
private ConnectedPartnerResources connectedPartnerResources;
- private TagRules tagRules;
-
private MonitoredSubscriptions monitoredSubscriptions;
+ private TagRules tagRules;
+
private final NewRelicObservability clientObject;
private NewRelicObservabilityManager(HttpPipeline httpPipeline, AzureProfile profile,
@@ -125,6 +131,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-newrelicobservability.properties");
private HttpClient httpClient;
private HttpLogOptions httpLogOptions;
@@ -232,12 +241,14 @@ public NewRelicObservabilityManager authenticate(TokenCredential credential, Azu
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.newrelicobservability")
.append("/")
- .append("1.2.0");
+ .append(clientVersion);
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder.append(" (")
.append(Configuration.getGlobalConfiguration().get("java.version"))
@@ -307,6 +318,18 @@ public Accounts accounts() {
return accounts;
}
+ /**
+ * Gets the resource collection API of SaaS.
+ *
+ * @return Resource collection API of SaaS.
+ */
+ public SaaS saaS() {
+ if (this.saaS == null) {
+ this.saaS = new SaaSImpl(clientObject.getSaaS(), this);
+ }
+ return saaS;
+ }
+
/**
* Gets the resource collection API of Monitors. It manages NewRelicMonitorResource.
*
@@ -368,18 +391,6 @@ public ConnectedPartnerResources connectedPartnerResources() {
return connectedPartnerResources;
}
- /**
- * Gets the resource collection API of TagRules. It manages TagRule.
- *
- * @return Resource collection API of TagRules.
- */
- public TagRules tagRules() {
- if (this.tagRules == null) {
- this.tagRules = new TagRulesImpl(clientObject.getTagRules(), this);
- }
- return tagRules;
- }
-
/**
* Gets the resource collection API of MonitoredSubscriptions. It manages MonitoredSubscriptionProperties.
*
@@ -393,6 +404,18 @@ public MonitoredSubscriptions monitoredSubscriptions() {
return monitoredSubscriptions;
}
+ /**
+ * Gets the resource collection API of TagRules. It manages TagRule.
+ *
+ * @return Resource collection API of TagRules.
+ */
+ public TagRules tagRules() {
+ if (this.tagRules == null) {
+ this.tagRules = new TagRulesImpl(clientObject.getTagRules(), this);
+ }
+ return tagRules;
+ }
+
/**
* Gets wrapped service client NewRelicObservability providing direct access to the underlying auto-generated API
* implementation, based on Azure REST API.
diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/AccountsClient.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/AccountsClient.java
index c8897603e468..dcb32fb4dbf3 100644
--- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/AccountsClient.java
+++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/AccountsClient.java
@@ -15,7 +15,8 @@
*/
public interface AccountsClient {
/**
- * List all the existing accounts.
+ * Lists all the New Relic accounts linked to your email address, helping you understand the existing accounts that
+ * have been created.
*
* @param userEmail User Email.
* @param location Location for NewRelic.
@@ -28,7 +29,8 @@ public interface AccountsClient {
PagedIterable list(String userEmail, String location);
/**
- * List all the existing accounts.
+ * Lists all the New Relic accounts linked to your email address, helping you understand the existing accounts that
+ * have been created.
*
* @param userEmail User Email.
* @param location Location for NewRelic.
diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/BillingInfoesClient.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/BillingInfoesClient.java
index 24fbecdcd7ca..c9c0bb41cad3 100644
--- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/BillingInfoesClient.java
+++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/BillingInfoesClient.java
@@ -15,7 +15,9 @@
*/
public interface BillingInfoesClient {
/**
- * Get marketplace info mapped to the given monitor.
+ * Retrieves marketplace and organization information mapped to the given New Relic monitor resource
+ *
+ * A synchronous resource action.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
@@ -23,20 +25,23 @@ public interface BillingInfoesClient {
* @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 marketplace info mapped to the given monitor along with {@link Response}.
+ * @return marketplace Subscription and Organization details to which resource gets billed into along with
+ * {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getWithResponse(String resourceGroupName, String monitorName, Context context);
/**
- * Get marketplace info mapped to the given monitor.
+ * Retrieves marketplace and organization information mapped to the given New Relic monitor resource
+ *
+ * A synchronous resource action.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
* @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 marketplace info mapped to the given monitor.
+ * @return marketplace Subscription and Organization details to which resource gets billed into.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
BillingInfoResponseInner get(String resourceGroupName, String monitorName);
diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/ConnectedPartnerResourcesClient.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/ConnectedPartnerResourcesClient.java
index fdb42682cc57..dc7939712ef0 100644
--- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/ConnectedPartnerResourcesClient.java
+++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/ConnectedPartnerResourcesClient.java
@@ -17,6 +17,8 @@ public interface ConnectedPartnerResourcesClient {
/**
* List of all active deployments that are associated with the marketplace subscription linked to the given monitor.
*
+ * A synchronous resource action.
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -30,6 +32,8 @@ public interface ConnectedPartnerResourcesClient {
/**
* List of all active deployments that are associated with the marketplace subscription linked to the given monitor.
*
+ * A synchronous resource action.
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
* @param body Email Id of the user.
diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/MonitoredSubscriptionsClient.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/MonitoredSubscriptionsClient.java
index 9363f36ddcc4..cc878c80383c 100644
--- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/MonitoredSubscriptionsClient.java
+++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/MonitoredSubscriptionsClient.java
@@ -19,20 +19,25 @@
*/
public interface MonitoredSubscriptionsClient {
/**
- * List the subscriptions currently being monitored by the NewRelic monitor resource.
+ * Lists all the subscriptions currently being monitored by the NewRelic monitor resource.
+ *
+ * List MonitoredSubscriptionProperties resources by NewRelicMonitorResource.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
* @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 paginated response with {@link PagedIterable}.
+ * @return paged collection of MonitoredSubscriptionProperties items as paginated response with
+ * {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(String resourceGroupName, String monitorName);
/**
- * List the subscriptions currently being monitored by the NewRelic monitor resource.
+ * Lists all the subscriptions currently being monitored by the NewRelic monitor resource.
+ *
+ * List MonitoredSubscriptionProperties resources by NewRelicMonitorResource.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
@@ -40,14 +45,17 @@ public interface MonitoredSubscriptionsClient {
* @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 paginated response with {@link PagedIterable}.
+ * @return paged collection of MonitoredSubscriptionProperties items as paginated response with
+ * {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(String resourceGroupName, String monitorName,
Context context);
/**
- * List the subscriptions currently being monitored by the NewRelic monitor resource.
+ * Lists all the subscriptions currently being monitored by the NewRelic monitor resource.
+ *
+ * Get a MonitoredSubscriptionProperties.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
@@ -56,15 +64,16 @@ PagedIterable list(String resourceGroupNam
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the request to update subscriptions needed to be monitored by the NewRelic monitor resource along with
- * {@link Response}.
+ * @return a MonitoredSubscriptionProperties along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getWithResponse(String resourceGroupName, String monitorName,
ConfigurationName configurationName, Context context);
/**
- * List the subscriptions currently being monitored by the NewRelic monitor resource.
+ * Lists all the subscriptions currently being monitored by the NewRelic monitor resource.
+ *
+ * Get a MonitoredSubscriptionProperties.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
@@ -72,14 +81,16 @@ Response getWithResponse(String resourceGr
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the request to update subscriptions needed to be monitored by the NewRelic monitor resource.
+ * @return a MonitoredSubscriptionProperties.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
MonitoredSubscriptionPropertiesInner get(String resourceGroupName, String monitorName,
ConfigurationName configurationName);
/**
- * Add the subscriptions that should be monitored by the NewRelic monitor resource.
+ * Add subscriptions to be monitored by the New Relic monitor resource, enabling observability and monitoring.
+ *
+ * Create a MonitoredSubscriptionProperties.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
@@ -92,10 +103,12 @@ MonitoredSubscriptionPropertiesInner get(String resourceGroupName, String monito
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, MonitoredSubscriptionPropertiesInner>
- beginCreateorUpdate(String resourceGroupName, String monitorName, ConfigurationName configurationName);
+ beginCreateOrUpdate(String resourceGroupName, String monitorName, ConfigurationName configurationName);
/**
- * Add the subscriptions that should be monitored by the NewRelic monitor resource.
+ * Add subscriptions to be monitored by the New Relic monitor resource, enabling observability and monitoring.
+ *
+ * Create a MonitoredSubscriptionProperties.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
@@ -110,11 +123,13 @@ MonitoredSubscriptionPropertiesInner get(String resourceGroupName, String monito
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, MonitoredSubscriptionPropertiesInner>
- beginCreateorUpdate(String resourceGroupName, String monitorName, ConfigurationName configurationName,
+ beginCreateOrUpdate(String resourceGroupName, String monitorName, ConfigurationName configurationName,
MonitoredSubscriptionPropertiesInner body, Context context);
/**
- * Add the subscriptions that should be monitored by the NewRelic monitor resource.
+ * Add subscriptions to be monitored by the New Relic monitor resource, enabling observability and monitoring.
+ *
+ * Create a MonitoredSubscriptionProperties.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
@@ -125,11 +140,13 @@ MonitoredSubscriptionPropertiesInner get(String resourceGroupName, String monito
* @return the request to update subscriptions needed to be monitored by the NewRelic monitor resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- MonitoredSubscriptionPropertiesInner createorUpdate(String resourceGroupName, String monitorName,
+ MonitoredSubscriptionPropertiesInner createOrUpdate(String resourceGroupName, String monitorName,
ConfigurationName configurationName);
/**
- * Add the subscriptions that should be monitored by the NewRelic monitor resource.
+ * Add subscriptions to be monitored by the New Relic monitor resource, enabling observability and monitoring.
+ *
+ * Create a MonitoredSubscriptionProperties.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
@@ -142,11 +159,14 @@ MonitoredSubscriptionPropertiesInner createorUpdate(String resourceGroupName, St
* @return the request to update subscriptions needed to be monitored by the NewRelic monitor resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- MonitoredSubscriptionPropertiesInner createorUpdate(String resourceGroupName, String monitorName,
+ MonitoredSubscriptionPropertiesInner createOrUpdate(String resourceGroupName, String monitorName,
ConfigurationName configurationName, MonitoredSubscriptionPropertiesInner body, Context context);
/**
- * Updates the subscriptions that are being monitored by the NewRelic monitor resource.
+ * Update subscriptions to be monitored by the New Relic monitor resource, ensuring optimal observability and
+ * performance
+ *
+ * Update a MonitoredSubscriptionProperties.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
@@ -162,7 +182,10 @@ MonitoredSubscriptionPropertiesInner createorUpdate(String resourceGroupName, St
beginUpdate(String resourceGroupName, String monitorName, ConfigurationName configurationName);
/**
- * Updates the subscriptions that are being monitored by the NewRelic monitor resource.
+ * Update subscriptions to be monitored by the New Relic monitor resource, ensuring optimal observability and
+ * performance
+ *
+ * Update a MonitoredSubscriptionProperties.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
@@ -181,7 +204,10 @@ SyncPoller, MonitoredSubscripti
MonitoredSubscriptionPropertiesInner body, Context context);
/**
- * Updates the subscriptions that are being monitored by the NewRelic monitor resource.
+ * Update subscriptions to be monitored by the New Relic monitor resource, ensuring optimal observability and
+ * performance
+ *
+ * Update a MonitoredSubscriptionProperties.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
@@ -196,7 +222,10 @@ MonitoredSubscriptionPropertiesInner update(String resourceGroupName, String mon
ConfigurationName configurationName);
/**
- * Updates the subscriptions that are being monitored by the NewRelic monitor resource.
+ * Update subscriptions to be monitored by the New Relic monitor resource, ensuring optimal observability and
+ * performance
+ *
+ * Update a MonitoredSubscriptionProperties.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
@@ -213,7 +242,10 @@ MonitoredSubscriptionPropertiesInner update(String resourceGroupName, String mon
ConfigurationName configurationName, MonitoredSubscriptionPropertiesInner body, Context context);
/**
- * Updates the subscriptions that are being monitored by the NewRelic monitor resource.
+ * Delete subscriptions being monitored by the New Relic monitor resource, removing their observability and
+ * monitoring capabilities
+ *
+ * Delete a MonitoredSubscriptionProperties.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
@@ -228,7 +260,10 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String
ConfigurationName configurationName);
/**
- * Updates the subscriptions that are being monitored by the NewRelic monitor resource.
+ * Delete subscriptions being monitored by the New Relic monitor resource, removing their observability and
+ * monitoring capabilities
+ *
+ * Delete a MonitoredSubscriptionProperties.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
@@ -244,7 +279,10 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String
ConfigurationName configurationName, Context context);
/**
- * Updates the subscriptions that are being monitored by the NewRelic monitor resource.
+ * Delete subscriptions being monitored by the New Relic monitor resource, removing their observability and
+ * monitoring capabilities
+ *
+ * Delete a MonitoredSubscriptionProperties.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
@@ -257,7 +295,10 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String
void delete(String resourceGroupName, String monitorName, ConfigurationName configurationName);
/**
- * Updates the subscriptions that are being monitored by the NewRelic monitor resource.
+ * Delete subscriptions being monitored by the New Relic monitor resource, removing their observability and
+ * monitoring capabilities
+ *
+ * Delete a MonitoredSubscriptionProperties.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/MonitorsClient.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/MonitorsClient.java
index 549902266fa9..5fdfb8a895da 100644
--- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/MonitorsClient.java
+++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/MonitorsClient.java
@@ -12,6 +12,7 @@
import com.azure.core.util.Context;
import com.azure.core.util.polling.SyncPoller;
import com.azure.resourcemanager.newrelicobservability.fluent.models.AppServiceInfoInner;
+import com.azure.resourcemanager.newrelicobservability.fluent.models.LatestLinkedSaaSResponseInner;
import com.azure.resourcemanager.newrelicobservability.fluent.models.LinkedResourceInner;
import com.azure.resourcemanager.newrelicobservability.fluent.models.MetricRulesInner;
import com.azure.resourcemanager.newrelicobservability.fluent.models.MetricsStatusResponseInner;
@@ -23,8 +24,9 @@
import com.azure.resourcemanager.newrelicobservability.models.HostsGetRequest;
import com.azure.resourcemanager.newrelicobservability.models.MetricsRequest;
import com.azure.resourcemanager.newrelicobservability.models.MetricsStatusRequest;
-import com.azure.resourcemanager.newrelicobservability.models.MonitorsSwitchBillingResponse;
import com.azure.resourcemanager.newrelicobservability.models.NewRelicMonitorResourceUpdate;
+import com.azure.resourcemanager.newrelicobservability.models.ResubscribeProperties;
+import com.azure.resourcemanager.newrelicobservability.models.SaaSData;
import com.azure.resourcemanager.newrelicobservability.models.SwitchBillingRequest;
/**
@@ -32,7 +34,7 @@
*/
public interface MonitorsClient {
/**
- * List NewRelicMonitorResource resources by subscription ID.
+ * Lists all New Relic monitor resources either within a specific subscription.
*
* @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.
@@ -43,7 +45,7 @@ public interface MonitorsClient {
PagedIterable list();
/**
- * List NewRelicMonitorResource resources by subscription ID.
+ * Lists all New Relic monitor resources either within a specific subscription.
*
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -56,7 +58,7 @@ public interface MonitorsClient {
PagedIterable list(Context context);
/**
- * List NewRelicMonitorResource resources by resource group.
+ * Retrieves a list of all New Relic monitor resources either a specific resource group.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -69,7 +71,7 @@ public interface MonitorsClient {
PagedIterable listByResourceGroup(String resourceGroupName);
/**
- * List NewRelicMonitorResource resources by resource group.
+ * Retrieves a list of all New Relic monitor resources either a specific resource group.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param context The context to associate with this operation.
@@ -83,7 +85,8 @@ public interface MonitorsClient {
PagedIterable listByResourceGroup(String resourceGroupName, Context context);
/**
- * Get a NewRelicMonitorResource.
+ * Retrieves the properties and configuration details of a specific New Relic monitor resource, providing insight
+ * into its setup and status.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
@@ -91,27 +94,30 @@ public interface MonitorsClient {
* @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 NewRelicMonitorResource along with {@link Response}.
+ * @return a Monitor Resource by NewRelic along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getByResourceGroupWithResponse(String resourceGroupName, String monitorName,
Context context);
/**
- * Get a NewRelicMonitorResource.
+ * Retrieves the properties and configuration details of a specific New Relic monitor resource, providing insight
+ * into its setup and status.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
* @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 NewRelicMonitorResource.
+ * @return a Monitor Resource by NewRelic.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
NewRelicMonitorResourceInner getByResourceGroup(String resourceGroupName, String monitorName);
/**
- * Create a NewRelicMonitorResource.
+ * Creates a new or updates an existing New Relic monitor resource in your Azure subscription. This sets up the
+ * integration between Azure and your New Relic account, enabling observability and monitoring of your Azure
+ * resources through New Relic.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
@@ -126,7 +132,9 @@ Response getByResourceGroupWithResponse(String res
beginCreateOrUpdate(String resourceGroupName, String monitorName, NewRelicMonitorResourceInner resource);
/**
- * Create a NewRelicMonitorResource.
+ * Creates a new or updates an existing New Relic monitor resource in your Azure subscription. This sets up the
+ * integration between Azure and your New Relic account, enabling observability and monitoring of your Azure
+ * resources through New Relic.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
@@ -142,7 +150,9 @@ SyncPoller, NewRelicMonitorResourceInne
String resourceGroupName, String monitorName, NewRelicMonitorResourceInner resource, Context context);
/**
- * Create a NewRelicMonitorResource.
+ * Creates a new or updates an existing New Relic monitor resource in your Azure subscription. This sets up the
+ * integration between Azure and your New Relic account, enabling observability and monitoring of your Azure
+ * resources through New Relic.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
@@ -157,7 +167,9 @@ NewRelicMonitorResourceInner createOrUpdate(String resourceGroupName, String mon
NewRelicMonitorResourceInner resource);
/**
- * Create a NewRelicMonitorResource.
+ * Creates a new or updates an existing New Relic monitor resource in your Azure subscription. This sets up the
+ * integration between Azure and your New Relic account, enabling observability and monitoring of your Azure
+ * resources through New Relic.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
@@ -173,7 +185,22 @@ NewRelicMonitorResourceInner createOrUpdate(String resourceGroupName, String mon
NewRelicMonitorResourceInner resource, Context context);
/**
- * Update a NewRelicMonitorResource.
+ * Updates an existing New Relic monitor resource from your Azure subscription.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors resource.
+ * @param properties The resource properties to be updated.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of a Monitor Resource by NewRelic.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, NewRelicMonitorResourceInner>
+ beginUpdate(String resourceGroupName, String monitorName, NewRelicMonitorResourceUpdate properties);
+
+ /**
+ * Updates an existing New Relic monitor resource from your Azure subscription.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
@@ -182,14 +209,14 @@ NewRelicMonitorResourceInner createOrUpdate(String resourceGroupName, String mon
* @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 Monitor Resource by NewRelic along with {@link Response}.
+ * @return the {@link SyncPoller} for polling of a Monitor Resource by NewRelic.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- Response updateWithResponse(String resourceGroupName, String monitorName,
- NewRelicMonitorResourceUpdate properties, Context context);
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, NewRelicMonitorResourceInner> beginUpdate(
+ String resourceGroupName, String monitorName, NewRelicMonitorResourceUpdate properties, Context context);
/**
- * Update a NewRelicMonitorResource.
+ * Updates an existing New Relic monitor resource from your Azure subscription.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
@@ -204,25 +231,43 @@ NewRelicMonitorResourceInner update(String resourceGroupName, String monitorName
NewRelicMonitorResourceUpdate properties);
/**
- * Delete a NewRelicMonitorResource.
+ * Updates an existing New Relic monitor resource from your Azure subscription.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors resource.
+ * @param properties The resource properties to be updated.
+ * @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 Monitor Resource by NewRelic.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ NewRelicMonitorResourceInner update(String resourceGroupName, String monitorName,
+ NewRelicMonitorResourceUpdate properties, Context context);
+
+ /**
+ * Deletes an existing New Relic monitor resource from your Azure subscription, removing the integration and
+ * stopping the observability of your Azure resources through New Relic.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param userEmail User Email.
* @param monitorName Name of the Monitors resource.
+ * @param userEmail User Email.
* @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 userEmail, String monitorName);
+ SyncPoller, Void> beginDelete(String resourceGroupName, String monitorName, String userEmail);
/**
- * Delete a NewRelicMonitorResource.
+ * Deletes an existing New Relic monitor resource from your Azure subscription, removing the integration and
+ * stopping the observability of your Azure resources through New Relic.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param userEmail User Email.
* @param monitorName Name of the Monitors resource.
+ * @param userEmail User Email.
* @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.
@@ -230,38 +275,40 @@ NewRelicMonitorResourceInner update(String resourceGroupName, String monitorName
* @return the {@link SyncPoller} for polling of long-running operation.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, Void> beginDelete(String resourceGroupName, String userEmail, String monitorName,
+ SyncPoller, Void> beginDelete(String resourceGroupName, String monitorName, String userEmail,
Context context);
/**
- * Delete a NewRelicMonitorResource.
+ * Deletes an existing New Relic monitor resource from your Azure subscription, removing the integration and
+ * stopping the observability of your Azure resources through New Relic.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param userEmail User Email.
* @param monitorName Name of the Monitors resource.
+ * @param userEmail User Email.
* @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 userEmail, String monitorName);
+ void delete(String resourceGroupName, String monitorName, String userEmail);
/**
- * Delete a NewRelicMonitorResource.
+ * Deletes an existing New Relic monitor resource from your Azure subscription, removing the integration and
+ * stopping the observability of your Azure resources through New Relic.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param userEmail User Email.
* @param monitorName Name of the Monitors resource.
+ * @param userEmail User Email.
* @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 userEmail, String monitorName, Context context);
+ void delete(String resourceGroupName, String monitorName, String userEmail, Context context);
/**
- * Get metric rules.
+ * Retrieves the metric rules that are configured in the New Relic monitor resource.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
@@ -270,14 +317,14 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String
* @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 metric rules along with {@link Response}.
+ * @return set of rules for sending metrics for the Monitor resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getMetricRulesWithResponse(String resourceGroupName, String monitorName,
MetricsRequest request, Context context);
/**
- * Get metric rules.
+ * Retrieves the metric rules that are configured in the New Relic monitor resource.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
@@ -285,13 +332,13 @@ Response getMetricRulesWithResponse(String resourceGroupName,
* @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 metric rules.
+ * @return set of rules for sending metrics for the Monitor resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
MetricRulesInner getMetricRules(String resourceGroupName, String monitorName, MetricsRequest request);
/**
- * Get metric status.
+ * Retrieves the metric status that are configured in the New Relic monitor resource.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
@@ -300,14 +347,14 @@ Response getMetricRulesWithResponse(String resourceGroupName,
* @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 metric status along with {@link Response}.
+ * @return response of get metrics status Operation along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getMetricStatusWithResponse(String resourceGroupName, String monitorName,
MetricsStatusRequest request, Context context);
/**
- * Get metric status.
+ * Retrieves the metric status that are configured in the New Relic monitor resource.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
@@ -315,76 +362,136 @@ Response getMetricStatusWithResponse(String resource
* @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 metric status.
+ * @return response of get metrics status Operation.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
MetricsStatusResponseInner getMetricStatus(String resourceGroupName, String monitorName,
MetricsStatusRequest request);
/**
- * List the app service resources currently being monitored by the NewRelic resource.
+ * Returns the latest SaaS linked to the newrelic organization of the underlying monitor.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
- * @param request The details of the app services get request.
+ * @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 response of a list app services Operation as paginated response with {@link PagedIterable}.
+ * @return response of get latest linked SaaS resource operation along with {@link Response}.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listAppServices(String resourceGroupName, String monitorName,
- AppServicesGetRequest request);
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response latestLinkedSaaSWithResponse(String resourceGroupName, String monitorName,
+ Context context);
/**
- * List the app service resources currently being monitored by the NewRelic resource.
+ * Returns the latest SaaS linked to the newrelic organization of the underlying monitor.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
- * @param request The details of the app services get request.
- * @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 response of a list app services Operation as paginated response with {@link PagedIterable}.
+ * @return response of get latest linked SaaS resource operation.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listAppServices(String resourceGroupName, String monitorName,
- AppServicesGetRequest request, Context context);
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ LatestLinkedSaaSResponseInner latestLinkedSaaS(String resourceGroupName, String monitorName);
/**
- * Switches the billing for NewRelic monitor resource.
+ * Links a new SaaS to the newrelic organization of the underlying monitor.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
- * @param request The details of the switch billing request.
+ * @param body Link SaaS body parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of a Monitor Resource by NewRelic.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, NewRelicMonitorResourceInner>
+ beginLinkSaaS(String resourceGroupName, String monitorName, SaaSData body);
+
+ /**
+ * Links a new SaaS to the newrelic organization of the underlying monitor.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors resource.
+ * @param body Link SaaS body parameter.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of a Monitor Resource by NewRelic.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, NewRelicMonitorResourceInner>
+ beginLinkSaaS(String resourceGroupName, String monitorName, SaaSData body, Context context);
+
+ /**
+ * Links a new SaaS to the newrelic organization of the underlying monitor.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors resource.
+ * @param body Link SaaS body parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return a Monitor Resource by NewRelic.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- MonitorsSwitchBillingResponse switchBillingWithResponse(String resourceGroupName, String monitorName,
- SwitchBillingRequest request, Context context);
+ NewRelicMonitorResourceInner linkSaaS(String resourceGroupName, String monitorName, SaaSData body);
/**
- * Switches the billing for NewRelic monitor resource.
+ * Links a new SaaS to the newrelic organization of the underlying monitor.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
- * @param request The details of the switch billing request.
+ * @param body Link SaaS body parameter.
+ * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return a Monitor Resource by NewRelic.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- NewRelicMonitorResourceInner switchBilling(String resourceGroupName, String monitorName,
- SwitchBillingRequest request);
+ NewRelicMonitorResourceInner linkSaaS(String resourceGroupName, String monitorName, SaaSData body, Context context);
+
+ /**
+ * Lists the app service resources currently being monitored by the New Relic resource, helping you understand which
+ * app services are under monitoring.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors resource.
+ * @param request The details of the app services get request.
+ * @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 response of a list app services Operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listAppServices(String resourceGroupName, String monitorName,
+ AppServicesGetRequest request);
/**
- * List the compute vm resources currently being monitored by the NewRelic resource.
+ * Lists the app service resources currently being monitored by the New Relic resource, helping you understand which
+ * app services are under monitoring.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors resource.
+ * @param request The details of the app services get request.
+ * @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 response of a list app services Operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listAppServices(String resourceGroupName, String monitorName,
+ AppServicesGetRequest request, Context context);
+
+ /**
+ * Lists all VM resources currently being monitored by the New Relic monitor resource, helping you manage
+ * observability.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
@@ -398,7 +505,8 @@ NewRelicMonitorResourceInner switchBilling(String resourceGroupName, String moni
PagedIterable listHosts(String resourceGroupName, String monitorName, HostsGetRequest request);
/**
- * List the compute vm resources currently being monitored by the NewRelic resource.
+ * Lists all VM resources currently being monitored by the New Relic monitor resource, helping you manage
+ * observability.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
@@ -414,7 +522,38 @@ PagedIterable listHosts(String resourceGroupName, String monitorNam
Context context);
/**
- * List the resources currently being monitored by the NewRelic monitor resource.
+ * Lists all Azure resources that are linked to the same New Relic organization as the specified monitor resource,
+ * helping you understand the scope of integration.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors resource.
+ * @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 response of a list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listLinkedResources(String resourceGroupName, String monitorName);
+
+ /**
+ * Lists all Azure resources that are linked to the same New Relic organization as the specified monitor resource,
+ * helping you understand the scope of integration.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors resource.
+ * @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 response of a list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listLinkedResources(String resourceGroupName, String monitorName,
+ Context context);
+
+ /**
+ * Lists all Azure resources that are currently being monitored by the specified New Relic monitor resource,
+ * providing insight into the coverage of your observability setup.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
@@ -428,7 +567,8 @@ PagedIterable listHosts(String resourceGroupName, String monitorNam
PagedIterable listMonitoredResources(String resourceGroupName, String monitorName);
/**
- * List the resources currently being monitored by the NewRelic monitor resource.
+ * Lists all Azure resources that are currently being monitored by the specified New Relic monitor resource,
+ * providing insight into the coverage of your observability setup.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
@@ -444,35 +584,132 @@ PagedIterable listMonitoredResources(String resourceGrou
Context context);
/**
- * List all Azure resources associated to the same NewRelic organization and account as the target resource.
+ * Refreshes the ingestion key for all monitors linked to the same account associated to the underlying monitor.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
+ * @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 response of a list operation as paginated response with {@link PagedIterable}.
+ * @return the {@link Response}.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listLinkedResources(String resourceGroupName, String monitorName);
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response refreshIngestionKeyWithResponse(String resourceGroupName, String monitorName, Context context);
/**
- * List all Azure resources associated to the same NewRelic organization and account as the target resource.
+ * Refreshes the ingestion key for all monitors linked to the same account associated to the underlying monitor.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
+ * @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 refreshIngestionKey(String resourceGroupName, String monitorName);
+
+ /**
+ * Resubscribes the New Relic Organization of the underline Monitor Resource to be billed by Azure Marketplace
+ *
+ * A long-running resource action.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of a Monitor Resource by NewRelic.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, NewRelicMonitorResourceInner>
+ beginResubscribe(String resourceGroupName, String monitorName);
+
+ /**
+ * Resubscribes the New Relic Organization of the underline Monitor Resource to be billed by Azure Marketplace
+ *
+ * A long-running resource action.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors resource.
+ * @param body Resubscribe Properties.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return response of a list operation as paginated response with {@link PagedIterable}.
+ * @return the {@link SyncPoller} for polling of a Monitor Resource by NewRelic.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listLinkedResources(String resourceGroupName, String monitorName,
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, NewRelicMonitorResourceInner>
+ beginResubscribe(String resourceGroupName, String monitorName, ResubscribeProperties body, Context context);
+
+ /**
+ * Resubscribes the New Relic Organization of the underline Monitor Resource to be billed by Azure Marketplace
+ *
+ * A long-running resource action.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors resource.
+ * @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 Monitor Resource by NewRelic.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ NewRelicMonitorResourceInner resubscribe(String resourceGroupName, String monitorName);
+
+ /**
+ * Resubscribes the New Relic Organization of the underline Monitor Resource to be billed by Azure Marketplace
+ *
+ * A long-running resource action.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors resource.
+ * @param body Resubscribe Properties.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Monitor Resource by NewRelic.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ NewRelicMonitorResourceInner resubscribe(String resourceGroupName, String monitorName, ResubscribeProperties body,
Context context);
/**
- * Returns the payload that needs to be passed in the request body for installing NewRelic agent on a VM.
+ * Switches the billing for the New Relic Monitor resource to be billed by Azure Marketplace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors resource.
+ * @param request The details of the switch billing request.
+ * @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 Monitor Resource by NewRelic along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response switchBillingWithResponse(String resourceGroupName, String monitorName,
+ SwitchBillingRequest request, Context context);
+
+ /**
+ * Switches the billing for the New Relic Monitor resource to be billed by Azure Marketplace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors resource.
+ * @param request The details of the switch billing request.
+ * @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 Monitor Resource by NewRelic.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ NewRelicMonitorResourceInner switchBilling(String resourceGroupName, String monitorName,
+ SwitchBillingRequest request);
+
+ /**
+ * Returns the payload that needs to be passed in the request body for installing the New Relic agent on a VM,
+ * providing the necessary configuration details.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
@@ -487,7 +724,8 @@ Response vmHostPayloadWithResponse(String resourceGroup
Context context);
/**
- * Returns the payload that needs to be passed in the request body for installing NewRelic agent on a VM.
+ * Returns the payload that needs to be passed in the request body for installing the New Relic agent on a VM,
+ * providing the necessary configuration details.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/NewRelicObservability.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/NewRelicObservability.java
index 7e0ff48dea9d..86cba2bb9dd9 100644
--- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/NewRelicObservability.java
+++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/NewRelicObservability.java
@@ -60,6 +60,13 @@ public interface NewRelicObservability {
*/
AccountsClient getAccounts();
+ /**
+ * Gets the SaaSClient object to access its operations.
+ *
+ * @return the SaaSClient object.
+ */
+ SaaSClient getSaaS();
+
/**
* Gets the MonitorsClient object to access its operations.
*
@@ -96,16 +103,16 @@ public interface NewRelicObservability {
ConnectedPartnerResourcesClient getConnectedPartnerResources();
/**
- * Gets the TagRulesClient object to access its operations.
+ * Gets the MonitoredSubscriptionsClient object to access its operations.
*
- * @return the TagRulesClient object.
+ * @return the MonitoredSubscriptionsClient object.
*/
- TagRulesClient getTagRules();
+ MonitoredSubscriptionsClient getMonitoredSubscriptions();
/**
- * Gets the MonitoredSubscriptionsClient object to access its operations.
+ * Gets the TagRulesClient object to access its operations.
*
- * @return the MonitoredSubscriptionsClient object.
+ * @return the TagRulesClient object.
*/
- MonitoredSubscriptionsClient getMonitoredSubscriptions();
+ TagRulesClient getTagRules();
}
diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/OrganizationsClient.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/OrganizationsClient.java
index 491a4703922a..fb94d3ee469e 100644
--- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/OrganizationsClient.java
+++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/OrganizationsClient.java
@@ -15,7 +15,8 @@
*/
public interface OrganizationsClient {
/**
- * List all the existing organizations.
+ * Lists all the New Relic organizations linked to your email address, helping you understand the existing
+ * organizations that have been created.
*
* @param userEmail User Email.
* @param location Location for NewRelic.
@@ -28,7 +29,8 @@ public interface OrganizationsClient {
PagedIterable list(String userEmail, String location);
/**
- * List all the existing organizations.
+ * Lists all the New Relic organizations linked to your email address, helping you understand the existing
+ * organizations that have been created.
*
* @param userEmail User Email.
* @param location Location for NewRelic.
diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/PlansClient.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/PlansClient.java
index 0b27f3e793e2..a32f6ad514e2 100644
--- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/PlansClient.java
+++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/PlansClient.java
@@ -15,7 +15,7 @@
*/
public interface PlansClient {
/**
- * List plans data.
+ * Lists the plans data linked to your organization, providing an overview of the available plans.
*
* @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.
@@ -25,7 +25,7 @@ public interface PlansClient {
PagedIterable list();
/**
- * List plans data.
+ * Lists the plans data linked to your organization, providing an overview of the available plans.
*
* @param accountId Account Id.
* @param organizationId Organization Id.
diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/SaaSClient.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/SaaSClient.java
new file mode 100644
index 000000000000..daa2eb9bbfbe
--- /dev/null
+++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/SaaSClient.java
@@ -0,0 +1,43 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.newrelicobservability.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.newrelicobservability.fluent.models.SaaSResourceDetailsResponseInner;
+import com.azure.resourcemanager.newrelicobservability.models.ActivateSaaSParameterRequest;
+
+/**
+ * An instance of this class provides access to all the operations defined in SaaSClient.
+ */
+public interface SaaSClient {
+ /**
+ * Resolve the token to get the SaaS resource ID and activate the SaaS resource.
+ *
+ * @param request The request body.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return marketplace SaaS resource details along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response activateResourceWithResponse(ActivateSaaSParameterRequest request,
+ Context context);
+
+ /**
+ * Resolve the token to get the SaaS resource ID and activate the SaaS resource.
+ *
+ * @param request The request body.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return marketplace SaaS resource details.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SaaSResourceDetailsResponseInner activateResource(ActivateSaaSParameterRequest request);
+}
diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/TagRulesClient.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/TagRulesClient.java
index e3d1e34d15e1..80a143d06ef8 100644
--- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/TagRulesClient.java
+++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/TagRulesClient.java
@@ -19,7 +19,8 @@
*/
public interface TagRulesClient {
/**
- * List TagRule resources by NewRelicMonitorResource.
+ * Lists all tag rules associated with a specific New Relic monitor resource, helping you manage and audit the rules
+ * that control resource monitoring.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
@@ -32,7 +33,8 @@ public interface TagRulesClient {
PagedIterable listByNewRelicMonitorResource(String resourceGroupName, String monitorName);
/**
- * List TagRule resources by NewRelicMonitorResource.
+ * Lists all tag rules associated with a specific New Relic monitor resource, helping you manage and audit the rules
+ * that control resource monitoring.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
@@ -47,7 +49,8 @@ PagedIterable listByNewRelicMonitorResource(String resourceGroupNa
Context context);
/**
- * Get a TagRule.
+ * Retrieves the details of the tag rules for a specific New Relic monitor resource, providing insight into its
+ * setup and status.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
@@ -56,14 +59,15 @@ PagedIterable listByNewRelicMonitorResource(String resourceGroupNa
* @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 TagRule along with {@link Response}.
+ * @return a tag rule belonging to NewRelic account along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getWithResponse(String resourceGroupName, String monitorName, String ruleSetName,
Context context);
/**
- * Get a TagRule.
+ * Retrieves the details of the tag rules for a specific New Relic monitor resource, providing insight into its
+ * setup and status.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
@@ -71,13 +75,14 @@ Response getWithResponse(String resourceGroupName, String monitorN
* @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 TagRule.
+ * @return a tag rule belonging to NewRelic account.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
TagRuleInner get(String resourceGroupName, String monitorName, String ruleSetName);
/**
- * Create a TagRule.
+ * Creates a new set of tag rules for a specific New Relic monitor resource, determining which Azure resources are
+ * monitored based on their tags.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
@@ -93,7 +98,8 @@ SyncPoller, TagRuleInner> beginCreateOrUpdate(String re
String ruleSetName, TagRuleInner resource);
/**
- * Create a TagRule.
+ * Creates a new set of tag rules for a specific New Relic monitor resource, determining which Azure resources are
+ * monitored based on their tags.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
@@ -110,7 +116,8 @@ SyncPoller, TagRuleInner> beginCreateOrUpdate(String re
String ruleSetName, TagRuleInner resource, Context context);
/**
- * Create a TagRule.
+ * Creates a new set of tag rules for a specific New Relic monitor resource, determining which Azure resources are
+ * monitored based on their tags.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
@@ -126,7 +133,8 @@ TagRuleInner createOrUpdate(String resourceGroupName, String monitorName, String
TagRuleInner resource);
/**
- * Create a TagRule.
+ * Creates a new set of tag rules for a specific New Relic monitor resource, determining which Azure resources are
+ * monitored based on their tags.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
@@ -143,37 +151,43 @@ TagRuleInner createOrUpdate(String resourceGroupName, String monitorName, String
Context context);
/**
- * Delete a TagRule.
+ * Updates the tag rules for a specific New Relic monitor resource, allowing you to modify the rules that control
+ * which Azure resources are monitored.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
* @param ruleSetName Name of the TagRule.
+ * @param properties The resource properties to be updated.
+ * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link SyncPoller} for polling of long-running operation.
+ * @return a tag rule belonging to NewRelic account along with {@link Response}.
*/
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, Void> beginDelete(String resourceGroupName, String monitorName, String ruleSetName);
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response updateWithResponse(String resourceGroupName, String monitorName, String ruleSetName,
+ TagRuleUpdateInner properties, Context context);
/**
- * Delete a TagRule.
+ * Updates the tag rules for a specific New Relic monitor resource, allowing you to modify the rules that control
+ * which Azure resources are monitored.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
* @param ruleSetName Name of the TagRule.
- * @param context The context to associate with this operation.
+ * @param properties The resource properties to be updated.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link SyncPoller} for polling of long-running operation.
+ * @return a tag rule belonging to NewRelic account.
*/
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, Void> beginDelete(String resourceGroupName, String monitorName, String ruleSetName,
- Context context);
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ TagRuleInner update(String resourceGroupName, String monitorName, String ruleSetName,
+ TagRuleUpdateInner properties);
/**
- * Delete a TagRule.
+ * Deletes a tag rule set for a given New Relic monitor resource, removing fine-grained control over observability
+ * based on resource tags.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
@@ -181,12 +195,14 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- void delete(String resourceGroupName, String monitorName, String ruleSetName);
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String monitorName, String ruleSetName);
/**
- * Delete a TagRule.
+ * Deletes a tag rule set for a given New Relic monitor resource, removing fine-grained control over observability
+ * based on resource tags.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
@@ -195,40 +211,38 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- void delete(String resourceGroupName, String monitorName, String ruleSetName, Context context);
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String monitorName, String ruleSetName,
+ Context context);
/**
- * Update a TagRule.
+ * Deletes a tag rule set for a given New Relic monitor resource, removing fine-grained control over observability
+ * based on resource tags.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
* @param ruleSetName Name of the TagRule.
- * @param properties The resource properties to be updated.
- * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a tag rule belonging to NewRelic account along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response updateWithResponse(String resourceGroupName, String monitorName, String ruleSetName,
- TagRuleUpdateInner properties, Context context);
+ void delete(String resourceGroupName, String monitorName, String ruleSetName);
/**
- * Update a TagRule.
+ * Deletes a tag rule set for a given New Relic monitor resource, removing fine-grained control over observability
+ * based on resource tags.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
* @param ruleSetName Name of the TagRule.
- * @param properties The resource properties to be updated.
+ * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a tag rule belonging to NewRelic account.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- TagRuleInner update(String resourceGroupName, String monitorName, String ruleSetName,
- TagRuleUpdateInner properties);
+ void delete(String resourceGroupName, String monitorName, String ruleSetName, Context context);
}
diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/LatestLinkedSaaSResponseInner.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/LatestLinkedSaaSResponseInner.java
new file mode 100644
index 000000000000..f8b66e5a312a
--- /dev/null
+++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/LatestLinkedSaaSResponseInner.java
@@ -0,0 +1,122 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.newrelicobservability.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 java.io.IOException;
+
+/**
+ * Response of get latest linked SaaS resource operation.
+ */
+@Fluent
+public final class LatestLinkedSaaSResponseInner implements JsonSerializable {
+ /*
+ * SaaS resource id
+ */
+ private String saaSResourceId;
+
+ /*
+ * Flag indicating if the SaaS resource is hidden
+ */
+ private Boolean isHiddenSaaS;
+
+ /**
+ * Creates an instance of LatestLinkedSaaSResponseInner class.
+ */
+ public LatestLinkedSaaSResponseInner() {
+ }
+
+ /**
+ * Get the saaSResourceId property: SaaS resource id.
+ *
+ * @return the saaSResourceId value.
+ */
+ public String saaSResourceId() {
+ return this.saaSResourceId;
+ }
+
+ /**
+ * Set the saaSResourceId property: SaaS resource id.
+ *
+ * @param saaSResourceId the saaSResourceId value to set.
+ * @return the LatestLinkedSaaSResponseInner object itself.
+ */
+ public LatestLinkedSaaSResponseInner withSaaSResourceId(String saaSResourceId) {
+ this.saaSResourceId = saaSResourceId;
+ return this;
+ }
+
+ /**
+ * Get the isHiddenSaaS property: Flag indicating if the SaaS resource is hidden.
+ *
+ * @return the isHiddenSaaS value.
+ */
+ public Boolean isHiddenSaaS() {
+ return this.isHiddenSaaS;
+ }
+
+ /**
+ * Set the isHiddenSaaS property: Flag indicating if the SaaS resource is hidden.
+ *
+ * @param isHiddenSaaS the isHiddenSaaS value to set.
+ * @return the LatestLinkedSaaSResponseInner object itself.
+ */
+ public LatestLinkedSaaSResponseInner withIsHiddenSaaS(Boolean isHiddenSaaS) {
+ this.isHiddenSaaS = isHiddenSaaS;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("saaSResourceId", this.saaSResourceId);
+ jsonWriter.writeBooleanField("isHiddenSaaS", this.isHiddenSaaS);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of LatestLinkedSaaSResponseInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of LatestLinkedSaaSResponseInner 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 LatestLinkedSaaSResponseInner.
+ */
+ public static LatestLinkedSaaSResponseInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ LatestLinkedSaaSResponseInner deserializedLatestLinkedSaaSResponseInner
+ = new LatestLinkedSaaSResponseInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("saaSResourceId".equals(fieldName)) {
+ deserializedLatestLinkedSaaSResponseInner.saaSResourceId = reader.getString();
+ } else if ("isHiddenSaaS".equals(fieldName)) {
+ deserializedLatestLinkedSaaSResponseInner.isHiddenSaaS = reader.getNullable(JsonReader::getBoolean);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedLatestLinkedSaaSResponseInner;
+ });
+ }
+}
diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/MetricRulesInner.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/MetricRulesInner.java
index 737bb3631ac9..4ffb4c3dc6c0 100644
--- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/MetricRulesInner.java
+++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/MetricRulesInner.java
@@ -30,7 +30,7 @@ public final class MetricRulesInner implements JsonSerializable filteringTags;
/*
- * User Email
+ * Reusable representation of an email address
*/
private String userEmail;
@@ -81,7 +81,7 @@ public MetricRulesInner withFilteringTags(List filteringTags) {
}
/**
- * Get the userEmail property: User Email.
+ * Get the userEmail property: Reusable representation of an email address.
*
* @return the userEmail value.
*/
@@ -90,7 +90,7 @@ public String userEmail() {
}
/**
- * Set the userEmail property: User Email.
+ * Set the userEmail property: Reusable representation of an email address.
*
* @param userEmail the userEmail value to set.
* @return the MetricRulesInner object itself.
diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/MonitorProperties.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/MonitorProperties.java
index 454404c3be46..0946bdf977b8 100644
--- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/MonitorProperties.java
+++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/MonitorProperties.java
@@ -17,6 +17,7 @@
import com.azure.resourcemanager.newrelicobservability.models.OrgCreationSource;
import com.azure.resourcemanager.newrelicobservability.models.PlanData;
import com.azure.resourcemanager.newrelicobservability.models.ProvisioningState;
+import com.azure.resourcemanager.newrelicobservability.models.SaaSData;
import com.azure.resourcemanager.newrelicobservability.models.UserInfo;
import java.io.IOException;
@@ -60,6 +61,11 @@ public final class MonitorProperties implements JsonSerializable {
+ SaaSResourceDetailsResponseInner deserializedSaaSResourceDetailsResponseInner
+ = new SaaSResourceDetailsResponseInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedSaaSResourceDetailsResponseInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedSaaSResourceDetailsResponseInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedSaaSResourceDetailsResponseInner.type = reader.getString();
+ } else if ("saasId".equals(fieldName)) {
+ deserializedSaaSResourceDetailsResponseInner.saasId = reader.getString();
+ } else if ("systemData".equals(fieldName)) {
+ deserializedSaaSResourceDetailsResponseInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedSaaSResourceDetailsResponseInner;
+ });
+ }
+}
diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/AccountsClientImpl.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/AccountsClientImpl.java
index 354f27cf8b47..2ad72d769a8e 100644
--- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/AccountsClientImpl.java
+++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/AccountsClientImpl.java
@@ -25,6 +25,7 @@
import com.azure.core.management.exception.ManagementException;
import com.azure.core.util.Context;
import com.azure.core.util.FluxUtil;
+import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.newrelicobservability.fluent.AccountsClient;
import com.azure.resourcemanager.newrelicobservability.fluent.models.AccountResourceInner;
import com.azure.resourcemanager.newrelicobservability.models.AccountsListResponse;
@@ -59,7 +60,7 @@ public final class AccountsClientImpl implements AccountsClient {
* perform REST calls.
*/
@Host("{$host}")
- @ServiceInterface(name = "NewRelicObservabilit")
+ @ServiceInterface(name = "NewRelicObservabilityAccounts")
public interface AccountsService {
@Headers({ "Content-Type: application/json" })
@Get("/subscriptions/{subscriptionId}/providers/NewRelic.Observability/accounts")
@@ -70,16 +71,33 @@ Mono> list(@HostParam("$host") String endpoint,
@QueryParam("userEmail") String userEmail, @QueryParam("location") String location,
@HeaderParam("Accept") String accept, Context context);
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/providers/NewRelic.Observability/accounts")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listSync(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @QueryParam("userEmail") String userEmail, @QueryParam("location") String location,
+ @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);
}
/**
- * List all the existing accounts.
+ * Lists all the New Relic accounts linked to your email address, helping you understand the existing accounts that
+ * have been created.
*
* @param userEmail User Email.
* @param location Location for NewRelic.
@@ -115,61 +133,63 @@ private Mono> listSinglePageAsync(String use
}
/**
- * List all the existing accounts.
+ * Lists all the New Relic accounts linked to your email address, helping you understand the existing accounts that
+ * have been created.
*
* @param userEmail User Email.
* @param location Location for NewRelic.
- * @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 response of get all accounts Operation along with {@link PagedResponse} on successful completion of
- * {@link Mono}.
+ * @return response of get all accounts Operation as paginated response with {@link PagedFlux}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listSinglePageAsync(String userEmail, String location,
- 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 (userEmail == null) {
- return Mono.error(new IllegalArgumentException("Parameter userEmail is required and cannot be null."));
- }
- if (location == null) {
- return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service
- .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), userEmail,
- location, accept, context)
- .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
- res.getValue().value(), res.getValue().nextLink(), null));
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String userEmail, String location) {
+ return new PagedFlux<>(() -> listSinglePageAsync(userEmail, location),
+ nextLink -> listNextSinglePageAsync(nextLink));
}
/**
- * List all the existing accounts.
+ * Lists all the New Relic accounts linked to your email address, helping you understand the existing accounts that
+ * have been created.
*
* @param userEmail User Email.
* @param location Location for NewRelic.
* @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 response of get all accounts Operation as paginated response with {@link PagedFlux}.
+ * @return response of get all accounts Operation along with {@link PagedResponse}.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listAsync(String userEmail, String location) {
- return new PagedFlux<>(() -> listSinglePageAsync(userEmail, location),
- nextLink -> listNextSinglePageAsync(nextLink));
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listSinglePage(String userEmail, String location) {
+ 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 (userEmail == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter userEmail is required and cannot be null."));
+ }
+ if (location == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter location is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), userEmail, location, accept, Context.NONE);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
}
/**
- * List all the existing accounts.
+ * Lists all the New Relic accounts linked to your email address, helping you understand the existing accounts that
+ * have been created.
*
* @param userEmail User Email.
* @param location Location for NewRelic.
@@ -177,16 +197,38 @@ private PagedFlux listAsync(String userEmail, String locat
* @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 response of get all accounts Operation as paginated response with {@link PagedFlux}.
+ * @return response of get all accounts Operation along with {@link PagedResponse}.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listAsync(String userEmail, String location, Context context) {
- return new PagedFlux<>(() -> listSinglePageAsync(userEmail, location, context),
- nextLink -> listNextSinglePageAsync(nextLink, context));
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listSinglePage(String userEmail, String location, Context context) {
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (userEmail == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter userEmail is required and cannot be null."));
+ }
+ if (location == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter location is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), userEmail, location, accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
}
/**
- * List all the existing accounts.
+ * Lists all the New Relic accounts linked to your email address, helping you understand the existing accounts that
+ * have been created.
*
* @param userEmail User Email.
* @param location Location for NewRelic.
@@ -197,11 +239,12 @@ private PagedFlux listAsync(String userEmail, String locat
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list(String userEmail, String location) {
- return new PagedIterable<>(listAsync(userEmail, location));
+ return new PagedIterable<>(() -> listSinglePage(userEmail, location), nextLink -> listNextSinglePage(nextLink));
}
/**
- * List all the existing accounts.
+ * Lists all the New Relic accounts linked to your email address, helping you understand the existing accounts that
+ * have been created.
*
* @param userEmail User Email.
* @param location Location for NewRelic.
@@ -213,7 +256,8 @@ public PagedIterable list(String userEmail, String locatio
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list(String userEmail, String location, Context context) {
- return new PagedIterable<>(listAsync(userEmail, location, context));
+ return new PagedIterable<>(() -> listSinglePage(userEmail, location, context),
+ nextLink -> listNextSinglePage(nextLink, context));
}
/**
@@ -242,6 +286,33 @@ private Mono> listNextSinglePageAsync(String
.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 response of get all accounts Operation 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.
*
@@ -250,22 +321,24 @@ private Mono> listNextSinglePageAsync(String
* @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 response of get all accounts Operation along with {@link PagedResponse} on successful completion of
- * {@link Mono}.
+ * @return response of get all accounts Operation 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(AccountsClientImpl.class);
}
diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/BillingInfoesClientImpl.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/BillingInfoesClientImpl.java
index 8751c9d24dfd..c9f50bf28e86 100644
--- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/BillingInfoesClientImpl.java
+++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/BillingInfoesClientImpl.java
@@ -21,6 +21,7 @@
import com.azure.core.management.exception.ManagementException;
import com.azure.core.util.Context;
import com.azure.core.util.FluxUtil;
+import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.newrelicobservability.fluent.BillingInfoesClient;
import com.azure.resourcemanager.newrelicobservability.fluent.models.BillingInfoResponseInner;
import reactor.core.publisher.Mono;
@@ -55,7 +56,7 @@ public final class BillingInfoesClientImpl implements BillingInfoesClient {
* perform REST calls.
*/
@Host("{$host}")
- @ServiceInterface(name = "NewRelicObservabilit")
+ @ServiceInterface(name = "NewRelicObservabilityBillingInfoes")
public interface BillingInfoesService {
@Headers({ "Content-Type: application/json" })
@Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/getBillingInfo")
@@ -65,18 +66,29 @@ Mono> get(@HostParam("$host") String endpoint
@QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
@PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName,
@HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/getBillingInfo")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response getSync(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName,
+ @HeaderParam("Accept") String accept, Context context);
}
/**
- * Get marketplace info mapped to the given monitor.
+ * Retrieves marketplace and organization information mapped to the given New Relic monitor resource
+ *
+ * A synchronous resource action.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return marketplace info mapped to the given monitor along with {@link Response} on successful completion of
- * {@link Mono}.
+ * @return marketplace Subscription and Organization details to which resource gets billed into along with
+ * {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> getWithResponseAsync(String resourceGroupName,
@@ -104,50 +116,17 @@ private Mono> getWithResponseAsync(String res
}
/**
- * Get marketplace info mapped to the given monitor.
+ * Retrieves marketplace and organization information mapped to the given New Relic monitor resource
*
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param monitorName Name of the Monitors resource.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return marketplace info mapped to the given monitor along with {@link Response} on successful completion of
- * {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> getWithResponseAsync(String resourceGroupName, String monitorName,
- Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (monitorName == null) {
- return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
- resourceGroupName, monitorName, accept, context);
- }
-
- /**
- * Get marketplace info mapped to the given monitor.
+ * A synchronous resource action.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return marketplace info mapped to the given monitor on successful completion of {@link Mono}.
+ * @return marketplace Subscription and Organization details to which resource gets billed into on successful
+ * completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono getAsync(String resourceGroupName, String monitorName) {
@@ -155,7 +134,9 @@ private Mono getAsync(String resourceGroupName, String
}
/**
- * Get marketplace info mapped to the given monitor.
+ * Retrieves marketplace and organization information mapped to the given New Relic monitor resource
+ *
+ * A synchronous resource action.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
@@ -163,26 +144,51 @@ private Mono getAsync(String resourceGroupName, String
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return marketplace info mapped to the given monitor along with {@link Response}.
+ * @return marketplace Subscription and Organization details to which resource gets billed into along with
+ * {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response getWithResponse(String resourceGroupName, String monitorName,
Context context) {
- return getWithResponseAsync(resourceGroupName, monitorName, context).block();
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (monitorName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, monitorName, accept, context);
}
/**
- * Get marketplace info mapped to the given monitor.
+ * Retrieves marketplace and organization information mapped to the given New Relic monitor resource
+ *
+ * A synchronous resource action.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return marketplace info mapped to the given monitor.
+ * @return marketplace Subscription and Organization details to which resource gets billed into.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public BillingInfoResponseInner get(String resourceGroupName, String monitorName) {
return getWithResponse(resourceGroupName, monitorName, Context.NONE).getValue();
}
+
+ private static final ClientLogger LOGGER = new ClientLogger(BillingInfoesClientImpl.class);
}
diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/ConnectedPartnerResourcesClientImpl.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/ConnectedPartnerResourcesClientImpl.java
index 0d8517e85136..2e46e35bc460 100644
--- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/ConnectedPartnerResourcesClientImpl.java
+++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/ConnectedPartnerResourcesClientImpl.java
@@ -27,6 +27,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.newrelicobservability.fluent.ConnectedPartnerResourcesClient;
import com.azure.resourcemanager.newrelicobservability.fluent.models.ConnectedPartnerResourcesListFormatInner;
import com.azure.resourcemanager.newrelicobservability.models.ConnectedPartnerResourcesListResponse;
@@ -62,7 +63,7 @@ public final class ConnectedPartnerResourcesClientImpl implements ConnectedPartn
* proxy service to perform REST calls.
*/
@Host("{$host}")
- @ServiceInterface(name = "NewRelicObservabilit")
+ @ServiceInterface(name = "NewRelicObservabilityConnectedPartnerResources")
public interface ConnectedPartnerResourcesService {
@Headers({ "Content-Type: application/json" })
@Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/listConnectedPartnerResources")
@@ -73,6 +74,15 @@ Mono> list(@HostParam("$host") S
@PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName,
@BodyParam("application/json") String body, @HeaderParam("Accept") String accept, Context context);
+ @Headers({ "Content-Type: application/json" })
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/listConnectedPartnerResources")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listSync(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName,
+ @BodyParam("application/json") String body, @HeaderParam("Accept") String accept, Context context);
+
@Headers({ "Content-Type: application/json" })
@Get("{nextLink}")
@ExpectedResponses({ 200 })
@@ -80,11 +90,21 @@ Mono> list(@HostParam("$host") S
Mono> listNext(
@PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint,
@HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listNextSync(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
}
/**
* List of all active deployments that are associated with the marketplace subscription linked to the given monitor.
*
+ * A synchronous resource action.
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
* @param body Email Id of the user.
@@ -125,57 +145,39 @@ private Mono> listSingle
/**
* List of all active deployments that are associated with the marketplace subscription linked to the given monitor.
*
+ * A synchronous resource action.
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
* @param body Email Id of the user.
- * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return list of all active newrelic deployments along with {@link PagedResponse} on successful completion of
- * {@link Mono}.
+ * @return list of all active newrelic deployments as paginated response with {@link PagedFlux}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listSinglePageAsync(String resourceGroupName,
- String monitorName, String body, Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (monitorName == null) {
- return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service
- .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
- resourceGroupName, monitorName, body, accept, context)
- .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
- res.getValue().value(), res.getValue().nextLink(), null));
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String resourceGroupName, String monitorName,
+ String body) {
+ return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, monitorName, body),
+ nextLink -> listNextSinglePageAsync(nextLink));
}
/**
* List of all active deployments that are associated with the marketplace subscription linked to the given monitor.
*
+ * A synchronous resource action.
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
- * @param body Email Id of the user.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return list of all active newrelic deployments as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listAsync(String resourceGroupName, String monitorName,
- String body) {
+ private PagedFlux listAsync(String resourceGroupName,
+ String monitorName) {
+ final String body = null;
return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, monitorName, body),
nextLink -> listNextSinglePageAsync(nextLink));
}
@@ -183,24 +185,50 @@ private PagedFlux listAsync(String res
/**
* List of all active deployments that are associated with the marketplace subscription linked to the given monitor.
*
+ * A synchronous resource action.
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
+ * @param body Email Id of the user.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return list of all active newrelic deployments as paginated response with {@link PagedFlux}.
+ * @return list of all active newrelic deployments along with {@link PagedResponse}.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listAsync(String resourceGroupName,
- String monitorName) {
- final String body = null;
- return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, monitorName, body),
- nextLink -> listNextSinglePageAsync(nextLink));
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listSinglePage(String resourceGroupName,
+ String monitorName, String body) {
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (monitorName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ Response res
+ = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, monitorName, body, accept, Context.NONE);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
}
/**
* List of all active deployments that are associated with the marketplace subscription linked to the given monitor.
*
+ * A synchronous resource action.
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
* @param body Email Id of the user.
@@ -208,18 +236,42 @@ private PagedFlux listAsync(String res
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return list of all active newrelic deployments as paginated response with {@link PagedFlux}.
+ * @return list of all active newrelic deployments along with {@link PagedResponse}.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listAsync(String resourceGroupName, String monitorName,
- String body, Context context) {
- return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, monitorName, body, context),
- nextLink -> listNextSinglePageAsync(nextLink, context));
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listSinglePage(String resourceGroupName,
+ String monitorName, String body, Context context) {
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (monitorName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ Response res
+ = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, monitorName, body, accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
}
/**
* List of all active deployments that are associated with the marketplace subscription linked to the given monitor.
*
+ * A synchronous resource action.
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -230,12 +282,15 @@ private PagedFlux listAsync(String res
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list(String resourceGroupName, String monitorName) {
final String body = null;
- return new PagedIterable<>(listAsync(resourceGroupName, monitorName, body));
+ return new PagedIterable<>(() -> listSinglePage(resourceGroupName, monitorName, body),
+ nextLink -> listNextSinglePage(nextLink));
}
/**
* List of all active deployments that are associated with the marketplace subscription linked to the given monitor.
*
+ * A synchronous resource action.
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
* @param body Email Id of the user.
@@ -248,10 +303,13 @@ public PagedIterable list(String resou
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list(String resourceGroupName, String monitorName,
String body, Context context) {
- return new PagedIterable<>(listAsync(resourceGroupName, monitorName, body, context));
+ return new PagedIterable<>(() -> listSinglePage(resourceGroupName, monitorName, body, context),
+ nextLink -> listNextSinglePage(nextLink, context));
}
/**
+ * List of all active deployments that are associated with the marketplace subscription linked to the given monitor.
+ *
* Get the next page of items.
*
* @param nextLink The URL to get the next list of items.
@@ -279,6 +337,37 @@ private Mono> listNextSi
}
/**
+ * List of all active deployments that are associated with the marketplace subscription linked to the given monitor.
+ *
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of all active newrelic deployments along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listNextSinglePage(String nextLink) {
+ if (nextLink == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ Response res
+ = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
+ /**
+ * List of all active deployments that are associated with the marketplace subscription linked to the given monitor.
+ *
* Get the next page of items.
*
* @param nextLink The URL to get the next list of items.
@@ -286,23 +375,26 @@ private Mono> listNextSi
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return list of all active newrelic deployments along with {@link PagedResponse} on successful completion of
- * {@link Mono}.
+ * @return list of all active newrelic deployments along with {@link PagedResponse}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listNextSinglePageAsync(String nextLink,
+ private PagedResponse listNextSinglePage(String nextLink,
Context context) {
if (nextLink == null) {
- return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
}
if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
}
final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.listNext(nextLink, this.client.getEndpoint(), accept, context)
- .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
- res.getValue().value(), res.getValue().nextLink(), null));
+ Response res
+ = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
}
+
+ private static final ClientLogger LOGGER = new ClientLogger(ConnectedPartnerResourcesClientImpl.class);
}
diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/LatestLinkedSaaSResponseImpl.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/LatestLinkedSaaSResponseImpl.java
new file mode 100644
index 000000000000..ab1a1e2a106a
--- /dev/null
+++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/LatestLinkedSaaSResponseImpl.java
@@ -0,0 +1,36 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.newrelicobservability.implementation;
+
+import com.azure.resourcemanager.newrelicobservability.fluent.models.LatestLinkedSaaSResponseInner;
+import com.azure.resourcemanager.newrelicobservability.models.LatestLinkedSaaSResponse;
+
+public final class LatestLinkedSaaSResponseImpl implements LatestLinkedSaaSResponse {
+ private LatestLinkedSaaSResponseInner innerObject;
+
+ private final com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager serviceManager;
+
+ LatestLinkedSaaSResponseImpl(LatestLinkedSaaSResponseInner innerObject,
+ com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String saaSResourceId() {
+ return this.innerModel().saaSResourceId();
+ }
+
+ public Boolean isHiddenSaaS() {
+ return this.innerModel().isHiddenSaaS();
+ }
+
+ public LatestLinkedSaaSResponseInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/MonitoredSubscriptionPropertiesImpl.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/MonitoredSubscriptionPropertiesImpl.java
index 72257cb8dd98..37be0cb7a972 100644
--- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/MonitoredSubscriptionPropertiesImpl.java
+++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/MonitoredSubscriptionPropertiesImpl.java
@@ -4,6 +4,7 @@
package com.azure.resourcemanager.newrelicobservability.implementation;
+import com.azure.core.management.SystemData;
import com.azure.core.util.Context;
import com.azure.resourcemanager.newrelicobservability.fluent.models.MonitoredSubscriptionPropertiesInner;
import com.azure.resourcemanager.newrelicobservability.models.ConfigurationName;
@@ -32,6 +33,10 @@ public SubscriptionList properties() {
return this.innerModel().properties();
}
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
public String resourceGroupName() {
return resourceGroupName;
}
@@ -59,14 +64,14 @@ public MonitoredSubscriptionPropertiesImpl withExistingMonitor(String resourceGr
public MonitoredSubscriptionProperties create() {
this.innerObject = serviceManager.serviceClient()
.getMonitoredSubscriptions()
- .createorUpdate(resourceGroupName, monitorName, configurationName, this.innerModel(), Context.NONE);
+ .createOrUpdate(resourceGroupName, monitorName, configurationName, this.innerModel(), Context.NONE);
return this;
}
public MonitoredSubscriptionProperties create(Context context) {
this.innerObject = serviceManager.serviceClient()
.getMonitoredSubscriptions()
- .createorUpdate(resourceGroupName, monitorName, configurationName, this.innerModel(), context);
+ .createOrUpdate(resourceGroupName, monitorName, configurationName, this.innerModel(), context);
return this;
}
diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/MonitoredSubscriptionsClientImpl.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/MonitoredSubscriptionsClientImpl.java
index 78b8b8f60490..57fc62716664 100644
--- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/MonitoredSubscriptionsClientImpl.java
+++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/MonitoredSubscriptionsClientImpl.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.newrelicobservability.fluent.MonitoredSubscriptionsClient;
@@ -70,36 +72,65 @@ public final class MonitoredSubscriptionsClientImpl implements MonitoredSubscrip
* service to perform REST calls.
*/
@Host("{$host}")
- @ServiceInterface(name = "NewRelicObservabilit")
+ @ServiceInterface(name = "NewRelicObservabilityMonitoredSubscriptions")
public interface MonitoredSubscriptionsService {
@Headers({ "Content-Type: application/json" })
@Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/monitoredSubscriptions")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> list(@HostParam("$host") String endpoint,
- @PathParam("subscriptionId") String subscriptionId,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
@PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName,
- @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context);
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/monitoredSubscriptions")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listSync(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName,
+ @HeaderParam("Accept") String accept, Context context);
@Headers({ "Content-Type: application/json" })
@Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/monitoredSubscriptions/{configurationName}")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> get(@HostParam("$host") String endpoint,
- @PathParam("subscriptionId") String subscriptionId,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName,
+ @PathParam("configurationName") ConfigurationName configurationName, @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/monitoredSubscriptions/{configurationName}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response getSync(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName,
+ @PathParam("configurationName") ConfigurationName configurationName, @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/monitoredSubscriptions/{configurationName}")
+ @ExpectedResponses({ 200, 201 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> createOrUpdate(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
@PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName,
@PathParam("configurationName") ConfigurationName configurationName,
- @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context);
+ @BodyParam("application/json") MonitoredSubscriptionPropertiesInner body,
+ @HeaderParam("Accept") String accept, Context context);
@Headers({ "Content-Type: application/json" })
@Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/monitoredSubscriptions/{configurationName}")
@ExpectedResponses({ 200, 201 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono>> createorUpdate(@HostParam("$host") String endpoint,
- @PathParam("subscriptionId") String subscriptionId,
+ Response createOrUpdateSync(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
@PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName,
@PathParam("configurationName") ConfigurationName configurationName,
- @QueryParam("api-version") String apiVersion,
@BodyParam("application/json") MonitoredSubscriptionPropertiesInner body,
@HeaderParam("Accept") String accept, Context context);
@@ -108,10 +139,20 @@ Mono>> createorUpdate(@HostParam("$host") String endpo
@ExpectedResponses({ 200, 202 })
@UnexpectedResponseExceptionType(ManagementException.class)
Mono>> update(@HostParam("$host") String endpoint,
- @PathParam("subscriptionId") String subscriptionId,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName,
+ @PathParam("configurationName") ConfigurationName configurationName,
+ @BodyParam("application/json") MonitoredSubscriptionPropertiesInner body,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/monitoredSubscriptions/{configurationName}")
+ @ExpectedResponses({ 200, 202 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response updateSync(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
@PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName,
@PathParam("configurationName") ConfigurationName configurationName,
- @QueryParam("api-version") String apiVersion,
@BodyParam("application/json") MonitoredSubscriptionPropertiesInner body,
@HeaderParam("Accept") String accept, Context context);
@@ -120,10 +161,20 @@ Mono>> update(@HostParam("$host") String endpoint,
@ExpectedResponses({ 202, 204 })
@UnexpectedResponseExceptionType(ManagementException.class)
Mono>> delete(@HostParam("$host") String endpoint,
- @PathParam("subscriptionId") String subscriptionId,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
@PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName,
- @PathParam("configurationName") ConfigurationName configurationName,
- @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context);
+ @PathParam("configurationName") ConfigurationName configurationName, @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/monitoredSubscriptions/{configurationName}")
+ @ExpectedResponses({ 202, 204 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response deleteSync(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName,
+ @PathParam("configurationName") ConfigurationName configurationName, @HeaderParam("Accept") String accept,
+ Context context);
@Headers({ "Content-Type: application/json" })
@Get("{nextLink}")
@@ -132,17 +183,28 @@ Mono>> delete(@HostParam("$host") String endpoint,
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);
}
/**
- * List the subscriptions currently being monitored by the NewRelic monitor resource.
+ * Lists all the subscriptions currently being monitored by the NewRelic monitor resource.
+ *
+ * List MonitoredSubscriptionProperties resources by NewRelicMonitorResource.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}.
+ * @return paged collection of MonitoredSubscriptionProperties items along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listSinglePageAsync(String resourceGroupName,
@@ -164,69 +226,76 @@ private Mono> listSinglePage
}
final String accept = "application/json";
return FluxUtil
- .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(),
- resourceGroupName, monitorName, this.client.getApiVersion(), accept, context))
+ .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, monitorName, accept, context))
.>map(res -> new PagedResponseBase<>(res.getRequest(),
res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
- * List the subscriptions currently being monitored by the NewRelic monitor resource.
+ * Lists all the subscriptions currently being monitored by the NewRelic monitor resource.
+ *
+ * List MonitoredSubscriptionProperties resources by NewRelicMonitorResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return paged collection of MonitoredSubscriptionProperties items as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String resourceGroupName, String monitorName) {
+ return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, monitorName),
+ nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Lists all the subscriptions currently being monitored by the NewRelic monitor resource.
+ *
+ * List MonitoredSubscriptionProperties resources by NewRelicMonitorResource.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
- * @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 response body along with {@link PagedResponse} on successful completion of {@link Mono}.
+ * @return paged collection of MonitoredSubscriptionProperties items along with {@link PagedResponse}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listSinglePageAsync(String resourceGroupName,
- String monitorName, Context context) {
+ private PagedResponse listSinglePage(String resourceGroupName,
+ String monitorName) {
if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
}
if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
}
if (monitorName == null) {
- return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null."));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null."));
}
final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service
- .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, monitorName,
- this.client.getApiVersion(), accept, context)
- .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
- res.getValue().value(), res.getValue().nextLink(), null));
+ Response res
+ = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, monitorName, accept, Context.NONE);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
}
/**
- * List the subscriptions currently being monitored by the NewRelic monitor resource.
+ * Lists all the subscriptions currently being monitored by the NewRelic monitor resource.
*
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param monitorName Name of the Monitors resource.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the paginated response with {@link PagedFlux}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listAsync(String resourceGroupName, String monitorName) {
- return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, monitorName),
- nextLink -> listNextSinglePageAsync(nextLink));
- }
-
- /**
- * List the subscriptions currently being monitored by the NewRelic monitor resource.
+ * List MonitoredSubscriptionProperties resources by NewRelicMonitorResource.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
@@ -234,32 +303,60 @@ private PagedFlux listAsync(String resourc
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the paginated response with {@link PagedFlux}.
+ * @return paged collection of MonitoredSubscriptionProperties items along with {@link PagedResponse}.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listAsync(String resourceGroupName, String monitorName,
- Context context) {
- return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, monitorName, context),
- nextLink -> listNextSinglePageAsync(nextLink, context));
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listSinglePage(String resourceGroupName,
+ String monitorName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (monitorName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ Response res
+ = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, monitorName, accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
}
/**
- * List the subscriptions currently being monitored by the NewRelic monitor resource.
+ * Lists all the subscriptions currently being monitored by the NewRelic monitor resource.
+ *
+ * List MonitoredSubscriptionProperties resources by NewRelicMonitorResource.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the paginated response with {@link PagedIterable}.
+ * @return paged collection of MonitoredSubscriptionProperties items as paginated response with
+ * {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list(String resourceGroupName, String monitorName) {
- return new PagedIterable<>(listAsync(resourceGroupName, monitorName));
+ return new PagedIterable<>(() -> listSinglePage(resourceGroupName, monitorName),
+ nextLink -> listNextSinglePage(nextLink));
}
/**
- * List the subscriptions currently being monitored by the NewRelic monitor resource.
+ * Lists all the subscriptions currently being monitored by the NewRelic monitor resource.
+ *
+ * List MonitoredSubscriptionProperties resources by NewRelicMonitorResource.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
@@ -267,16 +364,20 @@ public PagedIterable list(String resourceG
* @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 paginated response with {@link PagedIterable}.
+ * @return paged collection of MonitoredSubscriptionProperties items as paginated response with
+ * {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list(String resourceGroupName, String monitorName,
Context context) {
- return new PagedIterable<>(listAsync(resourceGroupName, monitorName, context));
+ return new PagedIterable<>(() -> listSinglePage(resourceGroupName, monitorName, context),
+ nextLink -> listNextSinglePage(nextLink, context));
}
/**
- * List the subscriptions currently being monitored by the NewRelic monitor resource.
+ * Lists all the subscriptions currently being monitored by the NewRelic monitor resource.
+ *
+ * Get a MonitoredSubscriptionProperties.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
@@ -284,8 +385,7 @@ public PagedIterable list(String resourceG
* @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 request to update subscriptions needed to be monitored by the NewRelic monitor resource along with
- * {@link Response} on successful completion of {@link Mono}.
+ * @return a MonitoredSubscriptionProperties along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> getWithResponseAsync(String resourceGroupName,
@@ -311,54 +411,15 @@ private Mono> getWithResponseAsyn
}
final String accept = "application/json";
return FluxUtil
- .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(),
- resourceGroupName, monitorName, configurationName, this.client.getApiVersion(), accept, context))
+ .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, monitorName, configurationName, accept, context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
- * List the subscriptions currently being monitored by the NewRelic monitor resource.
+ * Lists all the subscriptions currently being monitored by the NewRelic monitor resource.
*
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param monitorName Name of the Monitors resource.
- * @param configurationName The configuration name. Only 'default' value is supported.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the request to update subscriptions needed to be monitored by the NewRelic monitor resource along with
- * {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> getWithResponseAsync(String resourceGroupName,
- String monitorName, ConfigurationName configurationName, Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (monitorName == null) {
- return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null."));
- }
- if (configurationName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter configurationName is required and cannot be null."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, monitorName,
- configurationName, this.client.getApiVersion(), accept, context);
- }
-
- /**
- * List the subscriptions currently being monitored by the NewRelic monitor resource.
+ * Get a MonitoredSubscriptionProperties.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
@@ -366,8 +427,7 @@ private Mono> getWithResponseAsyn
* @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 request to update subscriptions needed to be monitored by the NewRelic monitor resource on successful
- * completion of {@link Mono}.
+ * @return a MonitoredSubscriptionProperties on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono getAsync(String resourceGroupName, String monitorName,
@@ -377,7 +437,9 @@ private Mono getAsync(String resourceGroup
}
/**
- * List the subscriptions currently being monitored by the NewRelic monitor resource.
+ * Lists all the subscriptions currently being monitored by the NewRelic monitor resource.
+ *
+ * Get a MonitoredSubscriptionProperties.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
@@ -386,17 +448,42 @@ private Mono getAsync(String resourceGroup
* @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 request to update subscriptions needed to be monitored by the NewRelic monitor resource along with
- * {@link Response}.
+ * @return a MonitoredSubscriptionProperties along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response getWithResponse(String resourceGroupName, String monitorName,
ConfigurationName configurationName, Context context) {
- return getWithResponseAsync(resourceGroupName, monitorName, configurationName, context).block();
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (monitorName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null."));
+ }
+ if (configurationName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter configurationName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, monitorName, configurationName, accept, context);
}
/**
- * List the subscriptions currently being monitored by the NewRelic monitor resource.
+ * Lists all the subscriptions currently being monitored by the NewRelic monitor resource.
+ *
+ * Get a MonitoredSubscriptionProperties.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
@@ -404,7 +491,7 @@ public Response getWithResponse(String res
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the request to update subscriptions needed to be monitored by the NewRelic monitor resource.
+ * @return a MonitoredSubscriptionProperties.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public MonitoredSubscriptionPropertiesInner get(String resourceGroupName, String monitorName,
@@ -413,7 +500,9 @@ public MonitoredSubscriptionPropertiesInner get(String resourceGroupName, String
}
/**
- * Add the subscriptions that should be monitored by the NewRelic monitor resource.
+ * Add subscriptions to be monitored by the New Relic monitor resource, enabling observability and monitoring.
+ *
+ * Create a MonitoredSubscriptionProperties.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
@@ -426,7 +515,7 @@ public MonitoredSubscriptionPropertiesInner get(String resourceGroupName, String
* {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> createorUpdateWithResponseAsync(String resourceGroupName,
+ private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName,
String monitorName, ConfigurationName configurationName, MonitoredSubscriptionPropertiesInner body) {
if (this.client.getEndpoint() == null) {
return Mono.error(
@@ -452,13 +541,65 @@ private Mono>> createorUpdateWithResponseAsync(String
}
final String accept = "application/json";
return FluxUtil
- .withContext(context -> service.createorUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(),
- resourceGroupName, monitorName, configurationName, this.client.getApiVersion(), body, accept, context))
+ .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, monitorName, configurationName, body, accept,
+ context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
- * Add the subscriptions that should be monitored by the NewRelic monitor resource.
+ * Add subscriptions to be monitored by the New Relic monitor resource, enabling observability and monitoring.
+ *
+ * Create a MonitoredSubscriptionProperties.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors resource.
+ * @param configurationName The configuration name. Only 'default' value is supported.
+ * @param body The body parameter.
+ * @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 request to update subscriptions needed to be monitored by the NewRelic monitor resource along with
+ * {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Response createOrUpdateWithResponse(String resourceGroupName, String monitorName,
+ ConfigurationName configurationName, MonitoredSubscriptionPropertiesInner body) {
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (monitorName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null."));
+ }
+ if (configurationName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter configurationName is required and cannot be null."));
+ }
+ if (body != null) {
+ body.validate();
+ }
+ final String accept = "application/json";
+ return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, monitorName, configurationName, body, accept,
+ Context.NONE);
+ }
+
+ /**
+ * Add subscriptions to be monitored by the New Relic monitor resource, enabling observability and monitoring.
+ *
+ * Create a MonitoredSubscriptionProperties.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
@@ -469,42 +610,45 @@ private Mono>> createorUpdateWithResponseAsync(String
* @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 request to update subscriptions needed to be monitored by the NewRelic monitor resource along with
- * {@link Response} on successful completion of {@link Mono}.
+ * {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> createorUpdateWithResponseAsync(String resourceGroupName,
- String monitorName, ConfigurationName configurationName, MonitoredSubscriptionPropertiesInner body,
- Context context) {
+ private Response createOrUpdateWithResponse(String resourceGroupName, String monitorName,
+ ConfigurationName configurationName, MonitoredSubscriptionPropertiesInner body, Context context) {
if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
}
if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
}
if (monitorName == null) {
- return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null."));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null."));
}
if (configurationName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter configurationName is required and cannot be null."));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter configurationName is required and cannot be null."));
}
if (body != null) {
body.validate();
}
final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.createorUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName,
- monitorName, configurationName, this.client.getApiVersion(), body, accept, context);
+ return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, monitorName, configurationName, body, accept, context);
}
/**
- * Add the subscriptions that should be monitored by the NewRelic monitor resource.
+ * Add subscriptions to be monitored by the New Relic monitor resource, enabling observability and monitoring.
+ *
+ * Create a MonitoredSubscriptionProperties.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
@@ -518,17 +662,19 @@ private Mono>> createorUpdateWithResponseAsync(String
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, MonitoredSubscriptionPropertiesInner>
- beginCreateorUpdateAsync(String resourceGroupName, String monitorName, ConfigurationName configurationName,
+ beginCreateOrUpdateAsync(String resourceGroupName, String monitorName, ConfigurationName configurationName,
MonitoredSubscriptionPropertiesInner body) {
Mono>> mono
- = createorUpdateWithResponseAsync(resourceGroupName, monitorName, configurationName, body);
+ = createOrUpdateWithResponseAsync(resourceGroupName, monitorName, configurationName, body);
return this.client.getLroResult(
mono, this.client.getHttpPipeline(), MonitoredSubscriptionPropertiesInner.class,
MonitoredSubscriptionPropertiesInner.class, this.client.getContext());
}
/**
- * Add the subscriptions that should be monitored by the NewRelic monitor resource.
+ * Add subscriptions to be monitored by the New Relic monitor resource, enabling observability and monitoring.
+ *
+ * Create a MonitoredSubscriptionProperties.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
@@ -541,43 +687,45 @@ private Mono>> createorUpdateWithResponseAsync(String
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, MonitoredSubscriptionPropertiesInner>
- beginCreateorUpdateAsync(String resourceGroupName, String monitorName, ConfigurationName configurationName) {
+ beginCreateOrUpdateAsync(String resourceGroupName, String monitorName, ConfigurationName configurationName) {
final MonitoredSubscriptionPropertiesInner body = null;
Mono>> mono
- = createorUpdateWithResponseAsync(resourceGroupName, monitorName, configurationName, body);
+ = createOrUpdateWithResponseAsync(resourceGroupName, monitorName, configurationName, body);
return this.client.getLroResult(
mono, this.client.getHttpPipeline(), MonitoredSubscriptionPropertiesInner.class,
MonitoredSubscriptionPropertiesInner.class, this.client.getContext());
}
/**
- * Add the subscriptions that should be monitored by the NewRelic monitor resource.
+ * Add subscriptions to be monitored by the New Relic monitor resource, enabling observability and monitoring.
+ *
+ * Create a MonitoredSubscriptionProperties.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
* @param configurationName The configuration name. Only 'default' value is supported.
* @param body The body parameter.
- * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 request to update subscriptions needed to be monitored by the
+ * @return the {@link SyncPoller} for polling of the request to update subscriptions needed to be monitored by the
* NewRelic monitor resource.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, MonitoredSubscriptionPropertiesInner>
- beginCreateorUpdateAsync(String resourceGroupName, String monitorName, ConfigurationName configurationName,
- MonitoredSubscriptionPropertiesInner body, Context context) {
- context = this.client.mergeContext(context);
- Mono>> mono
- = createorUpdateWithResponseAsync(resourceGroupName, monitorName, configurationName, body, context);
+ public SyncPoller, MonitoredSubscriptionPropertiesInner>
+ beginCreateOrUpdate(String resourceGroupName, String monitorName, ConfigurationName configurationName,
+ MonitoredSubscriptionPropertiesInner body) {
+ Response response
+ = createOrUpdateWithResponse(resourceGroupName, monitorName, configurationName, body);
return this.client.getLroResult(
- mono, this.client.getHttpPipeline(), MonitoredSubscriptionPropertiesInner.class,
- MonitoredSubscriptionPropertiesInner.class, context);
+ response, MonitoredSubscriptionPropertiesInner.class, MonitoredSubscriptionPropertiesInner.class,
+ Context.NONE);
}
/**
- * Add the subscriptions that should be monitored by the NewRelic monitor resource.
+ * Add subscriptions to be monitored by the New Relic monitor resource, enabling observability and monitoring.
+ *
+ * Create a MonitoredSubscriptionProperties.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
@@ -590,13 +738,19 @@ private Mono>> createorUpdateWithResponseAsync(String
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, MonitoredSubscriptionPropertiesInner>
- beginCreateorUpdate(String resourceGroupName, String monitorName, ConfigurationName configurationName) {
+ beginCreateOrUpdate(String resourceGroupName, String monitorName, ConfigurationName configurationName) {
final MonitoredSubscriptionPropertiesInner body = null;
- return this.beginCreateorUpdateAsync(resourceGroupName, monitorName, configurationName, body).getSyncPoller();
+ Response response
+ = createOrUpdateWithResponse(resourceGroupName, monitorName, configurationName, body);
+ return this.client.getLroResult(
+ response, MonitoredSubscriptionPropertiesInner.class, MonitoredSubscriptionPropertiesInner.class,
+ Context.NONE);
}
/**
- * Add the subscriptions that should be monitored by the NewRelic monitor resource.
+ * Add subscriptions to be monitored by the New Relic monitor resource, enabling observability and monitoring.
+ *
+ * Create a MonitoredSubscriptionProperties.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
@@ -611,14 +765,18 @@ private Mono>> createorUpdateWithResponseAsync(String
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, MonitoredSubscriptionPropertiesInner>
- beginCreateorUpdate(String resourceGroupName, String monitorName, ConfigurationName configurationName,
+ beginCreateOrUpdate(String resourceGroupName, String monitorName, ConfigurationName configurationName,
MonitoredSubscriptionPropertiesInner body, Context context) {
- return this.beginCreateorUpdateAsync(resourceGroupName, monitorName, configurationName, body, context)
- .getSyncPoller();
+ Response response
+ = createOrUpdateWithResponse(resourceGroupName, monitorName, configurationName, body, context);
+ return this.client.getLroResult(
+ response, MonitoredSubscriptionPropertiesInner.class, MonitoredSubscriptionPropertiesInner.class, context);
}
/**
- * Add the subscriptions that should be monitored by the NewRelic monitor resource.
+ * Add subscriptions to be monitored by the New Relic monitor resource, enabling observability and monitoring.
+ *
+ * Create a MonitoredSubscriptionProperties.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
@@ -631,14 +789,16 @@ private Mono>> createorUpdateWithResponseAsync(String
* completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono createorUpdateAsync(String resourceGroupName, String monitorName,
+ private Mono createOrUpdateAsync(String resourceGroupName, String monitorName,
ConfigurationName configurationName, MonitoredSubscriptionPropertiesInner body) {
- return beginCreateorUpdateAsync(resourceGroupName, monitorName, configurationName, body).last()
+ return beginCreateOrUpdateAsync(resourceGroupName, monitorName, configurationName, body).last()
.flatMap(this.client::getLroFinalResultOrError);
}
/**
- * Add the subscriptions that should be monitored by the NewRelic monitor resource.
+ * Add subscriptions to be monitored by the New Relic monitor resource, enabling observability and monitoring.
+ *
+ * Create a MonitoredSubscriptionProperties.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
@@ -650,36 +810,17 @@ private Mono createorUpdateAsync(String re
* completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono createorUpdateAsync(String resourceGroupName, String monitorName,
+ private Mono createOrUpdateAsync(String resourceGroupName, String monitorName,
ConfigurationName configurationName) {
final MonitoredSubscriptionPropertiesInner body = null;
- return beginCreateorUpdateAsync(resourceGroupName, monitorName, configurationName, body).last()
+ return beginCreateOrUpdateAsync(resourceGroupName, monitorName, configurationName, body).last()
.flatMap(this.client::getLroFinalResultOrError);
}
/**
- * Add the subscriptions that should be monitored by the NewRelic monitor resource.
+ * Add subscriptions to be monitored by the New Relic monitor resource, enabling observability and monitoring.
*
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param monitorName Name of the Monitors resource.
- * @param configurationName The configuration name. Only 'default' value is supported.
- * @param body The body parameter.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the request to update subscriptions needed to be monitored by the NewRelic monitor resource on successful
- * completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono createorUpdateAsync(String resourceGroupName, String monitorName,
- ConfigurationName configurationName, MonitoredSubscriptionPropertiesInner body, Context context) {
- return beginCreateorUpdateAsync(resourceGroupName, monitorName, configurationName, body, context).last()
- .flatMap(this.client::getLroFinalResultOrError);
- }
-
- /**
- * Add the subscriptions that should be monitored by the NewRelic monitor resource.
+ * Create a MonitoredSubscriptionProperties.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
@@ -690,14 +831,16 @@ private Mono createorUpdateAsync(String re
* @return the request to update subscriptions needed to be monitored by the NewRelic monitor resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public MonitoredSubscriptionPropertiesInner createorUpdate(String resourceGroupName, String monitorName,
+ public MonitoredSubscriptionPropertiesInner createOrUpdate(String resourceGroupName, String monitorName,
ConfigurationName configurationName) {
final MonitoredSubscriptionPropertiesInner body = null;
- return createorUpdateAsync(resourceGroupName, monitorName, configurationName, body).block();
+ return beginCreateOrUpdate(resourceGroupName, monitorName, configurationName, body).getFinalResult();
}
/**
- * Add the subscriptions that should be monitored by the NewRelic monitor resource.
+ * Add subscriptions to be monitored by the New Relic monitor resource, enabling observability and monitoring.
+ *
+ * Create a MonitoredSubscriptionProperties.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
@@ -710,13 +853,16 @@ public MonitoredSubscriptionPropertiesInner createorUpdate(String resourceGroupN
* @return the request to update subscriptions needed to be monitored by the NewRelic monitor resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public MonitoredSubscriptionPropertiesInner createorUpdate(String resourceGroupName, String monitorName,
+ public MonitoredSubscriptionPropertiesInner createOrUpdate(String resourceGroupName, String monitorName,
ConfigurationName configurationName, MonitoredSubscriptionPropertiesInner body, Context context) {
- return createorUpdateAsync(resourceGroupName, monitorName, configurationName, body, context).block();
+ return beginCreateOrUpdate(resourceGroupName, monitorName, configurationName, body, context).getFinalResult();
}
/**
- * Updates the subscriptions that are being monitored by the NewRelic monitor resource.
+ * Update subscriptions to be monitored by the New Relic monitor resource, ensuring optimal observability and
+ * performance
+ *
+ * Update a MonitoredSubscriptionProperties.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
@@ -754,14 +900,66 @@ private Mono>> updateWithResponseAsync(String resource
body.validate();
}
final String accept = "application/json";
- return FluxUtil
- .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(),
- resourceGroupName, monitorName, configurationName, this.client.getApiVersion(), body, accept, context))
+ return FluxUtil.withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, monitorName, configurationName, body, accept, context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
- * Updates the subscriptions that are being monitored by the NewRelic monitor resource.
+ * Update subscriptions to be monitored by the New Relic monitor resource, ensuring optimal observability and
+ * performance
+ *
+ * Update a MonitoredSubscriptionProperties.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors resource.
+ * @param configurationName The configuration name. Only 'default' value is supported.
+ * @param body The body parameter.
+ * @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 request to update subscriptions needed to be monitored by the NewRelic monitor resource along with
+ * {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Response updateWithResponse(String resourceGroupName, String monitorName,
+ ConfigurationName configurationName, MonitoredSubscriptionPropertiesInner body) {
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (monitorName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null."));
+ }
+ if (configurationName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter configurationName is required and cannot be null."));
+ }
+ if (body != null) {
+ body.validate();
+ }
+ final String accept = "application/json";
+ return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, monitorName, configurationName, body, accept,
+ Context.NONE);
+ }
+
+ /**
+ * Update subscriptions to be monitored by the New Relic monitor resource, ensuring optimal observability and
+ * performance
+ *
+ * Update a MonitoredSubscriptionProperties.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
@@ -772,41 +970,46 @@ private Mono>> updateWithResponseAsync(String resource
* @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 request to update subscriptions needed to be monitored by the NewRelic monitor resource along with
- * {@link Response} on successful completion of {@link Mono}.
+ * {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> updateWithResponseAsync(String resourceGroupName, String monitorName,
+ private Response updateWithResponse(String resourceGroupName, String monitorName,
ConfigurationName configurationName, MonitoredSubscriptionPropertiesInner body, Context context) {
if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
}
if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
}
if (monitorName == null) {
- return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null."));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null."));
}
if (configurationName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter configurationName is required and cannot be null."));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter configurationName is required and cannot be null."));
}
if (body != null) {
body.validate();
}
final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName,
- monitorName, configurationName, this.client.getApiVersion(), body, accept, context);
+ return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, monitorName, configurationName, body, accept, context);
}
/**
- * Updates the subscriptions that are being monitored by the NewRelic monitor resource.
+ * Update subscriptions to be monitored by the New Relic monitor resource, ensuring optimal observability and
+ * performance
+ *
+ * Update a MonitoredSubscriptionProperties.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
@@ -830,7 +1033,10 @@ private Mono>> updateWithResponseAsync(String resource
}
/**
- * Updates the subscriptions that are being monitored by the NewRelic monitor resource.
+ * Update subscriptions to be monitored by the New Relic monitor resource, ensuring optimal observability and
+ * performance
+ *
+ * Update a MonitoredSubscriptionProperties.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
@@ -853,33 +1059,36 @@ private Mono>> updateWithResponseAsync(String resource
}
/**
- * Updates the subscriptions that are being monitored by the NewRelic monitor resource.
+ * Update subscriptions to be monitored by the New Relic monitor resource, ensuring optimal observability and
+ * performance
+ *
+ * Update a MonitoredSubscriptionProperties.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
* @param configurationName The configuration name. Only 'default' value is supported.
* @param body The body parameter.
- * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 request to update subscriptions needed to be monitored by the
+ * @return the {@link SyncPoller} for polling of the request to update subscriptions needed to be monitored by the
* NewRelic monitor resource.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, MonitoredSubscriptionPropertiesInner>
- beginUpdateAsync(String resourceGroupName, String monitorName, ConfigurationName configurationName,
- MonitoredSubscriptionPropertiesInner body, Context context) {
- context = this.client.mergeContext(context);
- Mono>> mono
- = updateWithResponseAsync(resourceGroupName, monitorName, configurationName, body, context);
+ public SyncPoller, MonitoredSubscriptionPropertiesInner>
+ beginUpdate(String resourceGroupName, String monitorName, ConfigurationName configurationName,
+ MonitoredSubscriptionPropertiesInner body) {
+ Response response = updateWithResponse(resourceGroupName, monitorName, configurationName, body);
return this.client.getLroResult(
- mono, this.client.getHttpPipeline(), MonitoredSubscriptionPropertiesInner.class,
- MonitoredSubscriptionPropertiesInner.class, context);
+ response, MonitoredSubscriptionPropertiesInner.class, MonitoredSubscriptionPropertiesInner.class,
+ Context.NONE);
}
/**
- * Updates the subscriptions that are being monitored by the NewRelic monitor resource.
+ * Update subscriptions to be monitored by the New Relic monitor resource, ensuring optimal observability and
+ * performance
+ *
+ * Update a MonitoredSubscriptionProperties.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
@@ -894,11 +1103,17 @@ private Mono>> updateWithResponseAsync(String resource
public SyncPoller, MonitoredSubscriptionPropertiesInner>
beginUpdate(String resourceGroupName, String monitorName, ConfigurationName configurationName) {
final MonitoredSubscriptionPropertiesInner body = null;
- return this.beginUpdateAsync(resourceGroupName, monitorName, configurationName, body).getSyncPoller();
+ Response response = updateWithResponse(resourceGroupName, monitorName, configurationName, body);
+ return this.client.getLroResult(
+ response, MonitoredSubscriptionPropertiesInner.class, MonitoredSubscriptionPropertiesInner.class,
+ Context.NONE);
}
/**
- * Updates the subscriptions that are being monitored by the NewRelic monitor resource.
+ * Update subscriptions to be monitored by the New Relic monitor resource, ensuring optimal observability and
+ * performance
+ *
+ * Update a MonitoredSubscriptionProperties.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
@@ -915,11 +1130,17 @@ private Mono>> updateWithResponseAsync(String resource
public SyncPoller, MonitoredSubscriptionPropertiesInner>
beginUpdate(String resourceGroupName, String monitorName, ConfigurationName configurationName,
MonitoredSubscriptionPropertiesInner body, Context context) {
- return this.beginUpdateAsync(resourceGroupName, monitorName, configurationName, body, context).getSyncPoller();
+ Response response
+ = updateWithResponse(resourceGroupName, monitorName, configurationName, body, context);
+ return this.client.getLroResult(
+ response, MonitoredSubscriptionPropertiesInner.class, MonitoredSubscriptionPropertiesInner.class, context);
}
/**
- * Updates the subscriptions that are being monitored by the NewRelic monitor resource.
+ * Update subscriptions to be monitored by the New Relic monitor resource, ensuring optimal observability and
+ * performance
+ *
+ * Update a MonitoredSubscriptionProperties.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
@@ -939,7 +1160,10 @@ private Mono updateAsync(String resourceGr
}
/**
- * Updates the subscriptions that are being monitored by the NewRelic monitor resource.
+ * Update subscriptions to be monitored by the New Relic monitor resource, ensuring optimal observability and
+ * performance
+ *
+ * Update a MonitoredSubscriptionProperties.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
@@ -959,28 +1183,10 @@ private Mono updateAsync(String resourceGr
}
/**
- * Updates the subscriptions that are being monitored by the NewRelic monitor resource.
+ * Update subscriptions to be monitored by the New Relic monitor resource, ensuring optimal observability and
+ * performance
*
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param monitorName Name of the Monitors resource.
- * @param configurationName The configuration name. Only 'default' value is supported.
- * @param body The body parameter.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the request to update subscriptions needed to be monitored by the NewRelic monitor resource on successful
- * completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono updateAsync(String resourceGroupName, String monitorName,
- ConfigurationName configurationName, MonitoredSubscriptionPropertiesInner body, Context context) {
- return beginUpdateAsync(resourceGroupName, monitorName, configurationName, body, context).last()
- .flatMap(this.client::getLroFinalResultOrError);
- }
-
- /**
- * Updates the subscriptions that are being monitored by the NewRelic monitor resource.
+ * Update a MonitoredSubscriptionProperties.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
@@ -994,11 +1200,14 @@ private Mono updateAsync(String resourceGr
public MonitoredSubscriptionPropertiesInner update(String resourceGroupName, String monitorName,
ConfigurationName configurationName) {
final MonitoredSubscriptionPropertiesInner body = null;
- return updateAsync(resourceGroupName, monitorName, configurationName, body).block();
+ return beginUpdate(resourceGroupName, monitorName, configurationName, body).getFinalResult();
}
/**
- * Updates the subscriptions that are being monitored by the NewRelic monitor resource.
+ * Update subscriptions to be monitored by the New Relic monitor resource, ensuring optimal observability and
+ * performance
+ *
+ * Update a MonitoredSubscriptionProperties.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
@@ -1013,11 +1222,14 @@ public MonitoredSubscriptionPropertiesInner update(String resourceGroupName, Str
@ServiceMethod(returns = ReturnType.SINGLE)
public MonitoredSubscriptionPropertiesInner update(String resourceGroupName, String monitorName,
ConfigurationName configurationName, MonitoredSubscriptionPropertiesInner body, Context context) {
- return updateAsync(resourceGroupName, monitorName, configurationName, body, context).block();
+ return beginUpdate(resourceGroupName, monitorName, configurationName, body, context).getFinalResult();
}
/**
- * Updates the subscriptions that are being monitored by the NewRelic monitor resource.
+ * Delete subscriptions being monitored by the New Relic monitor resource, removing their observability and
+ * monitoring capabilities
+ *
+ * Delete a MonitoredSubscriptionProperties.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
@@ -1051,78 +1263,109 @@ private Mono>> deleteWithResponseAsync(String resource
}
final String accept = "application/json";
return FluxUtil
- .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(),
- resourceGroupName, monitorName, configurationName, this.client.getApiVersion(), accept, context))
+ .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, monitorName, configurationName, accept, context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
- * Updates the subscriptions that are being monitored by the NewRelic monitor resource.
+ * Delete subscriptions being monitored by the New Relic monitor resource, removing their observability and
+ * monitoring capabilities
+ *
+ * Delete a MonitoredSubscriptionProperties.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
* @param configurationName The configuration name. Only 'default' value is supported.
- * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 monitorName,
- ConfigurationName configurationName, Context context) {
+ private Response deleteWithResponse(String resourceGroupName, String monitorName,
+ ConfigurationName configurationName) {
if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
}
if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
}
if (monitorName == null) {
- return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null."));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null."));
}
if (configurationName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter configurationName is required and cannot be null."));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter configurationName is required and cannot be null."));
}
final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName,
- monitorName, configurationName, this.client.getApiVersion(), accept, context);
+ return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, monitorName, configurationName, accept, Context.NONE);
}
/**
- * Updates the subscriptions that are being monitored by the NewRelic monitor resource.
+ * Delete subscriptions being monitored by the New Relic monitor resource, removing their observability and
+ * monitoring capabilities
+ *
+ * Delete a MonitoredSubscriptionProperties.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
* @param configurationName The configuration name. Only 'default' value is supported.
+ * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 monitorName,
- ConfigurationName configurationName) {
- Mono>> mono
- = deleteWithResponseAsync(resourceGroupName, monitorName, configurationName);
- 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 monitorName,
+ ConfigurationName configurationName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (monitorName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null."));
+ }
+ if (configurationName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter configurationName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, monitorName, configurationName, accept, context);
}
/**
- * Updates the subscriptions that are being monitored by the NewRelic monitor resource.
+ * Delete subscriptions being monitored by the New Relic monitor resource, removing their observability and
+ * monitoring capabilities
+ *
+ * Delete a MonitoredSubscriptionProperties.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param monitorName Name of the Monitors resource.
* @param configurationName The configuration name. Only 'default' value is supported.
- * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -1130,16 +1373,18 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String monitorName,
- ConfigurationName configurationName, Context context) {
- context = this.client.mergeContext(context);
+ ConfigurationName configurationName) {
Mono>> mono
- = deleteWithResponseAsync(resourceGroupName, monitorName, configurationName, context);
+ = deleteWithResponseAsync(resourceGroupName, monitorName, configurationName);
return this.client.