Começar com ferramentas de desenvolvimento de armazenamento Azure Stack HubGet started with Azure Stack Hub storage development tools

O Microsoft Azure Stack Hub fornece um conjunto de serviços de armazenamento que inclui blob, mesa e armazenamento de fila.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 ferramentas de desenvolvimento de armazenamento Azure Stack Hub.Use this article as a guide to get started using Azure Stack Hub storage development tools. Pode encontrar informações mais detalhadas e código de amostra nos tutoriais de armazenamento correspondentes do Azure.You can find more detailed information and sample code in corresponding Azure storage tutorials.

Nota

Existem diferenças entre o armazenamento do Azure Stack Hub e o armazenamento 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, existem bibliotecas de clientes específicas e requisitos de sufixo de ponto final para o Azure Stack Hub.For example, there are specific client libraries and endpoint suffix requirements for Azure Stack Hub. Para obter mais informações, consulte o armazenamento do Azure Stack Hub: Diferenças e considerações.For more information, see Azure Stack Hub storage: Differences and considerations.

Bibliotecas de cliente do AzureAzure client libraries

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

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

Biblioteca de clienteClient library Versão suportada por Azure Stack HubAzure Stack Hub supported version LigaçãoLink Especificação de ponto finalEndpoint 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
Fila:Queue:
https://www.nuget.org/packages/Microsoft.Azure.Storage.Queue/11.0.0

Lançamento do GitHub:GitHub release:
https://github.com/Azure/azure-storage-net/releases/tag/v11.0.0
app.config arquivoapp.config file
JavaJava 12.0.0-pré-visualização.312.0.0-preview.3 Pacote Maven:Maven package:
https://mvnrepository.com/artifact/com.azure/azure-storage-file/12.0.0-preview.3

Lançamento do GitHub:GitHub release:
https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/storage
Configuração de cadeia de ligaçãoConnection string setup
Node.jsNode.js 2.8.32.8.3 Ligação 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)

Lançamento 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 Lançamento do GitHub:GitHub release:
https://github.com/Azure/azure-storage-cpp/releases/tag/v7.1.0
Configuração de cadeia de ligaçãoConnection string setup
PHPPHP 1.2.01.2.0 Lançamento 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
Fila:Queue:
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 via Compositor (Para saber mais, consulte os detalhes abaixo.)Install via Composer (To learn more, see the details below.)
Configuração de cadeia de ligaçãoConnection string setup
PythonPython 2.1.02.1.0 Lançamento do GitHub:GitHub release:
Comum:Common:
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
Fila:Queue:
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 RubyGems:RubyGems package:
Comum:Common:
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
Fila: 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

Lançamento 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
Fila: 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 ligaçãoConnection string setup

Instalar cliente PHP via Compositor - correnteInstall PHP client via Composer - current

Para instalar via Compositor: (tome a bolha como exemplo).To install via Composer: (take the blob as an example).

  1. Crie um ficheiro nomeado composer.jsna 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 compositor.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 (atualização de 1811 a 2002)Previous versions (1811 to 2002 update)

Biblioteca de clienteClient library Versão suportada por Azure Stack HubAzure Stack Hub supported version LigaçãoLink Especificação de ponto finalEndpoint specification
.NET.NET 9.2.09.2.0 Pacote Nuget:Nuget package:
https://www.nuget.org/packages/WindowsAzure.Storage/9.2.0

Lançamento do GitHub:GitHub release:
https://github.com/Azure/azure-storage-net/releases/tag/v9.2.0
app.config arquivoapp.config file
JavaJava 7.0.07.0.0 Pacote Maven:Maven package:
https://mvnrepository.com/artifact/com.microsoft.azure/azure-storage/7.0.0

Lançamento do GitHub:GitHub release:
https://github.com/Azure/azure-storage-java/releases/tag/v7.0.0
Configuração de cadeia de ligaçãoConnection string setup
Node.jsNode.js 2.8.32.8.3 Ligação 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)

Lançamento 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

Lançamento do GitHub:GitHub release:
https://github.com/Azure/azure-storage-cpp/releases/tag/v5.2.0
Configuração de cadeia de ligaçãoConnection string setup
PHPPHP 1.2.01.2.0 Lançamento 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
Fila:Queue:
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 via Compositor (Para saber mais, consulte os detalhes abaixo.)Install via Composer (To learn more, see the details below.)
Configuração de cadeia de ligaçãoConnection string setup
PythonPython 1.1.01.1.0 Lançamento do GitHub:GitHub release:
Comum:Common:
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
Fila:Queue:
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 RubyGems:RubyGems package:
Comum:Common:
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
Fila: 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

Lançamento 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
Fila: 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 ligaçãoConnection string setup

Instalar cliente PHP via Compositor - correnteInstall PHP client via Composer - current

Para instalar via Compositor: (tome a bolha como exemplo).To install via Composer: (take the blob as an example).

  1. Crie um ficheiro nomeado composer.jsna 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 compositor.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 (atualização de 1802 a 1809)Previous versions (1802 to 1809 update)

Biblioteca de clienteClient library Versão suportada por Azure Stack HubAzure Stack Hub supported version LigaçãoLink Especificação de ponto finalEndpoint specification
.NET.NET 8.7.08.7.0 Pacote Nuget:Nuget package:
https://www.nuget.org/packages/WindowsAzure.Storage/8.7.0

Lançamento do GitHub:GitHub release:
https://github.com/Azure/azure-storage-net/releases/tag/v8.7.0
app.config arquivoapp.config file
JavaJava 6.1.06.1.0 Pacote Maven:Maven package:
https://mvnrepository.com/artifact/com.microsoft.azure/azure-storage/6.1.0

Lançamento do GitHub:GitHub release:
https://github.com/Azure/azure-storage-java/releases/tag/v6.1.0
Configuração de cadeia de ligaçãoConnection string setup
Node.jsNode.js 2.7.02.7.0 Ligação 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)

Lançamento 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

Lançamento do GitHub:GitHub release:
https://github.com/Azure/azure-storage-cpp/releases/tag/v3.1.0
Configuração de cadeia de ligaçãoConnection string setup
PHPPHP 1.0.01.0.0 Lançamento 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
Fila:Queue:
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 via Compositor (ver os detalhes abaixo).)Install via Composer (see the details below).)
Configuração de cadeia de ligaçãoConnection string setup
PythonPython 1.0.01.0.0 Lançamento do GitHub:GitHub release:
Comum:Common:
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
Fila:Queue:
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 RubyGems:RubyGems package:
Comum:Common:
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
Fila: 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

Lançamento 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
Fila: 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 ligaçãoConnection string setup

Instalar cliente PHP via Compositor - anteriorInstall PHP client via Composer - previous

Para instalar via Compositor: (tome blob como exemplo).To install via Composer: (take blob as example).

  1. Crie um ficheiro nomeado composer.jsna 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 compositor.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 finalEndpoint declaration

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

ExemplosExamples

.NET.NET

Para o Azure Stack Hub, o sufixo do ponto final é especificado no ficheiro 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 o Azure Stack Hub, o sufixo do ponto final é especificado na configuração da cadeia de ligaçã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 o Azure Stack Hub, o sufixo do ponto final é especificado na instância de 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 o Azure Stack Hub, o sufixo do ponto final é especificado na configuração da cadeia de ligaçã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 o Azure Stack Hub, o sufixo do ponto final é especificado na configuração da cadeia de ligaçã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 o Azure Stack Hub, o sufixo do ponto final é especificado na instância de 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 o Azure Stack Hub, o sufixo do ponto final é especificado na configuração da cadeia de ligaçã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 blobsBlob storage

Os seguintes tutoriais de armazenamento Azure Blob são aplicáveis ao Azure Stack Hub.The following Azure Blob storage tutorials are applicable to Azure Stack Hub. Note o requisito específico de sufixo de ponto final para O Azure Stack Hub descrito na secção Exemplos anteriores.Note the specific endpoint suffix requirement for Azure Stack Hub described in the previous Examples section.

Armazenamento de filasQueue storage

Os seguintes tutoriais de armazenamento da Fila Azure são aplicáveis ao Azure Stack Hub.The following Azure Queue storage tutorials are applicable to Azure Stack Hub. Note o requisito específico de sufixo de ponto final para O Azure Stack Hub descrito na secção Exemplos anteriores.Note the specific endpoint suffix requirement for Azure Stack Hub described in the previous Examples section.

Table StorageTable storage

Os seguintes tutoriais de armazenamento da Mesa Azure são aplicáveis ao Azure Stack Hub.The following Azure Table storage tutorials are applicable to Azure Stack Hub. Note o requisito específico de sufixo de ponto final para O Azure Stack Hub descrito na secção Exemplos anteriores.Note the specific endpoint suffix requirement for Azure Stack Hub described in the previous Examples section.

Passos seguintesNext steps