TencentCloud / tencentcloud-sdk-python

Tencent Cloud API 3.0 SDK for Python
Apache License 2.0
613 stars 251 forks source link

ActionTimer定时销毁cvm #92

Closed zhurong4k7 closed 3 years ago

zhurong4k7 commented 3 years ago

ActionTimer只能被RunInstances调用,但是调用时报错“UnknownParameter message:The parameter ActionTimer is not recognized”,代码如下:

req = models.RunInstancesRequest()
req.Placement = "test"
req.ImageId = "img-8toqc6s3"

timer = models.ActionTimer()
timer.TimerAction = "TerminateInstances"
timer.ActionTime = "2021-3-29 16:00:00"
req.ActionTimer = timer
resp = self.client.RunInstances(req)

没有找到其他调用的方式,到底应该怎样调用呢?

zqfan commented 3 years ago

可以到控制台提工单给cvm,把报错的requestid给一下方便排查。 可以使用API Explorer,https://console.cloud.tencent.com/api/explorer ,进行调试和生成sdk验证下,看是否哪个地方写错了