百度智能云

All Product Document

          Baremetal Compute Sevice

          Package

          Query Package List

          Use the following codes to query the list and details of all BBC packages.

          if res, err := bbcClient.ListFlavors(); err != nil { 
              fmt.Println("List flavors failed: ", err) 
          } else { 
              fmt.Println("List flavors success, result: ", res) 
          } 

          Query Package Details

          Use the following codes to query the details of the specified package.

          // Set the flavorId you want to operate 
          flavorId := "your-choose-flavor-id" 
          if res, err := bbcClient.GetFlavorDetail(testFlavorId); err != nil { 
              fmt.Println("Get flavor failed: ", err) 
          } else { 
              fmt.Println("Get flavor success, result: ", res) 
          } 

          Query RAID Details

          Use the following codes to query the RAID mode and disk size of the specified package.

          // Set the flavorId you want to operate 
          flavorId := "your-choose-flavor-id" 
          if res, err := bbcClient.GetFlavorRaid(testFlavorId); err != nil { 
              fmt.Println("Get raid failed: ", err) 
          } else { 
              fmt.Println("Get raid success, result: ", res) 
          } 
          Previous
          Deployment Set
          Next
          Tag