Skip to content

Commit c38d998

Browse files
authored
.NET SDK Refresh for Elastic (2025-06-01) (#53179)
1 parent 33c6a0a commit c38d998

File tree

109 files changed

+8557
-5291
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+8557
-5291
lines changed

sdk/elastic/Azure.ResourceManager.Elastic/CHANGELOG.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
11
# Release History
22

3-
## 1.1.0-beta.1 (Unreleased)
3+
## 1.1.0 (2025-11-14)
44

55
### Features Added
66

7-
### Breaking Changes
7+
- Upgraded api-version to '2025-06-01'.
8+
- Make `Azure.ResourceManager.Elastic` AOT-compatible.
89

910
### Bugs Fixed
1011

1112
- Fixed serialization issue in `ElasticCloudDeployment` where `ElasticsearchServiceUri`, `KibanaServiceUri`, and `KibanaSsoUri` properties would throw `InvalidOperationException` when containing relative URIs. Added custom serialization hooks to handle both absolute and relative URIs by using `OriginalString` for relative URIs instead of `AbsoluteUri`. This resolves issue #50974.
1213

13-
### Other Changes
14-
1514
## 1.0.0 (2024-12-26)
1615

1716
This package is the first stable release of the Azure Elastic management library.

sdk/elastic/Azure.ResourceManager.Elastic/api/Azure.ResourceManager.Elastic.net8.0.cs

Lines changed: 261 additions & 7 deletions
Large diffs are not rendered by default.

sdk/elastic/Azure.ResourceManager.Elastic/api/Azure.ResourceManager.Elastic.netstandard2.0.cs

Lines changed: 261 additions & 7 deletions
Large diffs are not rendered by default.

sdk/elastic/Azure.ResourceManager.Elastic/src/Azure.ResourceManager.Elastic.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<Version>1.1.0-beta.1</Version>
3+
<Version>1.1.0</Version>
44
<!--The ApiCompatVersion is managed automatically and should not generally be modified manually.-->
55
<ApiCompatVersion>1.0.0</ApiCompatVersion>
66
<PackageId>Azure.ResourceManager.Elastic</PackageId>
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License.
3+
4+
#nullable disable
5+
6+
using System.ComponentModel;
7+
using Azure.Core;
8+
9+
namespace Azure.ResourceManager.Elastic.Models
10+
{
11+
public static partial class ArmElasticModelFactory
12+
{
13+
/// <summary> Initializes a new instance of <see cref="Models.MarketplaceSaaSInfo"/>. </summary>
14+
/// <param name="marketplaceSubscriptionId"> Marketplace Subscription. </param>
15+
/// <param name="marketplaceName"> Marketplace Subscription Details: SAAS Name. </param>
16+
/// <param name="marketplaceResourceId"> Marketplace Subscription Details: Resource URI. </param>
17+
/// <param name="marketplaceStatus"> Marketplace Subscription Details: SaaS Subscription Status. </param>
18+
/// <param name="billedAzureSubscriptionId"> The Azure Subscription ID to which the Marketplace Subscription belongs and gets billed into. </param>
19+
/// <param name="isSubscribed"> Flag specifying if the Marketplace status is subscribed or not. </param>
20+
/// <returns> A new <see cref="Models.MarketplaceSaaSInfo"/> instance for mocking. </returns>
21+
// Added this method due to the change of MarketplaceSaaSInfoMarketplaceSubscription model in api version 2025-06-01 to have more properties
22+
[EditorBrowsable(EditorBrowsableState.Never)]
23+
public static MarketplaceSaaSInfo MarketplaceSaaSInfo(ResourceIdentifier marketplaceSubscriptionId = null, string marketplaceName = null, string marketplaceResourceId = null, string marketplaceStatus = null, string billedAzureSubscriptionId = null, bool? isSubscribed = null)
24+
{
25+
return MarketplaceSaaSInfo(
26+
marketplaceSubscriptionId != null ? MarketplaceSaaSInfoMarketplaceSubscription(marketplaceSubscriptionId) : null,
27+
marketplaceName,
28+
marketplaceResourceId,
29+
marketplaceStatus,
30+
billedAzureSubscriptionId,
31+
isSubscribed);
32+
}
33+
}
34+
}
Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License.
3+
4+
#nullable disable
5+
6+
using System;
7+
using System.ComponentModel;
8+
using System.Threading;
9+
using System.Threading.Tasks;
10+
using Azure.ResourceManager.Elastic.Models;
11+
12+
namespace Azure.ResourceManager.Elastic
13+
{
14+
// Added these methods because the PATCH operation changed to LRO in API version 2025-06-01.
15+
public partial class ElasticMonitorResource
16+
{
17+
/// <summary>
18+
/// Update a monitor resource.
19+
/// <list type="bullet">
20+
/// <item>
21+
/// <term>Request Path</term>
22+
/// <description>/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Elastic/monitors/{monitorName}</description>
23+
/// </item>
24+
/// <item>
25+
/// <term>Operation Id</term>
26+
/// <description>Monitors_Update</description>
27+
/// </item>
28+
/// <item>
29+
/// <term>Default Api Version</term>
30+
/// <description>2024-03-01</description>
31+
/// </item>
32+
/// <item>
33+
/// <term>Resource</term>
34+
/// <description><see cref="ElasticMonitorResource"/></description>
35+
/// </item>
36+
/// </list>
37+
/// </summary>
38+
/// <param name="patch"> Elastic resource model update parameters. </param>
39+
/// <param name="cancellationToken"> The cancellation token to use. </param>
40+
/// <exception cref="ArgumentNullException"> <paramref name="patch"/> is null. </exception>
41+
[EditorBrowsable(EditorBrowsableState.Never)]
42+
public virtual async Task<Response<ElasticMonitorResource>> UpdateAsync(ElasticMonitorPatch patch, CancellationToken cancellationToken = default)
43+
{
44+
Argument.AssertNotNull(patch, nameof(patch));
45+
var response = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken).ConfigureAwait(false);
46+
return Response.FromValue(new ElasticMonitorResource(Client, response.Value.Data), response.GetRawResponse());
47+
}
48+
49+
/// <summary>
50+
/// Update a monitor resource.
51+
/// <list type="bullet">
52+
/// <item>
53+
/// <term>Request Path</term>
54+
/// <description>/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Elastic/monitors/{monitorName}</description>
55+
/// </item>
56+
/// <item>
57+
/// <term>Operation Id</term>
58+
/// <description>Monitors_Update</description>
59+
/// </item>
60+
/// <item>
61+
/// <term>Default Api Version</term>
62+
/// <description>2024-03-01</description>
63+
/// </item>
64+
/// <item>
65+
/// <term>Resource</term>
66+
/// <description><see cref="ElasticMonitorResource"/></description>
67+
/// </item>
68+
/// </list>
69+
/// </summary>
70+
/// <param name="patch"> Elastic resource model update parameters. </param>
71+
/// <param name="cancellationToken"> The cancellation token to use. </param>
72+
/// <exception cref="ArgumentNullException"> <paramref name="patch"/> is null. </exception>
73+
[EditorBrowsable(EditorBrowsableState.Never)]
74+
public virtual Response<ElasticMonitorResource> Update(ElasticMonitorPatch patch, CancellationToken cancellationToken = default)
75+
{
76+
Argument.AssertNotNull(patch, nameof(patch));
77+
var response = Update(WaitUntil.Completed, patch, cancellationToken);
78+
return Response.FromValue(new ElasticMonitorResource(Client, response.Value.Data), response.GetRawResponse());
79+
}
80+
81+
/// <summary>
82+
/// List all traffic filters associated with your Elastic monitor resource, helping you manage network traffic control.
83+
/// <list type="bullet">
84+
/// <item>
85+
/// <term>Request Path</term>
86+
/// <description>/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Elastic/monitors/{monitorName}/listAllTrafficFilters</description>
87+
/// </item>
88+
/// <item>
89+
/// <term>Operation Id</term>
90+
/// <description>AllTrafficFilters_List</description>
91+
/// </item>
92+
/// <item>
93+
/// <term>Default Api Version</term>
94+
/// <description>2025-06-01</description>
95+
/// </item>
96+
/// </list>
97+
/// </summary>
98+
/// <param name="cancellationToken"> The cancellation token to use. </param>
99+
[EditorBrowsable(EditorBrowsableState.Never)]
100+
public virtual async Task<Response<ElasticTrafficFilterListResult>> GetAllTrafficFilterAsync(CancellationToken cancellationToken = default)
101+
=> await GetAllTrafficFiltersAsync(cancellationToken).ConfigureAwait(false);
102+
103+
/// <summary>
104+
/// List all traffic filters associated with your Elastic monitor resource, helping you manage network traffic control.
105+
/// <list type="bullet">
106+
/// <item>
107+
/// <term>Request Path</term>
108+
/// <description>/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Elastic/monitors/{monitorName}/listAllTrafficFilters</description>
109+
/// </item>
110+
/// <item>
111+
/// <term>Operation Id</term>
112+
/// <description>AllTrafficFilters_List</description>
113+
/// </item>
114+
/// <item>
115+
/// <term>Default Api Version</term>
116+
/// <description>2025-06-01</description>
117+
/// </item>
118+
/// </list>
119+
/// </summary>
120+
/// <param name="cancellationToken"> The cancellation token to use. </param>
121+
[EditorBrowsable(EditorBrowsableState.Never)]
122+
public virtual Response<ElasticTrafficFilterListResult> GetAllTrafficFilter(CancellationToken cancellationToken = default)
123+
=> GetAllTrafficFilters(cancellationToken);
124+
}
125+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License.
3+
4+
#nullable disable
5+
6+
using System;
7+
using System.Collections.Generic;
8+
9+
namespace Azure.ResourceManager.Elastic.Models
10+
{
11+
/// <summary> Properties specific to the monitor resource. </summary>
12+
public partial class ElasticMonitorProperties
13+
{
14+
/// <summary> Provisioning state of the monitor resource. </summary>
15+
public ElasticProvisioningState? ProvisioningState { get; set; }
16+
}
17+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License.
3+
4+
#nullable disable
5+
6+
using System;
7+
using System.Collections.Generic;
8+
9+
namespace Azure.ResourceManager.Elastic.Models
10+
{
11+
/// <summary> Definition of the properties for a TagRules resource. </summary>
12+
public partial class ElasticTagRuleProperties
13+
{
14+
/// <summary> Provisioning state of the monitoring tag rules. </summary>
15+
public ElasticProvisioningState? ProvisioningState { get; set; }
16+
}
17+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License.
3+
4+
#nullable disable
5+
6+
using System.ComponentModel;
7+
using Azure.Core;
8+
9+
namespace Azure.ResourceManager.Elastic.Models
10+
{
11+
// Added this custom code because the MarketplaceSaaSInfoMarketplaceSubscription model gained additional properties in API version 2025-06-01.
12+
public partial class MarketplaceSaaSInfo
13+
{
14+
/// <summary> Gets Id. </summary>
15+
[EditorBrowsable(EditorBrowsableState.Never)]
16+
public ResourceIdentifier MarketplaceSubscriptionId
17+
{
18+
get => MarketplaceSubscription?.Id;
19+
}
20+
}
21+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License.
3+
4+
#nullable disable
5+
6+
using System;
7+
using System.Collections.Generic;
8+
using Azure.Core;
9+
10+
namespace Azure.ResourceManager.Elastic.Models
11+
{
12+
/// <summary> The list of subscriptions and it's monitoring status by current Elastic monitor. </summary>
13+
public partial class MonitoredSubscription
14+
{
15+
/// <summary> Initializes a new instance of <see cref="MonitoredSubscription"/>. </summary>
16+
public MonitoredSubscription()
17+
{
18+
}
19+
}
20+
}

0 commit comments

Comments
 (0)