forked from Azure/azure-powershell
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[IotHub] Az.IotHub the Track 1 to SDK (Azure#26845)
* Az.IotHub the Track 1 to SDK * update changelog
- Loading branch information
1 parent
e6142d5
commit 2815707
Showing
141 changed files
with
27,522 additions
and
19,217 deletions.
There are no files selected for viewing
1,464 changes: 1,464 additions & 0 deletions
1,464
src/IotHub/IotHub.Management.Sdk/Generated/CertificatesOperations.cs
Large diffs are not rendered by default.
Oops, something went wrong.
307 changes: 307 additions & 0 deletions
307
src/IotHub/IotHub.Management.Sdk/Generated/CertificatesOperationsExtensions.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,307 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. See License.txt in the project root for license information. | ||
// Code generated by Microsoft (R) AutoRest Code Generator. | ||
// Changes may cause incorrect behavior and will be lost if the code is regenerated. | ||
namespace Microsoft.Azure.Management.IotHub | ||
{ | ||
using Microsoft.Rest.Azure; | ||
using Models; | ||
|
||
/// <summary> | ||
/// Extension methods for CertificatesOperations | ||
/// </summary> | ||
public static partial class CertificatesOperationsExtensions | ||
{ | ||
/// <summary> | ||
/// Returns the list of certificates. | ||
/// </summary> | ||
/// <param name='operations'> | ||
/// The operations group for this extension method. | ||
/// </param> | ||
/// <param name='resourceGroupName'> | ||
/// The name of the resource group that contains the IoT hub. | ||
/// </param> | ||
/// <param name='resourceName'> | ||
/// The name of the IoT hub. | ||
/// </param> | ||
public static CertificateListDescription ListByIotHub(this ICertificatesOperations operations, string resourceGroupName, string resourceName) | ||
{ | ||
return ((ICertificatesOperations)operations).ListByIotHubAsync(resourceGroupName, resourceName).GetAwaiter().GetResult(); | ||
} | ||
|
||
/// <summary> | ||
/// Returns the list of certificates. | ||
/// </summary> | ||
/// <param name='operations'> | ||
/// The operations group for this extension method. | ||
/// </param> | ||
/// <param name='resourceGroupName'> | ||
/// The name of the resource group that contains the IoT hub. | ||
/// </param> | ||
/// <param name='resourceName'> | ||
/// The name of the IoT hub. | ||
/// </param> | ||
/// <param name='cancellationToken'> | ||
/// The cancellation token. | ||
/// </param> | ||
public static async System.Threading.Tasks.Task<CertificateListDescription> ListByIotHubAsync(this ICertificatesOperations operations, string resourceGroupName, string resourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) | ||
{ | ||
using (var _result = await operations.ListByIotHubWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false)) | ||
{ | ||
return _result.Body; | ||
} | ||
} | ||
/// <summary> | ||
/// Returns the certificate. | ||
/// </summary> | ||
/// <param name='operations'> | ||
/// The operations group for this extension method. | ||
/// </param> | ||
/// <param name='resourceGroupName'> | ||
/// The name of the resource group that contains the IoT hub. | ||
/// </param> | ||
/// <param name='resourceName'> | ||
/// The name of the IoT hub. | ||
/// </param> | ||
/// <param name='certificateName'> | ||
/// The name of the certificate | ||
/// </param> | ||
public static CertificateDescription Get(this ICertificatesOperations operations, string resourceGroupName, string resourceName, string certificateName) | ||
{ | ||
return ((ICertificatesOperations)operations).GetAsync(resourceGroupName, resourceName, certificateName).GetAwaiter().GetResult(); | ||
} | ||
|
||
/// <summary> | ||
/// Returns the certificate. | ||
/// </summary> | ||
/// <param name='operations'> | ||
/// The operations group for this extension method. | ||
/// </param> | ||
/// <param name='resourceGroupName'> | ||
/// The name of the resource group that contains the IoT hub. | ||
/// </param> | ||
/// <param name='resourceName'> | ||
/// The name of the IoT hub. | ||
/// </param> | ||
/// <param name='certificateName'> | ||
/// The name of the certificate | ||
/// </param> | ||
/// <param name='cancellationToken'> | ||
/// The cancellation token. | ||
/// </param> | ||
public static async System.Threading.Tasks.Task<CertificateDescription> GetAsync(this ICertificatesOperations operations, string resourceGroupName, string resourceName, string certificateName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) | ||
{ | ||
using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, resourceName, certificateName, null, cancellationToken).ConfigureAwait(false)) | ||
{ | ||
return _result.Body; | ||
} | ||
} | ||
/// <summary> | ||
/// Adds new or replaces existing certificate. | ||
/// </summary> | ||
/// <param name='operations'> | ||
/// The operations group for this extension method. | ||
/// </param> | ||
/// <param name='resourceGroupName'> | ||
/// The name of the resource group that contains the IoT hub. | ||
/// </param> | ||
/// <param name='resourceName'> | ||
/// The name of the IoT hub. | ||
/// </param> | ||
/// <param name='certificateName'> | ||
/// The name of the certificate | ||
/// </param> | ||
/// <param name='ifMatch'> | ||
/// ETag of the Certificate. Do not specify for creating a brand new | ||
/// certificate. Required to update an existing certificate. | ||
/// </param> | ||
public static CertificateDescription CreateOrUpdate(this ICertificatesOperations operations, string resourceGroupName, string resourceName, string certificateName, CertificateDescription certificateDescription, string ifMatch = default(string)) | ||
{ | ||
return ((ICertificatesOperations)operations).CreateOrUpdateAsync(resourceGroupName, resourceName, certificateName, certificateDescription, ifMatch).GetAwaiter().GetResult(); | ||
} | ||
|
||
/// <summary> | ||
/// Adds new or replaces existing certificate. | ||
/// </summary> | ||
/// <param name='operations'> | ||
/// The operations group for this extension method. | ||
/// </param> | ||
/// <param name='resourceGroupName'> | ||
/// The name of the resource group that contains the IoT hub. | ||
/// </param> | ||
/// <param name='resourceName'> | ||
/// The name of the IoT hub. | ||
/// </param> | ||
/// <param name='certificateName'> | ||
/// The name of the certificate | ||
/// </param> | ||
/// <param name='ifMatch'> | ||
/// ETag of the Certificate. Do not specify for creating a brand new | ||
/// certificate. Required to update an existing certificate. | ||
/// </param> | ||
/// <param name='cancellationToken'> | ||
/// The cancellation token. | ||
/// </param> | ||
public static async System.Threading.Tasks.Task<CertificateDescription> CreateOrUpdateAsync(this ICertificatesOperations operations, string resourceGroupName, string resourceName, string certificateName, CertificateDescription certificateDescription, string ifMatch = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) | ||
{ | ||
using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, resourceName, certificateName, certificateDescription, ifMatch, null, cancellationToken).ConfigureAwait(false)) | ||
{ | ||
return _result.Body; | ||
} | ||
} | ||
/// <summary> | ||
/// Deletes an existing X509 certificate or does nothing if it does not exist. | ||
/// </summary> | ||
/// <param name='operations'> | ||
/// The operations group for this extension method. | ||
/// </param> | ||
/// <param name='resourceGroupName'> | ||
/// The name of the resource group that contains the IoT hub. | ||
/// </param> | ||
/// <param name='resourceName'> | ||
/// The name of the IoT hub. | ||
/// </param> | ||
/// <param name='certificateName'> | ||
/// The name of the certificate | ||
/// </param> | ||
/// <param name='ifMatch'> | ||
/// ETag of the Certificate. | ||
/// </param> | ||
public static void Delete(this ICertificatesOperations operations, string resourceGroupName, string resourceName, string certificateName, string ifMatch) | ||
{ | ||
((ICertificatesOperations)operations).DeleteAsync(resourceGroupName, resourceName, certificateName, ifMatch).GetAwaiter().GetResult(); | ||
} | ||
|
||
/// <summary> | ||
/// Deletes an existing X509 certificate or does nothing if it does not exist. | ||
/// </summary> | ||
/// <param name='operations'> | ||
/// The operations group for this extension method. | ||
/// </param> | ||
/// <param name='resourceGroupName'> | ||
/// The name of the resource group that contains the IoT hub. | ||
/// </param> | ||
/// <param name='resourceName'> | ||
/// The name of the IoT hub. | ||
/// </param> | ||
/// <param name='certificateName'> | ||
/// The name of the certificate | ||
/// </param> | ||
/// <param name='ifMatch'> | ||
/// ETag of the Certificate. | ||
/// </param> | ||
/// <param name='cancellationToken'> | ||
/// The cancellation token. | ||
/// </param> | ||
public static async System.Threading.Tasks.Task DeleteAsync(this ICertificatesOperations operations, string resourceGroupName, string resourceName, string certificateName, string ifMatch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) | ||
{ | ||
(await operations.DeleteWithHttpMessagesAsync(resourceGroupName, resourceName, certificateName, ifMatch, null, cancellationToken).ConfigureAwait(false)).Dispose(); | ||
} | ||
/// <summary> | ||
/// Generates verification code for proof of possession flow. The verification | ||
/// code will be used to generate a leaf certificate. | ||
/// </summary> | ||
/// <param name='operations'> | ||
/// The operations group for this extension method. | ||
/// </param> | ||
/// <param name='resourceGroupName'> | ||
/// The name of the resource group that contains the IoT hub. | ||
/// </param> | ||
/// <param name='resourceName'> | ||
/// The name of the IoT hub. | ||
/// </param> | ||
/// <param name='certificateName'> | ||
/// The name of the certificate | ||
/// </param> | ||
/// <param name='ifMatch'> | ||
/// ETag of the Certificate. | ||
/// </param> | ||
public static CertificateWithNonceDescription GenerateVerificationCode(this ICertificatesOperations operations, string resourceGroupName, string resourceName, string certificateName, string ifMatch) | ||
{ | ||
return ((ICertificatesOperations)operations).GenerateVerificationCodeAsync(resourceGroupName, resourceName, certificateName, ifMatch).GetAwaiter().GetResult(); | ||
} | ||
|
||
/// <summary> | ||
/// Generates verification code for proof of possession flow. The verification | ||
/// code will be used to generate a leaf certificate. | ||
/// </summary> | ||
/// <param name='operations'> | ||
/// The operations group for this extension method. | ||
/// </param> | ||
/// <param name='resourceGroupName'> | ||
/// The name of the resource group that contains the IoT hub. | ||
/// </param> | ||
/// <param name='resourceName'> | ||
/// The name of the IoT hub. | ||
/// </param> | ||
/// <param name='certificateName'> | ||
/// The name of the certificate | ||
/// </param> | ||
/// <param name='ifMatch'> | ||
/// ETag of the Certificate. | ||
/// </param> | ||
/// <param name='cancellationToken'> | ||
/// The cancellation token. | ||
/// </param> | ||
public static async System.Threading.Tasks.Task<CertificateWithNonceDescription> GenerateVerificationCodeAsync(this ICertificatesOperations operations, string resourceGroupName, string resourceName, string certificateName, string ifMatch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) | ||
{ | ||
using (var _result = await operations.GenerateVerificationCodeWithHttpMessagesAsync(resourceGroupName, resourceName, certificateName, ifMatch, null, cancellationToken).ConfigureAwait(false)) | ||
{ | ||
return _result.Body; | ||
} | ||
} | ||
/// <summary> | ||
/// Verifies the certificate's private key possession by providing the leaf | ||
/// cert issued by the verifying pre uploaded certificate. | ||
/// </summary> | ||
/// <param name='operations'> | ||
/// The operations group for this extension method. | ||
/// </param> | ||
/// <param name='resourceGroupName'> | ||
/// The name of the resource group that contains the IoT hub. | ||
/// </param> | ||
/// <param name='resourceName'> | ||
/// The name of the IoT hub. | ||
/// </param> | ||
/// <param name='certificateName'> | ||
/// The name of the certificate | ||
/// </param> | ||
/// <param name='ifMatch'> | ||
/// ETag of the Certificate. | ||
/// </param> | ||
public static CertificateDescription Verify(this ICertificatesOperations operations, string resourceGroupName, string resourceName, string certificateName, string ifMatch, CertificateVerificationDescription certificateVerificationBody) | ||
{ | ||
return ((ICertificatesOperations)operations).VerifyAsync(resourceGroupName, resourceName, certificateName, ifMatch, certificateVerificationBody).GetAwaiter().GetResult(); | ||
} | ||
|
||
/// <summary> | ||
/// Verifies the certificate's private key possession by providing the leaf | ||
/// cert issued by the verifying pre uploaded certificate. | ||
/// </summary> | ||
/// <param name='operations'> | ||
/// The operations group for this extension method. | ||
/// </param> | ||
/// <param name='resourceGroupName'> | ||
/// The name of the resource group that contains the IoT hub. | ||
/// </param> | ||
/// <param name='resourceName'> | ||
/// The name of the IoT hub. | ||
/// </param> | ||
/// <param name='certificateName'> | ||
/// The name of the certificate | ||
/// </param> | ||
/// <param name='ifMatch'> | ||
/// ETag of the Certificate. | ||
/// </param> | ||
/// <param name='cancellationToken'> | ||
/// The cancellation token. | ||
/// </param> | ||
public static async System.Threading.Tasks.Task<CertificateDescription> VerifyAsync(this ICertificatesOperations operations, string resourceGroupName, string resourceName, string certificateName, string ifMatch, CertificateVerificationDescription certificateVerificationBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) | ||
{ | ||
using (var _result = await operations.VerifyWithHttpMessagesAsync(resourceGroupName, resourceName, certificateName, ifMatch, certificateVerificationBody, null, cancellationToken).ConfigureAwait(false)) | ||
{ | ||
return _result.Body; | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.