Azure Services

DevCloud provides local emulation for Microsoft Azure services on port 4747, covering storage, messaging, database, secret management, and configuration APIs.

Supported Services

ServiceIdentifierLocal limits and backend
Blob StorageblobFilesystem-backed FileStore under data/blob. Supports container CRUD, BlockBlob CRUD, staged chunk uploads (PutBlock, PutBlockList), listing, and byte-range downloads.
Queue StorageazurequeueIn-memory message store with optional file persistence under data/azurequeue. Supports queue lifecycle, PutMessage, GetMessages with visibility timeouts, PeekMessages, and DeleteMessage with pop receipts.
Table StorageazuretableSQLite-backed OData JSON table and entity engine under data/azuretable. Supports table CRUD, entity insert/replace/merge/delete, PartitionKey/RowKey indexing, and queries.
Cosmos DBcosmosdbSQLite-backed NoSQL document store under data/cosmos. Supports database CRUD, collection CRUD with partition keys, document CRUD, and system attributes (_rid, _etag, _ts).
Key VaultazurekeyvaultIn-memory secret and cryptographic key store. Supports secret creation, versioning, retrieval, soft deletion, and RSA software-backed key generation and management.
App ConfigurationazureappconfigIn-memory key-value configuration store with ETag tracking, user-defined tags, and label filtering (?label=...).

Operations

Blob Storage (blob)

AreaOperationMethod & URINotes
ContainersCreateContainerPUT /{container}?restype=containerReturns 201 Created or 409 ContainerAlreadyExists
ContainersDeleteContainerDELETE /{container}?restype=containerReturns 202 Accepted or 404 ContainerNotFound
ContainersGetContainerPropertiesGET /{container}?restype=containerReturns lease state and metadata headers
ContainersListContainersGET /?comp=listReturns XML EnumerationResults listing all containers
BlobsPutBlobPUT /{container}/{blob}Creates or replaces a BlockBlob; supports preconditions (If-None-Match, If-Match) and computes MD5
BlobsPutBlockPUT /{container}/{blob}?comp=block&blockid={id}Stages an uncommitted block for chunked blob uploads
BlobsPutBlockListPUT /{container}/{blob}?comp=blocklistCommits staged blocks in sequence to materialize a BlockBlob
BlobsSetBlobMetadataPUT /{container}/{blob}?comp=metadataUpdates user-defined x-ms-meta-* headers
BlobsGetBlobGET /{container}/{blob}Downloads blob content; supports Range and x-ms-range requests
BlobsGetBlobPropertiesHEAD /{container}/{blob}Returns headers (x-ms-blob-type: BlockBlob, size, ETag, Content-MD5)
BlobsDeleteBlobDELETE /{container}/{blob}Permanently removes the blob
BlobsListBlobsGET /{container}?restype=container&comp=listReturns XML EnumerationResults listing blobs in the container

Queue Storage (azurequeue)

AreaOperationMethod & URINotes
QueuesCreateQueuePUT /{account}/{queue}Returns 201 Created or 204 No Content
QueuesDeleteQueueDELETE /{account}/{queue}Returns 204 No Content or 404 QueueNotFound
QueuesListQueuesGET /{account}?comp=listReturns XML QueueList
QueuesGetQueueMetadataGET /{account}/{queue}?comp=metadataReturns message count and custom metadata
MessagesPutMessagePOST /{account}/{queue}/messagesEnqueues XML payload; returns message ID and insertion time
MessagesGetMessagesGET /{account}/{queue}/messagesDequeues messages, sets visibility timeout, and returns pop receipt
MessagesPeekMessagesGET /{account}/{queue}/messages?peekonly=trueReads front of queue without altering visibility timeout
MessagesDeleteMessageDELETE /{account}/{queue}/messages/{id}?popreceipt={rcpt}Deletes message matching pop receipt
MessagesClearMessagesDELETE /{account}/{queue}/messagesPurges all messages from the queue

Table Storage (azuretable)

AreaOperationMethod & URINotes
TablesCreateTablePOST /{account}/TablesCreates table by TableName JSON property
TablesQueryTablesGET /{account}/TablesReturns OData JSON collection of existing tables
TablesDeleteTableDELETE /{account}/Tables('{name}')Permanently deletes table and its entities
EntitiesInsertEntityPOST /{account}/{table}Inserts JSON entity with PartitionKey and RowKey
EntitiesGetEntityGET /{account}/{table}(PartitionKey='{pk}',RowKey='{rk}')Retrieves entity by composite key
EntitiesUpdateEntityPUT /{account}/{table}(PartitionKey='{pk}',RowKey='{rk}')Overwrites entity properties
EntitiesMergeEntityMERGE /{account}/{table}(PartitionKey='{pk}',RowKey='{rk}')Merges entity properties
EntitiesDeleteEntityDELETE /{account}/{table}(PartitionKey='{pk}',RowKey='{rk}')Removes entity from table
EntitiesQueryEntitiesGET /{account}/{table}()Queries entities in the table

Cosmos DB (cosmosdb)

AreaOperationMethod & URINotes
DatabasesCreateDatabasePOST /dbsCreates a new Cosmos database (id)
DatabasesListDatabasesGET /dbsLists all databases in the account
DatabasesGetDatabaseGET /dbs/{db}Retrieves database details
DatabasesDeleteDatabaseDELETE /dbs/{db}Deletes database and all child collections
ContainersCreateContainerPOST /dbs/{db}/collsCreates collection with partition key definition
ContainersListContainersGET /dbs/{db}/collsLists collections in database
ContainersGetContainerGET /dbs/{db}/colls/{coll}Retrieves container metadata
ContainersDeleteContainerDELETE /dbs/{db}/colls/{coll}Deletes container and all documents
DocumentsCreateDocumentPOST /dbs/{db}/colls/{coll}/docsStores JSON document, assigns _rid, _ts, _etag
DocumentsGetDocumentGET /dbs/{db}/colls/{coll}/docs/{doc}Retrieves document by ID
DocumentsReplaceDocumentPUT /dbs/{db}/colls/{coll}/docs/{doc}Replaces document body
DocumentsDeleteDocumentDELETE /dbs/{db}/colls/{coll}/docs/{doc}Deletes document
DocumentsListDocumentsGET /dbs/{db}/colls/{coll}/docsLists documents in container

Key Vault (azurekeyvault)

AreaOperationMethod & URINotes
SecretsSetSecretPUT /secrets/{name}?api-version=7.4Creates a new secret version with tags and contentType
SecretsGetSecretGET /secrets/{name}[/{version}]?api-version=7.4Retrieves latest or specified secret version
SecretsGetSecretVersionsGET /secrets/{name}/versions?api-version=7.4Lists all versions for a secret
SecretsListSecretsGET /secrets?api-version=7.4Lists all secrets in the vault
SecretsDeleteSecretDELETE /secrets/{name}?api-version=7.4Deletes secret bundle from the vault
KeysCreateKeyPOST /keys/{name}/create?api-version=7.4Generates software-backed RSA cryptographic key
KeysGetKeyGET /keys/{name}[/{version}]?api-version=7.4Retrieves public key attributes and operations
KeysListKeysGET /keys?api-version=7.4Lists cryptographic keys in the vault
KeysDeleteKeyDELETE /keys/{name}?api-version=7.4Removes key bundle from the vault

App Configuration (azureappconfig)

AreaOperationMethod & URINotes
Key-ValuesSetKeyValuePUT /kv/{key}?label={label}Sets or updates a key-value with ETag, content type, and tags
Key-ValuesGetKeyValueGET /kv/{key}?label={label}Retrieves key-value entity by key and optional label
Key-ValuesDeleteKeyValueDELETE /kv/{key}?label={label}Removes key-value entity from configuration store
Key-ValuesListKeyValuesGET /kv?key={filter}&label={filter}Lists key-values with key and label filtering support

Configuration

In devcloud.yaml, Azure services are configured under providers.azure:

server:
  port: 4747

providers:
  azure:
    services:
      blob:
        enabled: true
        data_dir: ./data/blob
      azurequeue:
        enabled: true
        data_dir: ./data/azurequeue
      azuretable:
        enabled: true
        data_dir: ./data/azuretable
      cosmosdb:
        enabled: true
        data_dir: ./data/cosmos
      azurekeyvault:
        enabled: true
      azureappconfig:
        enabled: true

Python SDK Examples

Key Vault (azure-keyvault-secrets)

import os
import requests

endpoint = "http://localhost:4747"
headers = {"Host": "myvault.vault.azure.net", "Content-Type": "application/json"}

# Set a secret
resp = requests.put(
    f"{endpoint}/secrets/DatabasePassword?api-version=7.4",
    json={"value": "SuperSecretPass123", "contentType": "text/plain"},
    headers=headers,
)
print("Secret created:", resp.json()["id"])

# Read the secret back
resp = requests.get(
    f"{endpoint}/secrets/DatabasePassword?api-version=7.4",
    headers=headers,
)
print("Secret value:", resp.json()["value"])

App Configuration (azure-appconfiguration)

import requests

endpoint = "http://localhost:4747"
headers = {"Host": "myconfig.azconfig.io", "Content-Type": "application/json"}

# Store a configuration setting
requests.put(
    f"{endpoint}/kv/App:FeatureFlags:BetaUI?label=production",
    json={"value": "true", "content_type": "text/plain"},
    headers=headers,
)

# Fetch configuration setting
resp = requests.get(
    f"{endpoint}/kv/App:FeatureFlags:BetaUI?label=production",
    headers=headers,
)
print("Feature flag state:", resp.json()["value"])