百度智能云

All Product Document

          Baremetal Compute Sevice

          Tag

          Unbind Instance Tag

          Unbind the existing tags of the instance with the following codes.

          unbindTagsArgs := &UnbindTagsArgs{ 
              // Set the tag you want to unbind 
              ChangeTags: []model.TagModel{ 
                  { 
                      TagKey:   "tag1", 
                      TagValue: "var1", 
                  }, 
              }, 
          } 
          // Set the instanceId you want to operate 
          instanceId := "your-choose-instance-id" 
          if err := BBC_CLIENT.UnbindTags(instanceId, unbindTagsArgs); err != nil { 
              fmt.Println("unbind instance tags failed: ", err) 
          } else { 
              fmt.Println("unbind instance tags success.") 
          } 
          Previous
          Package
          Next
          Operation Log