Introdução às ferramentas de desenvolvimento de armazenamento de Hub Azure StackGet started with Azure Stack Hub storage development tools

O Hub de Microsoft Azure Stack fornece um conjunto de serviços de armazenamento que inclui armazenamento de BLOBs, tabelas e filas.Microsoft Azure Stack Hub provides a set of storage services that includes blob, table, and queue storage.

Use este artigo como um guia para começar a usar as ferramentas de desenvolvimento de armazenamento do Azure Stack Hub.Use this article as a guide to get started using Azure Stack Hub storage development tools. Você pode encontrar informações mais detalhadas e código de exemplo em Tutoriais de armazenamento do Azure correspondentes.You can find more detailed information and sample code in corresponding Azure storage tutorials.

Observação

Há diferenças entre o armazenamento de Hub Azure Stack e o armazenamento do Azure, incluindo requisitos específicos para cada plataforma.There are differences between Azure Stack Hub storage and Azure storage, including specific requirements for each platform. Por exemplo, há bibliotecas de cliente específicas e requisitos de sufixo de ponto de extremidade para Azure Stack Hub.For example, there are specific client libraries and endpoint suffix requirements for Azure Stack Hub. Para obter mais informações, consulte Azure Stack o armazenamento de Hub: diferenças e considerações.For more information, see Azure Stack Hub storage: Differences and considerations.

Bibliotecas de clientes do AzureAzure client libraries

Para as bibliotecas de cliente de armazenamento, esteja ciente da versão compatível com a API REST.For the storage client libraries, be aware of the version that is compatible with the REST API. Você também deve especificar o ponto de extremidade do hub de Azure Stack em seu código.You must also specify the Azure Stack Hub endpoint in your code.

atualização 2005 ou versões mais recentes2005 update or newer versions

Biblioteca do clienteClient library Versão com suporte do hub de Azure StackAzure Stack Hub supported version LinkLink Especificação do ponto de extremidadeEndpoint specification
.NET.NET 11.0.011.0.0 Pacote NuGet:Nuget package:
Comum: https://www.nuget.org/packages/Microsoft.Azure.Storage.Common/11.0.0Common: https://www.nuget.org/packages/Microsoft.Azure.Storage.Common/11.0.0
Blob: https://www.nuget.org/packages/Microsoft.Azure.Storage.Blob/11.0.0Blob: https://www.nuget.org/packages/Microsoft.Azure.Storage.Blob/11.0.0
EsperaQueue:
https://www.nuget.org/packages/Microsoft.Azure.Storage.Queue/11.0.0

Versão do GitHub:GitHub release:
https://github.com/Azure/azure-storage-net/releases/tag/v11.0.0
app.config fileapp.config file
JavaJava 12.0.0-Preview. 312.0.0-preview.3 Pacote Maven:Maven package:
https://mvnrepository.com/artifact/com.azure/azure-storage-file/12.0.0-preview.3

Versão do GitHub:GitHub release:
https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/storage
Configuração de cadeia de conexãoConnection string setup
Node.jsNode.js 2.8.32.8.3 Link do NPM:NPM link:
https://www.npmjs.com/package/azure-storage
(Executar: npm install azure-storage@2.8.3 )(Run: npm install azure-storage@2.8.3)

Versão do GitHub:GitHub release:
https://github.com/Azure/azure-storage-node/releases/tag/v2.8.3
Declaração de instância de serviçoService instance declaration
C++C++ 7.1.07.1.0 Versão do GitHub:GitHub release:
https://github.com/Azure/azure-storage-cpp/releases/tag/v7.1.0
Configuração de cadeia de conexãoConnection string setup
PHPPHP 1.2.01.2.0 Versão do GitHub:GitHub release:
Comum: https://github.com/Azure/azure-storage-php/releases/tag/v1.2.0-commonCommon: https://github.com/Azure/azure-storage-php/releases/tag/v1.2.0-common
Blob: https://github.com/Azure/azure-storage-php/releases/tag/v1.2.0-blobBlob: https://github.com/Azure/azure-storage-php/releases/tag/v1.2.0-blob
EsperaQueue:
https://github.com/Azure/azure-storage-php/releases/tag/v1.1.1-queue
Tabela https://github.com/Azure/azure-storage-php/releases/tag/v1.1.0-tableTable: https://github.com/Azure/azure-storage-php/releases/tag/v1.1.0-table

Instale por meio do Composer (para saber mais, Confira os detalhes abaixo).Install via Composer (To learn more, see the details below.)
Configuração de cadeia de conexãoConnection string setup
PythonPython 2.1.02.1.0 Versão do GitHub:GitHub release:
CommonCommon:
https://github.com/Azure/azure-storage-python/releases/tag/v2.1.0-common
Blob:Blob:
https://github.com/Azure/azure-storage-python/releases/tag/v2.1.0-blob
EsperaQueue:
https://github.com/Azure/azure-storage-python/releases/tag/v2.1.0-queue
Declaração de instância de serviçoService instance declaration
RubyRuby 1.0.11.0.1 Pacote do RubyGems:RubyGems package:
CommonCommon:
https://rubygems.org/gems/azure-storage-common/versions/1.0.1
Blob: https://rubygems.org/gems/azure-storage-blob/versions/1.0.1Blob: https://rubygems.org/gems/azure-storage-blob/versions/1.0.1
Espera https://rubygems.org/gems/azure-storage-queue/versions/1.0.1Queue: https://rubygems.org/gems/azure-storage-queue/versions/1.0.1
Tabela https://rubygems.org/gems/azure-storage-table/versions/1.0.1Table: https://rubygems.org/gems/azure-storage-table/versions/1.0.1

Versão do GitHub:GitHub release:
Comum: https://github.com/Azure/azure-storage-ruby/releases/tag/v1.0.1-commonCommon: https://github.com/Azure/azure-storage-ruby/releases/tag/v1.0.1-common
Blob: https://github.com/Azure/azure-storage-ruby/releases/tag/v1.0.1-blobBlob: https://github.com/Azure/azure-storage-ruby/releases/tag/v1.0.1-blob
Espera https://github.com/Azure/azure-storage-ruby/releases/tag/v1.0.1-queueQueue: https://github.com/Azure/azure-storage-ruby/releases/tag/v1.0.1-queue
Tabela https://github.com/Azure/azure-storage-ruby/releases/tag/v1.0.1-tableTable: https://github.com/Azure/azure-storage-ruby/releases/tag/v1.0.1-table
Configuração de cadeia de conexãoConnection string setup

Instalar o cliente PHP por meio do Composer - atualInstall PHP client via Composer - current

Para instalar por meio do Composer: (pegue o blob como um exemplo).To install via Composer: (take the blob as an example).

  1. Crie um arquivo chamado composer.js no na raiz do projeto com o seguinte código:Create a file named composer.json in the root of the project with following code:

    {
      "require": {
      "Microsoft/azure-storage-blob":"1.2.0"
      }
    }
    
  2. Baixe o Composer. Phar para a raiz do projeto.Download composer.phar to the project root.

  3. Execute: php composer.phar install.Run: php composer.phar install.

Versões anteriores (1811 a 2002 atualização)Previous versions (1811 to 2002 update)

Biblioteca do clienteClient library Versão com suporte do hub de Azure StackAzure Stack Hub supported version LinkLink Especificação do ponto de extremidadeEndpoint specification
.NET.NET 9.2.09.2.0 Pacote NuGet:Nuget package:
https://www.nuget.org/packages/WindowsAzure.Storage/9.2.0

Versão do GitHub:GitHub release:
https://github.com/Azure/azure-storage-net/releases/tag/v9.2.0
app.config fileapp.config file
JavaJava 7.0.07.0.0 Pacote Maven:Maven package:
https://mvnrepository.com/artifact/com.microsoft.azure/azure-storage/7.0.0

Versão do GitHub:GitHub release:
https://github.com/Azure/azure-storage-java/releases/tag/v7.0.0
Configuração de cadeia de conexãoConnection string setup
Node.jsNode.js 2.8.32.8.3 Link do NPM:NPM link:
https://www.npmjs.com/package/azure-storage
(Executar: npm install azure-storage@2.8.3 )(Run: npm install azure-storage@2.8.3)

Versão do GitHub:GitHub release:
https://github.com/Azure/azure-storage-node/releases/tag/v2.8.3
Declaração de instância de serviçoService instance declaration
C++C++ 5.2.05.2.0 Pacote NuGet:Nuget package:
https://www.nuget.org/packages/Microsoft.Azure.Storage.CPP.v140/5.2.0

Versão do GitHub:GitHub release:
https://github.com/Azure/azure-storage-cpp/releases/tag/v5.2.0
Configuração de cadeia de conexãoConnection string setup
PHPPHP 1.2.01.2.0 Versão do GitHub:GitHub release:
Comum: https://github.com/Azure/azure-storage-php/releases/tag/v1.2.0-commonCommon: https://github.com/Azure/azure-storage-php/releases/tag/v1.2.0-common
Blob: https://github.com/Azure/azure-storage-php/releases/tag/v1.2.0-blobBlob: https://github.com/Azure/azure-storage-php/releases/tag/v1.2.0-blob
EsperaQueue:
https://github.com/Azure/azure-storage-php/releases/tag/v1.1.1-queue
Tabela https://github.com/Azure/azure-storage-php/releases/tag/v1.1.0-tableTable: https://github.com/Azure/azure-storage-php/releases/tag/v1.1.0-table

Instale por meio do Composer (para saber mais, Confira os detalhes abaixo).Install via Composer (To learn more, see the details below.)
Configuração de cadeia de conexãoConnection string setup
PythonPython 1.1.01.1.0 Versão do GitHub:GitHub release:
CommonCommon:
https://github.com/Azure/azure-storage-python/releases/tag/v1.1.0-common
Blob:Blob:
https://github.com/Azure/azure-storage-python/releases/tag/v1.1.0-blob
EsperaQueue:
https://github.com/Azure/azure-storage-python/releases/tag/v1.1.0-queue
Declaração de instância de serviçoService instance declaration
RubyRuby 1.0.11.0.1 Pacote do RubyGems:RubyGems package:
CommonCommon:
https://rubygems.org/gems/azure-storage-common/versions/1.0.1
Blob: https://rubygems.org/gems/azure-storage-blob/versions/1.0.1Blob: https://rubygems.org/gems/azure-storage-blob/versions/1.0.1
Espera https://rubygems.org/gems/azure-storage-queue/versions/1.0.1Queue: https://rubygems.org/gems/azure-storage-queue/versions/1.0.1
Tabela https://rubygems.org/gems/azure-storage-table/versions/1.0.1Table: https://rubygems.org/gems/azure-storage-table/versions/1.0.1

Versão do GitHub:GitHub release:
Comum: https://github.com/Azure/azure-storage-ruby/releases/tag/v1.0.1-commonCommon: https://github.com/Azure/azure-storage-ruby/releases/tag/v1.0.1-common
Blob: https://github.com/Azure/azure-storage-ruby/releases/tag/v1.0.1-blobBlob: https://github.com/Azure/azure-storage-ruby/releases/tag/v1.0.1-blob
Espera https://github.com/Azure/azure-storage-ruby/releases/tag/v1.0.1-queueQueue: https://github.com/Azure/azure-storage-ruby/releases/tag/v1.0.1-queue
Tabela https://github.com/Azure/azure-storage-ruby/releases/tag/v1.0.1-tableTable: https://github.com/Azure/azure-storage-ruby/releases/tag/v1.0.1-table
Configuração de cadeia de conexãoConnection string setup

Instalar o cliente PHP por meio do Composer - atualInstall PHP client via Composer - current

Para instalar por meio do Composer: (pegue o blob como um exemplo).To install via Composer: (take the blob as an example).

  1. Crie um arquivo chamado composer.js no na raiz do projeto com o seguinte código:Create a file named composer.json in the root of the project with following code:

    {
      "require": {
      "Microsoft/azure-storage-blob":"1.2.0"
      }
    }
    
  2. Baixe o Composer. Phar para a raiz do projeto.Download composer.phar to the project root.

  3. Execute: php composer.phar install.Run: php composer.phar install.

Versões anteriores (1802 a 1809 atualização)Previous versions (1802 to 1809 update)

Biblioteca do clienteClient library Versão com suporte do hub de Azure StackAzure Stack Hub supported version LinkLink Especificação do ponto de extremidadeEndpoint specification
.NET.NET 8.7.08.7.0 Pacote NuGet:Nuget package:
https://www.nuget.org/packages/WindowsAzure.Storage/8.7.0

Versão do GitHub:GitHub release:
https://github.com/Azure/azure-storage-net/releases/tag/v8.7.0
app.config fileapp.config file
JavaJava 6.1.06.1.0 Pacote Maven:Maven package:
https://mvnrepository.com/artifact/com.microsoft.azure/azure-storage/6.1.0

Versão do GitHub:GitHub release:
https://github.com/Azure/azure-storage-java/releases/tag/v6.1.0
Configuração de cadeia de conexãoConnection string setup
Node.jsNode.js 2.7.02.7.0 Link do NPM:NPM link:
https://www.npmjs.com/package/azure-storage
(Executar: npm install azure-storage@2.7.0 )(Run: npm install azure-storage@2.7.0)

Versão do GitHub:GitHub release:
https://github.com/Azure/azure-storage-node/releases/tag/v2.7.0
Declaração de instância de serviçoService instance declaration
C++C++ 3.1.03.1.0 Pacote NuGet:Nuget package:
https://www.nuget.org/packages/wastorage.v140/3.1.0

Versão do GitHub:GitHub release:
https://github.com/Azure/azure-storage-cpp/releases/tag/v3.1.0
Configuração de cadeia de conexãoConnection string setup
PHPPHP 1.0.01.0.0 Versão do GitHub:GitHub release:
Comum: https://github.com/Azure/azure-storage-php/releases/tag/v1.0.0-commonCommon: https://github.com/Azure/azure-storage-php/releases/tag/v1.0.0-common
Blob: https://github.com/Azure/azure-storage-php/releases/tag/v1.0.0-blobBlob: https://github.com/Azure/azure-storage-php/releases/tag/v1.0.0-blob
EsperaQueue:
https://github.com/Azure/azure-storage-php/releases/tag/v1.0.0-queue
Tabela https://github.com/Azure/azure-storage-php/releases/tag/v1.0.0-tableTable: https://github.com/Azure/azure-storage-php/releases/tag/v1.0.0-table

Instale por meio do Composer (consulte os detalhes abaixo).)Install via Composer (see the details below).)
Configuração de cadeia de conexãoConnection string setup
PythonPython 1.0.01.0.0 Versão do GitHub:GitHub release:
CommonCommon:
https://github.com/Azure/azure-storage-python/releases/tag/v1.0.0-common
Blob:Blob:
https://github.com/Azure/azure-storage-python/releases/tag/v1.0.0-blob
EsperaQueue:
https://github.com/Azure/azure-storage-python/releases/tag/v1.0.0-queue
Declaração de instância de serviçoService instance declaration
RubyRuby 1.0.11.0.1 Pacote do RubyGems:RubyGems package:
CommonCommon:
https://rubygems.org/gems/azure-storage-common/versions/1.0.1
Blob: https://rubygems.org/gems/azure-storage-blob/versions/1.0.1Blob: https://rubygems.org/gems/azure-storage-blob/versions/1.0.1
Espera https://rubygems.org/gems/azure-storage-queue/versions/1.0.1Queue: https://rubygems.org/gems/azure-storage-queue/versions/1.0.1
Tabela https://rubygems.org/gems/azure-storage-table/versions/1.0.1Table: https://rubygems.org/gems/azure-storage-table/versions/1.0.1

Versão do GitHub:GitHub release:
Comum: https://github.com/Azure/azure-storage-ruby/releases/tag/v1.0.1-commonCommon: https://github.com/Azure/azure-storage-ruby/releases/tag/v1.0.1-common
Blob: https://github.com/Azure/azure-storage-ruby/releases/tag/v1.0.1-blobBlob: https://github.com/Azure/azure-storage-ruby/releases/tag/v1.0.1-blob
Espera https://github.com/Azure/azure-storage-ruby/releases/tag/v1.0.1-queueQueue: https://github.com/Azure/azure-storage-ruby/releases/tag/v1.0.1-queue
Tabela https://github.com/Azure/azure-storage-ruby/releases/tag/v1.0.1-tableTable: https://github.com/Azure/azure-storage-ruby/releases/tag/v1.0.1-table
Configuração de cadeia de conexãoConnection string setup

Instalar o cliente PHP por meio do Composer-anteriorInstall PHP client via Composer - previous

Para instalar por meio do Compoer: (tome blob como exemplo).To install via Composer: (take blob as example).

  1. Crie um arquivo chamado composer.js no na raiz do projeto com o seguinte código:Create a file named composer.json in the root of the project with following code:

     {
       "require": {
       "Microsoft/azure-storage-blob":"1.0.0"
       }
     }
    
  2. Baixe o Composer. Phar para a raiz do projeto.Download composer.phar to the project root.

  3. Execute: php composer.phar install.Run: php composer.phar install.

Declaração de ponto de extremidadeEndpoint declaration

Um ponto de extremidade de Hub de Azure Stack inclui duas partes: o nome de uma região e o domínio do hub de Azure Stack.An Azure Stack Hub endpoint includes two parts: the name of a region and the Azure Stack Hub domain. No Kit de Desenvolvimento do Azure Stack, o ponto de extremidade padrão é local. azurestack. external.In the Azure Stack Development Kit, the default endpoint is local.azurestack.external. Entre em contato com seu administrador de nuvem se você não tiver certeza sobre seu ponto de extremidade.Contact your cloud admin if you're not sure about your endpoint.

ExemplosExamples

.NET.NET

Para Azure Stack Hub, o sufixo do ponto de extremidade é especificado no arquivo de 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

Para Azure Stack Hub, o sufixo do ponto de extremidade é especificado na configuração da cadeia de conexão: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

Para Azure Stack Hub, o sufixo do ponto de extremidade é especificado na instância da declaração: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++

Para Azure Stack Hub, o sufixo do ponto de extremidade é especificado na configuração da cadeia de conexão: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

Para Azure Stack Hub, o sufixo do ponto de extremidade é especificado na configuração da cadeia de conexão: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

Para Azure Stack Hub, o sufixo do ponto de extremidade é especificado na instância da declaração: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

Para Azure Stack Hub, o sufixo do ponto de extremidade é especificado na configuração da cadeia de conexão: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

Armazenamento de blobBlob storage

Os tutoriais do armazenamento de BLOBs do Azure a seguir são aplicáveis ao Hub Azure Stack.The following Azure Blob storage tutorials are applicable to Azure Stack Hub. Observe o requisito de sufixo de ponto de extremidade específico para Azure Stack Hub descrito na seção exemplos anteriores.Note the specific endpoint suffix requirement for Azure Stack Hub described in the previous Examples section.

Armazenamento de filasQueue storage

Os tutoriais de armazenamento de fila do Azure a seguir são aplicáveis ao Hub Azure Stack.The following Azure Queue storage tutorials are applicable to Azure Stack Hub. Observe o requisito de sufixo de ponto de extremidade específico para Azure Stack Hub descrito na seção exemplos anteriores.Note the specific endpoint suffix requirement for Azure Stack Hub described in the previous Examples section.

Armazenamento de tabelaTable storage

Os tutoriais de armazenamento de tabela do Azure a seguir são aplicáveis ao Hub Azure Stack.The following Azure Table storage tutorials are applicable to Azure Stack Hub. Observe o requisito de sufixo de ponto de extremidade específico para Azure Stack Hub descrito na seção exemplos anteriores.Note the specific endpoint suffix requirement for Azure Stack Hub described in the previous Examples section.

Próximas etapasNext steps