diff --git a/changelogs/fragments/update_return_block_lambda.yml b/changelogs/fragments/update_return_block_lambda.yml new file mode 100644 index 00000000000..df82a9531d8 --- /dev/null +++ b/changelogs/fragments/update_return_block_lambda.yml @@ -0,0 +1,3 @@ +--- +trivial: + - Update return block in the module documentation for lambda_event, lambda_info, lambda_layer, lambda_policy diff --git a/plugins/modules/lambda_event.py b/plugins/modules/lambda_event.py index 424ad5abeca..48484c037ae 100644 --- a/plugins/modules/lambda_event.py +++ b/plugins/modules/lambda_event.py @@ -144,10 +144,109 @@ RETURN = r""" --- -lambda_stream_events: - description: list of dictionaries returned by the API describing stream event mappings +events: + description: Dictionary returned by the API describing stream event mappings returned: success - type: list + type: dict + contains: + batch_size: + description: The maximum number of records in each batch that Lambda pulls. + type: int + returned: always + bisect_batch_on_function_error: + description: If the function returns an error, split the batch in two and retry. + type: bool + returned: for Kinesis and DynamoDB Streams only + sample: false + destination_config: + description: Configuration object that specifies the destination of an event after Lambda processes it. + type: dict + returned: For Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Kafka only + contains: + on_failure: + description: The destination configuration for failed invocations. + type: dict + contains: + destination: + description: Destination resource ARN. + type: str + on_success: + description: The destination configuration for failed invocations. + type: dict + contains: + destination: + description: Destination resource ARN. + type: str + event_source_arn: + description: The Amazon Resource Name (ARN) of the event source. + type: str + returned: always + sample: "arn:aws:dynamodb:us-west-2:123456789012:table/yyyy/stream/2024-06-06T07:03:58.956" + function_arn: + description: The ARN of the Lambda function. + type: str + returned: always + sample: "arn:aws:lambda:us-west-2:123456789012:function:test-lambda-3a0a29d0dbb5:1" + function_response_types: + description: A list of current response type enums applied to the event source mapping. + type: list + returned: For Kinesis, DynamoDB Streams, and Amazon SQS + sample: ["ReportBatchItemFailures"] + last_modified: + description: The date that the event source mapping was last updated or that its state changed. + type: str + returned: always + sample: "2024-06-06T12:34:21.990000+05:30" + last_processing_result: + description: The result of the last Lambda invocation of your function. + type: str + returned: always + sample: "No records processed" + maximum_batching_window_in_seconds: + description: The maximum amount of time, in seconds, that Lambda spends gathering records before invoking the function. + type: int + returned: always + sample: 1 + maximum_record_age_in_seconds: + description: Discard records older than the specified age. The default value is infinite (-1). + type: int + returned: For Kinesis and DynamoDB Streams only + sample: -1 + maximum_retry_attempts: + description: Discard records after the specified number of retries. + type: int + returned: For Kinesis and DynamoDB Streams only + sample: -1 + parallelization_factor: + description: The number of batches to process concurrently from each shard. + type: int + returned: For Kinesis and DynamoDB Streams only + sample: 1 + starting_position: + description: The position in a stream from which to start reading. + type: str + returned: For Kinesis and DynamoDB Streams only + sample: "LATEST" + state: + description: The state of the event source mapping. + type: str + returned: always + sample: "deleting" + state_transition_reason: + description: Indicates whether a user or Lambda made the last change to the event source mapping. + type: str + returned: always + sample: "USER_INITIATED" + tumbling_window_in_seconds: + description: The duration in seconds of a processing window for DynamoDB and Kinesis Streams event sources. + type: int + returned: For Kinesis and DynamoDB Streams only + sample: 1 + uuid: + description: The identifier of the event source mapping. + type: str + returned: always + sample: "a1b2c3d4-5678-90ab-cdef-11111EXAMPLE" """ import copy diff --git a/plugins/modules/lambda_info.py b/plugins/modules/lambda_info.py index fbd443bb7cc..3a7d724e5b8 100644 --- a/plugins/modules/lambda_info.py +++ b/plugins/modules/lambda_info.py @@ -125,6 +125,15 @@ returned: success type: str sample: 'My function' + ephermal_storage: + description: The size of the function /tmp directory in MB. + type: dict + contains: + size: + description: The size of the function /tmp directory. + type: int + returned: always + sample: 512 environment: description: The function's environment variables. returned: when environment variables exist @@ -211,6 +220,11 @@ returned: on success type: int sample: 128 + package_type: + description: The type of deployment package. + type: str + returned: always + sample: "Zip" policy: description: The policy associated with the function. returned: when C(query) is I(all) or I(policy) @@ -230,6 +244,29 @@ returned: on success type: str sample: 'nodejs6.10' + runtime_version_config: + description: The ARN of the runtime and any errors that occured. + type: dict + contains: + runtime_version_arn: + description: The ARN of the runtime version you want the function to use. + type: str + returned: always + sample: "arn:aws:lambda:us-west-2::runtime:123456789012" + snap_start: + description: Snapshot of the initialized execution environment when you publish a function version. + type: dict + contains: + apply_on: + description: When set to V(PublishedVersions), Lambda creates a snapshot of the execution environment when you publish a function version. + type: str + sample: "None" + returned: always + optimization_status: + description: This element indicates whether SnapStart is activated for the specified function version. + type: str + returned: always + sample: "Off" tracing_config: description: The function's AWS X-Ray tracing configuration. returned: on success diff --git a/plugins/modules/lambda_layer.py b/plugins/modules/lambda_layer.py index e727277de58..241915f5a52 100644 --- a/plugins/modules/lambda_layer.py +++ b/plugins/modules/lambda_layer.py @@ -193,6 +193,11 @@ description: The description of the version. returned: I(state=present) type: str + compatible_runtimes: + description: A list of compatible runtimes. + returned: if it was defined for the layer version. + type: list + sample: ["python3.7"] created_date: description: The date that the layer version was created, in ISO-8601 format (YYYY-MM-DDThh:mm:ss.sTZD). returned: if the layer version exists or has been created @@ -203,11 +208,6 @@ returned: if the layer version exists or has been created type: int sample: 1 - compatible_runtimes: - description: A list of compatible runtimes. - returned: if it was defined for the layer version. - type: list - sample: ["python3.7"] license_info: description: The layer's software license. returned: if it was defined for the layer version. diff --git a/plugins/modules/lambda_policy.py b/plugins/modules/lambda_policy.py index 3413d6e79da..7fda33292f9 100644 --- a/plugins/modules/lambda_policy.py +++ b/plugins/modules/lambda_policy.py @@ -125,6 +125,7 @@ description: describes what action was taken returned: success type: str + sample: "added" """ import json