Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 38fc836

Browse files
storage-sample
1 parent a63668e commit 38fc836

File tree

4 files changed

+31
-2
lines changed

4 files changed

+31
-2
lines changed

‎assets/add-files-roll1.png

37.9 KB
Loading[フレーム]

‎assets/files-add-roll.png

-38.8 KB
Binary file not shown.

‎assets/files-add-roll0.png

18.9 KB
Loading[フレーム]

‎azure-storage.ipynb

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,13 @@
156156
"### Adding the database to a storage role\n",
157157
"\n",
158158
"Next, we need to add the Azure SQL Database to the Storage Blob Data Owner role. This is done via Access Control (IAM) in the Azure Portal or via Azure CLI.\n",
159-
"To start, navigate to the container page and click **+ Add**. Then in the dropdown, click **Add role assignment**.\n",
159+
"To start, navigate to the Access Control page in the Azure Storage Account you are using\n",
160160
"\n",
161-
"![A picture of adding a role assignment on the Access Control page for a container](./assets/files-add-roll.png)\n",
161+
"![A picture of navigating to the Access Control page for an Azure Storage Account](./assets/files-add-roll0.png)\n",
162+
"\n",
163+
" and click **+ Add**. Then in the dropdown, click **Add role assignment**.\n",
164+
"\n",
165+
"![A picture of adding a role assignment on the Access Control page for an Azure Storage Account](./assets/files-add-roll1.png)\n",
162166
"\n",
163167
"On the following page, use the search box and enter **blob owner**. The roles list should then show the **Storage Blob Data Owner** role. Click the role and then click the **Next** button on the bottom of the page.\n",
164168
"\n",
@@ -246,6 +250,31 @@
246250
"select cast(@response as xml)\n",
247251
"go"
248252
]
253+
},
254+
{
255+
"cell_type": "markdown",
256+
"metadata": {},
257+
"source": [
258+
"We can also read blob just as before as well. Use the following code to read the json file we created earlier but now using a managed identity. As before, you need to update the date (\"x-ms-date\" : \"2023年8月09日 19:54:40 GMT\") to a recent timestamp otherwise you will get an error on submission of the request."
259+
]
260+
},
261+
{
262+
"cell_type": "code",
263+
"execution_count": null,
264+
"metadata": {},
265+
"outputs": [],
266+
"source": [
267+
"declare @response nvarchar(max);\n",
268+
"declare @url nvarchar(max) = 'https://blobby.blob.core.windows.net/myblobs/test-me-from-azure-sql.json'\n",
269+
"exec sp_invoke_external_rest_endpoint\n",
270+
" @url = @url,\n",
271+
" @headers = '{\"Accept\":\"application/xml\",\"x-ms-version\" : \"2023年08月03日\",\"x-ms-date\" : \"2023年8月09日 20:04:55 GMT\",\"Content-Type\":\"application/xml\"}',\n",
272+
" @method = 'GET',\n",
273+
" @credential = [https://blobby.blob.core.windows.net],\n",
274+
" @response = @response output\n",
275+
"select cast(@response as xml)\n",
276+
"go\n"
277+
]
249278
}
250279
],
251280
"metadata": {

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /