Skip to content

Commit

Permalink
Remove deprecated @AWSRetry.backoff usage (ansible-collections#1386)
Browse files Browse the repository at this point in the history
Remove deprecated AWSRetry.backoff usage

Depends-On: ansible-collections#946
SUMMARY
AWSRetry.backoff was deprecated (and originally slated for removal in 4.0.0) remove usage.
ISSUE TYPE

Feature Pull Request

COMPONENT NAME
acm_certificate_info
acm_certificate
api_gateway_domain
waf_condition
waf_info
waf_rule
waf_web_acl
ADDITIONAL INFORMATION
WAF and ACM changes are coming from amazon.aws (linked PR), this just drops in a changelog fragment

Reviewed-by: Alina Buzachis <None>

This commit was initially merged in https://github.com/ansible-collections/community.aws
See: ansible-collections/community.aws@f5efd47
  • Loading branch information
tremble authored and abikouo committed Oct 20, 2023
1 parent 2776255 commit 052b623
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions plugins/modules/api_gateway_domain.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,20 +229,20 @@ def delete_domain(module, client):
return camel_dict_to_snake_dict(result)


retry_params = {"tries": 10, "delay": 5, "backoff": 1.2}
retry_params = {"delay": 5, "backoff": 1.2}


@AWSRetry.backoff(**retry_params)
@AWSRetry.jittered_backoff(**retry_params)
def get_domain_name(client, domain_name):
return client.get_domain_name(domainName=domain_name)


@AWSRetry.backoff(**retry_params)
@AWSRetry.jittered_backoff(**retry_params)
def get_domain_mappings(client, domain_name):
return client.get_base_path_mappings(domainName=domain_name, limit=200).get('items', [])


@AWSRetry.backoff(**retry_params)
@AWSRetry.jittered_backoff(**retry_params)
def create_domain_name(module, client, domain_name, certificate_arn, endpoint_type, security_policy):
endpoint_configuration = {'types': [endpoint_type]}

Expand All @@ -263,12 +263,12 @@ def create_domain_name(module, client, domain_name, certificate_arn, endpoint_ty
)


@AWSRetry.backoff(**retry_params)
@AWSRetry.jittered_backoff(**retry_params)
def add_domain_mapping(client, domain_name, base_path, rest_api_id, stage):
return client.create_base_path_mapping(domainName=domain_name, basePath=base_path, restApiId=rest_api_id, stage=stage)


@AWSRetry.backoff(**retry_params)
@AWSRetry.jittered_backoff(**retry_params)
def update_domain_name(client, domain_name, **kwargs):
patch_operations = []

Expand All @@ -281,12 +281,12 @@ def update_domain_name(client, domain_name, **kwargs):
return client.update_domain_name(domainName=domain_name, patchOperations=patch_operations)


@AWSRetry.backoff(**retry_params)
@AWSRetry.jittered_backoff(**retry_params)
def delete_domain_name(client, domain_name):
return client.delete_domain_name(domainName=domain_name)


@AWSRetry.backoff(**retry_params)
@AWSRetry.jittered_backoff(**retry_params)
def delete_domain_mapping(client, domain_name, base_path):
return client.delete_base_path_mapping(domainName=domain_name, basePath=base_path)

Expand Down

0 comments on commit 052b623

Please sign in to comment.