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