百度智能云

All Product Document

          Baremetal Compute Sevice

          Initialization

          Confirm Endpoint

          If users want to customize the domain name, they can specify it by passing in the ENDPOINT parameter. For the concept of region, please refer to Region Selection Introduction.

          Before using SDK, you need to determine which region you want to operate in, so that when configuring BbcClient, fill in the Endpoint corresponding to the region as a parameter. If not specified, it will default to the Beijing region, and the Endpoint is http://bbc.bj.baidubce.com.

          The domain names currently supported by BCC include the Beijing Region: http://bbc.bj.baidubce.com, Guangzhou region: http://bbc.gz.baidubce.com, Suzhou region: http://bbc.su.baidubce.com.

          Get the Key

          To use Baidu AI Cloud BBC, you need to have a valid AK (Access Key ID) and SK (Secret Access Key) for signature authentication. AK/SK is assigned to users by the system and is a string to identify users and verify signatures for accessing BBC.

          You can obtain and understand your AK/SK information through the following steps:

          Register Baidu AI Cloud Account

          Create AK/SK

          After obtaining the key, you also need to fill it in as a parameter when configuring BbcClient. The SDK integrates the authentication mechanism. You don't need to care about the complicated calculation methods behind the authentication, but fill in the AK/SK in the corresponding position as required, and SDK will automatically complete the authentication-related work for you.

          Configuration Files

          # Import BBC configuration management module and security authentication module from Python SDK. 
          
          import baidubce 
          
          from baidubce.auth.bce_credentials import BceCredentials 
          
          from baidubce.bce_client_configuration import BceClientConfiguration 
          
          # Import BBC related modules 
          
          from baidubce.services.bbc import bbc_client 
          Previous
          SDK Installation Toolkit
          Next
          BbcClient