mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 22:02:50 +00:00
AWS: make jittered_backoff API parameter configurable (#49086)
* AWS: make jittered_backoff API parameter configurable * Review comments * minor doc changes Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
@@ -45,7 +45,7 @@ are included. If you do find an issue, please raise a bug report.
|
||||
|
||||
When porting, keep in mind that AnsibleAWSModule also will add the default ec2
|
||||
argument spec by default. In pre-port modules, you should see common arguments
|
||||
specfied with:
|
||||
specified with:
|
||||
|
||||
```
|
||||
def main():
|
||||
@@ -416,6 +416,13 @@ describe_instances(module.client('ec2'), InstanceIds=['i-123456789'])
|
||||
The call will be retried the specified number of times, so the calling functions
|
||||
don't need to be wrapped in the backoff decorator.
|
||||
|
||||
You can also use customization for `retries`, `delay` and `max_delay` parameters used by
|
||||
`AWSRetry.jittered_backoff` API using module params. You can take a look into
|
||||
[cloudformation](/lib/ansible/modules/cloud/amazon/cloudformation.py) module for example.
|
||||
|
||||
To make all Amazon modules uniform, prefix the module param with `backoff_`, so `retries` becomes `backoff_retries`
|
||||
and likewise with `backoff_delay` and `backoff_max_delay`.
|
||||
|
||||
### Returning Values
|
||||
|
||||
When you make a call using boto3, you will probably get back some useful information that you
|
||||
|
||||
Reference in New Issue
Block a user