百度智能云

All Product Document

          Cloud Compute Service

          Initialization

          Determine the Endpoint

          If you want to customize the domain name, you can specify it by transferring the ENDPOINT parameter. For the concept of region, see the Instruction for Region Selection.

          Before the use of SDK, you need to determine the operation region, and fill in the Endpoint corresponding to the region as a parameter duration the configuration of BccClient. If it is not specified, the region is the Beijing region by default, and the Endpoint is http://bcc.bj.baidubce.com.http://bcc.bj.baidubce.com

          For the region name supported by BCC currently, see the Service Region Name.

          Obtain a Key

          To use BCC, you need to possess a valid AK (Access Key ID) and a SK (Secret Access Key) for the signature authentication. AK/SK are assigned to users by the system, which are of string. AK/SK are used to identify users and implement the signature authentication for accessing BCC.

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

          Register a Baidu AI Cloud Account

          Create an AK/SK

          After you obtain a key, you need to fill in it as a parameter during the configuration of BccClient. For SDK integrates with the authentication mechanism, you do not need to care about the complex operation method behind the authentication, but to fill AK/SK in the corresponding location as required. SDK implements the authentication automatically.

          Configure a File

          # Import BCC 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 BCC related modules
          from baidubce.services.bcc import bcc_client
          from baidubce.services.bcc import bcc_model
          from baidubce.services.bcc import gpu_card_type
          from baidubce.services.bcc import fpga_card_type
          from baidubce.services.bcc.bcc_model import EphemeralDisk
          Previous
          Install the SDK Toolkit
          Next
          BccClient