public final class StorageCredentialsAccountAndKey extends StorageCredentials
| Constructor and Description |
|---|
StorageCredentialsAccountAndKey(String accountName,
byte[] key)
Creates an instance of the
StorageCredentialsAccountAndKey class, using the specified storage
account name and access key; the specified access key is in the form of a byte array. |
StorageCredentialsAccountAndKey(String accountName,
String key)
Creates an instance of the
StorageCredentialsAccountAndKey class, using the specified storage
account name and access key; the specified access key is stored as a String. |
| Modifier and Type | Method and Description |
|---|---|
String |
getAccountKeyName()
Gets the name of the key used by these credentials.
|
String |
getAccountName()
Returns the associated account name for the credentials.
|
Credentials |
getCredentials()
Returns the internal credentials associated with the storage credentials.
|
void |
setCredentials(Credentials credentials)
Sets the credentials.
|
String |
toString(boolean exportSecrets)
Returns a
String that represents this instance, optionally including sensitive data. |
StorageUri |
transformUri(StorageUri resourceUri,
OperationContext opContext)
Transforms a resource URI into a shared access signature URI, by appending a shared access token and using the
specified operation context.
|
URI |
transformUri(URI resourceUri,
OperationContext opContext)
Transforms a resource URI into a shared access signature URI, by appending a shared access token and using the
specified operation context.
|
transformUri, transformUri, tryParseCredentials, tryParseCredentialspublic StorageCredentialsAccountAndKey(String accountName, byte[] key)
StorageCredentialsAccountAndKey class, using the specified storage
account name and access key; the specified access key is in the form of a byte array.accountName - A String that represents the name of the storage account.key - An array of bytes that represent the account access key.public StorageCredentialsAccountAndKey(String accountName, String key)
StorageCredentialsAccountAndKey class, using the specified storage
account name and access key; the specified access key is stored as a String.accountName - A String that represents the name of the storage account.key - A String that represents the Base-64-encoded account access key.public String getAccountName()
getAccountName in class StorageCredentialsString that contains the account name for the credentials.public String getAccountKeyName()
public Credentials getCredentials()
Credentials object that contains the internal credentials associated with this instance of
the StorageCredentialsAccountAndKey class.public void setCredentials(Credentials credentials)
credentials - A Credentials object that represents the credentials to set for this instance of the
StorageCredentialsAccountAndKey class.public String toString(boolean exportSecrets)
String that represents this instance, optionally including sensitive data.toString in class StorageCredentialsexportSecrets - true to include sensitive data in the return string; otherwise, false.String that represents this object, optionally including sensitive data.public URI transformUri(URI resourceUri, OperationContext opContext)
StorageCredentialstransformUri in class StorageCredentialsresourceUri - A java.net.URI object that represents the resource URI to be transformed.opContext - An OperationContext object that represents the context for the current operation. This object
is used to track requests to the storage service, and to provide additional runtime information about
the operation.java.net.URI object that represents the signature, including the resource URI and the
shared access token.public StorageUri transformUri(StorageUri resourceUri, OperationContext opContext)
StorageCredentialstransformUri in class StorageCredentialsresourceUri - A StorageUri object that represents the resource URI to be transformed.opContext - An OperationContext object that represents the context for the current operation. This object
is used to track requests to the storage service, and to provide additional runtime information about
the operation.StorageUri object that represents the signature, including the resource URI and the
shared access token./**
* Copyright Microsoft Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/