index.html 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388
  1. <!DOCTYPE html>
  2. <!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
  3. <!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
  4. <head>
  5. <meta charset="utf-8">
  6. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  7. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  8. <link rel="canonical" href="https://OLC-LOC-Bioinformatics.github.io/AzureStorage/sas_url/">
  9. <link rel="shortcut icon" href="../img/favicon.ico">
  10. <title>SAS URL - OLC Bioinformatics Azure Storage</title>
  11. <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato:400,700|Roboto+Slab:400,700|Inconsolata:400,700" />
  12. <link rel="stylesheet" href="../css/theme.css" />
  13. <link rel="stylesheet" href="../css/theme_extra.css" />
  14. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/github.min.css" />
  15. <script>
  16. // Current page data
  17. var mkdocs_page_name = "SAS URL";
  18. var mkdocs_page_input_path = "sas_url.md";
  19. var mkdocs_page_url = "/AzureStorage/sas_url/";
  20. </script>
  21. <script src="../js/jquery-2.1.1.min.js" defer></script>
  22. <script src="../js/modernizr-2.8.3.min.js" defer></script>
  23. <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
  24. <script>hljs.initHighlightingOnLoad();</script>
  25. </head>
  26. <body class="wy-body-for-nav" role="document">
  27. <div class="wy-grid-for-nav">
  28. <nav data-toggle="wy-nav-shift" class="wy-nav-side stickynav">
  29. <div class="wy-side-scroll">
  30. <div class="wy-side-nav-search">
  31. <a href=".." class="icon icon-home"> OLC Bioinformatics Azure Storage</a>
  32. <div role="search">
  33. <form id ="rtd-search-form" class="wy-form" action="../search.html" method="get">
  34. <input type="text" name="q" placeholder="Search docs" title="Type search term here" />
  35. </form>
  36. </div>
  37. </div>
  38. <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
  39. <ul>
  40. <li class="toctree-l1"><a class="reference internal" href="..">Home</a>
  41. </li>
  42. </ul>
  43. <ul>
  44. <li class="toctree-l1"><a class="reference internal" href="../install/">Installation</a>
  45. </li>
  46. </ul>
  47. <ul>
  48. <li class="toctree-l1"><a class="reference internal" href="../credentials/">Credentials</a>
  49. </li>
  50. </ul>
  51. <ul>
  52. <li class="toctree-l1"><a class="reference internal" href="../upload/">Upload</a>
  53. </li>
  54. </ul>
  55. <ul class="current">
  56. <li class="toctree-l1 current"><a class="reference internal current" href="./">SAS URL</a>
  57. <ul class="current">
  58. <li class="toctree-l2"><a class="reference internal" href="#general-usage">General usage</a>
  59. </li>
  60. <li class="toctree-l2"><a class="reference internal" href="#azuresas-container">AzureSAS container</a>
  61. <ul>
  62. <li class="toctree-l3"><a class="reference internal" href="#required-arguments">Required arguments:</a>
  63. </li>
  64. <li class="toctree-l3"><a class="reference internal" href="#optional-arguments">Optional arguments:</a>
  65. </li>
  66. <li class="toctree-l3"><a class="reference internal" href="#example-commands">Example commands:</a>
  67. </li>
  68. <li class="toctree-l3"><a class="reference internal" href="#usage">Usage</a>
  69. </li>
  70. </ul>
  71. </li>
  72. <li class="toctree-l2"><a class="reference internal" href="#azuresas-file">AzureSAS file</a>
  73. <ul>
  74. <li class="toctree-l3"><a class="reference internal" href="#required-arguments_1">Required arguments:</a>
  75. </li>
  76. <li class="toctree-l3"><a class="reference internal" href="#optional-arguments_1">Optional arguments:</a>
  77. </li>
  78. <li class="toctree-l3"><a class="reference internal" href="#example-commands_1">Example commands:</a>
  79. </li>
  80. <li class="toctree-l3"><a class="reference internal" href="#usage_1">Usage</a>
  81. </li>
  82. </ul>
  83. </li>
  84. <li class="toctree-l2"><a class="reference internal" href="#azuresas-folder">AzureSAS folder</a>
  85. <ul>
  86. <li class="toctree-l3"><a class="reference internal" href="#required-arguments_2">Required arguments:</a>
  87. </li>
  88. <li class="toctree-l3"><a class="reference internal" href="#optional-arguments_2">Optional arguments:</a>
  89. </li>
  90. <li class="toctree-l3"><a class="reference internal" href="#example-commands_2">Example commands:</a>
  91. </li>
  92. <li class="toctree-l3"><a class="reference internal" href="#usage_2">Usage</a>
  93. </li>
  94. </ul>
  95. </li>
  96. </ul>
  97. </li>
  98. </ul>
  99. <ul>
  100. <li class="toctree-l1"><a class="reference internal" href="../move/">Move</a>
  101. </li>
  102. </ul>
  103. <ul>
  104. <li class="toctree-l1"><a class="reference internal" href="../download/">Download</a>
  105. </li>
  106. </ul>
  107. <ul>
  108. <li class="toctree-l1"><a class="reference internal" href="../set_tier/">Set Tier</a>
  109. </li>
  110. </ul>
  111. <ul>
  112. <li class="toctree-l1"><a class="reference internal" href="../delete/">Delete</a>
  113. </li>
  114. </ul>
  115. <ul>
  116. <li class="toctree-l1"><a class="reference internal" href="../automate/">Automate</a>
  117. </li>
  118. </ul>
  119. <ul>
  120. <li class="toctree-l1"><a class="reference internal" href="../list/">List</a>
  121. </li>
  122. </ul>
  123. </div>
  124. </div>
  125. </nav>
  126. <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
  127. <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
  128. <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
  129. <a href="..">OLC Bioinformatics Azure Storage</a>
  130. </nav>
  131. <div class="wy-nav-content">
  132. <div class="rst-content">
  133. <div role="navigation" aria-label="breadcrumbs navigation">
  134. <ul class="wy-breadcrumbs">
  135. <li><a href="..">Docs</a> &raquo;</li>
  136. <li>SAS URL</li>
  137. <li class="wy-breadcrumbs-aside">
  138. <a href="https://github.com/OLC-LOC-Bioinformatics/AzureStorage/edit/main/docs/sas_url.md"
  139. class="icon icon-github"> Edit on GitHub</a>
  140. </li>
  141. </ul>
  142. <hr/>
  143. </div>
  144. <div role="main">
  145. <div class="section">
  146. <h2 id="azuresas">AzureSAS</h2>
  147. <p>Create shared access signatures (SAS) URLs for containers, files, folders in your Azure storage account.</p>
  148. <p>Note that each file in a container/folder has to be downloaded separately, so if there are 1000 files in the container, 1000 SAS URLs will be provided</p>
  149. <p>Choose either the <a href="#azuresas-container"><code>container</code></a>, <a href="#azuresas-file"><code>file</code></a>, or <a href="#azuresas-folder"><code>folder</code></a> functionality</p>
  150. <h4 id="general-usage">General usage</h4>
  151. <pre><code>usage: AzureSAS [-h] {container,file,folder} ...
  152. Create shared access signatures (SAS) for containers/files/folders from Azure storage.
  153. Note that each file in the container/folder has to be downloaded separately, so if
  154. there are 1000 files in the container, 1000 SAS will be provided
  155. optional arguments:
  156. -h, --help show this help message and exit
  157. Available functionality:
  158. {container,file,folder}
  159. container Create SAS for all files in a container in Azure storage
  160. file Create a SAS for a file in Azure storage
  161. folder Create SAS for all files in a folder in Azure storage
  162. </code></pre>
  163. <h3 id="azuresas-container">AzureSAS container</h3>
  164. <p>Create SAS URLs for all files in a container in your Azure storage account</p>
  165. <h4 id="required-arguments">Required arguments:</h4>
  166. <ul>
  167. <li>container name</li>
  168. <li>account name</li>
  169. </ul>
  170. <h4 id="optional-arguments">Optional arguments:</h4>
  171. <ul>
  172. <li>output file: file in which the SAS URLs are to be written. Default is <code>sas.txt</code> in your current working directory</li>
  173. <li>expiry: the number of days the SAS URL with be valid. Minimum is 1, maximum is 365. Default is 10</li>
  174. <li>passphrase used to store your connection string in the system keyring (default is AzureStorage)</li>
  175. <li>verbosity: set the logging level. Options are debug,info,warning,error,critical. Default is info</li>
  176. </ul>
  177. <h4 id="example-commands">Example commands:</h4>
  178. <p>These commands will use <code>container-name</code> as the name of the container, and <code>account_name</code> as the name of the storage account</p>
  179. <p>To create SAS URLs with default settings:</p>
  180. <p><code>AzureSAS container -a account_name -c container-name</code></p>
  181. <p>To create SAS URLs with an expiry of 15 days:</p>
  182. <p><code>AzureSAS container -a account_name -c container-name -e 15</code></p>
  183. <p>To create SAS URLs, and save them to the file <code>sas_urls.txt</code> in your current working directory:</p>
  184. <p><code>AzureSAS container -a account_name -c container-name -o sas_urls.txt</code></p>
  185. <p>To create SAS URLs, and save them to the file <code>sas_urls.txt</code> nested in folder <code>outputs</code> in your current working directory:</p>
  186. <p><code>AzureSAS container -a account_name -c container-name -o outputs/sas_urls.txt</code></p>
  187. <h4 id="usage">Usage</h4>
  188. <pre><code>usage: AzureSAS container [-h] -c CONTAINER_NAME -a ACCOUNT_NAME [-p PASSPHRASE] [-v VERBOSITY] [-e EXPIRY] [-o OUTPUT_FILE]
  189. Create SAS URLs for all files in a container in Azure storage
  190. optional arguments:
  191. -h, --help show this help message and exit
  192. -c CONTAINER_NAME, --container_name CONTAINER_NAME
  193. Name of the Azure storage container. Note that container names must be lowercase, between 3 and 63 characters, start with a letter or number, and can contain only letters, numbers, and the dash (-) character. Consecutive dashes are not permitted.
  194. -a ACCOUNT_NAME, --account_name ACCOUNT_NAME
  195. Name of the Azure storage account
  196. -p PASSPHRASE, --passphrase PASSPHRASE
  197. The passphrase to use when encrypting the azure storage-specific connection string to the system keyring. Default is &quot;AzureStorage&quot;.
  198. -v VERBOSITY, --verbosity VERBOSITY
  199. Set the logging level. Options are debug, info, warning, error, and critical. Default is info.
  200. -e EXPIRY, --expiry EXPIRY
  201. The number of days that the SAS URL will be valid. The minimum is 1, and the maximum is 365. The default is 10.
  202. -o OUTPUT_FILE, --output_file OUTPUT_FILE
  203. Name and path of file in which the SAS URLs are to be saved. Default is $CWD/sas.txt
  204. </code></pre>
  205. <h3 id="azuresas-file">AzureSAS file</h3>
  206. <p>Create a SAS URL for a file in a container in your Azure storage account</p>
  207. <h4 id="required-arguments_1">Required arguments:</h4>
  208. <ul>
  209. <li>container name</li>
  210. <li>account name</li>
  211. <li>file name</li>
  212. </ul>
  213. <h4 id="optional-arguments_1">Optional arguments:</h4>
  214. <ul>
  215. <li>output file: file in which the SAS URLs are to be written. Default is <code>sas.txt</code> in your current working directory</li>
  216. <li>expiry: the number of days the SAS URL with be valid. Minimum is 1, maximum is 365. Default is 10</li>
  217. <li>passphrase used to store your connection string in the system keyring (default is AzureStorage)</li>
  218. <li>verbosity: set the logging level. Options are debug,info,warning,error,critical. Default is info</li>
  219. </ul>
  220. <h4 id="example-commands_1">Example commands:</h4>
  221. <p>These commands will use <code>container-name</code> as the name of the container, and <code>account_name</code> as the name of the storage account</p>
  222. <p>To create a SAS URL for file <code>file_name.gz</code> with default settings:</p>
  223. <p><code>AzureSAS file -a account_name -c container-name -f file_name.gz</code></p>
  224. <p>To create a SAS URL for file <code>file_name.gz</code> nested in folder <code>outputs</code> with default settings:</p>
  225. <p><code>AzureSAS file -a account_name -c container-name -f outputs/file_name.gz</code></p>
  226. <p>To create a SAS URL for file <code>file_name.gz</code> with an expiry of 15 days:</p>
  227. <p><code>AzureSAS file -a account_name -c container-name f file_name.gz -e 15</code></p>
  228. <p>To create a SAS URL for file <code>file_name.gz</code>, and save it to the file <code>sas_urls.txt</code> in your current working directory:</p>
  229. <p><code>AzureSAS file -a account_name -c container-name -f file_name.gz -o sas_urls.txt</code></p>
  230. <p>To create a SAS URL for file <code>file_name.gz</code>, and save it to the file <code>sas_urls.txt</code> nested in folder <code>outputs</code> in your current working directory:</p>
  231. <p><code>AzureSAS file -a account_name -c container-name -f file_name.gz -o outputs/sas_urls.txt</code></p>
  232. <h4 id="usage_1">Usage</h4>
  233. <pre><code>usage: AzureSAS file [-h] -c CONTAINER_NAME -a ACCOUNT_NAME [-p PASSPHRASE] [-v VERBOSITY] [-e EXPIRY] [-o OUTPUT_FILE] -f FILE
  234. Create a SAS URL for a file in Azure storage
  235. optional arguments:
  236. -h, --help show this help message and exit
  237. -c CONTAINER_NAME, --container_name CONTAINER_NAME
  238. Name of the Azure storage container. Note that container names must be lowercase, between 3 and 63 characters, start with a letter or number, and can contain only letters, numbers, and the dash (-) character. Consecutive dashes are not permitted.
  239. -a ACCOUNT_NAME, --account_name ACCOUNT_NAME
  240. Name of the Azure storage account
  241. -p PASSPHRASE, --passphrase PASSPHRASE
  242. The passphrase to use when encrypting the azure storage-specific connection string to the system keyring. Default is &quot;AzureStorage&quot;.
  243. -v VERBOSITY, --verbosity VERBOSITY
  244. Set the logging level. Options are debug, info, warning, error, and critical. Default is info.
  245. -e EXPIRY, --expiry EXPIRY
  246. The number of days that the SAS URL will be valid. The minimum is 1, and the maximum is 365. The default is 10.
  247. -o OUTPUT_FILE, --output_file OUTPUT_FILE
  248. Name and path of file in which the SAS URLs are to be saved. Default is $CWD/sas.txt
  249. -f FILE, --file FILE Path of file in Azure storage from which a SAS URL is to be created. e.g. 2022-SEQ-0001_S1_L001_R1_001.fastq.gz
  250. </code></pre>
  251. <h3 id="azuresas-folder">AzureSAS folder</h3>
  252. <p>Create SAS URLs for all files in a folder in your Azure storage account</p>
  253. <h4 id="required-arguments_2">Required arguments:</h4>
  254. <ul>
  255. <li>container name</li>
  256. <li>account name</li>
  257. <li>folder name</li>
  258. </ul>
  259. <h4 id="optional-arguments_2">Optional arguments:</h4>
  260. <ul>
  261. <li>output file: file in which the SAS URLs are to be written. Default is <code>sas.txt</code> in your current working directory</li>
  262. <li>expiry: the number of days the SAS URL with be valid. Minimum is 1, maximum is 365. Default is 10</li>
  263. <li>passphrase used to store your connection string in the system keyring (default is AzureStorage)</li>
  264. <li>verbosity: set the logging level. Options are debug,info,warning,error,critical. Default is info</li>
  265. </ul>
  266. <h4 id="example-commands_2">Example commands:</h4>
  267. <p>These commands will use <code>container-name</code> as the name of the container, and <code>account_name</code> as the name of the storage account</p>
  268. <p>To create SAS URLs for all files in folder <code>folder_name</code> with default settings:</p>
  269. <p><code>AzureSAS folder -a account_name -c container-name -f folder_name</code></p>
  270. <p>To create SAS URLs for all files in folder <code>folder_name</code> nested in folder <code>outputs</code> with default settings:</p>
  271. <p><code>AzureSAS folder -a account_name -c container-name -f outputs/folder_name</code></p>
  272. <p>To create SAS URLs for all files in folder <code>folder_name</code> with an expiry of 15 days:</p>
  273. <p><code>AzureSAS folder -a account_name -c container-name f folder_name -e 15</code></p>
  274. <p>To create SAS URLs for all files in folder <code>folder_name</code>, and save them to the file <code>sas_urls.txt</code> in your current working directory:</p>
  275. <p><code>AzureSAS folder -a account_name -c container-name -f folder_name -o sas_urls.txt</code></p>
  276. <p>To create SAS URLs for all files in folder <code>folder_name</code>, and save them to the file <code>sas_urls.txt</code> nested in folder <code>outputs</code> in your current working directory:</p>
  277. <p><code>AzureSAS folder -a account_name -c container-name -f folder_name -o outputs/sas_urls.txt</code></p>
  278. <h4 id="usage_2">Usage</h4>
  279. <pre><code>usage: AzureSAS folder [-h] -c CONTAINER_NAME -a ACCOUNT_NAME [-p PASSPHRASE] [-v VERBOSITY] [-e EXPIRY] [-o OUTPUT_FILE] -f FOLDER
  280. Create SAS URLs for all files in a folder in Azure storage
  281. optional arguments:
  282. -h, --help show this help message and exit
  283. -c CONTAINER_NAME, --container_name CONTAINER_NAME
  284. Name of the Azure storage container. Note that container names must be lowercase, between 3 and 63 characters, start with a letter or number, and can contain only letters, numbers, and the dash (-) character. Consecutive dashes are not permitted.
  285. -a ACCOUNT_NAME, --account_name ACCOUNT_NAME
  286. Name of the Azure storage account
  287. -p PASSPHRASE, --passphrase PASSPHRASE
  288. The passphrase to use when encrypting the azure storage-specific connection string to the system keyring. Default is &quot;AzureStorage&quot;.
  289. -v VERBOSITY, --verbosity VERBOSITY
  290. Set the logging level. Options are debug, info, warning, error, and critical. Default is info.
  291. -e EXPIRY, --expiry EXPIRY
  292. The number of days that the SAS URL will be valid. The minimum is 1, and the maximum is 365. The default is 10.
  293. -o OUTPUT_FILE, --output_file OUTPUT_FILE
  294. Name and path of file in which the SAS URLs are to be saved. Default is $CWD/sas.txt
  295. -f FOLDER, --folder FOLDER
  296. Name of the folder for which SAS URLs are to be created for all files. e.g. InterOp
  297. </code></pre>
  298. </div>
  299. </div>
  300. <footer>
  301. <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
  302. <a href="../move/" class="btn btn-neutral float-right" title="Move">Next <span class="icon icon-circle-arrow-right"></span></a>
  303. <a href="../upload/" class="btn btn-neutral" title="Upload"><span class="icon icon-circle-arrow-left"></span> Previous</a>
  304. </div>
  305. <hr/>
  306. <div role="contentinfo">
  307. <!-- Copyright etc -->
  308. </div>
  309. Built with <a href="https://www.mkdocs.org/">MkDocs</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
  310. </footer>
  311. </div>
  312. </div>
  313. </section>
  314. </div>
  315. <div class="rst-versions" role="note" aria-label="versions">
  316. <span class="rst-current-version" data-toggle="rst-current-version">
  317. <a href="https://github.com/OLC-LOC-Bioinformatics/AzureStorage/" class="fa fa-github" style="float: left; color: #fcfcfc"> GitHub</a>
  318. <span><a href="../upload/" style="color: #fcfcfc;">&laquo; Previous</a></span>
  319. <span style="margin-left: 15px"><a href="../move/" style="color: #fcfcfc">Next &raquo;</a></span>
  320. </span>
  321. </div>
  322. <script>var base_url = '..';</script>
  323. <script src="../js/theme.js" defer></script>
  324. <script src="../search/main.js" defer></script>
  325. <script defer>
  326. window.onload = function () {
  327. SphinxRtdTheme.Navigation.enable(true);
  328. };
  329. </script>
  330. </body>
  331. </html>