百度智能云

All Product Document

          Elastic IP

          EipBP Instance

          The EipBp instance is an instance of creating a bandwidth package on Baidu AI Cloud. Identity verification is required to create a bandwidth package. If you fail the identity verification, go to [Baidu Open Cloud Official Website Console](https://console.bce.baidu.com/qualify/? _=1567871861163#/qualify/result) for authentication, and currently, only the creation of prepaid EIP shared bandwidth is supported.

          Create a Bandwidth Package Instance

          Use the following codes to create a bandwidth package instance.

              def test_create_eip_bp(self): 
                  client_token = generate_client_token() 
                  return self.client.create_eip_bp(client_token=client_token, 
                                                   bandwidth_in_mbps=Create_BandwidthInMbps,
                                                   eip=EIP, eip_group_Id=None, autoReleaseTime=Auto_Release_Time, 
                                                   name=Name, config=None) 

          Bandwidth Package Bandwidth Expansion and Contraction

          Specifies the bandwidth expansion and contraction of the bandwidth package.

              def test_resize_eip_bp(self): 
                  client_token = generate_client_token() 
                  self.client.resize_eip_bp(client_token=client_token, 
                                            id=ID, new_bandwidth_in_mbps=Resize_BandwidthInMbps, config=None) 

          Query the Bandwidth Package Details

          Query the bandwidth package details.

           def test_get_eip_bp_detail(self): 
                  print(self.client.get_eip_bp_detail(id=ID, config=None)) 

          Query the Bandwidth Package List

          Query the bandwidth package list.

          • The bandwidth package list can be queried according to multiple conditions.
          • If no query conditions are provided, the default query will cover all bandwidth packages.
          • The returned result is the query result of intersection of multiple conditions, i.e. when multiple conditions are provided, bandwidth meeting all conditions simultaneously is returned.
          • The query result above supports marker paging, with paging size of 1,000 by default, which can be specified via maxKeys parameter.
           def test_list_eip_bps(self): 
                  print(self.client.list_eip_bps(config=None)) 

          Update the Bandwidth Package Name

          Update the name of the specified bandwidth package.

              def test_rename_eip_bp(self): 
                  client_token = generate_client_token() 
                  self.client.rename_eip_bp(client_token=client_token, 
                                            id=ID, name=New_Name, config=None) 

          Update the Bandwidth Package Automatic Release Time

          Update the automatic release time of the specified bandwidth package.

              def test_update_eip_bp_autoReleaseTime(self): 
                  """
                  test case for updating eip_bp's autoReleaseTime 
                  """
                  client_token = generate_client_token() 
                  self.client.update_eip_bp_autoReleaseTime(client_token=client_token, 
                                                            id=ID, auto_release_time=New_Auto_Release_Time, 
                                                            config=None) 

          Release Bandwidth Packet

          Release the specified bandwidth package.

              def test_release_eip_bp(self): 
                  client_token = generate_client_token() 
                  self.client.release_eip_bp(client_token=client_token, id=ID) 
          Previous
          EIPGroup Instance
          Next
          Exception Handling