A Sceptre resolver to make requests from REST API endpoints.
There are some pretty useful REST API endpoints on the internet. The endpoints can return lots of different types of data, typically in JSON format. This simple resolver can retrieve that data and pass it to Sceptre parameters or scepter_user_data parameters.
To install directly from PyPI
pip install sceptre-request-resolver
To install from this git repo
pip install git+https://github.com/Sceptre/sceptre-request-resolver.git
parameters|sceptre_user_data:
<name>: !request <API ENDPOINT>
parameters|sceptre_user_data:
<name>: !request
url: <API ENDPOINT>
auth: <authentication type>
user: <auth user name>
password: <auth password>
Note:
- This resolver always returns a string.
- Supported authentication types:
basic
Simple request:
parameters:
wisdom: !request 'https://ron-swanson-quotes.herokuapp.com/v2/quotes'
Request with basic authentication:
parameters:
wisdom: !request
url: https://private.endpoint.com/
auth: basic
user: MyUsername
password: MyUserPwd