订购后添加到子网的 "Notes" 字段?

Adding to subnet's "Notes" field after ordering?

使用 API (Ruby),是否可以在订购子网后立即将文本可靠地应用到子网的注释字段?

谢谢

由于配置时间的原因,无法在订购子网后立即放置子网备注。这通常需要 5 分钟,一旦配置了子网,便可成功应用注释。

# Edits a note for a SoftLayer_Network_Subnet
# 
# Important manual pages
# http://sldn.softlayer.com/reference/services/SoftLayer_Network_Subnet/editNote
# 
# License: http://sldn.softlayer.com/article/License
# Author: SoftLayer Technologies, Inc. <sldn@softlayer.com>

require 'rubygems'
require 'softlayer_api'

SL_API_USERNAME = 'set me'
SL_API_KEY = 'set me'

network_subnet_id = 123456
note_data = 'testing note'

softlayer_client = SoftLayer::Client.new(username: SL_API_USERNAME,
                                         api_key: SL_API_KEY)

network_subnet_service = softlayer_client.service_named('SoftLayer_Network_Subnet')

begin
  result = network_subnet_service.object_with_id(network_subnet_id)
                                 .editNote(note_data)
  p result
rescue StandardError => e
  raise e
end

您可以使用以下请求通过 orderId 检索子网:

https://$username:$apiKey@api.softlayer.com/rest/v3/SoftLayer_Account/getSubnets?objectFilter={"subnets":{"billingItem":{"orderItem":{"order":{"id":{"operation":9041210}}}}}}

替换: $username, $apiKey and 9041210 (orderId)