Skip to content

Commit 6e517ed

Browse files
authored
[MetricsAdvisor] Renamed MAKeyCredential parameters (Azure#18261)
1 parent 08d2f3e commit 6e517ed

File tree

3 files changed

+22
-18
lines changed

3 files changed

+22
-18
lines changed

sdk/metricsadvisor/Azure.AI.MetricsAdvisor/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
### New Features
66
- Added support for AAD authentication in `MetricsAdvisorClient` and `MetricsAdvisorAdministrationClient`.
77

8+
### Breaking Changes
9+
- In `MetricsAdvisorKeyCredential`, renamed the parameter `key` to `subscriptionKey` in the method `UpdateSubscriptionKey`.
10+
- In `MetricsAdvisorKeyCredential`, renamed the parameter `key` to `apiKey` in the method `UpdateApiKey`.
11+
812
### Key Bug Fixes
913
- Fixed a bug in which setting `WebNotificationHook.CertificatePassword` would actually set the property `Username` instead.
1014
- Fixed a bug in which an `ArgumentNullException` was thrown when getting a `DataFeed` from the service as a Viewer.

sdk/metricsadvisor/Azure.AI.MetricsAdvisor/api/Azure.AI.MetricsAdvisor.netstandard2.0.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,8 @@ public enum ServiceVersion
216216
public partial class MetricsAdvisorKeyCredential
217217
{
218218
public MetricsAdvisorKeyCredential(string subscriptionKey, string apiKey) { }
219-
public void UpdateApiKey(string key) { }
220-
public void UpdateSubscriptionKey(string key) { }
219+
public void UpdateApiKey(string apiKey) { }
220+
public void UpdateSubscriptionKey(string subscriptionKey) { }
221221
}
222222
}
223223
namespace Azure.AI.MetricsAdvisor.Administration

sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/MetricsAdvisorKeyCredential.cs

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ public class MetricsAdvisorKeyCredential
2020
/// <summary>
2121
/// Initializes a new instance of the <see cref="MetricsAdvisorKeyCredential"/> class.
2222
/// </summary>
23-
/// <param name="subscriptionKey">Key to use to authenticate with the Azure service.</param>
24-
/// <param name="apiKey">Key to use to authenticate the user with the Metrics Advisor service. Used to identify administrators.</param>
23+
/// <param name="subscriptionKey">The subscription key to use to authenticate with the Azure service.</param>
24+
/// <param name="apiKey">The API key to use to authenticate the user with the Metrics Advisor service. Used to identify administrators.</param>
2525
/// <exception cref="ArgumentNullException"><paramref name="subscriptionKey"/> or <paramref name="apiKey"/> is null.</exception>
2626
/// <exception cref="ArgumentException"><paramref name="subscriptionKey"/> or <paramref name="apiKey"/> is empty.</exception>
2727
public MetricsAdvisorKeyCredential(string subscriptionKey, string apiKey)
@@ -43,29 +43,29 @@ internal string ApiKey
4343
}
4444

4545
/// <summary>
46-
/// Updates the service key. This is intended to be used when you've regenerated
47-
/// your service key and want to update long lived clients.
46+
/// Updates the subscription key. This is intended to be used when you've regenerated
47+
/// your subscription key and want to update long lived clients.
4848
/// </summary>
49-
/// <param name="key">Key to authenticate the service against.</param>
50-
/// <exception cref="ArgumentNullException"><paramref name="key"/> is null.</exception>
51-
/// <exception cref="ArgumentException"><paramref name="key"/> is empty.</exception>
52-
public void UpdateSubscriptionKey(string key)
49+
/// <param name="subscriptionKey">The subscription key to authenticate the service against.</param>
50+
/// <exception cref="ArgumentNullException"><paramref name="subscriptionKey"/> is null.</exception>
51+
/// <exception cref="ArgumentException"><paramref name="subscriptionKey"/> is empty.</exception>
52+
public void UpdateSubscriptionKey(string subscriptionKey)
5353
{
54-
Argument.AssertNotNullOrEmpty(key, nameof(key));
55-
SubscriptionKey = key;
54+
Argument.AssertNotNullOrEmpty(subscriptionKey, nameof(subscriptionKey));
55+
SubscriptionKey = subscriptionKey;
5656
}
5757

5858
/// <summary>
5959
/// Updates the API key. This is intended to be used when you've regenerated your
6060
/// API key and want to update long lived clients.
6161
/// </summary>
62-
/// <param name="key">Key to use to authenticate the user with the Metrics Advisor service. Used to identify administrators.</param>
63-
/// <exception cref="ArgumentNullException"><paramref name="key"/> is null.</exception>
64-
/// <exception cref="ArgumentException"><paramref name="key"/> is empty.</exception>
65-
public void UpdateApiKey(string key)
62+
/// <param name="apiKey">The API key to use to authenticate the user with the Metrics Advisor service. Used to identify administrators.</param>
63+
/// <exception cref="ArgumentNullException"><paramref name="apiKey"/> is null.</exception>
64+
/// <exception cref="ArgumentException"><paramref name="apiKey"/> is empty.</exception>
65+
public void UpdateApiKey(string apiKey)
6666
{
67-
Argument.AssertNotNullOrEmpty(key, nameof(key));
68-
ApiKey = key;
67+
Argument.AssertNotNullOrEmpty(apiKey, nameof(apiKey));
68+
ApiKey = apiKey;
6969
}
7070
}
7171
}

0 commit comments

Comments
 (0)