Last active
May 27, 2024 13:06
-
-
Save filipeandre/22d8d15c2ecc015f2872fac27d5197cc to your computer and use it in GitHub Desktop.
Implementation of get command incocations boto3 waiter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import botocore.waiter | |
import botocore.session | |
get_command_invocations_model = botocore.waiter.WaiterModel({ | |
"version": 2, | |
"waiters": { | |
"CommandSuccess": { | |
"delay": 2, | |
"operation": "GetCommandInvocation", | |
"maxAttempts": 3, | |
"description": "Wait until command is completed", | |
"acceptors": [ | |
{ | |
"state": "retry", | |
"matcher": "error", | |
"expected": "InvocationDoesNotExist" | |
}, | |
{ | |
"state": "retry", | |
"matcher": "path", | |
"argument": "Status", | |
"expected": "Pending" | |
}, | |
{ | |
"state": "failure", | |
"matcher": "path", | |
"argument": "length(StandardErrorContent) == `0`", | |
"expected": False | |
}, | |
{ | |
"state": "success", | |
"matcher": "path", | |
"argument": "Status", | |
"expected": "Success" | |
} | |
] | |
}, | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment