Skip to content

Commit 70f8a46

Browse files
authored
Microsoft.AzureStackHCI new api preview - 2021-01-01-preview (#21880)
* Generate SDK for 2021-01-01-preview * Update Azure Stack HCI tests * Regenerate with generate.ps1 * Mitigate breaking changes with customizations
1 parent e065745 commit 70f8a46

Some content is hidden

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

48 files changed

+6933
-297
lines changed

eng/mgmt/mgmtmetadata/azurestackhci_resource-manager.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@ Commencing code generation
44
Generating CSharp code
55
Executing AutoRest command
66
cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/azurestackhci/resource-manager/readme.md --csharp --version=v2 --reflect-api-versions --csharp-sdks-folder=F:\repos\azure-sdk-for-net\sdk
7-
2020-10-08 01:23:51 UTC
7+
Autorest CSharp Version: 2.3.84
8+
2021-06-25 21:34:02 UTC
89
Azure-rest-api-specs repository information
910
GitHub fork: Azure
1011
Branch: master
11-
Commit: 27cc07ddd294d98e05cb301e07a72378df9f87e8
12+
Commit: 8dff86df71bee429af84ea4713288ef3cdd1db2f
1213
AutoRest information
1314
Requested version: v2
14-
Bootstrapper version: autorest@2.0.4413
15+
Bootstrapper version: autorest@3.2.3
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
22
<!--This file and it's contents are updated at build time moving or editing might result in build failure. Take due deligence while editing this file-->
33
<PropertyGroup>
4-
<AzureApiTag>AzureStackHCI_2020-10-01;</AzureApiTag>
4+
<AzureApiTag>AzureStackHCI_2021-01-01-preview;</AzureApiTag>
55
<PackageTags>$(PackageTags);$(CommonTags);$(AzureApiTag);</PackageTags>
66
</PropertyGroup>
77
</Project>
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
namespace Microsoft.Azure.Management.AzureStackHCI
2+
{
3+
using Microsoft.Rest;
4+
using Microsoft.Rest.Azure;
5+
using Models;
6+
using System.Collections;
7+
using System.Collections.Generic;
8+
using System.Threading;
9+
using System.Threading.Tasks;
10+
11+
/// <summary>
12+
/// ClustersOperations operations.
13+
/// </summary>
14+
internal partial class ClustersOperations : IServiceOperations<AzureStackHCIClient>, IClustersOperations
15+
{
16+
/// <summary>
17+
/// Update an HCI cluster.
18+
/// </summary>
19+
/// <param name='resourceGroupName'>
20+
/// The name of the resource group. The name is case insensitive.
21+
/// </param>
22+
/// <param name='clusterName'>
23+
/// The name of the cluster.
24+
/// </param>
25+
/// <param name='tags'>
26+
/// Resource tags.
27+
/// </param>
28+
/// <param name='customHeaders'>
29+
/// Headers that will be added to request.
30+
/// </param>
31+
/// <param name='cancellationToken'>
32+
/// The cancellation token.
33+
/// </param>
34+
/// <exception cref="ErrorResponseException">
35+
/// Thrown when the operation returned an invalid status code
36+
/// </exception>
37+
/// <exception cref="SerializationException">
38+
/// Thrown when unable to deserialize the response
39+
/// </exception>
40+
/// <exception cref="ValidationException">
41+
/// Thrown when a required parameter is null
42+
/// </exception>
43+
/// <exception cref="System.ArgumentNullException">
44+
/// Thrown when a required parameter is null
45+
/// </exception>
46+
/// <return>
47+
/// A response object containing the response body and response headers.
48+
/// </return>
49+
public async Task<AzureOperationResponse<Cluster>> UpdateWithHttpMessagesAsync(string resourceGroupName, string clusterName, IDictionary<string, string> tags = default(IDictionary<string, string>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
50+
{
51+
var clusterPatch = new ClusterPatch();
52+
if (tags != null)
53+
{
54+
clusterPatch.Tags = tags;
55+
}
56+
57+
return await UpdateWithHttpMessagesAsync(resourceGroupName, clusterName, clusterPatch, customHeaders, cancellationToken);
58+
}
59+
}
60+
}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
namespace Microsoft.Azure.Management.AzureStackHCI
2+
{
3+
using Microsoft.Rest;
4+
using Microsoft.Rest.Azure;
5+
using Models;
6+
using System.Collections;
7+
using System.Collections.Generic;
8+
using System.Threading;
9+
using System.Threading.Tasks;
10+
11+
/// <summary>
12+
/// Extension methods for ClustersOperations.
13+
/// </summary>
14+
public static partial class ClustersOperationsExtensions
15+
{
16+
/// <summary>
17+
/// Update an HCI cluster.
18+
/// </summary>
19+
/// <param name='operations'>
20+
/// The operations group for this extension method.
21+
/// </param>
22+
/// <param name='resourceGroupName'>
23+
/// The name of the resource group. The name is case insensitive.
24+
/// </param>
25+
/// <param name='clusterName'>
26+
/// The name of the cluster.
27+
/// </param>
28+
/// <param name='tags'>
29+
/// Resource tags.
30+
/// </param>
31+
public static Cluster Update(this IClustersOperations operations, string resourceGroupName, string clusterName, IDictionary<string, string> tags = default(IDictionary<string, string>))
32+
{
33+
var clusterPatch = new ClusterPatch();
34+
if (tags != null)
35+
{
36+
clusterPatch.Tags = tags;
37+
}
38+
39+
return operations.Update(resourceGroupName, clusterName, clusterPatch);
40+
}
41+
}
42+
}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
namespace Microsoft.Azure.Management.AzureStackHCI
2+
{
3+
using Microsoft.Rest;
4+
using Microsoft.Rest.Azure;
5+
using Models;
6+
using System.Collections;
7+
using System.Collections.Generic;
8+
using System.Threading;
9+
using System.Threading.Tasks;
10+
11+
/// <summary>
12+
/// ClustersOperations operations.
13+
/// </summary>
14+
public partial interface IClustersOperations
15+
{
16+
/// <summary>
17+
/// Update an HCI cluster.
18+
/// </summary>
19+
/// <param name='resourceGroupName'>
20+
/// The name of the resource group. The name is case insensitive.
21+
/// </param>
22+
/// <param name='clusterName'>
23+
/// The name of the cluster.
24+
/// </param>
25+
/// <param name='tags'>
26+
/// Resource tags.
27+
/// </param>
28+
/// <param name='customHeaders'>
29+
/// The headers that will be added to request.
30+
/// </param>
31+
/// <param name='cancellationToken'>
32+
/// The cancellation token.
33+
/// </param>
34+
/// <exception cref="ErrorResponseException">
35+
/// Thrown when the operation returned an invalid status code
36+
/// </exception>
37+
/// <exception cref="Microsoft.Rest.SerializationException">
38+
/// Thrown when unable to deserialize the response
39+
/// </exception>
40+
/// <exception cref="Microsoft.Rest.ValidationException">
41+
/// Thrown when a required parameter is null
42+
/// </exception>
43+
Task<AzureOperationResponse<Cluster>> UpdateWithHttpMessagesAsync(string resourceGroupName, string clusterName, IDictionary<string, string> tags = default(IDictionary<string, string>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
44+
}
45+
}

0 commit comments

Comments
 (0)