### Install AWS CLI v2 for Linux Source: https://youtype.github.io/awscliv2/awscliv2/installers Installs the AWS CLI v2 on Linux from a provided URL. ```python def install_linux(url: str) -> None: ... ``` -------------------------------- ### install_multiplatform() -> None Source: https://youtype.github.io/awscliv2/awscliv2/installers Installs the AWS CLI v2 for Linux or MacOS. ```APIDOC ## install_multiplatform() -> None ### Description Installs the AWS CLI v2 for either Linux or MacOS environments. ``` -------------------------------- ### install_macos() -> None Source: https://youtype.github.io/awscliv2/awscliv2/installers Installs the AWS CLI v2 for MacOS. ```APIDOC ## install_macos() -> None ### Description Installs the AWS CLI v2 on MacOS systems. ``` -------------------------------- ### Install AWS CLI v2 for multiplatform Source: https://youtype.github.io/awscliv2/awscliv2/installers Installs the AWS CLI v2 for either Linux or macOS environments. ```python def install_multiplatform() -> None: ... ``` -------------------------------- ### Install AWS CLI v2 for MacOS Source: https://youtype.github.io/awscliv2/awscliv2/installers Installs the AWS CLI v2 on macOS systems. ```python def install_macos() -> None: ... ``` -------------------------------- ### install_linux(url: str) -> None Source: https://youtype.github.io/awscliv2/awscliv2/installers Installs the AWS CLI v2 for Linux from a specific URL. ```APIDOC ## install_linux(url: str) -> None ### Description Installs the AWS CLI v2 for Linux using the provided installation package URL. ### Parameters - **url** (str) - The URL of the Linux installation package. ``` -------------------------------- ### install_linux_x86_64() -> None Source: https://youtype.github.io/awscliv2/awscliv2/installers Installs the AWS CLI v2 for Linux x86_64 architecture. ```APIDOC ## install_linux_x86_64() -> None ### Description Installs the AWS CLI v2 specifically for Linux x86_64 systems. ``` -------------------------------- ### Install AWS CLI v2 for Linux x86_64 Source: https://youtype.github.io/awscliv2/awscliv2/installers Installs the AWS CLI v2 specifically for Linux x86_64 architectures. ```python def install_linux_x86_64() -> None: ... ``` -------------------------------- ### install_linux_arm() -> None Source: https://youtype.github.io/awscliv2/awscliv2/installers Installs the AWS CLI v2 for Linux ARM architecture. ```APIDOC ## install_linux_arm() -> None ### Description Installs the AWS CLI v2 specifically for Linux ARM systems. ``` -------------------------------- ### Install AWS CLI v2 for Linux ARM Source: https://youtype.github.io/awscliv2/awscliv2/installers Installs the AWS CLI v2 specifically for Linux ARM architectures. ```python def install_linux_arm() -> None: ... ``` -------------------------------- ### Define CLINamespace class Source: https://youtype.github.io/awscliv2/awscliv2/cli_parser Represents the main CLI namespace structure for configuration, role assumption, and installation flags. ```python class CLINamespace: def __init__( self, configure: Sequence[str], assume_role: Sequence[str], encoding: str, install: bool, update: bool, version: bool, other: Sequence[str], ) -> None: ... ``` -------------------------------- ### Get Command String Source: https://youtype.github.io/awscliv2/awscliv2/interactive_process Retrieves the command associated with the InteractiveProcess instance as a string. ```python def get_command(self) -> str: ... ``` -------------------------------- ### Define InstallError class Source: https://youtype.github.io/awscliv2/awscliv2/exceptions Exception class specifically for errors encountered during the AWS CLI v2 installation process. ```python class InstallError(AWSCLIError): ... ``` -------------------------------- ### Get default logger signature Source: https://youtype.github.io/awscliv2/awscliv2/logger Defines the function signature for retrieving a logger instance with a default debug level. ```python def get_logger(level: int = logging.DEBUG) -> logging.Logger: ... ``` -------------------------------- ### Get AWS CLI Command Source: https://youtype.github.io/awscliv2/awscliv2/api Static method to retrieve the base command used to invoke AWS CLI v2. ```python @staticmethod def get_awscli_v2_cmd() -> List[str]: ... ``` -------------------------------- ### main(args: Sequence[str]) -> int Source: https://youtype.github.io/awscliv2/awscliv2/main The main entrypoint for the API. ```APIDOC ## main(args: Sequence[str]) -> int ### Description Entrypoint for the API. ### Signature `def main(args: Sequence[str]) -> int` ``` -------------------------------- ### main_cli() -> None Source: https://youtype.github.io/awscliv2/awscliv2/main The main entrypoint for the CLI. ```APIDOC ## main_cli() -> None ### Description Entrypoint for the CLI. ### Signature `def main_cli() -> None` ``` -------------------------------- ### AWSAPI.__init__ Source: https://youtype.github.io/awscliv2/awscliv2/api Initializes the AWSAPI instance with optional encoding and output stream configuration. ```APIDOC ## AWSAPI.__init__(self, encoding: str = ENCODING, output: Optional[TextIO] = None) ### Description Initializes the AWSAPI client for interacting with AWS CLI v2. ### Parameters - **encoding** (str) - Optional - Input/output encoding, default utf-8. - **output** (Optional[TextIO]) - Optional - Output stream, default sys.stdout. ``` -------------------------------- ### Initialize AWSAPI Source: https://youtype.github.io/awscliv2/awscliv2/api Constructor for the AWSAPI class, allowing configuration of encoding and output streams. ```python class AWSAPI: def __init__( self, encoding: str = ENCODING, output: Optional[TextIO] = None ) -> None: ... ``` -------------------------------- ### InteractiveProcess Class Initialization Source: https://youtype.github.io/awscliv2/awscliv2/interactive_process Initializes the InteractiveProcess wrapper with a command sequence and optional encoding. ```python class InteractiveProcess: def __init__(self, command: Sequence[str], encoding: str = ENCODING) -> None: ... ``` -------------------------------- ### download_file(url: str, target: Path) -> None Source: https://youtype.github.io/awscliv2/awscliv2/installers Downloads a file from the specified URL to the target path. ```APIDOC ## download_file(url: str, target: Path) -> None ### Description Downloads a file from the provided `url` to the specified `target` path. ### Parameters - **url** (str) - The source URL of the file. - **target** (Path) - The destination file path. ``` -------------------------------- ### CLI Entrypoint Signature Source: https://youtype.github.io/awscliv2/awscliv2/main Defines the main_cli function signature for the CLI. ```python def main_cli() -> None: ... ``` -------------------------------- ### Retrieve package version Source: https://youtype.github.io/awscliv2/awscliv2/cli_parser Returns the current version of the awscliv2 package as a string. ```python def get_version() -> str: ... ``` -------------------------------- ### Download file utility Source: https://youtype.github.io/awscliv2/awscliv2/installers Downloads a file from a specified URL to a target path. ```python def download_file(url: str, target: Path) -> None: ... ``` -------------------------------- ### AWSAPI.execute Source: https://youtype.github.io/awscliv2/awscliv2/api Executes an AWS CLI v2 command and returns the output as a string. ```APIDOC ## AWSAPI.execute(self, args: Sequence[str]) -> str ### Description Executes the specified AWS CLI v2 command arguments. ### Parameters - **args** (Sequence[str]) - Required - The command arguments to pass to the AWS CLI. ### Returns - **str** - The command output. ``` -------------------------------- ### AWSAPI.run_awscli_v2 Source: https://youtype.github.io/awscliv2/awscliv2/api Runs the AWS CLI and returns the process exit code. ```APIDOC ## AWSAPI.run_awscli_v2(self, args: Sequence[str]) -> int ### Description Runs the AWS CLI with the provided arguments. ### Parameters - **args** (Sequence[str]) - Required - The command arguments to pass to the AWS CLI. ### Returns - **int** - The process exit code. ``` -------------------------------- ### Assume Role Source: https://youtype.github.io/awscliv2/awscliv2/api Configures assume role credentials for a specific profile. ```python def assume_role(self, profile_name: str, source_profile: str, role_arn: str) -> None: ... ``` -------------------------------- ### API Entrypoint Signature Source: https://youtype.github.io/awscliv2/awscliv2/main Defines the main function signature for the API. ```python def main(args: Sequence[str]) -> int: ... ``` -------------------------------- ### Set Credentials Source: https://youtype.github.io/awscliv2/awscliv2/api Updates or adds credentials to the ~/.aws/credentials file. ```python def set_credentials( self, profile_name: str, aws_access_key_id: str, aws_secret_access_key: str, aws_session_token: str = "", region: str = "", ) -> None: ... ``` -------------------------------- ### Run AWS CLI Source: https://youtype.github.io/awscliv2/awscliv2/api Executes the AWS CLI with the provided arguments and returns the exit code. ```python def run_awscli_v2(self, args: Sequence[str]) -> int: ... ``` -------------------------------- ### get_version() Source: https://youtype.github.io/awscliv2/awscliv2/cli_parser Retrieves the current version of the awscliv2 package as a string. ```APIDOC ## get_version() ### Description Returns the version of the awscliv2 package. ### Returns - **version** (str) - The package version string. ``` -------------------------------- ### parse_args(args) Source: https://youtype.github.io/awscliv2/awscliv2/cli_parser Parses a sequence of command-line arguments into a CLINamespace object. ```APIDOC ## parse_args(args) ### Description Parses the provided list of command-line arguments and returns a structured CLINamespace instance. ### Parameters - **args** (Sequence[str]) - Required - The list of command-line arguments to parse. ### Returns - **CLINamespace** (object) - An instance containing the parsed configuration, role, encoding, and flags. ``` -------------------------------- ### Run Interactive Process Source: https://youtype.github.io/awscliv2/awscliv2/interactive_process Executes the process with provided input streams and directs output to the specified stdout stream, returning the process status code. ```python def run(self, inputs: Sequence[TInput] = (), stdout: TextIO = default_stdout) -> int: ... ``` -------------------------------- ### Print AWS CLI Version Source: https://youtype.github.io/awscliv2/awscliv2/api Prints the current version of the AWS CLI v2 and returns the process exit code. ```python def print_version(self) -> int: ... ``` -------------------------------- ### Execute AWS CLI Command Source: https://youtype.github.io/awscliv2/awscliv2/api Executes an AWS CLI v2 command and returns the output as a string. ```python def execute(self, args: Sequence[str]) -> str: ... ``` -------------------------------- ### Parse CLI arguments Source: https://youtype.github.io/awscliv2/awscliv2/cli_parser Parses a sequence of command-line arguments into a CLINamespace object. ```python def parse_args(args: Sequence[str]) -> CLINamespace: ... ``` -------------------------------- ### get_logger(level: int = logging.DEBUG) -> logging.Logger Source: https://youtype.github.io/awscliv2/awscliv2/logger Retrieves a default logger instance, creating a new one if necessary. ```APIDOC ## get_logger ### Description Get default logger instance for the library. ### Signature `def get_logger(level: int = logging.DEBUG) -> logging.Logger` ### Arguments - **level** (int) - Optional - Python log level (default: logging.DEBUG) ### Returns - **Logger** (logging.Logger) - New or existing logger instance. ``` -------------------------------- ### AWSAPI.set_credentials Source: https://youtype.github.io/awscliv2/awscliv2/api Adds or updates AWS credentials in the local configuration file. ```APIDOC ## AWSAPI.set_credentials(self, profile_name: str, aws_access_key_id: str, aws_secret_access_key: str, aws_session_token: str = "", region: str = "") -> None ### Description Updates the ~/.aws/credentials file with the provided credentials. ### Parameters - **profile_name** (str) - Required - The profile name to update. - **aws_access_key_id** (str) - Required - The AWS access key ID. - **aws_secret_access_key** (str) - Required - The AWS secret access key. - **aws_session_token** (str) - Optional - The AWS session token. - **region** (str) - Optional - The AWS region. ``` -------------------------------- ### Define ExecutableNotFoundError class Source: https://youtype.github.io/awscliv2/awscliv2/exceptions Exception raised when a required subprocess executable cannot be located. ```python class ExecutableNotFoundError(BaseException): ... ``` -------------------------------- ### Read All Input Streams Source: https://youtype.github.io/awscliv2/awscliv2/interactive_process Writes input from stdin streams to the specified subprocess. ```python def readall(self, process: Popen, inputs: ignore) -> None: ... ``` -------------------------------- ### Write All Output Streams Source: https://youtype.github.io/awscliv2/awscliv2/interactive_process Reads output from the subprocess and writes it to the specified stdout stream. ```python def writeall(self, process: Popen, stdout: ignore) -> None: ... ``` -------------------------------- ### Implement AWSCLIError string representation Source: https://youtype.github.io/awscliv2/awscliv2/exceptions Provides the string representation method for the AWSCLIError class. ```python def __str__(self) -> str: ... ``` -------------------------------- ### Run AWS CLI Detached Source: https://youtype.github.io/awscliv2/awscliv2/api Executes the AWS CLI as a detached subprocess and returns the exit code. ```python def run_awscli_v2_detached(self, args: Sequence[str]) -> int: ... ``` -------------------------------- ### Define AWSCLIError class Source: https://youtype.github.io/awscliv2/awscliv2/exceptions The base exception class for the library, accepting an optional error message and return code. ```python class AWSCLIError(BaseException): def __init__(self, msg: str = "", returncode: int = 1) -> None: ... ``` -------------------------------- ### Define SubprocessError class Source: https://youtype.github.io/awscliv2/awscliv2/exceptions Exception raised when a subprocess execution is interrupted. ```python class SubprocessError(BaseException): ... ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.