File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed
Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -161,6 +161,10 @@ type SManagedVMCreateConfig struct {
161161 ProjectId string
162162 EnableMonitorAgent bool
163163
164+ // 金山云按量付费类型
165+ // Daily(按量付费(按日月结))、 HourlyInstantSettlement(按量付费(按小时月结))
166+ KsyunPostpaidChargeType string
167+
164168 SPublicIpInfo
165169
166170 Tags map [string ]string
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ import (
2222 "yunion.io/x/cloudmux/pkg/cloudprovider"
2323 "yunion.io/x/cloudmux/pkg/multicloud"
2424 "yunion.io/x/pkg/errors"
25+ "yunion.io/x/pkg/utils"
2526
2627 "yunion.io/x/jsonutils"
2728)
@@ -92,6 +93,9 @@ func (region *SRegion) CreateVM(opts *cloudprovider.SManagedVMCreateConfig) (*SI
9293 "SystemDisk.DiskSize" : fmt .Sprintf ("%d" , opts .SysDisk .SizeGB ),
9394 "SyncTag" : "true" ,
9495 }
96+ if utils .IsInStringArray (opts .KsyunPostpaidChargeType , []string {"HourlyInstantSettlement" , "Daily" }) {
97+ params ["ChargeType" ] = opts .KsyunPostpaidChargeType
98+ }
9599 if len (opts .Hostname ) > 0 {
96100 params ["HostName" ] = opts .Hostname
97101 }
You can’t perform that action at this time.
0 commit comments