public final class AzureKeyCredential
extends java.lang.Object
| Constructor and Description |
|---|
AzureKeyCredential(java.lang.String key)
Creates a credential that authorizes request with the given key.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getKey()
Retrieves the key associated to this credential.
|
AzureKeyCredential |
update(java.lang.String key)
Rotates the key associated to this credential.
|
public AzureKeyCredential(java.lang.String key)
key - The key used to authorize requests.java.lang.NullPointerException - If key is null.java.lang.IllegalArgumentException - If key is an empty string.public java.lang.String getKey()
public AzureKeyCredential update(java.lang.String key)
key - The new key to associated with this credential.ApiKeyCredential object.java.lang.NullPointerException - If key is null.java.lang.IllegalArgumentException - If key is an empty string.