diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/CHANGELOG.md b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/CHANGELOG.md index 26e1c862cc14..1bd2b9345c96 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/CHANGELOG.md +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/CHANGELOG.md @@ -3,6 +3,7 @@ ## 1.2.0-beta.1 (2025-11-05) ### Features Added + Updating the api-version to "2025-05-01-preview" ### Other Changes diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/api/Azure.ResourceManager.NewRelicObservability.net8.0.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/api/Azure.ResourceManager.NewRelicObservability.net8.0.cs index f10f9be924fd..c2b5b20273af 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/api/Azure.ResourceManager.NewRelicObservability.net8.0.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/api/Azure.ResourceManager.NewRelicObservability.net8.0.cs @@ -96,8 +96,8 @@ protected NewRelicMonitorResource() { } public virtual System.Threading.Tasks.Task RefreshIngestionKeyAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Resubscribe(Azure.WaitUntil waitUntil, Azure.ResourceManager.NewRelicObservability.Models.ResubscribeProperties body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ResubscribeAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NewRelicObservability.Models.ResubscribeProperties body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Resubscribe(Azure.WaitUntil waitUntil, Azure.ResourceManager.NewRelicObservability.Models.NewRelicResubscribeProperties body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ResubscribeAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NewRelicObservability.Models.NewRelicResubscribeProperties body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response SwitchBilling(Azure.ResourceManager.NewRelicObservability.Models.NewRelicSwitchBillingContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -146,7 +146,7 @@ public NewRelicMonitorResourceData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.NewRelicObservability.Models.NewRelicPlanDetails PlanData { get { throw null; } set { } } public Azure.ResourceManager.NewRelicObservability.Models.NewRelicProvisioningState? ProvisioningState { get { throw null; } } public string SaaSAzureSubscriptionStatus { get { throw null; } set { } } - public string SaaSResourceId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier SaaSResourceId { get { throw null; } set { } } public string SubscriptionState { get { throw null; } set { } } public Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityUserInfo UserInfo { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -260,9 +260,9 @@ namespace Azure.ResourceManager.NewRelicObservability.Models { public partial class ActivateSaaSParameterContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public ActivateSaaSParameterContent(string saasGuid, string publisherId) { } + public ActivateSaaSParameterContent(System.Guid saasGuid, string publisherId) { } public string PublisherId { get { throw null; } } - public string SaasGuid { get { throw null; } } + public System.Guid SaasGuid { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NewRelicObservability.Models.ActivateSaaSParameterContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -286,13 +286,13 @@ public static partial class ArmNewRelicObservabilityModelFactory public static Azure.ResourceManager.NewRelicObservability.NewRelicMonitoredSubscriptionData NewRelicMonitoredSubscriptionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.NewRelicObservability.Models.NewRelicMonitoredSubscriptionProperties properties = null) { throw null; } public static Azure.ResourceManager.NewRelicObservability.Models.NewRelicMonitoredSubscriptionProperties NewRelicMonitoredSubscriptionProperties(Azure.ResourceManager.NewRelicObservability.Models.MonitoredSubscriptionPatchOperation? patchOperation = default(Azure.ResourceManager.NewRelicObservability.Models.MonitoredSubscriptionPatchOperation?), System.Collections.Generic.IEnumerable monitoredSubscriptionList = null, Azure.ResourceManager.NewRelicObservability.Models.NewRelicProvisioningState? provisioningState = default(Azure.ResourceManager.NewRelicObservability.Models.NewRelicProvisioningState?)) { throw null; } public static Azure.ResourceManager.NewRelicObservability.Models.NewRelicMonitoringTagRules NewRelicMonitoringTagRules(Azure.ResourceManager.NewRelicObservability.Models.NewRelicProvisioningState? provisioningState = default(Azure.ResourceManager.NewRelicObservability.Models.NewRelicProvisioningState?), Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityLogRules logRules = null, Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityMetricRules metricRules = null) { throw null; } + public static Azure.ResourceManager.NewRelicObservability.NewRelicMonitorResourceData NewRelicMonitorResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.NewRelicObservability.Models.NewRelicProvisioningState? provisioningState = default(Azure.ResourceManager.NewRelicObservability.Models.NewRelicProvisioningState?), Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityMonitoringStatus? monitoringStatus = default(Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityMonitoringStatus?), Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityMarketplaceSubscriptionStatus? marketplaceSubscriptionStatus = default(Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityMarketplaceSubscriptionStatus?), string marketplaceSubscriptionId = null, Azure.ResourceManager.NewRelicObservability.Models.NewRelicAccountProperties newRelicAccountProperties = null, Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityUserInfo userInfo = null, Azure.ResourceManager.NewRelicObservability.Models.NewRelicPlanDetails planData = null, Azure.Core.ResourceIdentifier saaSResourceId = null, Azure.ResourceManager.NewRelicObservability.Models.NewRelicLiftrResourceCategory? liftrResourceCategory = default(Azure.ResourceManager.NewRelicObservability.Models.NewRelicLiftrResourceCategory?), int? liftrResourcePreference = default(int?), Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityOrgCreationSource? orgCreationSource = default(Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityOrgCreationSource?), Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityAccountCreationSource? accountCreationSource = default(Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityAccountCreationSource?), string subscriptionState = null, string saaSAzureSubscriptionStatus = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.NewRelicObservability.NewRelicMonitorResourceData NewRelicMonitorResourceData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.ResourceManager.Models.ManagedServiceIdentity identity, Azure.ResourceManager.NewRelicObservability.Models.NewRelicProvisioningState? provisioningState, Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityMonitoringStatus? monitoringStatus, Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityMarketplaceSubscriptionStatus? marketplaceSubscriptionStatus, string marketplaceSubscriptionId, Azure.ResourceManager.NewRelicObservability.Models.NewRelicAccountProperties newRelicAccountProperties, Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityUserInfo userInfo, Azure.ResourceManager.NewRelicObservability.Models.NewRelicPlanDetails planData, Azure.ResourceManager.NewRelicObservability.Models.NewRelicLiftrResourceCategory? liftrResourceCategory, int? liftrResourcePreference, Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityOrgCreationSource? orgCreationSource, Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityAccountCreationSource? accountCreationSource) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public static Azure.ResourceManager.NewRelicObservability.NewRelicMonitorResourceData NewRelicMonitorResourceData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.ResourceManager.Models.ManagedServiceIdentity identity, Azure.ResourceManager.NewRelicObservability.Models.NewRelicProvisioningState? provisioningState, Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityMonitoringStatus? monitoringStatus, Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityMarketplaceSubscriptionStatus? marketplaceSubscriptionStatus, string marketplaceSubscriptionId, Azure.ResourceManager.NewRelicObservability.Models.NewRelicAccountProperties newRelicAccountProperties, Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityUserInfo userInfo, Azure.ResourceManager.NewRelicObservability.Models.NewRelicPlanDetails planData, Azure.ResourceManager.NewRelicObservability.Models.NewRelicLiftrResourceCategory? liftrResourceCategory, int? liftrResourcePreference, Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityOrgCreationSource? orgCreationSource, Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityAccountCreationSource? accountCreationSource, string subscriptionState, string saaSAzureSubscriptionStatus) { throw null; } - public static Azure.ResourceManager.NewRelicObservability.NewRelicMonitorResourceData NewRelicMonitorResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.NewRelicObservability.Models.NewRelicProvisioningState? provisioningState = default(Azure.ResourceManager.NewRelicObservability.Models.NewRelicProvisioningState?), Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityMonitoringStatus? monitoringStatus = default(Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityMonitoringStatus?), Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityMarketplaceSubscriptionStatus? marketplaceSubscriptionStatus = default(Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityMarketplaceSubscriptionStatus?), string marketplaceSubscriptionId = null, Azure.ResourceManager.NewRelicObservability.Models.NewRelicAccountProperties newRelicAccountProperties = null, Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityUserInfo userInfo = null, Azure.ResourceManager.NewRelicObservability.Models.NewRelicPlanDetails planData = null, string saaSResourceId = null, Azure.ResourceManager.NewRelicObservability.Models.NewRelicLiftrResourceCategory? liftrResourceCategory = default(Azure.ResourceManager.NewRelicObservability.Models.NewRelicLiftrResourceCategory?), int? liftrResourcePreference = default(int?), Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityOrgCreationSource? orgCreationSource = default(Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityOrgCreationSource?), Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityAccountCreationSource? accountCreationSource = default(Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityAccountCreationSource?), string subscriptionState = null, string saaSAzureSubscriptionStatus = null) { throw null; } + public static Azure.ResourceManager.NewRelicObservability.NewRelicMonitorResourceData NewRelicMonitorResourceData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.NewRelicObservability.Models.NewRelicProvisioningState? provisioningState = default(Azure.ResourceManager.NewRelicObservability.Models.NewRelicProvisioningState?), Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityMonitoringStatus? monitoringStatus = default(Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityMonitoringStatus?), Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityMarketplaceSubscriptionStatus? marketplaceSubscriptionStatus = default(Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityMarketplaceSubscriptionStatus?), string marketplaceSubscriptionId = null, Azure.ResourceManager.NewRelicObservability.Models.NewRelicAccountProperties newRelicAccountProperties = null, Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityUserInfo userInfo = null, Azure.ResourceManager.NewRelicObservability.Models.NewRelicPlanDetails planData = null, Azure.ResourceManager.NewRelicObservability.Models.NewRelicLiftrResourceCategory? liftrResourceCategory = default(Azure.ResourceManager.NewRelicObservability.Models.NewRelicLiftrResourceCategory?), int? liftrResourcePreference = default(int?), Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityOrgCreationSource? orgCreationSource = default(Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityOrgCreationSource?), Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityAccountCreationSource? accountCreationSource = default(Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityAccountCreationSource?), string subscriptionState = null, string saaSAzureSubscriptionStatus = null) { throw null; } public static Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityAppServiceInfo NewRelicObservabilityAppServiceInfo(Azure.Core.ResourceIdentifier azureResourceId = null, string agentVersion = null, string agentStatus = null) { throw null; } - public static Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityLatestLinkedSaaSResult NewRelicObservabilityLatestLinkedSaaSResult(string saaSResourceId = null, bool? isHiddenSaaS = default(bool?)) { throw null; } + public static Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityLatestLinkedSaaSResult NewRelicObservabilityLatestLinkedSaaSResult(Azure.Core.ResourceIdentifier saaSResourceId = null, bool? isHiddenSaaS = default(bool?)) { throw null; } public static Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilitySaaSResourceDetailsResult NewRelicObservabilitySaaSResourceDetailsResult(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string saasId = null) { throw null; } public static Azure.ResourceManager.NewRelicObservability.NewRelicObservabilityTagRuleData NewRelicObservabilityTagRuleData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.NewRelicObservability.Models.NewRelicProvisioningState? provisioningState = default(Azure.ResourceManager.NewRelicObservability.Models.NewRelicProvisioningState?), Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityLogRules logRules = null, Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityMetricRules metricRules = null) { throw null; } public static Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityVmExtensionPayload NewRelicObservabilityVmExtensionPayload(string ingestionKey = null) { throw null; } @@ -502,6 +502,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class NewRelicMonitoredSubscriptionInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public NewRelicMonitoredSubscriptionInfo() { } + public NewRelicMonitoredSubscriptionInfo(string subscriptionId) { } public string Error { get { throw null; } set { } } public Azure.ResourceManager.NewRelicObservability.Models.NewRelicMonitoringStatus? Status { get { throw null; } set { } } public string SubscriptionId { get { throw null; } set { } } @@ -567,7 +568,7 @@ public NewRelicMonitorResourcePatch() { } public Azure.ResourceManager.NewRelicObservability.Models.NewRelicAccountProperties NewRelicAccountProperties { get { throw null; } set { } } public Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityOrgCreationSource? OrgCreationSource { get { throw null; } set { } } public Azure.ResourceManager.NewRelicObservability.Models.NewRelicPlanDetails PlanData { get { throw null; } set { } } - public string SaaSResourceId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier SaaSResourceId { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } public Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityUserInfo UserInfo { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -675,7 +676,7 @@ public partial class NewRelicObservabilityLatestLinkedSaaSResult : System.Client { internal NewRelicObservabilityLatestLinkedSaaSResult() { } public bool? IsHiddenSaaS { get { throw null; } } - public string SaaSResourceId { get { throw null; } } + public Azure.Core.ResourceIdentifier SaaSResourceId { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityLatestLinkedSaaSResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -767,7 +768,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class NewRelicObservabilitySaaSContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public NewRelicObservabilitySaaSContent() { } - public string SaaSResourceId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier SaaSResourceId { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilitySaaSContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -1062,6 +1063,23 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class NewRelicResubscribeProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public NewRelicResubscribeProperties() { } + public string OfferId { get { throw null; } set { } } + public string OrganizationId { get { throw null; } set { } } + public string PlanId { get { throw null; } set { } } + public string PublisherId { get { throw null; } set { } } + public string ResourceGroup { get { throw null; } set { } } + public string SubscriptionId { get { throw null; } set { } } + public string TermId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NewRelicObservability.Models.NewRelicResubscribeProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NewRelicObservability.Models.NewRelicResubscribeProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class NewRelicSingleSignOnProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public NewRelicSingleSignOnProperties() { } @@ -1122,21 +1140,4 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class ResubscribeProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public ResubscribeProperties() { } - public string OfferId { get { throw null; } set { } } - public string OrganizationId { get { throw null; } set { } } - public string PlanId { get { throw null; } set { } } - public string PublisherId { get { throw null; } set { } } - public string ResourceGroup { get { throw null; } set { } } - public string SubscriptionId { get { throw null; } set { } } - public string TermId { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.NewRelicObservability.Models.ResubscribeProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.NewRelicObservability.Models.ResubscribeProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/api/Azure.ResourceManager.NewRelicObservability.netstandard2.0.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/api/Azure.ResourceManager.NewRelicObservability.netstandard2.0.cs index f10f9be924fd..c2b5b20273af 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/api/Azure.ResourceManager.NewRelicObservability.netstandard2.0.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/api/Azure.ResourceManager.NewRelicObservability.netstandard2.0.cs @@ -96,8 +96,8 @@ protected NewRelicMonitorResource() { } public virtual System.Threading.Tasks.Task RefreshIngestionKeyAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Resubscribe(Azure.WaitUntil waitUntil, Azure.ResourceManager.NewRelicObservability.Models.ResubscribeProperties body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ResubscribeAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NewRelicObservability.Models.ResubscribeProperties body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Resubscribe(Azure.WaitUntil waitUntil, Azure.ResourceManager.NewRelicObservability.Models.NewRelicResubscribeProperties body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ResubscribeAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NewRelicObservability.Models.NewRelicResubscribeProperties body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response SwitchBilling(Azure.ResourceManager.NewRelicObservability.Models.NewRelicSwitchBillingContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -146,7 +146,7 @@ public NewRelicMonitorResourceData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.NewRelicObservability.Models.NewRelicPlanDetails PlanData { get { throw null; } set { } } public Azure.ResourceManager.NewRelicObservability.Models.NewRelicProvisioningState? ProvisioningState { get { throw null; } } public string SaaSAzureSubscriptionStatus { get { throw null; } set { } } - public string SaaSResourceId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier SaaSResourceId { get { throw null; } set { } } public string SubscriptionState { get { throw null; } set { } } public Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityUserInfo UserInfo { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -260,9 +260,9 @@ namespace Azure.ResourceManager.NewRelicObservability.Models { public partial class ActivateSaaSParameterContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public ActivateSaaSParameterContent(string saasGuid, string publisherId) { } + public ActivateSaaSParameterContent(System.Guid saasGuid, string publisherId) { } public string PublisherId { get { throw null; } } - public string SaasGuid { get { throw null; } } + public System.Guid SaasGuid { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NewRelicObservability.Models.ActivateSaaSParameterContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -286,13 +286,13 @@ public static partial class ArmNewRelicObservabilityModelFactory public static Azure.ResourceManager.NewRelicObservability.NewRelicMonitoredSubscriptionData NewRelicMonitoredSubscriptionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.NewRelicObservability.Models.NewRelicMonitoredSubscriptionProperties properties = null) { throw null; } public static Azure.ResourceManager.NewRelicObservability.Models.NewRelicMonitoredSubscriptionProperties NewRelicMonitoredSubscriptionProperties(Azure.ResourceManager.NewRelicObservability.Models.MonitoredSubscriptionPatchOperation? patchOperation = default(Azure.ResourceManager.NewRelicObservability.Models.MonitoredSubscriptionPatchOperation?), System.Collections.Generic.IEnumerable monitoredSubscriptionList = null, Azure.ResourceManager.NewRelicObservability.Models.NewRelicProvisioningState? provisioningState = default(Azure.ResourceManager.NewRelicObservability.Models.NewRelicProvisioningState?)) { throw null; } public static Azure.ResourceManager.NewRelicObservability.Models.NewRelicMonitoringTagRules NewRelicMonitoringTagRules(Azure.ResourceManager.NewRelicObservability.Models.NewRelicProvisioningState? provisioningState = default(Azure.ResourceManager.NewRelicObservability.Models.NewRelicProvisioningState?), Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityLogRules logRules = null, Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityMetricRules metricRules = null) { throw null; } + public static Azure.ResourceManager.NewRelicObservability.NewRelicMonitorResourceData NewRelicMonitorResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.NewRelicObservability.Models.NewRelicProvisioningState? provisioningState = default(Azure.ResourceManager.NewRelicObservability.Models.NewRelicProvisioningState?), Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityMonitoringStatus? monitoringStatus = default(Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityMonitoringStatus?), Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityMarketplaceSubscriptionStatus? marketplaceSubscriptionStatus = default(Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityMarketplaceSubscriptionStatus?), string marketplaceSubscriptionId = null, Azure.ResourceManager.NewRelicObservability.Models.NewRelicAccountProperties newRelicAccountProperties = null, Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityUserInfo userInfo = null, Azure.ResourceManager.NewRelicObservability.Models.NewRelicPlanDetails planData = null, Azure.Core.ResourceIdentifier saaSResourceId = null, Azure.ResourceManager.NewRelicObservability.Models.NewRelicLiftrResourceCategory? liftrResourceCategory = default(Azure.ResourceManager.NewRelicObservability.Models.NewRelicLiftrResourceCategory?), int? liftrResourcePreference = default(int?), Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityOrgCreationSource? orgCreationSource = default(Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityOrgCreationSource?), Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityAccountCreationSource? accountCreationSource = default(Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityAccountCreationSource?), string subscriptionState = null, string saaSAzureSubscriptionStatus = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.NewRelicObservability.NewRelicMonitorResourceData NewRelicMonitorResourceData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.ResourceManager.Models.ManagedServiceIdentity identity, Azure.ResourceManager.NewRelicObservability.Models.NewRelicProvisioningState? provisioningState, Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityMonitoringStatus? monitoringStatus, Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityMarketplaceSubscriptionStatus? marketplaceSubscriptionStatus, string marketplaceSubscriptionId, Azure.ResourceManager.NewRelicObservability.Models.NewRelicAccountProperties newRelicAccountProperties, Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityUserInfo userInfo, Azure.ResourceManager.NewRelicObservability.Models.NewRelicPlanDetails planData, Azure.ResourceManager.NewRelicObservability.Models.NewRelicLiftrResourceCategory? liftrResourceCategory, int? liftrResourcePreference, Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityOrgCreationSource? orgCreationSource, Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityAccountCreationSource? accountCreationSource) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public static Azure.ResourceManager.NewRelicObservability.NewRelicMonitorResourceData NewRelicMonitorResourceData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.ResourceManager.Models.ManagedServiceIdentity identity, Azure.ResourceManager.NewRelicObservability.Models.NewRelicProvisioningState? provisioningState, Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityMonitoringStatus? monitoringStatus, Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityMarketplaceSubscriptionStatus? marketplaceSubscriptionStatus, string marketplaceSubscriptionId, Azure.ResourceManager.NewRelicObservability.Models.NewRelicAccountProperties newRelicAccountProperties, Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityUserInfo userInfo, Azure.ResourceManager.NewRelicObservability.Models.NewRelicPlanDetails planData, Azure.ResourceManager.NewRelicObservability.Models.NewRelicLiftrResourceCategory? liftrResourceCategory, int? liftrResourcePreference, Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityOrgCreationSource? orgCreationSource, Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityAccountCreationSource? accountCreationSource, string subscriptionState, string saaSAzureSubscriptionStatus) { throw null; } - public static Azure.ResourceManager.NewRelicObservability.NewRelicMonitorResourceData NewRelicMonitorResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.NewRelicObservability.Models.NewRelicProvisioningState? provisioningState = default(Azure.ResourceManager.NewRelicObservability.Models.NewRelicProvisioningState?), Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityMonitoringStatus? monitoringStatus = default(Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityMonitoringStatus?), Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityMarketplaceSubscriptionStatus? marketplaceSubscriptionStatus = default(Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityMarketplaceSubscriptionStatus?), string marketplaceSubscriptionId = null, Azure.ResourceManager.NewRelicObservability.Models.NewRelicAccountProperties newRelicAccountProperties = null, Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityUserInfo userInfo = null, Azure.ResourceManager.NewRelicObservability.Models.NewRelicPlanDetails planData = null, string saaSResourceId = null, Azure.ResourceManager.NewRelicObservability.Models.NewRelicLiftrResourceCategory? liftrResourceCategory = default(Azure.ResourceManager.NewRelicObservability.Models.NewRelicLiftrResourceCategory?), int? liftrResourcePreference = default(int?), Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityOrgCreationSource? orgCreationSource = default(Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityOrgCreationSource?), Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityAccountCreationSource? accountCreationSource = default(Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityAccountCreationSource?), string subscriptionState = null, string saaSAzureSubscriptionStatus = null) { throw null; } + public static Azure.ResourceManager.NewRelicObservability.NewRelicMonitorResourceData NewRelicMonitorResourceData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.NewRelicObservability.Models.NewRelicProvisioningState? provisioningState = default(Azure.ResourceManager.NewRelicObservability.Models.NewRelicProvisioningState?), Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityMonitoringStatus? monitoringStatus = default(Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityMonitoringStatus?), Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityMarketplaceSubscriptionStatus? marketplaceSubscriptionStatus = default(Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityMarketplaceSubscriptionStatus?), string marketplaceSubscriptionId = null, Azure.ResourceManager.NewRelicObservability.Models.NewRelicAccountProperties newRelicAccountProperties = null, Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityUserInfo userInfo = null, Azure.ResourceManager.NewRelicObservability.Models.NewRelicPlanDetails planData = null, Azure.ResourceManager.NewRelicObservability.Models.NewRelicLiftrResourceCategory? liftrResourceCategory = default(Azure.ResourceManager.NewRelicObservability.Models.NewRelicLiftrResourceCategory?), int? liftrResourcePreference = default(int?), Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityOrgCreationSource? orgCreationSource = default(Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityOrgCreationSource?), Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityAccountCreationSource? accountCreationSource = default(Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityAccountCreationSource?), string subscriptionState = null, string saaSAzureSubscriptionStatus = null) { throw null; } public static Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityAppServiceInfo NewRelicObservabilityAppServiceInfo(Azure.Core.ResourceIdentifier azureResourceId = null, string agentVersion = null, string agentStatus = null) { throw null; } - public static Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityLatestLinkedSaaSResult NewRelicObservabilityLatestLinkedSaaSResult(string saaSResourceId = null, bool? isHiddenSaaS = default(bool?)) { throw null; } + public static Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityLatestLinkedSaaSResult NewRelicObservabilityLatestLinkedSaaSResult(Azure.Core.ResourceIdentifier saaSResourceId = null, bool? isHiddenSaaS = default(bool?)) { throw null; } public static Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilitySaaSResourceDetailsResult NewRelicObservabilitySaaSResourceDetailsResult(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string saasId = null) { throw null; } public static Azure.ResourceManager.NewRelicObservability.NewRelicObservabilityTagRuleData NewRelicObservabilityTagRuleData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.NewRelicObservability.Models.NewRelicProvisioningState? provisioningState = default(Azure.ResourceManager.NewRelicObservability.Models.NewRelicProvisioningState?), Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityLogRules logRules = null, Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityMetricRules metricRules = null) { throw null; } public static Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityVmExtensionPayload NewRelicObservabilityVmExtensionPayload(string ingestionKey = null) { throw null; } @@ -502,6 +502,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class NewRelicMonitoredSubscriptionInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public NewRelicMonitoredSubscriptionInfo() { } + public NewRelicMonitoredSubscriptionInfo(string subscriptionId) { } public string Error { get { throw null; } set { } } public Azure.ResourceManager.NewRelicObservability.Models.NewRelicMonitoringStatus? Status { get { throw null; } set { } } public string SubscriptionId { get { throw null; } set { } } @@ -567,7 +568,7 @@ public NewRelicMonitorResourcePatch() { } public Azure.ResourceManager.NewRelicObservability.Models.NewRelicAccountProperties NewRelicAccountProperties { get { throw null; } set { } } public Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityOrgCreationSource? OrgCreationSource { get { throw null; } set { } } public Azure.ResourceManager.NewRelicObservability.Models.NewRelicPlanDetails PlanData { get { throw null; } set { } } - public string SaaSResourceId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier SaaSResourceId { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } public Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityUserInfo UserInfo { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -675,7 +676,7 @@ public partial class NewRelicObservabilityLatestLinkedSaaSResult : System.Client { internal NewRelicObservabilityLatestLinkedSaaSResult() { } public bool? IsHiddenSaaS { get { throw null; } } - public string SaaSResourceId { get { throw null; } } + public Azure.Core.ResourceIdentifier SaaSResourceId { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityLatestLinkedSaaSResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -767,7 +768,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class NewRelicObservabilitySaaSContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public NewRelicObservabilitySaaSContent() { } - public string SaaSResourceId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier SaaSResourceId { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilitySaaSContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -1062,6 +1063,23 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class NewRelicResubscribeProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public NewRelicResubscribeProperties() { } + public string OfferId { get { throw null; } set { } } + public string OrganizationId { get { throw null; } set { } } + public string PlanId { get { throw null; } set { } } + public string PublisherId { get { throw null; } set { } } + public string ResourceGroup { get { throw null; } set { } } + public string SubscriptionId { get { throw null; } set { } } + public string TermId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NewRelicObservability.Models.NewRelicResubscribeProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NewRelicObservability.Models.NewRelicResubscribeProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class NewRelicSingleSignOnProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public NewRelicSingleSignOnProperties() { } @@ -1122,21 +1140,4 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class ResubscribeProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public ResubscribeProperties() { } - public string OfferId { get { throw null; } set { } } - public string OrganizationId { get { throw null; } set { } } - public string PlanId { get { throw null; } set { } } - public string PublisherId { get { throw null; } set { } } - public string ResourceGroup { get { throw null; } set { } } - public string SubscriptionId { get { throw null; } set { } } - public string TermId { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.NewRelicObservability.Models.ResubscribeProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.NewRelicObservability.Models.ResubscribeProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Custom/ArmNewRelicObservabilityModelFactory.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Custom/ArmNewRelicObservabilityModelFactory.cs new file mode 100644 index 000000000000..7d1ed86c20e2 --- /dev/null +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Custom/ArmNewRelicObservabilityModelFactory.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System.Collections.Generic; +using System.ComponentModel; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.NewRelicObservability.Models +{ + /// Model factory for models. + public static partial class ArmNewRelicObservabilityModelFactory + { + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The managed service identities assigned to this resource. + /// Provisioning State of the resource. + /// MonitoringStatus of the resource. + /// NewRelic Organization properties of the resource. + /// Marketplace Subscription Id. + /// MarketplaceSubscriptionStatus of the resource. + /// User Info. + /// Plan details. + /// Liftr resource category. + /// Liftr resource preference. The priority of the resource. + /// Source of org creation. + /// Source of account creation. + /// State of the Azure Subscription containing the monitor resource. + /// Status of Azure Subscription where Marketplace SaaS is located. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static NewRelicMonitorResourceData NewRelicMonitorResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity = null, NewRelicProvisioningState? provisioningState = null, NewRelicObservabilityMonitoringStatus? monitoringStatus = null, NewRelicObservabilityMarketplaceSubscriptionStatus? marketplaceSubscriptionStatus = null, string marketplaceSubscriptionId = null, NewRelicAccountProperties newRelicAccountProperties = null, NewRelicObservabilityUserInfo userInfo = null, NewRelicPlanDetails planData = null, NewRelicLiftrResourceCategory? liftrResourceCategory = null, int? liftrResourcePreference = null, NewRelicObservabilityOrgCreationSource? orgCreationSource = null, NewRelicObservabilityAccountCreationSource? accountCreationSource = null, string subscriptionState = null, string saaSAzureSubscriptionStatus = null) + { + return NewRelicMonitorResourceData(id, name, resourceType, systemData, tags, location, identity, provisioningState, monitoringStatus, marketplaceSubscriptionStatus, marketplaceSubscriptionId, newRelicAccountProperties, userInfo, planData, saaSResourceId: default, liftrResourceCategory, liftrResourcePreference, orgCreationSource, accountCreationSource); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The managed service identities assigned to this resource. + /// Provisioning State of the resource. + /// MonitoringStatus of the resource. + /// NewRelic Organization properties of the resource. + /// Marketplace Subscription Id. + /// MarketplaceSubscriptionStatus of the resource. + /// User Info. + /// Plan details. + /// Liftr resource category. + /// Liftr resource preference. The priority of the resource. + /// Source of org creation. + /// Source of account creation. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static NewRelicMonitorResourceData NewRelicMonitorResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, NewRelicProvisioningState? provisioningState, NewRelicObservabilityMonitoringStatus? monitoringStatus, NewRelicObservabilityMarketplaceSubscriptionStatus? marketplaceSubscriptionStatus, string marketplaceSubscriptionId, NewRelicAccountProperties newRelicAccountProperties, NewRelicObservabilityUserInfo userInfo, NewRelicPlanDetails planData, NewRelicLiftrResourceCategory? liftrResourceCategory, int? liftrResourcePreference, NewRelicObservabilityOrgCreationSource? orgCreationSource, NewRelicObservabilityAccountCreationSource? accountCreationSource) + { + return NewRelicMonitorResourceData(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, location: location, identity: identity, provisioningState: provisioningState, monitoringStatus: monitoringStatus, marketplaceSubscriptionStatus: marketplaceSubscriptionStatus, marketplaceSubscriptionId: marketplaceSubscriptionId, newRelicAccountProperties: newRelicAccountProperties, userInfo: userInfo, planData: planData, liftrResourceCategory: liftrResourceCategory, liftrResourcePreference: liftrResourcePreference, orgCreationSource: orgCreationSource, accountCreationSource: accountCreationSource, subscriptionState: default, saaSAzureSubscriptionStatus: default); + } + + /// Initializes a new instance of . + /// Marketplace Subscription Id. This is a GUID-formatted string. + /// Marketplace Subscription Details: SAAS Name. + /// Marketplace Subscription Details: Resource URI. + /// Marketplace Subscription Details: SaaS Subscription Status. + /// The Azure Subscription ID to which the Marketplace Subscription belongs and gets billed into. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static MarketplaceSaaSInfo MarketplaceSaaSInfo(string marketplaceSubscriptionId, string marketplaceSubscriptionName, string marketplaceResourceId, string marketplaceStatus, string billedAzureSubscriptionId) + { + return MarketplaceSaaSInfo(marketplaceSubscriptionId, marketplaceSubscriptionName, marketplaceResourceId, marketplaceStatus, billedAzureSubscriptionId, publisherId: default, offerId: default); + } + } +} diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Custom/Models/NewRelicMonitoredSubscriptionInfo.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Custom/Models/NewRelicMonitoredSubscriptionInfo.cs new file mode 100644 index 000000000000..2b7fed33478e --- /dev/null +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Custom/Models/NewRelicMonitoredSubscriptionInfo.cs @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +namespace Azure.ResourceManager.NewRelicObservability.Models +{ + // Add missing public parameterless constructor + public partial class NewRelicMonitoredSubscriptionInfo + { + /// Initializes a new instance of . + public NewRelicMonitoredSubscriptionInfo() + { + } + } +} diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/ArmNewRelicObservabilityModelFactory.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/ArmNewRelicObservabilityModelFactory.cs index 5071bc7b0c84..df1442ca7f50 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/ArmNewRelicObservabilityModelFactory.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/ArmNewRelicObservabilityModelFactory.cs @@ -41,6 +41,24 @@ public static NewRelicAccountResourceData NewRelicAccountResourceData(ResourceId serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Id of the Marketplace SaaS Resource. + /// A new instance for mocking. + public static NewRelicObservabilitySaaSResourceDetailsResult NewRelicObservabilitySaaSResourceDetailsResult(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string saasId = null) + { + return new NewRelicObservabilitySaaSResourceDetailsResult( + id, + name, + resourceType, + systemData, + saasId, + serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The id. /// The name. @@ -64,7 +82,7 @@ public static NewRelicAccountResourceData NewRelicAccountResourceData(ResourceId /// State of the Azure Subscription containing the monitor resource. /// Status of Azure Subscription where Marketplace SaaS is located. /// A new instance for mocking. - public static NewRelicMonitorResourceData NewRelicMonitorResourceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, NewRelicProvisioningState? provisioningState = null, NewRelicObservabilityMonitoringStatus? monitoringStatus = null, NewRelicObservabilityMarketplaceSubscriptionStatus? marketplaceSubscriptionStatus = null, string marketplaceSubscriptionId = null, NewRelicAccountProperties newRelicAccountProperties = null, NewRelicObservabilityUserInfo userInfo = null, NewRelicPlanDetails planData = null, string saaSResourceId = null, NewRelicLiftrResourceCategory? liftrResourceCategory = null, int? liftrResourcePreference = null, NewRelicObservabilityOrgCreationSource? orgCreationSource = null, NewRelicObservabilityAccountCreationSource? accountCreationSource = null, string subscriptionState = null, string saaSAzureSubscriptionStatus = null) + public static NewRelicMonitorResourceData NewRelicMonitorResourceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, NewRelicProvisioningState? provisioningState = null, NewRelicObservabilityMonitoringStatus? monitoringStatus = null, NewRelicObservabilityMarketplaceSubscriptionStatus? marketplaceSubscriptionStatus = null, string marketplaceSubscriptionId = null, NewRelicAccountProperties newRelicAccountProperties = null, NewRelicObservabilityUserInfo userInfo = null, NewRelicPlanDetails planData = null, ResourceIdentifier saaSResourceId = null, NewRelicLiftrResourceCategory? liftrResourceCategory = null, int? liftrResourcePreference = null, NewRelicObservabilityOrgCreationSource? orgCreationSource = null, NewRelicObservabilityAccountCreationSource? accountCreationSource = null, string subscriptionState = null, string saaSAzureSubscriptionStatus = null) { tags ??= new Dictionary(); @@ -137,27 +155,49 @@ public static NewRelicPlanData NewRelicPlanData(ResourceIdentifier id = null, st serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Id of the Marketplace SaaS Resource. - /// A new instance for mocking. - public static NewRelicObservabilitySaaSResourceDetailsResult NewRelicObservabilitySaaSResourceDetailsResult(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string saasId = null) + /// Initializes a new instance of . + /// Marketplace Subscription details. + /// Partner Billing Entity details: Organization Info. + /// A new instance for mocking. + public static NewRelicBillingInfoResult NewRelicBillingInfoResult(MarketplaceSaaSInfo marketplaceSaasInfo = null, PartnerBillingEntity partnerBillingEntity = null) { - return new NewRelicObservabilitySaaSResourceDetailsResult( - id, - name, - resourceType, - systemData, - saasId, + return new NewRelicBillingInfoResult(marketplaceSaasInfo, partnerBillingEntity, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Marketplace Subscription Id. This is a GUID-formatted string. + /// Marketplace Subscription Details: SAAS Name. + /// Marketplace Subscription Details: Resource URI. + /// Marketplace Subscription Details: SaaS Subscription Status. + /// The Azure Subscription ID to which the Marketplace Subscription belongs and gets billed into. + /// Publisher Id of the Marketplace offer. + /// Offer Id of the Marketplace offer,. + /// A new instance for mocking. + public static MarketplaceSaaSInfo MarketplaceSaaSInfo(string marketplaceSubscriptionId = null, string marketplaceSubscriptionName = null, string marketplaceResourceId = null, string marketplaceStatus = null, string billedAzureSubscriptionId = null, string publisherId = null, string offerId = null) + { + return new MarketplaceSaaSInfo( + marketplaceSubscriptionId, + marketplaceSubscriptionName, + marketplaceResourceId, + marketplaceStatus, + billedAzureSubscriptionId, + publisherId, + offerId, serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// The New Relic Organization Id. + /// The New Relic Organization Name. + /// A new instance for mocking. + public static PartnerBillingEntity PartnerBillingEntity(string organizationId = null, string organizationName = null) + { + return new PartnerBillingEntity(organizationId, organizationName, serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// Azure resource IDs. - /// User Email. + /// Reusable representation of an email address. /// A new instance for mocking. public static NewRelicMetricsStatusContent NewRelicMetricsStatusContent(IEnumerable azureResourceIds = null, string userEmail = null) { @@ -176,9 +216,18 @@ public static NewRelicMetricsStatusResult NewRelicMetricsStatusResult(IEnumerabl return new NewRelicMetricsStatusResult(azureResourceIds?.ToList(), serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// SaaS resource id. + /// Flag indicating if the SaaS resource is hidden. + /// A new instance for mocking. + public static NewRelicObservabilityLatestLinkedSaaSResult NewRelicObservabilityLatestLinkedSaaSResult(ResourceIdentifier saaSResourceId = null, bool? isHiddenSaaS = null) + { + return new NewRelicObservabilityLatestLinkedSaaSResult(saaSResourceId, isHiddenSaaS, serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// Azure resource IDs. - /// User Email. + /// Reusable representation of an email address. /// A new instance for mocking. public static NewRelicAppServicesGetContent NewRelicAppServicesGetContent(IEnumerable azureResourceIds = null, string userEmail = null) { @@ -197,20 +246,28 @@ public static NewRelicObservabilityAppServiceInfo NewRelicObservabilityAppServic return new NewRelicObservabilityAppServiceInfo(azureResourceId, agentVersion, agentStatus, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// Azure resource Id. - /// Organization id. - /// Plan details. - /// User Email. - /// A new instance for mocking. - public static NewRelicSwitchBillingContent NewRelicSwitchBillingContent(ResourceIdentifier azureResourceId = null, string organizationId = null, NewRelicPlanDetails planData = null, string userEmail = null) + /// Initializes a new instance of . + /// Connected Partner Resource Properties. + /// A new instance for mocking. + public static NewRelicConnectedPartnerResourceInfo NewRelicConnectedPartnerResourceInfo(NewRelicConnectedPartnerResourceProperties properties = null) { - return new NewRelicSwitchBillingContent(azureResourceId, organizationId, planData, userEmail, serializedAdditionalRawData: null); + return new NewRelicConnectedPartnerResourceInfo(properties, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// NewRelic account name. + /// NewRelic Account Id. + /// The azure resource Id of the deployment. + /// The location of the deployment. + /// A new instance for mocking. + public static NewRelicConnectedPartnerResourceProperties NewRelicConnectedPartnerResourceProperties(string accountName = null, string accountId = null, string azureResourceId = null, AzureLocation? location = null) + { + return new NewRelicConnectedPartnerResourceProperties(accountName, accountId, azureResourceId, location, serializedAdditionalRawData: null); } /// Initializes a new instance of . /// VM resource IDs. - /// User Email. + /// Reusable representation of an email address. /// A new instance for mocking. public static NewRelicHostsGetContent NewRelicHostsGetContent(IEnumerable vmIds = null, string userEmail = null) { @@ -247,97 +304,6 @@ public static NewRelicResourceMonitorResult NewRelicResourceMonitorResult(Resour serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// Marketplace Subscription details. - /// Partner Billing Entity details: Organization Info. - /// A new instance for mocking. - public static NewRelicBillingInfoResult NewRelicBillingInfoResult(MarketplaceSaaSInfo marketplaceSaasInfo = null, PartnerBillingEntity partnerBillingEntity = null) - { - return new NewRelicBillingInfoResult(marketplaceSaasInfo, partnerBillingEntity, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Marketplace Subscription Id. This is a GUID-formatted string. - /// Marketplace Subscription Details: SAAS Name. - /// Marketplace Subscription Details: Resource URI. - /// Marketplace Subscription Details: SaaS Subscription Status. - /// The Azure Subscription ID to which the Marketplace Subscription belongs and gets billed into. - /// Publisher Id of the Marketplace offer. - /// Offer Id of the Marketplace offer,. - /// A new instance for mocking. - public static MarketplaceSaaSInfo MarketplaceSaaSInfo(string marketplaceSubscriptionId = null, string marketplaceSubscriptionName = null, string marketplaceResourceId = null, string marketplaceStatus = null, string billedAzureSubscriptionId = null, string publisherId = null, string offerId = null) - { - return new MarketplaceSaaSInfo( - marketplaceSubscriptionId, - marketplaceSubscriptionName, - marketplaceResourceId, - marketplaceStatus, - billedAzureSubscriptionId, - publisherId, - offerId, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The New Relic Organization Id. - /// The New Relic Organization Name. - /// A new instance for mocking. - public static PartnerBillingEntity PartnerBillingEntity(string organizationId = null, string organizationName = null) - { - return new PartnerBillingEntity(organizationId, organizationName, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Connected Partner Resource Properties. - /// A new instance for mocking. - public static NewRelicConnectedPartnerResourceInfo NewRelicConnectedPartnerResourceInfo(NewRelicConnectedPartnerResourceProperties properties = null) - { - return new NewRelicConnectedPartnerResourceInfo(properties, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// NewRelic account name. - /// NewRelic Account Id. - /// The azure resource Id of the deployment. - /// The location of the deployment. - /// A new instance for mocking. - public static NewRelicConnectedPartnerResourceProperties NewRelicConnectedPartnerResourceProperties(string accountName = null, string accountId = null, string azureResourceId = null, AzureLocation? location = null) - { - return new NewRelicConnectedPartnerResourceProperties(accountName, accountId, azureResourceId, location, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Provisioning State of the resource. - /// Set of rules for sending logs for the Monitor resource. - /// Set of rules for sending metrics for the Monitor resource. - /// A new instance for mocking. - public static NewRelicObservabilityTagRuleData NewRelicObservabilityTagRuleData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, NewRelicProvisioningState? provisioningState = null, NewRelicObservabilityLogRules logRules = null, NewRelicObservabilityMetricRules metricRules = null) - { - return new NewRelicObservabilityTagRuleData( - id, - name, - resourceType, - systemData, - provisioningState, - logRules, - metricRules, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Provisioning State of the resource. - /// Set of rules for sending logs for the Monitor resource. - /// Set of rules for sending metrics for the Monitor resource. - /// A new instance for mocking. - public static NewRelicMonitoringTagRules NewRelicMonitoringTagRules(NewRelicProvisioningState? provisioningState = null, NewRelicObservabilityLogRules logRules = null, NewRelicObservabilityMetricRules metricRules = null) - { - return new NewRelicMonitoringTagRules(provisioningState, logRules, metricRules, serializedAdditionalRawData: null); - } - /// Initializes a new instance of . /// The id. /// The name. @@ -368,88 +334,55 @@ public static NewRelicMonitoredSubscriptionProperties NewRelicMonitoredSubscript return new NewRelicMonitoredSubscriptionProperties(patchOperation, monitoredSubscriptionList?.ToList(), provisioningState, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// Ingestion key of the account. - /// A new instance for mocking. - public static NewRelicObservabilityVmExtensionPayload NewRelicObservabilityVmExtensionPayload(string ingestionKey = null) + /// Initializes a new instance of . + /// Provisioning State of the resource. + /// Set of rules for sending logs for the Monitor resource. + /// Set of rules for sending metrics for the Monitor resource. + /// A new instance for mocking. + public static NewRelicMonitoringTagRules NewRelicMonitoringTagRules(NewRelicProvisioningState? provisioningState = null, NewRelicObservabilityLogRules logRules = null, NewRelicObservabilityMetricRules metricRules = null) { - return new NewRelicObservabilityVmExtensionPayload(ingestionKey, serializedAdditionalRawData: null); + return new NewRelicMonitoringTagRules(provisioningState, logRules, metricRules, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// SaaS resource id. - /// Flag indicating if the SaaS resource is hidden. - /// A new instance for mocking. - public static NewRelicObservabilityLatestLinkedSaaSResult NewRelicObservabilityLatestLinkedSaaSResult(string saaSResourceId = null, bool? isHiddenSaaS = null) + /// Initializes a new instance of . + /// Azure resource Id. + /// Organization id. + /// Plan details. + /// Reusable representation of an email address. + /// A new instance for mocking. + public static NewRelicSwitchBillingContent NewRelicSwitchBillingContent(ResourceIdentifier azureResourceId = null, string organizationId = null, NewRelicPlanDetails planData = null, string userEmail = null) { - return new NewRelicObservabilityLatestLinkedSaaSResult(saaSResourceId, isHiddenSaaS, serializedAdditionalRawData: null); + return new NewRelicSwitchBillingContent(azureResourceId, organizationId, planData, userEmail, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// The tags. - /// The location. - /// The managed service identities assigned to this resource. /// Provisioning State of the resource. - /// MonitoringStatus of the resource. - /// NewRelic Organization properties of the resource. - /// Marketplace Subscription Id. - /// MarketplaceSubscriptionStatus of the resource. - /// User Info. - /// Plan details. - /// Liftr resource category. - /// Liftr resource preference. The priority of the resource. - /// Source of org creation. - /// Source of account creation. - /// State of the Azure Subscription containing the monitor resource. - /// Status of Azure Subscription where Marketplace SaaS is located. - /// A new instance for mocking. - [EditorBrowsable(EditorBrowsableState.Never)] - public static NewRelicMonitorResourceData NewRelicMonitorResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, NewRelicProvisioningState? provisioningState, NewRelicObservabilityMonitoringStatus? monitoringStatus, NewRelicObservabilityMarketplaceSubscriptionStatus? marketplaceSubscriptionStatus, string marketplaceSubscriptionId, NewRelicAccountProperties newRelicAccountProperties, NewRelicObservabilityUserInfo userInfo, NewRelicPlanDetails planData, NewRelicLiftrResourceCategory? liftrResourceCategory, int? liftrResourcePreference, NewRelicObservabilityOrgCreationSource? orgCreationSource, NewRelicObservabilityAccountCreationSource? accountCreationSource, string subscriptionState, string saaSAzureSubscriptionStatus) - { - return NewRelicMonitorResourceData(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, location: location, identity: identity, provisioningState: provisioningState, monitoringStatus: monitoringStatus, marketplaceSubscriptionStatus: marketplaceSubscriptionStatus, marketplaceSubscriptionId: marketplaceSubscriptionId, newRelicAccountProperties: newRelicAccountProperties, userInfo: userInfo, planData: planData, saaSResourceId: default, liftrResourceCategory: liftrResourceCategory, liftrResourcePreference: liftrResourcePreference, orgCreationSource: orgCreationSource, accountCreationSource: accountCreationSource, subscriptionState: subscriptionState, saaSAzureSubscriptionStatus: saaSAzureSubscriptionStatus); - } - - /// Initializes a new instance of . - /// Marketplace Subscription Id. This is a GUID-formatted string. - /// Marketplace Subscription Details: SAAS Name. - /// Marketplace Subscription Details: Resource URI. - /// Marketplace Subscription Details: SaaS Subscription Status. - /// The Azure Subscription ID to which the Marketplace Subscription belongs and gets billed into. - /// A new instance for mocking. - [EditorBrowsable(EditorBrowsableState.Never)] - public static MarketplaceSaaSInfo MarketplaceSaaSInfo(string marketplaceSubscriptionId, string marketplaceSubscriptionName, string marketplaceResourceId, string marketplaceStatus, string billedAzureSubscriptionId) + /// Set of rules for sending logs for the Monitor resource. + /// Set of rules for sending metrics for the Monitor resource. + /// A new instance for mocking. + public static NewRelicObservabilityTagRuleData NewRelicObservabilityTagRuleData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, NewRelicProvisioningState? provisioningState = null, NewRelicObservabilityLogRules logRules = null, NewRelicObservabilityMetricRules metricRules = null) { - return MarketplaceSaaSInfo(marketplaceSubscriptionId: marketplaceSubscriptionId, marketplaceSubscriptionName: marketplaceSubscriptionName, marketplaceResourceId: marketplaceResourceId, marketplaceStatus: marketplaceStatus, billedAzureSubscriptionId: billedAzureSubscriptionId, publisherId: default, offerId: default); + return new NewRelicObservabilityTagRuleData( + id, + name, + resourceType, + systemData, + provisioningState, + logRules, + metricRules, + serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The tags. - /// The location. - /// The managed service identities assigned to this resource. - /// Provisioning State of the resource. - /// MonitoringStatus of the resource. - /// NewRelic Organization properties of the resource. - /// Marketplace Subscription Id. - /// MarketplaceSubscriptionStatus of the resource. - /// User Info. - /// Plan details. - /// Liftr resource category. - /// Liftr resource preference. The priority of the resource. - /// Source of org creation. - /// Source of account creation. - /// A new instance for mocking. - [EditorBrowsable(EditorBrowsableState.Never)] - public static NewRelicMonitorResourceData NewRelicMonitorResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, NewRelicProvisioningState? provisioningState, NewRelicObservabilityMonitoringStatus? monitoringStatus, NewRelicObservabilityMarketplaceSubscriptionStatus? marketplaceSubscriptionStatus, string marketplaceSubscriptionId, NewRelicAccountProperties newRelicAccountProperties, NewRelicObservabilityUserInfo userInfo, NewRelicPlanDetails planData, NewRelicLiftrResourceCategory? liftrResourceCategory, int? liftrResourcePreference, NewRelicObservabilityOrgCreationSource? orgCreationSource, NewRelicObservabilityAccountCreationSource? accountCreationSource) + /// Initializes a new instance of . + /// Ingestion key of the account. + /// A new instance for mocking. + public static NewRelicObservabilityVmExtensionPayload NewRelicObservabilityVmExtensionPayload(string ingestionKey = null) { - return NewRelicMonitorResourceData(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, location: location, identity: identity, provisioningState: provisioningState, monitoringStatus: monitoringStatus, marketplaceSubscriptionStatus: marketplaceSubscriptionStatus, marketplaceSubscriptionId: marketplaceSubscriptionId, newRelicAccountProperties: newRelicAccountProperties, userInfo: userInfo, planData: planData, saaSResourceId: default, liftrResourceCategory: liftrResourceCategory, liftrResourcePreference: liftrResourcePreference, orgCreationSource: orgCreationSource, accountCreationSource: accountCreationSource, subscriptionState: default, saaSAzureSubscriptionStatus: default); + return new NewRelicObservabilityVmExtensionPayload(ingestionKey, serializedAdditionalRawData: null); } } } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Extensions/MockableNewRelicObservabilityArmClient.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Extensions/MockableNewRelicObservabilityArmClient.cs index 3c1301315391..9da1c3fc1602 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Extensions/MockableNewRelicObservabilityArmClient.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Extensions/MockableNewRelicObservabilityArmClient.cs @@ -46,18 +46,6 @@ public virtual NewRelicMonitorResource GetNewRelicMonitorResource(ResourceIdenti return new NewRelicMonitorResource(Client, id); } - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// The resource ID of the resource to get. - /// Returns a object. - public virtual NewRelicObservabilityTagRuleResource GetNewRelicObservabilityTagRuleResource(ResourceIdentifier id) - { - NewRelicObservabilityTagRuleResource.ValidateResourceId(id); - return new NewRelicObservabilityTagRuleResource(Client, id); - } - /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -69,5 +57,17 @@ public virtual NewRelicMonitoredSubscriptionResource GetNewRelicMonitoredSubscri NewRelicMonitoredSubscriptionResource.ValidateResourceId(id); return new NewRelicMonitoredSubscriptionResource(Client, id); } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual NewRelicObservabilityTagRuleResource GetNewRelicObservabilityTagRuleResource(ResourceIdentifier id) + { + NewRelicObservabilityTagRuleResource.ValidateResourceId(id); + return new NewRelicObservabilityTagRuleResource(Client, id); + } } } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Extensions/MockableNewRelicObservabilitySubscriptionResource.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Extensions/MockableNewRelicObservabilitySubscriptionResource.cs index 08684f0dbfa1..99e39ca8ac23 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Extensions/MockableNewRelicObservabilitySubscriptionResource.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Extensions/MockableNewRelicObservabilitySubscriptionResource.cs @@ -20,14 +20,14 @@ public partial class MockableNewRelicObservabilitySubscriptionResource : ArmReso { private ClientDiagnostics _accountsClientDiagnostics; private AccountsRestOperations _accountsRestClient; + private ClientDiagnostics _saaSClientDiagnostics; + private SaaSRestOperations _saaSRestClient; private ClientDiagnostics _newRelicMonitorResourceMonitorsClientDiagnostics; private MonitorsRestOperations _newRelicMonitorResourceMonitorsRestClient; private ClientDiagnostics _organizationsClientDiagnostics; private OrganizationsRestOperations _organizationsRestClient; private ClientDiagnostics _plansClientDiagnostics; private PlansRestOperations _plansRestClient; - private ClientDiagnostics _saaSClientDiagnostics; - private SaaSRestOperations _saaSRestClient; /// Initializes a new instance of the class for mocking. protected MockableNewRelicObservabilitySubscriptionResource() @@ -43,14 +43,14 @@ internal MockableNewRelicObservabilitySubscriptionResource(ArmClient client, Res private ClientDiagnostics AccountsClientDiagnostics => _accountsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.NewRelicObservability", ProviderConstants.DefaultProviderNamespace, Diagnostics); private AccountsRestOperations AccountsRestClient => _accountsRestClient ??= new AccountsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); + private ClientDiagnostics SaaSClientDiagnostics => _saaSClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.NewRelicObservability", ProviderConstants.DefaultProviderNamespace, Diagnostics); + private SaaSRestOperations SaaSRestClient => _saaSRestClient ??= new SaaSRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); private ClientDiagnostics NewRelicMonitorResourceMonitorsClientDiagnostics => _newRelicMonitorResourceMonitorsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.NewRelicObservability", NewRelicMonitorResource.ResourceType.Namespace, Diagnostics); private MonitorsRestOperations NewRelicMonitorResourceMonitorsRestClient => _newRelicMonitorResourceMonitorsRestClient ??= new MonitorsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(NewRelicMonitorResource.ResourceType)); private ClientDiagnostics OrganizationsClientDiagnostics => _organizationsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.NewRelicObservability", ProviderConstants.DefaultProviderNamespace, Diagnostics); private OrganizationsRestOperations OrganizationsRestClient => _organizationsRestClient ??= new OrganizationsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); private ClientDiagnostics PlansClientDiagnostics => _plansClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.NewRelicObservability", ProviderConstants.DefaultProviderNamespace, Diagnostics); private PlansRestOperations PlansRestClient => _plansRestClient ??= new PlansRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); - private ClientDiagnostics SaaSClientDiagnostics => _saaSClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.NewRelicObservability", ProviderConstants.DefaultProviderNamespace, Diagnostics); - private SaaSRestOperations SaaSRestClient => _saaSRestClient ??= new SaaSRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); private string GetApiVersionOrNull(ResourceType resourceType) { @@ -120,6 +120,82 @@ public virtual Pageable GetNewRelicAccounts(string return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => NewRelicAccountResourceData.DeserializeNewRelicAccountResourceData(e), AccountsClientDiagnostics, Pipeline, "MockableNewRelicObservabilitySubscriptionResource.GetNewRelicAccounts", "value", "nextLink", cancellationToken); } + /// + /// Resolve the token to get the SaaS resource ID and activate the SaaS resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/NewRelic.Observability/activateSaaS + /// + /// + /// Operation Id + /// SaaS_ActivateResource + /// + /// + /// Default Api Version + /// 2025-05-01-preview + /// + /// + /// + /// The request body. + /// The cancellation token to use. + /// is null. + public virtual async Task> ActivateResourceSaaSAsync(ActivateSaaSParameterContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = SaaSClientDiagnostics.CreateScope("MockableNewRelicObservabilitySubscriptionResource.ActivateResourceSaaS"); + scope.Start(); + try + { + var response = await SaaSRestClient.ActivateResourceAsync(Id.SubscriptionId, content, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Resolve the token to get the SaaS resource ID and activate the SaaS resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/NewRelic.Observability/activateSaaS + /// + /// + /// Operation Id + /// SaaS_ActivateResource + /// + /// + /// Default Api Version + /// 2025-05-01-preview + /// + /// + /// + /// The request body. + /// The cancellation token to use. + /// is null. + public virtual Response ActivateResourceSaaS(ActivateSaaSParameterContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = SaaSClientDiagnostics.CreateScope("MockableNewRelicObservabilitySubscriptionResource.ActivateResourceSaaS"); + scope.Start(); + try + { + var response = SaaSRestClient.ActivateResource(Id.SubscriptionId, content, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + /// /// Lists all New Relic monitor resources either within a specific subscription /// @@ -297,81 +373,5 @@ public virtual Pageable GetNewRelicPlans(string accountId = nu HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => PlansRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, accountId, organizationId); return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => NewRelicPlanData.DeserializeNewRelicPlanData(e), PlansClientDiagnostics, Pipeline, "MockableNewRelicObservabilitySubscriptionResource.GetNewRelicPlans", "value", "nextLink", cancellationToken); } - - /// - /// Resolve the token to get the SaaS resource ID and activate the SaaS resource - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/NewRelic.Observability/activateSaaS - /// - /// - /// Operation Id - /// SaaS_ActivateResource - /// - /// - /// Default Api Version - /// 2025-05-01-preview - /// - /// - /// - /// The details for ActivateSaaSParameter request. - /// The cancellation token to use. - /// is null. - public virtual async Task> ActivateResourceSaaSAsync(ActivateSaaSParameterContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = SaaSClientDiagnostics.CreateScope("MockableNewRelicObservabilitySubscriptionResource.ActivateResourceSaaS"); - scope.Start(); - try - { - var response = await SaaSRestClient.ActivateResourceAsync(Id.SubscriptionId, content, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Resolve the token to get the SaaS resource ID and activate the SaaS resource - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/NewRelic.Observability/activateSaaS - /// - /// - /// Operation Id - /// SaaS_ActivateResource - /// - /// - /// Default Api Version - /// 2025-05-01-preview - /// - /// - /// - /// The details for ActivateSaaSParameter request. - /// The cancellation token to use. - /// is null. - public virtual Response ActivateResourceSaaS(ActivateSaaSParameterContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = SaaSClientDiagnostics.CreateScope("MockableNewRelicObservabilitySubscriptionResource.ActivateResourceSaaS"); - scope.Start(); - try - { - var response = SaaSRestClient.ActivateResource(Id.SubscriptionId, content, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } } } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Extensions/NewRelicObservabilityExtensions.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Extensions/NewRelicObservabilityExtensions.cs index 76dc813a925b..24d4d0c805b6 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Extensions/NewRelicObservabilityExtensions.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Extensions/NewRelicObservabilityExtensions.cs @@ -53,41 +53,41 @@ public static NewRelicMonitorResource GetNewRelicMonitorResource(this ArmClient } /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The resource ID of the resource to get. /// is null. - /// Returns a object. - public static NewRelicObservabilityTagRuleResource GetNewRelicObservabilityTagRuleResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static NewRelicMonitoredSubscriptionResource GetNewRelicMonitoredSubscriptionResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableNewRelicObservabilityArmClient(client).GetNewRelicObservabilityTagRuleResource(id); + return GetMockableNewRelicObservabilityArmClient(client).GetNewRelicMonitoredSubscriptionResource(id); } /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The resource ID of the resource to get. /// is null. - /// Returns a object. - public static NewRelicMonitoredSubscriptionResource GetNewRelicMonitoredSubscriptionResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static NewRelicObservabilityTagRuleResource GetNewRelicObservabilityTagRuleResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableNewRelicObservabilityArmClient(client).GetNewRelicMonitoredSubscriptionResource(id); + return GetMockableNewRelicObservabilityArmClient(client).GetNewRelicObservabilityTagRuleResource(id); } /// @@ -251,6 +251,70 @@ public static Pageable GetNewRelicAccounts(this Sub return GetMockableNewRelicObservabilitySubscriptionResource(subscriptionResource).GetNewRelicAccounts(userEmail, location, cancellationToken); } + /// + /// Resolve the token to get the SaaS resource ID and activate the SaaS resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/NewRelic.Observability/activateSaaS + /// + /// + /// Operation Id + /// SaaS_ActivateResource + /// + /// + /// Default Api Version + /// 2025-05-01-preview + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The request body. + /// The cancellation token to use. + /// or is null. + public static async Task> ActivateResourceSaaSAsync(this SubscriptionResource subscriptionResource, ActivateSaaSParameterContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return await GetMockableNewRelicObservabilitySubscriptionResource(subscriptionResource).ActivateResourceSaaSAsync(content, cancellationToken).ConfigureAwait(false); + } + + /// + /// Resolve the token to get the SaaS resource ID and activate the SaaS resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/NewRelic.Observability/activateSaaS + /// + /// + /// Operation Id + /// SaaS_ActivateResource + /// + /// + /// Default Api Version + /// 2025-05-01-preview + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The request body. + /// The cancellation token to use. + /// or is null. + public static Response ActivateResourceSaaS(this SubscriptionResource subscriptionResource, ActivateSaaSParameterContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableNewRelicObservabilitySubscriptionResource(subscriptionResource).ActivateResourceSaaS(content, cancellationToken); + } + /// /// Lists all New Relic monitor resources either within a specific subscription /// @@ -458,69 +522,5 @@ public static Pageable GetNewRelicPlans(this SubscriptionResou return GetMockableNewRelicObservabilitySubscriptionResource(subscriptionResource).GetNewRelicPlans(accountId, organizationId, cancellationToken); } - - /// - /// Resolve the token to get the SaaS resource ID and activate the SaaS resource - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/NewRelic.Observability/activateSaaS - /// - /// - /// Operation Id - /// SaaS_ActivateResource - /// - /// - /// Default Api Version - /// 2025-05-01-preview - /// - /// - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// The details for ActivateSaaSParameter request. - /// The cancellation token to use. - /// or is null. - public static async Task> ActivateResourceSaaSAsync(this SubscriptionResource subscriptionResource, ActivateSaaSParameterContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - - return await GetMockableNewRelicObservabilitySubscriptionResource(subscriptionResource).ActivateResourceSaaSAsync(content, cancellationToken).ConfigureAwait(false); - } - - /// - /// Resolve the token to get the SaaS resource ID and activate the SaaS resource - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/NewRelic.Observability/activateSaaS - /// - /// - /// Operation Id - /// SaaS_ActivateResource - /// - /// - /// Default Api Version - /// 2025-05-01-preview - /// - /// - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// The details for ActivateSaaSParameter request. - /// The cancellation token to use. - /// or is null. - public static Response ActivateResourceSaaS(this SubscriptionResource subscriptionResource, ActivateSaaSParameterContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - - return GetMockableNewRelicObservabilitySubscriptionResource(subscriptionResource).ActivateResourceSaaS(content, cancellationToken); - } } } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/ActivateSaaSParameterContent.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/ActivateSaaSParameterContent.Serialization.cs index 29b1d016f7a4..b80d80ed9e09 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/ActivateSaaSParameterContent.Serialization.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/ActivateSaaSParameterContent.Serialization.cs @@ -75,7 +75,7 @@ internal static ActivateSaaSParameterContent DeserializeActivateSaaSParameterCon { return null; } - string saasGuid = default; + Guid saasGuid = default; string publisherId = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -83,7 +83,7 @@ internal static ActivateSaaSParameterContent DeserializeActivateSaaSParameterCon { if (property.NameEquals("saasGuid"u8)) { - saasGuid = property.Value.GetString(); + saasGuid = property.Value.GetGuid(); continue; } if (property.NameEquals("publisherId"u8)) diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/ActivateSaaSParameterContent.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/ActivateSaaSParameterContent.cs index 308c3b982fe7..90d78f5b5b2c 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/ActivateSaaSParameterContent.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/ActivateSaaSParameterContent.cs @@ -48,10 +48,9 @@ public partial class ActivateSaaSParameterContent /// Initializes a new instance of . /// SaaS guid for Activate and Validate SaaS Resource. /// Publisher Id for NewRelic resource. - /// or is null. - public ActivateSaaSParameterContent(string saasGuid, string publisherId) + /// is null. + public ActivateSaaSParameterContent(Guid saasGuid, string publisherId) { - Argument.AssertNotNull(saasGuid, nameof(saasGuid)); Argument.AssertNotNull(publisherId, nameof(publisherId)); SaasGuid = saasGuid; @@ -62,7 +61,7 @@ public ActivateSaaSParameterContent(string saasGuid, string publisherId) /// SaaS guid for Activate and Validate SaaS Resource. /// Publisher Id for NewRelic resource. /// Keeps track of any properties unknown to the library. - internal ActivateSaaSParameterContent(string saasGuid, string publisherId, IDictionary serializedAdditionalRawData) + internal ActivateSaaSParameterContent(Guid saasGuid, string publisherId, IDictionary serializedAdditionalRawData) { SaasGuid = saasGuid; PublisherId = publisherId; @@ -76,7 +75,7 @@ internal ActivateSaaSParameterContent() /// SaaS guid for Activate and Validate SaaS Resource. [WirePath("saasGuid")] - public string SaasGuid { get; } + public Guid SaasGuid { get; } /// Publisher Id for NewRelic resource. [WirePath("publisherId")] public string PublisherId { get; } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/AzureResourceManagerNewRelicObservabilityContext.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/AzureResourceManagerNewRelicObservabilityContext.cs index 933be14619df..443a07dc5c5a 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/AzureResourceManagerNewRelicObservabilityContext.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/AzureResourceManagerNewRelicObservabilityContext.cs @@ -67,11 +67,11 @@ namespace Azure.ResourceManager.NewRelicObservability [ModelReaderWriterBuildable(typeof(NewRelicPlanDataListResult))] [ModelReaderWriterBuildable(typeof(NewRelicPlanDetails))] [ModelReaderWriterBuildable(typeof(NewRelicResourceMonitorResult))] + [ModelReaderWriterBuildable(typeof(NewRelicResubscribeProperties))] [ModelReaderWriterBuildable(typeof(NewRelicSingleSignOnProperties))] [ModelReaderWriterBuildable(typeof(NewRelicSwitchBillingContent))] [ModelReaderWriterBuildable(typeof(PartnerBillingEntity))] [ModelReaderWriterBuildable(typeof(ResponseError))] - [ModelReaderWriterBuildable(typeof(ResubscribeProperties))] [ModelReaderWriterBuildable(typeof(SubResource))] [ModelReaderWriterBuildable(typeof(SystemData))] [ModelReaderWriterBuildable(typeof(UserAssignedIdentity))] diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/ConnectedPartnerResourcesListResponse.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/ConnectedPartnerResourcesListResponse.Serialization.cs index 26aded4b773e..367f7e765756 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/ConnectedPartnerResourcesListResponse.Serialization.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/ConnectedPartnerResourcesListResponse.Serialization.cs @@ -36,20 +36,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ConnectedPartnerResourcesListResponse)} does not support writing '{format}' format."); } - if (Optional.IsCollectionDefined(Value)) + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) { - writer.WritePropertyName("value"u8); - writer.WriteStartArray(); - foreach (var item in Value) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); + writer.WriteObjectValue(item, options); } + writer.WriteEndArray(); if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -89,17 +86,13 @@ internal static ConnectedPartnerResourcesListResponse DeserializeConnectedPartne return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -110,7 +103,11 @@ internal static ConnectedPartnerResourcesListResponse DeserializeConnectedPartne } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -119,7 +116,7 @@ internal static ConnectedPartnerResourcesListResponse DeserializeConnectedPartne } } serializedAdditionalRawData = rawDataDictionary; - return new ConnectedPartnerResourcesListResponse(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new ConnectedPartnerResourcesListResponse(value, nextLink, serializedAdditionalRawData); } private BinaryData SerializeBicep(ModelReaderWriterOptions options) @@ -167,15 +164,7 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) if (Optional.IsDefined(NextLink)) { builder.Append(" nextLink: "); - if (NextLink.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{NextLink}'''"); - } - else - { - builder.AppendLine($"'{NextLink}'"); - } + builder.AppendLine($"'{NextLink.AbsoluteUri}'"); } } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/ConnectedPartnerResourcesListResponse.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/ConnectedPartnerResourcesListResponse.cs index 0283591027dc..f3fff867010d 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/ConnectedPartnerResourcesListResponse.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/ConnectedPartnerResourcesListResponse.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.NewRelicObservability.Models { @@ -46,25 +47,34 @@ internal partial class ConnectedPartnerResourcesListResponse private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal ConnectedPartnerResourcesListResponse() + /// The ConnectedPartnerResourcesListFormat items on this page. + /// is null. + internal ConnectedPartnerResourcesListResponse(IEnumerable value) { - Value = new ChangeTrackingList(); + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); } /// Initializes a new instance of . - /// Results of a list operation. - /// Link to the next set of results, if any. + /// The ConnectedPartnerResourcesListFormat items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal ConnectedPartnerResourcesListResponse(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal ConnectedPartnerResourcesListResponse(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Results of a list operation. + /// Initializes a new instance of for deserialization. + internal ConnectedPartnerResourcesListResponse() + { + } + + /// The ConnectedPartnerResourcesListFormat items on this page. public IReadOnlyList Value { get; } - /// Link to the next set of results, if any. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/LinkedResourceListResponse.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/LinkedResourceListResponse.Serialization.cs index 744ccbb59e1a..bcd1c83ffd13 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/LinkedResourceListResponse.Serialization.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/LinkedResourceListResponse.Serialization.cs @@ -37,20 +37,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(LinkedResourceListResponse)} does not support writing '{format}' format."); } - if (Optional.IsCollectionDefined(Value)) + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) { - writer.WritePropertyName("value"u8); - writer.WriteStartArray(); - foreach (var item in Value) - { - ((IJsonModel)item).Write(writer, options); - } - writer.WriteEndArray(); + ((IJsonModel)item).Write(writer, options); } + writer.WriteEndArray(); if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -90,17 +87,13 @@ internal static LinkedResourceListResponse DeserializeLinkedResourceListResponse return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -111,7 +104,11 @@ internal static LinkedResourceListResponse DeserializeLinkedResourceListResponse } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -120,7 +117,7 @@ internal static LinkedResourceListResponse DeserializeLinkedResourceListResponse } } serializedAdditionalRawData = rawDataDictionary; - return new LinkedResourceListResponse(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new LinkedResourceListResponse(value, nextLink, serializedAdditionalRawData); } private BinaryData SerializeBicep(ModelReaderWriterOptions options) @@ -168,15 +165,7 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) if (Optional.IsDefined(NextLink)) { builder.Append(" nextLink: "); - if (NextLink.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{NextLink}'''"); - } - else - { - builder.AppendLine($"'{NextLink}'"); - } + builder.AppendLine($"'{NextLink.AbsoluteUri}'"); } } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/LinkedResourceListResponse.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/LinkedResourceListResponse.cs index 0c73823cbae3..645061b22f2e 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/LinkedResourceListResponse.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/LinkedResourceListResponse.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using System.Linq; using Azure.ResourceManager.Resources.Models; namespace Azure.ResourceManager.NewRelicObservability.Models @@ -47,25 +48,34 @@ internal partial class LinkedResourceListResponse private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal LinkedResourceListResponse() + /// The LinkedResource items on this page. + /// is null. + internal LinkedResourceListResponse(IEnumerable value) { - Value = new ChangeTrackingList(); + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); } /// Initializes a new instance of . - /// Results of a list operation. - /// Link to the next set of results, if any. + /// The LinkedResource items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal LinkedResourceListResponse(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal LinkedResourceListResponse(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Results of a list operation. + /// Initializes a new instance of for deserialization. + internal LinkedResourceListResponse() + { + } + + /// The LinkedResource items on this page. public IReadOnlyList Value { get; } - /// Link to the next set of results, if any. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/MonitoredSubscriptionPropertiesList.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/MonitoredSubscriptionPropertiesList.Serialization.cs index d96d63cf094d..cc8be3873304 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/MonitoredSubscriptionPropertiesList.Serialization.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/MonitoredSubscriptionPropertiesList.Serialization.cs @@ -36,20 +36,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(MonitoredSubscriptionPropertiesList)} does not support writing '{format}' format."); } - if (Optional.IsCollectionDefined(Value)) + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) { - writer.WritePropertyName("value"u8); - writer.WriteStartArray(); - foreach (var item in Value) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); + writer.WriteObjectValue(item, options); } + writer.WriteEndArray(); if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -89,17 +86,13 @@ internal static MonitoredSubscriptionPropertiesList DeserializeMonitoredSubscrip return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -110,7 +103,11 @@ internal static MonitoredSubscriptionPropertiesList DeserializeMonitoredSubscrip } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -119,7 +116,7 @@ internal static MonitoredSubscriptionPropertiesList DeserializeMonitoredSubscrip } } serializedAdditionalRawData = rawDataDictionary; - return new MonitoredSubscriptionPropertiesList(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new MonitoredSubscriptionPropertiesList(value, nextLink, serializedAdditionalRawData); } private BinaryData SerializeBicep(ModelReaderWriterOptions options) @@ -167,15 +164,7 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) if (Optional.IsDefined(NextLink)) { builder.Append(" nextLink: "); - if (NextLink.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{NextLink}'''"); - } - else - { - builder.AppendLine($"'{NextLink}'"); - } + builder.AppendLine($"'{NextLink.AbsoluteUri}'"); } } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/MonitoredSubscriptionPropertiesList.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/MonitoredSubscriptionPropertiesList.cs index 83d555882f25..de9ea0571674 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/MonitoredSubscriptionPropertiesList.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/MonitoredSubscriptionPropertiesList.cs @@ -7,10 +7,11 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.NewRelicObservability.Models { - /// The MonitoredSubscriptionPropertiesList. + /// Paged collection of MonitoredSubscriptionProperties items. internal partial class MonitoredSubscriptionPropertiesList { /// @@ -46,25 +47,34 @@ internal partial class MonitoredSubscriptionPropertiesList private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal MonitoredSubscriptionPropertiesList() + /// The MonitoredSubscriptionProperties items on this page. + /// is null. + internal MonitoredSubscriptionPropertiesList(IEnumerable value) { - Value = new ChangeTrackingList(); + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); } /// Initializes a new instance of . - /// + /// The MonitoredSubscriptionProperties items on this page. /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal MonitoredSubscriptionPropertiesList(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal MonitoredSubscriptionPropertiesList(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Gets the value. + /// Initializes a new instance of for deserialization. + internal MonitoredSubscriptionPropertiesList() + { + } + + /// The MonitoredSubscriptionProperties items on this page. public IReadOnlyList Value { get; } /// The link to the next page of items. - public string NextLink { get; } + public Uri NextLink { get; } } } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicAppServicesGetContent.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicAppServicesGetContent.cs index 0154670c0347..785c9b3c8fbb 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicAppServicesGetContent.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicAppServicesGetContent.cs @@ -47,7 +47,7 @@ public partial class NewRelicAppServicesGetContent private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// User Email. + /// Reusable representation of an email address. /// is null. public NewRelicAppServicesGetContent(string userEmail) { @@ -59,7 +59,7 @@ public NewRelicAppServicesGetContent(string userEmail) /// Initializes a new instance of . /// Azure resource IDs. - /// User Email. + /// Reusable representation of an email address. /// Keeps track of any properties unknown to the library. internal NewRelicAppServicesGetContent(IList azureResourceIds, string userEmail, IDictionary serializedAdditionalRawData) { @@ -76,7 +76,7 @@ internal NewRelicAppServicesGetContent() /// Azure resource IDs. [WirePath("azureResourceIds")] public IList AzureResourceIds { get; } - /// User Email. + /// Reusable representation of an email address. [WirePath("userEmail")] public string UserEmail { get; } } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicHostsGetContent.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicHostsGetContent.cs index 299b39f08b8d..ec1ddaeb982f 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicHostsGetContent.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicHostsGetContent.cs @@ -47,7 +47,7 @@ public partial class NewRelicHostsGetContent private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// User Email. + /// Reusable representation of an email address. /// is null. public NewRelicHostsGetContent(string userEmail) { @@ -59,7 +59,7 @@ public NewRelicHostsGetContent(string userEmail) /// Initializes a new instance of . /// VM resource IDs. - /// User Email. + /// Reusable representation of an email address. /// Keeps track of any properties unknown to the library. internal NewRelicHostsGetContent(IList vmIds, string userEmail, IDictionary serializedAdditionalRawData) { @@ -76,7 +76,7 @@ internal NewRelicHostsGetContent() /// VM resource IDs. [WirePath("vmIds")] public IList VmIds { get; } - /// User Email. + /// Reusable representation of an email address. [WirePath("userEmail")] public string UserEmail { get; } } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMetricsContent.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMetricsContent.cs index 8614eddb2737..9d9642846365 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMetricsContent.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMetricsContent.cs @@ -46,7 +46,7 @@ public partial class NewRelicMetricsContent private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// User Email. + /// Reusable representation of an email address. /// is null. public NewRelicMetricsContent(string userEmail) { @@ -56,7 +56,7 @@ public NewRelicMetricsContent(string userEmail) } /// Initializes a new instance of . - /// User Email. + /// Reusable representation of an email address. /// Keeps track of any properties unknown to the library. internal NewRelicMetricsContent(string userEmail, IDictionary serializedAdditionalRawData) { @@ -69,7 +69,7 @@ internal NewRelicMetricsContent() { } - /// User Email. + /// Reusable representation of an email address. [WirePath("userEmail")] public string UserEmail { get; } } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMetricsStatusContent.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMetricsStatusContent.cs index 0b0ae3fe3a5c..f43f2350dffa 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMetricsStatusContent.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMetricsStatusContent.cs @@ -46,7 +46,7 @@ public partial class NewRelicMetricsStatusContent private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// User Email. + /// Reusable representation of an email address. /// is null. public NewRelicMetricsStatusContent(string userEmail) { @@ -58,7 +58,7 @@ public NewRelicMetricsStatusContent(string userEmail) /// Initializes a new instance of . /// Azure resource IDs. - /// User Email. + /// Reusable representation of an email address. /// Keeps track of any properties unknown to the library. internal NewRelicMetricsStatusContent(IList azureResourceIds, string userEmail, IDictionary serializedAdditionalRawData) { @@ -75,7 +75,7 @@ internal NewRelicMetricsStatusContent() /// Azure resource IDs. [WirePath("azureResourceIds")] public IList AzureResourceIds { get; } - /// User Email. + /// Reusable representation of an email address. [WirePath("userEmail")] public string UserEmail { get; } } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMonitorResourcePatch.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMonitorResourcePatch.Serialization.cs index e825f1718fb6..51df63b654ee 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMonitorResourcePatch.Serialization.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMonitorResourcePatch.Serialization.cs @@ -39,7 +39,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); - ((IJsonModel)Identity).Write(writer, options); + ((IJsonModel)Identity).Write(writer, ModelSerializationExtensions.WireV3Options); } if (Optional.IsCollectionDefined(Tags)) { @@ -140,7 +140,7 @@ internal static NewRelicMonitorResourcePatch DeserializeNewRelicMonitorResourceP { continue; } - identity = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), options, AzureResourceManagerNewRelicObservabilityContext.Default); + identity = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), ModelSerializationExtensions.WireV3Options, AzureResourceManagerNewRelicObservabilityContext.Default); continue; } if (property.NameEquals("tags"u8)) diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMonitorResourcePatch.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMonitorResourcePatch.cs index fe8f0500e5ee..edfcb038f19e 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMonitorResourcePatch.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMonitorResourcePatch.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using Azure.Core; using Azure.ResourceManager.Models; namespace Azure.ResourceManager.NewRelicObservability.Models @@ -94,7 +95,7 @@ internal NewRelicMonitorResourcePatch(ManagedServiceIdentity identity, IDictiona internal NewRelicObservabilitySaaSContent SaaSData { get; set; } /// SaaS resource id. [WirePath("properties.saaSData.saaSResourceId")] - public string SaaSResourceId + public ResourceIdentifier SaaSResourceId { get => SaaSData is null ? default : SaaSData.SaaSResourceId; set diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMonitoredSubscriptionInfo.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMonitoredSubscriptionInfo.Serialization.cs index 3257c619b43d..9df512049ee1 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMonitoredSubscriptionInfo.Serialization.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMonitoredSubscriptionInfo.Serialization.cs @@ -35,11 +35,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(NewRelicMonitoredSubscriptionInfo)} does not support writing '{format}' format."); } - if (Optional.IsDefined(SubscriptionId)) - { - writer.WritePropertyName("subscriptionId"u8); - writer.WriteStringValue(SubscriptionId); - } + writer.WritePropertyName("subscriptionId"u8); + writer.WriteStringValue(SubscriptionId); if (Optional.IsDefined(Status)) { writer.WritePropertyName("status"u8); diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMonitoredSubscriptionInfo.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMonitoredSubscriptionInfo.cs index 8c9c2a70ee41..6b33cdd00b86 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMonitoredSubscriptionInfo.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMonitoredSubscriptionInfo.cs @@ -46,8 +46,13 @@ public partial class NewRelicMonitoredSubscriptionInfo private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - public NewRelicMonitoredSubscriptionInfo() + /// The subscriptionId to be monitored. + /// is null. + public NewRelicMonitoredSubscriptionInfo(string subscriptionId) { + Argument.AssertNotNull(subscriptionId, nameof(subscriptionId)); + + SubscriptionId = subscriptionId; } /// Initializes a new instance of . diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityAccountInfo.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityAccountInfo.cs index 254c3ec8b044..fd9efca11fea 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityAccountInfo.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityAccountInfo.cs @@ -53,7 +53,7 @@ public NewRelicObservabilityAccountInfo() /// Initializes a new instance of . /// Account id. - /// ingestion key of account. + /// Credential string. /// Region where New Relic account is present. /// Keeps track of any properties unknown to the library. internal NewRelicObservabilityAccountInfo(string accountId, string ingestionKey, AzureLocation? region, IDictionary serializedAdditionalRawData) @@ -67,7 +67,7 @@ internal NewRelicObservabilityAccountInfo(string accountId, string ingestionKey, /// Account id. [WirePath("accountId")] public string AccountId { get; set; } - /// ingestion key of account. + /// Credential string. [WirePath("ingestionKey")] public string IngestionKey { get; set; } /// Region where New Relic account is present. diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityLatestLinkedSaaSResult.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityLatestLinkedSaaSResult.Serialization.cs index e34ee9c7c40d..a003c0d323cd 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityLatestLinkedSaaSResult.Serialization.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityLatestLinkedSaaSResult.Serialization.cs @@ -82,7 +82,7 @@ internal static NewRelicObservabilityLatestLinkedSaaSResult DeserializeNewRelicO { return null; } - string saaSResourceId = default; + ResourceIdentifier saaSResourceId = default; bool? isHiddenSaaS = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -90,7 +90,11 @@ internal static NewRelicObservabilityLatestLinkedSaaSResult DeserializeNewRelicO { if (property.NameEquals("saaSResourceId"u8)) { - saaSResourceId = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + saaSResourceId = new ResourceIdentifier(property.Value.GetString()); continue; } if (property.NameEquals("isHiddenSaaS"u8)) @@ -133,15 +137,7 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) if (Optional.IsDefined(SaaSResourceId)) { builder.Append(" saaSResourceId: "); - if (SaaSResourceId.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{SaaSResourceId}'''"); - } - else - { - builder.AppendLine($"'{SaaSResourceId}'"); - } + builder.AppendLine($"'{SaaSResourceId.ToString()}'"); } } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityLatestLinkedSaaSResult.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityLatestLinkedSaaSResult.cs index 3bbc3208c188..95453ea304fe 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityLatestLinkedSaaSResult.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityLatestLinkedSaaSResult.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using Azure.Core; namespace Azure.ResourceManager.NewRelicObservability.Models { @@ -54,7 +55,7 @@ internal NewRelicObservabilityLatestLinkedSaaSResult() /// SaaS resource id. /// Flag indicating if the SaaS resource is hidden. /// Keeps track of any properties unknown to the library. - internal NewRelicObservabilityLatestLinkedSaaSResult(string saaSResourceId, bool? isHiddenSaaS, IDictionary serializedAdditionalRawData) + internal NewRelicObservabilityLatestLinkedSaaSResult(ResourceIdentifier saaSResourceId, bool? isHiddenSaaS, IDictionary serializedAdditionalRawData) { SaaSResourceId = saaSResourceId; IsHiddenSaaS = isHiddenSaaS; @@ -63,7 +64,7 @@ internal NewRelicObservabilityLatestLinkedSaaSResult(string saaSResourceId, bool /// SaaS resource id. [WirePath("saaSResourceId")] - public string SaaSResourceId { get; } + public ResourceIdentifier SaaSResourceId { get; } /// Flag indicating if the SaaS resource is hidden. [WirePath("isHiddenSaaS")] public bool? IsHiddenSaaS { get; } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityMetricRules.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityMetricRules.cs index 6c26bff93462..9fe194c387bf 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityMetricRules.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityMetricRules.cs @@ -54,7 +54,7 @@ public NewRelicObservabilityMetricRules() /// Initializes a new instance of . /// Flag specifying if metrics should be sent for the Monitor resource. /// List of filtering tags to be used for capturing metrics. - /// User Email. + /// Reusable representation of an email address. /// Keeps track of any properties unknown to the library. internal NewRelicObservabilityMetricRules(NewRelicObservabilitySendMetricsStatus? sendMetrics, IList filteringTags, string userEmail, IDictionary serializedAdditionalRawData) { @@ -70,7 +70,7 @@ internal NewRelicObservabilityMetricRules(NewRelicObservabilitySendMetricsStatus /// List of filtering tags to be used for capturing metrics. [WirePath("filteringTags")] public IList FilteringTags { get; } - /// User Email. + /// Reusable representation of an email address. [WirePath("userEmail")] public string UserEmail { get; set; } } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilitySaaSContent.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilitySaaSContent.Serialization.cs index 08fcde1f696d..7741ddacb506 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilitySaaSContent.Serialization.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilitySaaSContent.Serialization.cs @@ -77,14 +77,18 @@ internal static NewRelicObservabilitySaaSContent DeserializeNewRelicObservabilit { return null; } - string saaSResourceId = default; + ResourceIdentifier saaSResourceId = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("saaSResourceId"u8)) { - saaSResourceId = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + saaSResourceId = new ResourceIdentifier(property.Value.GetString()); continue; } if (options.Format != "W") @@ -118,15 +122,7 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) if (Optional.IsDefined(SaaSResourceId)) { builder.Append(" saaSResourceId: "); - if (SaaSResourceId.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{SaaSResourceId}'''"); - } - else - { - builder.AppendLine($"'{SaaSResourceId}'"); - } + builder.AppendLine($"'{SaaSResourceId.ToString()}'"); } } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilitySaaSContent.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilitySaaSContent.cs index d989669c5ca6..58a60cea6ca2 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilitySaaSContent.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilitySaaSContent.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using Azure.Core; namespace Azure.ResourceManager.NewRelicObservability.Models { @@ -53,7 +54,7 @@ public NewRelicObservabilitySaaSContent() /// Initializes a new instance of . /// SaaS resource id. /// Keeps track of any properties unknown to the library. - internal NewRelicObservabilitySaaSContent(string saaSResourceId, IDictionary serializedAdditionalRawData) + internal NewRelicObservabilitySaaSContent(ResourceIdentifier saaSResourceId, IDictionary serializedAdditionalRawData) { SaaSResourceId = saaSResourceId; _serializedAdditionalRawData = serializedAdditionalRawData; @@ -61,6 +62,6 @@ internal NewRelicObservabilitySaaSContent(string saaSResourceId, IDictionary SaaS resource id. [WirePath("saaSResourceId")] - public string SaaSResourceId { get; set; } + public ResourceIdentifier SaaSResourceId { get; set; } } } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityUserInfo.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityUserInfo.cs index c2d3aceef037..fc1fa9b2c4b8 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityUserInfo.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityUserInfo.cs @@ -53,7 +53,7 @@ public NewRelicObservabilityUserInfo() /// Initializes a new instance of . /// First name. /// Last name. - /// User Email. + /// Reusable representation of an email address. /// Contact phone number. /// country if user. /// Keeps track of any properties unknown to the library. @@ -73,7 +73,7 @@ internal NewRelicObservabilityUserInfo(string firstName, string lastName, string /// Last name. [WirePath("lastName")] public string LastName { get; set; } - /// User Email. + /// Reusable representation of an email address. [WirePath("emailAddress")] public string EmailAddress { get; set; } /// Contact phone number. diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/ResubscribeProperties.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicResubscribeProperties.Serialization.cs similarity index 75% rename from sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/ResubscribeProperties.Serialization.cs rename to sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicResubscribeProperties.Serialization.cs index d23900a14039..fb00d4502b9a 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/ResubscribeProperties.Serialization.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicResubscribeProperties.Serialization.cs @@ -13,11 +13,11 @@ namespace Azure.ResourceManager.NewRelicObservability.Models { - public partial class ResubscribeProperties : IUtf8JsonSerializable, IJsonModel + public partial class NewRelicResubscribeProperties : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,10 +28,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(ResubscribeProperties)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(NewRelicResubscribeProperties)} does not support writing '{format}' format."); } if (Optional.IsDefined(PlanId)) @@ -86,19 +86,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - ResubscribeProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + NewRelicResubscribeProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(ResubscribeProperties)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(NewRelicResubscribeProperties)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeResubscribeProperties(document.RootElement, options); + return DeserializeNewRelicResubscribeProperties(document.RootElement, options); } - internal static ResubscribeProperties DeserializeResubscribeProperties(JsonElement element, ModelReaderWriterOptions options = null) + internal static NewRelicResubscribeProperties DeserializeNewRelicResubscribeProperties(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -158,7 +158,7 @@ internal static ResubscribeProperties DeserializeResubscribeProperties(JsonEleme } } serializedAdditionalRawData = rawDataDictionary; - return new ResubscribeProperties( + return new NewRelicResubscribeProperties( planId, termId, subscriptionId, @@ -169,35 +169,35 @@ internal static ResubscribeProperties DeserializeResubscribeProperties(JsonEleme serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options, AzureResourceManagerNewRelicObservabilityContext.Default); default: - throw new FormatException($"The model {nameof(ResubscribeProperties)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(NewRelicResubscribeProperties)} does not support writing '{options.Format}' format."); } } - ResubscribeProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + NewRelicResubscribeProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeResubscribeProperties(document.RootElement, options); + return DeserializeNewRelicResubscribeProperties(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(ResubscribeProperties)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(NewRelicResubscribeProperties)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/ResubscribeProperties.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicResubscribeProperties.cs similarity index 88% rename from sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/ResubscribeProperties.cs rename to sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicResubscribeProperties.cs index b2585ffd6226..4614c1f3fb1d 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/ResubscribeProperties.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicResubscribeProperties.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.NewRelicObservability.Models { /// Resubscribe Properties. - public partial class ResubscribeProperties + public partial class NewRelicResubscribeProperties { /// /// Keeps track of any properties unknown to the library. @@ -45,12 +45,12 @@ public partial class ResubscribeProperties /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - public ResubscribeProperties() + /// Initializes a new instance of . + public NewRelicResubscribeProperties() { } - /// Initializes a new instance of . + /// Initializes a new instance of . /// Newly selected plan Id to create the new Marketplace subscription for Resubscribe. /// Newly selected term Id to create the new Marketplace subscription for Resubscribe. /// Newly selected Azure Subscription Id in which the new Marketplace subscription will be created for Resubscribe. @@ -59,7 +59,7 @@ public ResubscribeProperties() /// Publisher Id of the NewRelic offer that needs to be resubscribed. /// Offer Id of the NewRelic offer that needs to be resubscribed. /// Keeps track of any properties unknown to the library. - internal ResubscribeProperties(string planId, string termId, string subscriptionId, string resourceGroup, string organizationId, string publisherId, string offerId, IDictionary serializedAdditionalRawData) + internal NewRelicResubscribeProperties(string planId, string termId, string subscriptionId, string resourceGroup, string organizationId, string publisherId, string offerId, IDictionary serializedAdditionalRawData) { PlanId = planId; TermId = termId; diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicSwitchBillingContent.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicSwitchBillingContent.cs index bc7fe8ccfffd..07b835210699 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicSwitchBillingContent.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicSwitchBillingContent.cs @@ -47,7 +47,7 @@ public partial class NewRelicSwitchBillingContent private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// User Email. + /// Reusable representation of an email address. /// is null. public NewRelicSwitchBillingContent(string userEmail) { @@ -60,7 +60,7 @@ public NewRelicSwitchBillingContent(string userEmail) /// Azure resource Id. /// Organization id. /// Plan details. - /// User Email. + /// Reusable representation of an email address. /// Keeps track of any properties unknown to the library. internal NewRelicSwitchBillingContent(ResourceIdentifier azureResourceId, string organizationId, NewRelicPlanDetails planData, string userEmail, IDictionary serializedAdditionalRawData) { @@ -85,7 +85,7 @@ internal NewRelicSwitchBillingContent() /// Plan details. [WirePath("planData")] public NewRelicPlanDetails PlanData { get; set; } - /// User Email. + /// Reusable representation of an email address. [WirePath("userEmail")] public string UserEmail { get; } } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicMonitorResource.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicMonitorResource.cs index 091163bf5c46..4447d9e93724 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicMonitorResource.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicMonitorResource.cs @@ -102,23 +102,23 @@ internal static void ValidateResourceId(ResourceIdentifier id) throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); } - /// Gets a collection of NewRelicObservabilityTagRuleResources in the NewRelicMonitorResource. - /// An object representing collection of NewRelicObservabilityTagRuleResources and their operations over a NewRelicObservabilityTagRuleResource. - public virtual NewRelicObservabilityTagRuleCollection GetNewRelicObservabilityTagRules() + /// Gets a collection of NewRelicMonitoredSubscriptionResources in the NewRelicMonitorResource. + /// An object representing collection of NewRelicMonitoredSubscriptionResources and their operations over a NewRelicMonitoredSubscriptionResource. + public virtual NewRelicMonitoredSubscriptionCollection GetNewRelicMonitoredSubscriptions() { - return GetCachedClient(client => new NewRelicObservabilityTagRuleCollection(client, Id)); + return GetCachedClient(client => new NewRelicMonitoredSubscriptionCollection(client, Id)); } /// - /// Retrieves the details of the tag rules for a specific New Relic monitor resource, providing insight into its setup and status + /// Get a MonitoredSubscriptionProperties /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/tagRules/{ruleSetName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/monitoredSubscriptions/{configurationName} /// /// /// Operation Id - /// TagRules_Get + /// MonitoredSubscriptions_Get /// /// /// Default Api Version @@ -126,30 +126,28 @@ public virtual NewRelicObservabilityTagRuleCollection GetNewRelicObservabilityTa /// /// /// Resource - /// + /// /// /// /// - /// Name of the TagRule. + /// The configuration name. Only 'default' value is supported. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual async Task> GetNewRelicObservabilityTagRuleAsync(string ruleSetName, CancellationToken cancellationToken = default) + public virtual async Task> GetNewRelicMonitoredSubscriptionAsync(MonitoredSubscriptionConfigurationName configurationName, CancellationToken cancellationToken = default) { - return await GetNewRelicObservabilityTagRules().GetAsync(ruleSetName, cancellationToken).ConfigureAwait(false); + return await GetNewRelicMonitoredSubscriptions().GetAsync(configurationName, cancellationToken).ConfigureAwait(false); } /// - /// Retrieves the details of the tag rules for a specific New Relic monitor resource, providing insight into its setup and status + /// Get a MonitoredSubscriptionProperties /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/tagRules/{ruleSetName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/monitoredSubscriptions/{configurationName} /// /// /// Operation Id - /// TagRules_Get + /// MonitoredSubscriptions_Get /// /// /// Default Api Version @@ -157,37 +155,35 @@ public virtual async Task> GetNew /// /// /// Resource - /// + /// /// /// /// - /// Name of the TagRule. + /// The configuration name. Only 'default' value is supported. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual Response GetNewRelicObservabilityTagRule(string ruleSetName, CancellationToken cancellationToken = default) + public virtual Response GetNewRelicMonitoredSubscription(MonitoredSubscriptionConfigurationName configurationName, CancellationToken cancellationToken = default) { - return GetNewRelicObservabilityTagRules().Get(ruleSetName, cancellationToken); + return GetNewRelicMonitoredSubscriptions().Get(configurationName, cancellationToken); } - /// Gets a collection of NewRelicMonitoredSubscriptionResources in the NewRelicMonitorResource. - /// An object representing collection of NewRelicMonitoredSubscriptionResources and their operations over a NewRelicMonitoredSubscriptionResource. - public virtual NewRelicMonitoredSubscriptionCollection GetNewRelicMonitoredSubscriptions() + /// Gets a collection of NewRelicObservabilityTagRuleResources in the NewRelicMonitorResource. + /// An object representing collection of NewRelicObservabilityTagRuleResources and their operations over a NewRelicObservabilityTagRuleResource. + public virtual NewRelicObservabilityTagRuleCollection GetNewRelicObservabilityTagRules() { - return GetCachedClient(client => new NewRelicMonitoredSubscriptionCollection(client, Id)); + return GetCachedClient(client => new NewRelicObservabilityTagRuleCollection(client, Id)); } /// - /// Lists all the subscriptions currently being monitored by the NewRelic monitor resource. + /// Retrieves the details of the tag rules for a specific New Relic monitor resource, providing insight into its setup and status /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/monitoredSubscriptions/{configurationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/tagRules/{ruleSetName} /// /// /// Operation Id - /// MonitoredSubscriptions_Get + /// TagRules_Get /// /// /// Default Api Version @@ -195,28 +191,30 @@ public virtual NewRelicMonitoredSubscriptionCollection GetNewRelicMonitoredSubsc /// /// /// Resource - /// + /// /// /// /// - /// The configuration name. Only 'default' value is supported. + /// Name of the TagRule. /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual async Task> GetNewRelicMonitoredSubscriptionAsync(MonitoredSubscriptionConfigurationName configurationName, CancellationToken cancellationToken = default) + public virtual async Task> GetNewRelicObservabilityTagRuleAsync(string ruleSetName, CancellationToken cancellationToken = default) { - return await GetNewRelicMonitoredSubscriptions().GetAsync(configurationName, cancellationToken).ConfigureAwait(false); + return await GetNewRelicObservabilityTagRules().GetAsync(ruleSetName, cancellationToken).ConfigureAwait(false); } /// - /// Lists all the subscriptions currently being monitored by the NewRelic monitor resource. + /// Retrieves the details of the tag rules for a specific New Relic monitor resource, providing insight into its setup and status /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/monitoredSubscriptions/{configurationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/tagRules/{ruleSetName} /// /// /// Operation Id - /// MonitoredSubscriptions_Get + /// TagRules_Get /// /// /// Default Api Version @@ -224,16 +222,18 @@ public virtual async Task> GetNe /// /// /// Resource - /// + /// /// /// /// - /// The configuration name. Only 'default' value is supported. + /// Name of the TagRule. /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual Response GetNewRelicMonitoredSubscription(MonitoredSubscriptionConfigurationName configurationName, CancellationToken cancellationToken = default) + public virtual Response GetNewRelicObservabilityTagRule(string ruleSetName, CancellationToken cancellationToken = default) { - return GetNewRelicMonitoredSubscriptions().Get(configurationName, cancellationToken); + return GetNewRelicObservabilityTagRules().Get(ruleSetName, cancellationToken); } /// @@ -669,15 +669,15 @@ public virtual Response GetMetricStatus(NewRelicMet } /// - /// Lists the app service resources currently being monitored by the New Relic resource, helping you understand which app services are under monitoring + /// Returns the latest SaaS linked to the newrelic organization of the underlying monitor. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/listAppServices + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/latestLinkedSaaS /// /// /// Operation Id - /// Monitors_ListAppServices + /// Monitors_LatestLinkedSaaS /// /// /// Default Api Version @@ -689,29 +689,33 @@ public virtual Response GetMetricStatus(NewRelicMet /// /// /// - /// The details of the app services get request. /// The cancellation token to use. - /// is null. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAppServicesAsync(NewRelicAppServicesGetContent content, CancellationToken cancellationToken = default) + public virtual async Task> LatestLinkedSaaSAsync(CancellationToken cancellationToken = default) { - Argument.AssertNotNull(content, nameof(content)); - - HttpMessage FirstPageRequest(int? pageSizeHint) => _newRelicMonitorResourceMonitorsRestClient.CreateListAppServicesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _newRelicMonitorResourceMonitorsRestClient.CreateListAppServicesNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => NewRelicObservabilityAppServiceInfo.DeserializeNewRelicObservabilityAppServiceInfo(e), _newRelicMonitorResourceMonitorsClientDiagnostics, Pipeline, "NewRelicMonitorResource.GetAppServices", "value", "nextLink", cancellationToken); + using var scope = _newRelicMonitorResourceMonitorsClientDiagnostics.CreateScope("NewRelicMonitorResource.LatestLinkedSaaS"); + scope.Start(); + try + { + var response = await _newRelicMonitorResourceMonitorsRestClient.LatestLinkedSaaSAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } } /// - /// Lists the app service resources currently being monitored by the New Relic resource, helping you understand which app services are under monitoring + /// Returns the latest SaaS linked to the newrelic organization of the underlying monitor. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/listAppServices + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/latestLinkedSaaS /// /// /// Operation Id - /// Monitors_ListAppServices + /// Monitors_LatestLinkedSaaS /// /// /// Default Api Version @@ -723,29 +727,33 @@ public virtual AsyncPageable GetAppServices /// /// /// - /// The details of the app services get request. /// The cancellation token to use. - /// is null. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAppServices(NewRelicAppServicesGetContent content, CancellationToken cancellationToken = default) + public virtual Response LatestLinkedSaaS(CancellationToken cancellationToken = default) { - Argument.AssertNotNull(content, nameof(content)); - - HttpMessage FirstPageRequest(int? pageSizeHint) => _newRelicMonitorResourceMonitorsRestClient.CreateListAppServicesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _newRelicMonitorResourceMonitorsRestClient.CreateListAppServicesNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => NewRelicObservabilityAppServiceInfo.DeserializeNewRelicObservabilityAppServiceInfo(e), _newRelicMonitorResourceMonitorsClientDiagnostics, Pipeline, "NewRelicMonitorResource.GetAppServices", "value", "nextLink", cancellationToken); + using var scope = _newRelicMonitorResourceMonitorsClientDiagnostics.CreateScope("NewRelicMonitorResource.LatestLinkedSaaS"); + scope.Start(); + try + { + var response = _newRelicMonitorResourceMonitorsRestClient.LatestLinkedSaaS(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } } /// - /// Switches the billing for the New Relic Monitor resource to be billed by Azure Marketplace + /// Links a new SaaS to the newrelic organization of the underlying monitor. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/switchBilling + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/linkSaaS /// /// /// Operation Id - /// Monitors_SwitchBilling + /// Monitors_LinkSaaS /// /// /// Default Api Version @@ -757,19 +765,23 @@ public virtual Pageable GetAppServices(NewR /// /// /// - /// The details of the switch billing request. + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Link SaaS body parameter. /// The cancellation token to use. /// is null. - public virtual async Task> SwitchBillingAsync(NewRelicSwitchBillingContent content, CancellationToken cancellationToken = default) + public virtual async Task> LinkSaaSAsync(WaitUntil waitUntil, NewRelicObservabilitySaaSContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(content, nameof(content)); - using var scope = _newRelicMonitorResourceMonitorsClientDiagnostics.CreateScope("NewRelicMonitorResource.SwitchBilling"); + using var scope = _newRelicMonitorResourceMonitorsClientDiagnostics.CreateScope("NewRelicMonitorResource.LinkSaaS"); scope.Start(); try { - var response = await _newRelicMonitorResourceMonitorsRestClient.SwitchBillingAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new NewRelicMonitorResource(Client, response.Value), response.GetRawResponse()); + var response = await _newRelicMonitorResourceMonitorsRestClient.LinkSaaSAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new NewRelicObservabilityArmOperation(new NewRelicMonitorResourceOperationSource(Client), _newRelicMonitorResourceMonitorsClientDiagnostics, Pipeline, _newRelicMonitorResourceMonitorsRestClient.CreateLinkSaaSRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; } catch (Exception e) { @@ -779,15 +791,15 @@ public virtual async Task> SwitchBillingAsync( } /// - /// Switches the billing for the New Relic Monitor resource to be billed by Azure Marketplace + /// Links a new SaaS to the newrelic organization of the underlying monitor. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/switchBilling + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/linkSaaS /// /// /// Operation Id - /// Monitors_SwitchBilling + /// Monitors_LinkSaaS /// /// /// Default Api Version @@ -799,19 +811,23 @@ public virtual async Task> SwitchBillingAsync( /// /// /// - /// The details of the switch billing request. + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Link SaaS body parameter. /// The cancellation token to use. /// is null. - public virtual Response SwitchBilling(NewRelicSwitchBillingContent content, CancellationToken cancellationToken = default) + public virtual ArmOperation LinkSaaS(WaitUntil waitUntil, NewRelicObservabilitySaaSContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(content, nameof(content)); - using var scope = _newRelicMonitorResourceMonitorsClientDiagnostics.CreateScope("NewRelicMonitorResource.SwitchBilling"); + using var scope = _newRelicMonitorResourceMonitorsClientDiagnostics.CreateScope("NewRelicMonitorResource.LinkSaaS"); scope.Start(); try { - var response = _newRelicMonitorResourceMonitorsRestClient.SwitchBilling(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); - return Response.FromValue(new NewRelicMonitorResource(Client, response.Value), response.GetRawResponse()); + var response = _newRelicMonitorResourceMonitorsRestClient.LinkSaaS(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); + var operation = new NewRelicObservabilityArmOperation(new NewRelicMonitorResourceOperationSource(Client), _newRelicMonitorResourceMonitorsClientDiagnostics, Pipeline, _newRelicMonitorResourceMonitorsRestClient.CreateLinkSaaSRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; } catch (Exception e) { @@ -821,15 +837,15 @@ public virtual Response SwitchBilling(NewRelicSwitchBil } /// - /// Lists all VM resources currently being monitored by the New Relic monitor resource, helping you manage observability + /// Lists the app service resources currently being monitored by the New Relic resource, helping you understand which app services are under monitoring /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/listHosts + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/listAppServices /// /// /// Operation Id - /// Monitors_ListHosts + /// Monitors_ListAppServices /// /// /// Default Api Version @@ -841,29 +857,29 @@ public virtual Response SwitchBilling(NewRelicSwitchBil /// /// /// - /// The details of the Hosts get request. + /// The details of the app services get request. /// The cancellation token to use. /// is null. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetHostsAsync(NewRelicHostsGetContent content, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAppServicesAsync(NewRelicAppServicesGetContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(content, nameof(content)); - HttpMessage FirstPageRequest(int? pageSizeHint) => _newRelicMonitorResourceMonitorsRestClient.CreateListHostsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _newRelicMonitorResourceMonitorsRestClient.CreateListHostsNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => NewRelicObservabilityVmInfo.DeserializeNewRelicObservabilityVmInfo(e), _newRelicMonitorResourceMonitorsClientDiagnostics, Pipeline, "NewRelicMonitorResource.GetHosts", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _newRelicMonitorResourceMonitorsRestClient.CreateListAppServicesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _newRelicMonitorResourceMonitorsRestClient.CreateListAppServicesNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => NewRelicObservabilityAppServiceInfo.DeserializeNewRelicObservabilityAppServiceInfo(e), _newRelicMonitorResourceMonitorsClientDiagnostics, Pipeline, "NewRelicMonitorResource.GetAppServices", "value", "nextLink", cancellationToken); } /// - /// Lists all VM resources currently being monitored by the New Relic monitor resource, helping you manage observability + /// Lists the app service resources currently being monitored by the New Relic resource, helping you understand which app services are under monitoring /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/listHosts + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/listAppServices /// /// /// Operation Id - /// Monitors_ListHosts + /// Monitors_ListAppServices /// /// /// Default Api Version @@ -875,29 +891,29 @@ public virtual AsyncPageable GetHostsAsync(NewRelic /// /// /// - /// The details of the Hosts get request. + /// The details of the app services get request. /// The cancellation token to use. /// is null. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetHosts(NewRelicHostsGetContent content, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAppServices(NewRelicAppServicesGetContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(content, nameof(content)); - HttpMessage FirstPageRequest(int? pageSizeHint) => _newRelicMonitorResourceMonitorsRestClient.CreateListHostsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _newRelicMonitorResourceMonitorsRestClient.CreateListHostsNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => NewRelicObservabilityVmInfo.DeserializeNewRelicObservabilityVmInfo(e), _newRelicMonitorResourceMonitorsClientDiagnostics, Pipeline, "NewRelicMonitorResource.GetHosts", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _newRelicMonitorResourceMonitorsRestClient.CreateListAppServicesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _newRelicMonitorResourceMonitorsRestClient.CreateListAppServicesNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => NewRelicObservabilityAppServiceInfo.DeserializeNewRelicObservabilityAppServiceInfo(e), _newRelicMonitorResourceMonitorsClientDiagnostics, Pipeline, "NewRelicMonitorResource.GetAppServices", "value", "nextLink", cancellationToken); } /// - /// Refreshes the ingestion key for all monitors linked to the same account associated to the underlying monitor. + /// Lists all VM resources currently being monitored by the New Relic monitor resource, helping you manage observability /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/refreshIngestionKey + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/listHosts /// /// /// Operation Id - /// Monitors_RefreshIngestionKey + /// Monitors_ListHosts /// /// /// Default Api Version @@ -909,33 +925,29 @@ public virtual Pageable GetHosts(NewRelicHostsGetCo /// /// /// + /// The details of the Hosts get request. /// The cancellation token to use. - public virtual async Task RefreshIngestionKeyAsync(CancellationToken cancellationToken = default) + /// is null. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetHostsAsync(NewRelicHostsGetContent content, CancellationToken cancellationToken = default) { - using var scope = _newRelicMonitorResourceMonitorsClientDiagnostics.CreateScope("NewRelicMonitorResource.RefreshIngestionKey"); - scope.Start(); - try - { - var response = await _newRelicMonitorResourceMonitorsRestClient.RefreshIngestionKeyAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } + Argument.AssertNotNull(content, nameof(content)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => _newRelicMonitorResourceMonitorsRestClient.CreateListHostsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _newRelicMonitorResourceMonitorsRestClient.CreateListHostsNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => NewRelicObservabilityVmInfo.DeserializeNewRelicObservabilityVmInfo(e), _newRelicMonitorResourceMonitorsClientDiagnostics, Pipeline, "NewRelicMonitorResource.GetHosts", "value", "nextLink", cancellationToken); } /// - /// Refreshes the ingestion key for all monitors linked to the same account associated to the underlying monitor. + /// Lists all VM resources currently being monitored by the New Relic monitor resource, helping you manage observability /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/refreshIngestionKey + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/listHosts /// /// /// Operation Id - /// Monitors_RefreshIngestionKey + /// Monitors_ListHosts /// /// /// Default Api Version @@ -947,33 +959,29 @@ public virtual async Task RefreshIngestionKeyAsync(CancellationToken c /// /// /// + /// The details of the Hosts get request. /// The cancellation token to use. - public virtual Response RefreshIngestionKey(CancellationToken cancellationToken = default) + /// is null. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetHosts(NewRelicHostsGetContent content, CancellationToken cancellationToken = default) { - using var scope = _newRelicMonitorResourceMonitorsClientDiagnostics.CreateScope("NewRelicMonitorResource.RefreshIngestionKey"); - scope.Start(); - try - { - var response = _newRelicMonitorResourceMonitorsRestClient.RefreshIngestionKey(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } + Argument.AssertNotNull(content, nameof(content)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => _newRelicMonitorResourceMonitorsRestClient.CreateListHostsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _newRelicMonitorResourceMonitorsRestClient.CreateListHostsNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => NewRelicObservabilityVmInfo.DeserializeNewRelicObservabilityVmInfo(e), _newRelicMonitorResourceMonitorsClientDiagnostics, Pipeline, "NewRelicMonitorResource.GetHosts", "value", "nextLink", cancellationToken); } /// - /// 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 + /// 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 /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/monitoredResources + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/listLinkedResources /// /// /// Operation Id - /// Monitors_ListMonitoredResources + /// Monitors_ListLinkedResources /// /// /// Default Api Version @@ -986,24 +994,24 @@ public virtual Response RefreshIngestionKey(CancellationToken cancellationToken /// /// /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetMonitoredResourcesAsync(CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetLinkedResourcesAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _newRelicMonitorResourceMonitorsRestClient.CreateListMonitoredResourcesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _newRelicMonitorResourceMonitorsRestClient.CreateListMonitoredResourcesNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => NewRelicResourceMonitorResult.DeserializeNewRelicResourceMonitorResult(e), _newRelicMonitorResourceMonitorsClientDiagnostics, Pipeline, "NewRelicMonitorResource.GetMonitoredResources", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _newRelicMonitorResourceMonitorsRestClient.CreateListLinkedResourcesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _newRelicMonitorResourceMonitorsRestClient.CreateListLinkedResourcesNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(e.GetRawText())), ModelSerializationExtensions.WireOptions, AzureResourceManagerNewRelicObservabilityContext.Default), _newRelicMonitorResourceMonitorsClientDiagnostics, Pipeline, "NewRelicMonitorResource.GetLinkedResources", "value", "nextLink", cancellationToken); } /// - /// 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 + /// 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 /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/monitoredResources + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/listLinkedResources /// /// /// Operation Id - /// Monitors_ListMonitoredResources + /// Monitors_ListLinkedResources /// /// /// Default Api Version @@ -1016,24 +1024,24 @@ public virtual AsyncPageable GetMonitoredResource /// /// /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetMonitoredResources(CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetLinkedResources(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _newRelicMonitorResourceMonitorsRestClient.CreateListMonitoredResourcesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _newRelicMonitorResourceMonitorsRestClient.CreateListMonitoredResourcesNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => NewRelicResourceMonitorResult.DeserializeNewRelicResourceMonitorResult(e), _newRelicMonitorResourceMonitorsClientDiagnostics, Pipeline, "NewRelicMonitorResource.GetMonitoredResources", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _newRelicMonitorResourceMonitorsRestClient.CreateListLinkedResourcesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _newRelicMonitorResourceMonitorsRestClient.CreateListLinkedResourcesNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(e.GetRawText())), ModelSerializationExtensions.WireOptions, AzureResourceManagerNewRelicObservabilityContext.Default), _newRelicMonitorResourceMonitorsClientDiagnostics, Pipeline, "NewRelicMonitorResource.GetLinkedResources", "value", "nextLink", cancellationToken); } /// - /// 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 + /// 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 /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/listLinkedResources + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/monitoredResources /// /// /// Operation Id - /// Monitors_ListLinkedResources + /// Monitors_ListMonitoredResources /// /// /// Default Api Version @@ -1046,24 +1054,24 @@ public virtual Pageable GetMonitoredResources(Can /// /// /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetLinkedResourcesAsync(CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetMonitoredResourcesAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _newRelicMonitorResourceMonitorsRestClient.CreateListLinkedResourcesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _newRelicMonitorResourceMonitorsRestClient.CreateListLinkedResourcesNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(e.GetRawText())), ModelSerializationExtensions.WireOptions, AzureResourceManagerNewRelicObservabilityContext.Default), _newRelicMonitorResourceMonitorsClientDiagnostics, Pipeline, "NewRelicMonitorResource.GetLinkedResources", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _newRelicMonitorResourceMonitorsRestClient.CreateListMonitoredResourcesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _newRelicMonitorResourceMonitorsRestClient.CreateListMonitoredResourcesNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => NewRelicResourceMonitorResult.DeserializeNewRelicResourceMonitorResult(e), _newRelicMonitorResourceMonitorsClientDiagnostics, Pipeline, "NewRelicMonitorResource.GetMonitoredResources", "value", "nextLink", cancellationToken); } /// - /// 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 + /// 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 /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/listLinkedResources + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/monitoredResources /// /// /// Operation Id - /// Monitors_ListLinkedResources + /// Monitors_ListMonitoredResources /// /// /// Default Api Version @@ -1076,24 +1084,24 @@ public virtual AsyncPageable GetLinkedResourcesAsync(CancellationTo /// /// /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetLinkedResources(CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetMonitoredResources(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _newRelicMonitorResourceMonitorsRestClient.CreateListLinkedResourcesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _newRelicMonitorResourceMonitorsRestClient.CreateListLinkedResourcesNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(e.GetRawText())), ModelSerializationExtensions.WireOptions, AzureResourceManagerNewRelicObservabilityContext.Default), _newRelicMonitorResourceMonitorsClientDiagnostics, Pipeline, "NewRelicMonitorResource.GetLinkedResources", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _newRelicMonitorResourceMonitorsRestClient.CreateListMonitoredResourcesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _newRelicMonitorResourceMonitorsRestClient.CreateListMonitoredResourcesNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => NewRelicResourceMonitorResult.DeserializeNewRelicResourceMonitorResult(e), _newRelicMonitorResourceMonitorsClientDiagnostics, Pipeline, "NewRelicMonitorResource.GetMonitoredResources", "value", "nextLink", cancellationToken); } /// - /// 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 + /// Refreshes the ingestion key for all monitors linked to the same account associated to the underlying monitor. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/vmHostPayloads + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/refreshIngestionKey /// /// /// Operation Id - /// Monitors_VmHostPayload + /// Monitors_RefreshIngestionKey /// /// /// Default Api Version @@ -1106,13 +1114,13 @@ public virtual Pageable GetLinkedResources(CancellationToken cancel /// /// /// The cancellation token to use. - public virtual async Task> VmHostPayloadAsync(CancellationToken cancellationToken = default) + public virtual async Task RefreshIngestionKeyAsync(CancellationToken cancellationToken = default) { - using var scope = _newRelicMonitorResourceMonitorsClientDiagnostics.CreateScope("NewRelicMonitorResource.VmHostPayload"); + using var scope = _newRelicMonitorResourceMonitorsClientDiagnostics.CreateScope("NewRelicMonitorResource.RefreshIngestionKey"); scope.Start(); try { - var response = await _newRelicMonitorResourceMonitorsRestClient.VmHostPayloadAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _newRelicMonitorResourceMonitorsRestClient.RefreshIngestionKeyAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); return response; } catch (Exception e) @@ -1123,15 +1131,15 @@ public virtual async Task> VmH } /// - /// 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 + /// Refreshes the ingestion key for all monitors linked to the same account associated to the underlying monitor. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/vmHostPayloads + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/refreshIngestionKey /// /// /// Operation Id - /// Monitors_VmHostPayload + /// Monitors_RefreshIngestionKey /// /// /// Default Api Version @@ -1144,13 +1152,13 @@ public virtual async Task> VmH /// /// /// The cancellation token to use. - public virtual Response VmHostPayload(CancellationToken cancellationToken = default) + public virtual Response RefreshIngestionKey(CancellationToken cancellationToken = default) { - using var scope = _newRelicMonitorResourceMonitorsClientDiagnostics.CreateScope("NewRelicMonitorResource.VmHostPayload"); + using var scope = _newRelicMonitorResourceMonitorsClientDiagnostics.CreateScope("NewRelicMonitorResource.RefreshIngestionKey"); scope.Start(); try { - var response = _newRelicMonitorResourceMonitorsRestClient.VmHostPayload(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var response = _newRelicMonitorResourceMonitorsRestClient.RefreshIngestionKey(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); return response; } catch (Exception e) @@ -1161,15 +1169,15 @@ public virtual Response VmHostPayload(C } /// - /// Returns the latest SaaS linked to the newrelic organization of the underlying monitor. + /// A long-running resource action. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/latestLinkedSaaS + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/resubscribe /// /// /// Operation Id - /// Monitors_LatestLinkedSaaS + /// Monitors_Resubscribe /// /// /// Default Api Version @@ -1181,15 +1189,20 @@ public virtual Response VmHostPayload(C /// /// /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Resubscribe Properties. /// The cancellation token to use. - public virtual async Task> LatestLinkedSaaSAsync(CancellationToken cancellationToken = default) + public virtual async Task> ResubscribeAsync(WaitUntil waitUntil, NewRelicResubscribeProperties body = null, CancellationToken cancellationToken = default) { - using var scope = _newRelicMonitorResourceMonitorsClientDiagnostics.CreateScope("NewRelicMonitorResource.LatestLinkedSaaS"); + using var scope = _newRelicMonitorResourceMonitorsClientDiagnostics.CreateScope("NewRelicMonitorResource.Resubscribe"); scope.Start(); try { - var response = await _newRelicMonitorResourceMonitorsRestClient.LatestLinkedSaaSAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return response; + var response = await _newRelicMonitorResourceMonitorsRestClient.ResubscribeAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body, cancellationToken).ConfigureAwait(false); + var operation = new NewRelicObservabilityArmOperation(new NewRelicMonitorResourceOperationSource(Client), _newRelicMonitorResourceMonitorsClientDiagnostics, Pipeline, _newRelicMonitorResourceMonitorsRestClient.CreateResubscribeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; } catch (Exception e) { @@ -1199,15 +1212,15 @@ public virtual async Task> } /// - /// Returns the latest SaaS linked to the newrelic organization of the underlying monitor. + /// A long-running resource action. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/latestLinkedSaaS + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/resubscribe /// /// /// Operation Id - /// Monitors_LatestLinkedSaaS + /// Monitors_Resubscribe /// /// /// Default Api Version @@ -1219,15 +1232,20 @@ public virtual async Task> /// /// /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Resubscribe Properties. /// The cancellation token to use. - public virtual Response LatestLinkedSaaS(CancellationToken cancellationToken = default) + public virtual ArmOperation Resubscribe(WaitUntil waitUntil, NewRelicResubscribeProperties body = null, CancellationToken cancellationToken = default) { - using var scope = _newRelicMonitorResourceMonitorsClientDiagnostics.CreateScope("NewRelicMonitorResource.LatestLinkedSaaS"); + using var scope = _newRelicMonitorResourceMonitorsClientDiagnostics.CreateScope("NewRelicMonitorResource.Resubscribe"); scope.Start(); try { - var response = _newRelicMonitorResourceMonitorsRestClient.LatestLinkedSaaS(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return response; + var response = _newRelicMonitorResourceMonitorsRestClient.Resubscribe(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body, cancellationToken); + var operation = new NewRelicObservabilityArmOperation(new NewRelicMonitorResourceOperationSource(Client), _newRelicMonitorResourceMonitorsClientDiagnostics, Pipeline, _newRelicMonitorResourceMonitorsRestClient.CreateResubscribeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; } catch (Exception e) { @@ -1237,15 +1255,15 @@ public virtual Response LatestLinke } /// - /// Links a new SaaS to the newrelic organization of the underlying monitor. + /// Switches the billing for the New Relic Monitor resource to be billed by Azure Marketplace /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/linkSaaS + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/switchBilling /// /// /// Operation Id - /// Monitors_LinkSaaS + /// Monitors_SwitchBilling /// /// /// Default Api Version @@ -1257,23 +1275,19 @@ public virtual Response LatestLinke /// /// /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Link SaaS body parameter. + /// The details of the switch billing request. /// The cancellation token to use. /// is null. - public virtual async Task> LinkSaaSAsync(WaitUntil waitUntil, NewRelicObservabilitySaaSContent content, CancellationToken cancellationToken = default) + public virtual async Task> SwitchBillingAsync(NewRelicSwitchBillingContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(content, nameof(content)); - using var scope = _newRelicMonitorResourceMonitorsClientDiagnostics.CreateScope("NewRelicMonitorResource.LinkSaaS"); + using var scope = _newRelicMonitorResourceMonitorsClientDiagnostics.CreateScope("NewRelicMonitorResource.SwitchBilling"); scope.Start(); try { - var response = await _newRelicMonitorResourceMonitorsRestClient.LinkSaaSAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); - var operation = new NewRelicObservabilityArmOperation(new NewRelicMonitorResourceOperationSource(Client), _newRelicMonitorResourceMonitorsClientDiagnostics, Pipeline, _newRelicMonitorResourceMonitorsRestClient.CreateLinkSaaSRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.AzureAsyncOperation); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; + var response = await _newRelicMonitorResourceMonitorsRestClient.SwitchBillingAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new NewRelicMonitorResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -1283,15 +1297,15 @@ public virtual async Task> LinkSaaSAsync(W } /// - /// Links a new SaaS to the newrelic organization of the underlying monitor. + /// Switches the billing for the New Relic Monitor resource to be billed by Azure Marketplace /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/linkSaaS + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/switchBilling /// /// /// Operation Id - /// Monitors_LinkSaaS + /// Monitors_SwitchBilling /// /// /// Default Api Version @@ -1303,23 +1317,19 @@ public virtual async Task> LinkSaaSAsync(W /// /// /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Link SaaS body parameter. + /// The details of the switch billing request. /// The cancellation token to use. /// is null. - public virtual ArmOperation LinkSaaS(WaitUntil waitUntil, NewRelicObservabilitySaaSContent content, CancellationToken cancellationToken = default) + public virtual Response SwitchBilling(NewRelicSwitchBillingContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(content, nameof(content)); - using var scope = _newRelicMonitorResourceMonitorsClientDiagnostics.CreateScope("NewRelicMonitorResource.LinkSaaS"); + using var scope = _newRelicMonitorResourceMonitorsClientDiagnostics.CreateScope("NewRelicMonitorResource.SwitchBilling"); scope.Start(); try { - var response = _newRelicMonitorResourceMonitorsRestClient.LinkSaaS(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); - var operation = new NewRelicObservabilityArmOperation(new NewRelicMonitorResourceOperationSource(Client), _newRelicMonitorResourceMonitorsClientDiagnostics, Pipeline, _newRelicMonitorResourceMonitorsRestClient.CreateLinkSaaSRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.AzureAsyncOperation); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; + var response = _newRelicMonitorResourceMonitorsRestClient.SwitchBilling(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); + return Response.FromValue(new NewRelicMonitorResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -1329,15 +1339,15 @@ public virtual ArmOperation LinkSaaS(WaitUntil waitUnti } /// - /// Resubscribes the New Relic Organization of the underline Monitor Resource to be billed by Azure Marketplace + /// 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 /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/resubscribe + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/vmHostPayloads /// /// /// Operation Id - /// Monitors_Resubscribe + /// Monitors_VmHostPayload /// /// /// Default Api Version @@ -1349,20 +1359,15 @@ public virtual ArmOperation LinkSaaS(WaitUntil waitUnti /// /// /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Resubscribe Properties. /// The cancellation token to use. - public virtual async Task> ResubscribeAsync(WaitUntil waitUntil, ResubscribeProperties body = null, CancellationToken cancellationToken = default) + public virtual async Task> VmHostPayloadAsync(CancellationToken cancellationToken = default) { - using var scope = _newRelicMonitorResourceMonitorsClientDiagnostics.CreateScope("NewRelicMonitorResource.Resubscribe"); + using var scope = _newRelicMonitorResourceMonitorsClientDiagnostics.CreateScope("NewRelicMonitorResource.VmHostPayload"); scope.Start(); try { - var response = await _newRelicMonitorResourceMonitorsRestClient.ResubscribeAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body, cancellationToken).ConfigureAwait(false); - var operation = new NewRelicObservabilityArmOperation(new NewRelicMonitorResourceOperationSource(Client), _newRelicMonitorResourceMonitorsClientDiagnostics, Pipeline, _newRelicMonitorResourceMonitorsRestClient.CreateResubscribeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body).Request, response, OperationFinalStateVia.AzureAsyncOperation); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; + var response = await _newRelicMonitorResourceMonitorsRestClient.VmHostPayloadAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return response; } catch (Exception e) { @@ -1372,15 +1377,15 @@ public virtual async Task> ResubscribeAsyn } /// - /// Resubscribes the New Relic Organization of the underline Monitor Resource to be billed by Azure Marketplace + /// 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 /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/resubscribe + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/vmHostPayloads /// /// /// Operation Id - /// Monitors_Resubscribe + /// Monitors_VmHostPayload /// /// /// Default Api Version @@ -1392,20 +1397,15 @@ public virtual async Task> ResubscribeAsyn /// /// /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Resubscribe Properties. /// The cancellation token to use. - public virtual ArmOperation Resubscribe(WaitUntil waitUntil, ResubscribeProperties body = null, CancellationToken cancellationToken = default) + public virtual Response VmHostPayload(CancellationToken cancellationToken = default) { - using var scope = _newRelicMonitorResourceMonitorsClientDiagnostics.CreateScope("NewRelicMonitorResource.Resubscribe"); + using var scope = _newRelicMonitorResourceMonitorsClientDiagnostics.CreateScope("NewRelicMonitorResource.VmHostPayload"); scope.Start(); try { - var response = _newRelicMonitorResourceMonitorsRestClient.Resubscribe(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body, cancellationToken); - var operation = new NewRelicObservabilityArmOperation(new NewRelicMonitorResourceOperationSource(Client), _newRelicMonitorResourceMonitorsClientDiagnostics, Pipeline, _newRelicMonitorResourceMonitorsRestClient.CreateResubscribeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body).Request, response, OperationFinalStateVia.AzureAsyncOperation); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; + var response = _newRelicMonitorResourceMonitorsRestClient.VmHostPayload(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return response; } catch (Exception e) { @@ -1415,7 +1415,7 @@ public virtual ArmOperation Resubscribe(WaitUntil waitU } /// - /// Retrieves marketplace and organization information mapped to the given New Relic monitor resource + /// A synchronous resource action. /// /// /// Request Path @@ -1449,7 +1449,7 @@ public virtual async Task> GetBillingInfoAsy } /// - /// Retrieves marketplace and organization information mapped to the given New Relic monitor resource + /// A synchronous resource action. /// /// /// Request Path @@ -1483,7 +1483,7 @@ public virtual Response GetBillingInfo(CancellationTo } /// - /// List of all active deployments that are associated with the marketplace subscription linked to the given monitor. + /// A synchronous resource action. /// /// /// Request Path @@ -1510,7 +1510,7 @@ public virtual AsyncPageable GetConnectedP } /// - /// List of all active deployments that are associated with the marketplace subscription linked to the given monitor. + /// A synchronous resource action. /// /// /// Request Path diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicMonitorResourceData.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicMonitorResourceData.Serialization.cs index 251cc9d08226..e921479ed735 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicMonitorResourceData.Serialization.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicMonitorResourceData.Serialization.cs @@ -42,7 +42,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); - ((IJsonModel)Identity).Write(writer, options); + ((IJsonModel)Identity).Write(writer, ModelSerializationExtensions.WireV3Options); } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); @@ -170,7 +170,7 @@ internal static NewRelicMonitorResourceData DeserializeNewRelicMonitorResourceDa { continue; } - identity = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), options, AzureResourceManagerNewRelicObservabilityContext.Default); + identity = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), ModelSerializationExtensions.WireV3Options, AzureResourceManagerNewRelicObservabilityContext.Default); continue; } if (property.NameEquals("tags"u8)) diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicMonitorResourceData.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicMonitorResourceData.cs index 1b756384c8e0..4165a9fbf0db 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicMonitorResourceData.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicMonitorResourceData.cs @@ -133,7 +133,7 @@ internal NewRelicMonitorResourceData() internal NewRelicObservabilitySaaSContent SaaSData { get; set; } /// SaaS resource id. [WirePath("properties.saaSData.saaSResourceId")] - public string SaaSResourceId + public ResourceIdentifier SaaSResourceId { get => SaaSData is null ? default : SaaSData.SaaSResourceId; set diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicMonitoredSubscriptionCollection.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicMonitoredSubscriptionCollection.cs index 6ac1316aa184..59ca832a99a0 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicMonitoredSubscriptionCollection.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicMonitoredSubscriptionCollection.cs @@ -53,7 +53,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) } /// - /// Add subscriptions to be monitored by the New Relic monitor resource, enabling observability and monitoring. + /// Create a MonitoredSubscriptionProperties /// /// /// Request Path @@ -100,7 +100,7 @@ public virtual async Task> C } /// - /// Add subscriptions to be monitored by the New Relic monitor resource, enabling observability and monitoring. + /// Create a MonitoredSubscriptionProperties /// /// /// Request Path @@ -147,7 +147,7 @@ public virtual ArmOperation CreateOrUpdat } /// - /// Lists all the subscriptions currently being monitored by the NewRelic monitor resource. + /// Get a MonitoredSubscriptionProperties /// /// /// Request Path @@ -188,7 +188,7 @@ public virtual async Task> GetAs } /// - /// Lists all the subscriptions currently being monitored by the NewRelic monitor resource. + /// Get a MonitoredSubscriptionProperties /// /// /// Request Path @@ -229,7 +229,7 @@ public virtual Response Get(MonitoredSubs } /// - /// Lists all the subscriptions currently being monitored by the NewRelic monitor resource. + /// List MonitoredSubscriptionProperties resources by NewRelicMonitorResource /// /// /// Request Path @@ -259,7 +259,7 @@ public virtual AsyncPageable GetAllAsync( } /// - /// Lists all the subscriptions currently being monitored by the NewRelic monitor resource. + /// List MonitoredSubscriptionProperties resources by NewRelicMonitorResource /// /// /// Request Path diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicMonitoredSubscriptionResource.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicMonitoredSubscriptionResource.cs index 67f2eac7fd6c..9e9ca0a8bdc9 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicMonitoredSubscriptionResource.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicMonitoredSubscriptionResource.cs @@ -90,7 +90,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) } /// - /// Lists all the subscriptions currently being monitored by the NewRelic monitor resource. + /// Get a MonitoredSubscriptionProperties /// /// /// Request Path @@ -130,7 +130,7 @@ public virtual async Task> GetAs } /// - /// Lists all the subscriptions currently being monitored by the NewRelic monitor resource. + /// Get a MonitoredSubscriptionProperties /// /// /// Request Path @@ -170,7 +170,7 @@ public virtual Response Get(CancellationT } /// - /// Delete subscriptions being monitored by the New Relic monitor resource, removing their observability and monitoring capabilities + /// Delete a MonitoredSubscriptionProperties /// /// /// Request Path @@ -212,7 +212,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell } /// - /// Delete subscriptions being monitored by the New Relic monitor resource, removing their observability and monitoring capabilities + /// Delete a MonitoredSubscriptionProperties /// /// /// Request Path @@ -254,7 +254,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel } /// - /// Update subscriptions to be monitored by the New Relic monitor resource, ensuring optimal observability and performance + /// Update a MonitoredSubscriptionProperties /// /// /// Request Path @@ -300,7 +300,7 @@ public virtual async Task> U } /// - /// Update subscriptions to be monitored by the New Relic monitor resource, ensuring optimal observability and performance + /// Update a MonitoredSubscriptionProperties /// /// /// Request Path diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/RestOperations/BillingInfoRestOperations.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/RestOperations/BillingInfoRestOperations.cs index 8d0c38e8fcff..ced01fab45fc 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/RestOperations/BillingInfoRestOperations.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/RestOperations/BillingInfoRestOperations.cs @@ -72,7 +72,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou return message; } - /// Retrieves marketplace and organization information mapped to the given New Relic monitor resource. + /// A synchronous resource action. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Name of the Monitors resource. @@ -101,7 +101,7 @@ public async Task> GetAsync(string subscript } } - /// Retrieves marketplace and organization information mapped to the given New Relic monitor resource. + /// A synchronous resource action. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Name of the Monitors resource. diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/RestOperations/ConnectedPartnerResourcesRestOperations.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/RestOperations/ConnectedPartnerResourcesRestOperations.cs index 834ee8cada8f..d6f78e178c8d 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/RestOperations/ConnectedPartnerResourcesRestOperations.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/RestOperations/ConnectedPartnerResourcesRestOperations.cs @@ -79,7 +79,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro return message; } - /// List of all active deployments that are associated with the marketplace subscription linked to the given monitor. + /// A synchronous resource action. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Name of the Monitors resource. @@ -109,7 +109,7 @@ public async Task> ListAsync(str } } - /// List of all active deployments that are associated with the marketplace subscription linked to the given monitor. + /// A synchronous resource action. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Name of the Monitors resource. @@ -161,7 +161,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript return message; } - /// List of all active deployments that are associated with the marketplace subscription linked to the given monitor. + /// A synchronous resource action. /// The URL to the next page of results. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. @@ -193,7 +193,7 @@ public async Task> ListNextPageA } } - /// List of all active deployments that are associated with the marketplace subscription linked to the given monitor. + /// A synchronous resource action. /// The URL to the next page of results. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/RestOperations/MonitoredSubscriptionsRestOperations.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/RestOperations/MonitoredSubscriptionsRestOperations.cs index 923a9b780206..8da5dc704550 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/RestOperations/MonitoredSubscriptionsRestOperations.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/RestOperations/MonitoredSubscriptionsRestOperations.cs @@ -72,7 +72,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro return message; } - /// Lists all the subscriptions currently being monitored by the NewRelic monitor resource. + /// List MonitoredSubscriptionProperties resources by NewRelicMonitorResource. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Name of the Monitors resource. @@ -101,7 +101,7 @@ public async Task> ListAsync(strin } } - /// Lists all the subscriptions currently being monitored by the NewRelic monitor resource. + /// List MonitoredSubscriptionProperties resources by NewRelicMonitorResource. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Name of the Monitors resource. @@ -168,7 +168,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou return message; } - /// Lists all the subscriptions currently being monitored by the NewRelic monitor resource. + /// Get a MonitoredSubscriptionProperties. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Name of the Monitors resource. @@ -200,7 +200,7 @@ public async Task> GetAsync(string s } } - /// Lists all the subscriptions currently being monitored by the NewRelic monitor resource. + /// Get a MonitoredSubscriptionProperties. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Name of the Monitors resource. @@ -274,7 +274,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r return message; } - /// Add subscriptions to be monitored by the New Relic monitor resource, enabling observability and monitoring. + /// Create a MonitoredSubscriptionProperties. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Name of the Monitors resource. @@ -302,7 +302,7 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re } } - /// Add subscriptions to be monitored by the New Relic monitor resource, enabling observability and monitoring. + /// Create a MonitoredSubscriptionProperties. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Name of the Monitors resource. @@ -372,7 +372,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG return message; } - /// Update subscriptions to be monitored by the New Relic monitor resource, ensuring optimal observability and performance. + /// Update a MonitoredSubscriptionProperties. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Name of the Monitors resource. @@ -400,7 +400,7 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr } } - /// Update subscriptions to be monitored by the New Relic monitor resource, ensuring optimal observability and performance. + /// Update a MonitoredSubscriptionProperties. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Name of the Monitors resource. @@ -466,7 +466,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG return message; } - /// Delete subscriptions being monitored by the New Relic monitor resource, removing their observability and monitoring capabilities. + /// Delete a MonitoredSubscriptionProperties. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Name of the Monitors resource. @@ -492,7 +492,7 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } } - /// Delete subscriptions being monitored by the New Relic monitor resource, removing their observability and monitoring capabilities. + /// Delete a MonitoredSubscriptionProperties. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Name of the Monitors resource. @@ -540,7 +540,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript return message; } - /// Lists all the subscriptions currently being monitored by the NewRelic monitor resource. + /// List MonitoredSubscriptionProperties resources by NewRelicMonitorResource. /// The URL to the next page of results. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. @@ -571,7 +571,7 @@ public async Task> ListNextPageAsy } } - /// Lists all the subscriptions currently being monitored by the NewRelic monitor resource. + /// List MonitoredSubscriptionProperties resources by NewRelicMonitorResource. /// The URL to the next page of results. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/RestOperations/MonitorsRestOperations.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/RestOperations/MonitorsRestOperations.cs index eff674f7d28e..89ff58560738 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/RestOperations/MonitorsRestOperations.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/RestOperations/MonitorsRestOperations.cs @@ -776,7 +776,7 @@ public Response GetMetricStatus(string subscription } } - internal RequestUriBuilder CreateListAppServicesRequestUri(string subscriptionId, string resourceGroupName, string monitorName, NewRelicAppServicesGetContent content) + internal RequestUriBuilder CreateLatestLinkedSaaSRequestUri(string subscriptionId, string resourceGroupName, string monitorName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -786,12 +786,12 @@ internal RequestUriBuilder CreateListAppServicesRequestUri(string subscriptionId uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/NewRelic.Observability/monitors/", false); uri.AppendPath(monitorName, true); - uri.AppendPath("/listAppServices", false); + uri.AppendPath("/latestLinkedSaaS", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListAppServicesRequest(string subscriptionId, string resourceGroupName, string monitorName, NewRelicAppServicesGetContent content) + internal HttpMessage CreateLatestLinkedSaaSRequest(string subscriptionId, string resourceGroupName, string monitorName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -804,42 +804,36 @@ internal HttpMessage CreateListAppServicesRequest(string subscriptionId, string uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/NewRelic.Observability/monitors/", false); uri.AppendPath(monitorName, true); - uri.AppendPath("/listAppServices", false); + uri.AppendPath("/latestLinkedSaaS", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content0 = new Utf8JsonRequestContent(); - content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); - request.Content = content0; _userAgent.Apply(message); return message; } - /// Lists the app service resources currently being monitored by the New Relic resource, helping you understand which app services are under monitoring. + /// Returns the latest SaaS linked to the newrelic organization of the underlying monitor. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Name of the Monitors resource. - /// The details of the app services get request. /// The cancellation token to use. - /// , , or is null. + /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListAppServicesAsync(string subscriptionId, string resourceGroupName, string monitorName, NewRelicAppServicesGetContent content, CancellationToken cancellationToken = default) + public async Task> LatestLinkedSaaSAsync(string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); - Argument.AssertNotNull(content, nameof(content)); - using var message = CreateListAppServicesRequest(subscriptionId, resourceGroupName, monitorName, content); + using var message = CreateLatestLinkedSaaSRequest(subscriptionId, resourceGroupName, monitorName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - NewRelicAppServicesListResult value = default; + NewRelicObservabilityLatestLinkedSaaSResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = NewRelicAppServicesListResult.DeserializeNewRelicAppServicesListResult(document.RootElement); + value = NewRelicObservabilityLatestLinkedSaaSResult.DeserializeNewRelicObservabilityLatestLinkedSaaSResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -847,30 +841,28 @@ public async Task> ListAppServicesAsync( } } - /// Lists the app service resources currently being monitored by the New Relic resource, helping you understand which app services are under monitoring. + /// Returns the latest SaaS linked to the newrelic organization of the underlying monitor. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Name of the Monitors resource. - /// The details of the app services get request. /// The cancellation token to use. - /// , , or is null. + /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListAppServices(string subscriptionId, string resourceGroupName, string monitorName, NewRelicAppServicesGetContent content, CancellationToken cancellationToken = default) + public Response LatestLinkedSaaS(string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); - Argument.AssertNotNull(content, nameof(content)); - using var message = CreateListAppServicesRequest(subscriptionId, resourceGroupName, monitorName, content); + using var message = CreateLatestLinkedSaaSRequest(subscriptionId, resourceGroupName, monitorName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - NewRelicAppServicesListResult value = default; + NewRelicObservabilityLatestLinkedSaaSResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = NewRelicAppServicesListResult.DeserializeNewRelicAppServicesListResult(document.RootElement); + value = NewRelicObservabilityLatestLinkedSaaSResult.DeserializeNewRelicObservabilityLatestLinkedSaaSResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -878,7 +870,7 @@ public Response ListAppServices(string subscripti } } - internal RequestUriBuilder CreateSwitchBillingRequestUri(string subscriptionId, string resourceGroupName, string monitorName, NewRelicSwitchBillingContent content) + internal RequestUriBuilder CreateLinkSaaSRequestUri(string subscriptionId, string resourceGroupName, string monitorName, NewRelicObservabilitySaaSContent content) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -888,12 +880,12 @@ internal RequestUriBuilder CreateSwitchBillingRequestUri(string subscriptionId, uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/NewRelic.Observability/monitors/", false); uri.AppendPath(monitorName, true); - uri.AppendPath("/switchBilling", false); + uri.AppendPath("/linkSaaS", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateSwitchBillingRequest(string subscriptionId, string resourceGroupName, string monitorName, NewRelicSwitchBillingContent content) + internal HttpMessage CreateLinkSaaSRequest(string subscriptionId, string resourceGroupName, string monitorName, NewRelicObservabilitySaaSContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -906,7 +898,7 @@ internal HttpMessage CreateSwitchBillingRequest(string subscriptionId, string re uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/NewRelic.Observability/monitors/", false); uri.AppendPath(monitorName, true); - uri.AppendPath("/switchBilling", false); + uri.AppendPath("/linkSaaS", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -918,75 +910,61 @@ internal HttpMessage CreateSwitchBillingRequest(string subscriptionId, string re return message; } - /// Switches the billing for the New Relic Monitor resource to be billed by Azure Marketplace. + /// Links a new SaaS to the newrelic organization of the underlying monitor. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Name of the Monitors resource. - /// The details of the switch billing request. + /// Link SaaS body parameter. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> SwitchBillingAsync(string subscriptionId, string resourceGroupName, string monitorName, NewRelicSwitchBillingContent content, CancellationToken cancellationToken = default) + public async Task LinkSaaSAsync(string subscriptionId, string resourceGroupName, string monitorName, NewRelicObservabilitySaaSContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); Argument.AssertNotNull(content, nameof(content)); - using var message = CreateSwitchBillingRequest(subscriptionId, resourceGroupName, monitorName, content); + using var message = CreateLinkSaaSRequest(subscriptionId, resourceGroupName, monitorName, content); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - { - NewRelicMonitorResourceData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = NewRelicMonitorResourceData.DeserializeNewRelicMonitorResourceData(document.RootElement); - return Response.FromValue(value, message.Response); - } case 202: - case 204: - return Response.FromValue((NewRelicMonitorResourceData)null, message.Response); + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Switches the billing for the New Relic Monitor resource to be billed by Azure Marketplace. + /// Links a new SaaS to the newrelic organization of the underlying monitor. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Name of the Monitors resource. - /// The details of the switch billing request. + /// Link SaaS body parameter. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response SwitchBilling(string subscriptionId, string resourceGroupName, string monitorName, NewRelicSwitchBillingContent content, CancellationToken cancellationToken = default) + public Response LinkSaaS(string subscriptionId, string resourceGroupName, string monitorName, NewRelicObservabilitySaaSContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); Argument.AssertNotNull(content, nameof(content)); - using var message = CreateSwitchBillingRequest(subscriptionId, resourceGroupName, monitorName, content); + using var message = CreateLinkSaaSRequest(subscriptionId, resourceGroupName, monitorName, content); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - { - NewRelicMonitorResourceData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = NewRelicMonitorResourceData.DeserializeNewRelicMonitorResourceData(document.RootElement); - return Response.FromValue(value, message.Response); - } case 202: - case 204: - return Response.FromValue((NewRelicMonitorResourceData)null, message.Response); + return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateListHostsRequestUri(string subscriptionId, string resourceGroupName, string monitorName, NewRelicHostsGetContent content) + internal RequestUriBuilder CreateListAppServicesRequestUri(string subscriptionId, string resourceGroupName, string monitorName, NewRelicAppServicesGetContent content) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -996,12 +974,12 @@ internal RequestUriBuilder CreateListHostsRequestUri(string subscriptionId, stri uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/NewRelic.Observability/monitors/", false); uri.AppendPath(monitorName, true); - uri.AppendPath("/listHosts", false); + uri.AppendPath("/listAppServices", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListHostsRequest(string subscriptionId, string resourceGroupName, string monitorName, NewRelicHostsGetContent content) + internal HttpMessage CreateListAppServicesRequest(string subscriptionId, string resourceGroupName, string monitorName, NewRelicAppServicesGetContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -1014,7 +992,7 @@ internal HttpMessage CreateListHostsRequest(string subscriptionId, string resour uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/NewRelic.Observability/monitors/", false); uri.AppendPath(monitorName, true); - uri.AppendPath("/listHosts", false); + uri.AppendPath("/listAppServices", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -1026,30 +1004,30 @@ internal HttpMessage CreateListHostsRequest(string subscriptionId, string resour return message; } - /// Lists all VM resources currently being monitored by the New Relic monitor resource, helping you manage observability. + /// Lists the app service resources currently being monitored by the New Relic resource, helping you understand which app services are under monitoring. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Name of the Monitors resource. - /// The details of the Hosts get request. + /// The details of the app services get request. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListHostsAsync(string subscriptionId, string resourceGroupName, string monitorName, NewRelicHostsGetContent content, CancellationToken cancellationToken = default) + public async Task> ListAppServicesAsync(string subscriptionId, string resourceGroupName, string monitorName, NewRelicAppServicesGetContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); Argument.AssertNotNull(content, nameof(content)); - using var message = CreateListHostsRequest(subscriptionId, resourceGroupName, monitorName, content); + using var message = CreateListAppServicesRequest(subscriptionId, resourceGroupName, monitorName, content); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - NewRelicObservabilityVmHostsListResponse value = default; + NewRelicAppServicesListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = NewRelicObservabilityVmHostsListResponse.DeserializeNewRelicObservabilityVmHostsListResponse(document.RootElement); + value = NewRelicAppServicesListResult.DeserializeNewRelicAppServicesListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -1057,30 +1035,30 @@ public async Task> ListHostsA } } - /// Lists all VM resources currently being monitored by the New Relic monitor resource, helping you manage observability. + /// Lists the app service resources currently being monitored by the New Relic resource, helping you understand which app services are under monitoring. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Name of the Monitors resource. - /// The details of the Hosts get request. + /// The details of the app services get request. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListHosts(string subscriptionId, string resourceGroupName, string monitorName, NewRelicHostsGetContent content, CancellationToken cancellationToken = default) + public Response ListAppServices(string subscriptionId, string resourceGroupName, string monitorName, NewRelicAppServicesGetContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); Argument.AssertNotNull(content, nameof(content)); - using var message = CreateListHostsRequest(subscriptionId, resourceGroupName, monitorName, content); + using var message = CreateListAppServicesRequest(subscriptionId, resourceGroupName, monitorName, content); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - NewRelicObservabilityVmHostsListResponse value = default; + NewRelicAppServicesListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = NewRelicObservabilityVmHostsListResponse.DeserializeNewRelicObservabilityVmHostsListResponse(document.RootElement); + value = NewRelicAppServicesListResult.DeserializeNewRelicAppServicesListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -1088,7 +1066,7 @@ public Response ListHosts(string subsc } } - internal RequestUriBuilder CreateRefreshIngestionKeyRequestUri(string subscriptionId, string resourceGroupName, string monitorName) + internal RequestUriBuilder CreateListHostsRequestUri(string subscriptionId, string resourceGroupName, string monitorName, NewRelicHostsGetContent content) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -1098,12 +1076,12 @@ internal RequestUriBuilder CreateRefreshIngestionKeyRequestUri(string subscripti uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/NewRelic.Observability/monitors/", false); uri.AppendPath(monitorName, true); - uri.AppendPath("/refreshIngestionKey", false); + uri.AppendPath("/listHosts", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateRefreshIngestionKeyRequest(string subscriptionId, string resourceGroupName, string monitorName) + internal HttpMessage CreateListHostsRequest(string subscriptionId, string resourceGroupName, string monitorName, NewRelicHostsGetContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -1116,63 +1094,81 @@ internal HttpMessage CreateRefreshIngestionKeyRequest(string subscriptionId, str uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/NewRelic.Observability/monitors/", false); uri.AppendPath(monitorName, true); - uri.AppendPath("/refreshIngestionKey", false); + uri.AppendPath("/listHosts", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; _userAgent.Apply(message); return message; } - /// Refreshes the ingestion key for all monitors linked to the same account associated to the underlying monitor. + /// Lists all VM resources currently being monitored by the New Relic monitor resource, helping you manage observability. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Name of the Monitors resource. + /// The details of the Hosts get request. /// The cancellation token to use. - /// , or is null. + /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task RefreshIngestionKeyAsync(string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) + public async Task> ListHostsAsync(string subscriptionId, string resourceGroupName, string monitorName, NewRelicHostsGetContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateRefreshIngestionKeyRequest(subscriptionId, resourceGroupName, monitorName); + using var message = CreateListHostsRequest(subscriptionId, resourceGroupName, monitorName, content); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 204: - return message.Response; + case 200: + { + NewRelicObservabilityVmHostsListResponse value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = NewRelicObservabilityVmHostsListResponse.DeserializeNewRelicObservabilityVmHostsListResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// Refreshes the ingestion key for all monitors linked to the same account associated to the underlying monitor. + /// Lists all VM resources currently being monitored by the New Relic monitor resource, helping you manage observability. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Name of the Monitors resource. + /// The details of the Hosts get request. /// The cancellation token to use. - /// , or is null. + /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response RefreshIngestionKey(string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) + public Response ListHosts(string subscriptionId, string resourceGroupName, string monitorName, NewRelicHostsGetContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateRefreshIngestionKeyRequest(subscriptionId, resourceGroupName, monitorName); + using var message = CreateListHostsRequest(subscriptionId, resourceGroupName, monitorName, content); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 204: - return message.Response; + case 200: + { + NewRelicObservabilityVmHostsListResponse value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = NewRelicObservabilityVmHostsListResponse.DeserializeNewRelicObservabilityVmHostsListResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateListMonitoredResourcesRequestUri(string subscriptionId, string resourceGroupName, string monitorName) + internal RequestUriBuilder CreateListLinkedResourcesRequestUri(string subscriptionId, string resourceGroupName, string monitorName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -1182,12 +1178,12 @@ internal RequestUriBuilder CreateListMonitoredResourcesRequestUri(string subscri uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/NewRelic.Observability/monitors/", false); uri.AppendPath(monitorName, true); - uri.AppendPath("/monitoredResources", false); + uri.AppendPath("/listLinkedResources", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListMonitoredResourcesRequest(string subscriptionId, string resourceGroupName, string monitorName) + internal HttpMessage CreateListLinkedResourcesRequest(string subscriptionId, string resourceGroupName, string monitorName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -1200,7 +1196,7 @@ internal HttpMessage CreateListMonitoredResourcesRequest(string subscriptionId, uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/NewRelic.Observability/monitors/", false); uri.AppendPath(monitorName, true); - uri.AppendPath("/monitoredResources", false); + uri.AppendPath("/listLinkedResources", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -1208,28 +1204,28 @@ internal HttpMessage CreateListMonitoredResourcesRequest(string subscriptionId, return message; } - /// 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. + /// 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. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Name of the Monitors resource. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListMonitoredResourcesAsync(string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) + public async Task> ListLinkedResourcesAsync(string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); - using var message = CreateListMonitoredResourcesRequest(subscriptionId, resourceGroupName, monitorName); + using var message = CreateListLinkedResourcesRequest(subscriptionId, resourceGroupName, monitorName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - NewRelicMonitoredResourceListResult value = default; + LinkedResourceListResponse value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = NewRelicMonitoredResourceListResult.DeserializeNewRelicMonitoredResourceListResult(document.RootElement); + value = LinkedResourceListResponse.DeserializeLinkedResourceListResponse(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -1237,28 +1233,28 @@ public async Task> ListMonitoredRe } } - /// 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. + /// 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. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Name of the Monitors resource. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListMonitoredResources(string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) + public Response ListLinkedResources(string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); - using var message = CreateListMonitoredResourcesRequest(subscriptionId, resourceGroupName, monitorName); + using var message = CreateListLinkedResourcesRequest(subscriptionId, resourceGroupName, monitorName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - NewRelicMonitoredResourceListResult value = default; + LinkedResourceListResponse value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = NewRelicMonitoredResourceListResult.DeserializeNewRelicMonitoredResourceListResult(document.RootElement); + value = LinkedResourceListResponse.DeserializeLinkedResourceListResponse(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -1266,7 +1262,7 @@ public Response ListMonitoredResources(stri } } - internal RequestUriBuilder CreateListLinkedResourcesRequestUri(string subscriptionId, string resourceGroupName, string monitorName) + internal RequestUriBuilder CreateListMonitoredResourcesRequestUri(string subscriptionId, string resourceGroupName, string monitorName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -1276,12 +1272,12 @@ internal RequestUriBuilder CreateListLinkedResourcesRequestUri(string subscripti uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/NewRelic.Observability/monitors/", false); uri.AppendPath(monitorName, true); - uri.AppendPath("/listLinkedResources", false); + uri.AppendPath("/monitoredResources", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListLinkedResourcesRequest(string subscriptionId, string resourceGroupName, string monitorName) + internal HttpMessage CreateListMonitoredResourcesRequest(string subscriptionId, string resourceGroupName, string monitorName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -1294,7 +1290,7 @@ internal HttpMessage CreateListLinkedResourcesRequest(string subscriptionId, str uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/NewRelic.Observability/monitors/", false); uri.AppendPath(monitorName, true); - uri.AppendPath("/listLinkedResources", false); + uri.AppendPath("/monitoredResources", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -1302,28 +1298,28 @@ internal HttpMessage CreateListLinkedResourcesRequest(string subscriptionId, str return message; } - /// 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. + /// 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. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Name of the Monitors resource. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListLinkedResourcesAsync(string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) + public async Task> ListMonitoredResourcesAsync(string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); - using var message = CreateListLinkedResourcesRequest(subscriptionId, resourceGroupName, monitorName); + using var message = CreateListMonitoredResourcesRequest(subscriptionId, resourceGroupName, monitorName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - LinkedResourceListResponse value = default; + NewRelicMonitoredResourceListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = LinkedResourceListResponse.DeserializeLinkedResourceListResponse(document.RootElement); + value = NewRelicMonitoredResourceListResult.DeserializeNewRelicMonitoredResourceListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -1331,28 +1327,28 @@ public async Task> ListLinkedResourcesAsync } } - /// 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. + /// 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. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Name of the Monitors resource. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListLinkedResources(string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) + public Response ListMonitoredResources(string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); - using var message = CreateListLinkedResourcesRequest(subscriptionId, resourceGroupName, monitorName); + using var message = CreateListMonitoredResourcesRequest(subscriptionId, resourceGroupName, monitorName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - LinkedResourceListResponse value = default; + NewRelicMonitoredResourceListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = LinkedResourceListResponse.DeserializeLinkedResourceListResponse(document.RootElement); + value = NewRelicMonitoredResourceListResult.DeserializeNewRelicMonitoredResourceListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -1360,7 +1356,7 @@ public Response ListLinkedResources(string subscript } } - internal RequestUriBuilder CreateVmHostPayloadRequestUri(string subscriptionId, string resourceGroupName, string monitorName) + internal RequestUriBuilder CreateRefreshIngestionKeyRequestUri(string subscriptionId, string resourceGroupName, string monitorName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -1370,12 +1366,12 @@ internal RequestUriBuilder CreateVmHostPayloadRequestUri(string subscriptionId, uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/NewRelic.Observability/monitors/", false); uri.AppendPath(monitorName, true); - uri.AppendPath("/vmHostPayloads", false); + uri.AppendPath("/refreshIngestionKey", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateVmHostPayloadRequest(string subscriptionId, string resourceGroupName, string monitorName) + internal HttpMessage CreateRefreshIngestionKeyRequest(string subscriptionId, string resourceGroupName, string monitorName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -1388,7 +1384,7 @@ internal HttpMessage CreateVmHostPayloadRequest(string subscriptionId, string re uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/NewRelic.Observability/monitors/", false); uri.AppendPath(monitorName, true); - uri.AppendPath("/vmHostPayloads", false); + uri.AppendPath("/refreshIngestionKey", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -1396,65 +1392,55 @@ internal HttpMessage CreateVmHostPayloadRequest(string subscriptionId, string re return message; } - /// 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. + /// Refreshes the ingestion key for all monitors linked to the same account associated to the underlying monitor. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Name of the Monitors resource. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> VmHostPayloadAsync(string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) + public async Task RefreshIngestionKeyAsync(string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); - using var message = CreateVmHostPayloadRequest(subscriptionId, resourceGroupName, monitorName); + using var message = CreateRefreshIngestionKeyRequest(subscriptionId, resourceGroupName, monitorName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: - { - NewRelicObservabilityVmExtensionPayload value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = NewRelicObservabilityVmExtensionPayload.DeserializeNewRelicObservabilityVmExtensionPayload(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 204: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// 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. + /// Refreshes the ingestion key for all monitors linked to the same account associated to the underlying monitor. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Name of the Monitors resource. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response VmHostPayload(string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) + public Response RefreshIngestionKey(string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); - using var message = CreateVmHostPayloadRequest(subscriptionId, resourceGroupName, monitorName); + using var message = CreateRefreshIngestionKeyRequest(subscriptionId, resourceGroupName, monitorName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: - { - NewRelicObservabilityVmExtensionPayload value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = NewRelicObservabilityVmExtensionPayload.DeserializeNewRelicObservabilityVmExtensionPayload(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 204: + return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateLatestLinkedSaaSRequestUri(string subscriptionId, string resourceGroupName, string monitorName) + internal RequestUriBuilder CreateResubscribeRequestUri(string subscriptionId, string resourceGroupName, string monitorName, NewRelicResubscribeProperties body) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -1464,12 +1450,12 @@ internal RequestUriBuilder CreateLatestLinkedSaaSRequestUri(string subscriptionI uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/NewRelic.Observability/monitors/", false); uri.AppendPath(monitorName, true); - uri.AppendPath("/latestLinkedSaaS", false); + uri.AppendPath("/resubscribe", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateLatestLinkedSaaSRequest(string subscriptionId, string resourceGroupName, string monitorName) + internal HttpMessage CreateResubscribeRequest(string subscriptionId, string resourceGroupName, string monitorName, NewRelicResubscribeProperties body) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -1482,73 +1468,74 @@ internal HttpMessage CreateLatestLinkedSaaSRequest(string subscriptionId, string uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/NewRelic.Observability/monitors/", false); uri.AppendPath(monitorName, true); - uri.AppendPath("/latestLinkedSaaS", false); + uri.AppendPath("/resubscribe", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); + if (body != null) + { + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(body, ModelSerializationExtensions.WireOptions); + request.Content = content; + } _userAgent.Apply(message); return message; } - /// Returns the latest SaaS linked to the newrelic organization of the underlying monitor. + /// A long-running resource action. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// Monitor resource name. + /// Name of the Monitors resource. + /// Resubscribe Properties. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> LatestLinkedSaaSAsync(string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) + public async Task ResubscribeAsync(string subscriptionId, string resourceGroupName, string monitorName, NewRelicResubscribeProperties body = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); - using var message = CreateLatestLinkedSaaSRequest(subscriptionId, resourceGroupName, monitorName); + using var message = CreateResubscribeRequest(subscriptionId, resourceGroupName, monitorName, body); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - { - NewRelicObservabilityLatestLinkedSaaSResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = NewRelicObservabilityLatestLinkedSaaSResult.DeserializeNewRelicObservabilityLatestLinkedSaaSResult(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Returns the latest SaaS linked to the newrelic organization of the underlying monitor. + /// A long-running resource action. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// Monitor resource name. + /// Name of the Monitors resource. + /// Resubscribe Properties. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response LatestLinkedSaaS(string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) + public Response Resubscribe(string subscriptionId, string resourceGroupName, string monitorName, NewRelicResubscribeProperties body = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); - using var message = CreateLatestLinkedSaaSRequest(subscriptionId, resourceGroupName, monitorName); + using var message = CreateResubscribeRequest(subscriptionId, resourceGroupName, monitorName, body); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - { - NewRelicObservabilityLatestLinkedSaaSResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = NewRelicObservabilityLatestLinkedSaaSResult.DeserializeNewRelicObservabilityLatestLinkedSaaSResult(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateLinkSaaSRequestUri(string subscriptionId, string resourceGroupName, string monitorName, NewRelicObservabilitySaaSContent content) + internal RequestUriBuilder CreateSwitchBillingRequestUri(string subscriptionId, string resourceGroupName, string monitorName, NewRelicSwitchBillingContent content) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -1558,12 +1545,12 @@ internal RequestUriBuilder CreateLinkSaaSRequestUri(string subscriptionId, strin uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/NewRelic.Observability/monitors/", false); uri.AppendPath(monitorName, true); - uri.AppendPath("/linkSaaS", false); + uri.AppendPath("/switchBilling", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateLinkSaaSRequest(string subscriptionId, string resourceGroupName, string monitorName, NewRelicObservabilitySaaSContent content) + internal HttpMessage CreateSwitchBillingRequest(string subscriptionId, string resourceGroupName, string monitorName, NewRelicSwitchBillingContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -1576,7 +1563,7 @@ internal HttpMessage CreateLinkSaaSRequest(string subscriptionId, string resourc uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/NewRelic.Observability/monitors/", false); uri.AppendPath(monitorName, true); - uri.AppendPath("/linkSaaS", false); + uri.AppendPath("/switchBilling", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -1588,61 +1575,75 @@ internal HttpMessage CreateLinkSaaSRequest(string subscriptionId, string resourc return message; } - /// Links a new SaaS to the newrelic organization of the underlying monitor. + /// Switches the billing for the New Relic Monitor resource to be billed by Azure Marketplace. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// Monitor resource name. - /// Link SaaS body parameter. + /// Name of the Monitors resource. + /// The details of the switch billing request. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task LinkSaaSAsync(string subscriptionId, string resourceGroupName, string monitorName, NewRelicObservabilitySaaSContent content, CancellationToken cancellationToken = default) + public async Task> SwitchBillingAsync(string subscriptionId, string resourceGroupName, string monitorName, NewRelicSwitchBillingContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); Argument.AssertNotNull(content, nameof(content)); - using var message = CreateLinkSaaSRequest(subscriptionId, resourceGroupName, monitorName, content); + using var message = CreateSwitchBillingRequest(subscriptionId, resourceGroupName, monitorName, content); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: + { + NewRelicMonitorResourceData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = NewRelicMonitorResourceData.DeserializeNewRelicMonitorResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } case 202: - return message.Response; + case 204: + return Response.FromValue((NewRelicMonitorResourceData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// Links a new SaaS to the newrelic organization of the underlying monitor. + /// Switches the billing for the New Relic Monitor resource to be billed by Azure Marketplace. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// Monitor resource name. - /// Link SaaS body parameter. + /// Name of the Monitors resource. + /// The details of the switch billing request. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response LinkSaaS(string subscriptionId, string resourceGroupName, string monitorName, NewRelicObservabilitySaaSContent content, CancellationToken cancellationToken = default) + public Response SwitchBilling(string subscriptionId, string resourceGroupName, string monitorName, NewRelicSwitchBillingContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); Argument.AssertNotNull(content, nameof(content)); - using var message = CreateLinkSaaSRequest(subscriptionId, resourceGroupName, monitorName, content); + using var message = CreateSwitchBillingRequest(subscriptionId, resourceGroupName, monitorName, content); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: + { + NewRelicMonitorResourceData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = NewRelicMonitorResourceData.DeserializeNewRelicMonitorResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } case 202: - return message.Response; + case 204: + return Response.FromValue((NewRelicMonitorResourceData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateResubscribeRequestUri(string subscriptionId, string resourceGroupName, string monitorName, ResubscribeProperties body) + internal RequestUriBuilder CreateVmHostPayloadRequestUri(string subscriptionId, string resourceGroupName, string monitorName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -1652,12 +1653,12 @@ internal RequestUriBuilder CreateResubscribeRequestUri(string subscriptionId, st uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/NewRelic.Observability/monitors/", false); uri.AppendPath(monitorName, true); - uri.AppendPath("/resubscribe", false); + uri.AppendPath("/vmHostPayloads", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateResubscribeRequest(string subscriptionId, string resourceGroupName, string monitorName, ResubscribeProperties body) + internal HttpMessage CreateVmHostPayloadRequest(string subscriptionId, string resourceGroupName, string monitorName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -1670,68 +1671,67 @@ internal HttpMessage CreateResubscribeRequest(string subscriptionId, string reso uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/NewRelic.Observability/monitors/", false); uri.AppendPath(monitorName, true); - uri.AppendPath("/resubscribe", false); + uri.AppendPath("/vmHostPayloads", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); - if (body != null) - { - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(body, ModelSerializationExtensions.WireOptions); - request.Content = content; - } _userAgent.Apply(message); return message; } - /// Resubscribes the New Relic Organization of the underline Monitor Resource to be billed by Azure Marketplace. + /// 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. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// Monitor resource name. - /// Resubscribe Properties. + /// Name of the Monitors resource. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task ResubscribeAsync(string subscriptionId, string resourceGroupName, string monitorName, ResubscribeProperties body = null, CancellationToken cancellationToken = default) + public async Task> VmHostPayloadAsync(string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); - using var message = CreateResubscribeRequest(subscriptionId, resourceGroupName, monitorName, body); + using var message = CreateVmHostPayloadRequest(subscriptionId, resourceGroupName, monitorName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + NewRelicObservabilityVmExtensionPayload value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = NewRelicObservabilityVmExtensionPayload.DeserializeNewRelicObservabilityVmExtensionPayload(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// Resubscribes the New Relic Organization of the underline Monitor Resource to be billed by Azure Marketplace. + /// 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. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// Monitor resource name. - /// Resubscribe Properties. + /// Name of the Monitors resource. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response Resubscribe(string subscriptionId, string resourceGroupName, string monitorName, ResubscribeProperties body = null, CancellationToken cancellationToken = default) + public Response VmHostPayload(string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); - using var message = CreateResubscribeRequest(subscriptionId, resourceGroupName, monitorName, body); + using var message = CreateVmHostPayloadRequest(subscriptionId, resourceGroupName, monitorName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + NewRelicObservabilityVmExtensionPayload value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = NewRelicObservabilityVmExtensionPayload.DeserializeNewRelicObservabilityVmExtensionPayload(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } @@ -2069,7 +2069,7 @@ public Response ListHostsNextPage(stri } } - internal RequestUriBuilder CreateListMonitoredResourcesNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string monitorName) + internal RequestUriBuilder CreateListLinkedResourcesNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string monitorName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -2077,7 +2077,7 @@ internal RequestUriBuilder CreateListMonitoredResourcesNextPageRequestUri(string return uri; } - internal HttpMessage CreateListMonitoredResourcesNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string monitorName) + internal HttpMessage CreateListLinkedResourcesNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string monitorName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -2091,7 +2091,7 @@ internal HttpMessage CreateListMonitoredResourcesNextPageRequest(string nextLink return message; } - /// 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. + /// 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. /// The URL to the next page of results. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. @@ -2099,22 +2099,22 @@ internal HttpMessage CreateListMonitoredResourcesNextPageRequest(string nextLink /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListMonitoredResourcesNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) + public async Task> ListLinkedResourcesNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); - using var message = CreateListMonitoredResourcesNextPageRequest(nextLink, subscriptionId, resourceGroupName, monitorName); + using var message = CreateListLinkedResourcesNextPageRequest(nextLink, subscriptionId, resourceGroupName, monitorName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - NewRelicMonitoredResourceListResult value = default; + LinkedResourceListResponse value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = NewRelicMonitoredResourceListResult.DeserializeNewRelicMonitoredResourceListResult(document.RootElement); + value = LinkedResourceListResponse.DeserializeLinkedResourceListResponse(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -2122,7 +2122,7 @@ public async Task> ListMonitoredRe } } - /// 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. + /// 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. /// The URL to the next page of results. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. @@ -2130,22 +2130,22 @@ public async Task> ListMonitoredRe /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListMonitoredResourcesNextPage(string nextLink, string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) + public Response ListLinkedResourcesNextPage(string nextLink, string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); - using var message = CreateListMonitoredResourcesNextPageRequest(nextLink, subscriptionId, resourceGroupName, monitorName); + using var message = CreateListLinkedResourcesNextPageRequest(nextLink, subscriptionId, resourceGroupName, monitorName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - NewRelicMonitoredResourceListResult value = default; + LinkedResourceListResponse value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = NewRelicMonitoredResourceListResult.DeserializeNewRelicMonitoredResourceListResult(document.RootElement); + value = LinkedResourceListResponse.DeserializeLinkedResourceListResponse(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -2153,7 +2153,7 @@ public Response ListMonitoredResourcesNextP } } - internal RequestUriBuilder CreateListLinkedResourcesNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string monitorName) + internal RequestUriBuilder CreateListMonitoredResourcesNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string monitorName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -2161,7 +2161,7 @@ internal RequestUriBuilder CreateListLinkedResourcesNextPageRequestUri(string ne return uri; } - internal HttpMessage CreateListLinkedResourcesNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string monitorName) + internal HttpMessage CreateListMonitoredResourcesNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string monitorName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -2175,7 +2175,7 @@ internal HttpMessage CreateListLinkedResourcesNextPageRequest(string nextLink, s return message; } - /// 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. + /// 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. /// The URL to the next page of results. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. @@ -2183,22 +2183,22 @@ internal HttpMessage CreateListLinkedResourcesNextPageRequest(string nextLink, s /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListLinkedResourcesNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) + public async Task> ListMonitoredResourcesNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); - using var message = CreateListLinkedResourcesNextPageRequest(nextLink, subscriptionId, resourceGroupName, monitorName); + using var message = CreateListMonitoredResourcesNextPageRequest(nextLink, subscriptionId, resourceGroupName, monitorName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - LinkedResourceListResponse value = default; + NewRelicMonitoredResourceListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = LinkedResourceListResponse.DeserializeLinkedResourceListResponse(document.RootElement); + value = NewRelicMonitoredResourceListResult.DeserializeNewRelicMonitoredResourceListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -2206,7 +2206,7 @@ public async Task> ListLinkedResourcesNextP } } - /// 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. + /// 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. /// The URL to the next page of results. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. @@ -2214,22 +2214,22 @@ public async Task> ListLinkedResourcesNextP /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListLinkedResourcesNextPage(string nextLink, string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) + public Response ListMonitoredResourcesNextPage(string nextLink, string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); - using var message = CreateListLinkedResourcesNextPageRequest(nextLink, subscriptionId, resourceGroupName, monitorName); + using var message = CreateListMonitoredResourcesNextPageRequest(nextLink, subscriptionId, resourceGroupName, monitorName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - LinkedResourceListResponse value = default; + NewRelicMonitoredResourceListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = LinkedResourceListResponse.DeserializeLinkedResourceListResponse(document.RootElement); + value = NewRelicMonitoredResourceListResult.DeserializeNewRelicMonitoredResourceListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/RestOperations/SaaSRestOperations.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/RestOperations/SaaSRestOperations.cs index 7b58212710cd..294570b8c447 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/RestOperations/SaaSRestOperations.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/RestOperations/SaaSRestOperations.cs @@ -70,7 +70,7 @@ internal HttpMessage CreateActivateResourceRequest(string subscriptionId, Activa /// Resolve the token to get the SaaS resource ID and activate the SaaS resource. /// The ID of the target subscription. - /// The details for ActivateSaaSParameter request. + /// The request body. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. @@ -97,7 +97,7 @@ public async Task> Acti /// Resolve the token to get the SaaS resource ID and activate the SaaS resource. /// The ID of the target subscription. - /// The details for ActivateSaaSParameter request. + /// The request body. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/RestOperations/TagRulesRestOperations.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/RestOperations/TagRulesRestOperations.cs index ec6de73d94e5..377b496c7f31 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/RestOperations/TagRulesRestOperations.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/RestOperations/TagRulesRestOperations.cs @@ -334,7 +334,7 @@ public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, } } - internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string monitorName, string ruleSetName) + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string monitorName, string ruleSetName, NewRelicObservabilityTagRulePatch patch) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -350,11 +350,11 @@ internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string return uri; } - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string monitorName, string ruleSetName) + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string monitorName, string ruleSetName, NewRelicObservabilityTagRulePatch patch) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Delete; + request.Method = RequestMethod.Patch; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -368,67 +368,81 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; _userAgent.Apply(message); return message; } - /// Deletes a tag rule set for a given New Relic monitor resource, removing fine-grained control over observability based on resource tags. + /// Updates the tag rules for a specific New Relic monitor resource, allowing you to modify the rules that control which Azure resources are monitored. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Name of the Monitors resource. /// Name of the TagRule. + /// The resource properties to be updated. /// The cancellation token to use. - /// , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string monitorName, string ruleSetName, CancellationToken cancellationToken = default) + public async Task> UpdateAsync(string subscriptionId, string resourceGroupName, string monitorName, string ruleSetName, NewRelicObservabilityTagRulePatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); Argument.AssertNotNullOrEmpty(ruleSetName, nameof(ruleSetName)); + Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, monitorName, ruleSetName); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, monitorName, ruleSetName, patch); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: - case 204: - return message.Response; + { + NewRelicObservabilityTagRuleData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = NewRelicObservabilityTagRuleData.DeserializeNewRelicObservabilityTagRuleData(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// Deletes a tag rule set for a given New Relic monitor resource, removing fine-grained control over observability based on resource tags. + /// Updates the tag rules for a specific New Relic monitor resource, allowing you to modify the rules that control which Azure resources are monitored. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Name of the Monitors resource. /// Name of the TagRule. + /// The resource properties to be updated. /// The cancellation token to use. - /// , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string monitorName, string ruleSetName, CancellationToken cancellationToken = default) + public Response Update(string subscriptionId, string resourceGroupName, string monitorName, string ruleSetName, NewRelicObservabilityTagRulePatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); Argument.AssertNotNullOrEmpty(ruleSetName, nameof(ruleSetName)); + Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, monitorName, ruleSetName); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, monitorName, ruleSetName, patch); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: - case 204: - return message.Response; + { + NewRelicObservabilityTagRuleData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = NewRelicObservabilityTagRuleData.DeserializeNewRelicObservabilityTagRuleData(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string monitorName, string ruleSetName, NewRelicObservabilityTagRulePatch patch) + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string monitorName, string ruleSetName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -444,11 +458,11 @@ internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string return uri; } - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string monitorName, string ruleSetName, NewRelicObservabilityTagRulePatch patch) + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string monitorName, string ruleSetName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Patch; + request.Method = RequestMethod.Delete; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -462,75 +476,61 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); - request.Content = content; _userAgent.Apply(message); return message; } - /// Updates the tag rules for a specific New Relic monitor resource, allowing you to modify the rules that control which Azure resources are monitored. + /// Deletes a tag rule set for a given New Relic monitor resource, removing fine-grained control over observability based on resource tags. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Name of the Monitors resource. /// Name of the TagRule. - /// The resource properties to be updated. /// The cancellation token to use. - /// , , , or is null. + /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> UpdateAsync(string subscriptionId, string resourceGroupName, string monitorName, string ruleSetName, NewRelicObservabilityTagRulePatch patch, CancellationToken cancellationToken = default) + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string monitorName, string ruleSetName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); Argument.AssertNotNullOrEmpty(ruleSetName, nameof(ruleSetName)); - Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, monitorName, ruleSetName, patch); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, monitorName, ruleSetName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - { - NewRelicObservabilityTagRuleData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = NewRelicObservabilityTagRuleData.DeserializeNewRelicObservabilityTagRuleData(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + case 204: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Updates the tag rules for a specific New Relic monitor resource, allowing you to modify the rules that control which Azure resources are monitored. + /// Deletes a tag rule set for a given New Relic monitor resource, removing fine-grained control over observability based on resource tags. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Name of the Monitors resource. /// Name of the TagRule. - /// The resource properties to be updated. /// The cancellation token to use. - /// , , , or is null. + /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Update(string subscriptionId, string resourceGroupName, string monitorName, string ruleSetName, NewRelicObservabilityTagRulePatch patch, CancellationToken cancellationToken = default) + public Response Delete(string subscriptionId, string resourceGroupName, string monitorName, string ruleSetName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); Argument.AssertNotNullOrEmpty(ruleSetName, nameof(ruleSetName)); - Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, monitorName, ruleSetName, patch); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, monitorName, ruleSetName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - { - NewRelicObservabilityTagRuleData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = NewRelicObservabilityTagRuleData.DeserializeNewRelicObservabilityTagRuleData(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + case 204: + return message.Response; default: throw new RequestFailedException(message.Response); } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/autorest.md b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/autorest.md index 8cb1594e2cdc..e2d09909a3ed 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/autorest.md +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/autorest.md @@ -7,8 +7,8 @@ azure-arm: true csharp: true library-name: Newrelic namespace: Azure.ResourceManager.NewRelicObservability -require: https://github.com/Azure/azure-rest-api-specs/blob/91e3aca0bfa4b59a9f578959d0b214a26b90df40/specification/newrelic/resource-manager/readme.md -#tag: package-2024-03-01 +require: https://github.com/Azure/azure-rest-api-specs/blob/8eaa76601a7ad84c0b21bdf8050ff61203ecb89c/specification/newrelic/resource-manager/readme.md +#tag: package-2025-05-01-preview # before: package-2024-03-01 output-folder: $(this-folder)/Generated clear-output-folder: true sample-gen: @@ -33,21 +33,12 @@ format-by-name-rules: prepend-rp-prefix: - AccountCreationSource - AccountInfo -- Agent - AppServiceInfo -- AppServicesGetContent -- AppServicesListResult -- BillingCycle - BillingSource -- Endpoint - FilteringTag -- HostsGetContent - LogRules - MarketplaceSubscriptionStatus - MetricRules -- MetricsContent -- MetricsStatusContent -- MetricsStatusResult - MonitoringStatus - OrganizationInfo - OrgCreationSource @@ -57,8 +48,6 @@ prepend-rp-prefix: - SendingMetricsStatus - SendMetricsStatus - SendSubscriptionLogsStatus -- SingleSignOnState -- SwitchBillingContent - TagAction - TagRuleListResult - TagRule @@ -96,25 +85,13 @@ rename-mapping: AccountResource: NewRelicAccountResourceData AccountResource.properties.region: -|azure-location AccountsListResponse: NewRelicAccountsListResult - AgentData.ArcResourceId: -|arm-id - AgentData.ArcVmUuid: -|uuid AppServicesGetRequest: NewRelicAppServicesGetContent AppServicesGetRequest.azureResourceIds: -|arm-id AppServiceInfo.azureResourceId: -|arm-id AppServicesListResponse: NewRelicAppServicesListResult BillingInfoResponse: NewRelicBillingInfoResult - AzureStorageBlobContainerEndpointProperties: StorageBlobContainerEndpointProperties - AzureStorageBlobContainerNewrelicEndpointProperties.StorageAccountResourceId: -|arm-id HostsGetRequest: NewRelicHostsGetContent HostsGetRequest.vmIds: -|arm-id - JobDefinitionData: NewRelicJobDefinitionData - JobRun: NewRelicJobRun - JobDefinitionData.AgentResourceId: -|arm-id - JobDefinitionData.LatestJobRunResourceId: -|arm-id - JobDefinitionData.SourceResourceId: -|arm-id - JobDefinitionData.TargetResourceId: -|arm-id - JobRunData.AgentResourceId: -|arm-id - JobRunData.SourceResourceId: -|arm-id LiftrResourceCategories: NewRelicLiftrResourceCategory MetricsRequest: NewRelicMetricsContent MetricsStatusRequest: NewRelicMetricsStatusContent @@ -124,10 +101,8 @@ rename-mapping: MonitoredResourceListResponse: NewRelicMonitoredResourceListResult MonitoringStatus.Disabled: IsDisabled MonitoringStatus.Enabled: IsEnabled - NewrelicAgentData.LocalIPAddress: -|ip-address OrganizationsListResponse: NewRelicOrganizationsListResult ProvisioningState: NewRelicProvisioningState - Project: NewRelicProject PlanDataListResponse: NewRelicPlanDataListResult PlanData: NewRelicPlanDetails PlanData.billingCycle: NewRelicPlanBillingCycle @@ -144,7 +119,6 @@ rename-mapping: SendSubscriptionLogsStatus.Disabled: IsDisabled SendSubscriptionLogsStatus.Enabled: IsEnabled SingleSignOnStates: NewRelicSingleSignOnState - StorageMover: NewRelicStorageMover SwitchBillingRequest: NewRelicSwitchBillingContent SwitchBillingRequest.azureResourceId: -|arm-id VMInfo.vmId: -|arm-id @@ -158,9 +132,12 @@ rename-mapping: MonitoredSubscription: NewRelicMonitoredSubscriptionInfo MonitoringTagRulesProperties: NewRelicMonitoringTagRules LatestLinkedSaaSResponse: NewRelicObservabilityLatestLinkedSaaSResult - SaaSResourceDetailsResponse: NewRelicObservabilitySaaSResourceDetailsResult + LatestLinkedSaaSResponse.saaSResourceId: -|arm-id SaaSData: NewRelicObservabilitySaaSInfo - + SaaSData.saaSResourceId: -|arm-id + ResubscribeProperties: NewRelicResubscribeProperties + ActivateSaaSParameterRequest.saasGuid: -|uuid + SaaSResourceDetailsResponse: NewRelicObservabilitySaaSResourceDetailsResult override-operation-name: Accounts_List: GetNewRelicAccounts diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/tests/Azure.ResourceManager.NewRelicObservability.Tests.csproj b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/tests/Azure.ResourceManager.NewRelicObservability.Tests.csproj index fdb9a1cdcf11..5ac4abef1873 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/tests/Azure.ResourceManager.NewRelicObservability.Tests.csproj +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/tests/Azure.ResourceManager.NewRelicObservability.Tests.csproj @@ -6,4 +6,7 @@ + + + diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/tests/Generated/Samples/Sample_NewRelicMonitorResource.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/tests/Generated/Samples/Sample_NewRelicMonitorResource.cs index ac5d81dd9b6e..e6af17916a14 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/tests/Generated/Samples/Sample_NewRelicMonitorResource.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/tests/Generated/Samples/Sample_NewRelicMonitorResource.cs @@ -298,10 +298,10 @@ public async Task GetMetricStatus_MonitorsGetMetricStatusMinimumSetGen() [Test] [Ignore("Only validating compilation of examples")] - public async Task GetAppServices_MonitorsListAppServicesMaximumSetGen() + public async Task LatestLinkedSaaS_MonitorsLatestLinkedSaaSMaximumSetGen() { - // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/Monitors_ListAppServices_MaximumSet_Gen.json - // this example is just showing the usage of "Monitors_ListAppServices" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/Monitors_LatestLinkedSaaS_MaximumSet_Gen.json + // this example is just showing the usage of "Monitors_LatestLinkedSaaS" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -311,30 +311,23 @@ public async Task GetAppServices_MonitorsListAppServicesMaximumSetGen() // this example assumes you already have this NewRelicMonitorResource created on azure // for more information of creating NewRelicMonitorResource, please refer to the document of NewRelicMonitorResource string subscriptionId = "00000000-0000-0000-0000-000000000000"; - string resourceGroupName = "rgNewRelic"; - string monitorName = "fhcjxnxumkdlgpwanewtkdnyuz"; + string resourceGroupName = "rgopenapi"; + string monitorName = "ipxmlcbonyxtolzejcjshkmlron"; ResourceIdentifier newRelicMonitorResourceId = NewRelicMonitorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName); NewRelicMonitorResource newRelicMonitorResource = client.GetNewRelicMonitorResource(newRelicMonitorResourceId); - // invoke the operation and iterate over the result - NewRelicAppServicesGetContent content = new NewRelicAppServicesGetContent("ruxvg@xqkmdhrnoo.hlmbpm") - { - AzureResourceIds = { new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgNewRelic/providers/NewRelic.Observability/monitors/fhcjxnxumkdlgpwanewtkdnyuz") }, - }; - await foreach (NewRelicObservabilityAppServiceInfo item in newRelicMonitorResource.GetAppServicesAsync(content)) - { - Console.WriteLine($"Succeeded: {item}"); - } + // invoke the operation + NewRelicObservabilityLatestLinkedSaaSResult result = await newRelicMonitorResource.LatestLinkedSaaSAsync(); - Console.WriteLine("Succeeded"); + Console.WriteLine($"Succeeded: {result}"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task GetAppServices_MonitorsListAppServicesMinimumSetGen() + public async Task LatestLinkedSaaS_MonitorsLatestLinkedSaaSMinimumSetGen() { - // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/Monitors_ListAppServices_MinimumSet_Gen.json - // this example is just showing the usage of "Monitors_ListAppServices" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/Monitors_LatestLinkedSaaS_MinimumSet_Gen.json + // this example is just showing the usage of "Monitors_LatestLinkedSaaS" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -344,30 +337,23 @@ public async Task GetAppServices_MonitorsListAppServicesMinimumSetGen() // this example assumes you already have this NewRelicMonitorResource created on azure // for more information of creating NewRelicMonitorResource, please refer to the document of NewRelicMonitorResource string subscriptionId = "00000000-0000-0000-0000-000000000000"; - string resourceGroupName = "rgNewRelic"; - string monitorName = "fhcjxnxumkdlgpwanewtkdnyuz"; + string resourceGroupName = "rgopenapi"; + string monitorName = "ipxmlcbonyxtolzejcjshkmlron"; ResourceIdentifier newRelicMonitorResourceId = NewRelicMonitorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName); NewRelicMonitorResource newRelicMonitorResource = client.GetNewRelicMonitorResource(newRelicMonitorResourceId); - // invoke the operation and iterate over the result - NewRelicAppServicesGetContent content = new NewRelicAppServicesGetContent("ruxvg@xqkmdhrnoo.hlmbpm") - { - AzureResourceIds = { new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgNewRelic/providers/NewRelic.Observability/monitors/fhcjxnxumkdlgpwanewtkdnyuz") }, - }; - await foreach (NewRelicObservabilityAppServiceInfo item in newRelicMonitorResource.GetAppServicesAsync(content)) - { - Console.WriteLine($"Succeeded: {item}"); - } + // invoke the operation + NewRelicObservabilityLatestLinkedSaaSResult result = await newRelicMonitorResource.LatestLinkedSaaSAsync(); - Console.WriteLine("Succeeded"); + Console.WriteLine($"Succeeded: {result}"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task SwitchBilling_MonitorsSwitchBillingMaximumSetGen() + public async Task LinkSaaS_MonitorsLinkSaaS() { - // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/Monitors_SwitchBilling_MaximumSet_Gen.json - // this example is just showing the usage of "Monitors_SwitchBilling" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/Monitors_LinkSaaS.json + // this example is just showing the usage of "Monitors_LinkSaaS" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -377,25 +363,18 @@ public async Task SwitchBilling_MonitorsSwitchBillingMaximumSetGen() // this example assumes you already have this NewRelicMonitorResource created on azure // for more information of creating NewRelicMonitorResource, please refer to the document of NewRelicMonitorResource string subscriptionId = "00000000-0000-0000-0000-000000000000"; - string resourceGroupName = "rgNewRelic"; - string monitorName = "fhcjxnxumkdlgpwanewtkdnyuz"; + string resourceGroupName = "myResourceGroup"; + string monitorName = "myMonitor"; ResourceIdentifier newRelicMonitorResourceId = NewRelicMonitorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName); NewRelicMonitorResource newRelicMonitorResource = client.GetNewRelicMonitorResource(newRelicMonitorResourceId); // invoke the operation - NewRelicSwitchBillingContent content = new NewRelicSwitchBillingContent("ruxvg@xqkmdhrnoo.hlmbpm") + NewRelicObservabilitySaaSContent content = new NewRelicObservabilitySaaSContent { - AzureResourceId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgNewRelic/providers/NewRelic.Observability/monitors/fhcjxnxumkdlgpwanewtkdnyuz"), - OrganizationId = "k", - PlanData = new NewRelicPlanDetails - { - UsageType = NewRelicObservabilityUsageType.Payg, - NewRelicPlanBillingCycle = "Yearly", - PlanDetails = "tbbiaga", - EffectiveOn = DateTimeOffset.Parse("2022-12-05T14:11:37.786Z"), - }, + SaaSResourceId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgNewRelic/providers/Microsoft.SaaS/resources/abcd"), }; - NewRelicMonitorResource result = await newRelicMonitorResource.SwitchBillingAsync(content); + ArmOperation lro = await newRelicMonitorResource.LinkSaaSAsync(WaitUntil.Completed, content); + NewRelicMonitorResource result = lro.Value; // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance @@ -406,10 +385,10 @@ public async Task SwitchBilling_MonitorsSwitchBillingMaximumSetGen() [Test] [Ignore("Only validating compilation of examples")] - public async Task SwitchBilling_MonitorsSwitchBillingMinimumSetGen() + public async Task GetAppServices_MonitorsListAppServicesMaximumSetGen() { - // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/Monitors_SwitchBilling_MinimumSet_Gen.json - // this example is just showing the usage of "Monitors_SwitchBilling" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/Monitors_ListAppServices_MaximumSet_Gen.json + // this example is just showing the usage of "Monitors_ListAppServices" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -424,15 +403,50 @@ public async Task SwitchBilling_MonitorsSwitchBillingMinimumSetGen() ResourceIdentifier newRelicMonitorResourceId = NewRelicMonitorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName); NewRelicMonitorResource newRelicMonitorResource = client.GetNewRelicMonitorResource(newRelicMonitorResourceId); - // invoke the operation - NewRelicSwitchBillingContent content = new NewRelicSwitchBillingContent("ruxvg@xqkmdhrnoo.hlmbpm"); - NewRelicMonitorResource result = await newRelicMonitorResource.SwitchBillingAsync(content); + // invoke the operation and iterate over the result + NewRelicAppServicesGetContent content = new NewRelicAppServicesGetContent("ruxvg@xqkmdhrnoo.hlmbpm") + { + AzureResourceIds = { new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgNewRelic/providers/NewRelic.Observability/monitors/fhcjxnxumkdlgpwanewtkdnyuz") }, + }; + await foreach (NewRelicObservabilityAppServiceInfo item in newRelicMonitorResource.GetAppServicesAsync(content)) + { + Console.WriteLine($"Succeeded: {item}"); + } - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - NewRelicMonitorResourceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAppServices_MonitorsListAppServicesMinimumSetGen() + { + // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/Monitors_ListAppServices_MinimumSet_Gen.json + // this example is just showing the usage of "Monitors_ListAppServices" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NewRelicMonitorResource created on azure + // for more information of creating NewRelicMonitorResource, please refer to the document of NewRelicMonitorResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rgNewRelic"; + string monitorName = "fhcjxnxumkdlgpwanewtkdnyuz"; + ResourceIdentifier newRelicMonitorResourceId = NewRelicMonitorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName); + NewRelicMonitorResource newRelicMonitorResource = client.GetNewRelicMonitorResource(newRelicMonitorResourceId); + + // invoke the operation and iterate over the result + NewRelicAppServicesGetContent content = new NewRelicAppServicesGetContent("ruxvg@xqkmdhrnoo.hlmbpm") + { + AzureResourceIds = { new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgNewRelic/providers/NewRelic.Observability/monitors/fhcjxnxumkdlgpwanewtkdnyuz") }, + }; + await foreach (NewRelicObservabilityAppServiceInfo item in newRelicMonitorResource.GetAppServicesAsync(content)) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine("Succeeded"); } [Test] @@ -503,10 +517,10 @@ public async Task GetHosts_MonitorsListHostsMinimumSetGen() [Test] [Ignore("Only validating compilation of examples")] - public async Task RefreshIngestionKey_MonitorsRefreshIngestionKey() + public async Task GetLinkedResources_MonitorsListLinkedResources() { - // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/Monitors_RefreshIngestionKey.json - // this example is just showing the usage of "Monitors_RefreshIngestionKey" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/LinkedResources_List.json + // this example is just showing the usage of "Monitors_ListLinkedResources" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -521,8 +535,11 @@ public async Task RefreshIngestionKey_MonitorsRefreshIngestionKey() ResourceIdentifier newRelicMonitorResourceId = NewRelicMonitorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName); NewRelicMonitorResource newRelicMonitorResource = client.GetNewRelicMonitorResource(newRelicMonitorResourceId); - // invoke the operation - await newRelicMonitorResource.RefreshIngestionKeyAsync(); + // invoke the operation and iterate over the result + await foreach (SubResource item in newRelicMonitorResource.GetLinkedResourcesAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } Console.WriteLine("Succeeded"); } @@ -587,10 +604,10 @@ public async Task GetMonitoredResources_MonitorsListMonitoredResourcesMinimumSet [Test] [Ignore("Only validating compilation of examples")] - public async Task GetLinkedResources_MonitorsListLinkedResources() + public async Task RefreshIngestionKey_MonitorsRefreshIngestionKey() { - // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/LinkedResources_List.json - // this example is just showing the usage of "Monitors_ListLinkedResources" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/Monitors_RefreshIngestionKey.json + // this example is just showing the usage of "Monitors_RefreshIngestionKey" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -605,21 +622,18 @@ public async Task GetLinkedResources_MonitorsListLinkedResources() ResourceIdentifier newRelicMonitorResourceId = NewRelicMonitorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName); NewRelicMonitorResource newRelicMonitorResource = client.GetNewRelicMonitorResource(newRelicMonitorResourceId); - // invoke the operation and iterate over the result - await foreach (SubResource item in newRelicMonitorResource.GetLinkedResourcesAsync()) - { - Console.WriteLine($"Succeeded: {item}"); - } + // invoke the operation + await newRelicMonitorResource.RefreshIngestionKeyAsync(); Console.WriteLine("Succeeded"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task VmHostPayload_MonitorsVmHostPayloadMaximumSetGen() + public async Task Resubscribe_MonitorsResubscribe() { - // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/Monitors_VmHostPayload_MaximumSet_Gen.json - // this example is just showing the usage of "Monitors_VmHostPayload" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/Monitors_Resubscribe.json + // this example is just showing the usage of "Monitors_Resubscribe" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -629,23 +643,28 @@ public async Task VmHostPayload_MonitorsVmHostPayloadMaximumSetGen() // this example assumes you already have this NewRelicMonitorResource created on azure // for more information of creating NewRelicMonitorResource, please refer to the document of NewRelicMonitorResource string subscriptionId = "00000000-0000-0000-0000-000000000000"; - string resourceGroupName = "rgopenapi"; - string monitorName = "ipxmlcbonyxtolzejcjshkmlron"; + string resourceGroupName = "myResourceGroup"; + string monitorName = "myMonitor"; ResourceIdentifier newRelicMonitorResourceId = NewRelicMonitorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName); NewRelicMonitorResource newRelicMonitorResource = client.GetNewRelicMonitorResource(newRelicMonitorResourceId); // invoke the operation - NewRelicObservabilityVmExtensionPayload result = await newRelicMonitorResource.VmHostPayloadAsync(); + ArmOperation lro = await newRelicMonitorResource.ResubscribeAsync(WaitUntil.Completed); + NewRelicMonitorResource result = lro.Value; - Console.WriteLine($"Succeeded: {result}"); + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NewRelicMonitorResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task VmHostPayload_MonitorsVmHostPayloadMinimumSetGen() + public async Task SwitchBilling_MonitorsSwitchBillingMaximumSetGen() { - // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/Monitors_VmHostPayload_MinimumSet_Gen.json - // this example is just showing the usage of "Monitors_VmHostPayload" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/Monitors_SwitchBilling_MaximumSet_Gen.json + // this example is just showing the usage of "Monitors_SwitchBilling" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -655,23 +674,39 @@ public async Task VmHostPayload_MonitorsVmHostPayloadMinimumSetGen() // this example assumes you already have this NewRelicMonitorResource created on azure // for more information of creating NewRelicMonitorResource, please refer to the document of NewRelicMonitorResource string subscriptionId = "00000000-0000-0000-0000-000000000000"; - string resourceGroupName = "rgopenapi"; - string monitorName = "ipxmlcbonyxtolzejcjshkmlron"; + string resourceGroupName = "rgNewRelic"; + string monitorName = "fhcjxnxumkdlgpwanewtkdnyuz"; ResourceIdentifier newRelicMonitorResourceId = NewRelicMonitorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName); NewRelicMonitorResource newRelicMonitorResource = client.GetNewRelicMonitorResource(newRelicMonitorResourceId); // invoke the operation - NewRelicObservabilityVmExtensionPayload result = await newRelicMonitorResource.VmHostPayloadAsync(); + NewRelicSwitchBillingContent content = new NewRelicSwitchBillingContent("ruxvg@xqkmdhrnoo.hlmbpm") + { + AzureResourceId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgNewRelic/providers/NewRelic.Observability/monitors/fhcjxnxumkdlgpwanewtkdnyuz"), + OrganizationId = "k", + PlanData = new NewRelicPlanDetails + { + UsageType = NewRelicObservabilityUsageType.Payg, + NewRelicPlanBillingCycle = "Yearly", + PlanDetails = "tbbiaga", + EffectiveOn = DateTimeOffset.Parse("2022-12-05T14:11:37.786Z"), + }, + }; + NewRelicMonitorResource result = await newRelicMonitorResource.SwitchBillingAsync(content); - Console.WriteLine($"Succeeded: {result}"); + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NewRelicMonitorResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task LatestLinkedSaaS_MonitorsLatestLinkedSaaSMaximumSetGen() + public async Task SwitchBilling_MonitorsSwitchBillingMinimumSetGen() { - // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/Monitors_LatestLinkedSaaS_MaximumSet_Gen.json - // this example is just showing the usage of "Monitors_LatestLinkedSaaS" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/Monitors_SwitchBilling_MinimumSet_Gen.json + // this example is just showing the usage of "Monitors_SwitchBilling" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -681,23 +716,28 @@ public async Task LatestLinkedSaaS_MonitorsLatestLinkedSaaSMaximumSetGen() // this example assumes you already have this NewRelicMonitorResource created on azure // for more information of creating NewRelicMonitorResource, please refer to the document of NewRelicMonitorResource string subscriptionId = "00000000-0000-0000-0000-000000000000"; - string resourceGroupName = "rgopenapi"; - string monitorName = "ipxmlcbonyxtolzejcjshkmlron"; + string resourceGroupName = "rgNewRelic"; + string monitorName = "fhcjxnxumkdlgpwanewtkdnyuz"; ResourceIdentifier newRelicMonitorResourceId = NewRelicMonitorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName); NewRelicMonitorResource newRelicMonitorResource = client.GetNewRelicMonitorResource(newRelicMonitorResourceId); // invoke the operation - NewRelicObservabilityLatestLinkedSaaSResult result = await newRelicMonitorResource.LatestLinkedSaaSAsync(); + NewRelicSwitchBillingContent content = new NewRelicSwitchBillingContent("ruxvg@xqkmdhrnoo.hlmbpm"); + NewRelicMonitorResource result = await newRelicMonitorResource.SwitchBillingAsync(content); - Console.WriteLine($"Succeeded: {result}"); + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NewRelicMonitorResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task LatestLinkedSaaS_MonitorsLatestLinkedSaaSMinimumSetGen() + public async Task VmHostPayload_MonitorsVmHostPayloadMaximumSetGen() { - // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/Monitors_LatestLinkedSaaS_MinimumSet_Gen.json - // this example is just showing the usage of "Monitors_LatestLinkedSaaS" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/Monitors_VmHostPayload_MaximumSet_Gen.json + // this example is just showing the usage of "Monitors_VmHostPayload" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -713,52 +753,17 @@ public async Task LatestLinkedSaaS_MonitorsLatestLinkedSaaSMinimumSetGen() NewRelicMonitorResource newRelicMonitorResource = client.GetNewRelicMonitorResource(newRelicMonitorResourceId); // invoke the operation - NewRelicObservabilityLatestLinkedSaaSResult result = await newRelicMonitorResource.LatestLinkedSaaSAsync(); + NewRelicObservabilityVmExtensionPayload result = await newRelicMonitorResource.VmHostPayloadAsync(); Console.WriteLine($"Succeeded: {result}"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task LinkSaaS_MonitorsLinkSaaS() - { - // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/Monitors_LinkSaaS.json - // this example is just showing the usage of "Monitors_LinkSaaS" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this NewRelicMonitorResource created on azure - // for more information of creating NewRelicMonitorResource, please refer to the document of NewRelicMonitorResource - string subscriptionId = "00000000-0000-0000-0000-000000000000"; - string resourceGroupName = "myResourceGroup"; - string monitorName = "myMonitor"; - ResourceIdentifier newRelicMonitorResourceId = NewRelicMonitorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName); - NewRelicMonitorResource newRelicMonitorResource = client.GetNewRelicMonitorResource(newRelicMonitorResourceId); - - // invoke the operation - NewRelicObservabilitySaaSContent content = new NewRelicObservabilitySaaSContent - { - SaaSResourceId = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgNewRelic/providers/Microsoft.SaaS/resources/abcd", - }; - ArmOperation lro = await newRelicMonitorResource.LinkSaaSAsync(WaitUntil.Completed, content); - NewRelicMonitorResource result = lro.Value; - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - NewRelicMonitorResourceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Resubscribe_MonitorsResubscribe() + public async Task VmHostPayload_MonitorsVmHostPayloadMinimumSetGen() { - // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/Monitors_Resubscribe.json - // this example is just showing the usage of "Monitors_Resubscribe" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/Monitors_VmHostPayload_MinimumSet_Gen.json + // this example is just showing the usage of "Monitors_VmHostPayload" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -768,20 +773,15 @@ public async Task Resubscribe_MonitorsResubscribe() // this example assumes you already have this NewRelicMonitorResource created on azure // for more information of creating NewRelicMonitorResource, please refer to the document of NewRelicMonitorResource string subscriptionId = "00000000-0000-0000-0000-000000000000"; - string resourceGroupName = "myResourceGroup"; - string monitorName = "myMonitor"; + string resourceGroupName = "rgopenapi"; + string monitorName = "ipxmlcbonyxtolzejcjshkmlron"; ResourceIdentifier newRelicMonitorResourceId = NewRelicMonitorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName); NewRelicMonitorResource newRelicMonitorResource = client.GetNewRelicMonitorResource(newRelicMonitorResourceId); // invoke the operation - ArmOperation lro = await newRelicMonitorResource.ResubscribeAsync(WaitUntil.Completed); - NewRelicMonitorResource result = lro.Value; + NewRelicObservabilityVmExtensionPayload result = await newRelicMonitorResource.VmHostPayloadAsync(); - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - NewRelicMonitorResourceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + Console.WriteLine($"Succeeded: {result}"); } [Test] diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/tests/Generated/Samples/Sample_NewRelicMonitorResourceCollection.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/tests/Generated/Samples/Sample_NewRelicMonitorResourceCollection.cs index 783a25e42491..ee75cfa24bd5 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/tests/Generated/Samples/Sample_NewRelicMonitorResourceCollection.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/tests/Generated/Samples/Sample_NewRelicMonitorResourceCollection.cs @@ -84,7 +84,7 @@ public async Task CreateOrUpdate_MonitorsCreateOrUpdateMaximumSetGen() PlanDetails = "tbbiaga", EffectiveOn = DateTimeOffset.Parse("2022-12-05T14:11:37.786Z"), }, - SaaSResourceId = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgNewRelic/providers/Microsoft.SaaS/resources/abcd", + SaaSResourceId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgNewRelic/providers/Microsoft.SaaS/resources/abcd"), OrgCreationSource = NewRelicObservabilityOrgCreationSource.Liftr, AccountCreationSource = NewRelicObservabilityAccountCreationSource.Liftr, SubscriptionState = "Suspended", diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs index aff359dd6356..d7da0f96ae3a 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -75,6 +75,31 @@ public async Task GetNewRelicAccounts_AccountsListMinimumSetGen() Console.WriteLine("Succeeded"); } + [Test] + [Ignore("Only validating compilation of examples")] + public async Task ActivateResourceSaaS_ActivateSaaS() + { + // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ActivateSaaS.json + // this example is just showing the usage of "SaaS_ActivateResource" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation + ActivateSaaSParameterContent content = new ActivateSaaSParameterContent(Guid.Parse("00000000-0000-0000-0000-000005430000"), "publisherId"); + NewRelicObservabilitySaaSResourceDetailsResult result = await subscriptionResource.ActivateResourceSaaSAsync(content); + + Console.WriteLine($"Succeeded: {result}"); + } + [Test] [Ignore("Only validating compilation of examples")] public async Task GetNewRelicMonitorResources_MonitorsListBySubscriptionMaximumSetGen() @@ -220,30 +245,5 @@ public async Task GetNewRelicPlans_PlansListMinimumSetGen() Console.WriteLine("Succeeded"); } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task ActivateResourceSaaS_ActivateSaaS() - { - // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ActivateSaaS.json - // this example is just showing the usage of "SaaS_ActivateResource" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this SubscriptionResource created on azure - // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "00000000-0000-0000-0000-000000000000"; - ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); - SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); - - // invoke the operation - ActivateSaaSParameterContent content = new ActivateSaaSParameterContent("00000000-0000-0000-0000-000005430000", "publisherId"); - NewRelicObservabilitySaaSResourceDetailsResult result = await subscriptionResource.ActivateResourceSaaSAsync(content); - - Console.WriteLine($"Succeeded: {result}"); - } } }