-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
Showing
48 changed files
with
6,933 additions
and
297 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
sdk/azurestackhci/Microsoft.Azure.Management.AzureStackHCI/AzSdk.RP.props
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<!--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--> | ||
<PropertyGroup> | ||
<AzureApiTag>AzureStackHCI_2020-10-01;</AzureApiTag> | ||
<AzureApiTag>AzureStackHCI_2021-01-01-preview;</AzureApiTag> | ||
<PackageTags>$(PackageTags);$(CommonTags);$(AzureApiTag);</PackageTags> | ||
</PropertyGroup> | ||
</Project> |
60 changes: 60 additions & 0 deletions
60
...tackhci/Microsoft.Azure.Management.AzureStackHCI/src/Customizations/ClustersOperations.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
namespace Microsoft.Azure.Management.AzureStackHCI | ||
{ | ||
using Microsoft.Rest; | ||
using Microsoft.Rest.Azure; | ||
using Models; | ||
using System.Collections; | ||
using System.Collections.Generic; | ||
using System.Threading; | ||
using System.Threading.Tasks; | ||
|
||
/// <summary> | ||
/// ClustersOperations operations. | ||
/// </summary> | ||
internal partial class ClustersOperations : IServiceOperations<AzureStackHCIClient>, IClustersOperations | ||
{ | ||
/// <summary> | ||
/// Update an HCI cluster. | ||
/// </summary> | ||
/// <param name='resourceGroupName'> | ||
/// The name of the resource group. The name is case insensitive. | ||
/// </param> | ||
/// <param name='clusterName'> | ||
/// The name of the cluster. | ||
/// </param> | ||
/// <param name='tags'> | ||
/// Resource tags. | ||
/// </param> | ||
/// <param name='customHeaders'> | ||
/// Headers that will be added to request. | ||
/// </param> | ||
/// <param name='cancellationToken'> | ||
/// The cancellation token. | ||
/// </param> | ||
/// <exception cref="ErrorResponseException"> | ||
/// Thrown when the operation returned an invalid status code | ||
/// </exception> | ||
/// <exception cref="SerializationException"> | ||
/// Thrown when unable to deserialize the response | ||
/// </exception> | ||
/// <exception cref="ValidationException"> | ||
/// Thrown when a required parameter is null | ||
/// </exception> | ||
/// <exception cref="System.ArgumentNullException"> | ||
/// Thrown when a required parameter is null | ||
/// </exception> | ||
/// <return> | ||
/// A response object containing the response body and response headers. | ||
/// </return> | ||
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)) | ||
{ | ||
var clusterPatch = new ClusterPatch(); | ||
if (tags != null) | ||
{ | ||
clusterPatch.Tags = tags; | ||
} | ||
|
||
return await UpdateWithHttpMessagesAsync(resourceGroupName, clusterName, clusterPatch, customHeaders, cancellationToken); | ||
} | ||
} | ||
} |
42 changes: 42 additions & 0 deletions
42
...crosoft.Azure.Management.AzureStackHCI/src/Customizations/ClustersOperationsExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
namespace Microsoft.Azure.Management.AzureStackHCI | ||
{ | ||
using Microsoft.Rest; | ||
using Microsoft.Rest.Azure; | ||
using Models; | ||
using System.Collections; | ||
using System.Collections.Generic; | ||
using System.Threading; | ||
using System.Threading.Tasks; | ||
|
||
/// <summary> | ||
/// Extension methods for ClustersOperations. | ||
/// </summary> | ||
public static partial class ClustersOperationsExtensions | ||
{ | ||
/// <summary> | ||
/// Update an HCI cluster. | ||
/// </summary> | ||
/// <param name='operations'> | ||
/// The operations group for this extension method. | ||
/// </param> | ||
/// <param name='resourceGroupName'> | ||
/// The name of the resource group. The name is case insensitive. | ||
/// </param> | ||
/// <param name='clusterName'> | ||
/// The name of the cluster. | ||
/// </param> | ||
/// <param name='tags'> | ||
/// Resource tags. | ||
/// </param> | ||
public static Cluster Update(this IClustersOperations operations, string resourceGroupName, string clusterName, IDictionary<string, string> tags = default(IDictionary<string, string>)) | ||
{ | ||
var clusterPatch = new ClusterPatch(); | ||
if (tags != null) | ||
{ | ||
clusterPatch.Tags = tags; | ||
} | ||
|
||
return operations.Update(resourceGroupName, clusterName, clusterPatch); | ||
} | ||
} | ||
} |
45 changes: 45 additions & 0 deletions
45
...ackhci/Microsoft.Azure.Management.AzureStackHCI/src/Customizations/IClustersOperations.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
namespace Microsoft.Azure.Management.AzureStackHCI | ||
{ | ||
using Microsoft.Rest; | ||
using Microsoft.Rest.Azure; | ||
using Models; | ||
using System.Collections; | ||
using System.Collections.Generic; | ||
using System.Threading; | ||
using System.Threading.Tasks; | ||
|
||
/// <summary> | ||
/// ClustersOperations operations. | ||
/// </summary> | ||
public partial interface IClustersOperations | ||
{ | ||
/// <summary> | ||
/// Update an HCI cluster. | ||
/// </summary> | ||
/// <param name='resourceGroupName'> | ||
/// The name of the resource group. The name is case insensitive. | ||
/// </param> | ||
/// <param name='clusterName'> | ||
/// The name of the cluster. | ||
/// </param> | ||
/// <param name='tags'> | ||
/// Resource tags. | ||
/// </param> | ||
/// <param name='customHeaders'> | ||
/// The headers that will be added to request. | ||
/// </param> | ||
/// <param name='cancellationToken'> | ||
/// The cancellation token. | ||
/// </param> | ||
/// <exception cref="ErrorResponseException"> | ||
/// Thrown when the operation returned an invalid status code | ||
/// </exception> | ||
/// <exception cref="Microsoft.Rest.SerializationException"> | ||
/// Thrown when unable to deserialize the response | ||
/// </exception> | ||
/// <exception cref="Microsoft.Rest.ValidationException"> | ||
/// Thrown when a required parameter is null | ||
/// </exception> | ||
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)); | ||
} | ||
} |
Oops, something went wrong.