Skip to content

Commit

Permalink
rename execute_lambda (#1273)
Browse files Browse the repository at this point in the history
rename execute_lambda

SUMMARY
In line with the naming guidelines, rename execute_lambda to lambda_execute
ISSUE TYPE

Feature Pull Request

COMPONENT NAME
plugins/modules/execute_lambda.py
plugins/modules/lambda_execute.py
ADDITIONAL INFORMATION

Reviewed-by: Joseph Torcasso <None>
  • Loading branch information
tremble authored Jun 29, 2022
1 parent 081cd7b commit b113be5
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 22 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,6 @@ Name | Description
[community.aws.elb_target_group](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.elb_target_group_module.rst)|Manage a target group for an Application or Network load balancer
[community.aws.elb_target_group_info](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.elb_target_group_info_module.rst)|Gather information about ELB target groups in AWS
[community.aws.elb_target_info](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.elb_target_info_module.rst)|Gathers which target groups a target is associated with.
[community.aws.execute_lambda](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.execute_lambda_module.rst)|Execute an AWS Lambda function
[community.aws.iam_access_key](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.iam_access_key_module.rst)|Manage AWS IAM User access keys
[community.aws.iam_access_key_info](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.iam_access_key_info_module.rst)|fetch information about AWS IAM User access keys
[community.aws.iam_group](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.iam_group_module.rst)|Manage AWS IAM groups
Expand All @@ -170,6 +169,7 @@ Name | Description
[community.aws.lambda](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.lambda_module.rst)|Manage AWS Lambda functions
[community.aws.lambda_alias](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.lambda_alias_module.rst)|Creates, updates or deletes AWS Lambda function aliases
[community.aws.lambda_event](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.lambda_event_module.rst)|Creates, updates or deletes AWS Lambda function event mappings
[community.aws.lambda_execute](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.lambda_execute_module.rst)|Execute an AWS Lambda function
[community.aws.lambda_info](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.lambda_info_module.rst)|Gathers AWS Lambda function details
[community.aws.lambda_policy](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.lambda_policy_module.rst)|Creates, updates or deletes AWS Lambda policy statements.
[community.aws.lightsail](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.lightsail_module.rst)|Manage instances in AWS Lightsail
Expand Down
2 changes: 2 additions & 0 deletions changelogs/fragments/1273-rename-lambda.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
minor_changes:
- execute_lambda - the ``execute_lambda`` module has been renamed to ``lambda_execute``, ``execute_lambda`` remains as an alias (https://github.com/ansible-collections/community.aws/pull/1273).
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
.. _community.aws.execute_lambda_module:
.. _community.aws.lambda_execute_module:


****************************
community.aws.execute_lambda
community.aws.lambda_execute
****************************

**Execute an AWS Lambda function**
Expand All @@ -18,6 +18,7 @@ Version added: 1.0.0
Synopsis
--------
- This module executes AWS Lambda functions, allowing synchronous and asynchronous invocation.
- Prior to release 5.0.0 this module was called ``community.aws.execute_lambda``. The usage did not change.



Expand Down Expand Up @@ -350,7 +351,7 @@ Examples

.. code-block:: yaml
- community.aws.execute_lambda:
- community.aws.lambda_execute:
name: test-function
# the payload is automatically serialized and sent to the function
payload:
Expand All @@ -360,11 +361,11 @@ Examples
# Test that you have sufficient permissions to execute a Lambda function in
# another account
- community.aws.execute_lambda:
- community.aws.lambda_execute:
function_arn: arn:aws:lambda:us-east-1:123456789012:function/some-function
dry_run: true
- community.aws.execute_lambda:
- community.aws.lambda_execute:
name: test-function
payload:
foo: bar
Expand All @@ -375,12 +376,12 @@ Examples
# the response will have a `logs` key that will contain a log (up to 4KB) of the function execution in Lambda
# Pass the Lambda event payload as a json file.
- community.aws.execute_lambda:
- community.aws.lambda_execute:
name: test-function
payload: "{{ lookup('file','lambda_event.json') }}"
register: response
- community.aws.execute_lambda:
- community.aws.lambda_execute:
name: test-function
version_qualifier: PRODUCTION
Expand Down
10 changes: 7 additions & 3 deletions meta/runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ action_groups:
- lambda
- lambda_alias
- lambda_event
- lambda_execute
- lambda_info
- lambda_policy
- lightsail
Expand Down Expand Up @@ -226,9 +227,6 @@ plugin_routing:
aws_batch_job_queue:
# Deprecation for this alias should not *start* prior to 2024-09-01
redirect: community.aws.batch_job_queue
aws_ses_identity:
# Deprecation for this alias should not *start* prior to 2024-09-01
redirect: community.aws.ses_identity
aws_eks_cluster:
# Deprecation for this alias should not *start* prior to 2024-09-01
redirect: community.aws.eks_cluster
Expand All @@ -238,6 +236,9 @@ plugin_routing:
aws_s3_cors:
# Deprecation for this alias should not *start* prior to 2024-09-01
redirect: community.aws.s3_cors
aws_ses_identity:
# Deprecation for this alias should not *start* prior to 2024-09-01
redirect: community.aws.ses_identity
aws_ses_rule_set:
# Deprecation for this alias should not *start* prior to 2024-09-01
redirect: community.aws.ses_rule_set
Expand Down Expand Up @@ -267,6 +268,9 @@ plugin_routing:
redirect: amazon.aws.ec2_vpc_route_table_info
elb_classic_lb:
redirect: amazon.aws.ec2_elb_lb
execute_lambda:
# Deprecation for this alias should not *start* prior to 2024-09-01
redirect: community.aws.lambda_execute
iam_cert:
redirect: community.aws.iam_server_certificate
deprecation:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,19 @@

DOCUMENTATION = '''
---
module: execute_lambda
module: lambda_execute
version_added: 1.0.0
short_description: Execute an AWS Lambda function
description:
- This module executes AWS Lambda functions, allowing synchronous and asynchronous
invocation.
- Prior to release 5.0.0 this module was called C(community.aws.execute_lambda).
The usage did not change.
extends_documentation_fragment:
- amazon.aws.aws
- amazon.aws.ec2
author: "Ryan Scott Brown (@ryansb) <[email protected]>"
- amazon.aws.aws
- amazon.aws.ec2
author:
- "Ryan Scott Brown (@ryansb) <[email protected]>"
notes:
- Async invocation will always return an empty C(output) key.
- Synchronous invocation may result in a function timeout, resulting in an
Expand Down Expand Up @@ -72,7 +74,7 @@
'''

EXAMPLES = '''
- community.aws.execute_lambda:
- community.aws.lambda_execute:
name: test-function
# the payload is automatically serialized and sent to the function
payload:
Expand All @@ -82,11 +84,11 @@
# Test that you have sufficient permissions to execute a Lambda function in
# another account
- community.aws.execute_lambda:
- community.aws.lambda_execute:
function_arn: arn:aws:lambda:us-east-1:123456789012:function/some-function
dry_run: true
- community.aws.execute_lambda:
- community.aws.lambda_execute:
name: test-function
payload:
foo: bar
Expand All @@ -97,12 +99,12 @@
# the response will have a `logs` key that will contain a log (up to 4KB) of the function execution in Lambda
# Pass the Lambda event payload as a json file.
- community.aws.execute_lambda:
- community.aws.lambda_execute:
name: test-function
payload: "{{ lookup('file','lambda_event.json') }}"
register: response
- community.aws.execute_lambda:
- community.aws.lambda_execute:
name: test-function
version_qualifier: PRODUCTION
'''
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/targets/lambda/aliases
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cloud/aws

execute_lambda
lambda_execute
lambda_info

0 comments on commit b113be5

Please sign in to comment.