blob: c4bb671f477f4ac4d489ca269b5fd1f5a8e66863 [file] [log] [blame]
<!DOCTYPE html>
<html class="writer-html5" lang="en" data-content_root="./">
<head>
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>apache_beam.io.aws.s3io module &mdash; Apache Beam 2.67.0 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=b86133f3" />
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=e59714d7" />
<script src="_static/jquery.js?v=5d32c60e"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="_static/documentation_options.js?v=959b4fbe"></script>
<script src="_static/doctools.js?v=9a2dae69"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="apache_beam.io.azure package" href="apache_beam.io.azure.html" />
<link rel="prev" title="apache_beam.io.aws.s3filesystem module" href="apache_beam.io.aws.s3filesystem.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="index.html" class="icon icon-home">
Apache Beam
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="apache_beam.coders.html">apache_beam.coders package</a></li>
<li class="toctree-l1"><a class="reference internal" href="apache_beam.dataframe.html">apache_beam.dataframe package</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="apache_beam.io.html">apache_beam.io package</a><ul class="current">
<li class="toctree-l2 current"><a class="reference internal" href="apache_beam.io.html#subpackages">Subpackages</a><ul class="current">
<li class="toctree-l3 current"><a class="reference internal" href="apache_beam.io.aws.html">apache_beam.io.aws package</a><ul class="current">
<li class="toctree-l4"><a class="reference internal" href="apache_beam.io.aws.html#subpackages">Subpackages</a></li>
<li class="toctree-l4 current"><a class="reference internal" href="apache_beam.io.aws.html#submodules">Submodules</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="apache_beam.io.azure.html">apache_beam.io.azure package</a></li>
<li class="toctree-l3"><a class="reference internal" href="apache_beam.io.components.html">apache_beam.io.components package</a></li>
<li class="toctree-l3"><a class="reference internal" href="apache_beam.io.external.html">apache_beam.io.external package</a></li>
<li class="toctree-l3"><a class="reference internal" href="apache_beam.io.flink.html">apache_beam.io.flink package</a></li>
<li class="toctree-l3"><a class="reference internal" href="apache_beam.io.gcp.html">apache_beam.io.gcp package</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="apache_beam.io.html#submodules">Submodules</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="apache_beam.metrics.html">apache_beam.metrics package</a></li>
<li class="toctree-l1"><a class="reference internal" href="apache_beam.ml.html">apache_beam.ml package</a></li>
<li class="toctree-l1"><a class="reference internal" href="apache_beam.options.html">apache_beam.options package</a></li>
<li class="toctree-l1"><a class="reference internal" href="apache_beam.portability.html">apache_beam.portability package</a></li>
<li class="toctree-l1"><a class="reference internal" href="apache_beam.runners.html">apache_beam.runners package</a></li>
<li class="toctree-l1"><a class="reference internal" href="apache_beam.testing.html">apache_beam.testing package</a></li>
<li class="toctree-l1"><a class="reference internal" href="apache_beam.transforms.html">apache_beam.transforms package</a></li>
<li class="toctree-l1"><a class="reference internal" href="apache_beam.typehints.html">apache_beam.typehints package</a></li>
<li class="toctree-l1"><a class="reference internal" href="apache_beam.utils.html">apache_beam.utils package</a></li>
<li class="toctree-l1"><a class="reference internal" href="apache_beam.yaml.html">apache_beam.yaml package</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="apache_beam.error.html">apache_beam.error module</a></li>
<li class="toctree-l1"><a class="reference internal" href="apache_beam.pipeline.html">apache_beam.pipeline module</a></li>
<li class="toctree-l1"><a class="reference internal" href="apache_beam.pvalue.html">apache_beam.pvalue module</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">Apache Beam</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html" class="icon icon-home" aria-label="Home"></a></li>
<li class="breadcrumb-item"><a href="apache_beam.io.html">apache_beam.io package</a></li>
<li class="breadcrumb-item"><a href="apache_beam.io.aws.html">apache_beam.io.aws package</a></li>
<li class="breadcrumb-item active">apache_beam.io.aws.s3io module</li>
<li class="wy-breadcrumbs-aside">
<a href="_sources/apache_beam.io.aws.s3io.rst.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<section id="module-apache_beam.io.aws.s3io">
<span id="apache-beam-io-aws-s3io-module"></span><h1>apache_beam.io.aws.s3io module<a class="headerlink" href="#module-apache_beam.io.aws.s3io" title="Link to this heading"></a></h1>
<p>AWS S3 client</p>
<dl class="py function">
<dt class="sig sig-object py" id="apache_beam.io.aws.s3io.parse_s3_path">
<span class="sig-prename descclassname"><span class="pre">apache_beam.io.aws.s3io.</span></span><span class="sig-name descname"><span class="pre">parse_s3_path</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">s3_path</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">object_optional</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/io/aws/s3io.html#parse_s3_path"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#apache_beam.io.aws.s3io.parse_s3_path" title="Link to this definition"></a></dt>
<dd><p>Return the bucket and object names of the given s3:// path.</p>
</dd></dl>
<dl class="py class">
<dt class="sig sig-object py" id="apache_beam.io.aws.s3io.S3IO">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">apache_beam.io.aws.s3io.</span></span><span class="sig-name descname"><span class="pre">S3IO</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">client</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">options</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/io/aws/s3io.html#S3IO"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#apache_beam.io.aws.s3io.S3IO" title="Link to this definition"></a></dt>
<dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p>
<p>S3 I/O client.</p>
<dl class="py method">
<dt class="sig sig-object py" id="apache_beam.io.aws.s3io.S3IO.open">
<span class="sig-name descname"><span class="pre">open</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">filename</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">mode</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'r'</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">read_buffer_size</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">16777216</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">mime_type</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'application/octet-stream'</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/io/aws/s3io.html#S3IO.open"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#apache_beam.io.aws.s3io.S3IO.open" title="Link to this definition"></a></dt>
<dd><p>Open an S3 file path for reading or writing.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>filename</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><em>str</em></a>) – S3 file path in the form <code class="docutils literal notranslate"><span class="pre">s3://&lt;bucket&gt;/&lt;object&gt;</span></code>.</p></li>
<li><p><strong>mode</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><em>str</em></a>) – <code class="docutils literal notranslate"><span class="pre">'r'</span></code> for reading or <code class="docutils literal notranslate"><span class="pre">'w'</span></code> for writing.</p></li>
<li><p><strong>read_buffer_size</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.13)"><em>int</em></a>) – Buffer size to use during read operations.</p></li>
<li><p><strong>mime_type</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><em>str</em></a>) – Mime type to set for write operations.</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>S3 file object.</p>
</dd>
<dt class="field-odd">Raises<span class="colon">:</span></dt>
<dd class="field-odd"><p><a class="reference external" href="https://docs.python.org/3/library/exceptions.html#ValueError" title="(in Python v3.13)"><strong>ValueError</strong></a> – Invalid open file mode.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="apache_beam.io.aws.s3io.S3IO.list_prefix">
<span class="sig-name descname"><span class="pre">list_prefix</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">path</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">with_metadata</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/io/aws/s3io.html#S3IO.list_prefix"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#apache_beam.io.aws.s3io.S3IO.list_prefix" title="Link to this definition"></a></dt>
<dd><p>Lists files matching the prefix.</p>
<blockquote>
<div><p><code class="docutils literal notranslate"><span class="pre">list_prefix</span></code> has been deprecated. Use <cite>list_files</cite> instead, which returns
a generator of file information instead of a dict.</p>
<dl class="simple">
<dt>Args:</dt><dd><p>path: S3 file path pattern in the form s3://&lt;bucket&gt;/[name].
with_metadata: Experimental. Specify whether returns file metadata.</p>
</dd>
<dt>Returns:</dt><dd><dl class="simple">
<dt>If <code class="docutils literal notranslate"><span class="pre">with_metadata</span></code> is False: dict of file name -&gt; size; if</dt><dd><p><code class="docutils literal notranslate"><span class="pre">with_metadata</span></code> is True: dict of file name -&gt; tuple(size, timestamp).</p>
</dd>
</dl>
</dd>
</dl>
</div></blockquote>
<div class="deprecated">
<p><span class="versionmodified deprecated">Deprecated since version list_prefix: </span>is deprecated since 2.45.0. Use list_files instead.</p>
</div>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="apache_beam.io.aws.s3io.S3IO.list_files">
<span class="sig-name descname"><span class="pre">list_files</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">path</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">with_metadata</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/io/aws/s3io.html#S3IO.list_files"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#apache_beam.io.aws.s3io.S3IO.list_files" title="Link to this definition"></a></dt>
<dd><p>Lists files matching the prefix.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>path</strong> – S3 file path pattern in the form s3://&lt;bucket&gt;/[name].</p></li>
<li><p><strong>with_metadata</strong> – Experimental. Specify whether returns file metadata.</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>generator of tuple(file name, size); if
<code class="docutils literal notranslate"><span class="pre">with_metadata</span></code> is True: generator of
tuple(file name, tuple(size, timestamp)).</p>
</dd>
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p>If <code class="docutils literal notranslate"><span class="pre">with_metadata</span></code> is False</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="apache_beam.io.aws.s3io.S3IO.checksum">
<span class="sig-name descname"><span class="pre">checksum</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">path</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/io/aws/s3io.html#S3IO.checksum"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#apache_beam.io.aws.s3io.S3IO.checksum" title="Link to this definition"></a></dt>
<dd><p>Looks up the checksum of an S3 object.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>path</strong> – S3 file path pattern in the form s3://&lt;bucket&gt;/&lt;name&gt;.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="apache_beam.io.aws.s3io.S3IO.copy">
<span class="sig-name descname"><span class="pre">copy</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">src</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">dest</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/io/aws/s3io.html#S3IO.copy"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#apache_beam.io.aws.s3io.S3IO.copy" title="Link to this definition"></a></dt>
<dd><p>Copies a single S3 file object from src to dest.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>src</strong> – S3 file path pattern in the form s3://&lt;bucket&gt;/&lt;name&gt;.</p></li>
<li><p><strong>dest</strong> – S3 file path pattern in the form s3://&lt;bucket&gt;/&lt;name&gt;.</p></li>
</ul>
</dd>
<dt class="field-even">Raises<span class="colon">:</span></dt>
<dd class="field-even"><p><a class="reference external" href="https://docs.python.org/3/library/exceptions.html#TimeoutError" title="(in Python v3.13)"><strong>TimeoutError</strong></a> – on timeout.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="apache_beam.io.aws.s3io.S3IO.copy_paths">
<span class="sig-name descname"><span class="pre">copy_paths</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">src_dest_pairs</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/io/aws/s3io.html#S3IO.copy_paths"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#apache_beam.io.aws.s3io.S3IO.copy_paths" title="Link to this definition"></a></dt>
<dd><p>Copies the given S3 objects from src to dest. This can handle directory
or file paths.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>src_dest_pairs</strong> – list of (src, dest) tuples of s3://&lt;bucket&gt;/&lt;name&gt; file
paths to copy from src to dest</p>
</dd>
</dl>
<dl class="simple">
<dt>Returns: List of tuples of (src, dest, exception) in the same order as the</dt><dd><p>src_dest_pairs argument, where exception is None if the operation
succeeded or the relevant exception if the operation failed.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="apache_beam.io.aws.s3io.S3IO.copy_tree">
<span class="sig-name descname"><span class="pre">copy_tree</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">src</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">dest</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/io/aws/s3io.html#S3IO.copy_tree"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#apache_beam.io.aws.s3io.S3IO.copy_tree" title="Link to this definition"></a></dt>
<dd><p>Renames the given S3 directory and it’s contents recursively
from src to dest.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>src</strong> – S3 file path pattern in the form s3://&lt;bucket&gt;/&lt;name&gt;/.</p></li>
<li><p><strong>dest</strong> – S3 file path pattern in the form s3://&lt;bucket&gt;/&lt;name&gt;/.</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>List of tuples of (src, dest, exception) where exception is None if the
operation succeeded or the relevant exception if the operation failed.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="apache_beam.io.aws.s3io.S3IO.delete">
<span class="sig-name descname"><span class="pre">delete</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">path</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/io/aws/s3io.html#S3IO.delete"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#apache_beam.io.aws.s3io.S3IO.delete" title="Link to this definition"></a></dt>
<dd><p>Deletes a single S3 file object from src to dest.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>src</strong> – S3 file path pattern in the form s3://&lt;bucket&gt;/&lt;name&gt;/.</p></li>
<li><p><strong>dest</strong> – S3 file path pattern in the form s3://&lt;bucket&gt;/&lt;name&gt;/.</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>List of tuples of (src, dest, exception) in the same order as the
src_dest_pairs argument, where exception is None if the operation
succeeded or the relevant exception if the operation failed.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="apache_beam.io.aws.s3io.S3IO.delete_paths">
<span class="sig-name descname"><span class="pre">delete_paths</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">paths</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/io/aws/s3io.html#S3IO.delete_paths"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#apache_beam.io.aws.s3io.S3IO.delete_paths" title="Link to this definition"></a></dt>
<dd><p>Deletes the given S3 objects from src to dest. This can handle directory
or file paths.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>src</strong> – S3 file path pattern in the form s3://&lt;bucket&gt;/&lt;name&gt;/.</p></li>
<li><p><strong>dest</strong> – S3 file path pattern in the form s3://&lt;bucket&gt;/&lt;name&gt;/.</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>List of tuples of (src, dest, exception) in the same order as the
src_dest_pairs argument, where exception is None if the operation
succeeded or the relevant exception if the operation failed.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="apache_beam.io.aws.s3io.S3IO.delete_files">
<span class="sig-name descname"><span class="pre">delete_files</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">paths</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">max_batch_size</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">1000</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/io/aws/s3io.html#S3IO.delete_files"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#apache_beam.io.aws.s3io.S3IO.delete_files" title="Link to this definition"></a></dt>
<dd><p>Deletes the given S3 file object from src to dest.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>paths</strong> – List of S3 file paths in the form s3://&lt;bucket&gt;/&lt;name&gt;</p></li>
<li><p><strong>max_batch_size</strong> – Largest number of keys to send to the client to be deleted</p></li>
<li><p><strong>simultaneously</strong></p></li>
</ul>
</dd>
</dl>
<dl class="simple">
<dt>Returns: List of tuples of (path, exception) in the same order as the paths</dt><dd><p>argument, where exception is None if the operation succeeded or
the relevant exception if the operation failed.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="apache_beam.io.aws.s3io.S3IO.delete_tree">
<span class="sig-name descname"><span class="pre">delete_tree</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">root</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/io/aws/s3io.html#S3IO.delete_tree"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#apache_beam.io.aws.s3io.S3IO.delete_tree" title="Link to this definition"></a></dt>
<dd><p>Deletes all objects under the given S3 directory.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>path</strong> – S3 root path in the form s3://&lt;bucket&gt;/&lt;name&gt;/ (ending with a “/”)</p>
</dd>
</dl>
<dl class="simple">
<dt>Returns: List of tuples of (path, exception), where each path is an object</dt><dd><p>under the given root. exception is None if the operation succeeded
or the relevant exception if the operation failed.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="apache_beam.io.aws.s3io.S3IO.size">
<span class="sig-name descname"><span class="pre">size</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">path</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/io/aws/s3io.html#S3IO.size"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#apache_beam.io.aws.s3io.S3IO.size" title="Link to this definition"></a></dt>
<dd><p>Returns the size of a single S3 object.</p>
<p>This method does not perform glob expansion. Hence the given path must be
for a single S3 object.</p>
<p>Returns: size of the S3 object in bytes.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="apache_beam.io.aws.s3io.S3IO.rename">
<span class="sig-name descname"><span class="pre">rename</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">src</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">dest</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/io/aws/s3io.html#S3IO.rename"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#apache_beam.io.aws.s3io.S3IO.rename" title="Link to this definition"></a></dt>
<dd><p>Renames the given S3 object from src to dest.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>src</strong> – S3 file path pattern in the form s3://&lt;bucket&gt;/&lt;name&gt;.</p></li>
<li><p><strong>dest</strong> – S3 file path pattern in the form s3://&lt;bucket&gt;/&lt;name&gt;.</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="apache_beam.io.aws.s3io.S3IO.last_updated">
<span class="sig-name descname"><span class="pre">last_updated</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">path</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/io/aws/s3io.html#S3IO.last_updated"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#apache_beam.io.aws.s3io.S3IO.last_updated" title="Link to this definition"></a></dt>
<dd><p>Returns the last updated epoch time of a single S3 object.</p>
<p>This method does not perform glob expansion. Hence the given path must be
for a single S3 object.</p>
<p>Returns: last updated time of the S3 object in second.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="apache_beam.io.aws.s3io.S3IO.exists">
<span class="sig-name descname"><span class="pre">exists</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">path</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/io/aws/s3io.html#S3IO.exists"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#apache_beam.io.aws.s3io.S3IO.exists" title="Link to this definition"></a></dt>
<dd><p>Returns whether the given S3 object exists.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>path</strong> – S3 file path pattern in the form s3://&lt;bucket&gt;/&lt;name&gt;.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="apache_beam.io.aws.s3io.S3IO.rename_files">
<span class="sig-name descname"><span class="pre">rename_files</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">src_dest_pairs</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/io/aws/s3io.html#S3IO.rename_files"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#apache_beam.io.aws.s3io.S3IO.rename_files" title="Link to this definition"></a></dt>
<dd><p>Renames the given S3 objects from src to dest.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>src_dest_pairs</strong> – list of (src, dest) tuples of s3://&lt;bucket&gt;/&lt;name&gt; file
paths to rename from src to dest</p>
</dd>
</dl>
<dl class="simple">
<dt>Returns: List of tuples of (src, dest, exception) in the same order as the</dt><dd><p>src_dest_pairs argument, where exception is None if the operation
succeeded or the relevant exception if the operation failed.</p>
</dd>
</dl>
</dd></dl>
</dd></dl>
<dl class="py class">
<dt class="sig sig-object py" id="apache_beam.io.aws.s3io.S3Downloader">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">apache_beam.io.aws.s3io.</span></span><span class="sig-name descname"><span class="pre">S3Downloader</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">client</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">path</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">buffer_size</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/io/aws/s3io.html#S3Downloader"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#apache_beam.io.aws.s3io.S3Downloader" title="Link to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="apache_beam.io.filesystemio.html#apache_beam.io.filesystemio.Downloader" title="apache_beam.io.filesystemio.Downloader"><code class="xref py py-class docutils literal notranslate"><span class="pre">Downloader</span></code></a></p>
<dl class="py property">
<dt class="sig sig-object py" id="apache_beam.io.aws.s3io.S3Downloader.size">
<em class="property"><span class="pre">property</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">size</span></span><a class="headerlink" href="#apache_beam.io.aws.s3io.S3Downloader.size" title="Link to this definition"></a></dt>
<dd></dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="apache_beam.io.aws.s3io.S3Downloader.get_range">
<span class="sig-name descname"><span class="pre">get_range</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">start</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">end</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/io/aws/s3io.html#S3Downloader.get_range"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#apache_beam.io.aws.s3io.S3Downloader.get_range" title="Link to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="py class">
<dt class="sig sig-object py" id="apache_beam.io.aws.s3io.S3Uploader">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">apache_beam.io.aws.s3io.</span></span><span class="sig-name descname"><span class="pre">S3Uploader</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">client</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">path</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">mime_type</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'application/octet-stream'</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/io/aws/s3io.html#S3Uploader"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#apache_beam.io.aws.s3io.S3Uploader" title="Link to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="apache_beam.io.filesystemio.html#apache_beam.io.filesystemio.Uploader" title="apache_beam.io.filesystemio.Uploader"><code class="xref py py-class docutils literal notranslate"><span class="pre">Uploader</span></code></a></p>
<dl class="py method">
<dt class="sig sig-object py" id="apache_beam.io.aws.s3io.S3Uploader.put">
<span class="sig-name descname"><span class="pre">put</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">data</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/io/aws/s3io.html#S3Uploader.put"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#apache_beam.io.aws.s3io.S3Uploader.put" title="Link to this definition"></a></dt>
<dd></dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="apache_beam.io.aws.s3io.S3Uploader.finish">
<span class="sig-name descname"><span class="pre">finish</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/io/aws/s3io.html#S3Uploader.finish"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#apache_beam.io.aws.s3io.S3Uploader.finish" title="Link to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
</section>
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="apache_beam.io.aws.s3filesystem.html" class="btn btn-neutral float-left" title="apache_beam.io.aws.s3filesystem module" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="apache_beam.io.azure.html" class="btn btn-neutral float-right" title="apache_beam.io.azure package" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>
<div role="contentinfo">
<p>&#169; Copyright %Y, Apache Beam.</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>