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

Send a Reason for success results #36

Open
ElMoselYEE opened this issue Apr 6, 2020 · 1 comment
Open

Send a Reason for success results #36

ElMoselYEE opened this issue Apr 6, 2020 · 1 comment

Comments

@ElMoselYEE
Copy link

Currently it seems the Reason portion of the response object payload can only be controlled in failure scenarios.

I'd like to send a Reason message for successful creates / updates in order to make it easier for system operators to understand the impact of the action taken. For me, I am implementing a schema migrator so I'd like to output that "3 migrations have executed successfully".

@leohoare
Copy link
Contributor

leohoare commented May 22, 2020

Have you tried setting the reason?
Something like:

helper = CfnResource()

@helper.create
def create(event, context):
    < whatever logic >
    self.Reason = "3 migrations have executed successfully"
    self.Data = ...

< update/ delete logic >

def handler(event, context):
    helper(event, context)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants