Exemple #1
0
 /// <summary>
 /// Regenerates specified gateway key invalidating any tokens created with it.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='serviceName'>
 /// The name of the API Management service.
 /// </param>
 /// <param name='gatewayId'>
 /// Gateway entity identifier. Must be unique in the current API Management
 /// service instance. Must not have value 'managed'
 /// </param>
 /// <param name='parameters'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task RegenerateKeyAsync(this IGatewayOperations operations, string resourceGroupName, string serviceName, string gatewayId, GatewayKeyRegenerationRequestContract parameters, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.RegenerateKeyWithHttpMessagesAsync(resourceGroupName, serviceName, gatewayId, parameters, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
Exemple #2
0
 /// <summary>
 /// Regenerates specified gateway key invalidating any tokens created with it.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='serviceName'>
 /// The name of the API Management service.
 /// </param>
 /// <param name='gatewayId'>
 /// Gateway entity identifier. Must be unique in the current API Management
 /// service instance. Must not have value 'managed'
 /// </param>
 /// <param name='parameters'>
 /// </param>
 public static void RegenerateKey(this IGatewayOperations operations, string resourceGroupName, string serviceName, string gatewayId, GatewayKeyRegenerationRequestContract parameters)
 {
     operations.RegenerateKeyAsync(resourceGroupName, serviceName, gatewayId, parameters).GetAwaiter().GetResult();
 }