Introduzione agli strumenti di sviluppo per l'archiviazione di Azure Stack HubGet started with Azure Stack Hub storage development tools
Microsoft Azure Stack Hub fornisce un set di servizi di archiviazione che include archiviazione BLOB, tabelle e code.Microsoft Azure Stack Hub provides a set of storage services that includes blob, table, and queue storage.
Usare questo articolo come guida per iniziare a usare gli strumenti di sviluppo dell'archiviazione Hub Azure Stack.Use this article as a guide to get started using Azure Stack Hub storage development tools. È possibile trovare informazioni più dettagliate e codice di esempio nelle esercitazioni corrispondenti di archiviazione di Azure.You can find more detailed information and sample code in corresponding Azure storage tutorials.
Nota
Esistono differenze tra l'archiviazione dell'hub Azure Stack e l'archiviazione di Azure, inclusi i requisiti specifici per ogni piattaforma.There are differences between Azure Stack Hub storage and Azure storage, including specific requirements for each platform. Esistono, ad esempio, specifiche librerie client e requisiti dei suffissi endpoint per Azure Stack Hub.For example, there are specific client libraries and endpoint suffix requirements for Azure Stack Hub. Per altre informazioni, vedere Azure stack storage hub: differenze e considerazioni.For more information, see Azure Stack Hub storage: Differences and considerations.
Librerie client di AzureAzure client libraries
Per le librerie client di archiviazione, tenere presente la versione compatibile con l'API REST.For the storage client libraries, be aware of the version that is compatible with the REST API. È anche necessario specificare l'endpoint dell'hub Azure Stack nel codice.You must also specify the Azure Stack Hub endpoint in your code.
aggiornamento 20082008 update
Installare il client PHP tramite Composer - correnteInstall PHP client via Composer - current
Per eseguire l'installazione tramite Composer: (usare il BLOB come esempio).To install via Composer: (take the blob as an example).
Creare un file denominato composer.json nella radice del progetto con il codice seguente:Create a file named composer.json in the root of the project with following code:
{ "require": { "Microsoft/azure-storage-blob":"1.2.0" } }
Scaricare Composer. phar nella radice del progetto.Download composer.phar to the project root.
Eseguire:
php composer.phar install
.Run:php composer.phar install
.
aggiornamento 20052005 update
Installare il client PHP tramite Composer - correnteInstall PHP client via Composer - current
Per eseguire l'installazione tramite Composer: (usare il BLOB come esempio).To install via Composer: (take the blob as an example).
Creare un file denominato composer.json nella radice del progetto con il codice seguente:Create a file named composer.json in the root of the project with following code:
{ "require": { "Microsoft/azure-storage-blob":"1.2.0" } }
Scaricare Composer. phar nella radice del progetto.Download composer.phar to the project root.
Eseguire:
php composer.phar install
.Run:php composer.phar install
.
Versioni precedenti (aggiornamento da 1811 a 2002)Previous versions (1811 to 2002 update)
Installare il client PHP tramite Composer - correnteInstall PHP client via Composer - current
Per eseguire l'installazione tramite Composer: (usare il BLOB come esempio).To install via Composer: (take the blob as an example).
Creare un file denominato composer.json nella radice del progetto con il codice seguente:Create a file named composer.json in the root of the project with following code:
{ "require": { "Microsoft/azure-storage-blob":"1.2.0" } }
Scaricare Composer. phar nella radice del progetto.Download composer.phar to the project root.
Eseguire:
php composer.phar install
.Run:php composer.phar install
.
Versioni precedenti (aggiornamento da 1802 a 1809)Previous versions (1802 to 1809 update)
Installare il client PHP tramite Composer-PreviousInstall PHP client via Composer - previous
Per l'installazione tramite Composer: (prendere BLOB come esempio).To install via Composer: (take blob as example).
Creare un file denominato composer.json nella radice del progetto con il codice seguente:Create a file named composer.json in the root of the project with following code:
{ "require": { "Microsoft/azure-storage-blob":"1.0.0" } }
Scaricare Composer. phar nella radice del progetto.Download composer.phar to the project root.
Eseguire:
php composer.phar install
.Run:php composer.phar install
.
Dichiarazione dell'endpointEndpoint declaration
Un endpoint dell'hub Azure Stack include due parti: il nome di un'area e il dominio dell'hub Azure Stack.An Azure Stack Hub endpoint includes two parts: the name of a region and the Azure Stack Hub domain. Nell'Azure Stack Development Kit l'endpoint predefinito è local. azurestack. External.In the Azure Stack Development Kit, the default endpoint is local.azurestack.external. Se non si è certi dell'endpoint, contattare l'amministratore del cloud.Contact your cloud admin if you're not sure about your endpoint.
EsempiExamples
.NET.NET
Per Azure Stack Hub, il suffisso dell'endpoint viene specificato nel file di app.config:For Azure Stack Hub, the endpoint suffix is specified in the app.config file:
<add key="StorageConnectionString"
value="DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=mykey;
EndpointSuffix=local.azurestack.external;" />
JavaJava
Per Azure Stack Hub, il suffisso dell'endpoint viene specificato nell'installazione della stringa di connessione:For Azure Stack Hub, the endpoint suffix is specified in the setup of connection string:
public static final String storageConnectionString =
"DefaultEndpointsProtocol=http;" +
"AccountName=your_storage_account;" +
"AccountKey=your_storage_account_key;" +
"EndpointSuffix=local.azurestack.external";
Node.jsNode.js
Per Azure Stack Hub, il suffisso dell'endpoint viene specificato nell'istanza della dichiarazione:For Azure Stack Hub, the endpoint suffix is specified in the declaration instance:
var blobSvc = azure.createBlobService('myaccount', 'mykey',
'myaccount.blob.local.azurestack.external');
C++C++
Per Azure Stack Hub, il suffisso dell'endpoint viene specificato nell'installazione della stringa di connessione:For Azure Stack Hub, the endpoint suffix is specified in the setup of connection string:
const utility::string_t storage_connection_string(U("DefaultEndpointsProtocol=https;
AccountName=your_storage_account;
AccountKey=your_storage_account_key;
EndpointSuffix=local.azurestack.external"));
PHPPHP
Per Azure Stack Hub, il suffisso dell'endpoint viene specificato nell'installazione della stringa di connessione:For Azure Stack Hub, the endpoint suffix is specified in the setup of connection string:
$connectionString = 'BlobEndpoint=https://<storage account name>.blob.local.azurestack.external/;
QueueEndpoint=https:// <storage account name>.queue.local.azurestack.external/;
TableEndpoint=https:// <storage account name>.table.local.azurestack.external/;
AccountName=<storage account name>;AccountKey=<storage account key>'
PythonPython
Per Azure Stack Hub, il suffisso dell'endpoint viene specificato nell'istanza della dichiarazione:For Azure Stack Hub, the endpoint suffix is specified in the declaration instance:
block_blob_service = BlockBlobService(account_name='myaccount',
account_key='mykey',
endpoint_suffix='local.azurestack.external')
RubyRuby
Per Azure Stack Hub, il suffisso dell'endpoint viene specificato nell'installazione della stringa di connessione:For Azure Stack Hub, the endpoint suffix is specified in the setup of connection string:
set
AZURE_STORAGE_CONNECTION_STRING=DefaultEndpointsProtocol=https;
AccountName=myaccount;
AccountKey=mykey;
EndpointSuffix=local.azurestack.external
Archiviazione BLOBBlob storage
Le esercitazioni di archiviazione BLOB di Azure seguenti sono applicabili all'hub Azure Stack.The following Azure Blob storage tutorials are applicable to Azure Stack Hub. Si noti il requisito specifico del suffisso dell'endpoint per Azure Stack Hub descritto nella sezione esempi precedenti.Note the specific endpoint suffix requirement for Azure Stack Hub described in the previous Examples section.
- Introduzione all'archiviazione BLOB di Azure con .NETGet started with Azure Blob storage using .NET
- Come usare l'archiviazione BLOB da JavaHow to use Blob storage from Java
- Come usare l'archiviazione BLOB da Node.jsHow to use Blob storage from Node.js
- Come usare l'archiviazione BLOB da C++How to use Blob storage from C++
- Come usare l'archiviazione BLOB da PHPHow to use Blob storage from PHP
- Come usare l'archiviazione BLOB di Azure da PythonHow to use Azure Blob storage from Python
- Come usare l'archiviazione BLOB da RubyHow to use Blob storage from Ruby
Archiviazione codeQueue storage
Le esercitazioni di archiviazione code di Azure seguenti sono applicabili all'hub Azure Stack.The following Azure Queue storage tutorials are applicable to Azure Stack Hub. Si noti il requisito specifico del suffisso dell'endpoint per Azure Stack Hub descritto nella sezione esempi precedenti.Note the specific endpoint suffix requirement for Azure Stack Hub described in the previous Examples section.
- Introduzione all'archiviazione code di Azure con .NETGet started with Azure Queue storage using .NET
- Come usare l'archiviazione di accodamento da JavaHow to use Queue storage from Java
- Come usare l'archiviazione di accodamento da Node.jsHow to use Queue storage from Node.js
- Come usare l'archiviazione di Accodamento da C++How to use Queue storage from C++
- Come usare l'archiviazione di accodamento da PHPHow to use Queue storage from PHP
- Come usare l'archiviazione di accodamento da PythonHow to use Queue storage from Python
- Come usare l'archiviazione di accodamento da RubyHow to use Queue storage from Ruby
Archiviazione tabelleTable storage
Le esercitazioni seguenti sull'archiviazione tabelle di Azure sono applicabili all'hub Azure Stack.The following Azure Table storage tutorials are applicable to Azure Stack Hub. Si noti il requisito specifico del suffisso dell'endpoint per Azure Stack Hub descritto nella sezione esempi precedenti.Note the specific endpoint suffix requirement for Azure Stack Hub described in the previous Examples section.
- Introduzione all'archiviazione tabelle di Azure con .NETGet started with Azure Table storage using .NET
- Come usare l'archiviazione tabelle da JavaHow to use Table storage from Java
- Come usare l'archiviazione tabelle di Azure da Node.jsHow to use Azure Table storage from Node.js
- Come usare l'archiviazione tabelle da C++How to use Table storage from C++
- Come usare l'archiviazione tabelle da PHPHow to use Table storage from PHP
- Come usare l'archiviazione tabelle in PythonHow to use Table storage in Python
- Come usare l'archiviazione tabelle da RubyHow to use Table storage from Ruby