/// <summary> /// Creates a new edge module or updates an existing one. /// </summary> /// <remarks> /// Creates a new edge module or updates an existing one. An edge module /// resource enables a single instance of an Azure Video Analyzer IoT edge /// module to interact with the Video Analyzer Account. This is used for /// authorization and also to make sure that the particular edge module /// instance only has access to the data it requires from the Azure Video /// Analyzer service. A new edge module resource should be created for every /// new instance of an Azure Video Analyzer edge module deployed to you Azure /// IoT edge environment. Edge module resources can be deleted if the specific /// module is not in use anymore. /// </remarks> /// <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='accountName'> /// The Azure Video Analyzer account name. /// </param> /// <param name='edgeModuleName'> /// The Edge Module name. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <EdgeModuleEntity> CreateOrUpdateAsync(this IEdgeModulesOperations operations, string resourceGroupName, string accountName, string edgeModuleName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, accountName, edgeModuleName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// List all existing edge module resources. /// </summary> /// <remarks> /// List all existing edge module resources, along with their JSON /// representations. /// </remarks> /// <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='accountName'> /// The Azure Video Analyzer account name. /// </param> /// <param name='top'> /// Specifies a non-negative integer n that limits the number of items returned /// from a collection. The service returns the number of available items up to /// but not greater than the specified value n. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <EdgeModuleEntity> > ListAsync(this IEdgeModulesOperations operations, string resourceGroupName, string accountName, int?top = default(int?), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, accountName, top, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// List all existing edge module resources. /// </summary> /// <remarks> /// List all existing edge module resources, along with their JSON /// representations. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='nextPageLink'> /// The NextLink from the previous successful call to List operation. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <EdgeModuleEntity> > ListNextAsync(this IEdgeModulesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Retrieves an existing edge module resource. /// </summary> /// <remarks> /// Retrieves an existing edge module resource with the given name. /// </remarks> /// <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='accountName'> /// The Azure Video Analyzer account name. /// </param> /// <param name='edgeModuleName'> /// The Edge Module name. /// </param> public static EdgeModuleEntity Get(this IEdgeModulesOperations operations, string resourceGroupName, string accountName, string edgeModuleName) { return(operations.GetAsync(resourceGroupName, accountName, edgeModuleName).GetAwaiter().GetResult()); }
/// <summary> /// List all existing edge module resources. /// </summary> /// <remarks> /// List all existing edge module resources, along with their JSON /// representations. /// </remarks> /// <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='accountName'> /// The Azure Video Analyzer account name. /// </param> /// <param name='top'> /// Specifies a non-negative integer n that limits the number of items returned /// from a collection. The service returns the number of available items up to /// but not greater than the specified value n. /// </param> public static IPage <EdgeModuleEntity> List(this IEdgeModulesOperations operations, string resourceGroupName, string accountName, int?top = default(int?)) { return(operations.ListAsync(resourceGroupName, accountName, top).GetAwaiter().GetResult()); }
/// <summary> /// List all existing edge module resources. /// </summary> /// <remarks> /// List all existing edge module resources, along with their JSON /// representations. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='nextPageLink'> /// The NextLink from the previous successful call to List operation. /// </param> public static IPage <EdgeModuleEntity> ListNext(this IEdgeModulesOperations operations, string nextPageLink) { return(operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult()); }
/// <summary> /// Creates a new provisioning token. /// </summary> /// <remarks> /// Creates a new provisioning token. A provisioning token allows for a single /// instance of Azure Video analyzer IoT edge module to be initialized and /// authorized to the cloud account. The provisioning token itself is short /// lived and it is only used for the initial handshake between IoT edge module /// and the cloud. After the initial handshake, the IoT edge module will agree /// on a set of authentication keys which will be auto-rotated as long as the /// module is able to periodically connect to the cloud. A new provisioning /// token can be generated for the same IoT edge module in case the module /// state lost or reset. /// </remarks> /// <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='accountName'> /// The Azure Video Analyzer account name. /// </param> /// <param name='edgeModuleName'> /// The Edge Module name. /// </param> /// <param name='expirationDate'> /// The desired expiration date of the registration token. The Azure Video /// Analyzer IoT edge module must be initialized and connected to the Internet /// prior to the token expiration date. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <EdgeModuleProvisioningToken> ListProvisioningTokenAsync(this IEdgeModulesOperations operations, string resourceGroupName, string accountName, string edgeModuleName, System.DateTime expirationDate, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListProvisioningTokenWithHttpMessagesAsync(resourceGroupName, accountName, edgeModuleName, expirationDate, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Creates a new provisioning token. /// </summary> /// <remarks> /// Creates a new provisioning token. A provisioning token allows for a single /// instance of Azure Video analyzer IoT edge module to be initialized and /// authorized to the cloud account. The provisioning token itself is short /// lived and it is only used for the initial handshake between IoT edge module /// and the cloud. After the initial handshake, the IoT edge module will agree /// on a set of authentication keys which will be auto-rotated as long as the /// module is able to periodically connect to the cloud. A new provisioning /// token can be generated for the same IoT edge module in case the module /// state lost or reset. /// </remarks> /// <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='accountName'> /// The Azure Video Analyzer account name. /// </param> /// <param name='edgeModuleName'> /// The Edge Module name. /// </param> /// <param name='expirationDate'> /// The desired expiration date of the registration token. The Azure Video /// Analyzer IoT edge module must be initialized and connected to the Internet /// prior to the token expiration date. /// </param> public static EdgeModuleProvisioningToken ListProvisioningToken(this IEdgeModulesOperations operations, string resourceGroupName, string accountName, string edgeModuleName, System.DateTime expirationDate) { return(operations.ListProvisioningTokenAsync(resourceGroupName, accountName, edgeModuleName, expirationDate).GetAwaiter().GetResult()); }
/// <summary> /// Deletes an existing edge module resource. /// </summary> /// <remarks> /// Deletes an existing edge module resource. Deleting the edge module resource /// will prevent an Azure Video Analyzer IoT edge module which was previously /// initiated with the module provisioning token from communicating with the /// cloud. /// </remarks> /// <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='accountName'> /// The Azure Video Analyzer account name. /// </param> /// <param name='edgeModuleName'> /// The Edge Module name. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task DeleteAsync(this IEdgeModulesOperations operations, string resourceGroupName, string accountName, string edgeModuleName, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, accountName, edgeModuleName, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Deletes an existing edge module resource. /// </summary> /// <remarks> /// Deletes an existing edge module resource. Deleting the edge module resource /// will prevent an Azure Video Analyzer IoT edge module which was previously /// initiated with the module provisioning token from communicating with the /// cloud. /// </remarks> /// <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='accountName'> /// The Azure Video Analyzer account name. /// </param> /// <param name='edgeModuleName'> /// The Edge Module name. /// </param> public static void Delete(this IEdgeModulesOperations operations, string resourceGroupName, string accountName, string edgeModuleName) { operations.DeleteAsync(resourceGroupName, accountName, edgeModuleName).GetAwaiter().GetResult(); }