Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This pull request introduces comprehensive docstrings to the
AwsProvider
class and its methods in theprowler/providers/aws/aws_provider.py
file. These changes aim to enhance code readability and provide clear documentation for future developers.Enhancements to Documentation:
Class-level docstring:
AwsProvider
class, including its responsibilities and attributes.Method-level docstrings:
__init__
: Expanded the description ofsession_duration
and provided usage examples for different initialization scenarios. [1] [2]set_identity
: Added a comprehensive description of the method, including arguments, return type, and possible exceptions.setup_session
: Documented the method's purpose, arguments, return type, and potential exceptions.print_credentials
: Added a docstring to describe the method's functionality and provide an example output.get_checks_from_input_arn
: Included a description, return type, and example usage.get_regions_from_audit_resources
: Detailed the arguments, return type, and provided an example.get_default_region
: Explained the method's purpose, arguments, return type, and provided an example.get_global_region
: Clarified the method's functionality, return type, and provided an example.input_role_mfa_token_and_code
: Added a description of the method, its return type, and an example.set_session_config
: Included a description of the method's arguments and return type.assume_role
: Provided a detailed description of the method, its arguments, and return type. [1] [2]get_aws_enabled_regions
: Added a comprehensive docstring detailing the method's arguments and return type.get_checks_to_execute_by_audit_resources
: Documented the method's purpose and return type.get_aws_region_for_sts
: Included a description of the function, its arguments, return type, and an example.Checklist
License
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.