{"id":9450,"library":"alibabacloud-ims20190815","title":"Alibaba Cloud Ims (20190815) SDK","description":"The `alibabacloud-ims20190815` library is the Alibaba Cloud SDK for Identity Management Service (IMS), specifically for the API version dated 2019-08-15. It provides Python bindings to interact with IMS resources like users, groups, and access keys, simplifying API calls and response handling. It is currently at version 3.3.6 and receives regular maintenance updates as part of the broader Alibaba Cloud Python SDK ecosystem.","status":"active","version":"3.3.6","language":"en","source_language":"en","source_url":"https://github.com/aliyun/alibabacloud-python-sdk","tags":["alibaba cloud","ims","identity management","sdk","cloud"],"install":[{"cmd":"pip install alibabacloud-ims20190815","lang":"bash","label":"Install Ims SDK"},{"cmd":"pip install alibabacloud-tea-openapi alibabacloud-tea-util","lang":"bash","label":"Install core dependencies (often implicit)"}],"dependencies":[{"reason":"Provides the core client configuration model (Config) and utilities for Alibaba Cloud SDKs.","package":"alibabacloud-tea-openapi","optional":false},{"reason":"Provides common utility functions used by Alibaba Cloud SDKs.","package":"alibabacloud-tea-util","optional":false}],"imports":[{"symbol":"Client","correct":"from alibabacloud_ims20190815.client import Client"},{"note":"While importing specific models directly is correct, importing `models` module and accessing attributes from it is more common and avoids long import lines for multiple request/response types.","wrong":"from alibabacloud_ims20190815.models import ListAccessKeysRequest","symbol":"models","correct":"from alibabacloud_ims20190815 import models"},{"note":"The `Config` class for client configuration is provided by the shared `alibabacloud-tea-openapi` dependency, not directly by the service SDK.","symbol":"Config","correct":"from alibabacloud_tea_openapi.models import Config"}],"quickstart":{"code":"import os\nfrom alibabacloud_ims20190815.client import Client as ImsClient\nfrom alibabacloud_ims20190815 import models as ImsModels\nfrom alibabacloud_tea_openapi.models import Config\n\n# Ensure environment variables are set for authentication\n# export ALIBABA_CLOUD_ACCESS_KEY_ID='your_access_key_id'\n# export ALIBABA_CLOUD_ACCESS_KEY_SECRET='your_access_key_secret'\n\n# Configure client with Access Key, Secret, and Region\n# Default region 'cn-hangzhou' might work, but specify if needed.\nconfig = Config(\n    access_key_id=os.environ.get('ALIBABA_CLOUD_ACCESS_KEY_ID', ''),\n    access_key_secret=os.environ.get('ALIBABA_CLOUD_ACCESS_KEY_SECRET', ''),\n    region_id='cn-hangzhou' # Or your desired region, e.g., 'ap-southeast-1'\n)\n\n# If a specific endpoint is required (e.g., private link, specific region), uncomment and set it.\n# config.endpoint = 'ims.cn-hangzhou.aliyuncs.com'\n\ntry:\n    # Initialize the client\n    client = ImsClient(config)\n\n    # Create a request object (e.g., for listing access keys)\n    list_access_keys_request = ImsModels.ListAccessKeysRequest()\n\n    # Call the API\n    response = client.list_access_keys(list_access_keys_request)\n\n    # Print the response body\n    print(response.body)\n\nexcept Exception as e:\n    print(f\"An error occurred: {e}\")\n","lang":"python","description":"This quickstart demonstrates how to initialize the IMS client using environment variables for authentication and make a basic API call to list access keys. It highlights the use of `Config` from `alibabacloud_tea_openapi` and the `Client` and `models` from the specific IMS SDK."},"warnings":[{"fix":"Ensure `os.environ.get('ALIBABA_CLOUD_ACCESS_KEY_ID')` and `os.environ.get('ALIBABA_CLOUD_ACCESS_KEY_SECRET')` return valid credentials. Verify permissions of the Access Key used.","message":"Authentication requires setting `ALIBABA_CLOUD_ACCESS_KEY_ID` and `ALIBABA_CLOUD_ACCESS_KEY_SECRET` environment variables or passing them directly in the `Config` object. Incorrect or missing credentials will result in `NoCredentialProviderError` or authentication failures like `InvalidAccessKeyId`.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Set `config.region_id` to an appropriate region (e.g., 'ap-southeast-1', 'us-east-1'). Refer to Alibaba Cloud documentation for service availability by region.","message":"Alibaba Cloud services are region-specific. While `cn-hangzhou` is a common default, ensure the `region_id` in your `Config` matches where your IMS resources are located or where the service is available. Using an unsupported region can lead to `EndpointNotFound` or service unavailability errors.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Explicitly install `alibabacloud-tea-openapi` and `alibabacloud-tea-util` alongside the service-specific SDK.","message":"The `alibabacloud-ims20190815` SDK often relies on core 'tea' dependencies like `alibabacloud-tea-openapi` and `alibabacloud-tea-util`. Although `pip` usually handles transitive dependencies, explicitly installing them (e.g., `pip install alibabacloud-tea-openapi alibabacloud-tea-util`) can prevent unexpected import errors or runtime issues, especially in isolated environments.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-17T00:00:00.000Z","next_check":"2026-07-16T00:00:00.000Z","problems":[{"fix":"Pass a valid `Config` instance when creating the client: `client = ImsClient(config)`.","cause":"The client class (e.g., `ImsClient`) requires a `Config` object during initialization.","error":"TypeError: __init__() missing 1 required positional argument: 'config'"},{"fix":"Set `ALIBABA_CLOUD_ACCESS_KEY_ID` and `ALIBABA_CLOUD_ACCESS_KEY_SECRET` environment variables, or pass `access_key_id` and `access_key_secret` directly to the `Config` constructor.","cause":"The SDK could not find valid Alibaba Cloud Access Key ID and Secret. This usually means environment variables are not set or the `Config` object was not correctly initialized with credentials.","error":"NoCredentialProviderError: The AK/SK credentials must be set correctly."},{"fix":"Verify that `ALIBABA_CLOUD_ACCESS_KEY_ID` is correct. Check the Alibaba Cloud console for the status of the Access Key and ensure it matches what is being used.","cause":"The provided Access Key ID is incorrect, revoked, or does not belong to your Alibaba Cloud account.","error":"SDK.ServerError: {\"Code\":\"InvalidAccessKeyId.NotFound\",\"Message\":\"The Access Key ID provided does not exist in our records.\",...}"},{"fix":"Verify that `ALIBABA_CLOUD_ACCESS_KEY_SECRET` is correct. Ensure there are no leading/trailing spaces or incorrect characters.","cause":"The Access Key Secret used to sign the request is incorrect.","error":"SDK.ServerError: {\"Code\":\"SignatureDoesNotMatch\",\"Message\":\"The request signature does not conform to Alibaba Cloud standards.\",...}"}]}