class_docstr: Interact with MySQL.
  
  You can specify charset in the extra field of your connection
  as ``{"charset": "utf8"}``. Also you can choose cursor as
  ``{"cursor": "SSCursor"}``. Refer to the MySQLdb.cursors for more details.
  
  Note: For AWS IAM authentication, use iam in the extra connection parameters
  and set it to true. Leave the password field empty. This will use the
  "aws_default" connection to get the temporary token unless you override
  in extras.
  extras example: ``{"iam":true, "aws_conn_id":"my_aws_conn"}``
  
  You can also add "local_infile" parameter to determine whether local_infile feature of MySQL client is
  going to be enabled (it is disabled by default).
  
  :param schema: The MySQL database schema to connect to.
  :param connection: The :ref:`MySQL connection id <howto/connection:mysql>` used for MySQL credentials.
  :param local_infile: Boolean flag determining if local_infile should be used
  :param init_command: Initial command to issue to MySQL server upon connection
docstr: Retrieve a temporary password to connect to MySQL.
  
  Uses AWSHook to retrieve a temporary password to connect to MySQL
  Port is required. If none is provided, default 3306 is used
docstr_tok: ["Retrieve","a","temporary","password","to","connect","to","MySQL",".","Uses","AWSHook","to","retrieve","a","temporary","password","to","connect","to","MySQL","Port","is","required",".","If","none","is","provided",",","default","3306","is","used"]
code: def get_iam_token(self, conn: Connection) -> tuple[str, int]:
      """
      Retrieve a temporary password to connect to MySQL.
  
      Uses AWSHook to retrieve a temporary password to connect to MySQL
      Port is required. If none is provided, default 3306 is used
      """
      from airflow.providers.amazon.aws.hooks.base_aws import (
          AwsBaseHook,
      )
  
      aws_conn_id = conn.extra_dejson.get("aws_conn_id", "aws_default")
      aws_hook = AwsBaseHook(aws_conn_id, client_type="rds")
      if conn.port is None:
          port = 3306
      else:
          port = conn.port
      client = aws_hook.get_conn()
      token = client.generate_db_auth_token(conn.host, port, conn.login)
      return token, port
  
imports: from __future__ import annotations
  import json
  import logging
  from typing import TYPE_CHECKING, Any, Union
  from airflow.exceptions import AirflowOptionalProviderFeatureException
  from airflow.providers.common.sql.hooks.sql import DbApiHook
label_desc: Use image node_id 10 for calling the MySqlHook obj's underlying member method code with example usage: obj.get_iam_token(conn) and returns: token,  port