@@ -4,7 +4,7 @@ description: The Azurite open-source emulator provides a free local environment
4
4
author : normesta
5
5
6
6
ms.author : normesta
7
- ms.date : 12 /03/2021
7
+ ms.date : 06 /03/2022
8
8
ms.service : storage
9
9
ms.subservice : common
10
10
ms.topic : how-to
@@ -490,7 +490,7 @@ You can pass the following connection strings to the [Azure SDKs](https://aka.ms
490
490
491
491
The full connection string is:
492
492
493
- ` DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;QueueEndpoint=http://127.0.0.1:10001/devstoreaccount1; `
493
+ ` DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;QueueEndpoint=http://127.0.0.1:10001/devstoreaccount1;TableEndpoint=http://127.0.0.1:10001/devstoreaccount1; `
494
494
495
495
To connect to the blob service only, the connection string is:
496
496
@@ -500,11 +500,15 @@ To connect to the queue service only, the connection string is:
500
500
501
501
` DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;QueueEndpoint=http://127.0.0.1:10001/devstoreaccount1; `
502
502
503
+ To connect to the table service only, the connection string is:
504
+
505
+ ` DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;TableEndpoint=http://127.0.0.1:10001/devstoreaccount1; `
506
+
503
507
#### HTTPS connection strings
504
508
505
509
The full HTTPS connection string is:
506
510
507
- ` DefaultEndpointsProtocol=https;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=https://127.0.0.1:10000/devstoreaccount1;QueueEndpoint=https://127.0.0.1:10001/devstoreaccount1; `
511
+ ` DefaultEndpointsProtocol=https;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=https://127.0.0.1:10000/devstoreaccount1;QueueEndpoint=https://127.0.0.1:10001/devstoreaccount1;TableEndpoint=https://127.0.0.1:10001/devstoreaccount1; `
508
512
509
513
To use the blob service only, the HTTPS connection string is:
510
514
@@ -514,9 +518,13 @@ To use the queue service only, the HTTPS connection string is:
514
518
515
519
` DefaultEndpointsProtocol=https;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;QueueEndpoint=https://127.0.0.1:10001/devstoreaccount1; `
516
520
521
+ To use the table service only, the HTTPS connection string is:
522
+
523
+ ` DefaultEndpointsProtocol=https;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;TableEndpoint=https://127.0.0.1:10001/devstoreaccount1; `
524
+
517
525
If you used ` dotnet dev-certs ` to generate your self-signed certificate, use the following connection string.
518
526
519
- ` DefaultEndpointsProtocol=https;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=https://localhost:10000/devstoreaccount1;QueueEndpoint=https://localhost:10001/devstoreaccount1; `
527
+ ` DefaultEndpointsProtocol=https;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=https://localhost:10000/devstoreaccount1;QueueEndpoint=https://localhost:10001/devstoreaccount1;TableEndpoint=https://localhost:10001/devstoreaccount1; `
520
528
521
529
Update the connection string when using [ custom storage accounts and keys] ( #custom-storage-accounts-and-keys ) .
522
530
@@ -542,7 +550,7 @@ var client = new BlobContainerClient(
542
550
543
551
// With connection string
544
552
var client = new BlobContainerClient (
545
- " DefaultEndpointsProtocol=https;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=https://127.0.0.1:10000/devstoreaccount1;QueueEndpoint=https://127.0.0.1:10001/devstoreaccount1; " , " container-name"
553
+ " DefaultEndpointsProtocol=https;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=https://127.0.0.1:10000/devstoreaccount1;" , " container-name"
546
554
);
547
555
548
556
// With account name and key
@@ -564,7 +572,7 @@ var client = new QueueClient(
564
572
565
573
// With connection string
566
574
var client = new QueueClient (
567
- " DefaultEndpointsProtocol=https;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=https://127.0.0.1:10000/devstoreaccount1; QueueEndpoint=https://127.0.0.1:10001/devstoreaccount1;" , " queue-name"
575
+ " DefaultEndpointsProtocol=https;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;QueueEndpoint=https://127.0.0.1:10001/devstoreaccount1;" , " queue-name"
568
576
);
569
577
570
578
// With account name and key
@@ -574,6 +582,28 @@ var client = new QueueClient(
574
582
);
575
583
```
576
584
585
+ #### Azure Table Storage
586
+
587
+ You can also instantiate a TableClient or TableServiceClient.
588
+
589
+ ``` csharp
590
+ // With table URL and DefaultAzureCredential
591
+ var client = new Client (
592
+ new Uri (" https://127.0.0.1:10001/devstoreaccount1/table-name" ), new DefaultAzureCredential ()
593
+ );
594
+
595
+ // With connection string
596
+ var client = new TableClient (
597
+ " DefaultEndpointsProtocol=https;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;TableEndpoint=https://127.0.0.1:10001/devstoreaccount1;" , " table-name"
598
+ );
599
+
600
+ // With account name and key
601
+ var client = new TableClient (
602
+ new Uri (" https://127.0.0.1:10001/devstoreaccount1/table-name" ),
603
+ new StorageSharedKeyCredential (" devstoreaccount1" , " Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==" )
604
+ );
605
+ ```
606
+
577
607
### Microsoft Azure Storage Explorer
578
608
579
609
You can use Storage Explorer to view the data stored in Azurite.
@@ -623,10 +653,13 @@ The following files and folders may be created in the workspace location when in
623
653
624
654
- ` __blobstorage__ ` - Directory containing Azurite blob service persisted binary data
625
655
- ` __queuestorage__ ` - Directory containing Azurite queue service persisted binary data
656
+ - ` __tablestorage__ ` - Directory containing Azurite table service persisted binary data
626
657
- ` __azurite_db_blob__.json ` - Azurite blob service metadata file
627
658
- ` __azurite_db_blob_extent__.json ` - Azurite blob service extent metadata file
628
659
- ` __azurite_db_queue__.json ` - Azurite queue service metadata file
629
660
- ` __azurite_db_queue_extent__.json ` - Azurite queue service extent metadata file
661
+ - ` __azurite_db_table__.json ` - Azurite table service metadata file
662
+ - ` __azurite_db_table_extent__.json ` - Azurite table service extent metadata file
630
663
631
664
To clean up Azurite, delete above files and folders and restart the emulator.
632
665
0 commit comments