forked from docs/doc-exports
Reviewed-by: Jiang, Beibei <beibei.jiang@t-systems.com> Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com> Co-authored-by: Lai, Weijian <laiweijian4@huawei.com> Co-committed-by: Lai, Weijian <laiweijian4@huawei.com>
3.9 KiB
3.9 KiB
AK/SK-based Authentication
This authentication method is available for OBS Management, Training Management, Model Management, and Service Management.
Sample Code
1 2 3 4 5 6 7 | from modelarts.session import Session # Set endpoint Session.set_endpoint(iam_endpoint='***', obs_endpoint='***', modelarts_endpoint='***', region_name='***') session = Session(access_key='***',secret_key='***', project_id='***', region_name='***') |
Parameters in this command are described as follows:
- For details about how to obtain the values of access_key and secret_key, see Obtaining an Access Key.
- project_id indicates the project ID.
- region_name indicates the region ID. Obtain the region ID from the system administrator.
Parent topic: Session Authentication