Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release 1.4.0 #109

Merged
merged 2 commits into from
Mar 20, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ Release process:
1. upload using: `VERSION=x.y.z APIKEY=abc... make upload`
1. test installing the rock from LuaRocks

### Unreleased
### 1.4.0 (20-Mar-2024)

- fix: aws configuration cannot be loaded due to pl.path cannot resolve the path started with ~
[94](https://github.com/Kong/lua-resty-aws/pull/94)
Expand Down
19 changes: 9 additions & 10 deletions docs/classes/AWS.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
<br/>
<h1>lua-resty-aws</h1>


<ul>
<li><a href="../index.html">Index</a></li>
</ul>
Expand Down Expand Up @@ -74,7 +73,7 @@
<h2><a href="#Methods">Methods</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#aws:new">aws:new (config)</a></td>
<td class="name" nowrap><a href="#AWS:new">AWS:new (config)</a></td>
<td class="summary">Creates a new AWS instance.</td>
</tr>
</table>
Expand All @@ -87,8 +86,8 @@

<dl class="function">
<dt>
<a name = "aws:new"></a>
<strong>aws:new (config)</strong>
<a name = "AWS:new"></a>
<strong>AWS:new (config)</strong>
</dt>
<dd>
Creates a new AWS instance.
Expand Down Expand Up @@ -119,26 +118,26 @@

<span class="keyword">local</span> config = { region = AWS_global_config.region }

<span class="keyword">local</span> aws = <span class="function-name">AWS</span>(config)
<span class="keyword">local</span> aws = AWS(config)

<span class="comment">-- Override default "CredentialProviderChain" credentials.
</span><span class="comment">-- This is optional, the defaults should work with AWS-IAM.
</span><span class="keyword">local</span> my_creds = aws:<span class="function-name">Credentials</span> {
</span><span class="keyword">local</span> my_creds = aws:Credentials {
accessKeyId = <span class="string">"access"</span>,
secretAccessKey = <span class="string">"secret"</span>,
sessionToken = <span class="string">"token"</span>,
}
aws.config.credentials = my_creds

<span class="comment">-- instantiate a service (optionally overriding the aws-instance config)
</span><span class="keyword">local</span> sm = aws:<span class="function-name">SecretsManager</span> {
</span><span class="keyword">local</span> sm = aws:SecretsManager {
region = <span class="string">"us-east-2"</span>,
}

<span class="comment">-- Invoke a method.
</span><span class="comment">-- Note this only takes the parameter table, and NOT a callback as the
</span><span class="comment">-- JS sdk requires. Instead this call will directly return the results.
</span><span class="keyword">local</span> results, err = sm:<span class="function-name">getSecretValue</span> {
</span><span class="keyword">local</span> results, err = sm:getSecretValue {
SecretId = <span class="string">"arn:aws:secretsmanager:us-east-2:238406704566:secret:test-HN1F1k"</span>,
}</pre></li>
</ul>
Expand All @@ -150,8 +149,8 @@
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/lunarmodules/LDoc">LDoc 1.5.0</a></i>
<i style="float:right;">Last updated 2023-12-25 06:16:21 </i>
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
Fixed Show fixed Hide fixed
<i style="float:right;">Last updated 2024-03-20 07:59:58 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
Expand Down
11 changes: 5 additions & 6 deletions docs/classes/ChainableTemporaryCredentials.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
<br/>
<h1>lua-resty-aws</h1>


<ul>
<li><a href="../index.html">Index</a></li>
</ul>
Expand Down Expand Up @@ -123,17 +122,17 @@
<h3>Usage:</h3>
<ul>
<pre class="example"><span class="comment">-- creating a chain of assumed roles
</span><span class="keyword">local</span> aws = <span class="function-name">AWS</span>() <span class="comment">-- provides the masterCredentials
</span><span class="keyword">local</span> aws = AWS() <span class="comment">-- provides the masterCredentials
</span><span class="keyword">local</span> role1 = { ... } <span class="comment">-- parameters to assume role1, from the masterCredentials
</span><span class="keyword">local</span> role2 = { ... } <span class="comment">-- parameters to assume role2, from the role1 credentials
</span><span class="keyword">local</span> role3 = { ... } <span class="comment">-- parameters to assume role3, from the role2 credentials
</span>
<span class="keyword">local</span> creds = aws:<span class="function-name">ChainableTemporaryCredentials</span> {
<span class="keyword">local</span> creds = aws:ChainableTemporaryCredentials {
params = { role1, role2, role3 },
}

<span class="comment">-- Get credentials for role3
</span><span class="keyword">local</span> success, id, key, token, expiretime = creds:<span class="function-name">get</span>()
</span><span class="keyword">local</span> success, id, key, token, expiretime = creds:get()
<span class="keyword">if</span> <span class="keyword">not</span> success <span class="keyword">then</span>
<span class="keyword">return</span> <span class="keyword">nil</span>, id
<span class="keyword">end</span></pre>
Expand All @@ -146,8 +145,8 @@
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/lunarmodules/LDoc">LDoc 1.5.0</a></i>
<i style="float:right;">Last updated 2023-12-25 06:16:21 </i>
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
Fixed Show fixed Hide fixed
<i style="float:right;">Last updated 2024-03-20 07:59:58 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
Expand Down
5 changes: 2 additions & 3 deletions docs/classes/CredentialProviderChain.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
<br/>
<h1>lua-resty-aws</h1>


<ul>
<li><a href="../index.html">Index</a></li>
</ul>
Expand Down Expand Up @@ -130,8 +129,8 @@
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/lunarmodules/LDoc">LDoc 1.5.0</a></i>
<i style="float:right;">Last updated 2023-12-25 06:16:21 </i>
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
Fixed Show fixed Hide fixed
<i style="float:right;">Last updated 2024-03-20 07:59:58 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
Expand Down
37 changes: 18 additions & 19 deletions docs/classes/Credentials.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
<br/>
<h1>lua-resty-aws</h1>


<ul>
<li><a href="../index.html">Index</a></li>
</ul>
Expand Down Expand Up @@ -81,19 +80,19 @@
<h2><a href="#Methods">Methods</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#credentials:get">credentials:get ()</a></td>
<td class="name" nowrap><a href="#Credentials:get">Credentials:get ()</a></td>
<td class="summary">Gets credentials, refreshes if required.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#credentials:needsRefresh">credentials:needsRefresh ()</a></td>
<td class="name" nowrap><a href="#Credentials:needsRefresh">Credentials:needsRefresh ()</a></td>
<td class="summary">checks whether credentials have expired.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#credentials:refresh">credentials:refresh ()</a></td>
<td class="name" nowrap><a href="#Credentials:refresh">Credentials:refresh ()</a></td>
<td class="summary">updates credentials.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#credentials:set">credentials:set (accessKeyId, secretAccessKey, sessionToken, expireTime)</a></td>
<td class="name" nowrap><a href="#Credentials:set">Credentials:set (accessKeyId, secretAccessKey, sessionToken, expireTime)</a></td>
<td class="summary">Sets credentials.</td>
</tr>
</table>
Expand Down Expand Up @@ -132,7 +131,7 @@
<li><span class="parameter">expireTime</span>
(optional, number (epoch) or string (rfc3339)). This should
not be specified. Default: If any of the 3 secrets are given; 10yrs, otherwise 0
(forcing a refresh on the first call to <a href="../classes/Credentials.html#credentials:get">get</a>).
(forcing a refresh on the first call to <a href="../classes/Credentials.html#Credentials:get">get</a>).
</li>
</li></ul>
</ul>
Expand All @@ -142,13 +141,13 @@

<h3>Usage:</h3>
<ul>
<pre class="example"><span class="keyword">local</span> my_creds = aws:<span class="function-name">Credentials</span> {
<pre class="example"><span class="keyword">local</span> my_creds = aws:Credentials {
accessKeyId = <span class="string">"access"</span>,
secretAccessKey = <span class="string">"secret"</span>,
sessionToken = <span class="string">"token"</span>,
}

<span class="keyword">local</span> success, id, secret, token = my_creds:<span class="function-name">get</span>()</pre>
<span class="keyword">local</span> success, id, secret, token = my_creds:get()</pre>
</ul>

</dd>
Expand All @@ -157,8 +156,8 @@

<dl class="function">
<dt>
<a name = "credentials:get"></a>
<strong>credentials:get ()</strong>
<a name = "Credentials:get"></a>
<strong>Credentials:get ()</strong>
</dt>
<dd>
Gets credentials, refreshes if required.
Expand All @@ -180,8 +179,8 @@

</dd>
<dt>
<a name = "credentials:needsRefresh"></a>
<strong>credentials:needsRefresh ()</strong>
<a name = "Credentials:needsRefresh"></a>
<strong>Credentials:needsRefresh ()</strong>
</dt>
<dd>
checks whether credentials have expired.
Expand All @@ -199,12 +198,12 @@

</dd>
<dt>
<a name = "credentials:refresh"></a>
<strong>credentials:refresh ()</strong>
<a name = "Credentials:refresh"></a>
<strong>Credentials:refresh ()</strong>
</dt>
<dd>
updates credentials.
override in subclasses, should call <a href="../classes/Credentials.html#credentials:set">set</a> to set the properties.
override in subclasses, should call <a href="../classes/Credentials.html#Credentials:set">set</a> to set the properties.



Expand All @@ -219,8 +218,8 @@

</dd>
<dt>
<a name = "credentials:set"></a>
<strong>credentials:set (accessKeyId, secretAccessKey, sessionToken, expireTime)</strong>
<a name = "Credentials:set"></a>
<strong>Credentials:set (accessKeyId, secretAccessKey, sessionToken, expireTime)</strong>
</dt>
<dd>
Sets credentials.
Expand Down Expand Up @@ -265,8 +264,8 @@
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/lunarmodules/LDoc">LDoc 1.5.0</a></i>
<i style="float:right;">Last updated 2023-12-25 06:16:21 </i>
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
Fixed Show fixed Hide fixed
<i style="float:right;">Last updated 2024-03-20 07:59:58 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
Expand Down
5 changes: 2 additions & 3 deletions docs/classes/EC2MetadataCredentials.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
<br/>
<h1>lua-resty-aws</h1>


<ul>
<li><a href="../index.html">Index</a></li>
</ul>
Expand Down Expand Up @@ -112,8 +111,8 @@
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/lunarmodules/LDoc">LDoc 1.5.0</a></i>
<i style="float:right;">Last updated 2023-12-25 06:16:21 </i>
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
Fixed Show fixed Hide fixed
<i style="float:right;">Last updated 2024-03-20 07:59:58 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
Expand Down
5 changes: 2 additions & 3 deletions docs/classes/EnvironmentCredentials.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
<br/>
<h1>lua-resty-aws</h1>


<ul>
<li><a href="../index.html">Index</a></li>
</ul>
Expand Down Expand Up @@ -121,8 +120,8 @@
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/lunarmodules/LDoc">LDoc 1.5.0</a></i>
<i style="float:right;">Last updated 2023-12-25 06:16:21 </i>
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
Fixed Show fixed Hide fixed
<i style="float:right;">Last updated 2024-03-20 07:59:58 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
Expand Down
5 changes: 2 additions & 3 deletions docs/classes/RemoteCredentials.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
<br/>
<h1>lua-resty-aws</h1>


<ul>
<li><a href="../index.html">Index</a></li>
</ul>
Expand Down Expand Up @@ -112,8 +111,8 @@
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/lunarmodules/LDoc">LDoc 1.5.0</a></i>
<i style="float:right;">Last updated 2023-12-25 06:16:21 </i>
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
Fixed Show fixed Hide fixed
<i style="float:right;">Last updated 2024-03-20 07:59:58 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
Expand Down
5 changes: 2 additions & 3 deletions docs/classes/SharedFileCredentials.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
<br/>
<h1>lua-resty-aws</h1>


<ul>
<li><a href="../index.html">Index</a></li>
</ul>
Expand Down Expand Up @@ -112,8 +111,8 @@
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/lunarmodules/LDoc">LDoc 1.5.0</a></i>
<i style="float:right;">Last updated 2023-12-25 06:16:21 </i>
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
Fixed Show fixed Hide fixed
<i style="float:right;">Last updated 2024-03-20 07:59:58 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
Expand Down
5 changes: 2 additions & 3 deletions docs/classes/TokenFileWebIdentityCredentials.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
<br/>
<h1>lua-resty-aws</h1>


<ul>
<li><a href="../index.html">Index</a></li>
</ul>
Expand Down Expand Up @@ -127,8 +126,8 @@
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/lunarmodules/LDoc">LDoc 1.5.0</a></i>
<i style="float:right;">Last updated 2023-12-25 06:16:21 </i>
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
Fixed Show fixed Hide fixed
<i style="float:right;">Last updated 2024-03-20 07:59:58 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
Expand Down
5 changes: 2 additions & 3 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@




<h2>Modules</h2>
<ul class="nowrap">
<li><a href="modules/resty.aws.config.html">resty.aws.config</a></li>
Expand Down Expand Up @@ -125,8 +124,8 @@
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/lunarmodules/LDoc">LDoc 1.5.0</a></i>
<i style="float:right;">Last updated 2023-12-25 06:16:21 </i>
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
Fixed Show fixed Hide fixed
<i style="float:right;">Last updated 2024-03-20 07:59:58 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
Expand Down
Loading
Loading