2525class BaseIAMClient (BaseServiceClient ):
2626 """
2727 Base client for IAM services.
28-
28+
2929 This class provides the same interface as BaseAgentkitClient but for IAM services:
3030 1. Common credential initialization
3131 2. Unified API invocation logic with error handling
3232 3. Automatic ApiInfo generation with flexible configuration
33-
33+
3434 Subclasses should override API_ACTIONS with either:
3535 - Simple dict mapping: {"ActionName": "ActionName"}
3636 - Detailed ApiConfig: {"ActionName": ApiConfig(action="ActionName", method="GET", path="/custom")}
3737 """
38-
38+
3939 # Subclasses should override this with their API action configurations
4040 API_ACTIONS : Dict [str , Union [str , ApiConfig ]] = {}
41-
41+
4242 # IAM service specific configuration
4343 IAM_API_VERSION = "2018-01-01"
4444 IAM_SERVICE_CODE = "iam"
45- IAM_HOST = "open.volcengineapi.com"
46-
45+ IAM_HOST = "open.volcengineapi.com"
46+
4747 def __init__ (
4848 self ,
4949 access_key : str = "" ,
@@ -54,7 +54,7 @@ def __init__(
5454 ) -> None :
5555 """
5656 Initialize the IAM client.
57-
57+
5858 Args:
5959 access_key: Volcengine access key
6060 secret_key: Volcengine secret key
@@ -68,18 +68,18 @@ def __init__(
6868 region = region ,
6969 session_token = session_token ,
7070 service_name = service_name ,
71- credential_env_prefix = " IAM" ,
71+ credential_env_prefix = ' IAM' ,
7272 )
73-
73+
7474 def _get_service_config (self ) -> Dict [str , str ]:
7575 """
7676 Get IAM service configuration.
77-
77+
7878 Returns:
7979 Dictionary with host, api_version, and service
8080 """
8181 return {
82- " host" : self .IAM_HOST ,
83- " api_version" : self .IAM_API_VERSION ,
84- " service" : self .IAM_SERVICE_CODE ,
82+ ' host' : self .IAM_HOST ,
83+ ' api_version' : self .IAM_API_VERSION ,
84+ ' service' : self .IAM_SERVICE_CODE ,
8585 }
0 commit comments