public virtual async Task <Response <AccessKeys> > RegenerateKeysAsync(RegenerateAccessKeyOptions options, CancellationToken cancellationToken = default) { Argument.AssertNotNull(options, nameof(options)); using var scope = _namespaceAuthorizationRuleClientDiagnostics.CreateScope("NamespaceAuthorizationRuleResource.RegenerateKeys"); scope.Start(); try { var response = await _namespaceAuthorizationRuleRestClient.RegenerateKeysAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, options, cancellationToken).ConfigureAwait(false); return(response); } catch (Exception e) { scope.Failed(e); throw; } }
public async virtual Task <Response <AccessKeys> > RegenerateKeysAsync(RegenerateAccessKeyOptions parameters, CancellationToken cancellationToken = default) { if (parameters == null) { throw new ArgumentNullException(nameof(parameters)); } using var scope = _clientDiagnostics.CreateScope("NamespaceAuthorizationRule.RegenerateKeys"); scope.Start(); try { var response = await _namespaceAuthorizationRulesRestClient.RegenerateKeysAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, parameters, cancellationToken).ConfigureAwait(false); return(response); } catch (Exception e) { scope.Failed(e); throw; } }