Skip to content

Sceptre/sceptre-request-resolver

Repository files navigation

sceptre-request-resolver

A Sceptre resolver to make requests from REST API endpoints.

Motivation

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.

Installation

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

Usage/Examples

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

Example

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages