Class MetricsAdvisorKeyCredential
java.lang.Object
com.azure.ai.metricsadvisor.models.MetricsAdvisorKeyCredential
The MetricsAdvisorKeyCredential class.
-
Constructor Summary
ConstructorDescriptionMetricsAdvisorKeyCredential
(String subscriptionKey, String apiKey) Creates a MetricsAdvisorKeyCredential credential that authorizes request with the given keys. -
Method Summary
Modifier and TypeMethodDescriptiongetKeys()
Retrieves theMetricsAdvisorKeys
containing the subscription key and api key associated with this credential.Update the subscription and api key associated to this credential.
-
Constructor Details
-
MetricsAdvisorKeyCredential
Creates a MetricsAdvisorKeyCredential credential that authorizes request with the given keys.- Parameters:
subscriptionKey
- the subscription key used to authorize requestsapiKey
- the api key used to authorize requests
-
-
Method Details
-
getKeys
Retrieves theMetricsAdvisorKeys
containing the subscription key and api key associated with this credential.- Returns:
- The
MetricsAdvisorKeys
containing the subscription key and api key.
-
updateKey
Update the subscription and api key associated to this credential.This is intended to be used when you've regenerated your subscription key and api key want to update long lived clients.
- Parameters:
subscriptionKey
- The new subscription key to associated with this credential.apiKey
- The new api key to associated with this credential.- Returns:
- The updated
MetricsAdvisorKeyCredential
object.
-