Share via


StorageCredentials クラス

定義

Microsoft Azure ストレージ アカウントへのアクセスを認証するために使用される資格情報のセットを表します。

public sealed class StorageCredentials
type StorageCredentials = class
Public NotInheritable Class StorageCredentials
継承
StorageCredentials


// Create a CloudStorageAccount object using account name and key.
// The account name should be just the name of a Storage Account, not a URI, and 
// not including the suffix. The key should be a base-64 encoded string that you
// can acquire from the portal, or from the management plane.
// This will have full permissions to all operations on the account.
StorageCredentials storageCredentials = new StorageCredentials(myAccountName, myAccountKey);
CloudStorageAccount cloudStorageAccount = new CloudStorageAccount(storageCredentials, useHttps: true);

// Create a CloudBlobClient object from the storage account.
// This object is the root object for all operations on the 
// blob service for this particular account.
CloudBlobClient blobClient = cloudStorageAccount.CreateCloudBlobClient();

// Get a reference to a CloudBlobContainer object in this account. 
// This object can be used to create the container on the service, 
// list blobs, delete the container, etc. This operation does not make a 
// call to the Azure Storage service.  It neither creates the container 
// on the service, nor validates its existence.
CloudBlobContainer container = blobClient.GetContainerReference("container1");


// Create a CloudQueueClient object from the storage account.
// This object is the root object for all operations on the 
// queue service for this particular account.
CloudQueueClient queueClient = cloudStorageAccount.CreateCloudQueueClient();

// Get a reference to a CloudQueue object in this account. 
// This object can be used to create the queue on the service, 
// delete the queue, add messages, etc. This operation does not
// make a call to the Azure Storage service.  It neither creates 
// the queue on the service, nor validates its existence.
CloudQueue queue = queueClient.GetQueueReference("queue1");

// Create a CloudFileClient object from the storage account.
// This object is the root object for all operations on the 
// file service for this particular account.
CloudFileClient fileClient = cloudStorageAccount.CreateCloudFileClient();

// Get a reference to a CloudFileShare object in this account. 
// This object can be used to create the share on the service, 
// delete the share, list files and directories, etc. This operation 
// does not make a call to the Azure Storage service. It neither 
// creates the share on the service, nor validates its existence.
CloudFileShare share = fileClient.GetShareReference("share1");

コンストラクター

StorageCredentials()

StorageCredentials クラスの新しいインスタンスを初期化します。

StorageCredentials(String)

指定された共有アクセス署名トークンを使用して、StorageCredentials クラスの新しいインスタンスを初期化します。

StorageCredentials(String, Byte[])

指定されたアカウント名とキー値を使用して、StorageCredentials クラスの新しいインスタンスを初期化します。

StorageCredentials(String, Byte[], String)

指定されたアカウント名、キー値、およびキー名を使用して、StorageCredentials クラスの新しいインスタンスを初期化します。

StorageCredentials(String, String)

指定されたアカウント名とキー値を使用して、StorageCredentials クラスの新しいインスタンスを初期化します。

StorageCredentials(String, String, String)

指定されたアカウント名、キー値、およびキー名を使用して、StorageCredentials クラスの新しいインスタンスを初期化します。

StorageCredentials(TokenCredential)

指定したベアラー トークンを使用して、 StorageCredentials クラスの新しいインスタンスを初期化します。

プロパティ

AccountName

資格情報に関連付けられているアカウントの名前を取得します。

IsAnonymous

資格情報が匿名アクセス用であるかどうかを示す値を取得します。

IsSAS

資格情報が共有アクセス署名トークンかどうかを示す値を取得します。

IsSharedKey

資格情報が共有キーであるかどうかを示す値を取得します。

IsToken

資格情報がベアラー トークンであるかどうかを示す値を取得します。

KeyName

資格情報に関連付けられているキーの名前を取得します。

SASSignature

共有アクセス署名トークンの パラメーターの値を sig 取得します。

SASToken

資格情報に関連付けられている共有アクセス署名トークンを取得します。

メソッド

Equals(StorageCredentials)

SAS トークン、アカウント名、キー名、およびキー値を比較することによって、このオブジェクトが他の StorageCredentials オブジェクトと等しいかどうかを確認します。

ExportBase64EncodedKey()

アカウント アクセス キーの値を Base64 エンコード文字列にエクスポートします。

ExportKey()

資格情報のアカウント キーを返します。

TransformUri(StorageUri)

共有アクセス トークンを追加することで、リソース URI を共有アクセス署名 URI に変換します。

TransformUri(Uri)

共有アクセス トークンを追加することで、リソース URI を共有アクセス署名 URI に変換します。

UpdateKey(Byte[])

資格情報のキー値を更新します。

UpdateKey(Byte[], String)

資格情報のキー値とキー名を更新します。

UpdateKey(String)

資格情報のキー値を更新します。

UpdateKey(String, String)

資格情報のキー値とキー名を更新します。

UpdateSASToken(String)

共有アクセス署名で作成されたストレージの資格情報に使用する共有アクセス署名 (SAS) トークン値を更新します。

適用対象