Partager via


MetricsAdvisorKeyCredential Class

  • java.lang.Object
    • com.azure.ai.metricsadvisor.models.MetricsAdvisorKeyCredential

public final class MetricsAdvisorKeyCredential

The MetricsAdvisorKeyCredential class.

Constructor Summary

Constructor Description
MetricsAdvisorKeyCredential(String subscriptionKey, String apiKey)

Creates a MetricsAdvisorKeyCredential credential that authorizes request with the given keys.

Method Summary

Modifier and Type Method and Description
MetricsAdvisorKeys getKeys()

Retrieves the MetricsAdvisorKeys containing the subscription key and api key associated with this credential.

MetricsAdvisorKeyCredential updateKey(String subscriptionKey, String apiKey)

Update the subscription and api key associated to this credential.

Methods inherited from java.lang.Object

Constructor Details

MetricsAdvisorKeyCredential

public MetricsAdvisorKeyCredential(String subscriptionKey, String apiKey)

Creates a MetricsAdvisorKeyCredential credential that authorizes request with the given keys.

Parameters:

subscriptionKey - the subscription key used to authorize requests
apiKey - the api key used to authorize requests

Method Details

getKeys

public MetricsAdvisorKeys getKeys()

Retrieves the MetricsAdvisorKeys containing the subscription key and api key associated with this credential.

Returns:

The MetricsAdvisorKeys containing the subscription key and api key.

updateKey

public MetricsAdvisorKeyCredential updateKey(String subscriptionKey, String apiKey)

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.

Applies to