Skip to content

Commit 5de5812

Browse files
authored
Merge pull request #251064 from yungezz/howto-blob
add blob storage sample
2 parents ebddd95 + c1eb305 commit 5de5812

File tree

4 files changed

+650
-20
lines changed

4 files changed

+650
-20
lines changed

articles/service-connector/how-to-integrate-storage-blob.md

Lines changed: 67 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@ ms.service: service-connector
77
ms.custom: event-tier1-build-2022
88
ms.topic: how-to
99
ms.date: 06/13/2022
10+
zone_pivot_group_filename: service-connector/zone-pivot-groups.json
11+
zone_pivot_groups: howto-authtype
1012
---
1113

1214
# Integrate Azure Blob Storage with Service Connector
1315

14-
This page shows the supported authentication types and client types of Azure Blob Storage using Service Connector. You might still be able to connect to Azure Blob Storage in other programming languages without using Service Connector. This page also shows default environment variable names and values (or Spring Boot configuration) you get when you create the service connection. You can learn more about [Service Connector environment variable naming convention](concept-service-connector-internals.md).
16+
This page shows the supported authentication types, client types and sample codes of Azure Blob Storage using Service Connector. This page also shows default environment variable names and values (or Spring Boot configuration) you get when you create the service connection. Also detail steps with sample codes about how to make connection to the blob storage. You can learn more about [Service Connector environment variable naming convention](concept-service-connector-internals.md).
1517

1618
## Supported compute service
1719

@@ -31,58 +33,103 @@ Supported authentication and clients for App Service, Container Apps and Azure S
3133
| Java - Spring Boot | | | ![yes icon](./media/green-check.png) |
3234
| Node.js | ![yes icon](./media/green-check.png) | ![yes icon](./media/green-check.png) | ![yes icon](./media/green-check.png) | ![yes icon](./media/green-check.png) |
3335
| Python | ![yes icon](./media/green-check.png) | ![yes icon](./media/green-check.png) | ![yes icon](./media/green-check.png) | ![yes icon](./media/green-check.png) |
36+
| Go | ![yes icon](./media/green-check.png) | ![yes icon](./media/green-check.png) | ![yes icon](./media/green-check.png) | ![yes icon](./media/green-check.png) |
3437
| None | ![yes icon](./media/green-check.png) | ![yes icon](./media/green-check.png) | ![yes icon](./media/green-check.png) | ![yes icon](./media/green-check.png) |
3538

3639

3740
---
3841

39-
## Default environment variable names or application properties
42+
## Default environment variable names or application properties and sample codes
4043

41-
Use the connection details below to connect compute services to Blob Storage. For each example below, replace the placeholder texts
42-
`<account name>`, `<account-key>`, `<client-ID>`, `<client-secret>`, `<tenant-ID>`, and `<storage-account-name>` with your own account name, account key, client ID, client secret, tenant ID and storage account name.
43-
44-
### Secret / connection string
45-
46-
#### .NET, Java, Node.JS, Python
47-
| Default environment variable name | Description | Example value |
48-
|------------------------------------|--------------------------------|---------------------------------------------------------------------------------------------------------------------|
49-
| AZURE_STORAGEBLOB_CONNECTIONSTRING | Blob Storage connection string | `DefaultEndpointsProtocol=https;AccountName=<account name>;AccountKey=<account-key>;EndpointSuffix=core.windows.net` |
50-
51-
#### Java - SpringBoot
52-
53-
| Application properties | Description | Example value |
54-
|-----------------------------|--------------------------------|---------------------------------------------------------|
55-
| azure.storage.account-name | Your Blob storage-account-name | `<storage-account-name>` |
56-
| azure.storage.account-key | Your Blob Storage account key | `<account-key>` |
57-
| azure.storage.blob-endpoint | Your Blob Storage endpoint | `https://<storage-account-name>.blob.core.windows.net/` |
44+
Reference the connection details and sample codes in following tables, accordings to your connection's authentication type and client type, to connect compute services to Azure Blob Storage. Please go to beginning of the documentation to choose authentication type.
5845

46+
::: zone pivot="system-identity"
5947

6048
### System-assigned managed identity
49+
For default environment variables and sample codes of other authentication type, please choose from beginning of the documentation.
6150

6251
| Default environment variable name | Description | Example value |
6352
|------------------------------------|-----------------------|---------------------------------------------------------|
6453
| AZURE_STORAGEBLOB_RESOURCEENDPOINT | Blob Storage endpoint | `https://<storage-account-name>.blob.core.windows.net/` |
6554

55+
56+
#### Sample codes
57+
58+
Follow these steps and sample codes to connect to Azure Blob Storage with system-assigned managed identity.
59+
[!INCLUDE [code sample for blob](./includes/code-blob-me-id.md)]
60+
61+
::: zone-end
62+
63+
::: zone pivot="user-identity"
64+
6665
### User-assigned managed identity
6766

67+
For default environment variables and sample codes of other authentication type, please choose from beginning of the documentation.
68+
6869
| Default environment variable name | Description | Example value |
6970
|------------------------------------|-----------------------|---------------------------------------------------------|
7071
| AZURE_STORAGEBLOB_RESOURCEENDPOINT | Blob Storage endpoint | `https://<storage-account-name>.blob.core.windows.net/` |
7172
| AZURE_STORAGEBLOB_CLIENTID | Your client ID | `<client-ID>` |
7273

74+
#### Sample codes
75+
76+
Follow these steps and sample codes to connect to Azure Blob Storage with user-assigned managed identity.
77+
[!INCLUDE [code sample for blob](./includes/code-blob-me-id.md)]
78+
79+
::: zone-end
80+
81+
82+
::: zone pivot="connection-string"
83+
84+
### Connection string
85+
86+
For default environment variables and sample codes of other authentication type, please choose from beginning of the documentation.
87+
88+
#### SpringBoot client type
89+
90+
| Application properties | Description | Example value |
91+
|-----------------------------|--------------------------------|---------------------------------------------------------|
92+
| azure.storage.account-name | Your Blob storage-account-name | `<storage-account-name>` |
93+
| azure.storage.account-key | Your Blob Storage account key | `<account-key>` |
94+
| azure.storage.blob-endpoint | Your Blob Storage endpoint | `https://<storage-account-name>.blob.core.windows.net/` |
95+
96+
97+
#### other client types
98+
| Default environment variable name | Description | Example value |
99+
|------------------------------------|--------------------------------|---------------------------------------------------------------------------------------------------------------------|
100+
| AZURE_STORAGEBLOB_CONNECTIONSTRING | Blob Storage connection string | `DefaultEndpointsProtocol=https;AccountName=<account name>;AccountKey=<account-key>;EndpointSuffix=core.windows.net` |
101+
102+
103+
#### Sample codes
104+
105+
Follow these steps and sample codes to connect to Azure Blob Storage with connection string.
106+
[!INCLUDE [code sample for blob](./includes/code-blob-secret.md)]
107+
108+
::: zone-end
109+
110+
::: zone pivot="service-principal"
111+
73112
### Service principal
74113

114+
For default environment variables and sample codes of other authentication type, please choose from beginning of the documentation.
115+
75116
| Default environment variable name | Description | Example value |
76117
|------------------------------------|-----------------------|---------------------------------------------------------|
77118
| AZURE_STORAGEBLOB_RESOURCEENDPOINT | Blob Storage endpoint | `https://<storage-account-name>.blob.core.windows.net/` |
78119
| AZURE_STORAGEBLOB_CLIENTID | Your client ID | `<client-ID>` |
79120
| AZURE_STORAGEBLOB_CLIENTSECRET | Your client secret | `<client-secret>` |
80121
| AZURE_STORAGEBLOB_TENANTID | Your tenant ID | `<tenant-ID>` |
81122

123+
#### Sample codes
124+
125+
Follow these steps and sample codes to connect to Azure Blob Storage with service principal.
126+
[!INCLUDE [code sample for blob](./includes/code-blob-me-id.md)]
127+
128+
::: zone-end
82129

83130
## Next steps
84131

85-
Follow the tutorials listed below to learn more about Service Connector.
132+
Follow the tutorials to learn more about Service Connector.
86133

87134
> [!div class="nextstepaction"]
88135
> [Learn about Service Connector concepts](./concept-service-connector-internals.md)

0 commit comments

Comments
 (0)