Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MetricsAdvisor] Renamed MAKeyCredential parameters #18261

Merged
merged 4 commits into from
Jan 28, 2021
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions sdk/metricsadvisor/Azure.AI.MetricsAdvisor/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
### New Features
- Added support for AAD authentication in `MetricsAdvisorClient` and `MetricsAdvisorAdministrationClient`.

### Breaking Changes
- In `MetricsAdvisorKeyCredential`, renamed the parameter `key` to `subscriptionKey` in the method `UpdateSubscriptionKey`.
- In `MetricsAdvisorKeyCredential`, renamed the parameter `key` to `apiKey` in the method `UpdateApiKey`.

### Key Bug Fixes
- Fixed a bug in which setting `WebNotificationHook.CertificatePassword` would actually set the property `Username` instead.
- Fixed a bug in which an `ArgumentNullException` was thrown when getting a `DataFeed` from the service as a Viewer.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,8 @@ public enum ServiceVersion
public partial class MetricsAdvisorKeyCredential
{
public MetricsAdvisorKeyCredential(string subscriptionKey, string apiKey) { }
public void UpdateApiKey(string key) { }
public void UpdateSubscriptionKey(string key) { }
public void UpdateApiKey(string apiKey) { }
public void UpdateSubscriptionKey(string subscriptionKey) { }
}
}
namespace Azure.AI.MetricsAdvisor.Administration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,26 +46,26 @@ internal string ApiKey
/// Updates the service key. This is intended to be used when you've regenerated
/// your service key and want to update long lived clients.
/// </summary>
/// <param name="key">Key to authenticate the service against.</param>
/// <exception cref="ArgumentNullException"><paramref name="key"/> is null.</exception>
/// <exception cref="ArgumentException"><paramref name="key"/> is empty.</exception>
public void UpdateSubscriptionKey(string key)
/// <param name="subscriptionKey">Key to authenticate the service against.</param>
kinelski marked this conversation as resolved.
Show resolved Hide resolved
/// <exception cref="ArgumentNullException"><paramref name="subscriptionKey"/> is null.</exception>
/// <exception cref="ArgumentException"><paramref name="subscriptionKey"/> is empty.</exception>
public void UpdateSubscriptionKey(string subscriptionKey)
{
Argument.AssertNotNullOrEmpty(key, nameof(key));
SubscriptionKey = key;
Argument.AssertNotNullOrEmpty(subscriptionKey, nameof(subscriptionKey));
SubscriptionKey = subscriptionKey;
}

/// <summary>
/// Updates the API key. This is intended to be used when you've regenerated your
/// API key and want to update long lived clients.
/// </summary>
/// <param name="key">Key to use to authenticate the user with the Metrics Advisor service. Used to identify administrators.</param>
/// <exception cref="ArgumentNullException"><paramref name="key"/> is null.</exception>
/// <exception cref="ArgumentException"><paramref name="key"/> is empty.</exception>
public void UpdateApiKey(string key)
/// <param name="apiKey">Key to use to authenticate the user with the Metrics Advisor service. Used to identify administrators.</param>
kinelski marked this conversation as resolved.
Show resolved Hide resolved
/// <exception cref="ArgumentNullException"><paramref name="apiKey"/> is null.</exception>
/// <exception cref="ArgumentException"><paramref name="apiKey"/> is empty.</exception>
public void UpdateApiKey(string apiKey)
{
Argument.AssertNotNullOrEmpty(key, nameof(key));
ApiKey = key;
Argument.AssertNotNullOrEmpty(apiKey, nameof(apiKey));
ApiKey = apiKey;
}
}
}