diff --git a/go.mod b/go.mod
index 427b134f40..da7b6bdf45 100644
--- a/go.mod
+++ b/go.mod
@@ -25,7 +25,7 @@ require (
github.com/mozillazg/go-httpheader v0.4.0 // indirect
github.com/pkg/errors v0.9.1
github.com/stretchr/testify v1.8.2
- github.com/tencentcloud/tencentcloud-sdk-go-intl-en v3.0.1114+incompatible
+ github.com/tencentcloud/tencentcloud-sdk-go-intl-en v3.0.1161+incompatible
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/antiddos v1.0.799
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/api v1.0.285
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/apigateway v1.0.763
@@ -46,8 +46,8 @@ require (
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/clb v1.0.1107
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cloudaudit v1.0.1033
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cls v1.0.1078
- github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1122
- github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm v1.0.1053
+ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1126
+ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm v1.0.1126
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cwp v1.0.762
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cynosdb v1.0.1111
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dayu v1.0.335
diff --git a/go.sum b/go.sum
index f1262e35c9..d7c7e2d1b2 100644
--- a/go.sum
+++ b/go.sum
@@ -818,6 +818,8 @@ github.com/tdakkota/asciicheck v0.2.0 h1:o8jvnUANo0qXtnslk2d3nMKTFNlOnJjRrNcj0j9
github.com/tdakkota/asciicheck v0.2.0/go.mod h1:Qb7Y9EgjCLJGup51gDHFzbI08/gbGhL/UVhYIPWG2rg=
github.com/tencentcloud/tencentcloud-sdk-go-intl-en v3.0.1114+incompatible h1:Qo2u4QpYzsrrTedOFmNyDIghJMsFSa/Dn3HfnTWtTfs=
github.com/tencentcloud/tencentcloud-sdk-go-intl-en v3.0.1114+incompatible/go.mod h1:72Wo6Gt6F8d8V+njrAmduVoT9QjPwCyXktpqCWr7PUc=
+github.com/tencentcloud/tencentcloud-sdk-go-intl-en v3.0.1161+incompatible h1:gGfe9oRCYZAWxd/xm0k8NaLmEssVPPl7pEwO022Arb4=
+github.com/tencentcloud/tencentcloud-sdk-go-intl-en v3.0.1161+incompatible/go.mod h1:72Wo6Gt6F8d8V+njrAmduVoT9QjPwCyXktpqCWr7PUc=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/antiddos v1.0.799 h1:u49r1bGFDY0CeAF46iotNnLtc5yplPf9XXa7W7zJ4fE=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/antiddos v1.0.799/go.mod h1:JQa/Ess7Kkn/BuAugq0Tt5GJR7ZQAY47ypP9LjEn/DE=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/api v1.0.285 h1:gFmukRGLtYiXVBVvg/5DP/0fM1+dKpwDjT+khtDVLmc=
@@ -933,12 +935,16 @@ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1111/go.mod
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1115/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1122 h1:jffjOBJ1ejT4ldClIIEI+QnfV5K2RubA+xNiz6uuFOU=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1122/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0=
+github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1126 h1:HHWE825wxwoEEZVB9CLgPpXOiFy6hZXJMcCjCAOckAU=
+github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1126/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/controlcenter v1.0.993 h1:WlPgXldQCxt7qi5Xrc6j6zTrsXWzN5BcOGs7Irq7fwQ=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/controlcenter v1.0.993/go.mod h1:Z9U8zNtyuyKhjS0698wqsrG/kLx1TQ5CEixXBwVe7xY=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/csip v1.0.860 h1:F3esKBIT3HW9+7Gt8cVgf8X06VdGIczpgLBUECzSEzU=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/csip v1.0.860/go.mod h1:NZo1WplQcC314kMlCRUoy8NQju2BnolIJj7NAWgsuhY=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm v1.0.1053 h1:x193cxbzh+bXxxcq9NGzriW0jCxQHJd6mT79kcfUqSs=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm v1.0.1053/go.mod h1:yM5i22uG9HKuUwwz+XvrDW9oBtZdb7avyDrMrS/FBIs=
+github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm v1.0.1126 h1:JdhKLXoTETh13Oe9d4yBXljwfubfCEa6HjX60PtpbRY=
+github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm v1.0.1126/go.mod h1:DTeq5O98dERO/YvCPVrmr533PZd8OQhHmaucRe2pjnY=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cwp v1.0.762 h1:2egy69SP/wPsmnfozcQVZ6tUY6F6N/TpEe/7xtXrc/8=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cwp v1.0.762/go.mod h1:1XylIfNUbAzmNqi4XMhwcM3VhmUHdu1OYybOeaJ4sOw=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cynosdb v1.0.1111 h1:Y7LLIZEQh8OAbnBWppUopu2PjPaQOO9Jzhp8LZO7adI=
diff --git a/tencentcloud/connectivity/client.go b/tencentcloud/connectivity/client.go
index 125de0ebef..a685ecf857 100644
--- a/tencentcloud/connectivity/client.go
+++ b/tencentcloud/connectivity/client.go
@@ -15,6 +15,7 @@ import (
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/s3"
intlProfile "github.com/tencentcloud/tencentcloud-sdk-go-intl-en/tencentcloud/common/profile"
+ cvmintl "github.com/tencentcloud/tencentcloud-sdk-go-intl-en/tencentcloud/cvm/v20170312"
mdl "github.com/tencentcloud/tencentcloud-sdk-go-intl-en/tencentcloud/mdl/v20200326"
privatednsIntl "github.com/tencentcloud/tencentcloud-sdk-go-intl-en/tencentcloud/privatedns/v20201028"
antiddos "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/antiddos/v20200309"
@@ -131,6 +132,7 @@ type TencentCloudClient struct {
vpcConn *vpc.Client
cbsConn *cbs.Client
cvmv20170312Conn *cvmv20170312.Client
+ cvmIntlConn *cvmintl.Client
clbConn *clb.Client
dayuConn *dayu.Client
dcConn *dc.Client
@@ -587,6 +589,19 @@ func (me *TencentCloudClient) UseCvmClient(iacExtInfo ...IacExtInfo) *cvmv201703
return me.cvmv20170312Conn
}
+// UseCvmIntlClient returns cvm intl client for service
+func (me *TencentCloudClient) UseCvmIntlClient(iacExtInfo ...IacExtInfo) *cvmintl.Client {
+ if me.cvmIntlConn != nil {
+ return me.cvmIntlConn
+ }
+
+ cpf := me.NewClientIntlProfile(300)
+ me.cvmIntlConn, _ = cvmintl.NewClient(me.Credential, me.Region, cpf)
+ me.cvmIntlConn.WithHttpTransport(&LogRoundTripper{})
+
+ return me.cvmIntlConn
+}
+
// UseCvmV20170312Client returns cvm client for service
func (me *TencentCloudClient) UseCvmV20170312Client(iacExtInfo ...IacExtInfo) *cvmv20170312.Client {
var logRoundTripper LogRoundTripper
diff --git a/tencentcloud/services/cvm/data_source_tc_reserved_instances.go b/tencentcloud/services/cvm/data_source_tc_reserved_instances.go
index 2bdbc5394c..d00646ae52 100644
--- a/tencentcloud/services/cvm/data_source_tc_reserved_instances.go
+++ b/tencentcloud/services/cvm/data_source_tc_reserved_instances.go
@@ -8,7 +8,7 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
- cvm "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm/v20170312"
+ cvm "github.com/tencentcloud/tencentcloud-sdk-go-intl-en/tencentcloud/cvm/v20170312"
"github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/internal/helper"
)
diff --git a/tencentcloud/services/cvm/resource_tc_instance.go b/tencentcloud/services/cvm/resource_tc_instance.go
index 333179d9fd..7a876c4b7b 100644
--- a/tencentcloud/services/cvm/resource_tc_instance.go
+++ b/tencentcloud/services/cvm/resource_tc_instance.go
@@ -386,14 +386,14 @@ func ResourceTencentCloudInstance() *schema.Resource {
"user_data": {
Type: schema.TypeString,
Optional: true,
- ForceNew: true,
+ Computed: true,
ConflictsWith: []string{"user_data_raw"},
Description: "The user data to be injected into this instance. Must be base64 encoded and up to 16 KB.",
},
"user_data_raw": {
Type: schema.TypeString,
Optional: true,
- ForceNew: true,
+ Computed: true,
ConflictsWith: []string{"user_data"},
Description: "The user data to be injected into this instance, in plain text. Conflicts with `user_data`. Up to 16 KB after base64 encoded.",
},
@@ -1431,6 +1431,34 @@ func resourceTencentCloudInstanceRead(d *schema.ResourceData, meta interface{})
_ = d.Set("running_flag", true)
}
+ var instanceAttribute *cvm.InstanceAttribute
+ err = resource.Retry(tccommon.ReadRetryTimeout, func() *resource.RetryError {
+ request := cvm.NewDescribeInstancesAttributesRequest()
+ request.InstanceIds = helper.Strings([]string{instanceId})
+ request.Attributes = helper.Strings([]string{"UserData"})
+ response, errRet := client.UseCvmClient().DescribeInstancesAttributes(request)
+ if errRet != nil {
+ return tccommon.RetryError(errRet, tccommon.InternalError)
+ }
+
+ if len(response.Response.InstanceSet) > 0 {
+ instanceAttribute = response.Response.InstanceSet[0]
+ }
+ return nil
+ })
+
+ if err != nil {
+ return err
+ }
+ if instanceAttribute != nil && instanceAttribute.Attributes != nil && instanceAttribute.Attributes.UserData != nil {
+ _ = d.Set("user_data", instanceAttribute.Attributes.UserData)
+ userDataRaw, e := base64.StdEncoding.DecodeString(*(instanceAttribute.Attributes.UserData))
+ if e != nil {
+ return e
+ }
+ _ = d.Set("user_data_raw", string(userDataRaw))
+ }
+
return nil
}
@@ -1938,6 +1966,30 @@ func resourceTencentCloudInstanceUpdate(d *schema.ResourceData, meta interface{}
}
}
+ if d.HasChange("user_data") {
+ err := cvmService.ModifyUserData(ctx, instanceId, d.Get("user_data").(string))
+ if err != nil {
+ return err
+ }
+
+ err = waitForOperationFinished(d, meta, 2*tccommon.ReadRetryTimeout, CVM_LATEST_OPERATION_STATE_OPERATING, false)
+ if err != nil {
+ return err
+ }
+ }
+ if d.HasChange("user_data_raw") {
+ userDataRaw := d.Get("user_data_raw").(string)
+ userData := base64.StdEncoding.EncodeToString([]byte(userDataRaw))
+ err := cvmService.ModifyUserData(ctx, instanceId, userData)
+ if err != nil {
+ return err
+ }
+
+ err = waitForOperationFinished(d, meta, 2*tccommon.ReadRetryTimeout, CVM_LATEST_OPERATION_STATE_OPERATING, false)
+ if err != nil {
+ return err
+ }
+ }
d.Partial(false)
return resourceTencentCloudInstanceRead(d, meta)
diff --git a/tencentcloud/services/cvm/resource_tc_reserved_instance.go b/tencentcloud/services/cvm/resource_tc_reserved_instance.go
index 9b18443082..accf891c18 100644
--- a/tencentcloud/services/cvm/resource_tc_reserved_instance.go
+++ b/tencentcloud/services/cvm/resource_tc_reserved_instance.go
@@ -8,7 +8,7 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
- cvm "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm/v20170312"
+ cvm "github.com/tencentcloud/tencentcloud-sdk-go-intl-en/tencentcloud/cvm/v20170312"
)
func ResourceTencentCloudReservedInstance() *schema.Resource {
diff --git a/tencentcloud/services/cvm/service_tencentcloud_cvm.go b/tencentcloud/services/cvm/service_tencentcloud_cvm.go
index dbcf76e508..6f1778c329 100644
--- a/tencentcloud/services/cvm/service_tencentcloud_cvm.go
+++ b/tencentcloud/services/cvm/service_tencentcloud_cvm.go
@@ -12,6 +12,7 @@ import (
tccommon "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/common"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
+ cvmintl "github.com/tencentcloud/tencentcloud-sdk-go-intl-en/tencentcloud/cvm/v20170312"
sdkError "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/errors"
sdkErrors "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/errors"
cvm "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm/v20170312"
@@ -236,6 +237,25 @@ func (me *CvmService) ModifyInstanceName(ctx context.Context, instanceId, instan
return nil
}
+func (me *CvmService) ModifyUserData(ctx context.Context, instanceId, userData string) error {
+ logId := tccommon.GetLogId(ctx)
+ request := cvm.NewModifyInstancesAttributeRequest()
+ request.InstanceIds = []*string{&instanceId}
+ request.UserData = &userData
+
+ ratelimit.Check(request.GetAction())
+ response, err := me.client.UseCvmClient().ModifyInstancesAttribute(request)
+ if err != nil {
+ log.Printf("[CRITAL]%s api[%s] fail, request body [%s], reason[%s]\n",
+ logId, request.GetAction(), request.ToJsonString(), err.Error())
+ return err
+ }
+ log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n",
+ logId, request.GetAction(), request.ToJsonString(), response.ToJsonString())
+
+ return nil
+}
+
func (me *CvmService) ModifySecurityGroups(ctx context.Context, instanceId string, securityGroups []*string) error {
logId := tccommon.GetLogId(ctx)
request := cvm.NewModifyInstancesAttributeRequest()
@@ -930,12 +950,12 @@ func (me *CvmService) CreateReservedInstance(ctx context.Context, configId strin
return
}
-func (me *CvmService) DescribeReservedInstanceByFilter(ctx context.Context, filters map[string]string) (instances []*cvm.ReservedInstances, errRet error) {
+func (me *CvmService) DescribeReservedInstanceByFilter(ctx context.Context, filters map[string]string) (instances []*cvmintl.ReservedInstances, errRet error) {
logId := tccommon.GetLogId(ctx)
- request := cvm.NewDescribeReservedInstancesRequest()
- request.Filters = make([]*cvm.Filter, 0, len(filters))
+ request := cvmintl.NewDescribeReservedInstancesRequest()
+ request.Filters = make([]*cvmintl.Filter, 0, len(filters))
for k, v := range filters {
- filter := cvm.Filter{
+ filter := cvmintl.Filter{
Name: helper.String(k),
Values: []*string{helper.String(v)},
}
@@ -944,12 +964,12 @@ func (me *CvmService) DescribeReservedInstanceByFilter(ctx context.Context, filt
var offset int64 = 0
var pageSize int64 = 100
- instances = make([]*cvm.ReservedInstances, 0)
+ instances = make([]*cvmintl.ReservedInstances, 0)
for {
request.Offset = &offset
request.Limit = &pageSize
ratelimit.Check(request.GetAction())
- response, err := me.client.UseCvmClient().DescribeReservedInstances(request)
+ response, err := me.client.UseCvmIntlClient().DescribeReservedInstances(request)
if err != nil {
log.Printf("[CRITAL]%s api[%s] fail, request body [%s], reason[%s]\n",
logId, request.GetAction(), request.ToJsonString(), err.Error())
diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go-intl-en/tencentcloud/common/http/request.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go-intl-en/tencentcloud/common/http/request.go
index 91607cfa98..8de07375de 100644
--- a/vendor/github.com/tencentcloud/tencentcloud-sdk-go-intl-en/tencentcloud/common/http/request.go
+++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go-intl-en/tencentcloud/common/http/request.go
@@ -265,7 +265,7 @@ func CompleteCommonParams(request Request, region string, requestClient string)
params["Action"] = request.GetAction()
params["Timestamp"] = strconv.FormatInt(time.Now().Unix(), 10)
params["Nonce"] = strconv.Itoa(rand.Int())
- params["RequestClient"] = "SDK_GO_3.0.1114"
+ params["RequestClient"] = "SDK_GO_3.0.1161"
if requestClient != "" {
params["RequestClient"] += ": " + requestClient
}
diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go-intl-en/tencentcloud/common/http/response.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go-intl-en/tencentcloud/common/http/response.go
index 0fd5b0c469..4dae13ef28 100644
--- a/vendor/github.com/tencentcloud/tencentcloud-sdk-go-intl-en/tencentcloud/common/http/response.go
+++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go-intl-en/tencentcloud/common/http/response.go
@@ -229,6 +229,10 @@ func parseFromSSE(hr *http.Response, resp Response) error {
key := string(line[:idx])
val := line[idx+1:]
+ // If value starts with a U+0020 SPACE character, remove it from value
+ if len(val) > 0 && val[0] == ' ' {
+ val = val[1:]
+ }
switch key {
case "event":
event.Event = string(val)
diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go-intl-en/tencentcloud/common/json/encode.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go-intl-en/tencentcloud/common/json/encode.go
index eecf128774..30430416b4 100644
--- a/vendor/github.com/tencentcloud/tencentcloud-sdk-go-intl-en/tencentcloud/common/json/encode.go
+++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go-intl-en/tencentcloud/common/json/encode.go
@@ -329,8 +329,10 @@ func isEmptyValue(v reflect.Value) bool {
}
func isNilValue(v reflect.Value) bool {
+ // unsafe.UnsafePointer doesn't exist in go1.9
+ const UnsafePointer = 26
switch v.Kind() {
- case reflect.Array, reflect.Map, reflect.Slice, reflect.String, reflect.Interface, reflect.Ptr:
+ case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, UnsafePointer, reflect.Interface, reflect.Slice:
return v.IsNil()
}
return false
diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go-intl-en/tencentcloud/common/netretry.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go-intl-en/tencentcloud/common/netretry.go
index ed170b41e7..8f413059b7 100644
--- a/vendor/github.com/tencentcloud/tencentcloud-sdk-go-intl-en/tencentcloud/common/netretry.go
+++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go-intl-en/tencentcloud/common/netretry.go
@@ -22,8 +22,17 @@ func (c *Client) sendWithNetworkFailureRetry(req *http.Request, retryable bool)
maxRetries = maxInt(c.profile.NetworkFailureMaxRetries, 0)
}
durationFunc := safeDurationFunc(c.profile.NetworkFailureRetryDuration)
+ retryer := newRequestRetryer(req)
for idx := 0; idx <= maxRetries; idx++ {
+
+ if idx > 0 {
+ err = retryer()
+ if err != nil {
+ return nil, err
+ }
+ }
+
resp, err = c.sendHttp(req)
// retry when error occurred and retryable and not the last retry
diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go-intl-en/tencentcloud/common/ratelimitretry.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go-intl-en/tencentcloud/common/ratelimitretry.go
index f6a47049f8..43b93aad7a 100644
--- a/vendor/github.com/tencentcloud/tencentcloud-sdk-go-intl-en/tencentcloud/common/ratelimitretry.go
+++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go-intl-en/tencentcloud/common/ratelimitretry.go
@@ -21,8 +21,17 @@ func (c *Client) sendWithRateLimitRetry(req *http.Request, retryable bool) (resp
// make sure maxRetries is more than 0
maxRetries := maxInt(c.profile.RateLimitExceededMaxRetries, 0)
durationFunc := safeDurationFunc(c.profile.RateLimitExceededRetryDuration)
+ retryer := newRequestRetryer(req)
for idx := 0; idx <= maxRetries; idx++ {
+
+ if idx > 0 {
+ err = retryer()
+ if err != nil {
+ return nil, err
+ }
+ }
+
resp, err = c.sendWithNetworkFailureRetry(req, retryable)
if err != nil {
return
diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go-intl-en/tencentcloud/common/rewindable_body.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go-intl-en/tencentcloud/common/rewindable_body.go
new file mode 100644
index 0000000000..be1c88be62
--- /dev/null
+++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go-intl-en/tencentcloud/common/rewindable_body.go
@@ -0,0 +1,67 @@
+package common
+
+import (
+ "bytes"
+ "io"
+ "net/http"
+)
+
+func newRequestRetryer(r *http.Request) func() error {
+ if r.GetBody == nil {
+ rb := &rewindableBody{body: r.Body}
+ r.Body = rb
+ r.GetBody = func() (io.ReadCloser, error) {
+ err := rb.Rewind()
+ return rb, err
+ }
+ }
+
+ return func() error {
+ bodyCopy, err := r.GetBody()
+ if err != nil {
+ return err
+ }
+
+ r.Body = bodyCopy
+ return nil
+ }
+}
+
+type rewindableBody struct {
+ body io.ReadCloser
+ buf []byte
+ r bytes.Reader
+ rewind bool
+}
+
+func (r *rewindableBody) Read(p []byte) (int, error) {
+ if r.rewind {
+ return r.r.Read(p)
+ }
+
+ nr, err := r.body.Read(p)
+ if nr > 0 {
+ r.buf = append(r.buf, p[:nr]...)
+ }
+ return nr, err
+}
+
+func (r *rewindableBody) Close() error {
+ return r.body.Close()
+}
+
+func (r *rewindableBody) Rewind() error {
+ if !r.rewind {
+ // drain body
+ buf := bytes.NewBuffer(r.buf)
+ _, err := io.Copy(buf, r.body)
+ if err != nil {
+ return err
+ }
+ r.buf = buf.Bytes()
+ }
+
+ r.r.Reset(r.buf)
+ r.rewind = true
+ return nil
+}
diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go-intl-en/tencentcloud/cvm/v20170312/client.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go-intl-en/tencentcloud/cvm/v20170312/client.go
new file mode 100644
index 0000000000..20b7f3e0c3
--- /dev/null
+++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go-intl-en/tencentcloud/cvm/v20170312/client.go
@@ -0,0 +1,7590 @@
+// Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package v20170312
+
+import (
+ "context"
+ "errors"
+ "github.com/tencentcloud/tencentcloud-sdk-go-intl-en/tencentcloud/common"
+ tchttp "github.com/tencentcloud/tencentcloud-sdk-go-intl-en/tencentcloud/common/http"
+ "github.com/tencentcloud/tencentcloud-sdk-go-intl-en/tencentcloud/common/profile"
+)
+
+const APIVersion = "2017-03-12"
+
+type Client struct {
+ common.Client
+}
+
+// Deprecated
+func NewClientWithSecretId(secretId, secretKey, region string) (client *Client, err error) {
+ cpf := profile.NewClientProfile()
+ client = &Client{}
+ client.Init(region).WithSecretId(secretId, secretKey).WithProfile(cpf)
+ return
+}
+
+func NewClient(credential common.CredentialIface, region string, clientProfile *profile.ClientProfile) (client *Client, err error) {
+ client = &Client{}
+ client.Init(region).
+ WithCredential(credential).
+ WithProfile(clientProfile)
+ return
+}
+
+
+func NewAllocateHostsRequest() (request *AllocateHostsRequest) {
+ request = &AllocateHostsRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("cvm", APIVersion, "AllocateHosts")
+
+
+ return
+}
+
+func NewAllocateHostsResponse() (response *AllocateHostsResponse) {
+ response = &AllocateHostsResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// AllocateHosts
+// This API is used to create CDH instances with specified configuration.
+//
+// * When HostChargeType is PREPAID, the HostChargePrepaid parameter must be specified.
+//
+// error code that may be returned:
+// INVALIDACCOUNT_INSUFFICIENTBALANCE = "InvalidAccount.InsufficientBalance"
+// INVALIDHOSTID_MALFORMED = "InvalidHostId.Malformed"
+// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range"
+// INVALIDPARAMETERVALUE_ZONENOTSUPPORTED = "InvalidParameterValue.ZoneNotSupported"
+// INVALIDPERIOD = "InvalidPeriod"
+// INVALIDPROJECTID_NOTFOUND = "InvalidProjectId.NotFound"
+// INVALIDREGION_NOTFOUND = "InvalidRegion.NotFound"
+// INVALIDZONE_MISMATCHREGION = "InvalidZone.MismatchRegion"
+// RESOURCEINSUFFICIENT_ZONESOLDOUTFORSPECIFIEDINSTANCE = "ResourceInsufficient.ZoneSoldOutForSpecifiedInstance"
+func (c *Client) AllocateHosts(request *AllocateHostsRequest) (response *AllocateHostsResponse, err error) {
+ return c.AllocateHostsWithContext(context.Background(), request)
+}
+
+// AllocateHosts
+// This API is used to create CDH instances with specified configuration.
+//
+// * When HostChargeType is PREPAID, the HostChargePrepaid parameter must be specified.
+//
+// error code that may be returned:
+// INVALIDACCOUNT_INSUFFICIENTBALANCE = "InvalidAccount.InsufficientBalance"
+// INVALIDHOSTID_MALFORMED = "InvalidHostId.Malformed"
+// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range"
+// INVALIDPARAMETERVALUE_ZONENOTSUPPORTED = "InvalidParameterValue.ZoneNotSupported"
+// INVALIDPERIOD = "InvalidPeriod"
+// INVALIDPROJECTID_NOTFOUND = "InvalidProjectId.NotFound"
+// INVALIDREGION_NOTFOUND = "InvalidRegion.NotFound"
+// INVALIDZONE_MISMATCHREGION = "InvalidZone.MismatchRegion"
+// RESOURCEINSUFFICIENT_ZONESOLDOUTFORSPECIFIEDINSTANCE = "ResourceInsufficient.ZoneSoldOutForSpecifiedInstance"
+func (c *Client) AllocateHostsWithContext(ctx context.Context, request *AllocateHostsRequest) (response *AllocateHostsResponse, err error) {
+ if request == nil {
+ request = NewAllocateHostsRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("AllocateHosts require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewAllocateHostsResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewAssociateInstancesKeyPairsRequest() (request *AssociateInstancesKeyPairsRequest) {
+ request = &AssociateInstancesKeyPairsRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("cvm", APIVersion, "AssociateInstancesKeyPairs")
+
+
+ return
+}
+
+func NewAssociateInstancesKeyPairsResponse() (response *AssociateInstancesKeyPairsResponse) {
+ response = &AssociateInstancesKeyPairsResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// AssociateInstancesKeyPairs
+// This API is used to associate key pairs with instances.
+//
+//
+//
+// * If the public key of a key pair is written to the `SSH` configuration of the instance, users will be able to log in to the instance with the private key of the key pair.
+//
+// * If the instance is already associated with a key, the old key will become invalid.
+//
+// If you currently use a password to log in, you will no longer be able to do so after you associate the instance with a key.
+//
+// * Batch operations are supported. The maximum number of instances in each request is 100. If any instance in the request cannot be associated with a key, you will get an error code.
+//
+// error code that may be returned:
+// INTERNALSERVERERROR = "InternalServerError"
+// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported"
+// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed"
+// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound"
+// INVALIDKEYPAIRID_MALFORMED = "InvalidKeyPairId.Malformed"
+// INVALIDKEYPAIRID_NOTFOUND = "InvalidKeyPairId.NotFound"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed"
+// INVALIDPARAMETERVALUE_KEYPAIRNOTSUPPORTED = "InvalidParameterValue.KeyPairNotSupported"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// MISSINGPARAMETER = "MissingParameter"
+// MUTEXOPERATION_TASKRUNNING = "MutexOperation.TaskRunning"
+// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress"
+// UNAUTHORIZEDOPERATION_MFAEXPIRED = "UnauthorizedOperation.MFAExpired"
+// UNAUTHORIZEDOPERATION_MFANOTFOUND = "UnauthorizedOperation.MFANotFound"
+// UNSUPPORTEDOPERATION_INSTANCEOSWINDOWS = "UnsupportedOperation.InstanceOsWindows"
+// UNSUPPORTEDOPERATION_INSTANCESTATEENTERSERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateEnterServiceLiveMigrate"
+// UNSUPPORTEDOPERATION_INSTANCESTATEEXITRESCUEMODE = "UnsupportedOperation.InstanceStateExitRescueMode"
+// UNSUPPORTEDOPERATION_INSTANCESTATEFREEZING = "UnsupportedOperation.InstanceStateFreezing"
+// UNSUPPORTEDOPERATION_INSTANCESTATEISOLATING = "UnsupportedOperation.InstanceStateIsolating"
+// UNSUPPORTEDOPERATION_INSTANCESTATEPENDING = "UnsupportedOperation.InstanceStatePending"
+// UNSUPPORTEDOPERATION_INSTANCESTATEREBOOTING = "UnsupportedOperation.InstanceStateRebooting"
+// UNSUPPORTEDOPERATION_INSTANCESTATERESCUEMODE = "UnsupportedOperation.InstanceStateRescueMode"
+// UNSUPPORTEDOPERATION_INSTANCESTATERUNNING = "UnsupportedOperation.InstanceStateRunning"
+// UNSUPPORTEDOPERATION_INSTANCESTATESHUTDOWN = "UnsupportedOperation.InstanceStateShutdown"
+// UNSUPPORTEDOPERATION_INSTANCESTATESTARTING = "UnsupportedOperation.InstanceStateStarting"
+// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPING = "UnsupportedOperation.InstanceStateStopping"
+// UNSUPPORTEDOPERATION_INSTANCESTATETERMINATING = "UnsupportedOperation.InstanceStateTerminating"
+// UNSUPPORTEDOPERATION_STOPPEDMODESTOPCHARGING = "UnsupportedOperation.StoppedModeStopCharging"
+func (c *Client) AssociateInstancesKeyPairs(request *AssociateInstancesKeyPairsRequest) (response *AssociateInstancesKeyPairsResponse, err error) {
+ return c.AssociateInstancesKeyPairsWithContext(context.Background(), request)
+}
+
+// AssociateInstancesKeyPairs
+// This API is used to associate key pairs with instances.
+//
+//
+//
+// * If the public key of a key pair is written to the `SSH` configuration of the instance, users will be able to log in to the instance with the private key of the key pair.
+//
+// * If the instance is already associated with a key, the old key will become invalid.
+//
+// If you currently use a password to log in, you will no longer be able to do so after you associate the instance with a key.
+//
+// * Batch operations are supported. The maximum number of instances in each request is 100. If any instance in the request cannot be associated with a key, you will get an error code.
+//
+// error code that may be returned:
+// INTERNALSERVERERROR = "InternalServerError"
+// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported"
+// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed"
+// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound"
+// INVALIDKEYPAIRID_MALFORMED = "InvalidKeyPairId.Malformed"
+// INVALIDKEYPAIRID_NOTFOUND = "InvalidKeyPairId.NotFound"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed"
+// INVALIDPARAMETERVALUE_KEYPAIRNOTSUPPORTED = "InvalidParameterValue.KeyPairNotSupported"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// MISSINGPARAMETER = "MissingParameter"
+// MUTEXOPERATION_TASKRUNNING = "MutexOperation.TaskRunning"
+// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress"
+// UNAUTHORIZEDOPERATION_MFAEXPIRED = "UnauthorizedOperation.MFAExpired"
+// UNAUTHORIZEDOPERATION_MFANOTFOUND = "UnauthorizedOperation.MFANotFound"
+// UNSUPPORTEDOPERATION_INSTANCEOSWINDOWS = "UnsupportedOperation.InstanceOsWindows"
+// UNSUPPORTEDOPERATION_INSTANCESTATEENTERSERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateEnterServiceLiveMigrate"
+// UNSUPPORTEDOPERATION_INSTANCESTATEEXITRESCUEMODE = "UnsupportedOperation.InstanceStateExitRescueMode"
+// UNSUPPORTEDOPERATION_INSTANCESTATEFREEZING = "UnsupportedOperation.InstanceStateFreezing"
+// UNSUPPORTEDOPERATION_INSTANCESTATEISOLATING = "UnsupportedOperation.InstanceStateIsolating"
+// UNSUPPORTEDOPERATION_INSTANCESTATEPENDING = "UnsupportedOperation.InstanceStatePending"
+// UNSUPPORTEDOPERATION_INSTANCESTATEREBOOTING = "UnsupportedOperation.InstanceStateRebooting"
+// UNSUPPORTEDOPERATION_INSTANCESTATERESCUEMODE = "UnsupportedOperation.InstanceStateRescueMode"
+// UNSUPPORTEDOPERATION_INSTANCESTATERUNNING = "UnsupportedOperation.InstanceStateRunning"
+// UNSUPPORTEDOPERATION_INSTANCESTATESHUTDOWN = "UnsupportedOperation.InstanceStateShutdown"
+// UNSUPPORTEDOPERATION_INSTANCESTATESTARTING = "UnsupportedOperation.InstanceStateStarting"
+// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPING = "UnsupportedOperation.InstanceStateStopping"
+// UNSUPPORTEDOPERATION_INSTANCESTATETERMINATING = "UnsupportedOperation.InstanceStateTerminating"
+// UNSUPPORTEDOPERATION_STOPPEDMODESTOPCHARGING = "UnsupportedOperation.StoppedModeStopCharging"
+func (c *Client) AssociateInstancesKeyPairsWithContext(ctx context.Context, request *AssociateInstancesKeyPairsRequest) (response *AssociateInstancesKeyPairsResponse, err error) {
+ if request == nil {
+ request = NewAssociateInstancesKeyPairsRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("AssociateInstancesKeyPairs require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewAssociateInstancesKeyPairsResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewAssociateSecurityGroupsRequest() (request *AssociateSecurityGroupsRequest) {
+ request = &AssociateSecurityGroupsRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("cvm", APIVersion, "AssociateSecurityGroups")
+
+
+ return
+}
+
+func NewAssociateSecurityGroupsResponse() (response *AssociateSecurityGroupsResponse) {
+ response = &AssociateSecurityGroupsResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// AssociateSecurityGroups
+// This API is used to associate security groups with specified instances.
+//
+// error code that may be returned:
+// FAILEDOPERATION_SECURITYGROUPACTIONFAILED = "FailedOperation.SecurityGroupActionFailed"
+// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed"
+// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound"
+// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// INVALIDSECURITYGROUPID_NOTFOUND = "InvalidSecurityGroupId.NotFound"
+// INVALIDSGID_MALFORMED = "InvalidSgId.Malformed"
+// LIMITEXCEEDED_ASSOCIATEUSGLIMITEXCEEDED = "LimitExceeded.AssociateUSGLimitExceeded"
+// LIMITEXCEEDED_CVMSVIFSPERSECGROUPLIMITEXCEEDED = "LimitExceeded.CvmsVifsPerSecGroupLimitExceeded"
+// LIMITEXCEEDED_SINGLEUSGQUOTA = "LimitExceeded.SingleUSGQuota"
+// MUTEXOPERATION_TASKRUNNING = "MutexOperation.TaskRunning"
+// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress"
+// SECGROUPACTIONFAILURE = "SecGroupActionFailure"
+// UNSUPPORTEDOPERATION_INSTANCESTATEISOLATING = "UnsupportedOperation.InstanceStateIsolating"
+// UNSUPPORTEDOPERATION_INSTANCESTATEPENDING = "UnsupportedOperation.InstanceStatePending"
+func (c *Client) AssociateSecurityGroups(request *AssociateSecurityGroupsRequest) (response *AssociateSecurityGroupsResponse, err error) {
+ return c.AssociateSecurityGroupsWithContext(context.Background(), request)
+}
+
+// AssociateSecurityGroups
+// This API is used to associate security groups with specified instances.
+//
+// error code that may be returned:
+// FAILEDOPERATION_SECURITYGROUPACTIONFAILED = "FailedOperation.SecurityGroupActionFailed"
+// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed"
+// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound"
+// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// INVALIDSECURITYGROUPID_NOTFOUND = "InvalidSecurityGroupId.NotFound"
+// INVALIDSGID_MALFORMED = "InvalidSgId.Malformed"
+// LIMITEXCEEDED_ASSOCIATEUSGLIMITEXCEEDED = "LimitExceeded.AssociateUSGLimitExceeded"
+// LIMITEXCEEDED_CVMSVIFSPERSECGROUPLIMITEXCEEDED = "LimitExceeded.CvmsVifsPerSecGroupLimitExceeded"
+// LIMITEXCEEDED_SINGLEUSGQUOTA = "LimitExceeded.SingleUSGQuota"
+// MUTEXOPERATION_TASKRUNNING = "MutexOperation.TaskRunning"
+// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress"
+// SECGROUPACTIONFAILURE = "SecGroupActionFailure"
+// UNSUPPORTEDOPERATION_INSTANCESTATEISOLATING = "UnsupportedOperation.InstanceStateIsolating"
+// UNSUPPORTEDOPERATION_INSTANCESTATEPENDING = "UnsupportedOperation.InstanceStatePending"
+func (c *Client) AssociateSecurityGroupsWithContext(ctx context.Context, request *AssociateSecurityGroupsRequest) (response *AssociateSecurityGroupsResponse, err error) {
+ if request == nil {
+ request = NewAssociateSecurityGroupsRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("AssociateSecurityGroups require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewAssociateSecurityGroupsResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewConfigureChcAssistVpcRequest() (request *ConfigureChcAssistVpcRequest) {
+ request = &ConfigureChcAssistVpcRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("cvm", APIVersion, "ConfigureChcAssistVpc")
+
+
+ return
+}
+
+func NewConfigureChcAssistVpcResponse() (response *ConfigureChcAssistVpcResponse) {
+ response = &ConfigureChcAssistVpcResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// ConfigureChcAssistVpc
+// This API is used to configure the out-of-band network and deployment network of a CHC host.
+//
+// error code that may be returned:
+// ACCOUNTQUALIFICATIONRESTRICTIONS = "AccountQualificationRestrictions"
+// INVALIDHOST_NOTSUPPORTED = "InvalidHost.NotSupported"
+// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported"
+// INVALIDPARAMETER = "InvalidParameter"
+// INVALIDPARAMETERVALUE_AMOUNTNOTEQUAL = "InvalidParameterValue.AmountNotEqual"
+// INVALIDPARAMETERVALUE_CHCHOSTSNOTFOUND = "InvalidParameterValue.ChcHostsNotFound"
+// INVALIDPARAMETERVALUE_IPADDRESSMALFORMED = "InvalidParameterValue.IPAddressMalformed"
+// INVALIDPARAMETERVALUE_INCORRECTFORMAT = "InvalidParameterValue.IncorrectFormat"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// INVALIDPARAMETERVALUE_MUSTDHCPENABLEDVPC = "InvalidParameterValue.MustDhcpEnabledVpc"
+// INVALIDPARAMETERVALUE_SUBNETIDMALFORMED = "InvalidParameterValue.SubnetIdMalformed"
+// LIMITEXCEEDED_VPCSUBNETNUM = "LimitExceeded.VpcSubnetNum"
+// VPCADDRNOTINSUBNET = "VpcAddrNotInSubNet"
+// VPCIPISUSED = "VpcIpIsUsed"
+func (c *Client) ConfigureChcAssistVpc(request *ConfigureChcAssistVpcRequest) (response *ConfigureChcAssistVpcResponse, err error) {
+ return c.ConfigureChcAssistVpcWithContext(context.Background(), request)
+}
+
+// ConfigureChcAssistVpc
+// This API is used to configure the out-of-band network and deployment network of a CHC host.
+//
+// error code that may be returned:
+// ACCOUNTQUALIFICATIONRESTRICTIONS = "AccountQualificationRestrictions"
+// INVALIDHOST_NOTSUPPORTED = "InvalidHost.NotSupported"
+// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported"
+// INVALIDPARAMETER = "InvalidParameter"
+// INVALIDPARAMETERVALUE_AMOUNTNOTEQUAL = "InvalidParameterValue.AmountNotEqual"
+// INVALIDPARAMETERVALUE_CHCHOSTSNOTFOUND = "InvalidParameterValue.ChcHostsNotFound"
+// INVALIDPARAMETERVALUE_IPADDRESSMALFORMED = "InvalidParameterValue.IPAddressMalformed"
+// INVALIDPARAMETERVALUE_INCORRECTFORMAT = "InvalidParameterValue.IncorrectFormat"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// INVALIDPARAMETERVALUE_MUSTDHCPENABLEDVPC = "InvalidParameterValue.MustDhcpEnabledVpc"
+// INVALIDPARAMETERVALUE_SUBNETIDMALFORMED = "InvalidParameterValue.SubnetIdMalformed"
+// LIMITEXCEEDED_VPCSUBNETNUM = "LimitExceeded.VpcSubnetNum"
+// VPCADDRNOTINSUBNET = "VpcAddrNotInSubNet"
+// VPCIPISUSED = "VpcIpIsUsed"
+func (c *Client) ConfigureChcAssistVpcWithContext(ctx context.Context, request *ConfigureChcAssistVpcRequest) (response *ConfigureChcAssistVpcResponse, err error) {
+ if request == nil {
+ request = NewConfigureChcAssistVpcRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("ConfigureChcAssistVpc require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewConfigureChcAssistVpcResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewConfigureChcDeployVpcRequest() (request *ConfigureChcDeployVpcRequest) {
+ request = &ConfigureChcDeployVpcRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("cvm", APIVersion, "ConfigureChcDeployVpc")
+
+
+ return
+}
+
+func NewConfigureChcDeployVpcResponse() (response *ConfigureChcDeployVpcResponse) {
+ response = &ConfigureChcDeployVpcResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// ConfigureChcDeployVpc
+// This API is used to configure the deployment network of a CHC host.
+//
+// error code that may be returned:
+// ACCOUNTQUALIFICATIONRESTRICTIONS = "AccountQualificationRestrictions"
+// INVALIDHOST_NOTSUPPORTED = "InvalidHost.NotSupported"
+// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported"
+// INVALIDPARAMETER = "InvalidParameter"
+// INVALIDPARAMETERVALUE_AMOUNTNOTEQUAL = "InvalidParameterValue.AmountNotEqual"
+// INVALIDPARAMETERVALUE_CHCHOSTSNOTFOUND = "InvalidParameterValue.ChcHostsNotFound"
+// INVALIDPARAMETERVALUE_DEPLOYVPCALREADYEXISTS = "InvalidParameterValue.DeployVpcAlreadyExists"
+// INVALIDPARAMETERVALUE_INCORRECTFORMAT = "InvalidParameterValue.IncorrectFormat"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// INVALIDPARAMETERVALUE_MUSTDHCPENABLEDVPC = "InvalidParameterValue.MustDhcpEnabledVpc"
+// VPCADDRNOTINSUBNET = "VpcAddrNotInSubNet"
+// VPCIPISUSED = "VpcIpIsUsed"
+func (c *Client) ConfigureChcDeployVpc(request *ConfigureChcDeployVpcRequest) (response *ConfigureChcDeployVpcResponse, err error) {
+ return c.ConfigureChcDeployVpcWithContext(context.Background(), request)
+}
+
+// ConfigureChcDeployVpc
+// This API is used to configure the deployment network of a CHC host.
+//
+// error code that may be returned:
+// ACCOUNTQUALIFICATIONRESTRICTIONS = "AccountQualificationRestrictions"
+// INVALIDHOST_NOTSUPPORTED = "InvalidHost.NotSupported"
+// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported"
+// INVALIDPARAMETER = "InvalidParameter"
+// INVALIDPARAMETERVALUE_AMOUNTNOTEQUAL = "InvalidParameterValue.AmountNotEqual"
+// INVALIDPARAMETERVALUE_CHCHOSTSNOTFOUND = "InvalidParameterValue.ChcHostsNotFound"
+// INVALIDPARAMETERVALUE_DEPLOYVPCALREADYEXISTS = "InvalidParameterValue.DeployVpcAlreadyExists"
+// INVALIDPARAMETERVALUE_INCORRECTFORMAT = "InvalidParameterValue.IncorrectFormat"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// INVALIDPARAMETERVALUE_MUSTDHCPENABLEDVPC = "InvalidParameterValue.MustDhcpEnabledVpc"
+// VPCADDRNOTINSUBNET = "VpcAddrNotInSubNet"
+// VPCIPISUSED = "VpcIpIsUsed"
+func (c *Client) ConfigureChcDeployVpcWithContext(ctx context.Context, request *ConfigureChcDeployVpcRequest) (response *ConfigureChcDeployVpcResponse, err error) {
+ if request == nil {
+ request = NewConfigureChcDeployVpcRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("ConfigureChcDeployVpc require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewConfigureChcDeployVpcResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewConvertOperatingSystemsRequest() (request *ConvertOperatingSystemsRequest) {
+ request = &ConvertOperatingSystemsRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("cvm", APIVersion, "ConvertOperatingSystems")
+
+
+ return
+}
+
+func NewConvertOperatingSystemsResponse() (response *ConvertOperatingSystemsResponse) {
+ response = &ConvertOperatingSystemsResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// ConvertOperatingSystems
+// This API is used to switch the operating system of an instance with CentOS 7 or CentOS 8 as the source operating system.
+//
+// error code that may be returned:
+// FAILEDOPERATION_GETINSTANCETATAGENTSTATUSFAILED = "FailedOperation.GetInstanceTATAgentStatusFailed"
+// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported"
+// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound"
+// INVALIDPARAMETER_AUTOSNAPSHOTNOTSUPPORTED = "InvalidParameter.AutoSnapshotNotSupported"
+// INVALIDPARAMETER_INVALIDTARGETOSTYPE = "InvalidParameter.InvalidTargetOSType"
+// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed"
+// UNSUPPORTEDOPERATION_INSTANCEOSCONVERTOSNOTSUPPORT = "UnsupportedOperation.InstanceOsConvertOsNotSupport"
+// UNSUPPORTEDOPERATION_INSTANCEOSWINDOWS = "UnsupportedOperation.InstanceOsWindows"
+// UNSUPPORTEDOPERATION_INSTANCESTATENOTRUNNING = "UnsupportedOperation.InstanceStateNotRunning"
+// UNSUPPORTEDOPERATION_MARKETIMAGECONVERTOSUNSUPPORTED = "UnsupportedOperation.MarketImageConvertOSUnsupported"
+// UNSUPPORTEDOPERATION_SPECIALINSTANCETYPE = "UnsupportedOperation.SpecialInstanceType"
+// UNSUPPORTEDOPERATION_TATAGENTNOTONLINE = "UnsupportedOperation.TatAgentNotOnline"
+// UNSUPPORTEDOPERATION_USERCONVERTOSNOTSUPPORT = "UnsupportedOperation.UserConvertOsNotSupport"
+func (c *Client) ConvertOperatingSystems(request *ConvertOperatingSystemsRequest) (response *ConvertOperatingSystemsResponse, err error) {
+ return c.ConvertOperatingSystemsWithContext(context.Background(), request)
+}
+
+// ConvertOperatingSystems
+// This API is used to switch the operating system of an instance with CentOS 7 or CentOS 8 as the source operating system.
+//
+// error code that may be returned:
+// FAILEDOPERATION_GETINSTANCETATAGENTSTATUSFAILED = "FailedOperation.GetInstanceTATAgentStatusFailed"
+// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported"
+// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound"
+// INVALIDPARAMETER_AUTOSNAPSHOTNOTSUPPORTED = "InvalidParameter.AutoSnapshotNotSupported"
+// INVALIDPARAMETER_INVALIDTARGETOSTYPE = "InvalidParameter.InvalidTargetOSType"
+// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed"
+// UNSUPPORTEDOPERATION_INSTANCEOSCONVERTOSNOTSUPPORT = "UnsupportedOperation.InstanceOsConvertOsNotSupport"
+// UNSUPPORTEDOPERATION_INSTANCEOSWINDOWS = "UnsupportedOperation.InstanceOsWindows"
+// UNSUPPORTEDOPERATION_INSTANCESTATENOTRUNNING = "UnsupportedOperation.InstanceStateNotRunning"
+// UNSUPPORTEDOPERATION_MARKETIMAGECONVERTOSUNSUPPORTED = "UnsupportedOperation.MarketImageConvertOSUnsupported"
+// UNSUPPORTEDOPERATION_SPECIALINSTANCETYPE = "UnsupportedOperation.SpecialInstanceType"
+// UNSUPPORTEDOPERATION_TATAGENTNOTONLINE = "UnsupportedOperation.TatAgentNotOnline"
+// UNSUPPORTEDOPERATION_USERCONVERTOSNOTSUPPORT = "UnsupportedOperation.UserConvertOsNotSupport"
+func (c *Client) ConvertOperatingSystemsWithContext(ctx context.Context, request *ConvertOperatingSystemsRequest) (response *ConvertOperatingSystemsResponse, err error) {
+ if request == nil {
+ request = NewConvertOperatingSystemsRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("ConvertOperatingSystems require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewConvertOperatingSystemsResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewCreateDisasterRecoverGroupRequest() (request *CreateDisasterRecoverGroupRequest) {
+ request = &CreateDisasterRecoverGroupRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("cvm", APIVersion, "CreateDisasterRecoverGroup")
+
+
+ return
+}
+
+func NewCreateDisasterRecoverGroupResponse() (response *CreateDisasterRecoverGroupResponse) {
+ response = &CreateDisasterRecoverGroupResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// CreateDisasterRecoverGroup
+// This API is used to create a [spread placement group](https://intl.cloud.tencent.com/document/product/213/15486?from_cn_redirect=1). After you create one, you can specify it for an instance when you [create the instance](https://intl.cloud.tencent.com/document/api/213/15730?from_cn_redirect=1),
+//
+// error code that may be returned:
+// INVALIDPARAMETERVALUE_INVALIDAPPIDFORMAT = "InvalidParameterValue.InvalidAppIdFormat"
+// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range"
+// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong"
+// RESOURCEINSUFFICIENT_INSUFFICIENTGROUPQUOTA = "ResourceInsufficient.InsufficientGroupQuota"
+func (c *Client) CreateDisasterRecoverGroup(request *CreateDisasterRecoverGroupRequest) (response *CreateDisasterRecoverGroupResponse, err error) {
+ return c.CreateDisasterRecoverGroupWithContext(context.Background(), request)
+}
+
+// CreateDisasterRecoverGroup
+// This API is used to create a [spread placement group](https://intl.cloud.tencent.com/document/product/213/15486?from_cn_redirect=1). After you create one, you can specify it for an instance when you [create the instance](https://intl.cloud.tencent.com/document/api/213/15730?from_cn_redirect=1),
+//
+// error code that may be returned:
+// INVALIDPARAMETERVALUE_INVALIDAPPIDFORMAT = "InvalidParameterValue.InvalidAppIdFormat"
+// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range"
+// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong"
+// RESOURCEINSUFFICIENT_INSUFFICIENTGROUPQUOTA = "ResourceInsufficient.InsufficientGroupQuota"
+func (c *Client) CreateDisasterRecoverGroupWithContext(ctx context.Context, request *CreateDisasterRecoverGroupRequest) (response *CreateDisasterRecoverGroupResponse, err error) {
+ if request == nil {
+ request = NewCreateDisasterRecoverGroupRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("CreateDisasterRecoverGroup require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewCreateDisasterRecoverGroupResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewCreateImageRequest() (request *CreateImageRequest) {
+ request = &CreateImageRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("cvm", APIVersion, "CreateImage")
+
+
+ return
+}
+
+func NewCreateImageResponse() (response *CreateImageResponse) {
+ response = &CreateImageResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// CreateImage
+// This API is used to create a new image with the system disk of an instance. The image can be used to create new instances.
+//
+// error code that may be returned:
+// IMAGEQUOTALIMITEXCEEDED = "ImageQuotaLimitExceeded"
+// INVALIDACCOUNT_INSUFFICIENTBALANCE = "InvalidAccount.InsufficientBalance"
+// INVALIDIMAGENAME_DUPLICATE = "InvalidImageName.Duplicate"
+// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported"
+// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound"
+// INVALIDPARAMETER_DATADISKIDCONTAINSROOTDISK = "InvalidParameter.DataDiskIdContainsRootDisk"
+// INVALIDPARAMETER_DATADISKNOTBELONGSPECIFIEDINSTANCE = "InvalidParameter.DataDiskNotBelongSpecifiedInstance"
+// INVALIDPARAMETER_DUPLICATESYSTEMSNAPSHOTS = "InvalidParameter.DuplicateSystemSnapshots"
+// INVALIDPARAMETER_INSTANCEIMAGENOTSUPPORT = "InvalidParameter.InstanceImageNotSupport"
+// INVALIDPARAMETER_INVALIDDEPENDENCE = "InvalidParameter.InvalidDependence"
+// INVALIDPARAMETER_LOCALDATADISKNOTSUPPORT = "InvalidParameter.LocalDataDiskNotSupport"
+// INVALIDPARAMETER_SNAPSHOTNOTFOUND = "InvalidParameter.SnapshotNotFound"
+// INVALIDPARAMETER_SPECIFYONEPARAMETER = "InvalidParameter.SpecifyOneParameter"
+// INVALIDPARAMETER_SWAPDISKNOTSUPPORT = "InvalidParameter.SwapDiskNotSupport"
+// INVALIDPARAMETER_SYSTEMSNAPSHOTNOTFOUND = "InvalidParameter.SystemSnapshotNotFound"
+// INVALIDPARAMETER_VALUETOOLARGE = "InvalidParameter.ValueTooLarge"
+// INVALIDPARAMETERCONFLICT = "InvalidParameterConflict"
+// INVALIDPARAMETERVALUE_INVALIDAPPIDFORMAT = "InvalidParameterValue.InvalidAppIdFormat"
+// INVALIDPARAMETERVALUE_INVALIDIMAGEFAMILY = "InvalidParameterValue.InvalidImageFamily"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// INVALIDPARAMETERVALUE_PREHEATNOTSUPPORTEDINSTANCETYPE = "InvalidParameterValue.PreheatNotSupportedInstanceType"
+// INVALIDPARAMETERVALUE_PREHEATNOTSUPPORTEDZONE = "InvalidParameterValue.PreheatNotSupportedZone"
+// INVALIDPARAMETERVALUE_PREHEATUNAVAILABLEZONES = "InvalidParameterValue.PreheatUnavailableZones"
+// INVALIDPARAMETERVALUE_TAGKEYNOTFOUND = "InvalidParameterValue.TagKeyNotFound"
+// INVALIDPARAMETERVALUE_TAGQUOTALIMITEXCEEDED = "InvalidParameterValue.TagQuotaLimitExceeded"
+// INVALIDPARAMETERVALUE_TOOLARGE = "InvalidParameterValue.TooLarge"
+// INVALIDZONE_MISMATCHREGION = "InvalidZone.MismatchRegion"
+// LIMITEXCEEDED_PREHEATIMAGESNAPSHOTOUTOFQUOTA = "LimitExceeded.PreheatImageSnapshotOutOfQuota"
+// MUTEXOPERATION_TASKRUNNING = "MutexOperation.TaskRunning"
+// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress"
+// RESOURCEINUSE = "ResourceInUse"
+// RESOURCEINUSE_DISKROLLBACKING = "ResourceInUse.DiskRollbacking"
+// RESOURCEINSUFFICIENT_CLOUDDISKUNAVAILABLE = "ResourceInsufficient.CloudDiskUnavailable"
+// RESOURCEUNAVAILABLE_SNAPSHOTCREATING = "ResourceUnavailable.SnapshotCreating"
+// UNSUPPORTEDOPERATION_ENCRYPTEDIMAGESNOTSUPPORTED = "UnsupportedOperation.EncryptedImagesNotSupported"
+// UNSUPPORTEDOPERATION_INSTANCEREINSTALLFAILED = "UnsupportedOperation.InstanceReinstallFailed"
+// UNSUPPORTEDOPERATION_INSTANCESTATEENTERRESCUEMODE = "UnsupportedOperation.InstanceStateEnterRescueMode"
+// UNSUPPORTEDOPERATION_INSTANCESTATEENTERSERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateEnterServiceLiveMigrate"
+// UNSUPPORTEDOPERATION_INSTANCESTATEEXITRESCUEMODE = "UnsupportedOperation.InstanceStateExitRescueMode"
+// UNSUPPORTEDOPERATION_INSTANCESTATEFREEZING = "UnsupportedOperation.InstanceStateFreezing"
+// UNSUPPORTEDOPERATION_INSTANCESTATEREBOOTING = "UnsupportedOperation.InstanceStateRebooting"
+// UNSUPPORTEDOPERATION_INSTANCESTATERESCUEMODE = "UnsupportedOperation.InstanceStateRescueMode"
+// UNSUPPORTEDOPERATION_INSTANCESTATESERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateServiceLiveMigrate"
+// UNSUPPORTEDOPERATION_INSTANCESTATESTARTING = "UnsupportedOperation.InstanceStateStarting"
+// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPING = "UnsupportedOperation.InstanceStateStopping"
+// UNSUPPORTEDOPERATION_INSTANCESTATETERMINATING = "UnsupportedOperation.InstanceStateTerminating"
+// UNSUPPORTEDOPERATION_INVALIDDISKFASTROLLBACK = "UnsupportedOperation.InvalidDiskFastRollback"
+// UNSUPPORTEDOPERATION_NOTSUPPORTINSTANCEIMAGE = "UnsupportedOperation.NotSupportInstanceImage"
+// UNSUPPORTEDOPERATION_PREHEATIMAGE = "UnsupportedOperation.PreheatImage"
+// UNSUPPORTEDOPERATION_SPECIALINSTANCETYPE = "UnsupportedOperation.SpecialInstanceType"
+// UNSUPPORTEDOPERATION_STOPPEDMODESTOPCHARGING = "UnsupportedOperation.StoppedModeStopCharging"
+func (c *Client) CreateImage(request *CreateImageRequest) (response *CreateImageResponse, err error) {
+ return c.CreateImageWithContext(context.Background(), request)
+}
+
+// CreateImage
+// This API is used to create a new image with the system disk of an instance. The image can be used to create new instances.
+//
+// error code that may be returned:
+// IMAGEQUOTALIMITEXCEEDED = "ImageQuotaLimitExceeded"
+// INVALIDACCOUNT_INSUFFICIENTBALANCE = "InvalidAccount.InsufficientBalance"
+// INVALIDIMAGENAME_DUPLICATE = "InvalidImageName.Duplicate"
+// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported"
+// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound"
+// INVALIDPARAMETER_DATADISKIDCONTAINSROOTDISK = "InvalidParameter.DataDiskIdContainsRootDisk"
+// INVALIDPARAMETER_DATADISKNOTBELONGSPECIFIEDINSTANCE = "InvalidParameter.DataDiskNotBelongSpecifiedInstance"
+// INVALIDPARAMETER_DUPLICATESYSTEMSNAPSHOTS = "InvalidParameter.DuplicateSystemSnapshots"
+// INVALIDPARAMETER_INSTANCEIMAGENOTSUPPORT = "InvalidParameter.InstanceImageNotSupport"
+// INVALIDPARAMETER_INVALIDDEPENDENCE = "InvalidParameter.InvalidDependence"
+// INVALIDPARAMETER_LOCALDATADISKNOTSUPPORT = "InvalidParameter.LocalDataDiskNotSupport"
+// INVALIDPARAMETER_SNAPSHOTNOTFOUND = "InvalidParameter.SnapshotNotFound"
+// INVALIDPARAMETER_SPECIFYONEPARAMETER = "InvalidParameter.SpecifyOneParameter"
+// INVALIDPARAMETER_SWAPDISKNOTSUPPORT = "InvalidParameter.SwapDiskNotSupport"
+// INVALIDPARAMETER_SYSTEMSNAPSHOTNOTFOUND = "InvalidParameter.SystemSnapshotNotFound"
+// INVALIDPARAMETER_VALUETOOLARGE = "InvalidParameter.ValueTooLarge"
+// INVALIDPARAMETERCONFLICT = "InvalidParameterConflict"
+// INVALIDPARAMETERVALUE_INVALIDAPPIDFORMAT = "InvalidParameterValue.InvalidAppIdFormat"
+// INVALIDPARAMETERVALUE_INVALIDIMAGEFAMILY = "InvalidParameterValue.InvalidImageFamily"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// INVALIDPARAMETERVALUE_PREHEATNOTSUPPORTEDINSTANCETYPE = "InvalidParameterValue.PreheatNotSupportedInstanceType"
+// INVALIDPARAMETERVALUE_PREHEATNOTSUPPORTEDZONE = "InvalidParameterValue.PreheatNotSupportedZone"
+// INVALIDPARAMETERVALUE_PREHEATUNAVAILABLEZONES = "InvalidParameterValue.PreheatUnavailableZones"
+// INVALIDPARAMETERVALUE_TAGKEYNOTFOUND = "InvalidParameterValue.TagKeyNotFound"
+// INVALIDPARAMETERVALUE_TAGQUOTALIMITEXCEEDED = "InvalidParameterValue.TagQuotaLimitExceeded"
+// INVALIDPARAMETERVALUE_TOOLARGE = "InvalidParameterValue.TooLarge"
+// INVALIDZONE_MISMATCHREGION = "InvalidZone.MismatchRegion"
+// LIMITEXCEEDED_PREHEATIMAGESNAPSHOTOUTOFQUOTA = "LimitExceeded.PreheatImageSnapshotOutOfQuota"
+// MUTEXOPERATION_TASKRUNNING = "MutexOperation.TaskRunning"
+// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress"
+// RESOURCEINUSE = "ResourceInUse"
+// RESOURCEINUSE_DISKROLLBACKING = "ResourceInUse.DiskRollbacking"
+// RESOURCEINSUFFICIENT_CLOUDDISKUNAVAILABLE = "ResourceInsufficient.CloudDiskUnavailable"
+// RESOURCEUNAVAILABLE_SNAPSHOTCREATING = "ResourceUnavailable.SnapshotCreating"
+// UNSUPPORTEDOPERATION_ENCRYPTEDIMAGESNOTSUPPORTED = "UnsupportedOperation.EncryptedImagesNotSupported"
+// UNSUPPORTEDOPERATION_INSTANCEREINSTALLFAILED = "UnsupportedOperation.InstanceReinstallFailed"
+// UNSUPPORTEDOPERATION_INSTANCESTATEENTERRESCUEMODE = "UnsupportedOperation.InstanceStateEnterRescueMode"
+// UNSUPPORTEDOPERATION_INSTANCESTATEENTERSERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateEnterServiceLiveMigrate"
+// UNSUPPORTEDOPERATION_INSTANCESTATEEXITRESCUEMODE = "UnsupportedOperation.InstanceStateExitRescueMode"
+// UNSUPPORTEDOPERATION_INSTANCESTATEFREEZING = "UnsupportedOperation.InstanceStateFreezing"
+// UNSUPPORTEDOPERATION_INSTANCESTATEREBOOTING = "UnsupportedOperation.InstanceStateRebooting"
+// UNSUPPORTEDOPERATION_INSTANCESTATERESCUEMODE = "UnsupportedOperation.InstanceStateRescueMode"
+// UNSUPPORTEDOPERATION_INSTANCESTATESERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateServiceLiveMigrate"
+// UNSUPPORTEDOPERATION_INSTANCESTATESTARTING = "UnsupportedOperation.InstanceStateStarting"
+// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPING = "UnsupportedOperation.InstanceStateStopping"
+// UNSUPPORTEDOPERATION_INSTANCESTATETERMINATING = "UnsupportedOperation.InstanceStateTerminating"
+// UNSUPPORTEDOPERATION_INVALIDDISKFASTROLLBACK = "UnsupportedOperation.InvalidDiskFastRollback"
+// UNSUPPORTEDOPERATION_NOTSUPPORTINSTANCEIMAGE = "UnsupportedOperation.NotSupportInstanceImage"
+// UNSUPPORTEDOPERATION_PREHEATIMAGE = "UnsupportedOperation.PreheatImage"
+// UNSUPPORTEDOPERATION_SPECIALINSTANCETYPE = "UnsupportedOperation.SpecialInstanceType"
+// UNSUPPORTEDOPERATION_STOPPEDMODESTOPCHARGING = "UnsupportedOperation.StoppedModeStopCharging"
+func (c *Client) CreateImageWithContext(ctx context.Context, request *CreateImageRequest) (response *CreateImageResponse, err error) {
+ if request == nil {
+ request = NewCreateImageRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("CreateImage require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewCreateImageResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewCreateKeyPairRequest() (request *CreateKeyPairRequest) {
+ request = &CreateKeyPairRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("cvm", APIVersion, "CreateKeyPair")
+
+
+ return
+}
+
+func NewCreateKeyPairResponse() (response *CreateKeyPairResponse) {
+ response = &CreateKeyPairResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// CreateKeyPair
+// This API is used to create an `OpenSSH RSA` key pair, which you can use to log in to a `Linux` instance.
+//
+//
+//
+// * You only need to specify a name, and the system will automatically create a key pair and return its `ID` and the public and private keys.
+//
+// * The name of the key pair must be unique.
+//
+// * You can save the private key to a file and use it as an authentication method for `SSH`.
+//
+// * Tencent Cloud does not save users' private keys. Be sure to save it yourself.
+//
+// error code that may be returned:
+// FAILEDOPERATION_TAGKEYRESERVED = "FailedOperation.TagKeyReserved"
+// INTERNALSERVERERROR = "InternalServerError"
+// INVALIDKEYPAIR_LIMITEXCEEDED = "InvalidKeyPair.LimitExceeded"
+// INVALIDKEYPAIRNAME_DUPLICATE = "InvalidKeyPairName.Duplicate"
+// INVALIDKEYPAIRNAMEEMPTY = "InvalidKeyPairNameEmpty"
+// INVALIDKEYPAIRNAMEINCLUDEILLEGALCHAR = "InvalidKeyPairNameIncludeIllegalChar"
+// INVALIDKEYPAIRNAMETOOLONG = "InvalidKeyPairNameTooLong"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPROJECTID_NOTFOUND = "InvalidProjectId.NotFound"
+// LIMITEXCEEDED_TAGRESOURCEQUOTA = "LimitExceeded.TagResourceQuota"
+// MISSINGPARAMETER = "MissingParameter"
+func (c *Client) CreateKeyPair(request *CreateKeyPairRequest) (response *CreateKeyPairResponse, err error) {
+ return c.CreateKeyPairWithContext(context.Background(), request)
+}
+
+// CreateKeyPair
+// This API is used to create an `OpenSSH RSA` key pair, which you can use to log in to a `Linux` instance.
+//
+//
+//
+// * You only need to specify a name, and the system will automatically create a key pair and return its `ID` and the public and private keys.
+//
+// * The name of the key pair must be unique.
+//
+// * You can save the private key to a file and use it as an authentication method for `SSH`.
+//
+// * Tencent Cloud does not save users' private keys. Be sure to save it yourself.
+//
+// error code that may be returned:
+// FAILEDOPERATION_TAGKEYRESERVED = "FailedOperation.TagKeyReserved"
+// INTERNALSERVERERROR = "InternalServerError"
+// INVALIDKEYPAIR_LIMITEXCEEDED = "InvalidKeyPair.LimitExceeded"
+// INVALIDKEYPAIRNAME_DUPLICATE = "InvalidKeyPairName.Duplicate"
+// INVALIDKEYPAIRNAMEEMPTY = "InvalidKeyPairNameEmpty"
+// INVALIDKEYPAIRNAMEINCLUDEILLEGALCHAR = "InvalidKeyPairNameIncludeIllegalChar"
+// INVALIDKEYPAIRNAMETOOLONG = "InvalidKeyPairNameTooLong"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPROJECTID_NOTFOUND = "InvalidProjectId.NotFound"
+// LIMITEXCEEDED_TAGRESOURCEQUOTA = "LimitExceeded.TagResourceQuota"
+// MISSINGPARAMETER = "MissingParameter"
+func (c *Client) CreateKeyPairWithContext(ctx context.Context, request *CreateKeyPairRequest) (response *CreateKeyPairResponse, err error) {
+ if request == nil {
+ request = NewCreateKeyPairRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("CreateKeyPair require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewCreateKeyPairResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewCreateLaunchTemplateRequest() (request *CreateLaunchTemplateRequest) {
+ request = &CreateLaunchTemplateRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("cvm", APIVersion, "CreateLaunchTemplate")
+
+
+ return
+}
+
+func NewCreateLaunchTemplateResponse() (response *CreateLaunchTemplateResponse) {
+ response = &CreateLaunchTemplateResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// CreateLaunchTemplate
+// This API is used to create an instance launch template.
+//
+//
+//
+// An instance launch template contains the configuration information required to create an instance, including instance type, data/system disk type and size, and security group, etc.
+//
+//
+//
+// When a template is created, it defaults to Version 1. You can use `CreateLaunchTemplateVersion` to create new versions of this template, with the version number increasing. When you run `RunInstances` to create instances, you can specify the instance launch template version. If it's not specified, the default template version is used.
+//
+// error code that may be returned:
+// ACCOUNTQUALIFICATIONRESTRICTIONS = "AccountQualificationRestrictions"
+// AUTHFAILURE_CAMROLENAMEAUTHENTICATEFAILED = "AuthFailure.CamRoleNameAuthenticateFailed"
+// FAILEDOPERATION_DISASTERRECOVERGROUPNOTFOUND = "FailedOperation.DisasterRecoverGroupNotFound"
+// FAILEDOPERATION_INQUIRYPRICEFAILED = "FailedOperation.InquiryPriceFailed"
+// FAILEDOPERATION_NOAVAILABLEIPADDRESSCOUNTINSUBNET = "FailedOperation.NoAvailableIpAddressCountInSubnet"
+// FAILEDOPERATION_SECURITYGROUPACTIONFAILED = "FailedOperation.SecurityGroupActionFailed"
+// FAILEDOPERATION_SNAPSHOTSIZELARGERTHANDATASIZE = "FailedOperation.SnapshotSizeLargerThanDataSize"
+// FAILEDOPERATION_TAGKEYRESERVED = "FailedOperation.TagKeyReserved"
+// INSTANCESQUOTALIMITEXCEEDED = "InstancesQuotaLimitExceeded"
+// INTERNALERROR_TRADEUNKNOWNERROR = "InternalError.TradeUnknownError"
+// INVALIDACCOUNT_INSUFFICIENTBALANCE = "InvalidAccount.InsufficientBalance"
+// INVALIDCLIENTTOKEN_TOOLONG = "InvalidClientToken.TooLong"
+// INVALIDHOSTID_MALFORMED = "InvalidHostId.Malformed"
+// INVALIDHOSTID_NOTFOUND = "InvalidHostId.NotFound"
+// INVALIDIMAGEID_MALFORMED = "InvalidImageId.Malformed"
+// INVALIDIMAGEID_NOTFOUND = "InvalidImageId.NotFound"
+// INVALIDINSTANCENAME_TOOLONG = "InvalidInstanceName.TooLong"
+// INVALIDINSTANCETYPE_MALFORMED = "InvalidInstanceType.Malformed"
+// INVALIDPARAMETER_INSTANCEIMAGENOTSUPPORT = "InvalidParameter.InstanceImageNotSupport"
+// INVALIDPARAMETER_INTERNETACCESSIBLENOTSUPPORTED = "InvalidParameter.InternetAccessibleNotSupported"
+// INVALIDPARAMETER_INVALIDIPFORMAT = "InvalidParameter.InvalidIpFormat"
+// INVALIDPARAMETER_LACKCORECOUNTORTHREADPERCORE = "InvalidParameter.LackCoreCountOrThreadPerCore"
+// INVALIDPARAMETER_PASSWORDNOTSUPPORTED = "InvalidParameter.PasswordNotSupported"
+// INVALIDPARAMETER_SNAPSHOTNOTFOUND = "InvalidParameter.SnapshotNotFound"
+// INVALIDPARAMETERCOMBINATION = "InvalidParameterCombination"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPARAMETERVALUE_CLOUDSSDDATADISKSIZETOOSMALL = "InvalidParameterValue.CloudSsdDataDiskSizeTooSmall"
+// INVALIDPARAMETERVALUE_CORECOUNTVALUE = "InvalidParameterValue.CoreCountValue"
+// INVALIDPARAMETERVALUE_ILLEGALHOSTNAME = "InvalidParameterValue.IllegalHostName"
+// INVALIDPARAMETERVALUE_INSTANCETYPENOTSUPPORTHPCCLUSTER = "InvalidParameterValue.InstanceTypeNotSupportHpcCluster"
+// INVALIDPARAMETERVALUE_INSTANCETYPEREQUIREDHPCCLUSTER = "InvalidParameterValue.InstanceTypeRequiredHpcCluster"
+// INVALIDPARAMETERVALUE_INSUFFICIENTOFFERING = "InvalidParameterValue.InsufficientOffering"
+// INVALIDPARAMETERVALUE_INSUFFICIENTPRICE = "InvalidParameterValue.InsufficientPrice"
+// INVALIDPARAMETERVALUE_INVALIDAPPIDFORMAT = "InvalidParameterValue.InvalidAppIdFormat"
+// INVALIDPARAMETERVALUE_INVALIDIMAGEFORGIVENINSTANCETYPE = "InvalidParameterValue.InvalidImageForGivenInstanceType"
+// INVALIDPARAMETERVALUE_INVALIDIMAGEID = "InvalidParameterValue.InvalidImageId"
+// INVALIDPARAMETERVALUE_INVALIDIMAGESTATE = "InvalidParameterValue.InvalidImageState"
+// INVALIDPARAMETERVALUE_INVALIDIPFORMAT = "InvalidParameterValue.InvalidIpFormat"
+// INVALIDPARAMETERVALUE_INVALIDLAUNCHTEMPLATEDESCRIPTION = "InvalidParameterValue.InvalidLaunchTemplateDescription"
+// INVALIDPARAMETERVALUE_INVALIDLAUNCHTEMPLATENAME = "InvalidParameterValue.InvalidLaunchTemplateName"
+// INVALIDPARAMETERVALUE_INVALIDLAUNCHTEMPLATEVERSIONDESCRIPTION = "InvalidParameterValue.InvalidLaunchTemplateVersionDescription"
+// INVALIDPARAMETERVALUE_INVALIDPASSWORD = "InvalidParameterValue.InvalidPassword"
+// INVALIDPARAMETERVALUE_INVALIDTIMEFORMAT = "InvalidParameterValue.InvalidTimeFormat"
+// INVALIDPARAMETERVALUE_INVALIDUSERDATAFORMAT = "InvalidParameterValue.InvalidUserDataFormat"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// INVALIDPARAMETERVALUE_MUSTDHCPENABLEDVPC = "InvalidParameterValue.MustDhcpEnabledVpc"
+// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range"
+// INVALIDPARAMETERVALUE_SNAPSHOTIDMALFORMED = "InvalidParameterValue.SnapshotIdMalformed"
+// INVALIDPARAMETERVALUE_SUBNETNOTEXIST = "InvalidParameterValue.SubnetNotExist"
+// INVALIDPARAMETERVALUE_THREADPERCOREVALUE = "InvalidParameterValue.ThreadPerCoreValue"
+// INVALIDPARAMETERVALUE_VPCIDMALFORMED = "InvalidParameterValue.VpcIdMalformed"
+// INVALIDPARAMETERVALUE_VPCIDNOTEXIST = "InvalidParameterValue.VpcIdNotExist"
+// INVALIDPARAMETERVALUE_VPCIDZONEIDNOTMATCH = "InvalidParameterValue.VpcIdZoneIdNotMatch"
+// INVALIDPARAMETERVALUE_ZONENOTSUPPORTED = "InvalidParameterValue.ZoneNotSupported"
+// INVALIDPASSWORD = "InvalidPassword"
+// INVALIDPERIOD = "InvalidPeriod"
+// INVALIDPERMISSION = "InvalidPermission"
+// INVALIDPROJECTID_NOTFOUND = "InvalidProjectId.NotFound"
+// INVALIDSECURITYGROUPID_NOTFOUND = "InvalidSecurityGroupId.NotFound"
+// INVALIDZONE_MISMATCHREGION = "InvalidZone.MismatchRegion"
+// LIMITEXCEEDED_INSTANCEQUOTA = "LimitExceeded.InstanceQuota"
+// LIMITEXCEEDED_LAUNCHTEMPLATEQUOTA = "LimitExceeded.LaunchTemplateQuota"
+// LIMITEXCEEDED_SINGLEUSGQUOTA = "LimitExceeded.SingleUSGQuota"
+// LIMITEXCEEDED_SPOTQUOTA = "LimitExceeded.SpotQuota"
+// LIMITEXCEEDED_USERSPOTQUOTA = "LimitExceeded.UserSpotQuota"
+// LIMITEXCEEDED_VPCSUBNETNUM = "LimitExceeded.VpcSubnetNum"
+// MISSINGPARAMETER = "MissingParameter"
+// MISSINGPARAMETER_DPDKINSTANCETYPEREQUIREDVPC = "MissingParameter.DPDKInstanceTypeRequiredVPC"
+// MISSINGPARAMETER_MONITORSERVICE = "MissingParameter.MonitorService"
+// RESOURCEINSUFFICIENT_AVAILABILITYZONESOLDOUT = "ResourceInsufficient.AvailabilityZoneSoldOut"
+// RESOURCEINSUFFICIENT_CLOUDDISKSOLDOUT = "ResourceInsufficient.CloudDiskSoldOut"
+// RESOURCEINSUFFICIENT_CLOUDDISKUNAVAILABLE = "ResourceInsufficient.CloudDiskUnavailable"
+// RESOURCEINSUFFICIENT_DISASTERRECOVERGROUPCVMQUOTA = "ResourceInsufficient.DisasterRecoverGroupCvmQuota"
+// RESOURCEINSUFFICIENT_SPECIFIEDINSTANCETYPE = "ResourceInsufficient.SpecifiedInstanceType"
+// RESOURCENOTFOUND_HPCCLUSTER = "ResourceNotFound.HpcCluster"
+// RESOURCENOTFOUND_KEYPAIRNOTFOUND = "ResourceNotFound.KeyPairNotFound"
+// RESOURCENOTFOUND_NODEFAULTCBS = "ResourceNotFound.NoDefaultCbs"
+// RESOURCENOTFOUND_NODEFAULTCBSWITHREASON = "ResourceNotFound.NoDefaultCbsWithReason"
+// RESOURCEUNAVAILABLE_INSTANCETYPE = "ResourceUnavailable.InstanceType"
+// RESOURCESSOLDOUT_EIPINSUFFICIENT = "ResourcesSoldOut.EipInsufficient"
+// RESOURCESSOLDOUT_SPECIFIEDINSTANCETYPE = "ResourcesSoldOut.SpecifiedInstanceType"
+// UNSUPPORTEDOPERATION_BANDWIDTHPACKAGEIDNOTSUPPORTED = "UnsupportedOperation.BandwidthPackageIdNotSupported"
+// UNSUPPORTEDOPERATION_INSTANCETYPENOTSUPPORTJUMBOFRAME = "UnsupportedOperation.InstanceTypeNotSupportJumboFrame"
+// UNSUPPORTEDOPERATION_INVALIDDISK = "UnsupportedOperation.InvalidDisk"
+// UNSUPPORTEDOPERATION_KEYPAIRUNSUPPORTEDWINDOWS = "UnsupportedOperation.KeyPairUnsupportedWindows"
+// UNSUPPORTEDOPERATION_NOINSTANCETYPESUPPORTSPOT = "UnsupportedOperation.NoInstanceTypeSupportSpot"
+// UNSUPPORTEDOPERATION_NOTSUPPORTIMPORTINSTANCESACTIONTIMER = "UnsupportedOperation.NotSupportImportInstancesActionTimer"
+// UNSUPPORTEDOPERATION_ONLYFORPREPAIDACCOUNT = "UnsupportedOperation.OnlyForPrepaidAccount"
+// VPCADDRNOTINSUBNET = "VpcAddrNotInSubNet"
+// VPCIPISUSED = "VpcIpIsUsed"
+func (c *Client) CreateLaunchTemplate(request *CreateLaunchTemplateRequest) (response *CreateLaunchTemplateResponse, err error) {
+ return c.CreateLaunchTemplateWithContext(context.Background(), request)
+}
+
+// CreateLaunchTemplate
+// This API is used to create an instance launch template.
+//
+//
+//
+// An instance launch template contains the configuration information required to create an instance, including instance type, data/system disk type and size, and security group, etc.
+//
+//
+//
+// When a template is created, it defaults to Version 1. You can use `CreateLaunchTemplateVersion` to create new versions of this template, with the version number increasing. When you run `RunInstances` to create instances, you can specify the instance launch template version. If it's not specified, the default template version is used.
+//
+// error code that may be returned:
+// ACCOUNTQUALIFICATIONRESTRICTIONS = "AccountQualificationRestrictions"
+// AUTHFAILURE_CAMROLENAMEAUTHENTICATEFAILED = "AuthFailure.CamRoleNameAuthenticateFailed"
+// FAILEDOPERATION_DISASTERRECOVERGROUPNOTFOUND = "FailedOperation.DisasterRecoverGroupNotFound"
+// FAILEDOPERATION_INQUIRYPRICEFAILED = "FailedOperation.InquiryPriceFailed"
+// FAILEDOPERATION_NOAVAILABLEIPADDRESSCOUNTINSUBNET = "FailedOperation.NoAvailableIpAddressCountInSubnet"
+// FAILEDOPERATION_SECURITYGROUPACTIONFAILED = "FailedOperation.SecurityGroupActionFailed"
+// FAILEDOPERATION_SNAPSHOTSIZELARGERTHANDATASIZE = "FailedOperation.SnapshotSizeLargerThanDataSize"
+// FAILEDOPERATION_TAGKEYRESERVED = "FailedOperation.TagKeyReserved"
+// INSTANCESQUOTALIMITEXCEEDED = "InstancesQuotaLimitExceeded"
+// INTERNALERROR_TRADEUNKNOWNERROR = "InternalError.TradeUnknownError"
+// INVALIDACCOUNT_INSUFFICIENTBALANCE = "InvalidAccount.InsufficientBalance"
+// INVALIDCLIENTTOKEN_TOOLONG = "InvalidClientToken.TooLong"
+// INVALIDHOSTID_MALFORMED = "InvalidHostId.Malformed"
+// INVALIDHOSTID_NOTFOUND = "InvalidHostId.NotFound"
+// INVALIDIMAGEID_MALFORMED = "InvalidImageId.Malformed"
+// INVALIDIMAGEID_NOTFOUND = "InvalidImageId.NotFound"
+// INVALIDINSTANCENAME_TOOLONG = "InvalidInstanceName.TooLong"
+// INVALIDINSTANCETYPE_MALFORMED = "InvalidInstanceType.Malformed"
+// INVALIDPARAMETER_INSTANCEIMAGENOTSUPPORT = "InvalidParameter.InstanceImageNotSupport"
+// INVALIDPARAMETER_INTERNETACCESSIBLENOTSUPPORTED = "InvalidParameter.InternetAccessibleNotSupported"
+// INVALIDPARAMETER_INVALIDIPFORMAT = "InvalidParameter.InvalidIpFormat"
+// INVALIDPARAMETER_LACKCORECOUNTORTHREADPERCORE = "InvalidParameter.LackCoreCountOrThreadPerCore"
+// INVALIDPARAMETER_PASSWORDNOTSUPPORTED = "InvalidParameter.PasswordNotSupported"
+// INVALIDPARAMETER_SNAPSHOTNOTFOUND = "InvalidParameter.SnapshotNotFound"
+// INVALIDPARAMETERCOMBINATION = "InvalidParameterCombination"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPARAMETERVALUE_CLOUDSSDDATADISKSIZETOOSMALL = "InvalidParameterValue.CloudSsdDataDiskSizeTooSmall"
+// INVALIDPARAMETERVALUE_CORECOUNTVALUE = "InvalidParameterValue.CoreCountValue"
+// INVALIDPARAMETERVALUE_ILLEGALHOSTNAME = "InvalidParameterValue.IllegalHostName"
+// INVALIDPARAMETERVALUE_INSTANCETYPENOTSUPPORTHPCCLUSTER = "InvalidParameterValue.InstanceTypeNotSupportHpcCluster"
+// INVALIDPARAMETERVALUE_INSTANCETYPEREQUIREDHPCCLUSTER = "InvalidParameterValue.InstanceTypeRequiredHpcCluster"
+// INVALIDPARAMETERVALUE_INSUFFICIENTOFFERING = "InvalidParameterValue.InsufficientOffering"
+// INVALIDPARAMETERVALUE_INSUFFICIENTPRICE = "InvalidParameterValue.InsufficientPrice"
+// INVALIDPARAMETERVALUE_INVALIDAPPIDFORMAT = "InvalidParameterValue.InvalidAppIdFormat"
+// INVALIDPARAMETERVALUE_INVALIDIMAGEFORGIVENINSTANCETYPE = "InvalidParameterValue.InvalidImageForGivenInstanceType"
+// INVALIDPARAMETERVALUE_INVALIDIMAGEID = "InvalidParameterValue.InvalidImageId"
+// INVALIDPARAMETERVALUE_INVALIDIMAGESTATE = "InvalidParameterValue.InvalidImageState"
+// INVALIDPARAMETERVALUE_INVALIDIPFORMAT = "InvalidParameterValue.InvalidIpFormat"
+// INVALIDPARAMETERVALUE_INVALIDLAUNCHTEMPLATEDESCRIPTION = "InvalidParameterValue.InvalidLaunchTemplateDescription"
+// INVALIDPARAMETERVALUE_INVALIDLAUNCHTEMPLATENAME = "InvalidParameterValue.InvalidLaunchTemplateName"
+// INVALIDPARAMETERVALUE_INVALIDLAUNCHTEMPLATEVERSIONDESCRIPTION = "InvalidParameterValue.InvalidLaunchTemplateVersionDescription"
+// INVALIDPARAMETERVALUE_INVALIDPASSWORD = "InvalidParameterValue.InvalidPassword"
+// INVALIDPARAMETERVALUE_INVALIDTIMEFORMAT = "InvalidParameterValue.InvalidTimeFormat"
+// INVALIDPARAMETERVALUE_INVALIDUSERDATAFORMAT = "InvalidParameterValue.InvalidUserDataFormat"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// INVALIDPARAMETERVALUE_MUSTDHCPENABLEDVPC = "InvalidParameterValue.MustDhcpEnabledVpc"
+// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range"
+// INVALIDPARAMETERVALUE_SNAPSHOTIDMALFORMED = "InvalidParameterValue.SnapshotIdMalformed"
+// INVALIDPARAMETERVALUE_SUBNETNOTEXIST = "InvalidParameterValue.SubnetNotExist"
+// INVALIDPARAMETERVALUE_THREADPERCOREVALUE = "InvalidParameterValue.ThreadPerCoreValue"
+// INVALIDPARAMETERVALUE_VPCIDMALFORMED = "InvalidParameterValue.VpcIdMalformed"
+// INVALIDPARAMETERVALUE_VPCIDNOTEXIST = "InvalidParameterValue.VpcIdNotExist"
+// INVALIDPARAMETERVALUE_VPCIDZONEIDNOTMATCH = "InvalidParameterValue.VpcIdZoneIdNotMatch"
+// INVALIDPARAMETERVALUE_ZONENOTSUPPORTED = "InvalidParameterValue.ZoneNotSupported"
+// INVALIDPASSWORD = "InvalidPassword"
+// INVALIDPERIOD = "InvalidPeriod"
+// INVALIDPERMISSION = "InvalidPermission"
+// INVALIDPROJECTID_NOTFOUND = "InvalidProjectId.NotFound"
+// INVALIDSECURITYGROUPID_NOTFOUND = "InvalidSecurityGroupId.NotFound"
+// INVALIDZONE_MISMATCHREGION = "InvalidZone.MismatchRegion"
+// LIMITEXCEEDED_INSTANCEQUOTA = "LimitExceeded.InstanceQuota"
+// LIMITEXCEEDED_LAUNCHTEMPLATEQUOTA = "LimitExceeded.LaunchTemplateQuota"
+// LIMITEXCEEDED_SINGLEUSGQUOTA = "LimitExceeded.SingleUSGQuota"
+// LIMITEXCEEDED_SPOTQUOTA = "LimitExceeded.SpotQuota"
+// LIMITEXCEEDED_USERSPOTQUOTA = "LimitExceeded.UserSpotQuota"
+// LIMITEXCEEDED_VPCSUBNETNUM = "LimitExceeded.VpcSubnetNum"
+// MISSINGPARAMETER = "MissingParameter"
+// MISSINGPARAMETER_DPDKINSTANCETYPEREQUIREDVPC = "MissingParameter.DPDKInstanceTypeRequiredVPC"
+// MISSINGPARAMETER_MONITORSERVICE = "MissingParameter.MonitorService"
+// RESOURCEINSUFFICIENT_AVAILABILITYZONESOLDOUT = "ResourceInsufficient.AvailabilityZoneSoldOut"
+// RESOURCEINSUFFICIENT_CLOUDDISKSOLDOUT = "ResourceInsufficient.CloudDiskSoldOut"
+// RESOURCEINSUFFICIENT_CLOUDDISKUNAVAILABLE = "ResourceInsufficient.CloudDiskUnavailable"
+// RESOURCEINSUFFICIENT_DISASTERRECOVERGROUPCVMQUOTA = "ResourceInsufficient.DisasterRecoverGroupCvmQuota"
+// RESOURCEINSUFFICIENT_SPECIFIEDINSTANCETYPE = "ResourceInsufficient.SpecifiedInstanceType"
+// RESOURCENOTFOUND_HPCCLUSTER = "ResourceNotFound.HpcCluster"
+// RESOURCENOTFOUND_KEYPAIRNOTFOUND = "ResourceNotFound.KeyPairNotFound"
+// RESOURCENOTFOUND_NODEFAULTCBS = "ResourceNotFound.NoDefaultCbs"
+// RESOURCENOTFOUND_NODEFAULTCBSWITHREASON = "ResourceNotFound.NoDefaultCbsWithReason"
+// RESOURCEUNAVAILABLE_INSTANCETYPE = "ResourceUnavailable.InstanceType"
+// RESOURCESSOLDOUT_EIPINSUFFICIENT = "ResourcesSoldOut.EipInsufficient"
+// RESOURCESSOLDOUT_SPECIFIEDINSTANCETYPE = "ResourcesSoldOut.SpecifiedInstanceType"
+// UNSUPPORTEDOPERATION_BANDWIDTHPACKAGEIDNOTSUPPORTED = "UnsupportedOperation.BandwidthPackageIdNotSupported"
+// UNSUPPORTEDOPERATION_INSTANCETYPENOTSUPPORTJUMBOFRAME = "UnsupportedOperation.InstanceTypeNotSupportJumboFrame"
+// UNSUPPORTEDOPERATION_INVALIDDISK = "UnsupportedOperation.InvalidDisk"
+// UNSUPPORTEDOPERATION_KEYPAIRUNSUPPORTEDWINDOWS = "UnsupportedOperation.KeyPairUnsupportedWindows"
+// UNSUPPORTEDOPERATION_NOINSTANCETYPESUPPORTSPOT = "UnsupportedOperation.NoInstanceTypeSupportSpot"
+// UNSUPPORTEDOPERATION_NOTSUPPORTIMPORTINSTANCESACTIONTIMER = "UnsupportedOperation.NotSupportImportInstancesActionTimer"
+// UNSUPPORTEDOPERATION_ONLYFORPREPAIDACCOUNT = "UnsupportedOperation.OnlyForPrepaidAccount"
+// VPCADDRNOTINSUBNET = "VpcAddrNotInSubNet"
+// VPCIPISUSED = "VpcIpIsUsed"
+func (c *Client) CreateLaunchTemplateWithContext(ctx context.Context, request *CreateLaunchTemplateRequest) (response *CreateLaunchTemplateResponse, err error) {
+ if request == nil {
+ request = NewCreateLaunchTemplateRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("CreateLaunchTemplate require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewCreateLaunchTemplateResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewCreateLaunchTemplateVersionRequest() (request *CreateLaunchTemplateVersionRequest) {
+ request = &CreateLaunchTemplateVersionRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("cvm", APIVersion, "CreateLaunchTemplateVersion")
+
+
+ return
+}
+
+func NewCreateLaunchTemplateVersionResponse() (response *CreateLaunchTemplateVersionResponse) {
+ response = &CreateLaunchTemplateVersionResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// CreateLaunchTemplateVersion
+// This API is used to create an instance launch template based on the specified template ID and the corresponding template version number. The default version number will be used when no template version numbers are specified. Each instance launch template can have up to 30 version numbers.
+//
+// error code that may be returned:
+// AUTHFAILURE_CAMROLENAMEAUTHENTICATEFAILED = "AuthFailure.CamRoleNameAuthenticateFailed"
+// FAILEDOPERATION_DISASTERRECOVERGROUPNOTFOUND = "FailedOperation.DisasterRecoverGroupNotFound"
+// FAILEDOPERATION_INQUIRYPRICEFAILED = "FailedOperation.InquiryPriceFailed"
+// FAILEDOPERATION_TAGKEYRESERVED = "FailedOperation.TagKeyReserved"
+// INTERNALERROR_TRADEUNKNOWNERROR = "InternalError.TradeUnknownError"
+// INVALIDCLIENTTOKEN_TOOLONG = "InvalidClientToken.TooLong"
+// INVALIDHOSTID_MALFORMED = "InvalidHostId.Malformed"
+// INVALIDHOSTID_NOTFOUND = "InvalidHostId.NotFound"
+// INVALIDIMAGEID_MALFORMED = "InvalidImageId.Malformed"
+// INVALIDIMAGEID_NOTFOUND = "InvalidImageId.NotFound"
+// INVALIDINSTANCENAME_TOOLONG = "InvalidInstanceName.TooLong"
+// INVALIDINSTANCETYPE_MALFORMED = "InvalidInstanceType.Malformed"
+// INVALIDPARAMETER_INSTANCEIMAGENOTSUPPORT = "InvalidParameter.InstanceImageNotSupport"
+// INVALIDPARAMETER_INVALIDIPFORMAT = "InvalidParameter.InvalidIpFormat"
+// INVALIDPARAMETER_PASSWORDNOTSUPPORTED = "InvalidParameter.PasswordNotSupported"
+// INVALIDPARAMETER_SNAPSHOTNOTFOUND = "InvalidParameter.SnapshotNotFound"
+// INVALIDPARAMETERCOMBINATION = "InvalidParameterCombination"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPARAMETERVALUE_CLOUDSSDDATADISKSIZETOOSMALL = "InvalidParameterValue.CloudSsdDataDiskSizeTooSmall"
+// INVALIDPARAMETERVALUE_ILLEGALHOSTNAME = "InvalidParameterValue.IllegalHostName"
+// INVALIDPARAMETERVALUE_INSTANCETYPENOTSUPPORTHPCCLUSTER = "InvalidParameterValue.InstanceTypeNotSupportHpcCluster"
+// INVALIDPARAMETERVALUE_INVALIDIMAGESTATE = "InvalidParameterValue.InvalidImageState"
+// INVALIDPARAMETERVALUE_INVALIDIPFORMAT = "InvalidParameterValue.InvalidIpFormat"
+// INVALIDPARAMETERVALUE_INVALIDLAUNCHTEMPLATEVERSIONDESCRIPTION = "InvalidParameterValue.InvalidLaunchTemplateVersionDescription"
+// INVALIDPARAMETERVALUE_INVALIDUSERDATAFORMAT = "InvalidParameterValue.InvalidUserDataFormat"
+// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDMALFORMED = "InvalidParameterValue.LaunchTemplateIdMalformed"
+// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDNOTEXISTED = "InvalidParameterValue.LaunchTemplateIdNotExisted"
+// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDVERNOTEXISTED = "InvalidParameterValue.LaunchTemplateIdVerNotExisted"
+// INVALIDPARAMETERVALUE_LAUNCHTEMPLATENOTFOUND = "InvalidParameterValue.LaunchTemplateNotFound"
+// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEVERSION = "InvalidParameterValue.LaunchTemplateVersion"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// INVALIDPARAMETERVALUE_MUSTDHCPENABLEDVPC = "InvalidParameterValue.MustDhcpEnabledVpc"
+// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range"
+// INVALIDPARAMETERVALUE_SNAPSHOTIDMALFORMED = "InvalidParameterValue.SnapshotIdMalformed"
+// INVALIDPARAMETERVALUE_SUBNETNOTEXIST = "InvalidParameterValue.SubnetNotExist"
+// INVALIDPARAMETERVALUE_THREADPERCOREVALUE = "InvalidParameterValue.ThreadPerCoreValue"
+// INVALIDPARAMETERVALUE_VPCIDZONEIDNOTMATCH = "InvalidParameterValue.VpcIdZoneIdNotMatch"
+// INVALIDPARAMETERVALUE_VPCNOTSUPPORTIPV6ADDRESS = "InvalidParameterValue.VpcNotSupportIpv6Address"
+// INVALIDPARAMETERVALUE_ZONENOTSUPPORTED = "InvalidParameterValue.ZoneNotSupported"
+// INVALIDPASSWORD = "InvalidPassword"
+// INVALIDPERIOD = "InvalidPeriod"
+// INVALIDPERMISSION = "InvalidPermission"
+// INVALIDPROJECTID_NOTFOUND = "InvalidProjectId.NotFound"
+// INVALIDSECURITYGROUPID_NOTFOUND = "InvalidSecurityGroupId.NotFound"
+// INVALIDZONE_MISMATCHREGION = "InvalidZone.MismatchRegion"
+// LIMITEXCEEDED_INSTANCEQUOTA = "LimitExceeded.InstanceQuota"
+// LIMITEXCEEDED_LAUNCHTEMPLATEQUOTA = "LimitExceeded.LaunchTemplateQuota"
+// LIMITEXCEEDED_LAUNCHTEMPLATEVERSIONQUOTA = "LimitExceeded.LaunchTemplateVersionQuota"
+// LIMITEXCEEDED_SINGLEUSGQUOTA = "LimitExceeded.SingleUSGQuota"
+// LIMITEXCEEDED_SPOTQUOTA = "LimitExceeded.SpotQuota"
+// LIMITEXCEEDED_USERSPOTQUOTA = "LimitExceeded.UserSpotQuota"
+// LIMITEXCEEDED_VPCSUBNETNUM = "LimitExceeded.VpcSubnetNum"
+// MISSINGPARAMETER = "MissingParameter"
+// MISSINGPARAMETER_DPDKINSTANCETYPEREQUIREDVPC = "MissingParameter.DPDKInstanceTypeRequiredVPC"
+// MISSINGPARAMETER_MONITORSERVICE = "MissingParameter.MonitorService"
+// RESOURCEINSUFFICIENT_CLOUDDISKSOLDOUT = "ResourceInsufficient.CloudDiskSoldOut"
+// RESOURCEINSUFFICIENT_CLOUDDISKUNAVAILABLE = "ResourceInsufficient.CloudDiskUnavailable"
+// RESOURCEINSUFFICIENT_DISASTERRECOVERGROUPCVMQUOTA = "ResourceInsufficient.DisasterRecoverGroupCvmQuota"
+// RESOURCEINSUFFICIENT_SPECIFIEDINSTANCETYPE = "ResourceInsufficient.SpecifiedInstanceType"
+// RESOURCENOTFOUND_HPCCLUSTER = "ResourceNotFound.HpcCluster"
+// RESOURCENOTFOUND_KEYPAIRNOTFOUND = "ResourceNotFound.KeyPairNotFound"
+// RESOURCENOTFOUND_NODEFAULTCBS = "ResourceNotFound.NoDefaultCbs"
+// RESOURCENOTFOUND_NODEFAULTCBSWITHREASON = "ResourceNotFound.NoDefaultCbsWithReason"
+// RESOURCEUNAVAILABLE_INSTANCETYPE = "ResourceUnavailable.InstanceType"
+// RESOURCESSOLDOUT_EIPINSUFFICIENT = "ResourcesSoldOut.EipInsufficient"
+// RESOURCESSOLDOUT_SPECIFIEDINSTANCETYPE = "ResourcesSoldOut.SpecifiedInstanceType"
+// UNKNOWNPARAMETER = "UnknownParameter"
+// UNSUPPORTEDOPERATION = "UnsupportedOperation"
+// UNSUPPORTEDOPERATION_BANDWIDTHPACKAGEIDNOTSUPPORTED = "UnsupportedOperation.BandwidthPackageIdNotSupported"
+// UNSUPPORTEDOPERATION_INSTANCETYPENOTSUPPORTJUMBOFRAME = "UnsupportedOperation.InstanceTypeNotSupportJumboFrame"
+// UNSUPPORTEDOPERATION_INVALIDDISK = "UnsupportedOperation.InvalidDisk"
+// UNSUPPORTEDOPERATION_KEYPAIRUNSUPPORTEDWINDOWS = "UnsupportedOperation.KeyPairUnsupportedWindows"
+// UNSUPPORTEDOPERATION_NOINSTANCETYPESUPPORTSPOT = "UnsupportedOperation.NoInstanceTypeSupportSpot"
+// UNSUPPORTEDOPERATION_ONLYFORPREPAIDACCOUNT = "UnsupportedOperation.OnlyForPrepaidAccount"
+// VPCADDRNOTINSUBNET = "VpcAddrNotInSubNet"
+// VPCIPISUSED = "VpcIpIsUsed"
+func (c *Client) CreateLaunchTemplateVersion(request *CreateLaunchTemplateVersionRequest) (response *CreateLaunchTemplateVersionResponse, err error) {
+ return c.CreateLaunchTemplateVersionWithContext(context.Background(), request)
+}
+
+// CreateLaunchTemplateVersion
+// This API is used to create an instance launch template based on the specified template ID and the corresponding template version number. The default version number will be used when no template version numbers are specified. Each instance launch template can have up to 30 version numbers.
+//
+// error code that may be returned:
+// AUTHFAILURE_CAMROLENAMEAUTHENTICATEFAILED = "AuthFailure.CamRoleNameAuthenticateFailed"
+// FAILEDOPERATION_DISASTERRECOVERGROUPNOTFOUND = "FailedOperation.DisasterRecoverGroupNotFound"
+// FAILEDOPERATION_INQUIRYPRICEFAILED = "FailedOperation.InquiryPriceFailed"
+// FAILEDOPERATION_TAGKEYRESERVED = "FailedOperation.TagKeyReserved"
+// INTERNALERROR_TRADEUNKNOWNERROR = "InternalError.TradeUnknownError"
+// INVALIDCLIENTTOKEN_TOOLONG = "InvalidClientToken.TooLong"
+// INVALIDHOSTID_MALFORMED = "InvalidHostId.Malformed"
+// INVALIDHOSTID_NOTFOUND = "InvalidHostId.NotFound"
+// INVALIDIMAGEID_MALFORMED = "InvalidImageId.Malformed"
+// INVALIDIMAGEID_NOTFOUND = "InvalidImageId.NotFound"
+// INVALIDINSTANCENAME_TOOLONG = "InvalidInstanceName.TooLong"
+// INVALIDINSTANCETYPE_MALFORMED = "InvalidInstanceType.Malformed"
+// INVALIDPARAMETER_INSTANCEIMAGENOTSUPPORT = "InvalidParameter.InstanceImageNotSupport"
+// INVALIDPARAMETER_INVALIDIPFORMAT = "InvalidParameter.InvalidIpFormat"
+// INVALIDPARAMETER_PASSWORDNOTSUPPORTED = "InvalidParameter.PasswordNotSupported"
+// INVALIDPARAMETER_SNAPSHOTNOTFOUND = "InvalidParameter.SnapshotNotFound"
+// INVALIDPARAMETERCOMBINATION = "InvalidParameterCombination"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPARAMETERVALUE_CLOUDSSDDATADISKSIZETOOSMALL = "InvalidParameterValue.CloudSsdDataDiskSizeTooSmall"
+// INVALIDPARAMETERVALUE_ILLEGALHOSTNAME = "InvalidParameterValue.IllegalHostName"
+// INVALIDPARAMETERVALUE_INSTANCETYPENOTSUPPORTHPCCLUSTER = "InvalidParameterValue.InstanceTypeNotSupportHpcCluster"
+// INVALIDPARAMETERVALUE_INVALIDIMAGESTATE = "InvalidParameterValue.InvalidImageState"
+// INVALIDPARAMETERVALUE_INVALIDIPFORMAT = "InvalidParameterValue.InvalidIpFormat"
+// INVALIDPARAMETERVALUE_INVALIDLAUNCHTEMPLATEVERSIONDESCRIPTION = "InvalidParameterValue.InvalidLaunchTemplateVersionDescription"
+// INVALIDPARAMETERVALUE_INVALIDUSERDATAFORMAT = "InvalidParameterValue.InvalidUserDataFormat"
+// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDMALFORMED = "InvalidParameterValue.LaunchTemplateIdMalformed"
+// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDNOTEXISTED = "InvalidParameterValue.LaunchTemplateIdNotExisted"
+// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDVERNOTEXISTED = "InvalidParameterValue.LaunchTemplateIdVerNotExisted"
+// INVALIDPARAMETERVALUE_LAUNCHTEMPLATENOTFOUND = "InvalidParameterValue.LaunchTemplateNotFound"
+// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEVERSION = "InvalidParameterValue.LaunchTemplateVersion"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// INVALIDPARAMETERVALUE_MUSTDHCPENABLEDVPC = "InvalidParameterValue.MustDhcpEnabledVpc"
+// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range"
+// INVALIDPARAMETERVALUE_SNAPSHOTIDMALFORMED = "InvalidParameterValue.SnapshotIdMalformed"
+// INVALIDPARAMETERVALUE_SUBNETNOTEXIST = "InvalidParameterValue.SubnetNotExist"
+// INVALIDPARAMETERVALUE_THREADPERCOREVALUE = "InvalidParameterValue.ThreadPerCoreValue"
+// INVALIDPARAMETERVALUE_VPCIDZONEIDNOTMATCH = "InvalidParameterValue.VpcIdZoneIdNotMatch"
+// INVALIDPARAMETERVALUE_VPCNOTSUPPORTIPV6ADDRESS = "InvalidParameterValue.VpcNotSupportIpv6Address"
+// INVALIDPARAMETERVALUE_ZONENOTSUPPORTED = "InvalidParameterValue.ZoneNotSupported"
+// INVALIDPASSWORD = "InvalidPassword"
+// INVALIDPERIOD = "InvalidPeriod"
+// INVALIDPERMISSION = "InvalidPermission"
+// INVALIDPROJECTID_NOTFOUND = "InvalidProjectId.NotFound"
+// INVALIDSECURITYGROUPID_NOTFOUND = "InvalidSecurityGroupId.NotFound"
+// INVALIDZONE_MISMATCHREGION = "InvalidZone.MismatchRegion"
+// LIMITEXCEEDED_INSTANCEQUOTA = "LimitExceeded.InstanceQuota"
+// LIMITEXCEEDED_LAUNCHTEMPLATEQUOTA = "LimitExceeded.LaunchTemplateQuota"
+// LIMITEXCEEDED_LAUNCHTEMPLATEVERSIONQUOTA = "LimitExceeded.LaunchTemplateVersionQuota"
+// LIMITEXCEEDED_SINGLEUSGQUOTA = "LimitExceeded.SingleUSGQuota"
+// LIMITEXCEEDED_SPOTQUOTA = "LimitExceeded.SpotQuota"
+// LIMITEXCEEDED_USERSPOTQUOTA = "LimitExceeded.UserSpotQuota"
+// LIMITEXCEEDED_VPCSUBNETNUM = "LimitExceeded.VpcSubnetNum"
+// MISSINGPARAMETER = "MissingParameter"
+// MISSINGPARAMETER_DPDKINSTANCETYPEREQUIREDVPC = "MissingParameter.DPDKInstanceTypeRequiredVPC"
+// MISSINGPARAMETER_MONITORSERVICE = "MissingParameter.MonitorService"
+// RESOURCEINSUFFICIENT_CLOUDDISKSOLDOUT = "ResourceInsufficient.CloudDiskSoldOut"
+// RESOURCEINSUFFICIENT_CLOUDDISKUNAVAILABLE = "ResourceInsufficient.CloudDiskUnavailable"
+// RESOURCEINSUFFICIENT_DISASTERRECOVERGROUPCVMQUOTA = "ResourceInsufficient.DisasterRecoverGroupCvmQuota"
+// RESOURCEINSUFFICIENT_SPECIFIEDINSTANCETYPE = "ResourceInsufficient.SpecifiedInstanceType"
+// RESOURCENOTFOUND_HPCCLUSTER = "ResourceNotFound.HpcCluster"
+// RESOURCENOTFOUND_KEYPAIRNOTFOUND = "ResourceNotFound.KeyPairNotFound"
+// RESOURCENOTFOUND_NODEFAULTCBS = "ResourceNotFound.NoDefaultCbs"
+// RESOURCENOTFOUND_NODEFAULTCBSWITHREASON = "ResourceNotFound.NoDefaultCbsWithReason"
+// RESOURCEUNAVAILABLE_INSTANCETYPE = "ResourceUnavailable.InstanceType"
+// RESOURCESSOLDOUT_EIPINSUFFICIENT = "ResourcesSoldOut.EipInsufficient"
+// RESOURCESSOLDOUT_SPECIFIEDINSTANCETYPE = "ResourcesSoldOut.SpecifiedInstanceType"
+// UNKNOWNPARAMETER = "UnknownParameter"
+// UNSUPPORTEDOPERATION = "UnsupportedOperation"
+// UNSUPPORTEDOPERATION_BANDWIDTHPACKAGEIDNOTSUPPORTED = "UnsupportedOperation.BandwidthPackageIdNotSupported"
+// UNSUPPORTEDOPERATION_INSTANCETYPENOTSUPPORTJUMBOFRAME = "UnsupportedOperation.InstanceTypeNotSupportJumboFrame"
+// UNSUPPORTEDOPERATION_INVALIDDISK = "UnsupportedOperation.InvalidDisk"
+// UNSUPPORTEDOPERATION_KEYPAIRUNSUPPORTEDWINDOWS = "UnsupportedOperation.KeyPairUnsupportedWindows"
+// UNSUPPORTEDOPERATION_NOINSTANCETYPESUPPORTSPOT = "UnsupportedOperation.NoInstanceTypeSupportSpot"
+// UNSUPPORTEDOPERATION_ONLYFORPREPAIDACCOUNT = "UnsupportedOperation.OnlyForPrepaidAccount"
+// VPCADDRNOTINSUBNET = "VpcAddrNotInSubNet"
+// VPCIPISUSED = "VpcIpIsUsed"
+func (c *Client) CreateLaunchTemplateVersionWithContext(ctx context.Context, request *CreateLaunchTemplateVersionRequest) (response *CreateLaunchTemplateVersionResponse, err error) {
+ if request == nil {
+ request = NewCreateLaunchTemplateVersionRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("CreateLaunchTemplateVersion require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewCreateLaunchTemplateVersionResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewDeleteDisasterRecoverGroupsRequest() (request *DeleteDisasterRecoverGroupsRequest) {
+ request = &DeleteDisasterRecoverGroupsRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("cvm", APIVersion, "DeleteDisasterRecoverGroups")
+
+
+ return
+}
+
+func NewDeleteDisasterRecoverGroupsResponse() (response *DeleteDisasterRecoverGroupsResponse) {
+ response = &DeleteDisasterRecoverGroupsResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// DeleteDisasterRecoverGroups
+// This API is used to delete a [spread placement group](https://intl.cloud.tencent.com/document/product/213/15486?from_cn_redirect=1). Only empty placement groups can be deleted. To delete a non-empty group, you need to terminate all the CVM instances in it first. Otherwise, the deletion will fail.
+//
+// error code that may be returned:
+// FAILEDOPERATION_PLACEMENTSETNOTEMPTY = "FailedOperation.PlacementSetNotEmpty"
+// INVALIDPARAMETERVALUE_DISASTERRECOVERGROUPIDMALFORMED = "InvalidParameterValue.DisasterRecoverGroupIdMalformed"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// RESOURCEINSUFFICIENT_DISASTERRECOVERGROUPCVMQUOTA = "ResourceInsufficient.DisasterRecoverGroupCvmQuota"
+// RESOURCENOTFOUND_INVALIDPLACEMENTSET = "ResourceNotFound.InvalidPlacementSet"
+func (c *Client) DeleteDisasterRecoverGroups(request *DeleteDisasterRecoverGroupsRequest) (response *DeleteDisasterRecoverGroupsResponse, err error) {
+ return c.DeleteDisasterRecoverGroupsWithContext(context.Background(), request)
+}
+
+// DeleteDisasterRecoverGroups
+// This API is used to delete a [spread placement group](https://intl.cloud.tencent.com/document/product/213/15486?from_cn_redirect=1). Only empty placement groups can be deleted. To delete a non-empty group, you need to terminate all the CVM instances in it first. Otherwise, the deletion will fail.
+//
+// error code that may be returned:
+// FAILEDOPERATION_PLACEMENTSETNOTEMPTY = "FailedOperation.PlacementSetNotEmpty"
+// INVALIDPARAMETERVALUE_DISASTERRECOVERGROUPIDMALFORMED = "InvalidParameterValue.DisasterRecoverGroupIdMalformed"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// RESOURCEINSUFFICIENT_DISASTERRECOVERGROUPCVMQUOTA = "ResourceInsufficient.DisasterRecoverGroupCvmQuota"
+// RESOURCENOTFOUND_INVALIDPLACEMENTSET = "ResourceNotFound.InvalidPlacementSet"
+func (c *Client) DeleteDisasterRecoverGroupsWithContext(ctx context.Context, request *DeleteDisasterRecoverGroupsRequest) (response *DeleteDisasterRecoverGroupsResponse, err error) {
+ if request == nil {
+ request = NewDeleteDisasterRecoverGroupsRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("DeleteDisasterRecoverGroups require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewDeleteDisasterRecoverGroupsResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewDeleteImagesRequest() (request *DeleteImagesRequest) {
+ request = &DeleteImagesRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("cvm", APIVersion, "DeleteImages")
+
+
+ return
+}
+
+func NewDeleteImagesResponse() (response *DeleteImagesResponse) {
+ response = &DeleteImagesResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// DeleteImages
+// This API is used to delete one or more images.
+//
+//
+//
+// * If the [ImageState](https://intl.cloud.tencent.com/document/product/213/15753?from_cn_redirect=1#Image) of an image is `CREATING` or `USING`, the image cannot be deleted. Call the [DescribeImages](https://intl.cloud.tencent.com/document/api/213/15715?from_cn_redirect=1) API to query the image status.
+//
+// * Up to 10 custom images are allowed in each region. If you have run out of the quota, delete unused images to create new ones.
+//
+// * A shared image cannot be deleted.
+//
+// error code that may be returned:
+// INVALIDIMAGEID_INSHARED = "InvalidImageId.InShared"
+// INVALIDIMAGEID_INCORRECTSTATE = "InvalidImageId.IncorrectState"
+// INVALIDIMAGEID_MALFORMED = "InvalidImageId.Malformed"
+// INVALIDIMAGEID_NOTFOUND = "InvalidImageId.NotFound"
+// INVALIDPARAMETERVALUE_INVALIDAPPIDFORMAT = "InvalidParameterValue.InvalidAppIdFormat"
+// INVALIDPARAMETERVALUE_INVALIDIMAGEID = "InvalidParameterValue.InvalidImageId"
+// INVALIDPARAMETERVALUE_INVALIDIMAGEIDISSHARED = "InvalidParameterValue.InvalidImageIdIsShared"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// MUTEXOPERATION_TASKRUNNING = "MutexOperation.TaskRunning"
+func (c *Client) DeleteImages(request *DeleteImagesRequest) (response *DeleteImagesResponse, err error) {
+ return c.DeleteImagesWithContext(context.Background(), request)
+}
+
+// DeleteImages
+// This API is used to delete one or more images.
+//
+//
+//
+// * If the [ImageState](https://intl.cloud.tencent.com/document/product/213/15753?from_cn_redirect=1#Image) of an image is `CREATING` or `USING`, the image cannot be deleted. Call the [DescribeImages](https://intl.cloud.tencent.com/document/api/213/15715?from_cn_redirect=1) API to query the image status.
+//
+// * Up to 10 custom images are allowed in each region. If you have run out of the quota, delete unused images to create new ones.
+//
+// * A shared image cannot be deleted.
+//
+// error code that may be returned:
+// INVALIDIMAGEID_INSHARED = "InvalidImageId.InShared"
+// INVALIDIMAGEID_INCORRECTSTATE = "InvalidImageId.IncorrectState"
+// INVALIDIMAGEID_MALFORMED = "InvalidImageId.Malformed"
+// INVALIDIMAGEID_NOTFOUND = "InvalidImageId.NotFound"
+// INVALIDPARAMETERVALUE_INVALIDAPPIDFORMAT = "InvalidParameterValue.InvalidAppIdFormat"
+// INVALIDPARAMETERVALUE_INVALIDIMAGEID = "InvalidParameterValue.InvalidImageId"
+// INVALIDPARAMETERVALUE_INVALIDIMAGEIDISSHARED = "InvalidParameterValue.InvalidImageIdIsShared"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// MUTEXOPERATION_TASKRUNNING = "MutexOperation.TaskRunning"
+func (c *Client) DeleteImagesWithContext(ctx context.Context, request *DeleteImagesRequest) (response *DeleteImagesResponse, err error) {
+ if request == nil {
+ request = NewDeleteImagesRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("DeleteImages require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewDeleteImagesResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewDeleteKeyPairsRequest() (request *DeleteKeyPairsRequest) {
+ request = &DeleteKeyPairsRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("cvm", APIVersion, "DeleteKeyPairs")
+
+
+ return
+}
+
+func NewDeleteKeyPairsResponse() (response *DeleteKeyPairsResponse) {
+ response = &DeleteKeyPairsResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// DeleteKeyPairs
+// This API is used to delete the key pairs hosted in Tencent Cloud.
+//
+//
+//
+// * You can delete multiple key pairs at the same time.
+//
+// * A key pair used by an instance or image cannot be deleted. Therefore, you need to verify whether all the key pairs have been deleted successfully.
+//
+// error code that may be returned:
+// INTERNALSERVERERROR = "InternalServerError"
+// INVALIDKEYPAIR_LIMITEXCEEDED = "InvalidKeyPair.LimitExceeded"
+// INVALIDKEYPAIRID_MALFORMED = "InvalidKeyPairId.Malformed"
+// INVALIDKEYPAIRID_NOTFOUND = "InvalidKeyPairId.NotFound"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPARAMETERVALUE_KEYPAIRNOTSUPPORTED = "InvalidParameterValue.KeyPairNotSupported"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// MISSINGPARAMETER = "MissingParameter"
+func (c *Client) DeleteKeyPairs(request *DeleteKeyPairsRequest) (response *DeleteKeyPairsResponse, err error) {
+ return c.DeleteKeyPairsWithContext(context.Background(), request)
+}
+
+// DeleteKeyPairs
+// This API is used to delete the key pairs hosted in Tencent Cloud.
+//
+//
+//
+// * You can delete multiple key pairs at the same time.
+//
+// * A key pair used by an instance or image cannot be deleted. Therefore, you need to verify whether all the key pairs have been deleted successfully.
+//
+// error code that may be returned:
+// INTERNALSERVERERROR = "InternalServerError"
+// INVALIDKEYPAIR_LIMITEXCEEDED = "InvalidKeyPair.LimitExceeded"
+// INVALIDKEYPAIRID_MALFORMED = "InvalidKeyPairId.Malformed"
+// INVALIDKEYPAIRID_NOTFOUND = "InvalidKeyPairId.NotFound"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPARAMETERVALUE_KEYPAIRNOTSUPPORTED = "InvalidParameterValue.KeyPairNotSupported"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// MISSINGPARAMETER = "MissingParameter"
+func (c *Client) DeleteKeyPairsWithContext(ctx context.Context, request *DeleteKeyPairsRequest) (response *DeleteKeyPairsResponse, err error) {
+ if request == nil {
+ request = NewDeleteKeyPairsRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("DeleteKeyPairs require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewDeleteKeyPairsResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewDeleteLaunchTemplateRequest() (request *DeleteLaunchTemplateRequest) {
+ request = &DeleteLaunchTemplateRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("cvm", APIVersion, "DeleteLaunchTemplate")
+
+
+ return
+}
+
+func NewDeleteLaunchTemplateResponse() (response *DeleteLaunchTemplateResponse) {
+ response = &DeleteLaunchTemplateResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// DeleteLaunchTemplate
+// This API is used to delete an instance launch template.
+//
+// error code that may be returned:
+// ACCOUNTQUALIFICATIONRESTRICTIONS = "AccountQualificationRestrictions"
+// AUTHFAILURE_CAMROLENAMEAUTHENTICATEFAILED = "AuthFailure.CamRoleNameAuthenticateFailed"
+// INVALIDPARAMETERCOMBINATION = "InvalidParameterCombination"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDMALFORMED = "InvalidParameterValue.LaunchTemplateIdMalformed"
+// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDNOTEXISTED = "InvalidParameterValue.LaunchTemplateIdNotExisted"
+// INVALIDPARAMETERVALUE_LAUNCHTEMPLATENOTFOUND = "InvalidParameterValue.LaunchTemplateNotFound"
+func (c *Client) DeleteLaunchTemplate(request *DeleteLaunchTemplateRequest) (response *DeleteLaunchTemplateResponse, err error) {
+ return c.DeleteLaunchTemplateWithContext(context.Background(), request)
+}
+
+// DeleteLaunchTemplate
+// This API is used to delete an instance launch template.
+//
+// error code that may be returned:
+// ACCOUNTQUALIFICATIONRESTRICTIONS = "AccountQualificationRestrictions"
+// AUTHFAILURE_CAMROLENAMEAUTHENTICATEFAILED = "AuthFailure.CamRoleNameAuthenticateFailed"
+// INVALIDPARAMETERCOMBINATION = "InvalidParameterCombination"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDMALFORMED = "InvalidParameterValue.LaunchTemplateIdMalformed"
+// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDNOTEXISTED = "InvalidParameterValue.LaunchTemplateIdNotExisted"
+// INVALIDPARAMETERVALUE_LAUNCHTEMPLATENOTFOUND = "InvalidParameterValue.LaunchTemplateNotFound"
+func (c *Client) DeleteLaunchTemplateWithContext(ctx context.Context, request *DeleteLaunchTemplateRequest) (response *DeleteLaunchTemplateResponse, err error) {
+ if request == nil {
+ request = NewDeleteLaunchTemplateRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("DeleteLaunchTemplate require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewDeleteLaunchTemplateResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewDeleteLaunchTemplateVersionsRequest() (request *DeleteLaunchTemplateVersionsRequest) {
+ request = &DeleteLaunchTemplateVersionsRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("cvm", APIVersion, "DeleteLaunchTemplateVersions")
+
+
+ return
+}
+
+func NewDeleteLaunchTemplateVersionsResponse() (response *DeleteLaunchTemplateVersionsResponse) {
+ response = &DeleteLaunchTemplateVersionsResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// DeleteLaunchTemplateVersions
+// This API is used to delete one or more instance launch template versions.
+//
+// error code that may be returned:
+// INVALIDPARAMETERCOMBINATION = "InvalidParameterCombination"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEDEFAULTVERSION = "InvalidParameterValue.LaunchTemplateDefaultVersion"
+// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDMALFORMED = "InvalidParameterValue.LaunchTemplateIdMalformed"
+// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDNOTEXISTED = "InvalidParameterValue.LaunchTemplateIdNotExisted"
+// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDVERNOTEXISTED = "InvalidParameterValue.LaunchTemplateIdVerNotExisted"
+// INVALIDPARAMETERVALUE_LAUNCHTEMPLATENOTFOUND = "InvalidParameterValue.LaunchTemplateNotFound"
+// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEVERSION = "InvalidParameterValue.LaunchTemplateVersion"
+// MISSINGPARAMETER = "MissingParameter"
+// UNKNOWNPARAMETER = "UnknownParameter"
+func (c *Client) DeleteLaunchTemplateVersions(request *DeleteLaunchTemplateVersionsRequest) (response *DeleteLaunchTemplateVersionsResponse, err error) {
+ return c.DeleteLaunchTemplateVersionsWithContext(context.Background(), request)
+}
+
+// DeleteLaunchTemplateVersions
+// This API is used to delete one or more instance launch template versions.
+//
+// error code that may be returned:
+// INVALIDPARAMETERCOMBINATION = "InvalidParameterCombination"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEDEFAULTVERSION = "InvalidParameterValue.LaunchTemplateDefaultVersion"
+// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDMALFORMED = "InvalidParameterValue.LaunchTemplateIdMalformed"
+// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDNOTEXISTED = "InvalidParameterValue.LaunchTemplateIdNotExisted"
+// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDVERNOTEXISTED = "InvalidParameterValue.LaunchTemplateIdVerNotExisted"
+// INVALIDPARAMETERVALUE_LAUNCHTEMPLATENOTFOUND = "InvalidParameterValue.LaunchTemplateNotFound"
+// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEVERSION = "InvalidParameterValue.LaunchTemplateVersion"
+// MISSINGPARAMETER = "MissingParameter"
+// UNKNOWNPARAMETER = "UnknownParameter"
+func (c *Client) DeleteLaunchTemplateVersionsWithContext(ctx context.Context, request *DeleteLaunchTemplateVersionsRequest) (response *DeleteLaunchTemplateVersionsResponse, err error) {
+ if request == nil {
+ request = NewDeleteLaunchTemplateVersionsRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("DeleteLaunchTemplateVersions require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewDeleteLaunchTemplateVersionsResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewDescribeChcDeniedActionsRequest() (request *DescribeChcDeniedActionsRequest) {
+ request = &DescribeChcDeniedActionsRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("cvm", APIVersion, "DescribeChcDeniedActions")
+
+
+ return
+}
+
+func NewDescribeChcDeniedActionsResponse() (response *DescribeChcDeniedActionsResponse) {
+ response = &DescribeChcDeniedActionsResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// DescribeChcDeniedActions
+// This API is used to query the actions not allowed for the specified CHC instances.
+//
+// error code that may be returned:
+// ACCOUNTQUALIFICATIONRESTRICTIONS = "AccountQualificationRestrictions"
+// INVALIDPARAMETERVALUE_CHCHOSTSNOTFOUND = "InvalidParameterValue.ChcHostsNotFound"
+// INVALIDPARAMETERVALUE_INCORRECTFORMAT = "InvalidParameterValue.IncorrectFormat"
+func (c *Client) DescribeChcDeniedActions(request *DescribeChcDeniedActionsRequest) (response *DescribeChcDeniedActionsResponse, err error) {
+ return c.DescribeChcDeniedActionsWithContext(context.Background(), request)
+}
+
+// DescribeChcDeniedActions
+// This API is used to query the actions not allowed for the specified CHC instances.
+//
+// error code that may be returned:
+// ACCOUNTQUALIFICATIONRESTRICTIONS = "AccountQualificationRestrictions"
+// INVALIDPARAMETERVALUE_CHCHOSTSNOTFOUND = "InvalidParameterValue.ChcHostsNotFound"
+// INVALIDPARAMETERVALUE_INCORRECTFORMAT = "InvalidParameterValue.IncorrectFormat"
+func (c *Client) DescribeChcDeniedActionsWithContext(ctx context.Context, request *DescribeChcDeniedActionsRequest) (response *DescribeChcDeniedActionsResponse, err error) {
+ if request == nil {
+ request = NewDescribeChcDeniedActionsRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("DescribeChcDeniedActions require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewDescribeChcDeniedActionsResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewDescribeChcHostsRequest() (request *DescribeChcHostsRequest) {
+ request = &DescribeChcHostsRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("cvm", APIVersion, "DescribeChcHosts")
+
+
+ return
+}
+
+func NewDescribeChcHostsResponse() (response *DescribeChcHostsResponse) {
+ response = &DescribeChcHostsResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// DescribeChcHosts
+// This API is used to query the details of one or more CHC host.
+//
+//
+//
+// * You can filter the query results with the instance ID, name or device type. See `Filter` for more information.
+//
+// * If no parameter is defined, a certain number of instances under the current account will be returned. The number is specified by `Limit` and is `20` by default.
+//
+// error code that may be returned:
+// ACCOUNTQUALIFICATIONRESTRICTIONS = "AccountQualificationRestrictions"
+// INVALIDFILTER = "InvalidFilter"
+// INVALIDFILTERVALUE_LIMITEXCEEDED = "InvalidFilterValue.LimitExceeded"
+// INVALIDPARAMETER_ATMOSTONE = "InvalidParameter.AtMostOne"
+// INVALIDPARAMETERVALUE_CHCHOSTSNOTFOUND = "InvalidParameterValue.ChcHostsNotFound"
+// INVALIDPARAMETERVALUE_INCORRECTFORMAT = "InvalidParameterValue.IncorrectFormat"
+// INVALIDPARAMETERVALUE_NOTEMPTY = "InvalidParameterValue.NotEmpty"
+// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range"
+// INVALIDPARAMETERVALUE_SUBNETIDMALFORMED = "InvalidParameterValue.SubnetIdMalformed"
+// INVALIDPARAMETERVALUE_VPCIDMALFORMED = "InvalidParameterValue.VpcIdMalformed"
+// INVALIDPARAMETERVALUELIMIT = "InvalidParameterValueLimit"
+// INVALIDPARAMETERVALUEOFFSET = "InvalidParameterValueOffset"
+// INVALIDZONE_MISMATCHREGION = "InvalidZone.MismatchRegion"
+// MISSINGPARAMETER = "MissingParameter"
+func (c *Client) DescribeChcHosts(request *DescribeChcHostsRequest) (response *DescribeChcHostsResponse, err error) {
+ return c.DescribeChcHostsWithContext(context.Background(), request)
+}
+
+// DescribeChcHosts
+// This API is used to query the details of one or more CHC host.
+//
+//
+//
+// * You can filter the query results with the instance ID, name or device type. See `Filter` for more information.
+//
+// * If no parameter is defined, a certain number of instances under the current account will be returned. The number is specified by `Limit` and is `20` by default.
+//
+// error code that may be returned:
+// ACCOUNTQUALIFICATIONRESTRICTIONS = "AccountQualificationRestrictions"
+// INVALIDFILTER = "InvalidFilter"
+// INVALIDFILTERVALUE_LIMITEXCEEDED = "InvalidFilterValue.LimitExceeded"
+// INVALIDPARAMETER_ATMOSTONE = "InvalidParameter.AtMostOne"
+// INVALIDPARAMETERVALUE_CHCHOSTSNOTFOUND = "InvalidParameterValue.ChcHostsNotFound"
+// INVALIDPARAMETERVALUE_INCORRECTFORMAT = "InvalidParameterValue.IncorrectFormat"
+// INVALIDPARAMETERVALUE_NOTEMPTY = "InvalidParameterValue.NotEmpty"
+// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range"
+// INVALIDPARAMETERVALUE_SUBNETIDMALFORMED = "InvalidParameterValue.SubnetIdMalformed"
+// INVALIDPARAMETERVALUE_VPCIDMALFORMED = "InvalidParameterValue.VpcIdMalformed"
+// INVALIDPARAMETERVALUELIMIT = "InvalidParameterValueLimit"
+// INVALIDPARAMETERVALUEOFFSET = "InvalidParameterValueOffset"
+// INVALIDZONE_MISMATCHREGION = "InvalidZone.MismatchRegion"
+// MISSINGPARAMETER = "MissingParameter"
+func (c *Client) DescribeChcHostsWithContext(ctx context.Context, request *DescribeChcHostsRequest) (response *DescribeChcHostsResponse, err error) {
+ if request == nil {
+ request = NewDescribeChcHostsRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("DescribeChcHosts require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewDescribeChcHostsResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewDescribeDisasterRecoverGroupQuotaRequest() (request *DescribeDisasterRecoverGroupQuotaRequest) {
+ request = &DescribeDisasterRecoverGroupQuotaRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("cvm", APIVersion, "DescribeDisasterRecoverGroupQuota")
+
+
+ return
+}
+
+func NewDescribeDisasterRecoverGroupQuotaResponse() (response *DescribeDisasterRecoverGroupQuotaResponse) {
+ response = &DescribeDisasterRecoverGroupQuotaResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// DescribeDisasterRecoverGroupQuota
+// This API is used to query the quota of [spread placement groups](https://intl.cloud.tencent.com/document/product/213/15486?from_cn_redirect=1).
+//
+// error code that may be returned:
+// ACCOUNTQUALIFICATIONRESTRICTIONS = "AccountQualificationRestrictions"
+// INVALIDFILTER = "InvalidFilter"
+// INVALIDFILTERVALUE_LIMITEXCEEDED = "InvalidFilterValue.LimitExceeded"
+// INVALIDPARAMETER_ATMOSTONE = "InvalidParameter.AtMostOne"
+// INVALIDPARAMETERVALUE_CHCHOSTSNOTFOUND = "InvalidParameterValue.ChcHostsNotFound"
+// INVALIDPARAMETERVALUE_INCORRECTFORMAT = "InvalidParameterValue.IncorrectFormat"
+// INVALIDPARAMETERVALUE_NOTEMPTY = "InvalidParameterValue.NotEmpty"
+// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range"
+// INVALIDPARAMETERVALUE_SUBNETIDMALFORMED = "InvalidParameterValue.SubnetIdMalformed"
+// INVALIDPARAMETERVALUE_VPCIDMALFORMED = "InvalidParameterValue.VpcIdMalformed"
+// INVALIDPARAMETERVALUELIMIT = "InvalidParameterValueLimit"
+// INVALIDPARAMETERVALUEOFFSET = "InvalidParameterValueOffset"
+// INVALIDZONE_MISMATCHREGION = "InvalidZone.MismatchRegion"
+// MISSINGPARAMETER = "MissingParameter"
+func (c *Client) DescribeDisasterRecoverGroupQuota(request *DescribeDisasterRecoverGroupQuotaRequest) (response *DescribeDisasterRecoverGroupQuotaResponse, err error) {
+ return c.DescribeDisasterRecoverGroupQuotaWithContext(context.Background(), request)
+}
+
+// DescribeDisasterRecoverGroupQuota
+// This API is used to query the quota of [spread placement groups](https://intl.cloud.tencent.com/document/product/213/15486?from_cn_redirect=1).
+//
+// error code that may be returned:
+// ACCOUNTQUALIFICATIONRESTRICTIONS = "AccountQualificationRestrictions"
+// INVALIDFILTER = "InvalidFilter"
+// INVALIDFILTERVALUE_LIMITEXCEEDED = "InvalidFilterValue.LimitExceeded"
+// INVALIDPARAMETER_ATMOSTONE = "InvalidParameter.AtMostOne"
+// INVALIDPARAMETERVALUE_CHCHOSTSNOTFOUND = "InvalidParameterValue.ChcHostsNotFound"
+// INVALIDPARAMETERVALUE_INCORRECTFORMAT = "InvalidParameterValue.IncorrectFormat"
+// INVALIDPARAMETERVALUE_NOTEMPTY = "InvalidParameterValue.NotEmpty"
+// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range"
+// INVALIDPARAMETERVALUE_SUBNETIDMALFORMED = "InvalidParameterValue.SubnetIdMalformed"
+// INVALIDPARAMETERVALUE_VPCIDMALFORMED = "InvalidParameterValue.VpcIdMalformed"
+// INVALIDPARAMETERVALUELIMIT = "InvalidParameterValueLimit"
+// INVALIDPARAMETERVALUEOFFSET = "InvalidParameterValueOffset"
+// INVALIDZONE_MISMATCHREGION = "InvalidZone.MismatchRegion"
+// MISSINGPARAMETER = "MissingParameter"
+func (c *Client) DescribeDisasterRecoverGroupQuotaWithContext(ctx context.Context, request *DescribeDisasterRecoverGroupQuotaRequest) (response *DescribeDisasterRecoverGroupQuotaResponse, err error) {
+ if request == nil {
+ request = NewDescribeDisasterRecoverGroupQuotaRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("DescribeDisasterRecoverGroupQuota require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewDescribeDisasterRecoverGroupQuotaResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewDescribeDisasterRecoverGroupsRequest() (request *DescribeDisasterRecoverGroupsRequest) {
+ request = &DescribeDisasterRecoverGroupsRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("cvm", APIVersion, "DescribeDisasterRecoverGroups")
+
+
+ return
+}
+
+func NewDescribeDisasterRecoverGroupsResponse() (response *DescribeDisasterRecoverGroupsResponse) {
+ response = &DescribeDisasterRecoverGroupsResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// DescribeDisasterRecoverGroups
+// This API is used to query the information on [spread placement groups](https://intl.cloud.tencent.com/document/product/213/15486?from_cn_redirect=1).
+//
+// error code that may be returned:
+// INVALIDPARAMETERVALUE_DISASTERRECOVERGROUPIDMALFORMED = "InvalidParameterValue.DisasterRecoverGroupIdMalformed"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+func (c *Client) DescribeDisasterRecoverGroups(request *DescribeDisasterRecoverGroupsRequest) (response *DescribeDisasterRecoverGroupsResponse, err error) {
+ return c.DescribeDisasterRecoverGroupsWithContext(context.Background(), request)
+}
+
+// DescribeDisasterRecoverGroups
+// This API is used to query the information on [spread placement groups](https://intl.cloud.tencent.com/document/product/213/15486?from_cn_redirect=1).
+//
+// error code that may be returned:
+// INVALIDPARAMETERVALUE_DISASTERRECOVERGROUPIDMALFORMED = "InvalidParameterValue.DisasterRecoverGroupIdMalformed"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+func (c *Client) DescribeDisasterRecoverGroupsWithContext(ctx context.Context, request *DescribeDisasterRecoverGroupsRequest) (response *DescribeDisasterRecoverGroupsResponse, err error) {
+ if request == nil {
+ request = NewDescribeDisasterRecoverGroupsRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("DescribeDisasterRecoverGroups require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewDescribeDisasterRecoverGroupsResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewDescribeHostsRequest() (request *DescribeHostsRequest) {
+ request = &DescribeHostsRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("cvm", APIVersion, "DescribeHosts")
+
+
+ return
+}
+
+func NewDescribeHostsResponse() (response *DescribeHostsResponse) {
+ response = &DescribeHostsResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// DescribeHosts
+// This API is used to query the details of CDH instances.
+//
+// error code that may be returned:
+// FAILEDOPERATION_TAGKEYRESERVED = "FailedOperation.TagKeyReserved"
+// INVALIDFILTER = "InvalidFilter"
+// INVALIDFILTERVALUE_LIMITEXCEEDED = "InvalidFilterValue.LimitExceeded"
+// INVALIDHOSTID_MALFORMED = "InvalidHostId.Malformed"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDZONE_MISMATCHREGION = "InvalidZone.MismatchRegion"
+// UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
+// UNSUPPORTEDOPERATION = "UnsupportedOperation"
+func (c *Client) DescribeHosts(request *DescribeHostsRequest) (response *DescribeHostsResponse, err error) {
+ return c.DescribeHostsWithContext(context.Background(), request)
+}
+
+// DescribeHosts
+// This API is used to query the details of CDH instances.
+//
+// error code that may be returned:
+// FAILEDOPERATION_TAGKEYRESERVED = "FailedOperation.TagKeyReserved"
+// INVALIDFILTER = "InvalidFilter"
+// INVALIDFILTERVALUE_LIMITEXCEEDED = "InvalidFilterValue.LimitExceeded"
+// INVALIDHOSTID_MALFORMED = "InvalidHostId.Malformed"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDZONE_MISMATCHREGION = "InvalidZone.MismatchRegion"
+// UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
+// UNSUPPORTEDOPERATION = "UnsupportedOperation"
+func (c *Client) DescribeHostsWithContext(ctx context.Context, request *DescribeHostsRequest) (response *DescribeHostsResponse, err error) {
+ if request == nil {
+ request = NewDescribeHostsRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("DescribeHosts require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewDescribeHostsResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewDescribeImageFromFamilyRequest() (request *DescribeImageFromFamilyRequest) {
+ request = &DescribeImageFromFamilyRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("cvm", APIVersion, "DescribeImageFromFamily")
+
+
+ return
+}
+
+func NewDescribeImageFromFamilyResponse() (response *DescribeImageFromFamilyResponse) {
+ response = &DescribeImageFromFamilyResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// DescribeImageFromFamily
+// This API is used to view information about available images within an image family.
+//
+// error code that may be returned:
+// FAILEDOPERATION_TAGKEYRESERVED = "FailedOperation.TagKeyReserved"
+// INVALIDFILTER = "InvalidFilter"
+// INVALIDFILTERVALUE_LIMITEXCEEDED = "InvalidFilterValue.LimitExceeded"
+// INVALIDHOSTID_MALFORMED = "InvalidHostId.Malformed"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDZONE_MISMATCHREGION = "InvalidZone.MismatchRegion"
+// UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
+// UNSUPPORTEDOPERATION = "UnsupportedOperation"
+func (c *Client) DescribeImageFromFamily(request *DescribeImageFromFamilyRequest) (response *DescribeImageFromFamilyResponse, err error) {
+ return c.DescribeImageFromFamilyWithContext(context.Background(), request)
+}
+
+// DescribeImageFromFamily
+// This API is used to view information about available images within an image family.
+//
+// error code that may be returned:
+// FAILEDOPERATION_TAGKEYRESERVED = "FailedOperation.TagKeyReserved"
+// INVALIDFILTER = "InvalidFilter"
+// INVALIDFILTERVALUE_LIMITEXCEEDED = "InvalidFilterValue.LimitExceeded"
+// INVALIDHOSTID_MALFORMED = "InvalidHostId.Malformed"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDZONE_MISMATCHREGION = "InvalidZone.MismatchRegion"
+// UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
+// UNSUPPORTEDOPERATION = "UnsupportedOperation"
+func (c *Client) DescribeImageFromFamilyWithContext(ctx context.Context, request *DescribeImageFromFamilyRequest) (response *DescribeImageFromFamilyResponse, err error) {
+ if request == nil {
+ request = NewDescribeImageFromFamilyRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("DescribeImageFromFamily require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewDescribeImageFromFamilyResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewDescribeImageQuotaRequest() (request *DescribeImageQuotaRequest) {
+ request = &DescribeImageQuotaRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("cvm", APIVersion, "DescribeImageQuota")
+
+
+ return
+}
+
+func NewDescribeImageQuotaResponse() (response *DescribeImageQuotaResponse) {
+ response = &DescribeImageQuotaResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// DescribeImageQuota
+// This API is used to query the image quota of an user account.
+//
+// error code that may be returned:
+// FAILEDOPERATION_TAGKEYRESERVED = "FailedOperation.TagKeyReserved"
+// INVALIDFILTER = "InvalidFilter"
+// INVALIDFILTERVALUE_LIMITEXCEEDED = "InvalidFilterValue.LimitExceeded"
+// INVALIDHOSTID_MALFORMED = "InvalidHostId.Malformed"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDZONE_MISMATCHREGION = "InvalidZone.MismatchRegion"
+// UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
+// UNSUPPORTEDOPERATION = "UnsupportedOperation"
+func (c *Client) DescribeImageQuota(request *DescribeImageQuotaRequest) (response *DescribeImageQuotaResponse, err error) {
+ return c.DescribeImageQuotaWithContext(context.Background(), request)
+}
+
+// DescribeImageQuota
+// This API is used to query the image quota of an user account.
+//
+// error code that may be returned:
+// FAILEDOPERATION_TAGKEYRESERVED = "FailedOperation.TagKeyReserved"
+// INVALIDFILTER = "InvalidFilter"
+// INVALIDFILTERVALUE_LIMITEXCEEDED = "InvalidFilterValue.LimitExceeded"
+// INVALIDHOSTID_MALFORMED = "InvalidHostId.Malformed"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDZONE_MISMATCHREGION = "InvalidZone.MismatchRegion"
+// UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
+// UNSUPPORTEDOPERATION = "UnsupportedOperation"
+func (c *Client) DescribeImageQuotaWithContext(ctx context.Context, request *DescribeImageQuotaRequest) (response *DescribeImageQuotaResponse, err error) {
+ if request == nil {
+ request = NewDescribeImageQuotaRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("DescribeImageQuota require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewDescribeImageQuotaResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewDescribeImageSharePermissionRequest() (request *DescribeImageSharePermissionRequest) {
+ request = &DescribeImageSharePermissionRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("cvm", APIVersion, "DescribeImageSharePermission")
+
+
+ return
+}
+
+func NewDescribeImageSharePermissionResponse() (response *DescribeImageSharePermissionResponse) {
+ response = &DescribeImageSharePermissionResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// DescribeImageSharePermission
+// This API is used to query image sharing information.
+//
+// error code that may be returned:
+// INVALIDACCOUNTID_NOTFOUND = "InvalidAccountId.NotFound"
+// INVALIDACCOUNTIS_YOURSELF = "InvalidAccountIs.YourSelf"
+// INVALIDIMAGEID_MALFORMED = "InvalidImageId.Malformed"
+// INVALIDIMAGEID_NOTFOUND = "InvalidImageId.NotFound"
+// INVALIDPARAMETERVALUE_INVALIDAPPIDFORMAT = "InvalidParameterValue.InvalidAppIdFormat"
+// OVERQUOTA = "OverQuota"
+// UNAUTHORIZEDOPERATION_IMAGENOTBELONGTOACCOUNT = "UnauthorizedOperation.ImageNotBelongToAccount"
+func (c *Client) DescribeImageSharePermission(request *DescribeImageSharePermissionRequest) (response *DescribeImageSharePermissionResponse, err error) {
+ return c.DescribeImageSharePermissionWithContext(context.Background(), request)
+}
+
+// DescribeImageSharePermission
+// This API is used to query image sharing information.
+//
+// error code that may be returned:
+// INVALIDACCOUNTID_NOTFOUND = "InvalidAccountId.NotFound"
+// INVALIDACCOUNTIS_YOURSELF = "InvalidAccountIs.YourSelf"
+// INVALIDIMAGEID_MALFORMED = "InvalidImageId.Malformed"
+// INVALIDIMAGEID_NOTFOUND = "InvalidImageId.NotFound"
+// INVALIDPARAMETERVALUE_INVALIDAPPIDFORMAT = "InvalidParameterValue.InvalidAppIdFormat"
+// OVERQUOTA = "OverQuota"
+// UNAUTHORIZEDOPERATION_IMAGENOTBELONGTOACCOUNT = "UnauthorizedOperation.ImageNotBelongToAccount"
+func (c *Client) DescribeImageSharePermissionWithContext(ctx context.Context, request *DescribeImageSharePermissionRequest) (response *DescribeImageSharePermissionResponse, err error) {
+ if request == nil {
+ request = NewDescribeImageSharePermissionRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("DescribeImageSharePermission require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewDescribeImageSharePermissionResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewDescribeImagesRequest() (request *DescribeImagesRequest) {
+ request = &DescribeImagesRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("cvm", APIVersion, "DescribeImages")
+
+
+ return
+}
+
+func NewDescribeImagesResponse() (response *DescribeImagesResponse) {
+ response = &DescribeImagesResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// DescribeImages
+// This API is used to view the list of images.
+//
+//
+//
+// * You specify the image ID or set filters to query the details of certain images.
+//
+// * You can specify `Offset` and `Limit` to select a certain part of the results. By default, the information on the first 20 matching results is returned.
+//
+// error code that may be returned:
+// FAILEDOPERATION_ILLEGALTAGKEY = "FailedOperation.IllegalTagKey"
+// INVALIDFILTER = "InvalidFilter"
+// INVALIDFILTERVALUE_LIMITEXCEEDED = "InvalidFilterValue.LimitExceeded"
+// INVALIDIMAGEID_MALFORMED = "InvalidImageId.Malformed"
+// INVALIDINSTANCETYPE_MALFORMED = "InvalidInstanceType.Malformed"
+// INVALIDPARAMETER_INVALIDPARAMETERCOEXISTIMAGEIDSFILTERS = "InvalidParameter.InvalidParameterCoexistImageIdsFilters"
+// INVALIDPARAMETERVALUE_INSTANCETYPENOTFOUND = "InvalidParameterValue.InstanceTypeNotFound"
+// INVALIDPARAMETERVALUE_INVALIDAPPIDFORMAT = "InvalidParameterValue.InvalidAppIdFormat"
+// INVALIDPARAMETERVALUE_INVALIDPARAMETERVALUELIMIT = "InvalidParameterValue.InvalidParameterValueLimit"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// INVALIDPARAMETERVALUE_TAGKEYNOTFOUND = "InvalidParameterValue.TagKeyNotFound"
+// INVALIDPARAMETERVALUE_ZONENOTSUPPORTED = "InvalidParameterValue.ZoneNotSupported"
+// INVALIDREGION_NOTFOUND = "InvalidRegion.NotFound"
+// INVALIDZONE_MISMATCHREGION = "InvalidZone.MismatchRegion"
+// RESOURCESSOLDOUT_SPECIFIEDINSTANCETYPE = "ResourcesSoldOut.SpecifiedInstanceType"
+// UNAUTHORIZEDOPERATION_INVALIDTOKEN = "UnauthorizedOperation.InvalidToken"
+// UNAUTHORIZEDOPERATION_PERMISSIONDENIED = "UnauthorizedOperation.PermissionDenied"
+// UNSUPPORTEDOPERATION = "UnsupportedOperation"
+func (c *Client) DescribeImages(request *DescribeImagesRequest) (response *DescribeImagesResponse, err error) {
+ return c.DescribeImagesWithContext(context.Background(), request)
+}
+
+// DescribeImages
+// This API is used to view the list of images.
+//
+//
+//
+// * You specify the image ID or set filters to query the details of certain images.
+//
+// * You can specify `Offset` and `Limit` to select a certain part of the results. By default, the information on the first 20 matching results is returned.
+//
+// error code that may be returned:
+// FAILEDOPERATION_ILLEGALTAGKEY = "FailedOperation.IllegalTagKey"
+// INVALIDFILTER = "InvalidFilter"
+// INVALIDFILTERVALUE_LIMITEXCEEDED = "InvalidFilterValue.LimitExceeded"
+// INVALIDIMAGEID_MALFORMED = "InvalidImageId.Malformed"
+// INVALIDINSTANCETYPE_MALFORMED = "InvalidInstanceType.Malformed"
+// INVALIDPARAMETER_INVALIDPARAMETERCOEXISTIMAGEIDSFILTERS = "InvalidParameter.InvalidParameterCoexistImageIdsFilters"
+// INVALIDPARAMETERVALUE_INSTANCETYPENOTFOUND = "InvalidParameterValue.InstanceTypeNotFound"
+// INVALIDPARAMETERVALUE_INVALIDAPPIDFORMAT = "InvalidParameterValue.InvalidAppIdFormat"
+// INVALIDPARAMETERVALUE_INVALIDPARAMETERVALUELIMIT = "InvalidParameterValue.InvalidParameterValueLimit"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// INVALIDPARAMETERVALUE_TAGKEYNOTFOUND = "InvalidParameterValue.TagKeyNotFound"
+// INVALIDPARAMETERVALUE_ZONENOTSUPPORTED = "InvalidParameterValue.ZoneNotSupported"
+// INVALIDREGION_NOTFOUND = "InvalidRegion.NotFound"
+// INVALIDZONE_MISMATCHREGION = "InvalidZone.MismatchRegion"
+// RESOURCESSOLDOUT_SPECIFIEDINSTANCETYPE = "ResourcesSoldOut.SpecifiedInstanceType"
+// UNAUTHORIZEDOPERATION_INVALIDTOKEN = "UnauthorizedOperation.InvalidToken"
+// UNAUTHORIZEDOPERATION_PERMISSIONDENIED = "UnauthorizedOperation.PermissionDenied"
+// UNSUPPORTEDOPERATION = "UnsupportedOperation"
+func (c *Client) DescribeImagesWithContext(ctx context.Context, request *DescribeImagesRequest) (response *DescribeImagesResponse, err error) {
+ if request == nil {
+ request = NewDescribeImagesRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("DescribeImages require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewDescribeImagesResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewDescribeImportImageOsRequest() (request *DescribeImportImageOsRequest) {
+ request = &DescribeImportImageOsRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("cvm", APIVersion, "DescribeImportImageOs")
+
+
+ return
+}
+
+func NewDescribeImportImageOsResponse() (response *DescribeImportImageOsResponse) {
+ response = &DescribeImportImageOsResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// DescribeImportImageOs
+// This API is used to query the list of supported operating systems of imported images.
+//
+// error code that may be returned:
+// FAILEDOPERATION_ILLEGALTAGKEY = "FailedOperation.IllegalTagKey"
+// INVALIDFILTER = "InvalidFilter"
+// INVALIDFILTERVALUE_LIMITEXCEEDED = "InvalidFilterValue.LimitExceeded"
+// INVALIDIMAGEID_MALFORMED = "InvalidImageId.Malformed"
+// INVALIDINSTANCETYPE_MALFORMED = "InvalidInstanceType.Malformed"
+// INVALIDPARAMETER_INVALIDPARAMETERCOEXISTIMAGEIDSFILTERS = "InvalidParameter.InvalidParameterCoexistImageIdsFilters"
+// INVALIDPARAMETERVALUE_INSTANCETYPENOTFOUND = "InvalidParameterValue.InstanceTypeNotFound"
+// INVALIDPARAMETERVALUE_INVALIDAPPIDFORMAT = "InvalidParameterValue.InvalidAppIdFormat"
+// INVALIDPARAMETERVALUE_INVALIDPARAMETERVALUELIMIT = "InvalidParameterValue.InvalidParameterValueLimit"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// INVALIDPARAMETERVALUE_TAGKEYNOTFOUND = "InvalidParameterValue.TagKeyNotFound"
+// INVALIDPARAMETERVALUE_ZONENOTSUPPORTED = "InvalidParameterValue.ZoneNotSupported"
+// INVALIDREGION_NOTFOUND = "InvalidRegion.NotFound"
+// INVALIDZONE_MISMATCHREGION = "InvalidZone.MismatchRegion"
+// RESOURCESSOLDOUT_SPECIFIEDINSTANCETYPE = "ResourcesSoldOut.SpecifiedInstanceType"
+// UNAUTHORIZEDOPERATION_INVALIDTOKEN = "UnauthorizedOperation.InvalidToken"
+// UNAUTHORIZEDOPERATION_PERMISSIONDENIED = "UnauthorizedOperation.PermissionDenied"
+// UNSUPPORTEDOPERATION = "UnsupportedOperation"
+func (c *Client) DescribeImportImageOs(request *DescribeImportImageOsRequest) (response *DescribeImportImageOsResponse, err error) {
+ return c.DescribeImportImageOsWithContext(context.Background(), request)
+}
+
+// DescribeImportImageOs
+// This API is used to query the list of supported operating systems of imported images.
+//
+// error code that may be returned:
+// FAILEDOPERATION_ILLEGALTAGKEY = "FailedOperation.IllegalTagKey"
+// INVALIDFILTER = "InvalidFilter"
+// INVALIDFILTERVALUE_LIMITEXCEEDED = "InvalidFilterValue.LimitExceeded"
+// INVALIDIMAGEID_MALFORMED = "InvalidImageId.Malformed"
+// INVALIDINSTANCETYPE_MALFORMED = "InvalidInstanceType.Malformed"
+// INVALIDPARAMETER_INVALIDPARAMETERCOEXISTIMAGEIDSFILTERS = "InvalidParameter.InvalidParameterCoexistImageIdsFilters"
+// INVALIDPARAMETERVALUE_INSTANCETYPENOTFOUND = "InvalidParameterValue.InstanceTypeNotFound"
+// INVALIDPARAMETERVALUE_INVALIDAPPIDFORMAT = "InvalidParameterValue.InvalidAppIdFormat"
+// INVALIDPARAMETERVALUE_INVALIDPARAMETERVALUELIMIT = "InvalidParameterValue.InvalidParameterValueLimit"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// INVALIDPARAMETERVALUE_TAGKEYNOTFOUND = "InvalidParameterValue.TagKeyNotFound"
+// INVALIDPARAMETERVALUE_ZONENOTSUPPORTED = "InvalidParameterValue.ZoneNotSupported"
+// INVALIDREGION_NOTFOUND = "InvalidRegion.NotFound"
+// INVALIDZONE_MISMATCHREGION = "InvalidZone.MismatchRegion"
+// RESOURCESSOLDOUT_SPECIFIEDINSTANCETYPE = "ResourcesSoldOut.SpecifiedInstanceType"
+// UNAUTHORIZEDOPERATION_INVALIDTOKEN = "UnauthorizedOperation.InvalidToken"
+// UNAUTHORIZEDOPERATION_PERMISSIONDENIED = "UnauthorizedOperation.PermissionDenied"
+// UNSUPPORTEDOPERATION = "UnsupportedOperation"
+func (c *Client) DescribeImportImageOsWithContext(ctx context.Context, request *DescribeImportImageOsRequest) (response *DescribeImportImageOsResponse, err error) {
+ if request == nil {
+ request = NewDescribeImportImageOsRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("DescribeImportImageOs require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewDescribeImportImageOsResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewDescribeInstanceFamilyConfigsRequest() (request *DescribeInstanceFamilyConfigsRequest) {
+ request = &DescribeInstanceFamilyConfigsRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("cvm", APIVersion, "DescribeInstanceFamilyConfigs")
+
+
+ return
+}
+
+func NewDescribeInstanceFamilyConfigsResponse() (response *DescribeInstanceFamilyConfigsResponse) {
+ response = &DescribeInstanceFamilyConfigsResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// DescribeInstanceFamilyConfigs
+// This API is used to query a list of model families available to the current user in the current region.
+//
+// error code that may be returned:
+// INTERNALSERVERERROR = "InternalServerError"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDREGION_NOTFOUND = "InvalidRegion.NotFound"
+func (c *Client) DescribeInstanceFamilyConfigs(request *DescribeInstanceFamilyConfigsRequest) (response *DescribeInstanceFamilyConfigsResponse, err error) {
+ return c.DescribeInstanceFamilyConfigsWithContext(context.Background(), request)
+}
+
+// DescribeInstanceFamilyConfigs
+// This API is used to query a list of model families available to the current user in the current region.
+//
+// error code that may be returned:
+// INTERNALSERVERERROR = "InternalServerError"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDREGION_NOTFOUND = "InvalidRegion.NotFound"
+func (c *Client) DescribeInstanceFamilyConfigsWithContext(ctx context.Context, request *DescribeInstanceFamilyConfigsRequest) (response *DescribeInstanceFamilyConfigsResponse, err error) {
+ if request == nil {
+ request = NewDescribeInstanceFamilyConfigsRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("DescribeInstanceFamilyConfigs require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewDescribeInstanceFamilyConfigsResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewDescribeInstancesRequest() (request *DescribeInstancesRequest) {
+ request = &DescribeInstancesRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("cvm", APIVersion, "DescribeInstances")
+
+
+ return
+}
+
+func NewDescribeInstancesResponse() (response *DescribeInstancesResponse) {
+ response = &DescribeInstancesResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// DescribeInstances
+// This API is used to query the details of instances.
+//
+//
+//
+// * You can filter the query results with the instance `ID`, name, or billing method. See `Filter` for more information.
+//
+// * If no parameter is defined, a certain number of instances under the current account will be returned. The number is specified by `Limit` and is 20 by default.
+//
+// error code that may be returned:
+// FAILEDOPERATION_ILLEGALTAGKEY = "FailedOperation.IllegalTagKey"
+// FAILEDOPERATION_ILLEGALTAGVALUE = "FailedOperation.IllegalTagValue"
+// FAILEDOPERATION_TAGKEYRESERVED = "FailedOperation.TagKeyReserved"
+// INTERNALSERVERERROR = "InternalServerError"
+// INVALIDFILTER = "InvalidFilter"
+// INVALIDFILTERVALUE_LIMITEXCEEDED = "InvalidFilterValue.LimitExceeded"
+// INVALIDHOSTID_MALFORMED = "InvalidHostId.Malformed"
+// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed"
+// INVALIDPARAMETER = "InvalidParameter"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPARAMETERVALUE_IPADDRESSMALFORMED = "InvalidParameterValue.IPAddressMalformed"
+// INVALIDPARAMETERVALUE_IPV6ADDRESSMALFORMED = "InvalidParameterValue.IPv6AddressMalformed"
+// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed"
+// INVALIDPARAMETERVALUE_INVALIDAPPIDFORMAT = "InvalidParameterValue.InvalidAppIdFormat"
+// INVALIDPARAMETERVALUE_INVALIDIPFORMAT = "InvalidParameterValue.InvalidIpFormat"
+// INVALIDPARAMETERVALUE_INVALIDTIMEFORMAT = "InvalidParameterValue.InvalidTimeFormat"
+// INVALIDPARAMETERVALUE_INVALIDVAGUENAME = "InvalidParameterValue.InvalidVagueName"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// INVALIDPARAMETERVALUE_SUBNETIDMALFORMED = "InvalidParameterValue.SubnetIdMalformed"
+// INVALIDPARAMETERVALUE_TAGKEYNOTFOUND = "InvalidParameterValue.TagKeyNotFound"
+// INVALIDPARAMETERVALUE_UUIDMALFORMED = "InvalidParameterValue.UuidMalformed"
+// INVALIDPARAMETERVALUE_VPCIDMALFORMED = "InvalidParameterValue.VpcIdMalformed"
+// INVALIDSECURITYGROUPID_NOTFOUND = "InvalidSecurityGroupId.NotFound"
+// INVALIDSGID_MALFORMED = "InvalidSgId.Malformed"
+// INVALIDZONE_MISMATCHREGION = "InvalidZone.MismatchRegion"
+// RESOURCENOTFOUND_HPCCLUSTER = "ResourceNotFound.HpcCluster"
+// UNAUTHORIZEDOPERATION_INVALIDTOKEN = "UnauthorizedOperation.InvalidToken"
+// UNSUPPORTEDOPERATION = "UnsupportedOperation"
+func (c *Client) DescribeInstances(request *DescribeInstancesRequest) (response *DescribeInstancesResponse, err error) {
+ return c.DescribeInstancesWithContext(context.Background(), request)
+}
+
+// DescribeInstances
+// This API is used to query the details of instances.
+//
+//
+//
+// * You can filter the query results with the instance `ID`, name, or billing method. See `Filter` for more information.
+//
+// * If no parameter is defined, a certain number of instances under the current account will be returned. The number is specified by `Limit` and is 20 by default.
+//
+// error code that may be returned:
+// FAILEDOPERATION_ILLEGALTAGKEY = "FailedOperation.IllegalTagKey"
+// FAILEDOPERATION_ILLEGALTAGVALUE = "FailedOperation.IllegalTagValue"
+// FAILEDOPERATION_TAGKEYRESERVED = "FailedOperation.TagKeyReserved"
+// INTERNALSERVERERROR = "InternalServerError"
+// INVALIDFILTER = "InvalidFilter"
+// INVALIDFILTERVALUE_LIMITEXCEEDED = "InvalidFilterValue.LimitExceeded"
+// INVALIDHOSTID_MALFORMED = "InvalidHostId.Malformed"
+// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed"
+// INVALIDPARAMETER = "InvalidParameter"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPARAMETERVALUE_IPADDRESSMALFORMED = "InvalidParameterValue.IPAddressMalformed"
+// INVALIDPARAMETERVALUE_IPV6ADDRESSMALFORMED = "InvalidParameterValue.IPv6AddressMalformed"
+// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed"
+// INVALIDPARAMETERVALUE_INVALIDAPPIDFORMAT = "InvalidParameterValue.InvalidAppIdFormat"
+// INVALIDPARAMETERVALUE_INVALIDIPFORMAT = "InvalidParameterValue.InvalidIpFormat"
+// INVALIDPARAMETERVALUE_INVALIDTIMEFORMAT = "InvalidParameterValue.InvalidTimeFormat"
+// INVALIDPARAMETERVALUE_INVALIDVAGUENAME = "InvalidParameterValue.InvalidVagueName"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// INVALIDPARAMETERVALUE_SUBNETIDMALFORMED = "InvalidParameterValue.SubnetIdMalformed"
+// INVALIDPARAMETERVALUE_TAGKEYNOTFOUND = "InvalidParameterValue.TagKeyNotFound"
+// INVALIDPARAMETERVALUE_UUIDMALFORMED = "InvalidParameterValue.UuidMalformed"
+// INVALIDPARAMETERVALUE_VPCIDMALFORMED = "InvalidParameterValue.VpcIdMalformed"
+// INVALIDSECURITYGROUPID_NOTFOUND = "InvalidSecurityGroupId.NotFound"
+// INVALIDSGID_MALFORMED = "InvalidSgId.Malformed"
+// INVALIDZONE_MISMATCHREGION = "InvalidZone.MismatchRegion"
+// RESOURCENOTFOUND_HPCCLUSTER = "ResourceNotFound.HpcCluster"
+// UNAUTHORIZEDOPERATION_INVALIDTOKEN = "UnauthorizedOperation.InvalidToken"
+// UNSUPPORTEDOPERATION = "UnsupportedOperation"
+func (c *Client) DescribeInstancesWithContext(ctx context.Context, request *DescribeInstancesRequest) (response *DescribeInstancesResponse, err error) {
+ if request == nil {
+ request = NewDescribeInstancesRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("DescribeInstances require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewDescribeInstancesResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewDescribeInstancesOperationLimitRequest() (request *DescribeInstancesOperationLimitRequest) {
+ request = &DescribeInstancesOperationLimitRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("cvm", APIVersion, "DescribeInstancesOperationLimit")
+
+
+ return
+}
+
+func NewDescribeInstancesOperationLimitResponse() (response *DescribeInstancesOperationLimitResponse) {
+ response = &DescribeInstancesOperationLimitResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// DescribeInstancesOperationLimit
+// This API is used to query limitations on operations on an instance.
+//
+//
+//
+// * Currently you can use this API to query the maximum number of times you can modify the configuration of an instance.
+//
+// error code that may be returned:
+// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed"
+// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound"
+// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+func (c *Client) DescribeInstancesOperationLimit(request *DescribeInstancesOperationLimitRequest) (response *DescribeInstancesOperationLimitResponse, err error) {
+ return c.DescribeInstancesOperationLimitWithContext(context.Background(), request)
+}
+
+// DescribeInstancesOperationLimit
+// This API is used to query limitations on operations on an instance.
+//
+//
+//
+// * Currently you can use this API to query the maximum number of times you can modify the configuration of an instance.
+//
+// error code that may be returned:
+// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed"
+// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound"
+// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+func (c *Client) DescribeInstancesOperationLimitWithContext(ctx context.Context, request *DescribeInstancesOperationLimitRequest) (response *DescribeInstancesOperationLimitResponse, err error) {
+ if request == nil {
+ request = NewDescribeInstancesOperationLimitRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("DescribeInstancesOperationLimit require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewDescribeInstancesOperationLimitResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewDescribeInstancesStatusRequest() (request *DescribeInstancesStatusRequest) {
+ request = &DescribeInstancesStatusRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("cvm", APIVersion, "DescribeInstancesStatus")
+
+
+ return
+}
+
+func NewDescribeInstancesStatusResponse() (response *DescribeInstancesStatusResponse) {
+ response = &DescribeInstancesStatusResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// DescribeInstancesStatus
+// This API is used to query the status of instances.
+//
+//
+//
+// * You can query the status of an instance with its `ID`.
+//
+// * If no parameter is defined, the status of a certain number of instances under the current account will be returned. The number is specified by `Limit` and is 20 by default.
+//
+// error code that may be returned:
+// INTERNALSERVERERROR = "InternalServerError"
+// INVALIDFILTER = "InvalidFilter"
+// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// UNAUTHORIZEDOPERATION_INVALIDTOKEN = "UnauthorizedOperation.InvalidToken"
+// UNSUPPORTEDOPERATION = "UnsupportedOperation"
+func (c *Client) DescribeInstancesStatus(request *DescribeInstancesStatusRequest) (response *DescribeInstancesStatusResponse, err error) {
+ return c.DescribeInstancesStatusWithContext(context.Background(), request)
+}
+
+// DescribeInstancesStatus
+// This API is used to query the status of instances.
+//
+//
+//
+// * You can query the status of an instance with its `ID`.
+//
+// * If no parameter is defined, the status of a certain number of instances under the current account will be returned. The number is specified by `Limit` and is 20 by default.
+//
+// error code that may be returned:
+// INTERNALSERVERERROR = "InternalServerError"
+// INVALIDFILTER = "InvalidFilter"
+// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// UNAUTHORIZEDOPERATION_INVALIDTOKEN = "UnauthorizedOperation.InvalidToken"
+// UNSUPPORTEDOPERATION = "UnsupportedOperation"
+func (c *Client) DescribeInstancesStatusWithContext(ctx context.Context, request *DescribeInstancesStatusRequest) (response *DescribeInstancesStatusResponse, err error) {
+ if request == nil {
+ request = NewDescribeInstancesStatusRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("DescribeInstancesStatus require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewDescribeInstancesStatusResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewDescribeInternetChargeTypeConfigsRequest() (request *DescribeInternetChargeTypeConfigsRequest) {
+ request = &DescribeInternetChargeTypeConfigsRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("cvm", APIVersion, "DescribeInternetChargeTypeConfigs")
+
+
+ return
+}
+
+func NewDescribeInternetChargeTypeConfigsResponse() (response *DescribeInternetChargeTypeConfigsResponse) {
+ response = &DescribeInternetChargeTypeConfigsResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// DescribeInternetChargeTypeConfigs
+// This API is used to query the network billing methods.
+//
+// error code that may be returned:
+// INTERNALSERVERERROR = "InternalServerError"
+// INVALIDFILTER = "InvalidFilter"
+// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// UNAUTHORIZEDOPERATION_INVALIDTOKEN = "UnauthorizedOperation.InvalidToken"
+// UNSUPPORTEDOPERATION = "UnsupportedOperation"
+func (c *Client) DescribeInternetChargeTypeConfigs(request *DescribeInternetChargeTypeConfigsRequest) (response *DescribeInternetChargeTypeConfigsResponse, err error) {
+ return c.DescribeInternetChargeTypeConfigsWithContext(context.Background(), request)
+}
+
+// DescribeInternetChargeTypeConfigs
+// This API is used to query the network billing methods.
+//
+// error code that may be returned:
+// INTERNALSERVERERROR = "InternalServerError"
+// INVALIDFILTER = "InvalidFilter"
+// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// UNAUTHORIZEDOPERATION_INVALIDTOKEN = "UnauthorizedOperation.InvalidToken"
+// UNSUPPORTEDOPERATION = "UnsupportedOperation"
+func (c *Client) DescribeInternetChargeTypeConfigsWithContext(ctx context.Context, request *DescribeInternetChargeTypeConfigsRequest) (response *DescribeInternetChargeTypeConfigsResponse, err error) {
+ if request == nil {
+ request = NewDescribeInternetChargeTypeConfigsRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("DescribeInternetChargeTypeConfigs require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewDescribeInternetChargeTypeConfigsResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewDescribeKeyPairsRequest() (request *DescribeKeyPairsRequest) {
+ request = &DescribeKeyPairsRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("cvm", APIVersion, "DescribeKeyPairs")
+
+
+ return
+}
+
+func NewDescribeKeyPairsResponse() (response *DescribeKeyPairsResponse) {
+ response = &DescribeKeyPairsResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// DescribeKeyPairs
+// This API is used to query key pairs.
+//
+//
+//
+// * A key pair is a pair of keys generated by an algorithm in which the public key is available to the public and the private key is available only to the user. You can use this API to query the public key but not the private key.
+//
+// error code that may be returned:
+// INTERNALSERVERERROR = "InternalServerError"
+// INVALIDFILTER = "InvalidFilter"
+// INVALIDFILTERVALUE_LIMITEXCEEDED = "InvalidFilterValue.LimitExceeded"
+// INVALIDKEYPAIR_LIMITEXCEEDED = "InvalidKeyPair.LimitExceeded"
+// INVALIDKEYPAIRID_MALFORMED = "InvalidKeyPairId.Malformed"
+// INVALIDPARAMETER = "InvalidParameter"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// INVALIDPARAMETERVALUELIMIT = "InvalidParameterValueLimit"
+// INVALIDPARAMETERVALUEOFFSET = "InvalidParameterValueOffset"
+// UNAUTHORIZEDOPERATION_INVALIDTOKEN = "UnauthorizedOperation.InvalidToken"
+// UNSUPPORTEDOPERATION = "UnsupportedOperation"
+func (c *Client) DescribeKeyPairs(request *DescribeKeyPairsRequest) (response *DescribeKeyPairsResponse, err error) {
+ return c.DescribeKeyPairsWithContext(context.Background(), request)
+}
+
+// DescribeKeyPairs
+// This API is used to query key pairs.
+//
+//
+//
+// * A key pair is a pair of keys generated by an algorithm in which the public key is available to the public and the private key is available only to the user. You can use this API to query the public key but not the private key.
+//
+// error code that may be returned:
+// INTERNALSERVERERROR = "InternalServerError"
+// INVALIDFILTER = "InvalidFilter"
+// INVALIDFILTERVALUE_LIMITEXCEEDED = "InvalidFilterValue.LimitExceeded"
+// INVALIDKEYPAIR_LIMITEXCEEDED = "InvalidKeyPair.LimitExceeded"
+// INVALIDKEYPAIRID_MALFORMED = "InvalidKeyPairId.Malformed"
+// INVALIDPARAMETER = "InvalidParameter"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// INVALIDPARAMETERVALUELIMIT = "InvalidParameterValueLimit"
+// INVALIDPARAMETERVALUEOFFSET = "InvalidParameterValueOffset"
+// UNAUTHORIZEDOPERATION_INVALIDTOKEN = "UnauthorizedOperation.InvalidToken"
+// UNSUPPORTEDOPERATION = "UnsupportedOperation"
+func (c *Client) DescribeKeyPairsWithContext(ctx context.Context, request *DescribeKeyPairsRequest) (response *DescribeKeyPairsResponse, err error) {
+ if request == nil {
+ request = NewDescribeKeyPairsRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("DescribeKeyPairs require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewDescribeKeyPairsResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewDescribeLaunchTemplateVersionsRequest() (request *DescribeLaunchTemplateVersionsRequest) {
+ request = &DescribeLaunchTemplateVersionsRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("cvm", APIVersion, "DescribeLaunchTemplateVersions")
+
+
+ return
+}
+
+func NewDescribeLaunchTemplateVersionsResponse() (response *DescribeLaunchTemplateVersionsResponse) {
+ response = &DescribeLaunchTemplateVersionsResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// DescribeLaunchTemplateVersions
+// This API is used to query the information of instance launch template versions.
+//
+// error code that may be returned:
+// INTERNALERROR = "InternalError"
+// INTERNALSERVERERROR = "InternalServerError"
+// INVALIDPARAMETER = "InvalidParameter"
+// INVALIDPARAMETERCOMBINATION = "InvalidParameterCombination"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDMALFORMED = "InvalidParameterValue.LaunchTemplateIdMalformed"
+// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDNOTEXISTED = "InvalidParameterValue.LaunchTemplateIdNotExisted"
+// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDVERNOTEXISTED = "InvalidParameterValue.LaunchTemplateIdVerNotExisted"
+// INVALIDPARAMETERVALUE_LAUNCHTEMPLATENOTFOUND = "InvalidParameterValue.LaunchTemplateNotFound"
+// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEVERSION = "InvalidParameterValue.LaunchTemplateVersion"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// INVALIDPARAMETERVALUE_NOTSUPPORTED = "InvalidParameterValue.NotSupported"
+// MISSINGPARAMETER = "MissingParameter"
+// UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
+// UNAUTHORIZEDOPERATION_MFAEXPIRED = "UnauthorizedOperation.MFAExpired"
+// UNAUTHORIZEDOPERATION_MFANOTFOUND = "UnauthorizedOperation.MFANotFound"
+// UNKNOWNPARAMETER = "UnknownParameter"
+// UNSUPPORTEDOPERATION = "UnsupportedOperation"
+func (c *Client) DescribeLaunchTemplateVersions(request *DescribeLaunchTemplateVersionsRequest) (response *DescribeLaunchTemplateVersionsResponse, err error) {
+ return c.DescribeLaunchTemplateVersionsWithContext(context.Background(), request)
+}
+
+// DescribeLaunchTemplateVersions
+// This API is used to query the information of instance launch template versions.
+//
+// error code that may be returned:
+// INTERNALERROR = "InternalError"
+// INTERNALSERVERERROR = "InternalServerError"
+// INVALIDPARAMETER = "InvalidParameter"
+// INVALIDPARAMETERCOMBINATION = "InvalidParameterCombination"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDMALFORMED = "InvalidParameterValue.LaunchTemplateIdMalformed"
+// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDNOTEXISTED = "InvalidParameterValue.LaunchTemplateIdNotExisted"
+// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDVERNOTEXISTED = "InvalidParameterValue.LaunchTemplateIdVerNotExisted"
+// INVALIDPARAMETERVALUE_LAUNCHTEMPLATENOTFOUND = "InvalidParameterValue.LaunchTemplateNotFound"
+// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEVERSION = "InvalidParameterValue.LaunchTemplateVersion"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// INVALIDPARAMETERVALUE_NOTSUPPORTED = "InvalidParameterValue.NotSupported"
+// MISSINGPARAMETER = "MissingParameter"
+// UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
+// UNAUTHORIZEDOPERATION_MFAEXPIRED = "UnauthorizedOperation.MFAExpired"
+// UNAUTHORIZEDOPERATION_MFANOTFOUND = "UnauthorizedOperation.MFANotFound"
+// UNKNOWNPARAMETER = "UnknownParameter"
+// UNSUPPORTEDOPERATION = "UnsupportedOperation"
+func (c *Client) DescribeLaunchTemplateVersionsWithContext(ctx context.Context, request *DescribeLaunchTemplateVersionsRequest) (response *DescribeLaunchTemplateVersionsResponse, err error) {
+ if request == nil {
+ request = NewDescribeLaunchTemplateVersionsRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("DescribeLaunchTemplateVersions require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewDescribeLaunchTemplateVersionsResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewDescribeLaunchTemplatesRequest() (request *DescribeLaunchTemplatesRequest) {
+ request = &DescribeLaunchTemplatesRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("cvm", APIVersion, "DescribeLaunchTemplates")
+
+
+ return
+}
+
+func NewDescribeLaunchTemplatesResponse() (response *DescribeLaunchTemplatesResponse) {
+ response = &DescribeLaunchTemplatesResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// DescribeLaunchTemplates
+// This API is used to query one or more instance launch templates.
+//
+// error code that may be returned:
+// INVALIDFILTER = "InvalidFilter"
+// INVALIDFILTERVALUE_LIMITEXCEEDED = "InvalidFilterValue.LimitExceeded"
+// INVALIDPARAMETER = "InvalidParameter"
+// INVALIDPARAMETERVALUE_INVALIDLAUNCHTEMPLATENAME = "InvalidParameterValue.InvalidLaunchTemplateName"
+// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDMALFORMED = "InvalidParameterValue.LaunchTemplateIdMalformed"
+// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDNOTEXISTED = "InvalidParameterValue.LaunchTemplateIdNotExisted"
+// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDVERNOTEXISTED = "InvalidParameterValue.LaunchTemplateIdVerNotExisted"
+// INVALIDPARAMETERVALUE_LAUNCHTEMPLATENOTFOUND = "InvalidParameterValue.LaunchTemplateNotFound"
+// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEVERSION = "InvalidParameterValue.LaunchTemplateVersion"
+// UNKNOWNPARAMETER = "UnknownParameter"
+// UNSUPPORTEDOPERATION = "UnsupportedOperation"
+func (c *Client) DescribeLaunchTemplates(request *DescribeLaunchTemplatesRequest) (response *DescribeLaunchTemplatesResponse, err error) {
+ return c.DescribeLaunchTemplatesWithContext(context.Background(), request)
+}
+
+// DescribeLaunchTemplates
+// This API is used to query one or more instance launch templates.
+//
+// error code that may be returned:
+// INVALIDFILTER = "InvalidFilter"
+// INVALIDFILTERVALUE_LIMITEXCEEDED = "InvalidFilterValue.LimitExceeded"
+// INVALIDPARAMETER = "InvalidParameter"
+// INVALIDPARAMETERVALUE_INVALIDLAUNCHTEMPLATENAME = "InvalidParameterValue.InvalidLaunchTemplateName"
+// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDMALFORMED = "InvalidParameterValue.LaunchTemplateIdMalformed"
+// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDNOTEXISTED = "InvalidParameterValue.LaunchTemplateIdNotExisted"
+// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDVERNOTEXISTED = "InvalidParameterValue.LaunchTemplateIdVerNotExisted"
+// INVALIDPARAMETERVALUE_LAUNCHTEMPLATENOTFOUND = "InvalidParameterValue.LaunchTemplateNotFound"
+// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEVERSION = "InvalidParameterValue.LaunchTemplateVersion"
+// UNKNOWNPARAMETER = "UnknownParameter"
+// UNSUPPORTEDOPERATION = "UnsupportedOperation"
+func (c *Client) DescribeLaunchTemplatesWithContext(ctx context.Context, request *DescribeLaunchTemplatesRequest) (response *DescribeLaunchTemplatesResponse, err error) {
+ if request == nil {
+ request = NewDescribeLaunchTemplatesRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("DescribeLaunchTemplates require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewDescribeLaunchTemplatesResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewDescribeRegionsRequest() (request *DescribeRegionsRequest) {
+ request = &DescribeRegionsRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("cvm", APIVersion, "DescribeRegions")
+
+
+ return
+}
+
+func NewDescribeRegionsResponse() (response *DescribeRegionsResponse) {
+ response = &DescribeRegionsResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// DescribeRegions
+// This API is suspended. To query the information of regions, use [DescribeZones](https://intl.cloud.tencent.com/document/product/1596/77930?from_cn_redirect=1).
+//
+// error code that may be returned:
+// UNSUPPORTEDOPERATION = "UnsupportedOperation"
+func (c *Client) DescribeRegions(request *DescribeRegionsRequest) (response *DescribeRegionsResponse, err error) {
+ return c.DescribeRegionsWithContext(context.Background(), request)
+}
+
+// DescribeRegions
+// This API is suspended. To query the information of regions, use [DescribeZones](https://intl.cloud.tencent.com/document/product/1596/77930?from_cn_redirect=1).
+//
+// error code that may be returned:
+// UNSUPPORTEDOPERATION = "UnsupportedOperation"
+func (c *Client) DescribeRegionsWithContext(ctx context.Context, request *DescribeRegionsRequest) (response *DescribeRegionsResponse, err error) {
+ if request == nil {
+ request = NewDescribeRegionsRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("DescribeRegions require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewDescribeRegionsResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewDescribeReservedInstancesRequest() (request *DescribeReservedInstancesRequest) {
+ request = &DescribeReservedInstancesRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("cvm", APIVersion, "DescribeReservedInstances")
+
+
+ return
+}
+
+func NewDescribeReservedInstancesResponse() (response *DescribeReservedInstancesResponse) {
+ response = &DescribeReservedInstancesResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// DescribeReservedInstances
+// This API is used to list the reserved instances purchased by the user.
+//
+// error code that may be returned:
+// INTERNALSERVERERROR = "InternalServerError"
+// INVALIDFILTER = "InvalidFilter"
+// INVALIDFILTERVALUE_LIMITEXCEEDED = "InvalidFilterValue.LimitExceeded"
+// INVALIDINSTANCETYPE_MALFORMED = "InvalidInstanceType.Malformed"
+// INVALIDPARAMETER = "InvalidParameter"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// UNSUPPORTEDOPERATION_INVALIDPERMISSIONNONINTERNATIONALACCOUNT = "UnsupportedOperation.InvalidPermissionNonInternationalAccount"
+// UNSUPPORTEDOPERATION_RESERVEDINSTANCEINVISIBLEFORUSER = "UnsupportedOperation.ReservedInstanceInvisibleForUser"
+func (c *Client) DescribeReservedInstances(request *DescribeReservedInstancesRequest) (response *DescribeReservedInstancesResponse, err error) {
+ return c.DescribeReservedInstancesWithContext(context.Background(), request)
+}
+
+// DescribeReservedInstances
+// This API is used to list the reserved instances purchased by the user.
+//
+// error code that may be returned:
+// INTERNALSERVERERROR = "InternalServerError"
+// INVALIDFILTER = "InvalidFilter"
+// INVALIDFILTERVALUE_LIMITEXCEEDED = "InvalidFilterValue.LimitExceeded"
+// INVALIDINSTANCETYPE_MALFORMED = "InvalidInstanceType.Malformed"
+// INVALIDPARAMETER = "InvalidParameter"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// UNSUPPORTEDOPERATION_INVALIDPERMISSIONNONINTERNATIONALACCOUNT = "UnsupportedOperation.InvalidPermissionNonInternationalAccount"
+// UNSUPPORTEDOPERATION_RESERVEDINSTANCEINVISIBLEFORUSER = "UnsupportedOperation.ReservedInstanceInvisibleForUser"
+func (c *Client) DescribeReservedInstancesWithContext(ctx context.Context, request *DescribeReservedInstancesRequest) (response *DescribeReservedInstancesResponse, err error) {
+ if request == nil {
+ request = NewDescribeReservedInstancesRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("DescribeReservedInstances require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewDescribeReservedInstancesResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewDescribeReservedInstancesConfigInfosRequest() (request *DescribeReservedInstancesConfigInfosRequest) {
+ request = &DescribeReservedInstancesConfigInfosRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("cvm", APIVersion, "DescribeReservedInstancesConfigInfos")
+
+
+ return
+}
+
+func NewDescribeReservedInstancesConfigInfosResponse() (response *DescribeReservedInstancesConfigInfosResponse) {
+ response = &DescribeReservedInstancesConfigInfosResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// DescribeReservedInstancesConfigInfos
+// This API is used to describe reserved instance (RI) offerings.
+//
+// error code that may be returned:
+// INVALIDFILTER = "InvalidFilter"
+// INVALIDZONE_MISMATCHREGION = "InvalidZone.MismatchRegion"
+// UNSUPPORTEDOPERATION_INVALIDPERMISSIONNONINTERNATIONALACCOUNT = "UnsupportedOperation.InvalidPermissionNonInternationalAccount"
+// UNSUPPORTEDOPERATION_RESERVEDINSTANCEINVISIBLEFORUSER = "UnsupportedOperation.ReservedInstanceInvisibleForUser"
+func (c *Client) DescribeReservedInstancesConfigInfos(request *DescribeReservedInstancesConfigInfosRequest) (response *DescribeReservedInstancesConfigInfosResponse, err error) {
+ return c.DescribeReservedInstancesConfigInfosWithContext(context.Background(), request)
+}
+
+// DescribeReservedInstancesConfigInfos
+// This API is used to describe reserved instance (RI) offerings.
+//
+// error code that may be returned:
+// INVALIDFILTER = "InvalidFilter"
+// INVALIDZONE_MISMATCHREGION = "InvalidZone.MismatchRegion"
+// UNSUPPORTEDOPERATION_INVALIDPERMISSIONNONINTERNATIONALACCOUNT = "UnsupportedOperation.InvalidPermissionNonInternationalAccount"
+// UNSUPPORTEDOPERATION_RESERVEDINSTANCEINVISIBLEFORUSER = "UnsupportedOperation.ReservedInstanceInvisibleForUser"
+func (c *Client) DescribeReservedInstancesConfigInfosWithContext(ctx context.Context, request *DescribeReservedInstancesConfigInfosRequest) (response *DescribeReservedInstancesConfigInfosResponse, err error) {
+ if request == nil {
+ request = NewDescribeReservedInstancesConfigInfosRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("DescribeReservedInstancesConfigInfos require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewDescribeReservedInstancesConfigInfosResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewDescribeReservedInstancesOfferingsRequest() (request *DescribeReservedInstancesOfferingsRequest) {
+ request = &DescribeReservedInstancesOfferingsRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("cvm", APIVersion, "DescribeReservedInstancesOfferings")
+
+
+ return
+}
+
+func NewDescribeReservedInstancesOfferingsResponse() (response *DescribeReservedInstancesOfferingsResponse) {
+ response = &DescribeReservedInstancesOfferingsResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// DescribeReservedInstancesOfferings
+// This API is used to describe Reserved Instance offerings that are available for purchase.
+//
+// error code that may be returned:
+// INTERNALSERVERERROR = "InternalServerError"
+// INVALIDFILTER = "InvalidFilter"
+// INVALIDFILTERVALUE_LIMITEXCEEDED = "InvalidFilterValue.LimitExceeded"
+// INVALIDINSTANCETYPE_MALFORMED = "InvalidInstanceType.Malformed"
+// INVALIDPARAMETER = "InvalidParameter"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// UNSUPPORTEDOPERATION_INVALIDPERMISSIONNONINTERNATIONALACCOUNT = "UnsupportedOperation.InvalidPermissionNonInternationalAccount"
+// UNSUPPORTEDOPERATION_RESERVEDINSTANCEINVISIBLEFORUSER = "UnsupportedOperation.ReservedInstanceInvisibleForUser"
+func (c *Client) DescribeReservedInstancesOfferings(request *DescribeReservedInstancesOfferingsRequest) (response *DescribeReservedInstancesOfferingsResponse, err error) {
+ return c.DescribeReservedInstancesOfferingsWithContext(context.Background(), request)
+}
+
+// DescribeReservedInstancesOfferings
+// This API is used to describe Reserved Instance offerings that are available for purchase.
+//
+// error code that may be returned:
+// INTERNALSERVERERROR = "InternalServerError"
+// INVALIDFILTER = "InvalidFilter"
+// INVALIDFILTERVALUE_LIMITEXCEEDED = "InvalidFilterValue.LimitExceeded"
+// INVALIDINSTANCETYPE_MALFORMED = "InvalidInstanceType.Malformed"
+// INVALIDPARAMETER = "InvalidParameter"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// UNSUPPORTEDOPERATION_INVALIDPERMISSIONNONINTERNATIONALACCOUNT = "UnsupportedOperation.InvalidPermissionNonInternationalAccount"
+// UNSUPPORTEDOPERATION_RESERVEDINSTANCEINVISIBLEFORUSER = "UnsupportedOperation.ReservedInstanceInvisibleForUser"
+func (c *Client) DescribeReservedInstancesOfferingsWithContext(ctx context.Context, request *DescribeReservedInstancesOfferingsRequest) (response *DescribeReservedInstancesOfferingsResponse, err error) {
+ if request == nil {
+ request = NewDescribeReservedInstancesOfferingsRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("DescribeReservedInstancesOfferings require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewDescribeReservedInstancesOfferingsResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewDescribeZoneInstanceConfigInfosRequest() (request *DescribeZoneInstanceConfigInfosRequest) {
+ request = &DescribeZoneInstanceConfigInfosRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("cvm", APIVersion, "DescribeZoneInstanceConfigInfos")
+
+
+ return
+}
+
+func NewDescribeZoneInstanceConfigInfosResponse() (response *DescribeZoneInstanceConfigInfosResponse) {
+ response = &DescribeZoneInstanceConfigInfosResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// DescribeZoneInstanceConfigInfos
+// This API is used to query the configurations of models in an availability zone.
+//
+// error code that may be returned:
+// INVALIDFILTER = "InvalidFilter"
+// INVALIDFILTERVALUE_LIMITEXCEEDED = "InvalidFilterValue.LimitExceeded"
+// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed"
+// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound"
+// INVALIDINSTANCETYPE_MALFORMED = "InvalidInstanceType.Malformed"
+// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed"
+// INVALIDPARAMETERVALUE_INVALIDAPPIDFORMAT = "InvalidParameterValue.InvalidAppIdFormat"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// INVALIDPARAMETERVALUE_ZONENOTSUPPORTED = "InvalidParameterValue.ZoneNotSupported"
+// INVALIDREGION_NOTFOUND = "InvalidRegion.NotFound"
+// INVALIDZONE_MISMATCHREGION = "InvalidZone.MismatchRegion"
+// RESOURCEINSUFFICIENT_AVAILABILITYZONESOLDOUT = "ResourceInsufficient.AvailabilityZoneSoldOut"
+// UNSUPPORTEDOPERATION = "UnsupportedOperation"
+// UNSUPPORTEDOPERATION_UNSUPPORTEDPOOL = "UnsupportedOperation.UnsupportedPool"
+func (c *Client) DescribeZoneInstanceConfigInfos(request *DescribeZoneInstanceConfigInfosRequest) (response *DescribeZoneInstanceConfigInfosResponse, err error) {
+ return c.DescribeZoneInstanceConfigInfosWithContext(context.Background(), request)
+}
+
+// DescribeZoneInstanceConfigInfos
+// This API is used to query the configurations of models in an availability zone.
+//
+// error code that may be returned:
+// INVALIDFILTER = "InvalidFilter"
+// INVALIDFILTERVALUE_LIMITEXCEEDED = "InvalidFilterValue.LimitExceeded"
+// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed"
+// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound"
+// INVALIDINSTANCETYPE_MALFORMED = "InvalidInstanceType.Malformed"
+// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed"
+// INVALIDPARAMETERVALUE_INVALIDAPPIDFORMAT = "InvalidParameterValue.InvalidAppIdFormat"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// INVALIDPARAMETERVALUE_ZONENOTSUPPORTED = "InvalidParameterValue.ZoneNotSupported"
+// INVALIDREGION_NOTFOUND = "InvalidRegion.NotFound"
+// INVALIDZONE_MISMATCHREGION = "InvalidZone.MismatchRegion"
+// RESOURCEINSUFFICIENT_AVAILABILITYZONESOLDOUT = "ResourceInsufficient.AvailabilityZoneSoldOut"
+// UNSUPPORTEDOPERATION = "UnsupportedOperation"
+// UNSUPPORTEDOPERATION_UNSUPPORTEDPOOL = "UnsupportedOperation.UnsupportedPool"
+func (c *Client) DescribeZoneInstanceConfigInfosWithContext(ctx context.Context, request *DescribeZoneInstanceConfigInfosRequest) (response *DescribeZoneInstanceConfigInfosResponse, err error) {
+ if request == nil {
+ request = NewDescribeZoneInstanceConfigInfosRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("DescribeZoneInstanceConfigInfos require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewDescribeZoneInstanceConfigInfosResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewDescribeZonesRequest() (request *DescribeZonesRequest) {
+ request = &DescribeZonesRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("cvm", APIVersion, "DescribeZones")
+
+
+ return
+}
+
+func NewDescribeZonesResponse() (response *DescribeZonesResponse) {
+ response = &DescribeZonesResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// DescribeZones
+// This API is used to query availability zones.
+//
+// error code that may be returned:
+// INVALIDFILTER = "InvalidFilter"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// INVALIDPARAMETERVALUE_ZONENOTSUPPORTED = "InvalidParameterValue.ZoneNotSupported"
+// UNSUPPORTEDOPERATION = "UnsupportedOperation"
+func (c *Client) DescribeZones(request *DescribeZonesRequest) (response *DescribeZonesResponse, err error) {
+ return c.DescribeZonesWithContext(context.Background(), request)
+}
+
+// DescribeZones
+// This API is used to query availability zones.
+//
+// error code that may be returned:
+// INVALIDFILTER = "InvalidFilter"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// INVALIDPARAMETERVALUE_ZONENOTSUPPORTED = "InvalidParameterValue.ZoneNotSupported"
+// UNSUPPORTEDOPERATION = "UnsupportedOperation"
+func (c *Client) DescribeZonesWithContext(ctx context.Context, request *DescribeZonesRequest) (response *DescribeZonesResponse, err error) {
+ if request == nil {
+ request = NewDescribeZonesRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("DescribeZones require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewDescribeZonesResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewDisassociateInstancesKeyPairsRequest() (request *DisassociateInstancesKeyPairsRequest) {
+ request = &DisassociateInstancesKeyPairsRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("cvm", APIVersion, "DisassociateInstancesKeyPairs")
+
+
+ return
+}
+
+func NewDisassociateInstancesKeyPairsResponse() (response *DisassociateInstancesKeyPairsResponse) {
+ response = &DisassociateInstancesKeyPairsResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// DisassociateInstancesKeyPairs
+// This API is used to unbind one or more key pairs from one or more instances.
+//
+//
+//
+// * It only supports [`STOPPED`](https://intl.cloud.tencent.com/document/product/213/15753?from_cn_redirect=1#InstanceStatus) Linux instances.
+//
+// * After a key pair is disassociated from an instance, you can log in to the instance with password.
+//
+// * If you did not set a password for the instance, you will not be able to log in via SSH after the unbinding. In this case, you can call [ResetInstancesPassword](https://intl.cloud.tencent.com/document/api/213/15736?from_cn_redirect=1) to set a login password.
+//
+// * Batch operations are supported. The maximum number of instances in each request is 100. If instances not available for the operation are selected, you will get an error code.
+//
+// error code that may be returned:
+// INTERNALSERVERERROR = "InternalServerError"
+// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported"
+// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed"
+// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound"
+// INVALIDKEYPAIRID_MALFORMED = "InvalidKeyPairId.Malformed"
+// INVALIDKEYPAIRID_NOTFOUND = "InvalidKeyPairId.NotFound"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// MISSINGPARAMETER = "MissingParameter"
+// MUTEXOPERATION_TASKRUNNING = "MutexOperation.TaskRunning"
+// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress"
+// UNSUPPORTEDOPERATION_INSTANCEOSWINDOWS = "UnsupportedOperation.InstanceOsWindows"
+// UNSUPPORTEDOPERATION_INSTANCESTATEBANNING = "UnsupportedOperation.InstanceStateBanning"
+// UNSUPPORTEDOPERATION_INSTANCESTATEENTERRESCUEMODE = "UnsupportedOperation.InstanceStateEnterRescueMode"
+// UNSUPPORTEDOPERATION_INSTANCESTATEFREEZING = "UnsupportedOperation.InstanceStateFreezing"
+// UNSUPPORTEDOPERATION_INSTANCESTATEPENDING = "UnsupportedOperation.InstanceStatePending"
+// UNSUPPORTEDOPERATION_INSTANCESTATEREBOOTING = "UnsupportedOperation.InstanceStateRebooting"
+// UNSUPPORTEDOPERATION_INSTANCESTATERESCUEMODE = "UnsupportedOperation.InstanceStateRescueMode"
+// UNSUPPORTEDOPERATION_INSTANCESTATERUNNING = "UnsupportedOperation.InstanceStateRunning"
+// UNSUPPORTEDOPERATION_INSTANCESTATESHUTDOWN = "UnsupportedOperation.InstanceStateShutdown"
+// UNSUPPORTEDOPERATION_INSTANCESTATESTARTING = "UnsupportedOperation.InstanceStateStarting"
+// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPING = "UnsupportedOperation.InstanceStateStopping"
+// UNSUPPORTEDOPERATION_INSTANCESTATETERMINATING = "UnsupportedOperation.InstanceStateTerminating"
+// UNSUPPORTEDOPERATION_STOPPEDMODESTOPCHARGING = "UnsupportedOperation.StoppedModeStopCharging"
+func (c *Client) DisassociateInstancesKeyPairs(request *DisassociateInstancesKeyPairsRequest) (response *DisassociateInstancesKeyPairsResponse, err error) {
+ return c.DisassociateInstancesKeyPairsWithContext(context.Background(), request)
+}
+
+// DisassociateInstancesKeyPairs
+// This API is used to unbind one or more key pairs from one or more instances.
+//
+//
+//
+// * It only supports [`STOPPED`](https://intl.cloud.tencent.com/document/product/213/15753?from_cn_redirect=1#InstanceStatus) Linux instances.
+//
+// * After a key pair is disassociated from an instance, you can log in to the instance with password.
+//
+// * If you did not set a password for the instance, you will not be able to log in via SSH after the unbinding. In this case, you can call [ResetInstancesPassword](https://intl.cloud.tencent.com/document/api/213/15736?from_cn_redirect=1) to set a login password.
+//
+// * Batch operations are supported. The maximum number of instances in each request is 100. If instances not available for the operation are selected, you will get an error code.
+//
+// error code that may be returned:
+// INTERNALSERVERERROR = "InternalServerError"
+// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported"
+// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed"
+// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound"
+// INVALIDKEYPAIRID_MALFORMED = "InvalidKeyPairId.Malformed"
+// INVALIDKEYPAIRID_NOTFOUND = "InvalidKeyPairId.NotFound"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// MISSINGPARAMETER = "MissingParameter"
+// MUTEXOPERATION_TASKRUNNING = "MutexOperation.TaskRunning"
+// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress"
+// UNSUPPORTEDOPERATION_INSTANCEOSWINDOWS = "UnsupportedOperation.InstanceOsWindows"
+// UNSUPPORTEDOPERATION_INSTANCESTATEBANNING = "UnsupportedOperation.InstanceStateBanning"
+// UNSUPPORTEDOPERATION_INSTANCESTATEENTERRESCUEMODE = "UnsupportedOperation.InstanceStateEnterRescueMode"
+// UNSUPPORTEDOPERATION_INSTANCESTATEFREEZING = "UnsupportedOperation.InstanceStateFreezing"
+// UNSUPPORTEDOPERATION_INSTANCESTATEPENDING = "UnsupportedOperation.InstanceStatePending"
+// UNSUPPORTEDOPERATION_INSTANCESTATEREBOOTING = "UnsupportedOperation.InstanceStateRebooting"
+// UNSUPPORTEDOPERATION_INSTANCESTATERESCUEMODE = "UnsupportedOperation.InstanceStateRescueMode"
+// UNSUPPORTEDOPERATION_INSTANCESTATERUNNING = "UnsupportedOperation.InstanceStateRunning"
+// UNSUPPORTEDOPERATION_INSTANCESTATESHUTDOWN = "UnsupportedOperation.InstanceStateShutdown"
+// UNSUPPORTEDOPERATION_INSTANCESTATESTARTING = "UnsupportedOperation.InstanceStateStarting"
+// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPING = "UnsupportedOperation.InstanceStateStopping"
+// UNSUPPORTEDOPERATION_INSTANCESTATETERMINATING = "UnsupportedOperation.InstanceStateTerminating"
+// UNSUPPORTEDOPERATION_STOPPEDMODESTOPCHARGING = "UnsupportedOperation.StoppedModeStopCharging"
+func (c *Client) DisassociateInstancesKeyPairsWithContext(ctx context.Context, request *DisassociateInstancesKeyPairsRequest) (response *DisassociateInstancesKeyPairsResponse, err error) {
+ if request == nil {
+ request = NewDisassociateInstancesKeyPairsRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("DisassociateInstancesKeyPairs require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewDisassociateInstancesKeyPairsResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewDisassociateSecurityGroupsRequest() (request *DisassociateSecurityGroupsRequest) {
+ request = &DisassociateSecurityGroupsRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("cvm", APIVersion, "DisassociateSecurityGroups")
+
+
+ return
+}
+
+func NewDisassociateSecurityGroupsResponse() (response *DisassociateSecurityGroupsResponse) {
+ response = &DisassociateSecurityGroupsResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// DisassociateSecurityGroups
+// This API is used to disassociate security groups from instances.
+//
+// error code that may be returned:
+// FAILEDOPERATION_SECURITYGROUPACTIONFAILED = "FailedOperation.SecurityGroupActionFailed"
+// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed"
+// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound"
+// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// INVALIDSECURITYGROUPID_NOTFOUND = "InvalidSecurityGroupId.NotFound"
+// INVALIDSGID_MALFORMED = "InvalidSgId.Malformed"
+// MUTEXOPERATION_TASKRUNNING = "MutexOperation.TaskRunning"
+// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress"
+// SECGROUPACTIONFAILURE = "SecGroupActionFailure"
+// UNSUPPORTEDOPERATION = "UnsupportedOperation"
+func (c *Client) DisassociateSecurityGroups(request *DisassociateSecurityGroupsRequest) (response *DisassociateSecurityGroupsResponse, err error) {
+ return c.DisassociateSecurityGroupsWithContext(context.Background(), request)
+}
+
+// DisassociateSecurityGroups
+// This API is used to disassociate security groups from instances.
+//
+// error code that may be returned:
+// FAILEDOPERATION_SECURITYGROUPACTIONFAILED = "FailedOperation.SecurityGroupActionFailed"
+// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed"
+// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound"
+// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// INVALIDSECURITYGROUPID_NOTFOUND = "InvalidSecurityGroupId.NotFound"
+// INVALIDSGID_MALFORMED = "InvalidSgId.Malformed"
+// MUTEXOPERATION_TASKRUNNING = "MutexOperation.TaskRunning"
+// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress"
+// SECGROUPACTIONFAILURE = "SecGroupActionFailure"
+// UNSUPPORTEDOPERATION = "UnsupportedOperation"
+func (c *Client) DisassociateSecurityGroupsWithContext(ctx context.Context, request *DisassociateSecurityGroupsRequest) (response *DisassociateSecurityGroupsResponse, err error) {
+ if request == nil {
+ request = NewDisassociateSecurityGroupsRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("DisassociateSecurityGroups require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewDisassociateSecurityGroupsResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewEnterRescueModeRequest() (request *EnterRescueModeRequest) {
+ request = &EnterRescueModeRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("cvm", APIVersion, "EnterRescueMode")
+
+
+ return
+}
+
+func NewEnterRescueModeResponse() (response *EnterRescueModeResponse) {
+ response = &EnterRescueModeResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// EnterRescueMode
+// This API is used to enter the rescue mode.
+//
+// error code that may be returned:
+// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported"
+// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed"
+// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound"
+// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed"
+// INVALIDPARAMETERVALUE_INVALIDPASSWORD = "InvalidParameterValue.InvalidPassword"
+// INVALIDPASSWORD = "InvalidPassword"
+// MUTEXOPERATION_TASKRUNNING = "MutexOperation.TaskRunning"
+// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress"
+// UNSUPPORTEDOPERATION_ARMARCHITECTURE = "UnsupportedOperation.ArmArchitecture"
+// UNSUPPORTEDOPERATION_EDGEZONENOTSUPPORTCLOUDDISK = "UnsupportedOperation.EdgeZoneNotSupportCloudDisk"
+// UNSUPPORTEDOPERATION_INSTANCEREINSTALLFAILED = "UnsupportedOperation.InstanceReinstallFailed"
+// UNSUPPORTEDOPERATION_INSTANCESTATEBANNING = "UnsupportedOperation.InstanceStateBanning"
+// UNSUPPORTEDOPERATION_INSTANCESTATEENTERRESCUEMODE = "UnsupportedOperation.InstanceStateEnterRescueMode"
+// UNSUPPORTEDOPERATION_INSTANCESTATEENTERSERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateEnterServiceLiveMigrate"
+// UNSUPPORTEDOPERATION_INSTANCESTATEEXITRESCUEMODE = "UnsupportedOperation.InstanceStateExitRescueMode"
+// UNSUPPORTEDOPERATION_INSTANCESTATEEXITSERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateExitServiceLiveMigrate"
+// UNSUPPORTEDOPERATION_INSTANCESTATEFREEZING = "UnsupportedOperation.InstanceStateFreezing"
+// UNSUPPORTEDOPERATION_INSTANCESTATEREBOOTING = "UnsupportedOperation.InstanceStateRebooting"
+// UNSUPPORTEDOPERATION_INSTANCESTATERESCUEMODE = "UnsupportedOperation.InstanceStateRescueMode"
+// UNSUPPORTEDOPERATION_INSTANCESTATESERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateServiceLiveMigrate"
+// UNSUPPORTEDOPERATION_INSTANCESTATESHUTDOWN = "UnsupportedOperation.InstanceStateShutdown"
+// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPING = "UnsupportedOperation.InstanceStateStopping"
+// UNSUPPORTEDOPERATION_INSTANCESTATETERMINATING = "UnsupportedOperation.InstanceStateTerminating"
+// UNSUPPORTEDOPERATION_SPECIALINSTANCETYPE = "UnsupportedOperation.SpecialInstanceType"
+// UNSUPPORTEDOPERATION_STOPPEDMODESTOPCHARGING = "UnsupportedOperation.StoppedModeStopCharging"
+func (c *Client) EnterRescueMode(request *EnterRescueModeRequest) (response *EnterRescueModeResponse, err error) {
+ return c.EnterRescueModeWithContext(context.Background(), request)
+}
+
+// EnterRescueMode
+// This API is used to enter the rescue mode.
+//
+// error code that may be returned:
+// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported"
+// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed"
+// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound"
+// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed"
+// INVALIDPARAMETERVALUE_INVALIDPASSWORD = "InvalidParameterValue.InvalidPassword"
+// INVALIDPASSWORD = "InvalidPassword"
+// MUTEXOPERATION_TASKRUNNING = "MutexOperation.TaskRunning"
+// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress"
+// UNSUPPORTEDOPERATION_ARMARCHITECTURE = "UnsupportedOperation.ArmArchitecture"
+// UNSUPPORTEDOPERATION_EDGEZONENOTSUPPORTCLOUDDISK = "UnsupportedOperation.EdgeZoneNotSupportCloudDisk"
+// UNSUPPORTEDOPERATION_INSTANCEREINSTALLFAILED = "UnsupportedOperation.InstanceReinstallFailed"
+// UNSUPPORTEDOPERATION_INSTANCESTATEBANNING = "UnsupportedOperation.InstanceStateBanning"
+// UNSUPPORTEDOPERATION_INSTANCESTATEENTERRESCUEMODE = "UnsupportedOperation.InstanceStateEnterRescueMode"
+// UNSUPPORTEDOPERATION_INSTANCESTATEENTERSERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateEnterServiceLiveMigrate"
+// UNSUPPORTEDOPERATION_INSTANCESTATEEXITRESCUEMODE = "UnsupportedOperation.InstanceStateExitRescueMode"
+// UNSUPPORTEDOPERATION_INSTANCESTATEEXITSERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateExitServiceLiveMigrate"
+// UNSUPPORTEDOPERATION_INSTANCESTATEFREEZING = "UnsupportedOperation.InstanceStateFreezing"
+// UNSUPPORTEDOPERATION_INSTANCESTATEREBOOTING = "UnsupportedOperation.InstanceStateRebooting"
+// UNSUPPORTEDOPERATION_INSTANCESTATERESCUEMODE = "UnsupportedOperation.InstanceStateRescueMode"
+// UNSUPPORTEDOPERATION_INSTANCESTATESERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateServiceLiveMigrate"
+// UNSUPPORTEDOPERATION_INSTANCESTATESHUTDOWN = "UnsupportedOperation.InstanceStateShutdown"
+// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPING = "UnsupportedOperation.InstanceStateStopping"
+// UNSUPPORTEDOPERATION_INSTANCESTATETERMINATING = "UnsupportedOperation.InstanceStateTerminating"
+// UNSUPPORTEDOPERATION_SPECIALINSTANCETYPE = "UnsupportedOperation.SpecialInstanceType"
+// UNSUPPORTEDOPERATION_STOPPEDMODESTOPCHARGING = "UnsupportedOperation.StoppedModeStopCharging"
+func (c *Client) EnterRescueModeWithContext(ctx context.Context, request *EnterRescueModeRequest) (response *EnterRescueModeResponse, err error) {
+ if request == nil {
+ request = NewEnterRescueModeRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("EnterRescueMode require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewEnterRescueModeResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewExitRescueModeRequest() (request *ExitRescueModeRequest) {
+ request = &ExitRescueModeRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("cvm", APIVersion, "ExitRescueMode")
+
+
+ return
+}
+
+func NewExitRescueModeResponse() (response *ExitRescueModeResponse) {
+ response = &ExitRescueModeResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// ExitRescueMode
+// This API is used to exit the rescue mode.
+//
+// error code that may be returned:
+// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported"
+// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed"
+// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound"
+// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed"
+// MUTEXOPERATION_TASKRUNNING = "MutexOperation.TaskRunning"
+// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress"
+// UNSUPPORTEDOPERATION_INSTANCESTATEENTERRESCUEMODE = "UnsupportedOperation.InstanceStateEnterRescueMode"
+// UNSUPPORTEDOPERATION_INSTANCESTATEEXITRESCUEMODE = "UnsupportedOperation.InstanceStateExitRescueMode"
+// UNSUPPORTEDOPERATION_INSTANCESTATEREBOOTING = "UnsupportedOperation.InstanceStateRebooting"
+// UNSUPPORTEDOPERATION_INSTANCESTATERUNNING = "UnsupportedOperation.InstanceStateRunning"
+// UNSUPPORTEDOPERATION_INSTANCESTATESERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateServiceLiveMigrate"
+// UNSUPPORTEDOPERATION_INSTANCESTATESHUTDOWN = "UnsupportedOperation.InstanceStateShutdown"
+// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPED = "UnsupportedOperation.InstanceStateStopped"
+// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPING = "UnsupportedOperation.InstanceStateStopping"
+func (c *Client) ExitRescueMode(request *ExitRescueModeRequest) (response *ExitRescueModeResponse, err error) {
+ return c.ExitRescueModeWithContext(context.Background(), request)
+}
+
+// ExitRescueMode
+// This API is used to exit the rescue mode.
+//
+// error code that may be returned:
+// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported"
+// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed"
+// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound"
+// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed"
+// MUTEXOPERATION_TASKRUNNING = "MutexOperation.TaskRunning"
+// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress"
+// UNSUPPORTEDOPERATION_INSTANCESTATEENTERRESCUEMODE = "UnsupportedOperation.InstanceStateEnterRescueMode"
+// UNSUPPORTEDOPERATION_INSTANCESTATEEXITRESCUEMODE = "UnsupportedOperation.InstanceStateExitRescueMode"
+// UNSUPPORTEDOPERATION_INSTANCESTATEREBOOTING = "UnsupportedOperation.InstanceStateRebooting"
+// UNSUPPORTEDOPERATION_INSTANCESTATERUNNING = "UnsupportedOperation.InstanceStateRunning"
+// UNSUPPORTEDOPERATION_INSTANCESTATESERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateServiceLiveMigrate"
+// UNSUPPORTEDOPERATION_INSTANCESTATESHUTDOWN = "UnsupportedOperation.InstanceStateShutdown"
+// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPED = "UnsupportedOperation.InstanceStateStopped"
+// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPING = "UnsupportedOperation.InstanceStateStopping"
+func (c *Client) ExitRescueModeWithContext(ctx context.Context, request *ExitRescueModeRequest) (response *ExitRescueModeResponse, err error) {
+ if request == nil {
+ request = NewExitRescueModeRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("ExitRescueMode require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewExitRescueModeResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewExportImagesRequest() (request *ExportImagesRequest) {
+ request = &ExportImagesRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("cvm", APIVersion, "ExportImages")
+
+
+ return
+}
+
+func NewExportImagesResponse() (response *ExportImagesResponse) {
+ response = &ExportImagesResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// ExportImages
+// This API is used to export custom images to the specified COS bucket.
+//
+// error code that may be returned:
+// AUTHFAILURE_CAMROLENAMEAUTHENTICATEFAILED = "AuthFailure.CamRoleNameAuthenticateFailed"
+// INVALIDIMAGEID_MALFORMED = "InvalidImageId.Malformed"
+// INVALIDIMAGEID_NOTFOUND = "InvalidImageId.NotFound"
+// INVALIDPARAMETER_IMAGEIDSSNAPSHOTIDSMUSTONE = "InvalidParameter.ImageIdsSnapshotIdsMustOne"
+// INVALIDPARAMETER_SNAPSHOTNOTFOUND = "InvalidParameter.SnapshotNotFound"
+// INVALIDPARAMETERVALUE_BUCKETNOTFOUND = "InvalidParameterValue.BucketNotFound"
+// INVALIDPARAMETERVALUE_INVALIDAPPIDFORMAT = "InvalidParameterValue.InvalidAppIdFormat"
+// INVALIDPARAMETERVALUE_INVALIDBUCKETPERMISSIONFOREXPORT = "InvalidParameterValue.InvalidBucketPermissionForExport"
+// INVALIDPARAMETERVALUE_INVALIDFILENAMEPREFIXLIST = "InvalidParameterValue.InvalidFileNamePrefixList"
+// INVALIDPARAMETERVALUE_INVALIDIMAGEID = "InvalidParameterValue.InvalidImageId"
+// INVALIDPARAMETERVALUE_INVALIDIMAGEOSNAME = "InvalidParameterValue.InvalidImageOsName"
+// INVALIDPARAMETERVALUE_INVALIDIMAGESTATE = "InvalidParameterValue.InvalidImageState"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// INVALIDPARAMETERVALUE_TOOLARGE = "InvalidParameterValue.TooLarge"
+// LIMITEXCEEDED_EXPORTIMAGETASKLIMITEXCEEDED = "LimitExceeded.ExportImageTaskLimitExceeded"
+// UNSUPPORTEDOPERATION_ENCRYPTEDIMAGESNOTSUPPORTED = "UnsupportedOperation.EncryptedImagesNotSupported"
+// UNSUPPORTEDOPERATION_IMAGETOOLARGEEXPORTUNSUPPORTED = "UnsupportedOperation.ImageTooLargeExportUnsupported"
+// UNSUPPORTEDOPERATION_MARKETIMAGEEXPORTUNSUPPORTED = "UnsupportedOperation.MarketImageExportUnsupported"
+// UNSUPPORTEDOPERATION_PUBLICIMAGEEXPORTUNSUPPORTED = "UnsupportedOperation.PublicImageExportUnsupported"
+// UNSUPPORTEDOPERATION_REDHATIMAGEEXPORTUNSUPPORTED = "UnsupportedOperation.RedHatImageExportUnsupported"
+// UNSUPPORTEDOPERATION_SHAREDIMAGEEXPORTUNSUPPORTED = "UnsupportedOperation.SharedImageExportUnsupported"
+// UNSUPPORTEDOPERATION_WINDOWSIMAGEEXPORTUNSUPPORTED = "UnsupportedOperation.WindowsImageExportUnsupported"
+func (c *Client) ExportImages(request *ExportImagesRequest) (response *ExportImagesResponse, err error) {
+ return c.ExportImagesWithContext(context.Background(), request)
+}
+
+// ExportImages
+// This API is used to export custom images to the specified COS bucket.
+//
+// error code that may be returned:
+// AUTHFAILURE_CAMROLENAMEAUTHENTICATEFAILED = "AuthFailure.CamRoleNameAuthenticateFailed"
+// INVALIDIMAGEID_MALFORMED = "InvalidImageId.Malformed"
+// INVALIDIMAGEID_NOTFOUND = "InvalidImageId.NotFound"
+// INVALIDPARAMETER_IMAGEIDSSNAPSHOTIDSMUSTONE = "InvalidParameter.ImageIdsSnapshotIdsMustOne"
+// INVALIDPARAMETER_SNAPSHOTNOTFOUND = "InvalidParameter.SnapshotNotFound"
+// INVALIDPARAMETERVALUE_BUCKETNOTFOUND = "InvalidParameterValue.BucketNotFound"
+// INVALIDPARAMETERVALUE_INVALIDAPPIDFORMAT = "InvalidParameterValue.InvalidAppIdFormat"
+// INVALIDPARAMETERVALUE_INVALIDBUCKETPERMISSIONFOREXPORT = "InvalidParameterValue.InvalidBucketPermissionForExport"
+// INVALIDPARAMETERVALUE_INVALIDFILENAMEPREFIXLIST = "InvalidParameterValue.InvalidFileNamePrefixList"
+// INVALIDPARAMETERVALUE_INVALIDIMAGEID = "InvalidParameterValue.InvalidImageId"
+// INVALIDPARAMETERVALUE_INVALIDIMAGEOSNAME = "InvalidParameterValue.InvalidImageOsName"
+// INVALIDPARAMETERVALUE_INVALIDIMAGESTATE = "InvalidParameterValue.InvalidImageState"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// INVALIDPARAMETERVALUE_TOOLARGE = "InvalidParameterValue.TooLarge"
+// LIMITEXCEEDED_EXPORTIMAGETASKLIMITEXCEEDED = "LimitExceeded.ExportImageTaskLimitExceeded"
+// UNSUPPORTEDOPERATION_ENCRYPTEDIMAGESNOTSUPPORTED = "UnsupportedOperation.EncryptedImagesNotSupported"
+// UNSUPPORTEDOPERATION_IMAGETOOLARGEEXPORTUNSUPPORTED = "UnsupportedOperation.ImageTooLargeExportUnsupported"
+// UNSUPPORTEDOPERATION_MARKETIMAGEEXPORTUNSUPPORTED = "UnsupportedOperation.MarketImageExportUnsupported"
+// UNSUPPORTEDOPERATION_PUBLICIMAGEEXPORTUNSUPPORTED = "UnsupportedOperation.PublicImageExportUnsupported"
+// UNSUPPORTEDOPERATION_REDHATIMAGEEXPORTUNSUPPORTED = "UnsupportedOperation.RedHatImageExportUnsupported"
+// UNSUPPORTEDOPERATION_SHAREDIMAGEEXPORTUNSUPPORTED = "UnsupportedOperation.SharedImageExportUnsupported"
+// UNSUPPORTEDOPERATION_WINDOWSIMAGEEXPORTUNSUPPORTED = "UnsupportedOperation.WindowsImageExportUnsupported"
+func (c *Client) ExportImagesWithContext(ctx context.Context, request *ExportImagesRequest) (response *ExportImagesResponse, err error) {
+ if request == nil {
+ request = NewExportImagesRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("ExportImages require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewExportImagesResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewImportImageRequest() (request *ImportImageRequest) {
+ request = &ImportImageRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("cvm", APIVersion, "ImportImage")
+
+
+ return
+}
+
+func NewImportImageResponse() (response *ImportImageResponse) {
+ response = &ImportImageResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// ImportImage
+// This API is used to import an image. The image imported can be used to create instances. Currently, this API supports RAW, VHD, QCOW2, and VMDK image formats.
+//
+// error code that may be returned:
+// IMAGEQUOTALIMITEXCEEDED = "ImageQuotaLimitExceeded"
+// INVALIDIMAGENAME_DUPLICATE = "InvalidImageName.Duplicate"
+// INVALIDIMAGEOSTYPE_UNSUPPORTED = "InvalidImageOsType.Unsupported"
+// INVALIDIMAGEOSVERSION_UNSUPPORTED = "InvalidImageOsVersion.Unsupported"
+// INVALIDPARAMETER_INVALIDPARAMETERURLERROR = "InvalidParameter.InvalidParameterUrlError"
+// INVALIDPARAMETERVALUE_ISOMUSTIMPORTBYFORCE = "InvalidParameterValue.ISOMustImportByForce"
+// INVALIDPARAMETERVALUE_INVALIDAPPIDFORMAT = "InvalidParameterValue.InvalidAppIdFormat"
+// INVALIDPARAMETERVALUE_INVALIDBOOTMODE = "InvalidParameterValue.InvalidBootMode"
+// INVALIDPARAMETERVALUE_INVALIDIMAGEFAMILY = "InvalidParameterValue.InvalidImageFamily"
+// INVALIDPARAMETERVALUE_INVALIDLICENSETYPE = "InvalidParameterValue.InvalidLicenseType"
+// INVALIDPARAMETERVALUE_TAGKEYNOTFOUND = "InvalidParameterValue.TagKeyNotFound"
+// INVALIDPARAMETERVALUE_TOOLARGE = "InvalidParameterValue.TooLarge"
+// OPERATIONDENIED_INNERUSERPROHIBITACTION = "OperationDenied.InnerUserProhibitAction"
+// REGIONABILITYLIMIT_UNSUPPORTEDTOIMPORTIMAGE = "RegionAbilityLimit.UnsupportedToImportImage"
+func (c *Client) ImportImage(request *ImportImageRequest) (response *ImportImageResponse, err error) {
+ return c.ImportImageWithContext(context.Background(), request)
+}
+
+// ImportImage
+// This API is used to import an image. The image imported can be used to create instances. Currently, this API supports RAW, VHD, QCOW2, and VMDK image formats.
+//
+// error code that may be returned:
+// IMAGEQUOTALIMITEXCEEDED = "ImageQuotaLimitExceeded"
+// INVALIDIMAGENAME_DUPLICATE = "InvalidImageName.Duplicate"
+// INVALIDIMAGEOSTYPE_UNSUPPORTED = "InvalidImageOsType.Unsupported"
+// INVALIDIMAGEOSVERSION_UNSUPPORTED = "InvalidImageOsVersion.Unsupported"
+// INVALIDPARAMETER_INVALIDPARAMETERURLERROR = "InvalidParameter.InvalidParameterUrlError"
+// INVALIDPARAMETERVALUE_ISOMUSTIMPORTBYFORCE = "InvalidParameterValue.ISOMustImportByForce"
+// INVALIDPARAMETERVALUE_INVALIDAPPIDFORMAT = "InvalidParameterValue.InvalidAppIdFormat"
+// INVALIDPARAMETERVALUE_INVALIDBOOTMODE = "InvalidParameterValue.InvalidBootMode"
+// INVALIDPARAMETERVALUE_INVALIDIMAGEFAMILY = "InvalidParameterValue.InvalidImageFamily"
+// INVALIDPARAMETERVALUE_INVALIDLICENSETYPE = "InvalidParameterValue.InvalidLicenseType"
+// INVALIDPARAMETERVALUE_TAGKEYNOTFOUND = "InvalidParameterValue.TagKeyNotFound"
+// INVALIDPARAMETERVALUE_TOOLARGE = "InvalidParameterValue.TooLarge"
+// OPERATIONDENIED_INNERUSERPROHIBITACTION = "OperationDenied.InnerUserProhibitAction"
+// REGIONABILITYLIMIT_UNSUPPORTEDTOIMPORTIMAGE = "RegionAbilityLimit.UnsupportedToImportImage"
+func (c *Client) ImportImageWithContext(ctx context.Context, request *ImportImageRequest) (response *ImportImageResponse, err error) {
+ if request == nil {
+ request = NewImportImageRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("ImportImage require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewImportImageResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewImportKeyPairRequest() (request *ImportKeyPairRequest) {
+ request = &ImportKeyPairRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("cvm", APIVersion, "ImportKeyPair")
+
+
+ return
+}
+
+func NewImportKeyPairResponse() (response *ImportKeyPairResponse) {
+ response = &ImportKeyPairResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// ImportKeyPair
+// This API is used to import key pairs.
+//
+//
+//
+// * You can use this API to import key pairs to a user account, but the key pairs will not be automatically associated with any instance. You may use [AssociasteInstancesKeyPair](https://intl.cloud.tencent.com/document/api/213/15698?from_cn_redirect=1) to associate key pairs with instances.
+//
+// * You need to specify the names of the key pairs and the content of the public keys.
+//
+// * If you only have private keys, you can convert them to public keys with the `SSL` tool before importing them.
+//
+// error code that may be returned:
+// INTERNALSERVERERROR = "InternalServerError"
+// INVALIDKEYPAIR_LIMITEXCEEDED = "InvalidKeyPair.LimitExceeded"
+// INVALIDKEYPAIRNAME_DUPLICATE = "InvalidKeyPairName.Duplicate"
+// INVALIDKEYPAIRNAMEEMPTY = "InvalidKeyPairNameEmpty"
+// INVALIDKEYPAIRNAMEINCLUDEILLEGALCHAR = "InvalidKeyPairNameIncludeIllegalChar"
+// INVALIDKEYPAIRNAMETOOLONG = "InvalidKeyPairNameTooLong"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPROJECTID_NOTFOUND = "InvalidProjectId.NotFound"
+// INVALIDPUBLICKEY_DUPLICATE = "InvalidPublicKey.Duplicate"
+// INVALIDPUBLICKEY_MALFORMED = "InvalidPublicKey.Malformed"
+// LIMITEXCEEDED_TAGRESOURCEQUOTA = "LimitExceeded.TagResourceQuota"
+// MISSINGPARAMETER = "MissingParameter"
+func (c *Client) ImportKeyPair(request *ImportKeyPairRequest) (response *ImportKeyPairResponse, err error) {
+ return c.ImportKeyPairWithContext(context.Background(), request)
+}
+
+// ImportKeyPair
+// This API is used to import key pairs.
+//
+//
+//
+// * You can use this API to import key pairs to a user account, but the key pairs will not be automatically associated with any instance. You may use [AssociasteInstancesKeyPair](https://intl.cloud.tencent.com/document/api/213/15698?from_cn_redirect=1) to associate key pairs with instances.
+//
+// * You need to specify the names of the key pairs and the content of the public keys.
+//
+// * If you only have private keys, you can convert them to public keys with the `SSL` tool before importing them.
+//
+// error code that may be returned:
+// INTERNALSERVERERROR = "InternalServerError"
+// INVALIDKEYPAIR_LIMITEXCEEDED = "InvalidKeyPair.LimitExceeded"
+// INVALIDKEYPAIRNAME_DUPLICATE = "InvalidKeyPairName.Duplicate"
+// INVALIDKEYPAIRNAMEEMPTY = "InvalidKeyPairNameEmpty"
+// INVALIDKEYPAIRNAMEINCLUDEILLEGALCHAR = "InvalidKeyPairNameIncludeIllegalChar"
+// INVALIDKEYPAIRNAMETOOLONG = "InvalidKeyPairNameTooLong"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPROJECTID_NOTFOUND = "InvalidProjectId.NotFound"
+// INVALIDPUBLICKEY_DUPLICATE = "InvalidPublicKey.Duplicate"
+// INVALIDPUBLICKEY_MALFORMED = "InvalidPublicKey.Malformed"
+// LIMITEXCEEDED_TAGRESOURCEQUOTA = "LimitExceeded.TagResourceQuota"
+// MISSINGPARAMETER = "MissingParameter"
+func (c *Client) ImportKeyPairWithContext(ctx context.Context, request *ImportKeyPairRequest) (response *ImportKeyPairResponse, err error) {
+ if request == nil {
+ request = NewImportKeyPairRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("ImportKeyPair require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewImportKeyPairResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewInquirePricePurchaseReservedInstancesOfferingRequest() (request *InquirePricePurchaseReservedInstancesOfferingRequest) {
+ request = &InquirePricePurchaseReservedInstancesOfferingRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("cvm", APIVersion, "InquirePricePurchaseReservedInstancesOffering")
+
+
+ return
+}
+
+func NewInquirePricePurchaseReservedInstancesOfferingResponse() (response *InquirePricePurchaseReservedInstancesOfferingResponse) {
+ response = &InquirePricePurchaseReservedInstancesOfferingResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// InquirePricePurchaseReservedInstancesOffering
+// This API is used to query the price of reserved instances. It only supports querying purchasable reserved instance offerings. Currently, RIs are only offered to beta users.
+//
+// error code that may be returned:
+// FAILEDOPERATION_INQUIRYPRICEFAILED = "FailedOperation.InquiryPriceFailed"
+// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range"
+// UNSUPPORTEDOPERATION_INVALIDPERMISSIONNONINTERNATIONALACCOUNT = "UnsupportedOperation.InvalidPermissionNonInternationalAccount"
+func (c *Client) InquirePricePurchaseReservedInstancesOffering(request *InquirePricePurchaseReservedInstancesOfferingRequest) (response *InquirePricePurchaseReservedInstancesOfferingResponse, err error) {
+ return c.InquirePricePurchaseReservedInstancesOfferingWithContext(context.Background(), request)
+}
+
+// InquirePricePurchaseReservedInstancesOffering
+// This API is used to query the price of reserved instances. It only supports querying purchasable reserved instance offerings. Currently, RIs are only offered to beta users.
+//
+// error code that may be returned:
+// FAILEDOPERATION_INQUIRYPRICEFAILED = "FailedOperation.InquiryPriceFailed"
+// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range"
+// UNSUPPORTEDOPERATION_INVALIDPERMISSIONNONINTERNATIONALACCOUNT = "UnsupportedOperation.InvalidPermissionNonInternationalAccount"
+func (c *Client) InquirePricePurchaseReservedInstancesOfferingWithContext(ctx context.Context, request *InquirePricePurchaseReservedInstancesOfferingRequest) (response *InquirePricePurchaseReservedInstancesOfferingResponse, err error) {
+ if request == nil {
+ request = NewInquirePricePurchaseReservedInstancesOfferingRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("InquirePricePurchaseReservedInstancesOffering require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewInquirePricePurchaseReservedInstancesOfferingResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewInquiryPriceResetInstanceRequest() (request *InquiryPriceResetInstanceRequest) {
+ request = &InquiryPriceResetInstanceRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("cvm", APIVersion, "InquiryPriceResetInstance")
+
+
+ return
+}
+
+func NewInquiryPriceResetInstanceResponse() (response *InquiryPriceResetInstanceResponse) {
+ response = &InquiryPriceResetInstanceResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// InquiryPriceResetInstance
+// This API is used to inquire about the price for reinstalling an instance.
+//
+//
+//
+// * If you have specified the parameter `ImageId`, inquire about the price for reinstallation by using the specified image. Otherwise, inquire about the price for reinstallation based on the image currently used by the instance.
+//
+// * Currently, only instances with a [system disk type](https://intl.cloud.tencent.com/document/api/213/15753?from_cn_redirect=1#SystemDisk) of `CLOUD_BSSD`, `CLOUD_PREMIUM`, or `CLOUD_SSD` are supported for inquiring about the price for reinstallation caused by switching between `Linux` and `Windows` operating systems through this API.
+//
+// * Currently, instances in regions outside the Chinese mainland are not supported for inquiring about the price for reinstallation caused by switching between `Linux` and `Windows` operating systems through this API.
+//
+// error code that may be returned:
+// FAILEDOPERATION_INQUIRYPRICEFAILED = "FailedOperation.InquiryPriceFailed"
+// INTERNALERROR_TRADEUNKNOWNERROR = "InternalError.TradeUnknownError"
+// INTERNALSERVERERROR = "InternalServerError"
+// INVALIDIMAGEID_MALFORMED = "InvalidImageId.Malformed"
+// INVALIDIMAGEID_NOTFOUND = "InvalidImageId.NotFound"
+// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported"
+// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed"
+// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed"
+// INVALIDPARAMETERVALUE_INSTANCETYPENOTFOUND = "InvalidParameterValue.InstanceTypeNotFound"
+// INVALIDPARAMETERVALUE_INVALIDIMAGEID = "InvalidParameterValue.InvalidImageId"
+// INVALIDPARAMETERVALUE_INVALIDIMAGEIDFORRETSETINSTANCE = "InvalidParameterValue.InvalidImageIdForRetsetInstance"
+// INVALIDPARAMETERVALUE_INVALIDIMAGEOSNAME = "InvalidParameterValue.InvalidImageOsName"
+// INVALIDPARAMETERVALUE_ZONENOTSUPPORTED = "InvalidParameterValue.ZoneNotSupported"
+// MISSINGPARAMETER = "MissingParameter"
+// MISSINGPARAMETER_MONITORSERVICE = "MissingParameter.MonitorService"
+// RESOURCEINSUFFICIENT_CLOUDDISKUNAVAILABLE = "ResourceInsufficient.CloudDiskUnavailable"
+// RESOURCESSOLDOUT_SPECIFIEDINSTANCETYPE = "ResourcesSoldOut.SpecifiedInstanceType"
+// UNSUPPORTEDOPERATION_INVALIDIMAGELICENSETYPEFORRESET = "UnsupportedOperation.InvalidImageLicenseTypeForReset"
+// UNSUPPORTEDOPERATION_MODIFYENCRYPTIONNOTSUPPORTED = "UnsupportedOperation.ModifyEncryptionNotSupported"
+// UNSUPPORTEDOPERATION_RAWLOCALDISKINSREINSTALLTOQCOW2 = "UnsupportedOperation.RawLocalDiskInsReinstalltoQcow2"
+func (c *Client) InquiryPriceResetInstance(request *InquiryPriceResetInstanceRequest) (response *InquiryPriceResetInstanceResponse, err error) {
+ return c.InquiryPriceResetInstanceWithContext(context.Background(), request)
+}
+
+// InquiryPriceResetInstance
+// This API is used to inquire about the price for reinstalling an instance.
+//
+//
+//
+// * If you have specified the parameter `ImageId`, inquire about the price for reinstallation by using the specified image. Otherwise, inquire about the price for reinstallation based on the image currently used by the instance.
+//
+// * Currently, only instances with a [system disk type](https://intl.cloud.tencent.com/document/api/213/15753?from_cn_redirect=1#SystemDisk) of `CLOUD_BSSD`, `CLOUD_PREMIUM`, or `CLOUD_SSD` are supported for inquiring about the price for reinstallation caused by switching between `Linux` and `Windows` operating systems through this API.
+//
+// * Currently, instances in regions outside the Chinese mainland are not supported for inquiring about the price for reinstallation caused by switching between `Linux` and `Windows` operating systems through this API.
+//
+// error code that may be returned:
+// FAILEDOPERATION_INQUIRYPRICEFAILED = "FailedOperation.InquiryPriceFailed"
+// INTERNALERROR_TRADEUNKNOWNERROR = "InternalError.TradeUnknownError"
+// INTERNALSERVERERROR = "InternalServerError"
+// INVALIDIMAGEID_MALFORMED = "InvalidImageId.Malformed"
+// INVALIDIMAGEID_NOTFOUND = "InvalidImageId.NotFound"
+// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported"
+// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed"
+// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed"
+// INVALIDPARAMETERVALUE_INSTANCETYPENOTFOUND = "InvalidParameterValue.InstanceTypeNotFound"
+// INVALIDPARAMETERVALUE_INVALIDIMAGEID = "InvalidParameterValue.InvalidImageId"
+// INVALIDPARAMETERVALUE_INVALIDIMAGEIDFORRETSETINSTANCE = "InvalidParameterValue.InvalidImageIdForRetsetInstance"
+// INVALIDPARAMETERVALUE_INVALIDIMAGEOSNAME = "InvalidParameterValue.InvalidImageOsName"
+// INVALIDPARAMETERVALUE_ZONENOTSUPPORTED = "InvalidParameterValue.ZoneNotSupported"
+// MISSINGPARAMETER = "MissingParameter"
+// MISSINGPARAMETER_MONITORSERVICE = "MissingParameter.MonitorService"
+// RESOURCEINSUFFICIENT_CLOUDDISKUNAVAILABLE = "ResourceInsufficient.CloudDiskUnavailable"
+// RESOURCESSOLDOUT_SPECIFIEDINSTANCETYPE = "ResourcesSoldOut.SpecifiedInstanceType"
+// UNSUPPORTEDOPERATION_INVALIDIMAGELICENSETYPEFORRESET = "UnsupportedOperation.InvalidImageLicenseTypeForReset"
+// UNSUPPORTEDOPERATION_MODIFYENCRYPTIONNOTSUPPORTED = "UnsupportedOperation.ModifyEncryptionNotSupported"
+// UNSUPPORTEDOPERATION_RAWLOCALDISKINSREINSTALLTOQCOW2 = "UnsupportedOperation.RawLocalDiskInsReinstalltoQcow2"
+func (c *Client) InquiryPriceResetInstanceWithContext(ctx context.Context, request *InquiryPriceResetInstanceRequest) (response *InquiryPriceResetInstanceResponse, err error) {
+ if request == nil {
+ request = NewInquiryPriceResetInstanceRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("InquiryPriceResetInstance require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewInquiryPriceResetInstanceResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewInquiryPriceResetInstancesInternetMaxBandwidthRequest() (request *InquiryPriceResetInstancesInternetMaxBandwidthRequest) {
+ request = &InquiryPriceResetInstancesInternetMaxBandwidthRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("cvm", APIVersion, "InquiryPriceResetInstancesInternetMaxBandwidth")
+
+
+ return
+}
+
+func NewInquiryPriceResetInstancesInternetMaxBandwidthResponse() (response *InquiryPriceResetInstancesInternetMaxBandwidthResponse) {
+ response = &InquiryPriceResetInstancesInternetMaxBandwidthResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// InquiryPriceResetInstancesInternetMaxBandwidth
+// This API is used to query the price for upgrading the public bandwidth cap of an instance.
+//
+//
+//
+// * The allowed bandwidth cap varies for different models. For details, see [Purchasing Network Bandwidth](https://intl.cloud.tencent.com/document/product/213/509?from_cn_redirect=1).
+//
+// * For bandwidth billed by the `TRAFFIC_POSTPAID_BY_HOUR` method, changing the bandwidth cap through this API takes effect in real time. You can increase or reduce bandwidth within applicable limits.
+//
+// error code that may be returned:
+// FAILEDOPERATION_INQUIRYPRICEFAILED = "FailedOperation.InquiryPriceFailed"
+// FAILEDOPERATION_NOTFOUNDEIP = "FailedOperation.NotFoundEIP"
+// INTERNALERROR_TRADEUNKNOWNERROR = "InternalError.TradeUnknownError"
+// INTERNALSERVERERROR = "InternalServerError"
+// INVALIDACCOUNT_INSUFFICIENTBALANCE = "InvalidAccount.InsufficientBalance"
+// INVALIDACCOUNT_UNPAIDORDER = "InvalidAccount.UnpaidOrder"
+// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported"
+// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed"
+// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound"
+// INVALIDPARAMETER = "InvalidParameter"
+// INVALIDPARAMETERCOMBINATION = "InvalidParameterCombination"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed"
+// INVALIDPARAMETERVALUE_INVALIDAPPIDFORMAT = "InvalidParameterValue.InvalidAppIdFormat"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range"
+// INVALIDPERMISSION = "InvalidPermission"
+// MISSINGPARAMETER = "MissingParameter"
+// UNSUPPORTEDOPERATION_BANDWIDTHPACKAGEIDNOTSUPPORTED = "UnsupportedOperation.BandwidthPackageIdNotSupported"
+func (c *Client) InquiryPriceResetInstancesInternetMaxBandwidth(request *InquiryPriceResetInstancesInternetMaxBandwidthRequest) (response *InquiryPriceResetInstancesInternetMaxBandwidthResponse, err error) {
+ return c.InquiryPriceResetInstancesInternetMaxBandwidthWithContext(context.Background(), request)
+}
+
+// InquiryPriceResetInstancesInternetMaxBandwidth
+// This API is used to query the price for upgrading the public bandwidth cap of an instance.
+//
+//
+//
+// * The allowed bandwidth cap varies for different models. For details, see [Purchasing Network Bandwidth](https://intl.cloud.tencent.com/document/product/213/509?from_cn_redirect=1).
+//
+// * For bandwidth billed by the `TRAFFIC_POSTPAID_BY_HOUR` method, changing the bandwidth cap through this API takes effect in real time. You can increase or reduce bandwidth within applicable limits.
+//
+// error code that may be returned:
+// FAILEDOPERATION_INQUIRYPRICEFAILED = "FailedOperation.InquiryPriceFailed"
+// FAILEDOPERATION_NOTFOUNDEIP = "FailedOperation.NotFoundEIP"
+// INTERNALERROR_TRADEUNKNOWNERROR = "InternalError.TradeUnknownError"
+// INTERNALSERVERERROR = "InternalServerError"
+// INVALIDACCOUNT_INSUFFICIENTBALANCE = "InvalidAccount.InsufficientBalance"
+// INVALIDACCOUNT_UNPAIDORDER = "InvalidAccount.UnpaidOrder"
+// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported"
+// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed"
+// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound"
+// INVALIDPARAMETER = "InvalidParameter"
+// INVALIDPARAMETERCOMBINATION = "InvalidParameterCombination"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed"
+// INVALIDPARAMETERVALUE_INVALIDAPPIDFORMAT = "InvalidParameterValue.InvalidAppIdFormat"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range"
+// INVALIDPERMISSION = "InvalidPermission"
+// MISSINGPARAMETER = "MissingParameter"
+// UNSUPPORTEDOPERATION_BANDWIDTHPACKAGEIDNOTSUPPORTED = "UnsupportedOperation.BandwidthPackageIdNotSupported"
+func (c *Client) InquiryPriceResetInstancesInternetMaxBandwidthWithContext(ctx context.Context, request *InquiryPriceResetInstancesInternetMaxBandwidthRequest) (response *InquiryPriceResetInstancesInternetMaxBandwidthResponse, err error) {
+ if request == nil {
+ request = NewInquiryPriceResetInstancesInternetMaxBandwidthRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("InquiryPriceResetInstancesInternetMaxBandwidth require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewInquiryPriceResetInstancesInternetMaxBandwidthResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewInquiryPriceResetInstancesTypeRequest() (request *InquiryPriceResetInstancesTypeRequest) {
+ request = &InquiryPriceResetInstancesTypeRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("cvm", APIVersion, "InquiryPriceResetInstancesType")
+
+
+ return
+}
+
+func NewInquiryPriceResetInstancesTypeResponse() (response *InquiryPriceResetInstancesTypeResponse) {
+ response = &InquiryPriceResetInstancesTypeResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// InquiryPriceResetInstancesType
+// This API is used to query the price for adjusting the instance model.
+//
+//
+//
+// * Currently, you can only use this API to query the prices of instances whose [system disk type](https://intl.cloud.tencent.com/document/api/213/9452?from_cn_redirect=1#block_device) is `CLOUD_BASIC`, `CLOUD_PREMIUM`, or `CLOUD_SSD`.
+//
+// * Currently, you cannot use this API to query the prices of [CDH](https://intl.cloud.tencent.com/document/product/416?from_cn_redirect=1) instances.
+//
+// error code that may be returned:
+// FAILEDOPERATION_INQUIRYREFUNDPRICEFAILED = "FailedOperation.InquiryRefundPriceFailed"
+// INTERNALERROR_TRADEUNKNOWNERROR = "InternalError.TradeUnknownError"
+// INTERNALSERVERERROR = "InternalServerError"
+// INVALIDACCOUNT_INSUFFICIENTBALANCE = "InvalidAccount.InsufficientBalance"
+// INVALIDACCOUNT_UNPAIDORDER = "InvalidAccount.UnpaidOrder"
+// INVALIDHOSTID_MALFORMED = "InvalidHostId.Malformed"
+// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported"
+// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed"
+// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound"
+// INVALIDINSTANCETYPE_MALFORMED = "InvalidInstanceType.Malformed"
+// INVALIDPARAMETER = "InvalidParameter"
+// INVALIDPARAMETER_HOSTIDCUSTOMIZEDINSTANCETYPENOTSUPPORT = "InvalidParameter.HostIdCustomizedInstanceTypeNotSupport"
+// INVALIDPARAMETER_HOSTIDINSTANCETYPENOTSUPPORT = "InvalidParameter.HostIdInstanceTypeNotSupport"
+// INVALIDPARAMETER_HOSTIDSTANDARDINSTANCETYPENOTSUPPORT = "InvalidParameter.HostIdStandardInstanceTypeNotSupport"
+// INVALIDPARAMETER_INSTANCETYPESUPPORTEDHOSTNOTFOUND = "InvalidParameter.InstanceTypeSupportedHostNotFound"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPARAMETERVALUE_BASICNETWORKINSTANCEFAMILY = "InvalidParameterValue.BasicNetworkInstanceFamily"
+// INVALIDPARAMETERVALUE_GPUINSTANCEFAMILY = "InvalidParameterValue.GPUInstanceFamily"
+// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed"
+// INVALIDPARAMETERVALUE_INVALIDAPPIDFORMAT = "InvalidParameterValue.InvalidAppIdFormat"
+// INVALIDPARAMETERVALUE_INVALIDINSTANCESOURCE = "InvalidParameterValue.InvalidInstanceSource"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// INVALIDPERIOD = "InvalidPeriod"
+// INVALIDPERMISSION = "InvalidPermission"
+// INVALIDPROJECTID_NOTFOUND = "InvalidProjectId.NotFound"
+// INVALIDZONE_MISMATCHREGION = "InvalidZone.MismatchRegion"
+// LIMITEXCEEDED_EIPNUMLIMIT = "LimitExceeded.EipNumLimit"
+// LIMITEXCEEDED_ENINUMLIMIT = "LimitExceeded.EniNumLimit"
+// LIMITEXCEEDED_INSTANCETYPEBANDWIDTH = "LimitExceeded.InstanceTypeBandwidth"
+// MISSINGPARAMETER = "MissingParameter"
+// RESOURCEINSUFFICIENT_CLOUDDISKUNAVAILABLE = "ResourceInsufficient.CloudDiskUnavailable"
+// RESOURCEINSUFFICIENT_SPECIFIEDINSTANCETYPE = "ResourceInsufficient.SpecifiedInstanceType"
+// RESOURCEUNAVAILABLE_INSTANCETYPE = "ResourceUnavailable.InstanceType"
+// RESOURCESSOLDOUT_SPECIFIEDINSTANCETYPE = "ResourcesSoldOut.SpecifiedInstanceType"
+// UNSUPPORTEDOPERATION_HETEROGENEOUSCHANGEINSTANCEFAMILY = "UnsupportedOperation.HeterogeneousChangeInstanceFamily"
+// UNSUPPORTEDOPERATION_LOCALDATADISKCHANGEINSTANCEFAMILY = "UnsupportedOperation.LocalDataDiskChangeInstanceFamily"
+// UNSUPPORTEDOPERATION_ORIGINALINSTANCETYPEINVALID = "UnsupportedOperation.OriginalInstanceTypeInvalid"
+// UNSUPPORTEDOPERATION_STOPPEDMODESTOPCHARGING = "UnsupportedOperation.StoppedModeStopCharging"
+// UNSUPPORTEDOPERATION_STOPPEDMODESTOPCHARGINGSAMEFAMILY = "UnsupportedOperation.StoppedModeStopChargingSameFamily"
+// UNSUPPORTEDOPERATION_UNSUPPORTEDARMCHANGEINSTANCEFAMILY = "UnsupportedOperation.UnsupportedARMChangeInstanceFamily"
+// UNSUPPORTEDOPERATION_UNSUPPORTEDCHANGEINSTANCEFAMILY = "UnsupportedOperation.UnsupportedChangeInstanceFamily"
+// UNSUPPORTEDOPERATION_UNSUPPORTEDCHANGEINSTANCEFAMILYTOARM = "UnsupportedOperation.UnsupportedChangeInstanceFamilyToARM"
+// UNSUPPORTEDOPERATION_UNSUPPORTEDCHANGEINSTANCETOTHISINSTANCEFAMILY = "UnsupportedOperation.UnsupportedChangeInstanceToThisInstanceFamily"
+func (c *Client) InquiryPriceResetInstancesType(request *InquiryPriceResetInstancesTypeRequest) (response *InquiryPriceResetInstancesTypeResponse, err error) {
+ return c.InquiryPriceResetInstancesTypeWithContext(context.Background(), request)
+}
+
+// InquiryPriceResetInstancesType
+// This API is used to query the price for adjusting the instance model.
+//
+//
+//
+// * Currently, you can only use this API to query the prices of instances whose [system disk type](https://intl.cloud.tencent.com/document/api/213/9452?from_cn_redirect=1#block_device) is `CLOUD_BASIC`, `CLOUD_PREMIUM`, or `CLOUD_SSD`.
+//
+// * Currently, you cannot use this API to query the prices of [CDH](https://intl.cloud.tencent.com/document/product/416?from_cn_redirect=1) instances.
+//
+// error code that may be returned:
+// FAILEDOPERATION_INQUIRYREFUNDPRICEFAILED = "FailedOperation.InquiryRefundPriceFailed"
+// INTERNALERROR_TRADEUNKNOWNERROR = "InternalError.TradeUnknownError"
+// INTERNALSERVERERROR = "InternalServerError"
+// INVALIDACCOUNT_INSUFFICIENTBALANCE = "InvalidAccount.InsufficientBalance"
+// INVALIDACCOUNT_UNPAIDORDER = "InvalidAccount.UnpaidOrder"
+// INVALIDHOSTID_MALFORMED = "InvalidHostId.Malformed"
+// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported"
+// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed"
+// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound"
+// INVALIDINSTANCETYPE_MALFORMED = "InvalidInstanceType.Malformed"
+// INVALIDPARAMETER = "InvalidParameter"
+// INVALIDPARAMETER_HOSTIDCUSTOMIZEDINSTANCETYPENOTSUPPORT = "InvalidParameter.HostIdCustomizedInstanceTypeNotSupport"
+// INVALIDPARAMETER_HOSTIDINSTANCETYPENOTSUPPORT = "InvalidParameter.HostIdInstanceTypeNotSupport"
+// INVALIDPARAMETER_HOSTIDSTANDARDINSTANCETYPENOTSUPPORT = "InvalidParameter.HostIdStandardInstanceTypeNotSupport"
+// INVALIDPARAMETER_INSTANCETYPESUPPORTEDHOSTNOTFOUND = "InvalidParameter.InstanceTypeSupportedHostNotFound"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPARAMETERVALUE_BASICNETWORKINSTANCEFAMILY = "InvalidParameterValue.BasicNetworkInstanceFamily"
+// INVALIDPARAMETERVALUE_GPUINSTANCEFAMILY = "InvalidParameterValue.GPUInstanceFamily"
+// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed"
+// INVALIDPARAMETERVALUE_INVALIDAPPIDFORMAT = "InvalidParameterValue.InvalidAppIdFormat"
+// INVALIDPARAMETERVALUE_INVALIDINSTANCESOURCE = "InvalidParameterValue.InvalidInstanceSource"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// INVALIDPERIOD = "InvalidPeriod"
+// INVALIDPERMISSION = "InvalidPermission"
+// INVALIDPROJECTID_NOTFOUND = "InvalidProjectId.NotFound"
+// INVALIDZONE_MISMATCHREGION = "InvalidZone.MismatchRegion"
+// LIMITEXCEEDED_EIPNUMLIMIT = "LimitExceeded.EipNumLimit"
+// LIMITEXCEEDED_ENINUMLIMIT = "LimitExceeded.EniNumLimit"
+// LIMITEXCEEDED_INSTANCETYPEBANDWIDTH = "LimitExceeded.InstanceTypeBandwidth"
+// MISSINGPARAMETER = "MissingParameter"
+// RESOURCEINSUFFICIENT_CLOUDDISKUNAVAILABLE = "ResourceInsufficient.CloudDiskUnavailable"
+// RESOURCEINSUFFICIENT_SPECIFIEDINSTANCETYPE = "ResourceInsufficient.SpecifiedInstanceType"
+// RESOURCEUNAVAILABLE_INSTANCETYPE = "ResourceUnavailable.InstanceType"
+// RESOURCESSOLDOUT_SPECIFIEDINSTANCETYPE = "ResourcesSoldOut.SpecifiedInstanceType"
+// UNSUPPORTEDOPERATION_HETEROGENEOUSCHANGEINSTANCEFAMILY = "UnsupportedOperation.HeterogeneousChangeInstanceFamily"
+// UNSUPPORTEDOPERATION_LOCALDATADISKCHANGEINSTANCEFAMILY = "UnsupportedOperation.LocalDataDiskChangeInstanceFamily"
+// UNSUPPORTEDOPERATION_ORIGINALINSTANCETYPEINVALID = "UnsupportedOperation.OriginalInstanceTypeInvalid"
+// UNSUPPORTEDOPERATION_STOPPEDMODESTOPCHARGING = "UnsupportedOperation.StoppedModeStopCharging"
+// UNSUPPORTEDOPERATION_STOPPEDMODESTOPCHARGINGSAMEFAMILY = "UnsupportedOperation.StoppedModeStopChargingSameFamily"
+// UNSUPPORTEDOPERATION_UNSUPPORTEDARMCHANGEINSTANCEFAMILY = "UnsupportedOperation.UnsupportedARMChangeInstanceFamily"
+// UNSUPPORTEDOPERATION_UNSUPPORTEDCHANGEINSTANCEFAMILY = "UnsupportedOperation.UnsupportedChangeInstanceFamily"
+// UNSUPPORTEDOPERATION_UNSUPPORTEDCHANGEINSTANCEFAMILYTOARM = "UnsupportedOperation.UnsupportedChangeInstanceFamilyToARM"
+// UNSUPPORTEDOPERATION_UNSUPPORTEDCHANGEINSTANCETOTHISINSTANCEFAMILY = "UnsupportedOperation.UnsupportedChangeInstanceToThisInstanceFamily"
+func (c *Client) InquiryPriceResetInstancesTypeWithContext(ctx context.Context, request *InquiryPriceResetInstancesTypeRequest) (response *InquiryPriceResetInstancesTypeResponse, err error) {
+ if request == nil {
+ request = NewInquiryPriceResetInstancesTypeRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("InquiryPriceResetInstancesType require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewInquiryPriceResetInstancesTypeResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewInquiryPriceResizeInstanceDisksRequest() (request *InquiryPriceResizeInstanceDisksRequest) {
+ request = &InquiryPriceResizeInstanceDisksRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("cvm", APIVersion, "InquiryPriceResizeInstanceDisks")
+
+
+ return
+}
+
+func NewInquiryPriceResizeInstanceDisksResponse() (response *InquiryPriceResizeInstanceDisksResponse) {
+ response = &InquiryPriceResizeInstanceDisksResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// InquiryPriceResizeInstanceDisks
+// This API is used to query the price for expanding data disks of an instance.
+//
+//
+//
+// * Currently, you can only use this API to query the price of non-elastic data disks whose [disk type](https://intl.cloud.tencent.com/document/api/213/9452?from_cn_redirect=1#block_device) is `CLOUD_BASIC`, `CLOUD_PREMIUM`, or `CLOUD_SSD`. You can use [`DescribeDisks`](https://intl.cloud.tencent.com/document/api/362/16315?from_cn_redirect=1) to check whether a disk is elastic. If the `Portable` field in the response is `false`, it means that the disk is non-elastic.
+//
+// * Currently, you cannot use this API to query the price for [CDH](https://intl.cloud.tencent.com/document/product/416?from_cn_redirect=1) instances. *Also, you can only query the price of expanding one data disk at a time.
+//
+// error code that may be returned:
+// INTERNALERROR_TRADEUNKNOWNERROR = "InternalError.TradeUnknownError"
+// INTERNALSERVERERROR = "InternalServerError"
+// INVALIDACCOUNT_INSUFFICIENTBALANCE = "InvalidAccount.InsufficientBalance"
+// INVALIDACCOUNT_UNPAIDORDER = "InvalidAccount.UnpaidOrder"
+// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported"
+// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed"
+// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed"
+// INVALIDPARAMETERVALUE_SNAPSHOTIDMALFORMED = "InvalidParameterValue.SnapshotIdMalformed"
+// INVALIDPARAMETERVALUE_ZONENOTSUPPORTED = "InvalidParameterValue.ZoneNotSupported"
+// MISSINGPARAMETER = "MissingParameter"
+// MISSINGPARAMETER_ATLEASTONE = "MissingParameter.AtLeastOne"
+// RESOURCEINSUFFICIENT_CLOUDDISKUNAVAILABLE = "ResourceInsufficient.CloudDiskUnavailable"
+// UNSUPPORTEDOPERATION_INSTANCESTATECORRUPTED = "UnsupportedOperation.InstanceStateCorrupted"
+// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPED = "UnsupportedOperation.InstanceStateStopped"
+// UNSUPPORTEDOPERATION_INVALIDDISK = "UnsupportedOperation.InvalidDisk"
+// UNSUPPORTEDOPERATION_LOCALDISKMIGRATINGTOCLOUDDISK = "UnsupportedOperation.LocalDiskMigratingToCloudDisk"
+func (c *Client) InquiryPriceResizeInstanceDisks(request *InquiryPriceResizeInstanceDisksRequest) (response *InquiryPriceResizeInstanceDisksResponse, err error) {
+ return c.InquiryPriceResizeInstanceDisksWithContext(context.Background(), request)
+}
+
+// InquiryPriceResizeInstanceDisks
+// This API is used to query the price for expanding data disks of an instance.
+//
+//
+//
+// * Currently, you can only use this API to query the price of non-elastic data disks whose [disk type](https://intl.cloud.tencent.com/document/api/213/9452?from_cn_redirect=1#block_device) is `CLOUD_BASIC`, `CLOUD_PREMIUM`, or `CLOUD_SSD`. You can use [`DescribeDisks`](https://intl.cloud.tencent.com/document/api/362/16315?from_cn_redirect=1) to check whether a disk is elastic. If the `Portable` field in the response is `false`, it means that the disk is non-elastic.
+//
+// * Currently, you cannot use this API to query the price for [CDH](https://intl.cloud.tencent.com/document/product/416?from_cn_redirect=1) instances. *Also, you can only query the price of expanding one data disk at a time.
+//
+// error code that may be returned:
+// INTERNALERROR_TRADEUNKNOWNERROR = "InternalError.TradeUnknownError"
+// INTERNALSERVERERROR = "InternalServerError"
+// INVALIDACCOUNT_INSUFFICIENTBALANCE = "InvalidAccount.InsufficientBalance"
+// INVALIDACCOUNT_UNPAIDORDER = "InvalidAccount.UnpaidOrder"
+// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported"
+// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed"
+// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed"
+// INVALIDPARAMETERVALUE_SNAPSHOTIDMALFORMED = "InvalidParameterValue.SnapshotIdMalformed"
+// INVALIDPARAMETERVALUE_ZONENOTSUPPORTED = "InvalidParameterValue.ZoneNotSupported"
+// MISSINGPARAMETER = "MissingParameter"
+// MISSINGPARAMETER_ATLEASTONE = "MissingParameter.AtLeastOne"
+// RESOURCEINSUFFICIENT_CLOUDDISKUNAVAILABLE = "ResourceInsufficient.CloudDiskUnavailable"
+// UNSUPPORTEDOPERATION_INSTANCESTATECORRUPTED = "UnsupportedOperation.InstanceStateCorrupted"
+// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPED = "UnsupportedOperation.InstanceStateStopped"
+// UNSUPPORTEDOPERATION_INVALIDDISK = "UnsupportedOperation.InvalidDisk"
+// UNSUPPORTEDOPERATION_LOCALDISKMIGRATINGTOCLOUDDISK = "UnsupportedOperation.LocalDiskMigratingToCloudDisk"
+func (c *Client) InquiryPriceResizeInstanceDisksWithContext(ctx context.Context, request *InquiryPriceResizeInstanceDisksRequest) (response *InquiryPriceResizeInstanceDisksResponse, err error) {
+ if request == nil {
+ request = NewInquiryPriceResizeInstanceDisksRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("InquiryPriceResizeInstanceDisks require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewInquiryPriceResizeInstanceDisksResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewInquiryPriceRunInstancesRequest() (request *InquiryPriceRunInstancesRequest) {
+ request = &InquiryPriceRunInstancesRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("cvm", APIVersion, "InquiryPriceRunInstances")
+
+
+ return
+}
+
+func NewInquiryPriceRunInstancesResponse() (response *InquiryPriceRunInstancesResponse) {
+ response = &InquiryPriceRunInstancesResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// InquiryPriceRunInstances
+// This API is used to query the price of creating instances. You can only use this API for instances whose configuration is within the purchase limit. For more information, see [RunInstances](https://intl.cloud.tencent.com/document/api/213/15730?from_cn_redirect=1).
+//
+// error code that may be returned:
+// ACCOUNTQUALIFICATIONRESTRICTIONS = "AccountQualificationRestrictions"
+// AUTHFAILURE_CAMROLENAMEAUTHENTICATEFAILED = "AuthFailure.CamRoleNameAuthenticateFailed"
+// FAILEDOPERATION_DISASTERRECOVERGROUPNOTFOUND = "FailedOperation.DisasterRecoverGroupNotFound"
+// FAILEDOPERATION_ILLEGALTAGKEY = "FailedOperation.IllegalTagKey"
+// FAILEDOPERATION_ILLEGALTAGVALUE = "FailedOperation.IllegalTagValue"
+// FAILEDOPERATION_INQUIRYPRICEFAILED = "FailedOperation.InquiryPriceFailed"
+// FAILEDOPERATION_SNAPSHOTSIZELARGERTHANDATASIZE = "FailedOperation.SnapshotSizeLargerThanDataSize"
+// FAILEDOPERATION_TAGKEYRESERVED = "FailedOperation.TagKeyReserved"
+// FAILEDOPERATION_TATAGENTNOTSUPPORT = "FailedOperation.TatAgentNotSupport"
+// INSTANCESQUOTALIMITEXCEEDED = "InstancesQuotaLimitExceeded"
+// INTERNALERROR_TRADEUNKNOWNERROR = "InternalError.TradeUnknownError"
+// INVALIDCLIENTTOKEN_TOOLONG = "InvalidClientToken.TooLong"
+// INVALIDHOSTID_MALFORMED = "InvalidHostId.Malformed"
+// INVALIDHOSTID_NOTFOUND = "InvalidHostId.NotFound"
+// INVALIDIMAGEID_MALFORMED = "InvalidImageId.Malformed"
+// INVALIDIMAGEID_NOTFOUND = "InvalidImageId.NotFound"
+// INVALIDINSTANCENAME_TOOLONG = "InvalidInstanceName.TooLong"
+// INVALIDINSTANCETYPE_MALFORMED = "InvalidInstanceType.Malformed"
+// INVALIDPARAMETER_EDGEZONEMISSINTERNETACCESSIBLE = "InvalidParameter.EdgeZoneMissInternetAccessible"
+// INVALIDPARAMETER_HOSTIDCUSTOMIZEDINSTANCETYPENOTSUPPORT = "InvalidParameter.HostIdCustomizedInstanceTypeNotSupport"
+// INVALIDPARAMETER_HOSTIDINSTANCETYPENOTSUPPORT = "InvalidParameter.HostIdInstanceTypeNotSupport"
+// INVALIDPARAMETER_HOSTIDSTANDARDINSTANCETYPENOTSUPPORT = "InvalidParameter.HostIdStandardInstanceTypeNotSupport"
+// INVALIDPARAMETER_INSTANCEIMAGENOTSUPPORT = "InvalidParameter.InstanceImageNotSupport"
+// INVALIDPARAMETER_INSTANCETYPESUPPORTEDHOSTNOTFOUND = "InvalidParameter.InstanceTypeSupportedHostNotFound"
+// INVALIDPARAMETER_INTERNETACCESSIBLENOTSUPPORTED = "InvalidParameter.InternetAccessibleNotSupported"
+// INVALIDPARAMETER_ONLYSUPPORTFOREDGEZONE = "InvalidParameter.OnlySupportForEdgeZone"
+// INVALIDPARAMETER_SNAPSHOTNOTFOUND = "InvalidParameter.SnapshotNotFound"
+// INVALIDPARAMETER_SPECIALPARAMETERFORSPECIALACCOUNT = "InvalidParameter.SpecialParameterForSpecialAccount"
+// INVALIDPARAMETERCOMBINATION = "InvalidParameterCombination"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPARAMETERVALUE_BANDWIDTHPACKAGEIDMALFORMED = "InvalidParameterValue.BandwidthPackageIdMalformed"
+// INVALIDPARAMETERVALUE_BANDWIDTHPACKAGEIDNOTFOUND = "InvalidParameterValue.BandwidthPackageIdNotFound"
+// INVALIDPARAMETERVALUE_BANDWIDTHPACKAGEISPNOTMATCH = "InvalidParameterValue.BandwidthPackageIspNotMatch"
+// INVALIDPARAMETERVALUE_BANDWIDTHPACKAGEZONENOTMATCH = "InvalidParameterValue.BandwidthPackageZoneNotMatch"
+// INVALIDPARAMETERVALUE_CLOUDSSDDATADISKSIZETOOSMALL = "InvalidParameterValue.CloudSsdDataDiskSizeTooSmall"
+// INVALIDPARAMETERVALUE_DUPLICATETAGS = "InvalidParameterValue.DuplicateTags"
+// INVALIDPARAMETERVALUE_INSTANCETYPENOTFOUND = "InvalidParameterValue.InstanceTypeNotFound"
+// INVALIDPARAMETERVALUE_INSTANCETYPENOTSUPPORTHPCCLUSTER = "InvalidParameterValue.InstanceTypeNotSupportHpcCluster"
+// INVALIDPARAMETERVALUE_INSTANCETYPEREQUIREDHPCCLUSTER = "InvalidParameterValue.InstanceTypeRequiredHpcCluster"
+// INVALIDPARAMETERVALUE_INSUFFICIENTPRICE = "InvalidParameterValue.InsufficientPrice"
+// INVALIDPARAMETERVALUE_INVALIDAPPIDFORMAT = "InvalidParameterValue.InvalidAppIdFormat"
+// INVALIDPARAMETERVALUE_INVALIDIMAGEFORMAT = "InvalidParameterValue.InvalidImageFormat"
+// INVALIDPARAMETERVALUE_INVALIDIMAGEID = "InvalidParameterValue.InvalidImageId"
+// INVALIDPARAMETERVALUE_INVALIDIMAGEOSNAME = "InvalidParameterValue.InvalidImageOsName"
+// INVALIDPARAMETERVALUE_INVALIDIMAGESTATE = "InvalidParameterValue.InvalidImageState"
+// INVALIDPARAMETERVALUE_INVALIDTIMEFORMAT = "InvalidParameterValue.InvalidTimeFormat"
+// INVALIDPARAMETERVALUE_INVALIDUSERDATAFORMAT = "InvalidParameterValue.InvalidUserDataFormat"
+// INVALIDPARAMETERVALUE_ISPNOTSUPPORTFOREDGEZONE = "InvalidParameterValue.IspNotSupportForEdgeZone"
+// INVALIDPARAMETERVALUE_ISPVALUEREPEATED = "InvalidParameterValue.IspValueRepeated"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range"
+// INVALIDPARAMETERVALUE_REQUIREDLOCATIONIMAGE = "InvalidParameterValue.RequiredLocationImage"
+// INVALIDPARAMETERVALUE_SNAPSHOTIDMALFORMED = "InvalidParameterValue.SnapshotIdMalformed"
+// INVALIDPARAMETERVALUE_TAGKEYNOTFOUND = "InvalidParameterValue.TagKeyNotFound"
+// INVALIDPARAMETERVALUE_TAGQUOTALIMITEXCEEDED = "InvalidParameterValue.TagQuotaLimitExceeded"
+// INVALIDPARAMETERVALUE_ZONENOTSUPPORTED = "InvalidParameterValue.ZoneNotSupported"
+// INVALIDPASSWORD = "InvalidPassword"
+// INVALIDPERIOD = "InvalidPeriod"
+// INVALIDPERMISSION = "InvalidPermission"
+// INVALIDPROJECTID_NOTFOUND = "InvalidProjectId.NotFound"
+// INVALIDZONE_MISMATCHREGION = "InvalidZone.MismatchRegion"
+// LIMITEXCEEDED_DISASTERRECOVERGROUP = "LimitExceeded.DisasterRecoverGroup"
+// LIMITEXCEEDED_INSTANCEENINUMLIMIT = "LimitExceeded.InstanceEniNumLimit"
+// MISSINGPARAMETER = "MissingParameter"
+// MISSINGPARAMETER_MONITORSERVICE = "MissingParameter.MonitorService"
+// RESOURCEINSUFFICIENT_CLOUDDISKUNAVAILABLE = "ResourceInsufficient.CloudDiskUnavailable"
+// RESOURCEINSUFFICIENT_DISASTERRECOVERGROUPCVMQUOTA = "ResourceInsufficient.DisasterRecoverGroupCvmQuota"
+// RESOURCENOTFOUND_HPCCLUSTER = "ResourceNotFound.HpcCluster"
+// RESOURCENOTFOUND_NODEFAULTCBS = "ResourceNotFound.NoDefaultCbs"
+// RESOURCENOTFOUND_NODEFAULTCBSWITHREASON = "ResourceNotFound.NoDefaultCbsWithReason"
+// RESOURCEUNAVAILABLE_INSTANCETYPE = "ResourceUnavailable.InstanceType"
+// RESOURCESSOLDOUT_SPECIFIEDINSTANCETYPE = "ResourcesSoldOut.SpecifiedInstanceType"
+// UNSUPPORTEDOPERATION_BANDWIDTHPACKAGEIDNOTSUPPORTED = "UnsupportedOperation.BandwidthPackageIdNotSupported"
+// UNSUPPORTEDOPERATION_INSTANCETYPENOTSUPPORTJUMBOFRAME = "UnsupportedOperation.InstanceTypeNotSupportJumboFrame"
+// UNSUPPORTEDOPERATION_INVALIDDISK = "UnsupportedOperation.InvalidDisk"
+// UNSUPPORTEDOPERATION_INVALIDREGIONDISKENCRYPT = "UnsupportedOperation.InvalidRegionDiskEncrypt"
+// UNSUPPORTEDOPERATION_NOINSTANCETYPESUPPORTSPOT = "UnsupportedOperation.NoInstanceTypeSupportSpot"
+// UNSUPPORTEDOPERATION_NOTSUPPORTIMPORTINSTANCESACTIONTIMER = "UnsupportedOperation.NotSupportImportInstancesActionTimer"
+// UNSUPPORTEDOPERATION_ONLYFORPREPAIDACCOUNT = "UnsupportedOperation.OnlyForPrepaidAccount"
+// UNSUPPORTEDOPERATION_SPOTUNSUPPORTEDREGION = "UnsupportedOperation.SpotUnsupportedRegion"
+// UNSUPPORTEDOPERATION_UNDERWRITINGINSTANCETYPEONLYSUPPORTAUTORENEW = "UnsupportedOperation.UnderwritingInstanceTypeOnlySupportAutoRenew"
+// UNSUPPORTEDOPERATION_UNSUPPORTEDINTERNATIONALUSER = "UnsupportedOperation.UnsupportedInternationalUser"
+func (c *Client) InquiryPriceRunInstances(request *InquiryPriceRunInstancesRequest) (response *InquiryPriceRunInstancesResponse, err error) {
+ return c.InquiryPriceRunInstancesWithContext(context.Background(), request)
+}
+
+// InquiryPriceRunInstances
+// This API is used to query the price of creating instances. You can only use this API for instances whose configuration is within the purchase limit. For more information, see [RunInstances](https://intl.cloud.tencent.com/document/api/213/15730?from_cn_redirect=1).
+//
+// error code that may be returned:
+// ACCOUNTQUALIFICATIONRESTRICTIONS = "AccountQualificationRestrictions"
+// AUTHFAILURE_CAMROLENAMEAUTHENTICATEFAILED = "AuthFailure.CamRoleNameAuthenticateFailed"
+// FAILEDOPERATION_DISASTERRECOVERGROUPNOTFOUND = "FailedOperation.DisasterRecoverGroupNotFound"
+// FAILEDOPERATION_ILLEGALTAGKEY = "FailedOperation.IllegalTagKey"
+// FAILEDOPERATION_ILLEGALTAGVALUE = "FailedOperation.IllegalTagValue"
+// FAILEDOPERATION_INQUIRYPRICEFAILED = "FailedOperation.InquiryPriceFailed"
+// FAILEDOPERATION_SNAPSHOTSIZELARGERTHANDATASIZE = "FailedOperation.SnapshotSizeLargerThanDataSize"
+// FAILEDOPERATION_TAGKEYRESERVED = "FailedOperation.TagKeyReserved"
+// FAILEDOPERATION_TATAGENTNOTSUPPORT = "FailedOperation.TatAgentNotSupport"
+// INSTANCESQUOTALIMITEXCEEDED = "InstancesQuotaLimitExceeded"
+// INTERNALERROR_TRADEUNKNOWNERROR = "InternalError.TradeUnknownError"
+// INVALIDCLIENTTOKEN_TOOLONG = "InvalidClientToken.TooLong"
+// INVALIDHOSTID_MALFORMED = "InvalidHostId.Malformed"
+// INVALIDHOSTID_NOTFOUND = "InvalidHostId.NotFound"
+// INVALIDIMAGEID_MALFORMED = "InvalidImageId.Malformed"
+// INVALIDIMAGEID_NOTFOUND = "InvalidImageId.NotFound"
+// INVALIDINSTANCENAME_TOOLONG = "InvalidInstanceName.TooLong"
+// INVALIDINSTANCETYPE_MALFORMED = "InvalidInstanceType.Malformed"
+// INVALIDPARAMETER_EDGEZONEMISSINTERNETACCESSIBLE = "InvalidParameter.EdgeZoneMissInternetAccessible"
+// INVALIDPARAMETER_HOSTIDCUSTOMIZEDINSTANCETYPENOTSUPPORT = "InvalidParameter.HostIdCustomizedInstanceTypeNotSupport"
+// INVALIDPARAMETER_HOSTIDINSTANCETYPENOTSUPPORT = "InvalidParameter.HostIdInstanceTypeNotSupport"
+// INVALIDPARAMETER_HOSTIDSTANDARDINSTANCETYPENOTSUPPORT = "InvalidParameter.HostIdStandardInstanceTypeNotSupport"
+// INVALIDPARAMETER_INSTANCEIMAGENOTSUPPORT = "InvalidParameter.InstanceImageNotSupport"
+// INVALIDPARAMETER_INSTANCETYPESUPPORTEDHOSTNOTFOUND = "InvalidParameter.InstanceTypeSupportedHostNotFound"
+// INVALIDPARAMETER_INTERNETACCESSIBLENOTSUPPORTED = "InvalidParameter.InternetAccessibleNotSupported"
+// INVALIDPARAMETER_ONLYSUPPORTFOREDGEZONE = "InvalidParameter.OnlySupportForEdgeZone"
+// INVALIDPARAMETER_SNAPSHOTNOTFOUND = "InvalidParameter.SnapshotNotFound"
+// INVALIDPARAMETER_SPECIALPARAMETERFORSPECIALACCOUNT = "InvalidParameter.SpecialParameterForSpecialAccount"
+// INVALIDPARAMETERCOMBINATION = "InvalidParameterCombination"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPARAMETERVALUE_BANDWIDTHPACKAGEIDMALFORMED = "InvalidParameterValue.BandwidthPackageIdMalformed"
+// INVALIDPARAMETERVALUE_BANDWIDTHPACKAGEIDNOTFOUND = "InvalidParameterValue.BandwidthPackageIdNotFound"
+// INVALIDPARAMETERVALUE_BANDWIDTHPACKAGEISPNOTMATCH = "InvalidParameterValue.BandwidthPackageIspNotMatch"
+// INVALIDPARAMETERVALUE_BANDWIDTHPACKAGEZONENOTMATCH = "InvalidParameterValue.BandwidthPackageZoneNotMatch"
+// INVALIDPARAMETERVALUE_CLOUDSSDDATADISKSIZETOOSMALL = "InvalidParameterValue.CloudSsdDataDiskSizeTooSmall"
+// INVALIDPARAMETERVALUE_DUPLICATETAGS = "InvalidParameterValue.DuplicateTags"
+// INVALIDPARAMETERVALUE_INSTANCETYPENOTFOUND = "InvalidParameterValue.InstanceTypeNotFound"
+// INVALIDPARAMETERVALUE_INSTANCETYPENOTSUPPORTHPCCLUSTER = "InvalidParameterValue.InstanceTypeNotSupportHpcCluster"
+// INVALIDPARAMETERVALUE_INSTANCETYPEREQUIREDHPCCLUSTER = "InvalidParameterValue.InstanceTypeRequiredHpcCluster"
+// INVALIDPARAMETERVALUE_INSUFFICIENTPRICE = "InvalidParameterValue.InsufficientPrice"
+// INVALIDPARAMETERVALUE_INVALIDAPPIDFORMAT = "InvalidParameterValue.InvalidAppIdFormat"
+// INVALIDPARAMETERVALUE_INVALIDIMAGEFORMAT = "InvalidParameterValue.InvalidImageFormat"
+// INVALIDPARAMETERVALUE_INVALIDIMAGEID = "InvalidParameterValue.InvalidImageId"
+// INVALIDPARAMETERVALUE_INVALIDIMAGEOSNAME = "InvalidParameterValue.InvalidImageOsName"
+// INVALIDPARAMETERVALUE_INVALIDIMAGESTATE = "InvalidParameterValue.InvalidImageState"
+// INVALIDPARAMETERVALUE_INVALIDTIMEFORMAT = "InvalidParameterValue.InvalidTimeFormat"
+// INVALIDPARAMETERVALUE_INVALIDUSERDATAFORMAT = "InvalidParameterValue.InvalidUserDataFormat"
+// INVALIDPARAMETERVALUE_ISPNOTSUPPORTFOREDGEZONE = "InvalidParameterValue.IspNotSupportForEdgeZone"
+// INVALIDPARAMETERVALUE_ISPVALUEREPEATED = "InvalidParameterValue.IspValueRepeated"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range"
+// INVALIDPARAMETERVALUE_REQUIREDLOCATIONIMAGE = "InvalidParameterValue.RequiredLocationImage"
+// INVALIDPARAMETERVALUE_SNAPSHOTIDMALFORMED = "InvalidParameterValue.SnapshotIdMalformed"
+// INVALIDPARAMETERVALUE_TAGKEYNOTFOUND = "InvalidParameterValue.TagKeyNotFound"
+// INVALIDPARAMETERVALUE_TAGQUOTALIMITEXCEEDED = "InvalidParameterValue.TagQuotaLimitExceeded"
+// INVALIDPARAMETERVALUE_ZONENOTSUPPORTED = "InvalidParameterValue.ZoneNotSupported"
+// INVALIDPASSWORD = "InvalidPassword"
+// INVALIDPERIOD = "InvalidPeriod"
+// INVALIDPERMISSION = "InvalidPermission"
+// INVALIDPROJECTID_NOTFOUND = "InvalidProjectId.NotFound"
+// INVALIDZONE_MISMATCHREGION = "InvalidZone.MismatchRegion"
+// LIMITEXCEEDED_DISASTERRECOVERGROUP = "LimitExceeded.DisasterRecoverGroup"
+// LIMITEXCEEDED_INSTANCEENINUMLIMIT = "LimitExceeded.InstanceEniNumLimit"
+// MISSINGPARAMETER = "MissingParameter"
+// MISSINGPARAMETER_MONITORSERVICE = "MissingParameter.MonitorService"
+// RESOURCEINSUFFICIENT_CLOUDDISKUNAVAILABLE = "ResourceInsufficient.CloudDiskUnavailable"
+// RESOURCEINSUFFICIENT_DISASTERRECOVERGROUPCVMQUOTA = "ResourceInsufficient.DisasterRecoverGroupCvmQuota"
+// RESOURCENOTFOUND_HPCCLUSTER = "ResourceNotFound.HpcCluster"
+// RESOURCENOTFOUND_NODEFAULTCBS = "ResourceNotFound.NoDefaultCbs"
+// RESOURCENOTFOUND_NODEFAULTCBSWITHREASON = "ResourceNotFound.NoDefaultCbsWithReason"
+// RESOURCEUNAVAILABLE_INSTANCETYPE = "ResourceUnavailable.InstanceType"
+// RESOURCESSOLDOUT_SPECIFIEDINSTANCETYPE = "ResourcesSoldOut.SpecifiedInstanceType"
+// UNSUPPORTEDOPERATION_BANDWIDTHPACKAGEIDNOTSUPPORTED = "UnsupportedOperation.BandwidthPackageIdNotSupported"
+// UNSUPPORTEDOPERATION_INSTANCETYPENOTSUPPORTJUMBOFRAME = "UnsupportedOperation.InstanceTypeNotSupportJumboFrame"
+// UNSUPPORTEDOPERATION_INVALIDDISK = "UnsupportedOperation.InvalidDisk"
+// UNSUPPORTEDOPERATION_INVALIDREGIONDISKENCRYPT = "UnsupportedOperation.InvalidRegionDiskEncrypt"
+// UNSUPPORTEDOPERATION_NOINSTANCETYPESUPPORTSPOT = "UnsupportedOperation.NoInstanceTypeSupportSpot"
+// UNSUPPORTEDOPERATION_NOTSUPPORTIMPORTINSTANCESACTIONTIMER = "UnsupportedOperation.NotSupportImportInstancesActionTimer"
+// UNSUPPORTEDOPERATION_ONLYFORPREPAIDACCOUNT = "UnsupportedOperation.OnlyForPrepaidAccount"
+// UNSUPPORTEDOPERATION_SPOTUNSUPPORTEDREGION = "UnsupportedOperation.SpotUnsupportedRegion"
+// UNSUPPORTEDOPERATION_UNDERWRITINGINSTANCETYPEONLYSUPPORTAUTORENEW = "UnsupportedOperation.UnderwritingInstanceTypeOnlySupportAutoRenew"
+// UNSUPPORTEDOPERATION_UNSUPPORTEDINTERNATIONALUSER = "UnsupportedOperation.UnsupportedInternationalUser"
+func (c *Client) InquiryPriceRunInstancesWithContext(ctx context.Context, request *InquiryPriceRunInstancesRequest) (response *InquiryPriceRunInstancesResponse, err error) {
+ if request == nil {
+ request = NewInquiryPriceRunInstancesRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("InquiryPriceRunInstances require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewInquiryPriceRunInstancesResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewModifyChcAttributeRequest() (request *ModifyChcAttributeRequest) {
+ request = &ModifyChcAttributeRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("cvm", APIVersion, "ModifyChcAttribute")
+
+
+ return
+}
+
+func NewModifyChcAttributeResponse() (response *ModifyChcAttributeResponse) {
+ response = &ModifyChcAttributeResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// ModifyChcAttribute
+// This API is used to modify the CHC host attributes.
+//
+// error code that may be returned:
+// ACCOUNTQUALIFICATIONRESTRICTIONS = "AccountQualificationRestrictions"
+// INVALIDHOST_NOTSUPPORTED = "InvalidHost.NotSupported"
+// INVALIDPARAMETER = "InvalidParameter"
+// INVALIDPARAMETERVALUE_CHCHOSTSNOTFOUND = "InvalidParameterValue.ChcHostsNotFound"
+// INVALIDPARAMETERVALUE_CHCNETWORKEMPTY = "InvalidParameterValue.ChcNetworkEmpty"
+// INVALIDPARAMETERVALUE_INCORRECTFORMAT = "InvalidParameterValue.IncorrectFormat"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// INVALIDPARAMETERVALUE_NOTEMPTY = "InvalidParameterValue.NotEmpty"
+// INVALIDPASSWORD = "InvalidPassword"
+// INVALIDSECURITYGROUPID_NOTFOUND = "InvalidSecurityGroupId.NotFound"
+func (c *Client) ModifyChcAttribute(request *ModifyChcAttributeRequest) (response *ModifyChcAttributeResponse, err error) {
+ return c.ModifyChcAttributeWithContext(context.Background(), request)
+}
+
+// ModifyChcAttribute
+// This API is used to modify the CHC host attributes.
+//
+// error code that may be returned:
+// ACCOUNTQUALIFICATIONRESTRICTIONS = "AccountQualificationRestrictions"
+// INVALIDHOST_NOTSUPPORTED = "InvalidHost.NotSupported"
+// INVALIDPARAMETER = "InvalidParameter"
+// INVALIDPARAMETERVALUE_CHCHOSTSNOTFOUND = "InvalidParameterValue.ChcHostsNotFound"
+// INVALIDPARAMETERVALUE_CHCNETWORKEMPTY = "InvalidParameterValue.ChcNetworkEmpty"
+// INVALIDPARAMETERVALUE_INCORRECTFORMAT = "InvalidParameterValue.IncorrectFormat"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// INVALIDPARAMETERVALUE_NOTEMPTY = "InvalidParameterValue.NotEmpty"
+// INVALIDPASSWORD = "InvalidPassword"
+// INVALIDSECURITYGROUPID_NOTFOUND = "InvalidSecurityGroupId.NotFound"
+func (c *Client) ModifyChcAttributeWithContext(ctx context.Context, request *ModifyChcAttributeRequest) (response *ModifyChcAttributeResponse, err error) {
+ if request == nil {
+ request = NewModifyChcAttributeRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("ModifyChcAttribute require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewModifyChcAttributeResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewModifyDisasterRecoverGroupAttributeRequest() (request *ModifyDisasterRecoverGroupAttributeRequest) {
+ request = &ModifyDisasterRecoverGroupAttributeRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("cvm", APIVersion, "ModifyDisasterRecoverGroupAttribute")
+
+
+ return
+}
+
+func NewModifyDisasterRecoverGroupAttributeResponse() (response *ModifyDisasterRecoverGroupAttributeResponse) {
+ response = &ModifyDisasterRecoverGroupAttributeResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// ModifyDisasterRecoverGroupAttribute
+// This API is used to modify the attributes of [spread placement groups](https://intl.cloud.tencent.com/document/product/213/15486?from_cn_redirect=1).
+//
+// error code that may be returned:
+// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong"
+// RESOURCEINSUFFICIENT_DISASTERRECOVERGROUPCVMQUOTA = "ResourceInsufficient.DisasterRecoverGroupCvmQuota"
+// RESOURCENOTFOUND_INVALIDPLACEMENTSET = "ResourceNotFound.InvalidPlacementSet"
+func (c *Client) ModifyDisasterRecoverGroupAttribute(request *ModifyDisasterRecoverGroupAttributeRequest) (response *ModifyDisasterRecoverGroupAttributeResponse, err error) {
+ return c.ModifyDisasterRecoverGroupAttributeWithContext(context.Background(), request)
+}
+
+// ModifyDisasterRecoverGroupAttribute
+// This API is used to modify the attributes of [spread placement groups](https://intl.cloud.tencent.com/document/product/213/15486?from_cn_redirect=1).
+//
+// error code that may be returned:
+// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong"
+// RESOURCEINSUFFICIENT_DISASTERRECOVERGROUPCVMQUOTA = "ResourceInsufficient.DisasterRecoverGroupCvmQuota"
+// RESOURCENOTFOUND_INVALIDPLACEMENTSET = "ResourceNotFound.InvalidPlacementSet"
+func (c *Client) ModifyDisasterRecoverGroupAttributeWithContext(ctx context.Context, request *ModifyDisasterRecoverGroupAttributeRequest) (response *ModifyDisasterRecoverGroupAttributeResponse, err error) {
+ if request == nil {
+ request = NewModifyDisasterRecoverGroupAttributeRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("ModifyDisasterRecoverGroupAttribute require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewModifyDisasterRecoverGroupAttributeResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewModifyHostsAttributeRequest() (request *ModifyHostsAttributeRequest) {
+ request = &ModifyHostsAttributeRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("cvm", APIVersion, "ModifyHostsAttribute")
+
+
+ return
+}
+
+func NewModifyHostsAttributeResponse() (response *ModifyHostsAttributeResponse) {
+ response = &ModifyHostsAttributeResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// ModifyHostsAttribute
+// This API is used to modify the attributes of a CDH instance, such as instance name and renewal flag. One of the two parameters, HostName and RenewFlag, must be set, but you cannot set both of them at the same time.
+//
+// error code that may be returned:
+// INVALIDHOST_NOTSUPPORTED = "InvalidHost.NotSupported"
+// INVALIDHOSTID_MALFORMED = "InvalidHostId.Malformed"
+// INVALIDHOSTID_NOTFOUND = "InvalidHostId.NotFound"
+// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported"
+func (c *Client) ModifyHostsAttribute(request *ModifyHostsAttributeRequest) (response *ModifyHostsAttributeResponse, err error) {
+ return c.ModifyHostsAttributeWithContext(context.Background(), request)
+}
+
+// ModifyHostsAttribute
+// This API is used to modify the attributes of a CDH instance, such as instance name and renewal flag. One of the two parameters, HostName and RenewFlag, must be set, but you cannot set both of them at the same time.
+//
+// error code that may be returned:
+// INVALIDHOST_NOTSUPPORTED = "InvalidHost.NotSupported"
+// INVALIDHOSTID_MALFORMED = "InvalidHostId.Malformed"
+// INVALIDHOSTID_NOTFOUND = "InvalidHostId.NotFound"
+// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported"
+func (c *Client) ModifyHostsAttributeWithContext(ctx context.Context, request *ModifyHostsAttributeRequest) (response *ModifyHostsAttributeResponse, err error) {
+ if request == nil {
+ request = NewModifyHostsAttributeRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("ModifyHostsAttribute require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewModifyHostsAttributeResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewModifyImageAttributeRequest() (request *ModifyImageAttributeRequest) {
+ request = &ModifyImageAttributeRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("cvm", APIVersion, "ModifyImageAttribute")
+
+
+ return
+}
+
+func NewModifyImageAttributeResponse() (response *ModifyImageAttributeResponse) {
+ response = &ModifyImageAttributeResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// ModifyImageAttribute
+// This API is used to modify image attributes.
+//
+//
+//
+// * Attributes of shared images cannot be modified.
+//
+// error code that may be returned:
+// INVALIDIMAGEID_INCORRECTSTATE = "InvalidImageId.IncorrectState"
+// INVALIDIMAGEID_MALFORMED = "InvalidImageId.Malformed"
+// INVALIDIMAGEID_NOTFOUND = "InvalidImageId.NotFound"
+// INVALIDIMAGENAME_DUPLICATE = "InvalidImageName.Duplicate"
+// INVALIDPARAMETERVALUE_INVALIDAPPIDFORMAT = "InvalidParameterValue.InvalidAppIdFormat"
+// INVALIDPARAMETERVALUE_INVALIDIMAGEFAMILY = "InvalidParameterValue.InvalidImageFamily"
+// INVALIDPARAMETERVALUE_TOOLARGE = "InvalidParameterValue.TooLarge"
+// UNAUTHORIZEDOPERATION_INVALIDTOKEN = "UnauthorizedOperation.InvalidToken"
+func (c *Client) ModifyImageAttribute(request *ModifyImageAttributeRequest) (response *ModifyImageAttributeResponse, err error) {
+ return c.ModifyImageAttributeWithContext(context.Background(), request)
+}
+
+// ModifyImageAttribute
+// This API is used to modify image attributes.
+//
+//
+//
+// * Attributes of shared images cannot be modified.
+//
+// error code that may be returned:
+// INVALIDIMAGEID_INCORRECTSTATE = "InvalidImageId.IncorrectState"
+// INVALIDIMAGEID_MALFORMED = "InvalidImageId.Malformed"
+// INVALIDIMAGEID_NOTFOUND = "InvalidImageId.NotFound"
+// INVALIDIMAGENAME_DUPLICATE = "InvalidImageName.Duplicate"
+// INVALIDPARAMETERVALUE_INVALIDAPPIDFORMAT = "InvalidParameterValue.InvalidAppIdFormat"
+// INVALIDPARAMETERVALUE_INVALIDIMAGEFAMILY = "InvalidParameterValue.InvalidImageFamily"
+// INVALIDPARAMETERVALUE_TOOLARGE = "InvalidParameterValue.TooLarge"
+// UNAUTHORIZEDOPERATION_INVALIDTOKEN = "UnauthorizedOperation.InvalidToken"
+func (c *Client) ModifyImageAttributeWithContext(ctx context.Context, request *ModifyImageAttributeRequest) (response *ModifyImageAttributeResponse, err error) {
+ if request == nil {
+ request = NewModifyImageAttributeRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("ModifyImageAttribute require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewModifyImageAttributeResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewModifyImageSharePermissionRequest() (request *ModifyImageSharePermissionRequest) {
+ request = &ModifyImageSharePermissionRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("cvm", APIVersion, "ModifyImageSharePermission")
+
+
+ return
+}
+
+func NewModifyImageSharePermissionResponse() (response *ModifyImageSharePermissionResponse) {
+ response = &ModifyImageSharePermissionResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// ModifyImageSharePermission
+// This API is used to modify image sharing information.
+//
+//
+//
+// * The account with shared image access can use the image to create instances.
+//
+// * Each custom image can be shared with a maximum of 500 accounts.
+//
+// * Shared images cannot have their names or description changed. They can only be used to create instances.
+//
+// * Sharing is only supported within the same region as the recipient's account.
+//
+// error code that may be returned:
+// FAILEDOPERATION_ACCOUNTALREADYEXISTS = "FailedOperation.AccountAlreadyExists"
+// FAILEDOPERATION_ACCOUNTISYOURSELF = "FailedOperation.AccountIsYourSelf"
+// FAILEDOPERATION_BYOLIMAGESHAREFAILED = "FailedOperation.BYOLImageShareFailed"
+// FAILEDOPERATION_NOTMASTERACCOUNT = "FailedOperation.NotMasterAccount"
+// FAILEDOPERATION_QIMAGESHAREFAILED = "FailedOperation.QImageShareFailed"
+// FAILEDOPERATION_RIMAGESHAREFAILED = "FailedOperation.RImageShareFailed"
+// INVALIDACCOUNTID_NOTFOUND = "InvalidAccountId.NotFound"
+// INVALIDACCOUNTIS_YOURSELF = "InvalidAccountIs.YourSelf"
+// INVALIDIMAGEID_MALFORMED = "InvalidImageId.Malformed"
+// INVALIDIMAGEID_NOTFOUND = "InvalidImageId.NotFound"
+// INVALIDPARAMETER_INSTANCEIMAGENOTSUPPORT = "InvalidParameter.InstanceImageNotSupport"
+// INVALIDPARAMETERVALUE_INVALIDAPPIDFORMAT = "InvalidParameterValue.InvalidAppIdFormat"
+// INVALIDPARAMETERVALUE_INVALIDIMAGEID = "InvalidParameterValue.InvalidImageId"
+// INVALIDPARAMETERVALUE_INVALIDIMAGESTATE = "InvalidParameterValue.InvalidImageState"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// OVERQUOTA = "OverQuota"
+// UNAUTHORIZEDOPERATION_IMAGENOTBELONGTOACCOUNT = "UnauthorizedOperation.ImageNotBelongToAccount"
+// UNAUTHORIZEDOPERATION_INVALIDTOKEN = "UnauthorizedOperation.InvalidToken"
+// UNSUPPORTEDOPERATION_ENCRYPTEDIMAGESNOTSUPPORTED = "UnsupportedOperation.EncryptedImagesNotSupported"
+// UNSUPPORTEDOPERATION_LOCATIONIMAGENOTSUPPORTED = "UnsupportedOperation.LocationImageNotSupported"
+func (c *Client) ModifyImageSharePermission(request *ModifyImageSharePermissionRequest) (response *ModifyImageSharePermissionResponse, err error) {
+ return c.ModifyImageSharePermissionWithContext(context.Background(), request)
+}
+
+// ModifyImageSharePermission
+// This API is used to modify image sharing information.
+//
+//
+//
+// * The account with shared image access can use the image to create instances.
+//
+// * Each custom image can be shared with a maximum of 500 accounts.
+//
+// * Shared images cannot have their names or description changed. They can only be used to create instances.
+//
+// * Sharing is only supported within the same region as the recipient's account.
+//
+// error code that may be returned:
+// FAILEDOPERATION_ACCOUNTALREADYEXISTS = "FailedOperation.AccountAlreadyExists"
+// FAILEDOPERATION_ACCOUNTISYOURSELF = "FailedOperation.AccountIsYourSelf"
+// FAILEDOPERATION_BYOLIMAGESHAREFAILED = "FailedOperation.BYOLImageShareFailed"
+// FAILEDOPERATION_NOTMASTERACCOUNT = "FailedOperation.NotMasterAccount"
+// FAILEDOPERATION_QIMAGESHAREFAILED = "FailedOperation.QImageShareFailed"
+// FAILEDOPERATION_RIMAGESHAREFAILED = "FailedOperation.RImageShareFailed"
+// INVALIDACCOUNTID_NOTFOUND = "InvalidAccountId.NotFound"
+// INVALIDACCOUNTIS_YOURSELF = "InvalidAccountIs.YourSelf"
+// INVALIDIMAGEID_MALFORMED = "InvalidImageId.Malformed"
+// INVALIDIMAGEID_NOTFOUND = "InvalidImageId.NotFound"
+// INVALIDPARAMETER_INSTANCEIMAGENOTSUPPORT = "InvalidParameter.InstanceImageNotSupport"
+// INVALIDPARAMETERVALUE_INVALIDAPPIDFORMAT = "InvalidParameterValue.InvalidAppIdFormat"
+// INVALIDPARAMETERVALUE_INVALIDIMAGEID = "InvalidParameterValue.InvalidImageId"
+// INVALIDPARAMETERVALUE_INVALIDIMAGESTATE = "InvalidParameterValue.InvalidImageState"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// OVERQUOTA = "OverQuota"
+// UNAUTHORIZEDOPERATION_IMAGENOTBELONGTOACCOUNT = "UnauthorizedOperation.ImageNotBelongToAccount"
+// UNAUTHORIZEDOPERATION_INVALIDTOKEN = "UnauthorizedOperation.InvalidToken"
+// UNSUPPORTEDOPERATION_ENCRYPTEDIMAGESNOTSUPPORTED = "UnsupportedOperation.EncryptedImagesNotSupported"
+// UNSUPPORTEDOPERATION_LOCATIONIMAGENOTSUPPORTED = "UnsupportedOperation.LocationImageNotSupported"
+func (c *Client) ModifyImageSharePermissionWithContext(ctx context.Context, request *ModifyImageSharePermissionRequest) (response *ModifyImageSharePermissionResponse, err error) {
+ if request == nil {
+ request = NewModifyImageSharePermissionRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("ModifyImageSharePermission require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewModifyImageSharePermissionResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewModifyInstancesAttributeRequest() (request *ModifyInstancesAttributeRequest) {
+ request = &ModifyInstancesAttributeRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("cvm", APIVersion, "ModifyInstancesAttribute")
+
+
+ return
+}
+
+func NewModifyInstancesAttributeResponse() (response *ModifyInstancesAttributeResponse) {
+ response = &ModifyInstancesAttributeResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// ModifyInstancesAttribute
+// The API is used to modify the attributes of an instance. Only the name and the associated security groups can be modified for now.
+//
+//
+//
+// * An attribute must be specified in the request.
+//
+// * "Instance name" is a custom name for easier management. Tencent Cloud does not use the name for online support or instance management.
+//
+// * Batch operations are supported. Each request can modify up to 100 instances.
+//
+// * When you modify the security groups associated with an instance is modified, the original security groups are disassociated.
+//
+// * You can use the API [DescribeInstances](https://intl.cloud.tencent.com/document/api/213/15728?from_cn_redirect=1#.E7.A4.BA.E4.BE.8B3-.E6.9F.A5.E8.AF.A2.E5.AE.9E.E4.BE.8B.E7.9A.84.E6.9C.80.E6.96.B0.E6.93.8D.E4.BD.9C.E6.83.85.E5.86.B5) to query the instance operation result. If the 'LatestOperationState' in the response is **SUCCESS**, the operation is successful.
+//
+// error code that may be returned:
+// AUTHFAILURE_CAMROLENAMEAUTHENTICATEFAILED = "AuthFailure.CamRoleNameAuthenticateFailed"
+// FAILEDOPERATION_INVALIDINSTANCEAPPLICATIONROLE = "FailedOperation.InvalidInstanceApplicationRole"
+// FAILEDOPERATION_SECURITYGROUPACTIONFAILED = "FailedOperation.SecurityGroupActionFailed"
+// INTERNALSERVERERROR = "InternalServerError"
+// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported"
+// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed"
+// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound"
+// INVALIDINSTANCENAME_TOOLONG = "InvalidInstanceName.TooLong"
+// INVALIDPARAMETER_HOSTNAMEILLEGAL = "InvalidParameter.HostNameIllegal"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPARAMETERVALUE_CAMROLENAMEMALFORMED = "InvalidParameterValue.CamRoleNameMalformed"
+// INVALIDPARAMETERVALUE_ILLEGALHOSTNAME = "InvalidParameterValue.IllegalHostName"
+// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed"
+// INVALIDPARAMETERVALUE_INVALIDUSERDATAFORMAT = "InvalidParameterValue.InvalidUserDataFormat"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// INVALIDSECURITYGROUPID_NOTFOUND = "InvalidSecurityGroupId.NotFound"
+// LIMITEXCEEDED_ASSOCIATEUSGLIMITEXCEEDED = "LimitExceeded.AssociateUSGLimitExceeded"
+// LIMITEXCEEDED_CVMSVIFSPERSECGROUPLIMITEXCEEDED = "LimitExceeded.CvmsVifsPerSecGroupLimitExceeded"
+// LIMITEXCEEDED_SINGLEUSGQUOTA = "LimitExceeded.SingleUSGQuota"
+// MISSINGPARAMETER = "MissingParameter"
+// MUTEXOPERATION_TASKRUNNING = "MutexOperation.TaskRunning"
+// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress"
+// UNAUTHORIZEDOPERATION_MFANOTFOUND = "UnauthorizedOperation.MFANotFound"
+// UNSUPPORTEDOPERATION_INSTANCEREINSTALLFAILED = "UnsupportedOperation.InstanceReinstallFailed"
+// UNSUPPORTEDOPERATION_INSTANCESTATEENTERRESCUEMODE = "UnsupportedOperation.InstanceStateEnterRescueMode"
+// UNSUPPORTEDOPERATION_INSTANCESTATEENTERSERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateEnterServiceLiveMigrate"
+// UNSUPPORTEDOPERATION_INSTANCESTATEEXITRESCUEMODE = "UnsupportedOperation.InstanceStateExitRescueMode"
+// UNSUPPORTEDOPERATION_INSTANCESTATEEXITSERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateExitServiceLiveMigrate"
+// UNSUPPORTEDOPERATION_INSTANCESTATEFREEZING = "UnsupportedOperation.InstanceStateFreezing"
+// UNSUPPORTEDOPERATION_INSTANCESTATEISOLATING = "UnsupportedOperation.InstanceStateIsolating"
+// UNSUPPORTEDOPERATION_INSTANCESTATEPENDING = "UnsupportedOperation.InstanceStatePending"
+// UNSUPPORTEDOPERATION_INSTANCESTATEREBOOTING = "UnsupportedOperation.InstanceStateRebooting"
+// UNSUPPORTEDOPERATION_INSTANCESTATERESCUEMODE = "UnsupportedOperation.InstanceStateRescueMode"
+// UNSUPPORTEDOPERATION_INSTANCESTATESERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateServiceLiveMigrate"
+// UNSUPPORTEDOPERATION_INSTANCESTATESHUTDOWN = "UnsupportedOperation.InstanceStateShutdown"
+// UNSUPPORTEDOPERATION_INSTANCESTATESTARTING = "UnsupportedOperation.InstanceStateStarting"
+// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPING = "UnsupportedOperation.InstanceStateStopping"
+// UNSUPPORTEDOPERATION_INSTANCESTATETERMINATED = "UnsupportedOperation.InstanceStateTerminated"
+// UNSUPPORTEDOPERATION_INSTANCESTATETERMINATING = "UnsupportedOperation.InstanceStateTerminating"
+// UNSUPPORTEDOPERATION_INSTANCETYPENOTSUPPORTJUMBOFRAME = "UnsupportedOperation.InstanceTypeNotSupportJumboFrame"
+// UNSUPPORTEDOPERATION_INSTANCESENABLEJUMBOWITHOUTREBOOT = "UnsupportedOperation.InstancesEnableJumboWithoutReboot"
+// UNSUPPORTEDOPERATION_INVALIDINSTANCENOTSUPPORTEDPROTECTEDINSTANCE = "UnsupportedOperation.InvalidInstanceNotSupportedProtectedInstance"
+// UNSUPPORTEDOPERATION_STOPPEDMODESTOPCHARGING = "UnsupportedOperation.StoppedModeStopCharging"
+func (c *Client) ModifyInstancesAttribute(request *ModifyInstancesAttributeRequest) (response *ModifyInstancesAttributeResponse, err error) {
+ return c.ModifyInstancesAttributeWithContext(context.Background(), request)
+}
+
+// ModifyInstancesAttribute
+// The API is used to modify the attributes of an instance. Only the name and the associated security groups can be modified for now.
+//
+//
+//
+// * An attribute must be specified in the request.
+//
+// * "Instance name" is a custom name for easier management. Tencent Cloud does not use the name for online support or instance management.
+//
+// * Batch operations are supported. Each request can modify up to 100 instances.
+//
+// * When you modify the security groups associated with an instance is modified, the original security groups are disassociated.
+//
+// * You can use the API [DescribeInstances](https://intl.cloud.tencent.com/document/api/213/15728?from_cn_redirect=1#.E7.A4.BA.E4.BE.8B3-.E6.9F.A5.E8.AF.A2.E5.AE.9E.E4.BE.8B.E7.9A.84.E6.9C.80.E6.96.B0.E6.93.8D.E4.BD.9C.E6.83.85.E5.86.B5) to query the instance operation result. If the 'LatestOperationState' in the response is **SUCCESS**, the operation is successful.
+//
+// error code that may be returned:
+// AUTHFAILURE_CAMROLENAMEAUTHENTICATEFAILED = "AuthFailure.CamRoleNameAuthenticateFailed"
+// FAILEDOPERATION_INVALIDINSTANCEAPPLICATIONROLE = "FailedOperation.InvalidInstanceApplicationRole"
+// FAILEDOPERATION_SECURITYGROUPACTIONFAILED = "FailedOperation.SecurityGroupActionFailed"
+// INTERNALSERVERERROR = "InternalServerError"
+// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported"
+// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed"
+// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound"
+// INVALIDINSTANCENAME_TOOLONG = "InvalidInstanceName.TooLong"
+// INVALIDPARAMETER_HOSTNAMEILLEGAL = "InvalidParameter.HostNameIllegal"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPARAMETERVALUE_CAMROLENAMEMALFORMED = "InvalidParameterValue.CamRoleNameMalformed"
+// INVALIDPARAMETERVALUE_ILLEGALHOSTNAME = "InvalidParameterValue.IllegalHostName"
+// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed"
+// INVALIDPARAMETERVALUE_INVALIDUSERDATAFORMAT = "InvalidParameterValue.InvalidUserDataFormat"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// INVALIDSECURITYGROUPID_NOTFOUND = "InvalidSecurityGroupId.NotFound"
+// LIMITEXCEEDED_ASSOCIATEUSGLIMITEXCEEDED = "LimitExceeded.AssociateUSGLimitExceeded"
+// LIMITEXCEEDED_CVMSVIFSPERSECGROUPLIMITEXCEEDED = "LimitExceeded.CvmsVifsPerSecGroupLimitExceeded"
+// LIMITEXCEEDED_SINGLEUSGQUOTA = "LimitExceeded.SingleUSGQuota"
+// MISSINGPARAMETER = "MissingParameter"
+// MUTEXOPERATION_TASKRUNNING = "MutexOperation.TaskRunning"
+// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress"
+// UNAUTHORIZEDOPERATION_MFANOTFOUND = "UnauthorizedOperation.MFANotFound"
+// UNSUPPORTEDOPERATION_INSTANCEREINSTALLFAILED = "UnsupportedOperation.InstanceReinstallFailed"
+// UNSUPPORTEDOPERATION_INSTANCESTATEENTERRESCUEMODE = "UnsupportedOperation.InstanceStateEnterRescueMode"
+// UNSUPPORTEDOPERATION_INSTANCESTATEENTERSERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateEnterServiceLiveMigrate"
+// UNSUPPORTEDOPERATION_INSTANCESTATEEXITRESCUEMODE = "UnsupportedOperation.InstanceStateExitRescueMode"
+// UNSUPPORTEDOPERATION_INSTANCESTATEEXITSERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateExitServiceLiveMigrate"
+// UNSUPPORTEDOPERATION_INSTANCESTATEFREEZING = "UnsupportedOperation.InstanceStateFreezing"
+// UNSUPPORTEDOPERATION_INSTANCESTATEISOLATING = "UnsupportedOperation.InstanceStateIsolating"
+// UNSUPPORTEDOPERATION_INSTANCESTATEPENDING = "UnsupportedOperation.InstanceStatePending"
+// UNSUPPORTEDOPERATION_INSTANCESTATEREBOOTING = "UnsupportedOperation.InstanceStateRebooting"
+// UNSUPPORTEDOPERATION_INSTANCESTATERESCUEMODE = "UnsupportedOperation.InstanceStateRescueMode"
+// UNSUPPORTEDOPERATION_INSTANCESTATESERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateServiceLiveMigrate"
+// UNSUPPORTEDOPERATION_INSTANCESTATESHUTDOWN = "UnsupportedOperation.InstanceStateShutdown"
+// UNSUPPORTEDOPERATION_INSTANCESTATESTARTING = "UnsupportedOperation.InstanceStateStarting"
+// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPING = "UnsupportedOperation.InstanceStateStopping"
+// UNSUPPORTEDOPERATION_INSTANCESTATETERMINATED = "UnsupportedOperation.InstanceStateTerminated"
+// UNSUPPORTEDOPERATION_INSTANCESTATETERMINATING = "UnsupportedOperation.InstanceStateTerminating"
+// UNSUPPORTEDOPERATION_INSTANCETYPENOTSUPPORTJUMBOFRAME = "UnsupportedOperation.InstanceTypeNotSupportJumboFrame"
+// UNSUPPORTEDOPERATION_INSTANCESENABLEJUMBOWITHOUTREBOOT = "UnsupportedOperation.InstancesEnableJumboWithoutReboot"
+// UNSUPPORTEDOPERATION_INVALIDINSTANCENOTSUPPORTEDPROTECTEDINSTANCE = "UnsupportedOperation.InvalidInstanceNotSupportedProtectedInstance"
+// UNSUPPORTEDOPERATION_STOPPEDMODESTOPCHARGING = "UnsupportedOperation.StoppedModeStopCharging"
+func (c *Client) ModifyInstancesAttributeWithContext(ctx context.Context, request *ModifyInstancesAttributeRequest) (response *ModifyInstancesAttributeResponse, err error) {
+ if request == nil {
+ request = NewModifyInstancesAttributeRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("ModifyInstancesAttribute require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewModifyInstancesAttributeResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewModifyInstancesProjectRequest() (request *ModifyInstancesProjectRequest) {
+ request = &ModifyInstancesProjectRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("cvm", APIVersion, "ModifyInstancesProject")
+
+
+ return
+}
+
+func NewModifyInstancesProjectResponse() (response *ModifyInstancesProjectResponse) {
+ response = &ModifyInstancesProjectResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// ModifyInstancesProject
+// This API is used to change the project to which an instance is assigned.
+//
+//
+//
+// * Project is a virtual concept. You can create multiple projects under one account, manage different resources in each project, and assign different instances to different projects. You may use the [DescribeInstances](https://intl.cloud.tencent.com/document/api/213/15728?from_cn_redirect=1) API to query instances and use the project ID to filter the results.
+//
+// * You cannot modify the project of an instance that is bound to a load balancer. You need to unbind the load balancer from the instance by using the [DeregisterInstancesFromLoadBalancer](https://intl.cloud.tencent.com/document/api/214/1258?from_cn_redirect=1) API before using this API.
+//
+// * Batch operations are supported. Up to 100 instances per request is allowed.
+//
+// * You can use the API [DescribeInstances](https://intl.cloud.tencent.com/document/api/213/15728?from_cn_redirect=1#.E7.A4.BA.E4.BE.8B3-.E6.9F.A5.E8.AF.A2.E5.AE.9E.E4.BE.8B.E7.9A.84.E6.9C.80.E6.96.B0.E6.93.8D.E4.BD.9C.E6.83.85.E5.86.B5) to query the operation result. If the `LatestOperationState` in the response is `SUCCESS`, the operation is successful.
+//
+// error code that may be returned:
+// INTERNALSERVERERROR = "InternalServerError"
+// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported"
+// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed"
+// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// INVALIDPROJECTID_NOTFOUND = "InvalidProjectId.NotFound"
+// MISSINGPARAMETER = "MissingParameter"
+// MUTEXOPERATION_TASKRUNNING = "MutexOperation.TaskRunning"
+// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress"
+// UNSUPPORTEDOPERATION_INSTANCESTATEISOLATING = "UnsupportedOperation.InstanceStateIsolating"
+func (c *Client) ModifyInstancesProject(request *ModifyInstancesProjectRequest) (response *ModifyInstancesProjectResponse, err error) {
+ return c.ModifyInstancesProjectWithContext(context.Background(), request)
+}
+
+// ModifyInstancesProject
+// This API is used to change the project to which an instance is assigned.
+//
+//
+//
+// * Project is a virtual concept. You can create multiple projects under one account, manage different resources in each project, and assign different instances to different projects. You may use the [DescribeInstances](https://intl.cloud.tencent.com/document/api/213/15728?from_cn_redirect=1) API to query instances and use the project ID to filter the results.
+//
+// * You cannot modify the project of an instance that is bound to a load balancer. You need to unbind the load balancer from the instance by using the [DeregisterInstancesFromLoadBalancer](https://intl.cloud.tencent.com/document/api/214/1258?from_cn_redirect=1) API before using this API.
+//
+// * Batch operations are supported. Up to 100 instances per request is allowed.
+//
+// * You can use the API [DescribeInstances](https://intl.cloud.tencent.com/document/api/213/15728?from_cn_redirect=1#.E7.A4.BA.E4.BE.8B3-.E6.9F.A5.E8.AF.A2.E5.AE.9E.E4.BE.8B.E7.9A.84.E6.9C.80.E6.96.B0.E6.93.8D.E4.BD.9C.E6.83.85.E5.86.B5) to query the operation result. If the `LatestOperationState` in the response is `SUCCESS`, the operation is successful.
+//
+// error code that may be returned:
+// INTERNALSERVERERROR = "InternalServerError"
+// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported"
+// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed"
+// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// INVALIDPROJECTID_NOTFOUND = "InvalidProjectId.NotFound"
+// MISSINGPARAMETER = "MissingParameter"
+// MUTEXOPERATION_TASKRUNNING = "MutexOperation.TaskRunning"
+// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress"
+// UNSUPPORTEDOPERATION_INSTANCESTATEISOLATING = "UnsupportedOperation.InstanceStateIsolating"
+func (c *Client) ModifyInstancesProjectWithContext(ctx context.Context, request *ModifyInstancesProjectRequest) (response *ModifyInstancesProjectResponse, err error) {
+ if request == nil {
+ request = NewModifyInstancesProjectRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("ModifyInstancesProject require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewModifyInstancesProjectResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewModifyInstancesRenewFlagRequest() (request *ModifyInstancesRenewFlagRequest) {
+ request = &ModifyInstancesRenewFlagRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("cvm", APIVersion, "ModifyInstancesRenewFlag")
+
+
+ return
+}
+
+func NewModifyInstancesRenewFlagResponse() (response *ModifyInstancesRenewFlagResponse) {
+ response = &ModifyInstancesRenewFlagResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// ModifyInstancesRenewFlag
+// This API is used to modify the renewal flag of monthly subscription instances.
+//
+//
+//
+// * After an instance is marked as auto-renewal, it will be automatically renewed for one month each time it expires.
+//
+// * Batch operations are supported. The maximum number of instances for each request is 100.* You can query the result of the instance operation by calling the API [DescribeInstances](https://intl.cloud.tencent.com/document/api/213/15728?from_cn_redirect=1#.E7.A4.BA.E4.BE.8B3-.E6.9F.A5.E8.AF.A2.E5.AE.9E.E4.BE.8B.E7.9A.84.E6.9C.80.E6.96.B0.E6.93.8D.E4.BD.9C.E6.83.85.E5.86.B5). If the latest operation status (LatestOperationState) of the instance is **SUCCESS**, the operation is successful.
+//
+// error code that may be returned:
+// FAILEDOPERATION_INVALIDINSTANCEAPPLICATIONROLEEMR = "FailedOperation.InvalidInstanceApplicationRoleEmr"
+// INTERNALSERVERERROR = "InternalServerError"
+// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported"
+// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed"
+// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// MUTEXOPERATION_TASKRUNNING = "MutexOperation.TaskRunning"
+// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress"
+// UNAUTHORIZEDOPERATION_MFAEXPIRED = "UnauthorizedOperation.MFAExpired"
+// UNAUTHORIZEDOPERATION_MFANOTFOUND = "UnauthorizedOperation.MFANotFound"
+// UNSUPPORTEDOPERATION_INSTANCECHARGETYPE = "UnsupportedOperation.InstanceChargeType"
+// UNSUPPORTEDOPERATION_INSTANCEREINSTALLFAILED = "UnsupportedOperation.InstanceReinstallFailed"
+// UNSUPPORTEDOPERATION_INSTANCESTATEBANNING = "UnsupportedOperation.InstanceStateBanning"
+// UNSUPPORTEDOPERATION_INSTANCESTATEENTERRESCUEMODE = "UnsupportedOperation.InstanceStateEnterRescueMode"
+// UNSUPPORTEDOPERATION_INSTANCESTATEEXITRESCUEMODE = "UnsupportedOperation.InstanceStateExitRescueMode"
+// UNSUPPORTEDOPERATION_INSTANCESTATEFREEZING = "UnsupportedOperation.InstanceStateFreezing"
+// UNSUPPORTEDOPERATION_INSTANCESTATEISOLATING = "UnsupportedOperation.InstanceStateIsolating"
+// UNSUPPORTEDOPERATION_INSTANCESTATEPENDING = "UnsupportedOperation.InstanceStatePending"
+// UNSUPPORTEDOPERATION_INSTANCESTATEREBOOTING = "UnsupportedOperation.InstanceStateRebooting"
+// UNSUPPORTEDOPERATION_INSTANCESTATERESCUEMODE = "UnsupportedOperation.InstanceStateRescueMode"
+// UNSUPPORTEDOPERATION_INSTANCESTATESERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateServiceLiveMigrate"
+// UNSUPPORTEDOPERATION_INSTANCESTATESHUTDOWN = "UnsupportedOperation.InstanceStateShutdown"
+// UNSUPPORTEDOPERATION_INSTANCESTATESTARTING = "UnsupportedOperation.InstanceStateStarting"
+// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPING = "UnsupportedOperation.InstanceStateStopping"
+// UNSUPPORTEDOPERATION_SPECIALINSTANCETYPE = "UnsupportedOperation.SpecialInstanceType"
+// UNSUPPORTEDOPERATION_UNDERWRITINGINSTANCETYPEONLYSUPPORTAUTORENEW = "UnsupportedOperation.UnderwritingInstanceTypeOnlySupportAutoRenew"
+func (c *Client) ModifyInstancesRenewFlag(request *ModifyInstancesRenewFlagRequest) (response *ModifyInstancesRenewFlagResponse, err error) {
+ return c.ModifyInstancesRenewFlagWithContext(context.Background(), request)
+}
+
+// ModifyInstancesRenewFlag
+// This API is used to modify the renewal flag of monthly subscription instances.
+//
+//
+//
+// * After an instance is marked as auto-renewal, it will be automatically renewed for one month each time it expires.
+//
+// * Batch operations are supported. The maximum number of instances for each request is 100.* You can query the result of the instance operation by calling the API [DescribeInstances](https://intl.cloud.tencent.com/document/api/213/15728?from_cn_redirect=1#.E7.A4.BA.E4.BE.8B3-.E6.9F.A5.E8.AF.A2.E5.AE.9E.E4.BE.8B.E7.9A.84.E6.9C.80.E6.96.B0.E6.93.8D.E4.BD.9C.E6.83.85.E5.86.B5). If the latest operation status (LatestOperationState) of the instance is **SUCCESS**, the operation is successful.
+//
+// error code that may be returned:
+// FAILEDOPERATION_INVALIDINSTANCEAPPLICATIONROLEEMR = "FailedOperation.InvalidInstanceApplicationRoleEmr"
+// INTERNALSERVERERROR = "InternalServerError"
+// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported"
+// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed"
+// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// MUTEXOPERATION_TASKRUNNING = "MutexOperation.TaskRunning"
+// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress"
+// UNAUTHORIZEDOPERATION_MFAEXPIRED = "UnauthorizedOperation.MFAExpired"
+// UNAUTHORIZEDOPERATION_MFANOTFOUND = "UnauthorizedOperation.MFANotFound"
+// UNSUPPORTEDOPERATION_INSTANCECHARGETYPE = "UnsupportedOperation.InstanceChargeType"
+// UNSUPPORTEDOPERATION_INSTANCEREINSTALLFAILED = "UnsupportedOperation.InstanceReinstallFailed"
+// UNSUPPORTEDOPERATION_INSTANCESTATEBANNING = "UnsupportedOperation.InstanceStateBanning"
+// UNSUPPORTEDOPERATION_INSTANCESTATEENTERRESCUEMODE = "UnsupportedOperation.InstanceStateEnterRescueMode"
+// UNSUPPORTEDOPERATION_INSTANCESTATEEXITRESCUEMODE = "UnsupportedOperation.InstanceStateExitRescueMode"
+// UNSUPPORTEDOPERATION_INSTANCESTATEFREEZING = "UnsupportedOperation.InstanceStateFreezing"
+// UNSUPPORTEDOPERATION_INSTANCESTATEISOLATING = "UnsupportedOperation.InstanceStateIsolating"
+// UNSUPPORTEDOPERATION_INSTANCESTATEPENDING = "UnsupportedOperation.InstanceStatePending"
+// UNSUPPORTEDOPERATION_INSTANCESTATEREBOOTING = "UnsupportedOperation.InstanceStateRebooting"
+// UNSUPPORTEDOPERATION_INSTANCESTATERESCUEMODE = "UnsupportedOperation.InstanceStateRescueMode"
+// UNSUPPORTEDOPERATION_INSTANCESTATESERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateServiceLiveMigrate"
+// UNSUPPORTEDOPERATION_INSTANCESTATESHUTDOWN = "UnsupportedOperation.InstanceStateShutdown"
+// UNSUPPORTEDOPERATION_INSTANCESTATESTARTING = "UnsupportedOperation.InstanceStateStarting"
+// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPING = "UnsupportedOperation.InstanceStateStopping"
+// UNSUPPORTEDOPERATION_SPECIALINSTANCETYPE = "UnsupportedOperation.SpecialInstanceType"
+// UNSUPPORTEDOPERATION_UNDERWRITINGINSTANCETYPEONLYSUPPORTAUTORENEW = "UnsupportedOperation.UnderwritingInstanceTypeOnlySupportAutoRenew"
+func (c *Client) ModifyInstancesRenewFlagWithContext(ctx context.Context, request *ModifyInstancesRenewFlagRequest) (response *ModifyInstancesRenewFlagResponse, err error) {
+ if request == nil {
+ request = NewModifyInstancesRenewFlagRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("ModifyInstancesRenewFlag require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewModifyInstancesRenewFlagResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewModifyInstancesVpcAttributeRequest() (request *ModifyInstancesVpcAttributeRequest) {
+ request = &ModifyInstancesVpcAttributeRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("cvm", APIVersion, "ModifyInstancesVpcAttribute")
+
+
+ return
+}
+
+func NewModifyInstancesVpcAttributeResponse() (response *ModifyInstancesVpcAttributeResponse) {
+ response = &ModifyInstancesVpcAttributeResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// ModifyInstancesVpcAttribute
+// This API is used to modify the VPC attributes of an instance, such as the VPC IP address.
+//
+// * This action will shut down the instance, and restart it after the modification is completed.
+//
+// * To migrate an instance to another VPC/subnet, specify the new VPC and subnet directly. Make sure that the instance to migrate is not bound to an [ENI](https://intl.cloud.tencent.com/document/product/576?from_cn_redirect=1) or [CLB](https://intl.cloud.tencent.com/document/product/214?from_cn_redirect=1) instances.
+//
+// * You can use the API [DescribeInstances](https://intl.cloud.tencent.com/document/api/213/15728?from_cn_redirect=1#.E7.A4.BA.E4.BE.8B3-.E6.9F.A5.E8.AF.A2.E5.AE.9E.E4.BE.8B.E7.9A.84.E6.9C.80.E6.96.B0.E6.93.8D.E4.BD.9C.E6.83.85.E5.86.B5) to query the operation result. If the `LatestOperationState` in the response is `SUCCESS`, the operation is successful.
+//
+// error code that may be returned:
+// ENINOTALLOWEDCHANGESUBNET = "EniNotAllowedChangeSubnet"
+// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported"
+// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound"
+// INVALIDINSTANCESTATE = "InvalidInstanceState"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPARAMETERVALUE_IPADDRESSMALFORMED = "InvalidParameterValue.IPAddressMalformed"
+// INVALIDPARAMETERVALUE_INVALIDAPPIDFORMAT = "InvalidParameterValue.InvalidAppIdFormat"
+// INVALIDPARAMETERVALUE_INVALIDIPFORMAT = "InvalidParameterValue.InvalidIpFormat"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// INVALIDPARAMETERVALUE_MUSTDHCPENABLEDVPC = "InvalidParameterValue.MustDhcpEnabledVpc"
+// INVALIDPARAMETERVALUE_SUBNETIDMALFORMED = "InvalidParameterValue.SubnetIdMalformed"
+// INVALIDPARAMETERVALUE_VPCIDMALFORMED = "InvalidParameterValue.VpcIdMalformed"
+// MUTEXOPERATION_TASKRUNNING = "MutexOperation.TaskRunning"
+// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress"
+// UNAUTHORIZEDOPERATION_MFAEXPIRED = "UnauthorizedOperation.MFAExpired"
+// UNAUTHORIZEDOPERATION_MFANOTFOUND = "UnauthorizedOperation.MFANotFound"
+// UNSUPPORTEDOPERATION_EDGEZONEINSTANCE = "UnsupportedOperation.EdgeZoneInstance"
+// UNSUPPORTEDOPERATION_ELASTICNETWORKINTERFACE = "UnsupportedOperation.ElasticNetworkInterface"
+// UNSUPPORTEDOPERATION_IPV6NOTSUPPORTVPCMIGRATE = "UnsupportedOperation.IPv6NotSupportVpcMigrate"
+// UNSUPPORTEDOPERATION_INSTANCECHARGETYPE = "UnsupportedOperation.InstanceChargeType"
+// UNSUPPORTEDOPERATION_INSTANCEREINSTALLFAILED = "UnsupportedOperation.InstanceReinstallFailed"
+// UNSUPPORTEDOPERATION_INSTANCESTATEBANNING = "UnsupportedOperation.InstanceStateBanning"
+// UNSUPPORTEDOPERATION_INSTANCESTATEENTERRESCUEMODE = "UnsupportedOperation.InstanceStateEnterRescueMode"
+// UNSUPPORTEDOPERATION_INSTANCESTATEEXITRESCUEMODE = "UnsupportedOperation.InstanceStateExitRescueMode"
+// UNSUPPORTEDOPERATION_INSTANCESTATEEXITSERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateExitServiceLiveMigrate"
+// UNSUPPORTEDOPERATION_INSTANCESTATEFREEZING = "UnsupportedOperation.InstanceStateFreezing"
+// UNSUPPORTEDOPERATION_INSTANCESTATEISOLATING = "UnsupportedOperation.InstanceStateIsolating"
+// UNSUPPORTEDOPERATION_INSTANCESTATEPENDING = "UnsupportedOperation.InstanceStatePending"
+// UNSUPPORTEDOPERATION_INSTANCESTATEREBOOTING = "UnsupportedOperation.InstanceStateRebooting"
+// UNSUPPORTEDOPERATION_INSTANCESTATERESCUEMODE = "UnsupportedOperation.InstanceStateRescueMode"
+// UNSUPPORTEDOPERATION_INSTANCESTATERUNNING = "UnsupportedOperation.InstanceStateRunning"
+// UNSUPPORTEDOPERATION_INSTANCESTATESERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateServiceLiveMigrate"
+// UNSUPPORTEDOPERATION_INSTANCESTATESHUTDOWN = "UnsupportedOperation.InstanceStateShutdown"
+// UNSUPPORTEDOPERATION_INSTANCESTATESTARTING = "UnsupportedOperation.InstanceStateStarting"
+// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPING = "UnsupportedOperation.InstanceStateStopping"
+// UNSUPPORTEDOPERATION_INSTANCESTATETERMINATING = "UnsupportedOperation.InstanceStateTerminating"
+// UNSUPPORTEDOPERATION_MODIFYVPCWITHCLB = "UnsupportedOperation.ModifyVPCWithCLB"
+// UNSUPPORTEDOPERATION_MODIFYVPCWITHCLASSLINK = "UnsupportedOperation.ModifyVPCWithClassLink"
+// UNSUPPORTEDOPERATION_NOVPCNETWORK = "UnsupportedOperation.NoVpcNetwork"
+// UNSUPPORTEDOPERATION_STOPPEDMODESTOPCHARGING = "UnsupportedOperation.StoppedModeStopCharging"
+// VPCADDRNOTINSUBNET = "VpcAddrNotInSubNet"
+// VPCIPISUSED = "VpcIpIsUsed"
+func (c *Client) ModifyInstancesVpcAttribute(request *ModifyInstancesVpcAttributeRequest) (response *ModifyInstancesVpcAttributeResponse, err error) {
+ return c.ModifyInstancesVpcAttributeWithContext(context.Background(), request)
+}
+
+// ModifyInstancesVpcAttribute
+// This API is used to modify the VPC attributes of an instance, such as the VPC IP address.
+//
+// * This action will shut down the instance, and restart it after the modification is completed.
+//
+// * To migrate an instance to another VPC/subnet, specify the new VPC and subnet directly. Make sure that the instance to migrate is not bound to an [ENI](https://intl.cloud.tencent.com/document/product/576?from_cn_redirect=1) or [CLB](https://intl.cloud.tencent.com/document/product/214?from_cn_redirect=1) instances.
+//
+// * You can use the API [DescribeInstances](https://intl.cloud.tencent.com/document/api/213/15728?from_cn_redirect=1#.E7.A4.BA.E4.BE.8B3-.E6.9F.A5.E8.AF.A2.E5.AE.9E.E4.BE.8B.E7.9A.84.E6.9C.80.E6.96.B0.E6.93.8D.E4.BD.9C.E6.83.85.E5.86.B5) to query the operation result. If the `LatestOperationState` in the response is `SUCCESS`, the operation is successful.
+//
+// error code that may be returned:
+// ENINOTALLOWEDCHANGESUBNET = "EniNotAllowedChangeSubnet"
+// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported"
+// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound"
+// INVALIDINSTANCESTATE = "InvalidInstanceState"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPARAMETERVALUE_IPADDRESSMALFORMED = "InvalidParameterValue.IPAddressMalformed"
+// INVALIDPARAMETERVALUE_INVALIDAPPIDFORMAT = "InvalidParameterValue.InvalidAppIdFormat"
+// INVALIDPARAMETERVALUE_INVALIDIPFORMAT = "InvalidParameterValue.InvalidIpFormat"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// INVALIDPARAMETERVALUE_MUSTDHCPENABLEDVPC = "InvalidParameterValue.MustDhcpEnabledVpc"
+// INVALIDPARAMETERVALUE_SUBNETIDMALFORMED = "InvalidParameterValue.SubnetIdMalformed"
+// INVALIDPARAMETERVALUE_VPCIDMALFORMED = "InvalidParameterValue.VpcIdMalformed"
+// MUTEXOPERATION_TASKRUNNING = "MutexOperation.TaskRunning"
+// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress"
+// UNAUTHORIZEDOPERATION_MFAEXPIRED = "UnauthorizedOperation.MFAExpired"
+// UNAUTHORIZEDOPERATION_MFANOTFOUND = "UnauthorizedOperation.MFANotFound"
+// UNSUPPORTEDOPERATION_EDGEZONEINSTANCE = "UnsupportedOperation.EdgeZoneInstance"
+// UNSUPPORTEDOPERATION_ELASTICNETWORKINTERFACE = "UnsupportedOperation.ElasticNetworkInterface"
+// UNSUPPORTEDOPERATION_IPV6NOTSUPPORTVPCMIGRATE = "UnsupportedOperation.IPv6NotSupportVpcMigrate"
+// UNSUPPORTEDOPERATION_INSTANCECHARGETYPE = "UnsupportedOperation.InstanceChargeType"
+// UNSUPPORTEDOPERATION_INSTANCEREINSTALLFAILED = "UnsupportedOperation.InstanceReinstallFailed"
+// UNSUPPORTEDOPERATION_INSTANCESTATEBANNING = "UnsupportedOperation.InstanceStateBanning"
+// UNSUPPORTEDOPERATION_INSTANCESTATEENTERRESCUEMODE = "UnsupportedOperation.InstanceStateEnterRescueMode"
+// UNSUPPORTEDOPERATION_INSTANCESTATEEXITRESCUEMODE = "UnsupportedOperation.InstanceStateExitRescueMode"
+// UNSUPPORTEDOPERATION_INSTANCESTATEEXITSERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateExitServiceLiveMigrate"
+// UNSUPPORTEDOPERATION_INSTANCESTATEFREEZING = "UnsupportedOperation.InstanceStateFreezing"
+// UNSUPPORTEDOPERATION_INSTANCESTATEISOLATING = "UnsupportedOperation.InstanceStateIsolating"
+// UNSUPPORTEDOPERATION_INSTANCESTATEPENDING = "UnsupportedOperation.InstanceStatePending"
+// UNSUPPORTEDOPERATION_INSTANCESTATEREBOOTING = "UnsupportedOperation.InstanceStateRebooting"
+// UNSUPPORTEDOPERATION_INSTANCESTATERESCUEMODE = "UnsupportedOperation.InstanceStateRescueMode"
+// UNSUPPORTEDOPERATION_INSTANCESTATERUNNING = "UnsupportedOperation.InstanceStateRunning"
+// UNSUPPORTEDOPERATION_INSTANCESTATESERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateServiceLiveMigrate"
+// UNSUPPORTEDOPERATION_INSTANCESTATESHUTDOWN = "UnsupportedOperation.InstanceStateShutdown"
+// UNSUPPORTEDOPERATION_INSTANCESTATESTARTING = "UnsupportedOperation.InstanceStateStarting"
+// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPING = "UnsupportedOperation.InstanceStateStopping"
+// UNSUPPORTEDOPERATION_INSTANCESTATETERMINATING = "UnsupportedOperation.InstanceStateTerminating"
+// UNSUPPORTEDOPERATION_MODIFYVPCWITHCLB = "UnsupportedOperation.ModifyVPCWithCLB"
+// UNSUPPORTEDOPERATION_MODIFYVPCWITHCLASSLINK = "UnsupportedOperation.ModifyVPCWithClassLink"
+// UNSUPPORTEDOPERATION_NOVPCNETWORK = "UnsupportedOperation.NoVpcNetwork"
+// UNSUPPORTEDOPERATION_STOPPEDMODESTOPCHARGING = "UnsupportedOperation.StoppedModeStopCharging"
+// VPCADDRNOTINSUBNET = "VpcAddrNotInSubNet"
+// VPCIPISUSED = "VpcIpIsUsed"
+func (c *Client) ModifyInstancesVpcAttributeWithContext(ctx context.Context, request *ModifyInstancesVpcAttributeRequest) (response *ModifyInstancesVpcAttributeResponse, err error) {
+ if request == nil {
+ request = NewModifyInstancesVpcAttributeRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("ModifyInstancesVpcAttribute require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewModifyInstancesVpcAttributeResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewModifyKeyPairAttributeRequest() (request *ModifyKeyPairAttributeRequest) {
+ request = &ModifyKeyPairAttributeRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("cvm", APIVersion, "ModifyKeyPairAttribute")
+
+
+ return
+}
+
+func NewModifyKeyPairAttributeResponse() (response *ModifyKeyPairAttributeResponse) {
+ response = &ModifyKeyPairAttributeResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// ModifyKeyPairAttribute
+// This API is used to modify attributes of a key pair.
+//
+//
+//
+// * Modify the name and description information of the key pair specified by the key pair ID.
+//
+// * The key pair name should not be the same as the name of an existing key pair.
+//
+// * The key pair ID is the unique identifier of a key pair and cannot be modified.
+//
+//
+//
+// * Either the key pair name or description information should be specified, and both can also be specified simultaneously.
+//
+// error code that may be returned:
+// INTERNALSERVERERROR = "InternalServerError"
+// INVALIDKEYPAIRID_MALFORMED = "InvalidKeyPairId.Malformed"
+// INVALIDKEYPAIRID_NOTFOUND = "InvalidKeyPairId.NotFound"
+// INVALIDKEYPAIRNAME_DUPLICATE = "InvalidKeyPairName.Duplicate"
+// INVALIDPARAMETER = "InvalidParameter"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// MISSINGPARAMETER = "MissingParameter"
+func (c *Client) ModifyKeyPairAttribute(request *ModifyKeyPairAttributeRequest) (response *ModifyKeyPairAttributeResponse, err error) {
+ return c.ModifyKeyPairAttributeWithContext(context.Background(), request)
+}
+
+// ModifyKeyPairAttribute
+// This API is used to modify attributes of a key pair.
+//
+//
+//
+// * Modify the name and description information of the key pair specified by the key pair ID.
+//
+// * The key pair name should not be the same as the name of an existing key pair.
+//
+// * The key pair ID is the unique identifier of a key pair and cannot be modified.
+//
+//
+//
+// * Either the key pair name or description information should be specified, and both can also be specified simultaneously.
+//
+// error code that may be returned:
+// INTERNALSERVERERROR = "InternalServerError"
+// INVALIDKEYPAIRID_MALFORMED = "InvalidKeyPairId.Malformed"
+// INVALIDKEYPAIRID_NOTFOUND = "InvalidKeyPairId.NotFound"
+// INVALIDKEYPAIRNAME_DUPLICATE = "InvalidKeyPairName.Duplicate"
+// INVALIDPARAMETER = "InvalidParameter"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// MISSINGPARAMETER = "MissingParameter"
+func (c *Client) ModifyKeyPairAttributeWithContext(ctx context.Context, request *ModifyKeyPairAttributeRequest) (response *ModifyKeyPairAttributeResponse, err error) {
+ if request == nil {
+ request = NewModifyKeyPairAttributeRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("ModifyKeyPairAttribute require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewModifyKeyPairAttributeResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewModifyLaunchTemplateDefaultVersionRequest() (request *ModifyLaunchTemplateDefaultVersionRequest) {
+ request = &ModifyLaunchTemplateDefaultVersionRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("cvm", APIVersion, "ModifyLaunchTemplateDefaultVersion")
+
+
+ return
+}
+
+func NewModifyLaunchTemplateDefaultVersionResponse() (response *ModifyLaunchTemplateDefaultVersionResponse) {
+ response = &ModifyLaunchTemplateDefaultVersionResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// ModifyLaunchTemplateDefaultVersion
+// This API is used to modify the default version of the instance launch template.
+//
+// error code that may be returned:
+// INVALIDPARAMETERCOMBINATION = "InvalidParameterCombination"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDMALFORMED = "InvalidParameterValue.LaunchTemplateIdMalformed"
+// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDNOTEXISTED = "InvalidParameterValue.LaunchTemplateIdNotExisted"
+// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDVERNOTEXISTED = "InvalidParameterValue.LaunchTemplateIdVerNotExisted"
+// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDVERSETALREADY = "InvalidParameterValue.LaunchTemplateIdVerSetAlready"
+// INVALIDPARAMETERVALUE_LAUNCHTEMPLATENOTFOUND = "InvalidParameterValue.LaunchTemplateNotFound"
+// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEVERSION = "InvalidParameterValue.LaunchTemplateVersion"
+// MISSINGPARAMETER = "MissingParameter"
+// UNKNOWNPARAMETER = "UnknownParameter"
+func (c *Client) ModifyLaunchTemplateDefaultVersion(request *ModifyLaunchTemplateDefaultVersionRequest) (response *ModifyLaunchTemplateDefaultVersionResponse, err error) {
+ return c.ModifyLaunchTemplateDefaultVersionWithContext(context.Background(), request)
+}
+
+// ModifyLaunchTemplateDefaultVersion
+// This API is used to modify the default version of the instance launch template.
+//
+// error code that may be returned:
+// INVALIDPARAMETERCOMBINATION = "InvalidParameterCombination"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDMALFORMED = "InvalidParameterValue.LaunchTemplateIdMalformed"
+// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDNOTEXISTED = "InvalidParameterValue.LaunchTemplateIdNotExisted"
+// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDVERNOTEXISTED = "InvalidParameterValue.LaunchTemplateIdVerNotExisted"
+// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDVERSETALREADY = "InvalidParameterValue.LaunchTemplateIdVerSetAlready"
+// INVALIDPARAMETERVALUE_LAUNCHTEMPLATENOTFOUND = "InvalidParameterValue.LaunchTemplateNotFound"
+// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEVERSION = "InvalidParameterValue.LaunchTemplateVersion"
+// MISSINGPARAMETER = "MissingParameter"
+// UNKNOWNPARAMETER = "UnknownParameter"
+func (c *Client) ModifyLaunchTemplateDefaultVersionWithContext(ctx context.Context, request *ModifyLaunchTemplateDefaultVersionRequest) (response *ModifyLaunchTemplateDefaultVersionResponse, err error) {
+ if request == nil {
+ request = NewModifyLaunchTemplateDefaultVersionRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("ModifyLaunchTemplateDefaultVersion require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewModifyLaunchTemplateDefaultVersionResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewPurchaseReservedInstancesOfferingRequest() (request *PurchaseReservedInstancesOfferingRequest) {
+ request = &PurchaseReservedInstancesOfferingRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("cvm", APIVersion, "PurchaseReservedInstancesOffering")
+
+
+ return
+}
+
+func NewPurchaseReservedInstancesOfferingResponse() (response *PurchaseReservedInstancesOfferingResponse) {
+ response = &PurchaseReservedInstancesOfferingResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// PurchaseReservedInstancesOffering
+// This API is used to purchase one or more specific Reserved Instances.
+//
+// error code that may be returned:
+// INTERNALERROR_TRADEUNKNOWNERROR = "InternalError.TradeUnknownError"
+// INVALIDACCOUNT_INSUFFICIENTBALANCE = "InvalidAccount.InsufficientBalance"
+// INVALIDCLIENTTOKEN_TOOLONG = "InvalidClientToken.TooLong"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range"
+// UNSUPPORTEDOPERATION_INVALIDPERMISSIONNONINTERNATIONALACCOUNT = "UnsupportedOperation.InvalidPermissionNonInternationalAccount"
+// UNSUPPORTEDOPERATION_RESERVEDINSTANCEINVISIBLEFORUSER = "UnsupportedOperation.ReservedInstanceInvisibleForUser"
+// UNSUPPORTEDOPERATION_RESERVEDINSTANCEOUTOFQUATA = "UnsupportedOperation.ReservedInstanceOutofQuata"
+func (c *Client) PurchaseReservedInstancesOffering(request *PurchaseReservedInstancesOfferingRequest) (response *PurchaseReservedInstancesOfferingResponse, err error) {
+ return c.PurchaseReservedInstancesOfferingWithContext(context.Background(), request)
+}
+
+// PurchaseReservedInstancesOffering
+// This API is used to purchase one or more specific Reserved Instances.
+//
+// error code that may be returned:
+// INTERNALERROR_TRADEUNKNOWNERROR = "InternalError.TradeUnknownError"
+// INVALIDACCOUNT_INSUFFICIENTBALANCE = "InvalidAccount.InsufficientBalance"
+// INVALIDCLIENTTOKEN_TOOLONG = "InvalidClientToken.TooLong"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range"
+// UNSUPPORTEDOPERATION_INVALIDPERMISSIONNONINTERNATIONALACCOUNT = "UnsupportedOperation.InvalidPermissionNonInternationalAccount"
+// UNSUPPORTEDOPERATION_RESERVEDINSTANCEINVISIBLEFORUSER = "UnsupportedOperation.ReservedInstanceInvisibleForUser"
+// UNSUPPORTEDOPERATION_RESERVEDINSTANCEOUTOFQUATA = "UnsupportedOperation.ReservedInstanceOutofQuata"
+func (c *Client) PurchaseReservedInstancesOfferingWithContext(ctx context.Context, request *PurchaseReservedInstancesOfferingRequest) (response *PurchaseReservedInstancesOfferingResponse, err error) {
+ if request == nil {
+ request = NewPurchaseReservedInstancesOfferingRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("PurchaseReservedInstancesOffering require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewPurchaseReservedInstancesOfferingResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewRebootInstancesRequest() (request *RebootInstancesRequest) {
+ request = &RebootInstancesRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("cvm", APIVersion, "RebootInstances")
+
+
+ return
+}
+
+func NewRebootInstancesResponse() (response *RebootInstancesResponse) {
+ response = &RebootInstancesResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// RebootInstances
+// This API is used to restart instances.
+//
+//
+//
+// * You can only perform this operation on instances whose status is `RUNNING`.
+//
+// * If the API is called successfully, the instance status will become `REBOOTING`. After the instance is restarted, its status will become `RUNNING` again.
+//
+// * Forced restart is supported. A forced restart is similar to switching off the power of a physical computer and starting it again. It may cause data loss or file system corruption. Be sure to only force start a CVM when it cannot be restarted normally.
+//
+// * Batch operations are supported. The maximum number of instances in each request is 100.
+//
+// error code that may be returned:
+// FAILEDOPERATION_INVALIDINSTANCEAPPLICATIONROLE = "FailedOperation.InvalidInstanceApplicationRole"
+// INTERNALSERVERERROR = "InternalServerError"
+// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported"
+// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed"
+// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound"
+// INVALIDPARAMETERCOMBINATION = "InvalidParameterCombination"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// MISSINGPARAMETER = "MissingParameter"
+// MUTEXOPERATION_TASKRUNNING = "MutexOperation.TaskRunning"
+// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress"
+// UNAUTHORIZEDOPERATION_MFAEXPIRED = "UnauthorizedOperation.MFAExpired"
+// UNAUTHORIZEDOPERATION_MFANOTFOUND = "UnauthorizedOperation.MFANotFound"
+// UNSUPPORTEDOPERATION = "UnsupportedOperation"
+// UNSUPPORTEDOPERATION_INSTANCEREINSTALLFAILED = "UnsupportedOperation.InstanceReinstallFailed"
+// UNSUPPORTEDOPERATION_INSTANCESTATECORRUPTED = "UnsupportedOperation.InstanceStateCorrupted"
+// UNSUPPORTEDOPERATION_INSTANCESTATEENTERRESCUEMODE = "UnsupportedOperation.InstanceStateEnterRescueMode"
+// UNSUPPORTEDOPERATION_INSTANCESTATEENTERSERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateEnterServiceLiveMigrate"
+// UNSUPPORTEDOPERATION_INSTANCESTATEEXITRESCUEMODE = "UnsupportedOperation.InstanceStateExitRescueMode"
+// UNSUPPORTEDOPERATION_INSTANCESTATEEXITSERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateExitServiceLiveMigrate"
+// UNSUPPORTEDOPERATION_INSTANCESTATEFREEZING = "UnsupportedOperation.InstanceStateFreezing"
+// UNSUPPORTEDOPERATION_INSTANCESTATEISOLATING = "UnsupportedOperation.InstanceStateIsolating"
+// UNSUPPORTEDOPERATION_INSTANCESTATEPENDING = "UnsupportedOperation.InstanceStatePending"
+// UNSUPPORTEDOPERATION_INSTANCESTATEREBOOTING = "UnsupportedOperation.InstanceStateRebooting"
+// UNSUPPORTEDOPERATION_INSTANCESTATESERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateServiceLiveMigrate"
+// UNSUPPORTEDOPERATION_INSTANCESTATESHUTDOWN = "UnsupportedOperation.InstanceStateShutdown"
+// UNSUPPORTEDOPERATION_INSTANCESTATESTARTING = "UnsupportedOperation.InstanceStateStarting"
+// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPED = "UnsupportedOperation.InstanceStateStopped"
+// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPING = "UnsupportedOperation.InstanceStateStopping"
+// UNSUPPORTEDOPERATION_INSTANCESTATETERMINATING = "UnsupportedOperation.InstanceStateTerminating"
+// UNSUPPORTEDOPERATION_STOPPEDMODESTOPCHARGING = "UnsupportedOperation.StoppedModeStopCharging"
+func (c *Client) RebootInstances(request *RebootInstancesRequest) (response *RebootInstancesResponse, err error) {
+ return c.RebootInstancesWithContext(context.Background(), request)
+}
+
+// RebootInstances
+// This API is used to restart instances.
+//
+//
+//
+// * You can only perform this operation on instances whose status is `RUNNING`.
+//
+// * If the API is called successfully, the instance status will become `REBOOTING`. After the instance is restarted, its status will become `RUNNING` again.
+//
+// * Forced restart is supported. A forced restart is similar to switching off the power of a physical computer and starting it again. It may cause data loss or file system corruption. Be sure to only force start a CVM when it cannot be restarted normally.
+//
+// * Batch operations are supported. The maximum number of instances in each request is 100.
+//
+// error code that may be returned:
+// FAILEDOPERATION_INVALIDINSTANCEAPPLICATIONROLE = "FailedOperation.InvalidInstanceApplicationRole"
+// INTERNALSERVERERROR = "InternalServerError"
+// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported"
+// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed"
+// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound"
+// INVALIDPARAMETERCOMBINATION = "InvalidParameterCombination"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// MISSINGPARAMETER = "MissingParameter"
+// MUTEXOPERATION_TASKRUNNING = "MutexOperation.TaskRunning"
+// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress"
+// UNAUTHORIZEDOPERATION_MFAEXPIRED = "UnauthorizedOperation.MFAExpired"
+// UNAUTHORIZEDOPERATION_MFANOTFOUND = "UnauthorizedOperation.MFANotFound"
+// UNSUPPORTEDOPERATION = "UnsupportedOperation"
+// UNSUPPORTEDOPERATION_INSTANCEREINSTALLFAILED = "UnsupportedOperation.InstanceReinstallFailed"
+// UNSUPPORTEDOPERATION_INSTANCESTATECORRUPTED = "UnsupportedOperation.InstanceStateCorrupted"
+// UNSUPPORTEDOPERATION_INSTANCESTATEENTERRESCUEMODE = "UnsupportedOperation.InstanceStateEnterRescueMode"
+// UNSUPPORTEDOPERATION_INSTANCESTATEENTERSERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateEnterServiceLiveMigrate"
+// UNSUPPORTEDOPERATION_INSTANCESTATEEXITRESCUEMODE = "UnsupportedOperation.InstanceStateExitRescueMode"
+// UNSUPPORTEDOPERATION_INSTANCESTATEEXITSERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateExitServiceLiveMigrate"
+// UNSUPPORTEDOPERATION_INSTANCESTATEFREEZING = "UnsupportedOperation.InstanceStateFreezing"
+// UNSUPPORTEDOPERATION_INSTANCESTATEISOLATING = "UnsupportedOperation.InstanceStateIsolating"
+// UNSUPPORTEDOPERATION_INSTANCESTATEPENDING = "UnsupportedOperation.InstanceStatePending"
+// UNSUPPORTEDOPERATION_INSTANCESTATEREBOOTING = "UnsupportedOperation.InstanceStateRebooting"
+// UNSUPPORTEDOPERATION_INSTANCESTATESERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateServiceLiveMigrate"
+// UNSUPPORTEDOPERATION_INSTANCESTATESHUTDOWN = "UnsupportedOperation.InstanceStateShutdown"
+// UNSUPPORTEDOPERATION_INSTANCESTATESTARTING = "UnsupportedOperation.InstanceStateStarting"
+// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPED = "UnsupportedOperation.InstanceStateStopped"
+// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPING = "UnsupportedOperation.InstanceStateStopping"
+// UNSUPPORTEDOPERATION_INSTANCESTATETERMINATING = "UnsupportedOperation.InstanceStateTerminating"
+// UNSUPPORTEDOPERATION_STOPPEDMODESTOPCHARGING = "UnsupportedOperation.StoppedModeStopCharging"
+func (c *Client) RebootInstancesWithContext(ctx context.Context, request *RebootInstancesRequest) (response *RebootInstancesResponse, err error) {
+ if request == nil {
+ request = NewRebootInstancesRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("RebootInstances require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewRebootInstancesResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewRemoveChcAssistVpcRequest() (request *RemoveChcAssistVpcRequest) {
+ request = &RemoveChcAssistVpcRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("cvm", APIVersion, "RemoveChcAssistVpc")
+
+
+ return
+}
+
+func NewRemoveChcAssistVpcResponse() (response *RemoveChcAssistVpcResponse) {
+ response = &RemoveChcAssistVpcResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// RemoveChcAssistVpc
+// This API is used to remove the out-of-band network and deployment network of a CHC host.
+//
+// error code that may be returned:
+// ACCOUNTQUALIFICATIONRESTRICTIONS = "AccountQualificationRestrictions"
+// INVALIDHOST_NOTSUPPORTED = "InvalidHost.NotSupported"
+// INVALIDPARAMETERVALUE_CHCHOSTSNOTFOUND = "InvalidParameterValue.ChcHostsNotFound"
+// INVALIDPARAMETERVALUE_INCORRECTFORMAT = "InvalidParameterValue.IncorrectFormat"
+func (c *Client) RemoveChcAssistVpc(request *RemoveChcAssistVpcRequest) (response *RemoveChcAssistVpcResponse, err error) {
+ return c.RemoveChcAssistVpcWithContext(context.Background(), request)
+}
+
+// RemoveChcAssistVpc
+// This API is used to remove the out-of-band network and deployment network of a CHC host.
+//
+// error code that may be returned:
+// ACCOUNTQUALIFICATIONRESTRICTIONS = "AccountQualificationRestrictions"
+// INVALIDHOST_NOTSUPPORTED = "InvalidHost.NotSupported"
+// INVALIDPARAMETERVALUE_CHCHOSTSNOTFOUND = "InvalidParameterValue.ChcHostsNotFound"
+// INVALIDPARAMETERVALUE_INCORRECTFORMAT = "InvalidParameterValue.IncorrectFormat"
+func (c *Client) RemoveChcAssistVpcWithContext(ctx context.Context, request *RemoveChcAssistVpcRequest) (response *RemoveChcAssistVpcResponse, err error) {
+ if request == nil {
+ request = NewRemoveChcAssistVpcRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("RemoveChcAssistVpc require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewRemoveChcAssistVpcResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewRemoveChcDeployVpcRequest() (request *RemoveChcDeployVpcRequest) {
+ request = &RemoveChcDeployVpcRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("cvm", APIVersion, "RemoveChcDeployVpc")
+
+
+ return
+}
+
+func NewRemoveChcDeployVpcResponse() (response *RemoveChcDeployVpcResponse) {
+ response = &RemoveChcDeployVpcResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// RemoveChcDeployVpc
+// This API is used to remove the deployment network of a CHC host.
+//
+// error code that may be returned:
+// ACCOUNTQUALIFICATIONRESTRICTIONS = "AccountQualificationRestrictions"
+// INVALIDHOST_NOTSUPPORTED = "InvalidHost.NotSupported"
+// INVALIDPARAMETER = "InvalidParameter"
+// INVALIDPARAMETERVALUE_CHCHOSTSNOTFOUND = "InvalidParameterValue.ChcHostsNotFound"
+// INVALIDPARAMETERVALUE_INCORRECTFORMAT = "InvalidParameterValue.IncorrectFormat"
+func (c *Client) RemoveChcDeployVpc(request *RemoveChcDeployVpcRequest) (response *RemoveChcDeployVpcResponse, err error) {
+ return c.RemoveChcDeployVpcWithContext(context.Background(), request)
+}
+
+// RemoveChcDeployVpc
+// This API is used to remove the deployment network of a CHC host.
+//
+// error code that may be returned:
+// ACCOUNTQUALIFICATIONRESTRICTIONS = "AccountQualificationRestrictions"
+// INVALIDHOST_NOTSUPPORTED = "InvalidHost.NotSupported"
+// INVALIDPARAMETER = "InvalidParameter"
+// INVALIDPARAMETERVALUE_CHCHOSTSNOTFOUND = "InvalidParameterValue.ChcHostsNotFound"
+// INVALIDPARAMETERVALUE_INCORRECTFORMAT = "InvalidParameterValue.IncorrectFormat"
+func (c *Client) RemoveChcDeployVpcWithContext(ctx context.Context, request *RemoveChcDeployVpcRequest) (response *RemoveChcDeployVpcResponse, err error) {
+ if request == nil {
+ request = NewRemoveChcDeployVpcRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("RemoveChcDeployVpc require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewRemoveChcDeployVpcResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewResetInstanceRequest() (request *ResetInstanceRequest) {
+ request = &ResetInstanceRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("cvm", APIVersion, "ResetInstance")
+
+
+ return
+}
+
+func NewResetInstanceResponse() (response *ResetInstanceResponse) {
+ response = &ResetInstanceResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// ResetInstance
+// This API (ResetInstance) is used to reinstall the operating system on a specified instance.
+//
+//
+//
+//
+//
+//
+//
+// * If you have specified the parameter `ImageId`, use the specified image for reinstallation. Otherwise, perform reinstallation based on the image currently used by the instance.
+//
+// * The system disk will be formatted and reset. Ensure that there are no important files in the system disk.
+//
+// * If you do not specify a password, a random password will be sent via Message Center.
+//
+// * Currently, only instances with a [system disk type](https://intl.cloud.tencent.com/document/api/213/9452?from_cn_redirect=1#SystemDisk) of `CLOUD_BASIC`, `CLOUD_PREMIUM`, `CLOUD_SSD`, or `CLOUD_BSSD` are supported for implementing operating system switching through this API.
+//
+// * You can query the result of the instance operation by calling the API [DescribeInstances](https://intl.cloud.tencent.com/document/api/213/15728?from_cn_redirect=1#.E7.A4.BA.E4.BE.8B3-.E6.9F.A5.E8.AF.A2.E5.AE.9E.E4.BE.8B.E7.9A.84.E6.9C.80.E6.96.B0.E6.93.8D.E4.BD.9C.E6.83.85.E5.86.B5). If the latest operation status (LatestOperationState) of the instance is **SUCCESS**, the operation is successful.
+//
+// error code that may be returned:
+// FAILEDOPERATION_INVALIDINSTANCEAPPLICATIONROLEEMR = "FailedOperation.InvalidInstanceApplicationRoleEmr"
+// INTERNALERROR_TRADEUNKNOWNERROR = "InternalError.TradeUnknownError"
+// INTERNALSERVERERROR = "InternalServerError"
+// INVALIDACCOUNT_INSUFFICIENTBALANCE = "InvalidAccount.InsufficientBalance"
+// INVALIDACCOUNT_UNPAIDORDER = "InvalidAccount.UnpaidOrder"
+// INVALIDIMAGEID_MALFORMED = "InvalidImageId.Malformed"
+// INVALIDIMAGEID_NOTFOUND = "InvalidImageId.NotFound"
+// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported"
+// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed"
+// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound"
+// INVALIDINSTANCETYPE_MALFORMED = "InvalidInstanceType.Malformed"
+// INVALIDKEYPAIRID_MALFORMED = "InvalidKeyPairId.Malformed"
+// INVALIDPARAMETER_HOSTNAMEILLEGAL = "InvalidParameter.HostNameIllegal"
+// INVALIDPARAMETER_INSTANCEIMAGENOTSUPPORT = "InvalidParameter.InstanceImageNotSupport"
+// INVALIDPARAMETER_PARAMETERCONFLICT = "InvalidParameter.ParameterConflict"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPARAMETERVALUE_ILLEGALHOSTNAME = "InvalidParameterValue.IllegalHostName"
+// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed"
+// INVALIDPARAMETERVALUE_INSTANCETYPENOTFOUND = "InvalidParameterValue.InstanceTypeNotFound"
+// INVALIDPARAMETERVALUE_INVALIDAPPIDFORMAT = "InvalidParameterValue.InvalidAppIdFormat"
+// INVALIDPARAMETERVALUE_INVALIDIMAGEFORGIVENINSTANCETYPE = "InvalidParameterValue.InvalidImageForGivenInstanceType"
+// INVALIDPARAMETERVALUE_INVALIDIMAGEFORMAT = "InvalidParameterValue.InvalidImageFormat"
+// INVALIDPARAMETERVALUE_INVALIDIMAGEID = "InvalidParameterValue.InvalidImageId"
+// INVALIDPARAMETERVALUE_INVALIDIMAGEIDFORRETSETINSTANCE = "InvalidParameterValue.InvalidImageIdForRetsetInstance"
+// INVALIDPARAMETERVALUE_INVALIDIMAGESTATE = "InvalidParameterValue.InvalidImageState"
+// INVALIDPARAMETERVALUE_INVALIDPASSWORD = "InvalidParameterValue.InvalidPassword"
+// INVALIDPARAMETERVALUE_INVALIDUSERDATAFORMAT = "InvalidParameterValue.InvalidUserDataFormat"
+// INVALIDPARAMETERVALUE_KEYPAIRNOTFOUND = "InvalidParameterValue.KeyPairNotFound"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// INVALIDPARAMETERVALUE_REQUIREDLOCATIONIMAGE = "InvalidParameterValue.RequiredLocationImage"
+// INVALIDPARAMETERVALUE_ZONENOTSUPPORTED = "InvalidParameterValue.ZoneNotSupported"
+// MISSINGPARAMETER = "MissingParameter"
+// MISSINGPARAMETER_MONITORSERVICE = "MissingParameter.MonitorService"
+// MUTEXOPERATION_TASKRUNNING = "MutexOperation.TaskRunning"
+// OPERATIONDENIED_CHCINSTALLCLOUDIMAGEWITHOUTDEPLOYNETWORK = "OperationDenied.ChcInstallCloudImageWithoutDeployNetwork"
+// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress"
+// RESOURCEINUSE = "ResourceInUse"
+// RESOURCEINSUFFICIENT_CLOUDDISKSOLDOUT = "ResourceInsufficient.CloudDiskSoldOut"
+// RESOURCENOTFOUND_KEYPAIRNOTFOUND = "ResourceNotFound.KeyPairNotFound"
+// RESOURCESSOLDOUT_SPECIFIEDINSTANCETYPE = "ResourcesSoldOut.SpecifiedInstanceType"
+// UNAUTHORIZEDOPERATION_INVALIDTOKEN = "UnauthorizedOperation.InvalidToken"
+// UNAUTHORIZEDOPERATION_MFAEXPIRED = "UnauthorizedOperation.MFAExpired"
+// UNAUTHORIZEDOPERATION_MFANOTFOUND = "UnauthorizedOperation.MFANotFound"
+// UNSUPPORTEDOPERATION = "UnsupportedOperation"
+// UNSUPPORTEDOPERATION_INSTANCECHARGETYPE = "UnsupportedOperation.InstanceChargeType"
+// UNSUPPORTEDOPERATION_INSTANCESTATECORRUPTED = "UnsupportedOperation.InstanceStateCorrupted"
+// UNSUPPORTEDOPERATION_INSTANCESTATEENTERRESCUEMODE = "UnsupportedOperation.InstanceStateEnterRescueMode"
+// UNSUPPORTEDOPERATION_INSTANCESTATEENTERSERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateEnterServiceLiveMigrate"
+// UNSUPPORTEDOPERATION_INSTANCESTATEEXITRESCUEMODE = "UnsupportedOperation.InstanceStateExitRescueMode"
+// UNSUPPORTEDOPERATION_INSTANCESTATEEXITSERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateExitServiceLiveMigrate"
+// UNSUPPORTEDOPERATION_INSTANCESTATEFREEZING = "UnsupportedOperation.InstanceStateFreezing"
+// UNSUPPORTEDOPERATION_INSTANCESTATEISOLATING = "UnsupportedOperation.InstanceStateIsolating"
+// UNSUPPORTEDOPERATION_INSTANCESTATEPENDING = "UnsupportedOperation.InstanceStatePending"
+// UNSUPPORTEDOPERATION_INSTANCESTATEREBOOTING = "UnsupportedOperation.InstanceStateRebooting"
+// UNSUPPORTEDOPERATION_INSTANCESTATERESCUEMODE = "UnsupportedOperation.InstanceStateRescueMode"
+// UNSUPPORTEDOPERATION_INSTANCESTATESERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateServiceLiveMigrate"
+// UNSUPPORTEDOPERATION_INSTANCESTATESHUTDOWN = "UnsupportedOperation.InstanceStateShutdown"
+// UNSUPPORTEDOPERATION_INSTANCESTATESTARTING = "UnsupportedOperation.InstanceStateStarting"
+// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPING = "UnsupportedOperation.InstanceStateStopping"
+// UNSUPPORTEDOPERATION_INSTANCESTATETERMINATED = "UnsupportedOperation.InstanceStateTerminated"
+// UNSUPPORTEDOPERATION_INSTANCESTATETERMINATING = "UnsupportedOperation.InstanceStateTerminating"
+// UNSUPPORTEDOPERATION_INVALIDIMAGELICENSETYPEFORRESET = "UnsupportedOperation.InvalidImageLicenseTypeForReset"
+// UNSUPPORTEDOPERATION_KEYPAIRUNSUPPORTEDWINDOWS = "UnsupportedOperation.KeyPairUnsupportedWindows"
+// UNSUPPORTEDOPERATION_MODIFYENCRYPTIONNOTSUPPORTED = "UnsupportedOperation.ModifyEncryptionNotSupported"
+// UNSUPPORTEDOPERATION_RAWLOCALDISKINSREINSTALLTOQCOW2 = "UnsupportedOperation.RawLocalDiskInsReinstalltoQcow2"
+// UNSUPPORTEDOPERATION_STOPPEDMODESTOPCHARGING = "UnsupportedOperation.StoppedModeStopCharging"
+func (c *Client) ResetInstance(request *ResetInstanceRequest) (response *ResetInstanceResponse, err error) {
+ return c.ResetInstanceWithContext(context.Background(), request)
+}
+
+// ResetInstance
+// This API (ResetInstance) is used to reinstall the operating system on a specified instance.
+//
+//
+//
+//
+//
+//
+//
+// * If you have specified the parameter `ImageId`, use the specified image for reinstallation. Otherwise, perform reinstallation based on the image currently used by the instance.
+//
+// * The system disk will be formatted and reset. Ensure that there are no important files in the system disk.
+//
+// * If you do not specify a password, a random password will be sent via Message Center.
+//
+// * Currently, only instances with a [system disk type](https://intl.cloud.tencent.com/document/api/213/9452?from_cn_redirect=1#SystemDisk) of `CLOUD_BASIC`, `CLOUD_PREMIUM`, `CLOUD_SSD`, or `CLOUD_BSSD` are supported for implementing operating system switching through this API.
+//
+// * You can query the result of the instance operation by calling the API [DescribeInstances](https://intl.cloud.tencent.com/document/api/213/15728?from_cn_redirect=1#.E7.A4.BA.E4.BE.8B3-.E6.9F.A5.E8.AF.A2.E5.AE.9E.E4.BE.8B.E7.9A.84.E6.9C.80.E6.96.B0.E6.93.8D.E4.BD.9C.E6.83.85.E5.86.B5). If the latest operation status (LatestOperationState) of the instance is **SUCCESS**, the operation is successful.
+//
+// error code that may be returned:
+// FAILEDOPERATION_INVALIDINSTANCEAPPLICATIONROLEEMR = "FailedOperation.InvalidInstanceApplicationRoleEmr"
+// INTERNALERROR_TRADEUNKNOWNERROR = "InternalError.TradeUnknownError"
+// INTERNALSERVERERROR = "InternalServerError"
+// INVALIDACCOUNT_INSUFFICIENTBALANCE = "InvalidAccount.InsufficientBalance"
+// INVALIDACCOUNT_UNPAIDORDER = "InvalidAccount.UnpaidOrder"
+// INVALIDIMAGEID_MALFORMED = "InvalidImageId.Malformed"
+// INVALIDIMAGEID_NOTFOUND = "InvalidImageId.NotFound"
+// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported"
+// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed"
+// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound"
+// INVALIDINSTANCETYPE_MALFORMED = "InvalidInstanceType.Malformed"
+// INVALIDKEYPAIRID_MALFORMED = "InvalidKeyPairId.Malformed"
+// INVALIDPARAMETER_HOSTNAMEILLEGAL = "InvalidParameter.HostNameIllegal"
+// INVALIDPARAMETER_INSTANCEIMAGENOTSUPPORT = "InvalidParameter.InstanceImageNotSupport"
+// INVALIDPARAMETER_PARAMETERCONFLICT = "InvalidParameter.ParameterConflict"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPARAMETERVALUE_ILLEGALHOSTNAME = "InvalidParameterValue.IllegalHostName"
+// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed"
+// INVALIDPARAMETERVALUE_INSTANCETYPENOTFOUND = "InvalidParameterValue.InstanceTypeNotFound"
+// INVALIDPARAMETERVALUE_INVALIDAPPIDFORMAT = "InvalidParameterValue.InvalidAppIdFormat"
+// INVALIDPARAMETERVALUE_INVALIDIMAGEFORGIVENINSTANCETYPE = "InvalidParameterValue.InvalidImageForGivenInstanceType"
+// INVALIDPARAMETERVALUE_INVALIDIMAGEFORMAT = "InvalidParameterValue.InvalidImageFormat"
+// INVALIDPARAMETERVALUE_INVALIDIMAGEID = "InvalidParameterValue.InvalidImageId"
+// INVALIDPARAMETERVALUE_INVALIDIMAGEIDFORRETSETINSTANCE = "InvalidParameterValue.InvalidImageIdForRetsetInstance"
+// INVALIDPARAMETERVALUE_INVALIDIMAGESTATE = "InvalidParameterValue.InvalidImageState"
+// INVALIDPARAMETERVALUE_INVALIDPASSWORD = "InvalidParameterValue.InvalidPassword"
+// INVALIDPARAMETERVALUE_INVALIDUSERDATAFORMAT = "InvalidParameterValue.InvalidUserDataFormat"
+// INVALIDPARAMETERVALUE_KEYPAIRNOTFOUND = "InvalidParameterValue.KeyPairNotFound"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// INVALIDPARAMETERVALUE_REQUIREDLOCATIONIMAGE = "InvalidParameterValue.RequiredLocationImage"
+// INVALIDPARAMETERVALUE_ZONENOTSUPPORTED = "InvalidParameterValue.ZoneNotSupported"
+// MISSINGPARAMETER = "MissingParameter"
+// MISSINGPARAMETER_MONITORSERVICE = "MissingParameter.MonitorService"
+// MUTEXOPERATION_TASKRUNNING = "MutexOperation.TaskRunning"
+// OPERATIONDENIED_CHCINSTALLCLOUDIMAGEWITHOUTDEPLOYNETWORK = "OperationDenied.ChcInstallCloudImageWithoutDeployNetwork"
+// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress"
+// RESOURCEINUSE = "ResourceInUse"
+// RESOURCEINSUFFICIENT_CLOUDDISKSOLDOUT = "ResourceInsufficient.CloudDiskSoldOut"
+// RESOURCENOTFOUND_KEYPAIRNOTFOUND = "ResourceNotFound.KeyPairNotFound"
+// RESOURCESSOLDOUT_SPECIFIEDINSTANCETYPE = "ResourcesSoldOut.SpecifiedInstanceType"
+// UNAUTHORIZEDOPERATION_INVALIDTOKEN = "UnauthorizedOperation.InvalidToken"
+// UNAUTHORIZEDOPERATION_MFAEXPIRED = "UnauthorizedOperation.MFAExpired"
+// UNAUTHORIZEDOPERATION_MFANOTFOUND = "UnauthorizedOperation.MFANotFound"
+// UNSUPPORTEDOPERATION = "UnsupportedOperation"
+// UNSUPPORTEDOPERATION_INSTANCECHARGETYPE = "UnsupportedOperation.InstanceChargeType"
+// UNSUPPORTEDOPERATION_INSTANCESTATECORRUPTED = "UnsupportedOperation.InstanceStateCorrupted"
+// UNSUPPORTEDOPERATION_INSTANCESTATEENTERRESCUEMODE = "UnsupportedOperation.InstanceStateEnterRescueMode"
+// UNSUPPORTEDOPERATION_INSTANCESTATEENTERSERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateEnterServiceLiveMigrate"
+// UNSUPPORTEDOPERATION_INSTANCESTATEEXITRESCUEMODE = "UnsupportedOperation.InstanceStateExitRescueMode"
+// UNSUPPORTEDOPERATION_INSTANCESTATEEXITSERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateExitServiceLiveMigrate"
+// UNSUPPORTEDOPERATION_INSTANCESTATEFREEZING = "UnsupportedOperation.InstanceStateFreezing"
+// UNSUPPORTEDOPERATION_INSTANCESTATEISOLATING = "UnsupportedOperation.InstanceStateIsolating"
+// UNSUPPORTEDOPERATION_INSTANCESTATEPENDING = "UnsupportedOperation.InstanceStatePending"
+// UNSUPPORTEDOPERATION_INSTANCESTATEREBOOTING = "UnsupportedOperation.InstanceStateRebooting"
+// UNSUPPORTEDOPERATION_INSTANCESTATERESCUEMODE = "UnsupportedOperation.InstanceStateRescueMode"
+// UNSUPPORTEDOPERATION_INSTANCESTATESERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateServiceLiveMigrate"
+// UNSUPPORTEDOPERATION_INSTANCESTATESHUTDOWN = "UnsupportedOperation.InstanceStateShutdown"
+// UNSUPPORTEDOPERATION_INSTANCESTATESTARTING = "UnsupportedOperation.InstanceStateStarting"
+// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPING = "UnsupportedOperation.InstanceStateStopping"
+// UNSUPPORTEDOPERATION_INSTANCESTATETERMINATED = "UnsupportedOperation.InstanceStateTerminated"
+// UNSUPPORTEDOPERATION_INSTANCESTATETERMINATING = "UnsupportedOperation.InstanceStateTerminating"
+// UNSUPPORTEDOPERATION_INVALIDIMAGELICENSETYPEFORRESET = "UnsupportedOperation.InvalidImageLicenseTypeForReset"
+// UNSUPPORTEDOPERATION_KEYPAIRUNSUPPORTEDWINDOWS = "UnsupportedOperation.KeyPairUnsupportedWindows"
+// UNSUPPORTEDOPERATION_MODIFYENCRYPTIONNOTSUPPORTED = "UnsupportedOperation.ModifyEncryptionNotSupported"
+// UNSUPPORTEDOPERATION_RAWLOCALDISKINSREINSTALLTOQCOW2 = "UnsupportedOperation.RawLocalDiskInsReinstalltoQcow2"
+// UNSUPPORTEDOPERATION_STOPPEDMODESTOPCHARGING = "UnsupportedOperation.StoppedModeStopCharging"
+func (c *Client) ResetInstanceWithContext(ctx context.Context, request *ResetInstanceRequest) (response *ResetInstanceResponse, err error) {
+ if request == nil {
+ request = NewResetInstanceRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("ResetInstance require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewResetInstanceResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewResetInstancesInternetMaxBandwidthRequest() (request *ResetInstancesInternetMaxBandwidthRequest) {
+ request = &ResetInstancesInternetMaxBandwidthRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("cvm", APIVersion, "ResetInstancesInternetMaxBandwidth")
+
+
+ return
+}
+
+func NewResetInstancesInternetMaxBandwidthResponse() (response *ResetInstancesInternetMaxBandwidthResponse) {
+ response = &ResetInstancesInternetMaxBandwidthResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// ResetInstancesInternetMaxBandwidth
+// This API is used to change the public bandwidth cap of an instance.
+//
+//
+//
+// * The allowed bandwidth cap varies for different models. For details, see [Purchasing Network Bandwidth](https://intl.cloud.tencent.com/document/product/213/509?from_cn_redirect=1).
+//
+// * For bandwidth billed by the `TRAFFIC_POSTPAID_BY_HOUR` method, changing the bandwidth cap through this API takes effect in real time. Users can increase or reduce bandwidth within applicable limits.
+//
+// error code that may be returned:
+// FAILEDOPERATION_NOTFOUNDEIP = "FailedOperation.NotFoundEIP"
+// INTERNALERROR_TRADEUNKNOWNERROR = "InternalError.TradeUnknownError"
+// INTERNALSERVERERROR = "InternalServerError"
+// INVALIDACCOUNT_INSUFFICIENTBALANCE = "InvalidAccount.InsufficientBalance"
+// INVALIDACCOUNT_UNPAIDORDER = "InvalidAccount.UnpaidOrder"
+// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported"
+// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed"
+// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound"
+// INVALIDPARAMETER = "InvalidParameter"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPARAMETERVALUE_BANDWIDTHPACKAGEIDMALFORMED = "InvalidParameterValue.BandwidthPackageIdMalformed"
+// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed"
+// INVALIDPARAMETERVALUE_INVALIDAPPIDFORMAT = "InvalidParameterValue.InvalidAppIdFormat"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range"
+// INVALIDPERMISSION = "InvalidPermission"
+// MISSINGPARAMETER = "MissingParameter"
+// MUTEXOPERATION_TASKRUNNING = "MutexOperation.TaskRunning"
+// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress"
+// UNSUPPORTEDOPERATION_BANDWIDTHPACKAGEIDNOTSUPPORTED = "UnsupportedOperation.BandwidthPackageIdNotSupported"
+// UNSUPPORTEDOPERATION_EDGEZONEINSTANCE = "UnsupportedOperation.EdgeZoneInstance"
+// UNSUPPORTEDOPERATION_INSTANCECHARGETYPE = "UnsupportedOperation.InstanceChargeType"
+// UNSUPPORTEDOPERATION_INSTANCEREINSTALLFAILED = "UnsupportedOperation.InstanceReinstallFailed"
+// UNSUPPORTEDOPERATION_INSTANCESTATEBANNING = "UnsupportedOperation.InstanceStateBanning"
+// UNSUPPORTEDOPERATION_INSTANCESTATEENTERSERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateEnterServiceLiveMigrate"
+// UNSUPPORTEDOPERATION_INSTANCESTATEEXITSERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateExitServiceLiveMigrate"
+// UNSUPPORTEDOPERATION_INSTANCESTATEFREEZING = "UnsupportedOperation.InstanceStateFreezing"
+// UNSUPPORTEDOPERATION_INSTANCESTATEISOLATING = "UnsupportedOperation.InstanceStateIsolating"
+// UNSUPPORTEDOPERATION_INSTANCESTATEPENDING = "UnsupportedOperation.InstanceStatePending"
+// UNSUPPORTEDOPERATION_INSTANCESTATEREBOOTING = "UnsupportedOperation.InstanceStateRebooting"
+// UNSUPPORTEDOPERATION_INSTANCESTATERESCUEMODE = "UnsupportedOperation.InstanceStateRescueMode"
+// UNSUPPORTEDOPERATION_INSTANCESTATESHUTDOWN = "UnsupportedOperation.InstanceStateShutdown"
+// UNSUPPORTEDOPERATION_INSTANCESTATESTARTING = "UnsupportedOperation.InstanceStateStarting"
+// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPING = "UnsupportedOperation.InstanceStateStopping"
+// UNSUPPORTEDOPERATION_INSTANCESTATETERMINATING = "UnsupportedOperation.InstanceStateTerminating"
+// UNSUPPORTEDOPERATION_STOPPEDMODESTOPCHARGING = "UnsupportedOperation.StoppedModeStopCharging"
+func (c *Client) ResetInstancesInternetMaxBandwidth(request *ResetInstancesInternetMaxBandwidthRequest) (response *ResetInstancesInternetMaxBandwidthResponse, err error) {
+ return c.ResetInstancesInternetMaxBandwidthWithContext(context.Background(), request)
+}
+
+// ResetInstancesInternetMaxBandwidth
+// This API is used to change the public bandwidth cap of an instance.
+//
+//
+//
+// * The allowed bandwidth cap varies for different models. For details, see [Purchasing Network Bandwidth](https://intl.cloud.tencent.com/document/product/213/509?from_cn_redirect=1).
+//
+// * For bandwidth billed by the `TRAFFIC_POSTPAID_BY_HOUR` method, changing the bandwidth cap through this API takes effect in real time. Users can increase or reduce bandwidth within applicable limits.
+//
+// error code that may be returned:
+// FAILEDOPERATION_NOTFOUNDEIP = "FailedOperation.NotFoundEIP"
+// INTERNALERROR_TRADEUNKNOWNERROR = "InternalError.TradeUnknownError"
+// INTERNALSERVERERROR = "InternalServerError"
+// INVALIDACCOUNT_INSUFFICIENTBALANCE = "InvalidAccount.InsufficientBalance"
+// INVALIDACCOUNT_UNPAIDORDER = "InvalidAccount.UnpaidOrder"
+// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported"
+// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed"
+// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound"
+// INVALIDPARAMETER = "InvalidParameter"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPARAMETERVALUE_BANDWIDTHPACKAGEIDMALFORMED = "InvalidParameterValue.BandwidthPackageIdMalformed"
+// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed"
+// INVALIDPARAMETERVALUE_INVALIDAPPIDFORMAT = "InvalidParameterValue.InvalidAppIdFormat"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range"
+// INVALIDPERMISSION = "InvalidPermission"
+// MISSINGPARAMETER = "MissingParameter"
+// MUTEXOPERATION_TASKRUNNING = "MutexOperation.TaskRunning"
+// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress"
+// UNSUPPORTEDOPERATION_BANDWIDTHPACKAGEIDNOTSUPPORTED = "UnsupportedOperation.BandwidthPackageIdNotSupported"
+// UNSUPPORTEDOPERATION_EDGEZONEINSTANCE = "UnsupportedOperation.EdgeZoneInstance"
+// UNSUPPORTEDOPERATION_INSTANCECHARGETYPE = "UnsupportedOperation.InstanceChargeType"
+// UNSUPPORTEDOPERATION_INSTANCEREINSTALLFAILED = "UnsupportedOperation.InstanceReinstallFailed"
+// UNSUPPORTEDOPERATION_INSTANCESTATEBANNING = "UnsupportedOperation.InstanceStateBanning"
+// UNSUPPORTEDOPERATION_INSTANCESTATEENTERSERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateEnterServiceLiveMigrate"
+// UNSUPPORTEDOPERATION_INSTANCESTATEEXITSERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateExitServiceLiveMigrate"
+// UNSUPPORTEDOPERATION_INSTANCESTATEFREEZING = "UnsupportedOperation.InstanceStateFreezing"
+// UNSUPPORTEDOPERATION_INSTANCESTATEISOLATING = "UnsupportedOperation.InstanceStateIsolating"
+// UNSUPPORTEDOPERATION_INSTANCESTATEPENDING = "UnsupportedOperation.InstanceStatePending"
+// UNSUPPORTEDOPERATION_INSTANCESTATEREBOOTING = "UnsupportedOperation.InstanceStateRebooting"
+// UNSUPPORTEDOPERATION_INSTANCESTATERESCUEMODE = "UnsupportedOperation.InstanceStateRescueMode"
+// UNSUPPORTEDOPERATION_INSTANCESTATESHUTDOWN = "UnsupportedOperation.InstanceStateShutdown"
+// UNSUPPORTEDOPERATION_INSTANCESTATESTARTING = "UnsupportedOperation.InstanceStateStarting"
+// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPING = "UnsupportedOperation.InstanceStateStopping"
+// UNSUPPORTEDOPERATION_INSTANCESTATETERMINATING = "UnsupportedOperation.InstanceStateTerminating"
+// UNSUPPORTEDOPERATION_STOPPEDMODESTOPCHARGING = "UnsupportedOperation.StoppedModeStopCharging"
+func (c *Client) ResetInstancesInternetMaxBandwidthWithContext(ctx context.Context, request *ResetInstancesInternetMaxBandwidthRequest) (response *ResetInstancesInternetMaxBandwidthResponse, err error) {
+ if request == nil {
+ request = NewResetInstancesInternetMaxBandwidthRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("ResetInstancesInternetMaxBandwidth require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewResetInstancesInternetMaxBandwidthResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewResetInstancesPasswordRequest() (request *ResetInstancesPasswordRequest) {
+ request = &ResetInstancesPasswordRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("cvm", APIVersion, "ResetInstancesPassword")
+
+
+ return
+}
+
+func NewResetInstancesPasswordResponse() (response *ResetInstancesPasswordResponse) {
+ response = &ResetInstancesPasswordResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// ResetInstancesPassword
+// This API is used to reset the password of the operating system instances to a user-specified password.
+//
+//
+//
+// * To modify the password of the administrator account: the name of the administrator account varies with the operating system. In Windows, it is `Administrator`; in Ubuntu, it is `ubuntu`; in Linux, it is `root`.
+//
+// * To reset the password of a running instance, you need to set the parameter `ForceStop` to `True` for a forced shutdown. If not, only passwords of stopped instances can be reset.
+//
+// * Batch operations are supported. You can reset the passwords of up to 100 instances to the same value once.
+//
+// * You can call the [DescribeInstances](https://intl.cloud.tencent.com/document/api/213/15728?from_cn_redirect=1#.E7.A4.BA.E4.BE.8B3-.E6.9F.A5.E8.AF.A2.E5.AE.9E.E4.BE.8B.E7.9A.84.E6.9C.80.E6.96.B0.E6.93.8D.E4.BD.9C.E6.83.85.E5.86.B5) API and find the result of the operation in the response parameter `LatestOperationState`. If the value is `SUCCESS`, the operation is successful.
+//
+// error code that may be returned:
+// FAILEDOPERATION_INVALIDINSTANCEAPPLICATIONROLE = "FailedOperation.InvalidInstanceApplicationRole"
+// INTERNALSERVERERROR = "InternalServerError"
+// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported"
+// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed"
+// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed"
+// INVALIDPARAMETERVALUE_INVALIDPASSWORD = "InvalidParameterValue.InvalidPassword"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong"
+// MISSINGPARAMETER = "MissingParameter"
+// MUTEXOPERATION_TASKRUNNING = "MutexOperation.TaskRunning"
+// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress"
+// UNAUTHORIZEDOPERATION_MFAEXPIRED = "UnauthorizedOperation.MFAExpired"
+// UNAUTHORIZEDOPERATION_MFANOTFOUND = "UnauthorizedOperation.MFANotFound"
+// UNSUPPORTEDOPERATION_INSTANCEREINSTALLFAILED = "UnsupportedOperation.InstanceReinstallFailed"
+// UNSUPPORTEDOPERATION_INSTANCESTATEENTERRESCUEMODE = "UnsupportedOperation.InstanceStateEnterRescueMode"
+// UNSUPPORTEDOPERATION_INSTANCESTATEEXITRESCUEMODE = "UnsupportedOperation.InstanceStateExitRescueMode"
+// UNSUPPORTEDOPERATION_INSTANCESTATEFREEZING = "UnsupportedOperation.InstanceStateFreezing"
+// UNSUPPORTEDOPERATION_INSTANCESTATEISOLATING = "UnsupportedOperation.InstanceStateIsolating"
+// UNSUPPORTEDOPERATION_INSTANCESTATEPENDING = "UnsupportedOperation.InstanceStatePending"
+// UNSUPPORTEDOPERATION_INSTANCESTATEREBOOTING = "UnsupportedOperation.InstanceStateRebooting"
+// UNSUPPORTEDOPERATION_INSTANCESTATERESCUEMODE = "UnsupportedOperation.InstanceStateRescueMode"
+// UNSUPPORTEDOPERATION_INSTANCESTATERUNNING = "UnsupportedOperation.InstanceStateRunning"
+// UNSUPPORTEDOPERATION_INSTANCESTATESERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateServiceLiveMigrate"
+// UNSUPPORTEDOPERATION_INSTANCESTATESHUTDOWN = "UnsupportedOperation.InstanceStateShutdown"
+// UNSUPPORTEDOPERATION_INSTANCESTATESTARTING = "UnsupportedOperation.InstanceStateStarting"
+// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPING = "UnsupportedOperation.InstanceStateStopping"
+// UNSUPPORTEDOPERATION_INSTANCESTATETERMINATING = "UnsupportedOperation.InstanceStateTerminating"
+// UNSUPPORTEDOPERATION_SPECIALINSTANCETYPE = "UnsupportedOperation.SpecialInstanceType"
+// UNSUPPORTEDOPERATION_STOPPEDMODESTOPCHARGING = "UnsupportedOperation.StoppedModeStopCharging"
+func (c *Client) ResetInstancesPassword(request *ResetInstancesPasswordRequest) (response *ResetInstancesPasswordResponse, err error) {
+ return c.ResetInstancesPasswordWithContext(context.Background(), request)
+}
+
+// ResetInstancesPassword
+// This API is used to reset the password of the operating system instances to a user-specified password.
+//
+//
+//
+// * To modify the password of the administrator account: the name of the administrator account varies with the operating system. In Windows, it is `Administrator`; in Ubuntu, it is `ubuntu`; in Linux, it is `root`.
+//
+// * To reset the password of a running instance, you need to set the parameter `ForceStop` to `True` for a forced shutdown. If not, only passwords of stopped instances can be reset.
+//
+// * Batch operations are supported. You can reset the passwords of up to 100 instances to the same value once.
+//
+// * You can call the [DescribeInstances](https://intl.cloud.tencent.com/document/api/213/15728?from_cn_redirect=1#.E7.A4.BA.E4.BE.8B3-.E6.9F.A5.E8.AF.A2.E5.AE.9E.E4.BE.8B.E7.9A.84.E6.9C.80.E6.96.B0.E6.93.8D.E4.BD.9C.E6.83.85.E5.86.B5) API and find the result of the operation in the response parameter `LatestOperationState`. If the value is `SUCCESS`, the operation is successful.
+//
+// error code that may be returned:
+// FAILEDOPERATION_INVALIDINSTANCEAPPLICATIONROLE = "FailedOperation.InvalidInstanceApplicationRole"
+// INTERNALSERVERERROR = "InternalServerError"
+// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported"
+// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed"
+// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed"
+// INVALIDPARAMETERVALUE_INVALIDPASSWORD = "InvalidParameterValue.InvalidPassword"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong"
+// MISSINGPARAMETER = "MissingParameter"
+// MUTEXOPERATION_TASKRUNNING = "MutexOperation.TaskRunning"
+// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress"
+// UNAUTHORIZEDOPERATION_MFAEXPIRED = "UnauthorizedOperation.MFAExpired"
+// UNAUTHORIZEDOPERATION_MFANOTFOUND = "UnauthorizedOperation.MFANotFound"
+// UNSUPPORTEDOPERATION_INSTANCEREINSTALLFAILED = "UnsupportedOperation.InstanceReinstallFailed"
+// UNSUPPORTEDOPERATION_INSTANCESTATEENTERRESCUEMODE = "UnsupportedOperation.InstanceStateEnterRescueMode"
+// UNSUPPORTEDOPERATION_INSTANCESTATEEXITRESCUEMODE = "UnsupportedOperation.InstanceStateExitRescueMode"
+// UNSUPPORTEDOPERATION_INSTANCESTATEFREEZING = "UnsupportedOperation.InstanceStateFreezing"
+// UNSUPPORTEDOPERATION_INSTANCESTATEISOLATING = "UnsupportedOperation.InstanceStateIsolating"
+// UNSUPPORTEDOPERATION_INSTANCESTATEPENDING = "UnsupportedOperation.InstanceStatePending"
+// UNSUPPORTEDOPERATION_INSTANCESTATEREBOOTING = "UnsupportedOperation.InstanceStateRebooting"
+// UNSUPPORTEDOPERATION_INSTANCESTATERESCUEMODE = "UnsupportedOperation.InstanceStateRescueMode"
+// UNSUPPORTEDOPERATION_INSTANCESTATERUNNING = "UnsupportedOperation.InstanceStateRunning"
+// UNSUPPORTEDOPERATION_INSTANCESTATESERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateServiceLiveMigrate"
+// UNSUPPORTEDOPERATION_INSTANCESTATESHUTDOWN = "UnsupportedOperation.InstanceStateShutdown"
+// UNSUPPORTEDOPERATION_INSTANCESTATESTARTING = "UnsupportedOperation.InstanceStateStarting"
+// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPING = "UnsupportedOperation.InstanceStateStopping"
+// UNSUPPORTEDOPERATION_INSTANCESTATETERMINATING = "UnsupportedOperation.InstanceStateTerminating"
+// UNSUPPORTEDOPERATION_SPECIALINSTANCETYPE = "UnsupportedOperation.SpecialInstanceType"
+// UNSUPPORTEDOPERATION_STOPPEDMODESTOPCHARGING = "UnsupportedOperation.StoppedModeStopCharging"
+func (c *Client) ResetInstancesPasswordWithContext(ctx context.Context, request *ResetInstancesPasswordRequest) (response *ResetInstancesPasswordResponse, err error) {
+ if request == nil {
+ request = NewResetInstancesPasswordRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("ResetInstancesPassword require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewResetInstancesPasswordResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewResetInstancesTypeRequest() (request *ResetInstancesTypeRequest) {
+ request = &ResetInstancesTypeRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("cvm", APIVersion, "ResetInstancesType")
+
+
+ return
+}
+
+func NewResetInstancesTypeResponse() (response *ResetInstancesTypeResponse) {
+ response = &ResetInstancesTypeResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// ResetInstancesType
+// This API is used to change the model of an instance.
+//
+// * You can only use this API to change the models of instances whose [system disk type](https://intl.cloud.tencent.com/document/api/213/9452?from_cn_redirect=1#block_device) is `CLOUD_BASIC`, `CLOUD_PREMIUM`, or `CLOUD_SSD`.
+//
+// * Currently, you cannot use this API to change the models of [CDH](https://intl.cloud.tencent.com/document/product/416?from_cn_redirect=1) instances.
+//
+// error code that may be returned:
+// FAILEDOPERATION_INVALIDINSTANCEAPPLICATIONROLE = "FailedOperation.InvalidInstanceApplicationRole"
+// FAILEDOPERATION_INVALIDINSTANCEAPPLICATIONROLEEMR = "FailedOperation.InvalidInstanceApplicationRoleEmr"
+// FAILEDOPERATION_PROMOTIONALPERIORESTRICTION = "FailedOperation.PromotionalPerioRestriction"
+// INTERNALERROR_TRADEUNKNOWNERROR = "InternalError.TradeUnknownError"
+// INTERNALSERVERERROR = "InternalServerError"
+// INVALIDACCOUNT_INSUFFICIENTBALANCE = "InvalidAccount.InsufficientBalance"
+// INVALIDACCOUNT_UNPAIDORDER = "InvalidAccount.UnpaidOrder"
+// INVALIDHOSTID_MALFORMED = "InvalidHostId.Malformed"
+// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported"
+// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed"
+// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound"
+// INVALIDINSTANCETYPE_MALFORMED = "InvalidInstanceType.Malformed"
+// INVALIDPARAMETER = "InvalidParameter"
+// INVALIDPARAMETER_HOSTIDSTATUSNOTSUPPORT = "InvalidParameter.HostIdStatusNotSupport"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPARAMETERVALUE_BASICNETWORKINSTANCEFAMILY = "InvalidParameterValue.BasicNetworkInstanceFamily"
+// INVALIDPARAMETERVALUE_GPUINSTANCEFAMILY = "InvalidParameterValue.GPUInstanceFamily"
+// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed"
+// INVALIDPARAMETERVALUE_INVALIDAPPIDFORMAT = "InvalidParameterValue.InvalidAppIdFormat"
+// INVALIDPARAMETERVALUE_INVALIDGPUFAMILYCHANGE = "InvalidParameterValue.InvalidGPUFamilyChange"
+// INVALIDPARAMETERVALUE_INVALIDINSTANCESOURCE = "InvalidParameterValue.InvalidInstanceSource"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// INVALIDPARAMETERVALUE_ZONENOTSUPPORTED = "InvalidParameterValue.ZoneNotSupported"
+// INVALIDPERIOD = "InvalidPeriod"
+// INVALIDPERMISSION = "InvalidPermission"
+// INVALIDZONE_MISMATCHREGION = "InvalidZone.MismatchRegion"
+// LIMITEXCEEDED_EIPNUMLIMIT = "LimitExceeded.EipNumLimit"
+// LIMITEXCEEDED_ENILIMITINSTANCETYPE = "LimitExceeded.EniLimitInstanceType"
+// LIMITEXCEEDED_ENINUMLIMIT = "LimitExceeded.EniNumLimit"
+// LIMITEXCEEDED_INSTANCETYPEBANDWIDTH = "LimitExceeded.InstanceTypeBandwidth"
+// LIMITEXCEEDED_SPOTQUOTA = "LimitExceeded.SpotQuota"
+// MISSINGPARAMETER = "MissingParameter"
+// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress"
+// RESOURCEINSUFFICIENT_CLOUDDISKSOLDOUT = "ResourceInsufficient.CloudDiskSoldOut"
+// RESOURCEINSUFFICIENT_CLOUDDISKUNAVAILABLE = "ResourceInsufficient.CloudDiskUnavailable"
+// RESOURCEINSUFFICIENT_SPECIFIEDINSTANCETYPE = "ResourceInsufficient.SpecifiedInstanceType"
+// RESOURCENOTFOUND_INVALIDZONEINSTANCETYPE = "ResourceNotFound.InvalidZoneInstanceType"
+// RESOURCEUNAVAILABLE_INSTANCETYPE = "ResourceUnavailable.InstanceType"
+// RESOURCESSOLDOUT_AVAILABLEZONE = "ResourcesSoldOut.AvailableZone"
+// RESOURCESSOLDOUT_SPECIFIEDINSTANCETYPE = "ResourcesSoldOut.SpecifiedInstanceType"
+// UNAUTHORIZEDOPERATION_MFAEXPIRED = "UnauthorizedOperation.MFAExpired"
+// UNAUTHORIZEDOPERATION_MFANOTFOUND = "UnauthorizedOperation.MFANotFound"
+// UNSUPPORTEDOPERATION_DISKSNAPCREATETIMETOOOLD = "UnsupportedOperation.DiskSnapCreateTimeTooOld"
+// UNSUPPORTEDOPERATION_HETEROGENEOUSCHANGEINSTANCEFAMILY = "UnsupportedOperation.HeterogeneousChangeInstanceFamily"
+// UNSUPPORTEDOPERATION_INSTANCEREINSTALLFAILED = "UnsupportedOperation.InstanceReinstallFailed"
+// UNSUPPORTEDOPERATION_INSTANCESTATEBANNING = "UnsupportedOperation.InstanceStateBanning"
+// UNSUPPORTEDOPERATION_INSTANCESTATEEXITSERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateExitServiceLiveMigrate"
+// UNSUPPORTEDOPERATION_INSTANCESTATEFREEZING = "UnsupportedOperation.InstanceStateFreezing"
+// UNSUPPORTEDOPERATION_INSTANCESTATEREBOOTING = "UnsupportedOperation.InstanceStateRebooting"
+// UNSUPPORTEDOPERATION_INSTANCESTATERESCUEMODE = "UnsupportedOperation.InstanceStateRescueMode"
+// UNSUPPORTEDOPERATION_INSTANCESTATERUNNING = "UnsupportedOperation.InstanceStateRunning"
+// UNSUPPORTEDOPERATION_INSTANCESTATESHUTDOWN = "UnsupportedOperation.InstanceStateShutdown"
+// UNSUPPORTEDOPERATION_INSTANCESTATESTARTING = "UnsupportedOperation.InstanceStateStarting"
+// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPING = "UnsupportedOperation.InstanceStateStopping"
+// UNSUPPORTEDOPERATION_INSTANCESTATETERMINATING = "UnsupportedOperation.InstanceStateTerminating"
+// UNSUPPORTEDOPERATION_INVALIDINSTANCEWITHSWAPDISK = "UnsupportedOperation.InvalidInstanceWithSwapDisk"
+// UNSUPPORTEDOPERATION_LOCALDATADISKCHANGEINSTANCEFAMILY = "UnsupportedOperation.LocalDataDiskChangeInstanceFamily"
+// UNSUPPORTEDOPERATION_LOCALDISKMIGRATINGTOCLOUDDISK = "UnsupportedOperation.LocalDiskMigratingToCloudDisk"
+// UNSUPPORTEDOPERATION_NOINSTANCETYPESUPPORTSPOT = "UnsupportedOperation.NoInstanceTypeSupportSpot"
+// UNSUPPORTEDOPERATION_NOTSUPPORTUNPAIDORDER = "UnsupportedOperation.NotSupportUnpaidOrder"
+// UNSUPPORTEDOPERATION_ORIGINALINSTANCETYPEINVALID = "UnsupportedOperation.OriginalInstanceTypeInvalid"
+// UNSUPPORTEDOPERATION_REDHATINSTANCEUNSUPPORTED = "UnsupportedOperation.RedHatInstanceUnsupported"
+// UNSUPPORTEDOPERATION_SPECIALINSTANCETYPE = "UnsupportedOperation.SpecialInstanceType"
+// UNSUPPORTEDOPERATION_STOPPEDMODESTOPCHARGING = "UnsupportedOperation.StoppedModeStopCharging"
+// UNSUPPORTEDOPERATION_STOPPEDMODESTOPCHARGINGSAMEFAMILY = "UnsupportedOperation.StoppedModeStopChargingSameFamily"
+// UNSUPPORTEDOPERATION_SYSTEMDISKTYPE = "UnsupportedOperation.SystemDiskType"
+// UNSUPPORTEDOPERATION_UNSUPPORTEDARMCHANGEINSTANCEFAMILY = "UnsupportedOperation.UnsupportedARMChangeInstanceFamily"
+// UNSUPPORTEDOPERATION_UNSUPPORTEDCHANGEINSTANCEFAMILY = "UnsupportedOperation.UnsupportedChangeInstanceFamily"
+// UNSUPPORTEDOPERATION_UNSUPPORTEDCHANGEINSTANCEFAMILYTOARM = "UnsupportedOperation.UnsupportedChangeInstanceFamilyToARM"
+// UNSUPPORTEDOPERATION_UNSUPPORTEDCHANGEINSTANCETOTHISINSTANCEFAMILY = "UnsupportedOperation.UnsupportedChangeInstanceToThisInstanceFamily"
+func (c *Client) ResetInstancesType(request *ResetInstancesTypeRequest) (response *ResetInstancesTypeResponse, err error) {
+ return c.ResetInstancesTypeWithContext(context.Background(), request)
+}
+
+// ResetInstancesType
+// This API is used to change the model of an instance.
+//
+// * You can only use this API to change the models of instances whose [system disk type](https://intl.cloud.tencent.com/document/api/213/9452?from_cn_redirect=1#block_device) is `CLOUD_BASIC`, `CLOUD_PREMIUM`, or `CLOUD_SSD`.
+//
+// * Currently, you cannot use this API to change the models of [CDH](https://intl.cloud.tencent.com/document/product/416?from_cn_redirect=1) instances.
+//
+// error code that may be returned:
+// FAILEDOPERATION_INVALIDINSTANCEAPPLICATIONROLE = "FailedOperation.InvalidInstanceApplicationRole"
+// FAILEDOPERATION_INVALIDINSTANCEAPPLICATIONROLEEMR = "FailedOperation.InvalidInstanceApplicationRoleEmr"
+// FAILEDOPERATION_PROMOTIONALPERIORESTRICTION = "FailedOperation.PromotionalPerioRestriction"
+// INTERNALERROR_TRADEUNKNOWNERROR = "InternalError.TradeUnknownError"
+// INTERNALSERVERERROR = "InternalServerError"
+// INVALIDACCOUNT_INSUFFICIENTBALANCE = "InvalidAccount.InsufficientBalance"
+// INVALIDACCOUNT_UNPAIDORDER = "InvalidAccount.UnpaidOrder"
+// INVALIDHOSTID_MALFORMED = "InvalidHostId.Malformed"
+// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported"
+// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed"
+// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound"
+// INVALIDINSTANCETYPE_MALFORMED = "InvalidInstanceType.Malformed"
+// INVALIDPARAMETER = "InvalidParameter"
+// INVALIDPARAMETER_HOSTIDSTATUSNOTSUPPORT = "InvalidParameter.HostIdStatusNotSupport"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPARAMETERVALUE_BASICNETWORKINSTANCEFAMILY = "InvalidParameterValue.BasicNetworkInstanceFamily"
+// INVALIDPARAMETERVALUE_GPUINSTANCEFAMILY = "InvalidParameterValue.GPUInstanceFamily"
+// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed"
+// INVALIDPARAMETERVALUE_INVALIDAPPIDFORMAT = "InvalidParameterValue.InvalidAppIdFormat"
+// INVALIDPARAMETERVALUE_INVALIDGPUFAMILYCHANGE = "InvalidParameterValue.InvalidGPUFamilyChange"
+// INVALIDPARAMETERVALUE_INVALIDINSTANCESOURCE = "InvalidParameterValue.InvalidInstanceSource"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// INVALIDPARAMETERVALUE_ZONENOTSUPPORTED = "InvalidParameterValue.ZoneNotSupported"
+// INVALIDPERIOD = "InvalidPeriod"
+// INVALIDPERMISSION = "InvalidPermission"
+// INVALIDZONE_MISMATCHREGION = "InvalidZone.MismatchRegion"
+// LIMITEXCEEDED_EIPNUMLIMIT = "LimitExceeded.EipNumLimit"
+// LIMITEXCEEDED_ENILIMITINSTANCETYPE = "LimitExceeded.EniLimitInstanceType"
+// LIMITEXCEEDED_ENINUMLIMIT = "LimitExceeded.EniNumLimit"
+// LIMITEXCEEDED_INSTANCETYPEBANDWIDTH = "LimitExceeded.InstanceTypeBandwidth"
+// LIMITEXCEEDED_SPOTQUOTA = "LimitExceeded.SpotQuota"
+// MISSINGPARAMETER = "MissingParameter"
+// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress"
+// RESOURCEINSUFFICIENT_CLOUDDISKSOLDOUT = "ResourceInsufficient.CloudDiskSoldOut"
+// RESOURCEINSUFFICIENT_CLOUDDISKUNAVAILABLE = "ResourceInsufficient.CloudDiskUnavailable"
+// RESOURCEINSUFFICIENT_SPECIFIEDINSTANCETYPE = "ResourceInsufficient.SpecifiedInstanceType"
+// RESOURCENOTFOUND_INVALIDZONEINSTANCETYPE = "ResourceNotFound.InvalidZoneInstanceType"
+// RESOURCEUNAVAILABLE_INSTANCETYPE = "ResourceUnavailable.InstanceType"
+// RESOURCESSOLDOUT_AVAILABLEZONE = "ResourcesSoldOut.AvailableZone"
+// RESOURCESSOLDOUT_SPECIFIEDINSTANCETYPE = "ResourcesSoldOut.SpecifiedInstanceType"
+// UNAUTHORIZEDOPERATION_MFAEXPIRED = "UnauthorizedOperation.MFAExpired"
+// UNAUTHORIZEDOPERATION_MFANOTFOUND = "UnauthorizedOperation.MFANotFound"
+// UNSUPPORTEDOPERATION_DISKSNAPCREATETIMETOOOLD = "UnsupportedOperation.DiskSnapCreateTimeTooOld"
+// UNSUPPORTEDOPERATION_HETEROGENEOUSCHANGEINSTANCEFAMILY = "UnsupportedOperation.HeterogeneousChangeInstanceFamily"
+// UNSUPPORTEDOPERATION_INSTANCEREINSTALLFAILED = "UnsupportedOperation.InstanceReinstallFailed"
+// UNSUPPORTEDOPERATION_INSTANCESTATEBANNING = "UnsupportedOperation.InstanceStateBanning"
+// UNSUPPORTEDOPERATION_INSTANCESTATEEXITSERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateExitServiceLiveMigrate"
+// UNSUPPORTEDOPERATION_INSTANCESTATEFREEZING = "UnsupportedOperation.InstanceStateFreezing"
+// UNSUPPORTEDOPERATION_INSTANCESTATEREBOOTING = "UnsupportedOperation.InstanceStateRebooting"
+// UNSUPPORTEDOPERATION_INSTANCESTATERESCUEMODE = "UnsupportedOperation.InstanceStateRescueMode"
+// UNSUPPORTEDOPERATION_INSTANCESTATERUNNING = "UnsupportedOperation.InstanceStateRunning"
+// UNSUPPORTEDOPERATION_INSTANCESTATESHUTDOWN = "UnsupportedOperation.InstanceStateShutdown"
+// UNSUPPORTEDOPERATION_INSTANCESTATESTARTING = "UnsupportedOperation.InstanceStateStarting"
+// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPING = "UnsupportedOperation.InstanceStateStopping"
+// UNSUPPORTEDOPERATION_INSTANCESTATETERMINATING = "UnsupportedOperation.InstanceStateTerminating"
+// UNSUPPORTEDOPERATION_INVALIDINSTANCEWITHSWAPDISK = "UnsupportedOperation.InvalidInstanceWithSwapDisk"
+// UNSUPPORTEDOPERATION_LOCALDATADISKCHANGEINSTANCEFAMILY = "UnsupportedOperation.LocalDataDiskChangeInstanceFamily"
+// UNSUPPORTEDOPERATION_LOCALDISKMIGRATINGTOCLOUDDISK = "UnsupportedOperation.LocalDiskMigratingToCloudDisk"
+// UNSUPPORTEDOPERATION_NOINSTANCETYPESUPPORTSPOT = "UnsupportedOperation.NoInstanceTypeSupportSpot"
+// UNSUPPORTEDOPERATION_NOTSUPPORTUNPAIDORDER = "UnsupportedOperation.NotSupportUnpaidOrder"
+// UNSUPPORTEDOPERATION_ORIGINALINSTANCETYPEINVALID = "UnsupportedOperation.OriginalInstanceTypeInvalid"
+// UNSUPPORTEDOPERATION_REDHATINSTANCEUNSUPPORTED = "UnsupportedOperation.RedHatInstanceUnsupported"
+// UNSUPPORTEDOPERATION_SPECIALINSTANCETYPE = "UnsupportedOperation.SpecialInstanceType"
+// UNSUPPORTEDOPERATION_STOPPEDMODESTOPCHARGING = "UnsupportedOperation.StoppedModeStopCharging"
+// UNSUPPORTEDOPERATION_STOPPEDMODESTOPCHARGINGSAMEFAMILY = "UnsupportedOperation.StoppedModeStopChargingSameFamily"
+// UNSUPPORTEDOPERATION_SYSTEMDISKTYPE = "UnsupportedOperation.SystemDiskType"
+// UNSUPPORTEDOPERATION_UNSUPPORTEDARMCHANGEINSTANCEFAMILY = "UnsupportedOperation.UnsupportedARMChangeInstanceFamily"
+// UNSUPPORTEDOPERATION_UNSUPPORTEDCHANGEINSTANCEFAMILY = "UnsupportedOperation.UnsupportedChangeInstanceFamily"
+// UNSUPPORTEDOPERATION_UNSUPPORTEDCHANGEINSTANCEFAMILYTOARM = "UnsupportedOperation.UnsupportedChangeInstanceFamilyToARM"
+// UNSUPPORTEDOPERATION_UNSUPPORTEDCHANGEINSTANCETOTHISINSTANCEFAMILY = "UnsupportedOperation.UnsupportedChangeInstanceToThisInstanceFamily"
+func (c *Client) ResetInstancesTypeWithContext(ctx context.Context, request *ResetInstancesTypeRequest) (response *ResetInstancesTypeResponse, err error) {
+ if request == nil {
+ request = NewResetInstancesTypeRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("ResetInstancesType require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewResetInstancesTypeResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewResizeInstanceDisksRequest() (request *ResizeInstanceDisksRequest) {
+ request = &ResizeInstanceDisksRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("cvm", APIVersion, "ResizeInstanceDisks")
+
+
+ return
+}
+
+func NewResizeInstanceDisksResponse() (response *ResizeInstanceDisksResponse) {
+ response = &ResizeInstanceDisksResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// ResizeInstanceDisks
+// This API (ResizeInstanceDisks) is used to expand the data disks of an instance.
+//
+//
+//
+// * Currently, you can only use the API to expand non-elastic data disks whose [disk type](https://intl.cloud.tencent.com/document/api/213/9452?from_cn_redirect=1#block_device) is `CLOUD_BASIC`, `CLOUD_PREMIUM`, or `CLOUD_SSD`. You can use [`DescribeDisks`](https://intl.cloud.tencent.com/document/api/362/16315?from_cn_redirect=1) to check whether a disk is elastic. If the `Portable` field in the response is `false`, it means that the disk is non-elastic.
+//
+// * Currently, this API does not support [CDH](https://intl.cloud.tencent.com/document/product/416?from_cn_redirect=1) instances.
+//
+// * Currently, only one data disk can be expanded at a time.
+//
+// error code that may be returned:
+// FAILEDOPERATION_INVALIDINSTANCEAPPLICATIONROLE = "FailedOperation.InvalidInstanceApplicationRole"
+// INTERNALERROR = "InternalError"
+// INTERNALERROR_TRADEUNKNOWNERROR = "InternalError.TradeUnknownError"
+// INTERNALSERVERERROR = "InternalServerError"
+// INVALIDACCOUNT_INSUFFICIENTBALANCE = "InvalidAccount.InsufficientBalance"
+// INVALIDACCOUNT_UNPAIDORDER = "InvalidAccount.UnpaidOrder"
+// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported"
+// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed"
+// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPARAMETERVALUE_CDHONLYLOCALDATADISKRESIZE = "InvalidParameterValue.CdhOnlyLocalDataDiskResize"
+// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed"
+// INVALIDPARAMETERVALUE_ZONENOTSUPPORTED = "InvalidParameterValue.ZoneNotSupported"
+// MISSINGPARAMETER = "MissingParameter"
+// MISSINGPARAMETER_ATLEASTONE = "MissingParameter.AtLeastOne"
+// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress"
+// UNSUPPORTEDOPERATION_INSTANCECHARGETYPE = "UnsupportedOperation.InstanceChargeType"
+// UNSUPPORTEDOPERATION_INSTANCESTATEBANNING = "UnsupportedOperation.InstanceStateBanning"
+// UNSUPPORTEDOPERATION_INSTANCESTATECORRUPTED = "UnsupportedOperation.InstanceStateCorrupted"
+// UNSUPPORTEDOPERATION_INSTANCESTATEENTERSERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateEnterServiceLiveMigrate"
+// UNSUPPORTEDOPERATION_INSTANCESTATEEXITRESCUEMODE = "UnsupportedOperation.InstanceStateExitRescueMode"
+// UNSUPPORTEDOPERATION_INSTANCESTATEFREEZING = "UnsupportedOperation.InstanceStateFreezing"
+// UNSUPPORTEDOPERATION_INSTANCESTATEPENDING = "UnsupportedOperation.InstanceStatePending"
+// UNSUPPORTEDOPERATION_INSTANCESTATEREBOOTING = "UnsupportedOperation.InstanceStateRebooting"
+// UNSUPPORTEDOPERATION_INSTANCESTATERESCUEMODE = "UnsupportedOperation.InstanceStateRescueMode"
+// UNSUPPORTEDOPERATION_INSTANCESTATERUNNING = "UnsupportedOperation.InstanceStateRunning"
+// UNSUPPORTEDOPERATION_INSTANCESTATESERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateServiceLiveMigrate"
+// UNSUPPORTEDOPERATION_INSTANCESTATESHUTDOWN = "UnsupportedOperation.InstanceStateShutdown"
+// UNSUPPORTEDOPERATION_INSTANCESTATESTARTING = "UnsupportedOperation.InstanceStateStarting"
+// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPED = "UnsupportedOperation.InstanceStateStopped"
+// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPING = "UnsupportedOperation.InstanceStateStopping"
+// UNSUPPORTEDOPERATION_INSTANCESTATETERMINATING = "UnsupportedOperation.InstanceStateTerminating"
+// UNSUPPORTEDOPERATION_INVALIDDATADISK = "UnsupportedOperation.InvalidDataDisk"
+// UNSUPPORTEDOPERATION_SPECIALINSTANCETYPE = "UnsupportedOperation.SpecialInstanceType"
+// UNSUPPORTEDOPERATION_STOPPEDMODESTOPCHARGING = "UnsupportedOperation.StoppedModeStopCharging"
+func (c *Client) ResizeInstanceDisks(request *ResizeInstanceDisksRequest) (response *ResizeInstanceDisksResponse, err error) {
+ return c.ResizeInstanceDisksWithContext(context.Background(), request)
+}
+
+// ResizeInstanceDisks
+// This API (ResizeInstanceDisks) is used to expand the data disks of an instance.
+//
+//
+//
+// * Currently, you can only use the API to expand non-elastic data disks whose [disk type](https://intl.cloud.tencent.com/document/api/213/9452?from_cn_redirect=1#block_device) is `CLOUD_BASIC`, `CLOUD_PREMIUM`, or `CLOUD_SSD`. You can use [`DescribeDisks`](https://intl.cloud.tencent.com/document/api/362/16315?from_cn_redirect=1) to check whether a disk is elastic. If the `Portable` field in the response is `false`, it means that the disk is non-elastic.
+//
+// * Currently, this API does not support [CDH](https://intl.cloud.tencent.com/document/product/416?from_cn_redirect=1) instances.
+//
+// * Currently, only one data disk can be expanded at a time.
+//
+// error code that may be returned:
+// FAILEDOPERATION_INVALIDINSTANCEAPPLICATIONROLE = "FailedOperation.InvalidInstanceApplicationRole"
+// INTERNALERROR = "InternalError"
+// INTERNALERROR_TRADEUNKNOWNERROR = "InternalError.TradeUnknownError"
+// INTERNALSERVERERROR = "InternalServerError"
+// INVALIDACCOUNT_INSUFFICIENTBALANCE = "InvalidAccount.InsufficientBalance"
+// INVALIDACCOUNT_UNPAIDORDER = "InvalidAccount.UnpaidOrder"
+// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported"
+// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed"
+// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPARAMETERVALUE_CDHONLYLOCALDATADISKRESIZE = "InvalidParameterValue.CdhOnlyLocalDataDiskResize"
+// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed"
+// INVALIDPARAMETERVALUE_ZONENOTSUPPORTED = "InvalidParameterValue.ZoneNotSupported"
+// MISSINGPARAMETER = "MissingParameter"
+// MISSINGPARAMETER_ATLEASTONE = "MissingParameter.AtLeastOne"
+// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress"
+// UNSUPPORTEDOPERATION_INSTANCECHARGETYPE = "UnsupportedOperation.InstanceChargeType"
+// UNSUPPORTEDOPERATION_INSTANCESTATEBANNING = "UnsupportedOperation.InstanceStateBanning"
+// UNSUPPORTEDOPERATION_INSTANCESTATECORRUPTED = "UnsupportedOperation.InstanceStateCorrupted"
+// UNSUPPORTEDOPERATION_INSTANCESTATEENTERSERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateEnterServiceLiveMigrate"
+// UNSUPPORTEDOPERATION_INSTANCESTATEEXITRESCUEMODE = "UnsupportedOperation.InstanceStateExitRescueMode"
+// UNSUPPORTEDOPERATION_INSTANCESTATEFREEZING = "UnsupportedOperation.InstanceStateFreezing"
+// UNSUPPORTEDOPERATION_INSTANCESTATEPENDING = "UnsupportedOperation.InstanceStatePending"
+// UNSUPPORTEDOPERATION_INSTANCESTATEREBOOTING = "UnsupportedOperation.InstanceStateRebooting"
+// UNSUPPORTEDOPERATION_INSTANCESTATERESCUEMODE = "UnsupportedOperation.InstanceStateRescueMode"
+// UNSUPPORTEDOPERATION_INSTANCESTATERUNNING = "UnsupportedOperation.InstanceStateRunning"
+// UNSUPPORTEDOPERATION_INSTANCESTATESERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateServiceLiveMigrate"
+// UNSUPPORTEDOPERATION_INSTANCESTATESHUTDOWN = "UnsupportedOperation.InstanceStateShutdown"
+// UNSUPPORTEDOPERATION_INSTANCESTATESTARTING = "UnsupportedOperation.InstanceStateStarting"
+// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPED = "UnsupportedOperation.InstanceStateStopped"
+// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPING = "UnsupportedOperation.InstanceStateStopping"
+// UNSUPPORTEDOPERATION_INSTANCESTATETERMINATING = "UnsupportedOperation.InstanceStateTerminating"
+// UNSUPPORTEDOPERATION_INVALIDDATADISK = "UnsupportedOperation.InvalidDataDisk"
+// UNSUPPORTEDOPERATION_SPECIALINSTANCETYPE = "UnsupportedOperation.SpecialInstanceType"
+// UNSUPPORTEDOPERATION_STOPPEDMODESTOPCHARGING = "UnsupportedOperation.StoppedModeStopCharging"
+func (c *Client) ResizeInstanceDisksWithContext(ctx context.Context, request *ResizeInstanceDisksRequest) (response *ResizeInstanceDisksResponse, err error) {
+ if request == nil {
+ request = NewResizeInstanceDisksRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("ResizeInstanceDisks require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewResizeInstanceDisksResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewRunInstancesRequest() (request *RunInstancesRequest) {
+ request = &RunInstancesRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("cvm", APIVersion, "RunInstances")
+
+
+ return
+}
+
+func NewRunInstancesResponse() (response *RunInstancesResponse) {
+ response = &RunInstancesResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// RunInstances
+// This API is used to create one or more instances with a specified configuration.
+//
+//
+//
+// * After an instance is created successfully, it will start up automatically, and the [instance status](https://intl.cloud.tencent.com/document/api/213/9452?from_cn_redirect=1#instance_state) will become "Running".
+//
+// * If you create a pay-as-you-go instance billed on an hourly basis, an amount equivalent to the hourly rate will be frozen. Make sure your account balance is sufficient before calling this API.
+//
+// * The number of instances you can purchase through this API is subject to the [Quota for CVM Instances](https://intl.cloud.tencent.com/document/product/213/2664?from_cn_redirect=1). Instances created through this API and in the CVM console are counted toward the quota.
+//
+// * This API is an async API. An instance ID list is returned after the creation request is sent. However, it does not mean the creation has been completed. The status of the instance will be `Creating` during the creation. You can use [DescribeInstances](https://intl.cloud.tencent.com/document/api/213/15728?from_cn_redirect=1) to query the status of the instance. If the status changes from `Creating` to `Running`, it means that the instance has been created successfully.
+//
+// error code that may be returned:
+// ACCOUNTQUALIFICATIONRESTRICTIONS = "AccountQualificationRestrictions"
+// AUTHFAILURE_CAMROLENAMEAUTHENTICATEFAILED = "AuthFailure.CamRoleNameAuthenticateFailed"
+// FAILEDOPERATION_DISASTERRECOVERGROUPNOTFOUND = "FailedOperation.DisasterRecoverGroupNotFound"
+// FAILEDOPERATION_ILLEGALTAGKEY = "FailedOperation.IllegalTagKey"
+// FAILEDOPERATION_ILLEGALTAGVALUE = "FailedOperation.IllegalTagValue"
+// FAILEDOPERATION_INQUIRYPRICEFAILED = "FailedOperation.InquiryPriceFailed"
+// FAILEDOPERATION_NOAVAILABLEIPADDRESSCOUNTINSUBNET = "FailedOperation.NoAvailableIpAddressCountInSubnet"
+// FAILEDOPERATION_PROMOTIONALREGIONRESTRICTION = "FailedOperation.PromotionalRegionRestriction"
+// FAILEDOPERATION_SECURITYGROUPACTIONFAILED = "FailedOperation.SecurityGroupActionFailed"
+// FAILEDOPERATION_SNAPSHOTSIZELARGERTHANDATASIZE = "FailedOperation.SnapshotSizeLargerThanDataSize"
+// FAILEDOPERATION_SNAPSHOTSIZELESSTHANDATASIZE = "FailedOperation.SnapshotSizeLessThanDataSize"
+// FAILEDOPERATION_TAGKEYRESERVED = "FailedOperation.TagKeyReserved"
+// INSTANCESQUOTALIMITEXCEEDED = "InstancesQuotaLimitExceeded"
+// INTERNALERROR_TRADEUNKNOWNERROR = "InternalError.TradeUnknownError"
+// INVALIDACCOUNT_INSUFFICIENTBALANCE = "InvalidAccount.InsufficientBalance"
+// INVALIDCLIENTTOKEN_TOOLONG = "InvalidClientToken.TooLong"
+// INVALIDHOSTID_MALFORMED = "InvalidHostId.Malformed"
+// INVALIDHOSTID_NOTFOUND = "InvalidHostId.NotFound"
+// INVALIDIMAGEID_MALFORMED = "InvalidImageId.Malformed"
+// INVALIDIMAGEID_NOTFOUND = "InvalidImageId.NotFound"
+// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported"
+// INVALIDINSTANCENAME_TOOLONG = "InvalidInstanceName.TooLong"
+// INVALIDINSTANCETYPE_MALFORMED = "InvalidInstanceType.Malformed"
+// INVALIDKEYPAIRID_MALFORMED = "InvalidKeyPairId.Malformed"
+// INVALIDPARAMETER_CDCNOTSUPPORTED = "InvalidParameter.CdcNotSupported"
+// INVALIDPARAMETER_EDGEZONEMISSINTERNETACCESSIBLE = "InvalidParameter.EdgeZoneMissInternetAccessible"
+// INVALIDPARAMETER_HOSTIDCUSTOMIZEDINSTANCETYPENOTSUPPORT = "InvalidParameter.HostIdCustomizedInstanceTypeNotSupport"
+// INVALIDPARAMETER_HOSTIDINSTANCETYPENOTSUPPORT = "InvalidParameter.HostIdInstanceTypeNotSupport"
+// INVALIDPARAMETER_HOSTIDSTANDARDINSTANCETYPENOTSUPPORT = "InvalidParameter.HostIdStandardInstanceTypeNotSupport"
+// INVALIDPARAMETER_HOSTIDSTATUSNOTSUPPORT = "InvalidParameter.HostIdStatusNotSupport"
+// INVALIDPARAMETER_INSTANCEIMAGENOTSUPPORT = "InvalidParameter.InstanceImageNotSupport"
+// INVALIDPARAMETER_INSTANCETYPESUPPORTEDHOSTNOTFOUND = "InvalidParameter.InstanceTypeSupportedHostNotFound"
+// INVALIDPARAMETER_INTERNETACCESSIBLENOTSUPPORTED = "InvalidParameter.InternetAccessibleNotSupported"
+// INVALIDPARAMETER_INVALIDIPFORMAT = "InvalidParameter.InvalidIpFormat"
+// INVALIDPARAMETER_LACKCORECOUNTORTHREADPERCORE = "InvalidParameter.LackCoreCountOrThreadPerCore"
+// INVALIDPARAMETER_ONLYSUPPORTFOREDGEZONE = "InvalidParameter.OnlySupportForEdgeZone"
+// INVALIDPARAMETER_PARAMETERCONFLICT = "InvalidParameter.ParameterConflict"
+// INVALIDPARAMETER_SNAPSHOTNOTFOUND = "InvalidParameter.SnapshotNotFound"
+// INVALIDPARAMETER_SPECIALPARAMETERFORSPECIALACCOUNT = "InvalidParameter.SpecialParameterForSpecialAccount"
+// INVALIDPARAMETERCOMBINATION = "InvalidParameterCombination"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPARAMETERVALUE_BANDWIDTHPACKAGEIDMALFORMED = "InvalidParameterValue.BandwidthPackageIdMalformed"
+// INVALIDPARAMETERVALUE_BANDWIDTHPACKAGEIDNOTFOUND = "InvalidParameterValue.BandwidthPackageIdNotFound"
+// INVALIDPARAMETERVALUE_BANDWIDTHPACKAGEISPNOTMATCH = "InvalidParameterValue.BandwidthPackageIspNotMatch"
+// INVALIDPARAMETERVALUE_BANDWIDTHPACKAGEZONENOTMATCH = "InvalidParameterValue.BandwidthPackageZoneNotMatch"
+// INVALIDPARAMETERVALUE_CAMROLENAMEMALFORMED = "InvalidParameterValue.CamRoleNameMalformed"
+// INVALIDPARAMETERVALUE_CHCHOSTSNOTFOUND = "InvalidParameterValue.ChcHostsNotFound"
+// INVALIDPARAMETERVALUE_CLOUDSSDDATADISKSIZETOOSMALL = "InvalidParameterValue.CloudSsdDataDiskSizeTooSmall"
+// INVALIDPARAMETERVALUE_CORECOUNTVALUE = "InvalidParameterValue.CoreCountValue"
+// INVALIDPARAMETERVALUE_DEDICATEDCLUSTERNOTSUPPORTEDCHARGETYPE = "InvalidParameterValue.DedicatedClusterNotSupportedChargeType"
+// INVALIDPARAMETERVALUE_DUPLICATE = "InvalidParameterValue.Duplicate"
+// INVALIDPARAMETERVALUE_DUPLICATETAGS = "InvalidParameterValue.DuplicateTags"
+// INVALIDPARAMETERVALUE_EXTERNALIPQUOTALIMITED = "InvalidParameterValue.ExternalIpQuotaLimited"
+// INVALIDPARAMETERVALUE_HPCCLUSTERIDZONEIDNOTMATCH = "InvalidParameterValue.HpcClusterIdZoneIdNotMatch"
+// INVALIDPARAMETERVALUE_IPADDRESSMALFORMED = "InvalidParameterValue.IPAddressMalformed"
+// INVALIDPARAMETERVALUE_ILLEGALHOSTNAME = "InvalidParameterValue.IllegalHostName"
+// INVALIDPARAMETERVALUE_INCORRECTFORMAT = "InvalidParameterValue.IncorrectFormat"
+// INVALIDPARAMETERVALUE_INSTANCETYPENOTFOUND = "InvalidParameterValue.InstanceTypeNotFound"
+// INVALIDPARAMETERVALUE_INSTANCETYPENOTSUPPORTHPCCLUSTER = "InvalidParameterValue.InstanceTypeNotSupportHpcCluster"
+// INVALIDPARAMETERVALUE_INSTANCETYPEREQUIREDHPCCLUSTER = "InvalidParameterValue.InstanceTypeRequiredHpcCluster"
+// INVALIDPARAMETERVALUE_INSUFFICIENTOFFERING = "InvalidParameterValue.InsufficientOffering"
+// INVALIDPARAMETERVALUE_INSUFFICIENTPRICE = "InvalidParameterValue.InsufficientPrice"
+// INVALIDPARAMETERVALUE_INVALIDAPPIDFORMAT = "InvalidParameterValue.InvalidAppIdFormat"
+// INVALIDPARAMETERVALUE_INVALIDIMAGEFORGIVENINSTANCETYPE = "InvalidParameterValue.InvalidImageForGivenInstanceType"
+// INVALIDPARAMETERVALUE_INVALIDIMAGEFORMAT = "InvalidParameterValue.InvalidImageFormat"
+// INVALIDPARAMETERVALUE_INVALIDIMAGEID = "InvalidParameterValue.InvalidImageId"
+// INVALIDPARAMETERVALUE_INVALIDIMAGEOSNAME = "InvalidParameterValue.InvalidImageOsName"
+// INVALIDPARAMETERVALUE_INVALIDIMAGESTATE = "InvalidParameterValue.InvalidImageState"
+// INVALIDPARAMETERVALUE_INVALIDIPFORMAT = "InvalidParameterValue.InvalidIpFormat"
+// INVALIDPARAMETERVALUE_INVALIDPASSWORD = "InvalidParameterValue.InvalidPassword"
+// INVALIDPARAMETERVALUE_INVALIDTIMEFORMAT = "InvalidParameterValue.InvalidTimeFormat"
+// INVALIDPARAMETERVALUE_INVALIDUSERDATAFORMAT = "InvalidParameterValue.InvalidUserDataFormat"
+// INVALIDPARAMETERVALUE_ISPNOTSUPPORTFOREDGEZONE = "InvalidParameterValue.IspNotSupportForEdgeZone"
+// INVALIDPARAMETERVALUE_ISPVALUEREPEATED = "InvalidParameterValue.IspValueRepeated"
+// INVALIDPARAMETERVALUE_KEYPAIRNOTFOUND = "InvalidParameterValue.KeyPairNotFound"
+// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDMALFORMED = "InvalidParameterValue.LaunchTemplateIdMalformed"
+// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDNOTEXISTED = "InvalidParameterValue.LaunchTemplateIdNotExisted"
+// INVALIDPARAMETERVALUE_LAUNCHTEMPLATENOTFOUND = "InvalidParameterValue.LaunchTemplateNotFound"
+// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEVERSION = "InvalidParameterValue.LaunchTemplateVersion"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// INVALIDPARAMETERVALUE_MUSTDHCPENABLEDVPC = "InvalidParameterValue.MustDhcpEnabledVpc"
+// INVALIDPARAMETERVALUE_NOTCDCSUBNET = "InvalidParameterValue.NotCdcSubnet"
+// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range"
+// INVALIDPARAMETERVALUE_SNAPSHOTIDMALFORMED = "InvalidParameterValue.SnapshotIdMalformed"
+// INVALIDPARAMETERVALUE_SUBNETIDMALFORMED = "InvalidParameterValue.SubnetIdMalformed"
+// INVALIDPARAMETERVALUE_SUBNETNOTEXIST = "InvalidParameterValue.SubnetNotExist"
+// INVALIDPARAMETERVALUE_TAGKEYNOTFOUND = "InvalidParameterValue.TagKeyNotFound"
+// INVALIDPARAMETERVALUE_TAGQUOTALIMITEXCEEDED = "InvalidParameterValue.TagQuotaLimitExceeded"
+// INVALIDPARAMETERVALUE_THREADPERCOREVALUE = "InvalidParameterValue.ThreadPerCoreValue"
+// INVALIDPARAMETERVALUE_TOOLARGE = "InvalidParameterValue.TooLarge"
+// INVALIDPARAMETERVALUE_VPCIDMALFORMED = "InvalidParameterValue.VpcIdMalformed"
+// INVALIDPARAMETERVALUE_VPCIDNOTEXIST = "InvalidParameterValue.VpcIdNotExist"
+// INVALIDPARAMETERVALUE_VPCIDZONEIDNOTMATCH = "InvalidParameterValue.VpcIdZoneIdNotMatch"
+// INVALIDPARAMETERVALUE_VPCNOTSUPPORTIPV6ADDRESS = "InvalidParameterValue.VpcNotSupportIpv6Address"
+// INVALIDPARAMETERVALUE_ZONENOTSUPPORTED = "InvalidParameterValue.ZoneNotSupported"
+// INVALIDPASSWORD = "InvalidPassword"
+// INVALIDPERIOD = "InvalidPeriod"
+// INVALIDPERMISSION = "InvalidPermission"
+// INVALIDPROJECTID_NOTFOUND = "InvalidProjectId.NotFound"
+// INVALIDSECURITYGROUPID_NOTFOUND = "InvalidSecurityGroupId.NotFound"
+// INVALIDZONE_MISMATCHREGION = "InvalidZone.MismatchRegion"
+// LIMITEXCEEDED_CVMINSTANCEQUOTA = "LimitExceeded.CvmInstanceQuota"
+// LIMITEXCEEDED_CVMSVIFSPERSECGROUPLIMITEXCEEDED = "LimitExceeded.CvmsVifsPerSecGroupLimitExceeded"
+// LIMITEXCEEDED_DISASTERRECOVERGROUP = "LimitExceeded.DisasterRecoverGroup"
+// LIMITEXCEEDED_IPV6ADDRESSNUM = "LimitExceeded.IPv6AddressNum"
+// LIMITEXCEEDED_INSTANCEENINUMLIMIT = "LimitExceeded.InstanceEniNumLimit"
+// LIMITEXCEEDED_INSTANCEQUOTA = "LimitExceeded.InstanceQuota"
+// LIMITEXCEEDED_PREPAYQUOTA = "LimitExceeded.PrepayQuota"
+// LIMITEXCEEDED_PREPAYUNDERWRITEQUOTA = "LimitExceeded.PrepayUnderwriteQuota"
+// LIMITEXCEEDED_SINGLEUSGQUOTA = "LimitExceeded.SingleUSGQuota"
+// LIMITEXCEEDED_SPOTQUOTA = "LimitExceeded.SpotQuota"
+// LIMITEXCEEDED_USERSPOTQUOTA = "LimitExceeded.UserSpotQuota"
+// LIMITEXCEEDED_VPCSUBNETNUM = "LimitExceeded.VpcSubnetNum"
+// MISSINGPARAMETER = "MissingParameter"
+// MISSINGPARAMETER_DPDKINSTANCETYPEREQUIREDVPC = "MissingParameter.DPDKInstanceTypeRequiredVPC"
+// MISSINGPARAMETER_MONITORSERVICE = "MissingParameter.MonitorService"
+// OPERATIONDENIED_ACCOUNTNOTSUPPORTED = "OperationDenied.AccountNotSupported"
+// OPERATIONDENIED_CHCINSTALLCLOUDIMAGEWITHOUTDEPLOYNETWORK = "OperationDenied.ChcInstallCloudImageWithoutDeployNetwork"
+// OPERATIONDENIED_NOTBANDWIDTHSHIFTUPUSERAPPLYEDGEZONEEIP = "OperationDenied.NotBandwidthShiftUpUserApplyEdgeZoneEip"
+// RESOURCEINSUFFICIENT_AVAILABILITYZONESOLDOUT = "ResourceInsufficient.AvailabilityZoneSoldOut"
+// RESOURCEINSUFFICIENT_CIDRBLOCK = "ResourceInsufficient.CidrBlock"
+// RESOURCEINSUFFICIENT_CLOUDDISKSOLDOUT = "ResourceInsufficient.CloudDiskSoldOut"
+// RESOURCEINSUFFICIENT_CLOUDDISKUNAVAILABLE = "ResourceInsufficient.CloudDiskUnavailable"
+// RESOURCEINSUFFICIENT_DISASTERRECOVERGROUPCVMQUOTA = "ResourceInsufficient.DisasterRecoverGroupCvmQuota"
+// RESOURCEINSUFFICIENT_SPECIFIEDINSTANCETYPE = "ResourceInsufficient.SpecifiedInstanceType"
+// RESOURCENOTFOUND_HPCCLUSTER = "ResourceNotFound.HpcCluster"
+// RESOURCENOTFOUND_KEYPAIRNOTFOUND = "ResourceNotFound.KeyPairNotFound"
+// RESOURCENOTFOUND_NODEFAULTCBS = "ResourceNotFound.NoDefaultCbs"
+// RESOURCENOTFOUND_NODEFAULTCBSWITHREASON = "ResourceNotFound.NoDefaultCbsWithReason"
+// RESOURCEUNAVAILABLE_INSTANCETYPE = "ResourceUnavailable.InstanceType"
+// RESOURCESSOLDOUT_EIPINSUFFICIENT = "ResourcesSoldOut.EipInsufficient"
+// RESOURCESSOLDOUT_SPECIFIEDINSTANCETYPE = "ResourcesSoldOut.SpecifiedInstanceType"
+// UNAUTHORIZEDOPERATION_INVALIDTOKEN = "UnauthorizedOperation.InvalidToken"
+// UNSUPPORTEDOPERATION = "UnsupportedOperation"
+// UNSUPPORTEDOPERATION_BANDWIDTHPACKAGEIDNOTSUPPORTED = "UnsupportedOperation.BandwidthPackageIdNotSupported"
+// UNSUPPORTEDOPERATION_HIBERNATIONOSVERSION = "UnsupportedOperation.HibernationOsVersion"
+// UNSUPPORTEDOPERATION_INSTANCESTATEISOLATING = "UnsupportedOperation.InstanceStateIsolating"
+// UNSUPPORTEDOPERATION_INSTANCETYPENOTSUPPORTJUMBOFRAME = "UnsupportedOperation.InstanceTypeNotSupportJumboFrame"
+// UNSUPPORTEDOPERATION_INSTANCESENABLEJUMBOWITHOUTREBOOT = "UnsupportedOperation.InstancesEnableJumboWithoutReboot"
+// UNSUPPORTEDOPERATION_INVALIDDISK = "UnsupportedOperation.InvalidDisk"
+// UNSUPPORTEDOPERATION_INVALIDREGIONDISKENCRYPT = "UnsupportedOperation.InvalidRegionDiskEncrypt"
+// UNSUPPORTEDOPERATION_KEYPAIRUNSUPPORTEDWINDOWS = "UnsupportedOperation.KeyPairUnsupportedWindows"
+// UNSUPPORTEDOPERATION_NOINSTANCETYPESUPPORTSPOT = "UnsupportedOperation.NoInstanceTypeSupportSpot"
+// UNSUPPORTEDOPERATION_NOTSUPPORTIMPORTINSTANCESACTIONTIMER = "UnsupportedOperation.NotSupportImportInstancesActionTimer"
+// UNSUPPORTEDOPERATION_ONLYFORPREPAIDACCOUNT = "UnsupportedOperation.OnlyForPrepaidAccount"
+// UNSUPPORTEDOPERATION_RAWLOCALDISKINSREINSTALLTOQCOW2 = "UnsupportedOperation.RawLocalDiskInsReinstalltoQcow2"
+// UNSUPPORTEDOPERATION_SPOTUNSUPPORTEDREGION = "UnsupportedOperation.SpotUnsupportedRegion"
+// UNSUPPORTEDOPERATION_UNDERWRITINGINSTANCETYPEONLYSUPPORTAUTORENEW = "UnsupportedOperation.UnderwritingInstanceTypeOnlySupportAutoRenew"
+// UNSUPPORTEDOPERATION_UNSUPPORTEDINTERNATIONALUSER = "UnsupportedOperation.UnsupportedInternationalUser"
+// VPCADDRNOTINSUBNET = "VpcAddrNotInSubNet"
+// VPCIPISUSED = "VpcIpIsUsed"
+func (c *Client) RunInstances(request *RunInstancesRequest) (response *RunInstancesResponse, err error) {
+ return c.RunInstancesWithContext(context.Background(), request)
+}
+
+// RunInstances
+// This API is used to create one or more instances with a specified configuration.
+//
+//
+//
+// * After an instance is created successfully, it will start up automatically, and the [instance status](https://intl.cloud.tencent.com/document/api/213/9452?from_cn_redirect=1#instance_state) will become "Running".
+//
+// * If you create a pay-as-you-go instance billed on an hourly basis, an amount equivalent to the hourly rate will be frozen. Make sure your account balance is sufficient before calling this API.
+//
+// * The number of instances you can purchase through this API is subject to the [Quota for CVM Instances](https://intl.cloud.tencent.com/document/product/213/2664?from_cn_redirect=1). Instances created through this API and in the CVM console are counted toward the quota.
+//
+// * This API is an async API. An instance ID list is returned after the creation request is sent. However, it does not mean the creation has been completed. The status of the instance will be `Creating` during the creation. You can use [DescribeInstances](https://intl.cloud.tencent.com/document/api/213/15728?from_cn_redirect=1) to query the status of the instance. If the status changes from `Creating` to `Running`, it means that the instance has been created successfully.
+//
+// error code that may be returned:
+// ACCOUNTQUALIFICATIONRESTRICTIONS = "AccountQualificationRestrictions"
+// AUTHFAILURE_CAMROLENAMEAUTHENTICATEFAILED = "AuthFailure.CamRoleNameAuthenticateFailed"
+// FAILEDOPERATION_DISASTERRECOVERGROUPNOTFOUND = "FailedOperation.DisasterRecoverGroupNotFound"
+// FAILEDOPERATION_ILLEGALTAGKEY = "FailedOperation.IllegalTagKey"
+// FAILEDOPERATION_ILLEGALTAGVALUE = "FailedOperation.IllegalTagValue"
+// FAILEDOPERATION_INQUIRYPRICEFAILED = "FailedOperation.InquiryPriceFailed"
+// FAILEDOPERATION_NOAVAILABLEIPADDRESSCOUNTINSUBNET = "FailedOperation.NoAvailableIpAddressCountInSubnet"
+// FAILEDOPERATION_PROMOTIONALREGIONRESTRICTION = "FailedOperation.PromotionalRegionRestriction"
+// FAILEDOPERATION_SECURITYGROUPACTIONFAILED = "FailedOperation.SecurityGroupActionFailed"
+// FAILEDOPERATION_SNAPSHOTSIZELARGERTHANDATASIZE = "FailedOperation.SnapshotSizeLargerThanDataSize"
+// FAILEDOPERATION_SNAPSHOTSIZELESSTHANDATASIZE = "FailedOperation.SnapshotSizeLessThanDataSize"
+// FAILEDOPERATION_TAGKEYRESERVED = "FailedOperation.TagKeyReserved"
+// INSTANCESQUOTALIMITEXCEEDED = "InstancesQuotaLimitExceeded"
+// INTERNALERROR_TRADEUNKNOWNERROR = "InternalError.TradeUnknownError"
+// INVALIDACCOUNT_INSUFFICIENTBALANCE = "InvalidAccount.InsufficientBalance"
+// INVALIDCLIENTTOKEN_TOOLONG = "InvalidClientToken.TooLong"
+// INVALIDHOSTID_MALFORMED = "InvalidHostId.Malformed"
+// INVALIDHOSTID_NOTFOUND = "InvalidHostId.NotFound"
+// INVALIDIMAGEID_MALFORMED = "InvalidImageId.Malformed"
+// INVALIDIMAGEID_NOTFOUND = "InvalidImageId.NotFound"
+// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported"
+// INVALIDINSTANCENAME_TOOLONG = "InvalidInstanceName.TooLong"
+// INVALIDINSTANCETYPE_MALFORMED = "InvalidInstanceType.Malformed"
+// INVALIDKEYPAIRID_MALFORMED = "InvalidKeyPairId.Malformed"
+// INVALIDPARAMETER_CDCNOTSUPPORTED = "InvalidParameter.CdcNotSupported"
+// INVALIDPARAMETER_EDGEZONEMISSINTERNETACCESSIBLE = "InvalidParameter.EdgeZoneMissInternetAccessible"
+// INVALIDPARAMETER_HOSTIDCUSTOMIZEDINSTANCETYPENOTSUPPORT = "InvalidParameter.HostIdCustomizedInstanceTypeNotSupport"
+// INVALIDPARAMETER_HOSTIDINSTANCETYPENOTSUPPORT = "InvalidParameter.HostIdInstanceTypeNotSupport"
+// INVALIDPARAMETER_HOSTIDSTANDARDINSTANCETYPENOTSUPPORT = "InvalidParameter.HostIdStandardInstanceTypeNotSupport"
+// INVALIDPARAMETER_HOSTIDSTATUSNOTSUPPORT = "InvalidParameter.HostIdStatusNotSupport"
+// INVALIDPARAMETER_INSTANCEIMAGENOTSUPPORT = "InvalidParameter.InstanceImageNotSupport"
+// INVALIDPARAMETER_INSTANCETYPESUPPORTEDHOSTNOTFOUND = "InvalidParameter.InstanceTypeSupportedHostNotFound"
+// INVALIDPARAMETER_INTERNETACCESSIBLENOTSUPPORTED = "InvalidParameter.InternetAccessibleNotSupported"
+// INVALIDPARAMETER_INVALIDIPFORMAT = "InvalidParameter.InvalidIpFormat"
+// INVALIDPARAMETER_LACKCORECOUNTORTHREADPERCORE = "InvalidParameter.LackCoreCountOrThreadPerCore"
+// INVALIDPARAMETER_ONLYSUPPORTFOREDGEZONE = "InvalidParameter.OnlySupportForEdgeZone"
+// INVALIDPARAMETER_PARAMETERCONFLICT = "InvalidParameter.ParameterConflict"
+// INVALIDPARAMETER_SNAPSHOTNOTFOUND = "InvalidParameter.SnapshotNotFound"
+// INVALIDPARAMETER_SPECIALPARAMETERFORSPECIALACCOUNT = "InvalidParameter.SpecialParameterForSpecialAccount"
+// INVALIDPARAMETERCOMBINATION = "InvalidParameterCombination"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPARAMETERVALUE_BANDWIDTHPACKAGEIDMALFORMED = "InvalidParameterValue.BandwidthPackageIdMalformed"
+// INVALIDPARAMETERVALUE_BANDWIDTHPACKAGEIDNOTFOUND = "InvalidParameterValue.BandwidthPackageIdNotFound"
+// INVALIDPARAMETERVALUE_BANDWIDTHPACKAGEISPNOTMATCH = "InvalidParameterValue.BandwidthPackageIspNotMatch"
+// INVALIDPARAMETERVALUE_BANDWIDTHPACKAGEZONENOTMATCH = "InvalidParameterValue.BandwidthPackageZoneNotMatch"
+// INVALIDPARAMETERVALUE_CAMROLENAMEMALFORMED = "InvalidParameterValue.CamRoleNameMalformed"
+// INVALIDPARAMETERVALUE_CHCHOSTSNOTFOUND = "InvalidParameterValue.ChcHostsNotFound"
+// INVALIDPARAMETERVALUE_CLOUDSSDDATADISKSIZETOOSMALL = "InvalidParameterValue.CloudSsdDataDiskSizeTooSmall"
+// INVALIDPARAMETERVALUE_CORECOUNTVALUE = "InvalidParameterValue.CoreCountValue"
+// INVALIDPARAMETERVALUE_DEDICATEDCLUSTERNOTSUPPORTEDCHARGETYPE = "InvalidParameterValue.DedicatedClusterNotSupportedChargeType"
+// INVALIDPARAMETERVALUE_DUPLICATE = "InvalidParameterValue.Duplicate"
+// INVALIDPARAMETERVALUE_DUPLICATETAGS = "InvalidParameterValue.DuplicateTags"
+// INVALIDPARAMETERVALUE_EXTERNALIPQUOTALIMITED = "InvalidParameterValue.ExternalIpQuotaLimited"
+// INVALIDPARAMETERVALUE_HPCCLUSTERIDZONEIDNOTMATCH = "InvalidParameterValue.HpcClusterIdZoneIdNotMatch"
+// INVALIDPARAMETERVALUE_IPADDRESSMALFORMED = "InvalidParameterValue.IPAddressMalformed"
+// INVALIDPARAMETERVALUE_ILLEGALHOSTNAME = "InvalidParameterValue.IllegalHostName"
+// INVALIDPARAMETERVALUE_INCORRECTFORMAT = "InvalidParameterValue.IncorrectFormat"
+// INVALIDPARAMETERVALUE_INSTANCETYPENOTFOUND = "InvalidParameterValue.InstanceTypeNotFound"
+// INVALIDPARAMETERVALUE_INSTANCETYPENOTSUPPORTHPCCLUSTER = "InvalidParameterValue.InstanceTypeNotSupportHpcCluster"
+// INVALIDPARAMETERVALUE_INSTANCETYPEREQUIREDHPCCLUSTER = "InvalidParameterValue.InstanceTypeRequiredHpcCluster"
+// INVALIDPARAMETERVALUE_INSUFFICIENTOFFERING = "InvalidParameterValue.InsufficientOffering"
+// INVALIDPARAMETERVALUE_INSUFFICIENTPRICE = "InvalidParameterValue.InsufficientPrice"
+// INVALIDPARAMETERVALUE_INVALIDAPPIDFORMAT = "InvalidParameterValue.InvalidAppIdFormat"
+// INVALIDPARAMETERVALUE_INVALIDIMAGEFORGIVENINSTANCETYPE = "InvalidParameterValue.InvalidImageForGivenInstanceType"
+// INVALIDPARAMETERVALUE_INVALIDIMAGEFORMAT = "InvalidParameterValue.InvalidImageFormat"
+// INVALIDPARAMETERVALUE_INVALIDIMAGEID = "InvalidParameterValue.InvalidImageId"
+// INVALIDPARAMETERVALUE_INVALIDIMAGEOSNAME = "InvalidParameterValue.InvalidImageOsName"
+// INVALIDPARAMETERVALUE_INVALIDIMAGESTATE = "InvalidParameterValue.InvalidImageState"
+// INVALIDPARAMETERVALUE_INVALIDIPFORMAT = "InvalidParameterValue.InvalidIpFormat"
+// INVALIDPARAMETERVALUE_INVALIDPASSWORD = "InvalidParameterValue.InvalidPassword"
+// INVALIDPARAMETERVALUE_INVALIDTIMEFORMAT = "InvalidParameterValue.InvalidTimeFormat"
+// INVALIDPARAMETERVALUE_INVALIDUSERDATAFORMAT = "InvalidParameterValue.InvalidUserDataFormat"
+// INVALIDPARAMETERVALUE_ISPNOTSUPPORTFOREDGEZONE = "InvalidParameterValue.IspNotSupportForEdgeZone"
+// INVALIDPARAMETERVALUE_ISPVALUEREPEATED = "InvalidParameterValue.IspValueRepeated"
+// INVALIDPARAMETERVALUE_KEYPAIRNOTFOUND = "InvalidParameterValue.KeyPairNotFound"
+// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDMALFORMED = "InvalidParameterValue.LaunchTemplateIdMalformed"
+// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDNOTEXISTED = "InvalidParameterValue.LaunchTemplateIdNotExisted"
+// INVALIDPARAMETERVALUE_LAUNCHTEMPLATENOTFOUND = "InvalidParameterValue.LaunchTemplateNotFound"
+// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEVERSION = "InvalidParameterValue.LaunchTemplateVersion"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// INVALIDPARAMETERVALUE_MUSTDHCPENABLEDVPC = "InvalidParameterValue.MustDhcpEnabledVpc"
+// INVALIDPARAMETERVALUE_NOTCDCSUBNET = "InvalidParameterValue.NotCdcSubnet"
+// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range"
+// INVALIDPARAMETERVALUE_SNAPSHOTIDMALFORMED = "InvalidParameterValue.SnapshotIdMalformed"
+// INVALIDPARAMETERVALUE_SUBNETIDMALFORMED = "InvalidParameterValue.SubnetIdMalformed"
+// INVALIDPARAMETERVALUE_SUBNETNOTEXIST = "InvalidParameterValue.SubnetNotExist"
+// INVALIDPARAMETERVALUE_TAGKEYNOTFOUND = "InvalidParameterValue.TagKeyNotFound"
+// INVALIDPARAMETERVALUE_TAGQUOTALIMITEXCEEDED = "InvalidParameterValue.TagQuotaLimitExceeded"
+// INVALIDPARAMETERVALUE_THREADPERCOREVALUE = "InvalidParameterValue.ThreadPerCoreValue"
+// INVALIDPARAMETERVALUE_TOOLARGE = "InvalidParameterValue.TooLarge"
+// INVALIDPARAMETERVALUE_VPCIDMALFORMED = "InvalidParameterValue.VpcIdMalformed"
+// INVALIDPARAMETERVALUE_VPCIDNOTEXIST = "InvalidParameterValue.VpcIdNotExist"
+// INVALIDPARAMETERVALUE_VPCIDZONEIDNOTMATCH = "InvalidParameterValue.VpcIdZoneIdNotMatch"
+// INVALIDPARAMETERVALUE_VPCNOTSUPPORTIPV6ADDRESS = "InvalidParameterValue.VpcNotSupportIpv6Address"
+// INVALIDPARAMETERVALUE_ZONENOTSUPPORTED = "InvalidParameterValue.ZoneNotSupported"
+// INVALIDPASSWORD = "InvalidPassword"
+// INVALIDPERIOD = "InvalidPeriod"
+// INVALIDPERMISSION = "InvalidPermission"
+// INVALIDPROJECTID_NOTFOUND = "InvalidProjectId.NotFound"
+// INVALIDSECURITYGROUPID_NOTFOUND = "InvalidSecurityGroupId.NotFound"
+// INVALIDZONE_MISMATCHREGION = "InvalidZone.MismatchRegion"
+// LIMITEXCEEDED_CVMINSTANCEQUOTA = "LimitExceeded.CvmInstanceQuota"
+// LIMITEXCEEDED_CVMSVIFSPERSECGROUPLIMITEXCEEDED = "LimitExceeded.CvmsVifsPerSecGroupLimitExceeded"
+// LIMITEXCEEDED_DISASTERRECOVERGROUP = "LimitExceeded.DisasterRecoverGroup"
+// LIMITEXCEEDED_IPV6ADDRESSNUM = "LimitExceeded.IPv6AddressNum"
+// LIMITEXCEEDED_INSTANCEENINUMLIMIT = "LimitExceeded.InstanceEniNumLimit"
+// LIMITEXCEEDED_INSTANCEQUOTA = "LimitExceeded.InstanceQuota"
+// LIMITEXCEEDED_PREPAYQUOTA = "LimitExceeded.PrepayQuota"
+// LIMITEXCEEDED_PREPAYUNDERWRITEQUOTA = "LimitExceeded.PrepayUnderwriteQuota"
+// LIMITEXCEEDED_SINGLEUSGQUOTA = "LimitExceeded.SingleUSGQuota"
+// LIMITEXCEEDED_SPOTQUOTA = "LimitExceeded.SpotQuota"
+// LIMITEXCEEDED_USERSPOTQUOTA = "LimitExceeded.UserSpotQuota"
+// LIMITEXCEEDED_VPCSUBNETNUM = "LimitExceeded.VpcSubnetNum"
+// MISSINGPARAMETER = "MissingParameter"
+// MISSINGPARAMETER_DPDKINSTANCETYPEREQUIREDVPC = "MissingParameter.DPDKInstanceTypeRequiredVPC"
+// MISSINGPARAMETER_MONITORSERVICE = "MissingParameter.MonitorService"
+// OPERATIONDENIED_ACCOUNTNOTSUPPORTED = "OperationDenied.AccountNotSupported"
+// OPERATIONDENIED_CHCINSTALLCLOUDIMAGEWITHOUTDEPLOYNETWORK = "OperationDenied.ChcInstallCloudImageWithoutDeployNetwork"
+// OPERATIONDENIED_NOTBANDWIDTHSHIFTUPUSERAPPLYEDGEZONEEIP = "OperationDenied.NotBandwidthShiftUpUserApplyEdgeZoneEip"
+// RESOURCEINSUFFICIENT_AVAILABILITYZONESOLDOUT = "ResourceInsufficient.AvailabilityZoneSoldOut"
+// RESOURCEINSUFFICIENT_CIDRBLOCK = "ResourceInsufficient.CidrBlock"
+// RESOURCEINSUFFICIENT_CLOUDDISKSOLDOUT = "ResourceInsufficient.CloudDiskSoldOut"
+// RESOURCEINSUFFICIENT_CLOUDDISKUNAVAILABLE = "ResourceInsufficient.CloudDiskUnavailable"
+// RESOURCEINSUFFICIENT_DISASTERRECOVERGROUPCVMQUOTA = "ResourceInsufficient.DisasterRecoverGroupCvmQuota"
+// RESOURCEINSUFFICIENT_SPECIFIEDINSTANCETYPE = "ResourceInsufficient.SpecifiedInstanceType"
+// RESOURCENOTFOUND_HPCCLUSTER = "ResourceNotFound.HpcCluster"
+// RESOURCENOTFOUND_KEYPAIRNOTFOUND = "ResourceNotFound.KeyPairNotFound"
+// RESOURCENOTFOUND_NODEFAULTCBS = "ResourceNotFound.NoDefaultCbs"
+// RESOURCENOTFOUND_NODEFAULTCBSWITHREASON = "ResourceNotFound.NoDefaultCbsWithReason"
+// RESOURCEUNAVAILABLE_INSTANCETYPE = "ResourceUnavailable.InstanceType"
+// RESOURCESSOLDOUT_EIPINSUFFICIENT = "ResourcesSoldOut.EipInsufficient"
+// RESOURCESSOLDOUT_SPECIFIEDINSTANCETYPE = "ResourcesSoldOut.SpecifiedInstanceType"
+// UNAUTHORIZEDOPERATION_INVALIDTOKEN = "UnauthorizedOperation.InvalidToken"
+// UNSUPPORTEDOPERATION = "UnsupportedOperation"
+// UNSUPPORTEDOPERATION_BANDWIDTHPACKAGEIDNOTSUPPORTED = "UnsupportedOperation.BandwidthPackageIdNotSupported"
+// UNSUPPORTEDOPERATION_HIBERNATIONOSVERSION = "UnsupportedOperation.HibernationOsVersion"
+// UNSUPPORTEDOPERATION_INSTANCESTATEISOLATING = "UnsupportedOperation.InstanceStateIsolating"
+// UNSUPPORTEDOPERATION_INSTANCETYPENOTSUPPORTJUMBOFRAME = "UnsupportedOperation.InstanceTypeNotSupportJumboFrame"
+// UNSUPPORTEDOPERATION_INSTANCESENABLEJUMBOWITHOUTREBOOT = "UnsupportedOperation.InstancesEnableJumboWithoutReboot"
+// UNSUPPORTEDOPERATION_INVALIDDISK = "UnsupportedOperation.InvalidDisk"
+// UNSUPPORTEDOPERATION_INVALIDREGIONDISKENCRYPT = "UnsupportedOperation.InvalidRegionDiskEncrypt"
+// UNSUPPORTEDOPERATION_KEYPAIRUNSUPPORTEDWINDOWS = "UnsupportedOperation.KeyPairUnsupportedWindows"
+// UNSUPPORTEDOPERATION_NOINSTANCETYPESUPPORTSPOT = "UnsupportedOperation.NoInstanceTypeSupportSpot"
+// UNSUPPORTEDOPERATION_NOTSUPPORTIMPORTINSTANCESACTIONTIMER = "UnsupportedOperation.NotSupportImportInstancesActionTimer"
+// UNSUPPORTEDOPERATION_ONLYFORPREPAIDACCOUNT = "UnsupportedOperation.OnlyForPrepaidAccount"
+// UNSUPPORTEDOPERATION_RAWLOCALDISKINSREINSTALLTOQCOW2 = "UnsupportedOperation.RawLocalDiskInsReinstalltoQcow2"
+// UNSUPPORTEDOPERATION_SPOTUNSUPPORTEDREGION = "UnsupportedOperation.SpotUnsupportedRegion"
+// UNSUPPORTEDOPERATION_UNDERWRITINGINSTANCETYPEONLYSUPPORTAUTORENEW = "UnsupportedOperation.UnderwritingInstanceTypeOnlySupportAutoRenew"
+// UNSUPPORTEDOPERATION_UNSUPPORTEDINTERNATIONALUSER = "UnsupportedOperation.UnsupportedInternationalUser"
+// VPCADDRNOTINSUBNET = "VpcAddrNotInSubNet"
+// VPCIPISUSED = "VpcIpIsUsed"
+func (c *Client) RunInstancesWithContext(ctx context.Context, request *RunInstancesRequest) (response *RunInstancesResponse, err error) {
+ if request == nil {
+ request = NewRunInstancesRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("RunInstances require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewRunInstancesResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewStartInstancesRequest() (request *StartInstancesRequest) {
+ request = &StartInstancesRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("cvm", APIVersion, "StartInstances")
+
+
+ return
+}
+
+func NewStartInstancesResponse() (response *StartInstancesResponse) {
+ response = &StartInstancesResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// StartInstances
+// This API is used to start instances.
+//
+//
+//
+// * You can only perform this operation on instances whose status is `STOPPED`.
+//
+// * The instance status will become `STARTING` when the API is called successfully and `RUNNING` when the instance is successfully started.
+//
+// * Batch operations are supported. The maximum number of instances in each request is 100.
+//
+// error code that may be returned:
+// INTERNALSERVERERROR = "InternalServerError"
+// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported"
+// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed"
+// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// INVALIDPARAMETERVALUE_ZONENOTSUPPORTED = "InvalidParameterValue.ZoneNotSupported"
+// MISSINGPARAMETER = "MissingParameter"
+// MUTEXOPERATION_TASKRUNNING = "MutexOperation.TaskRunning"
+// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress"
+// UNSUPPORTEDOPERATION_INSTANCEREINSTALLFAILED = "UnsupportedOperation.InstanceReinstallFailed"
+// UNSUPPORTEDOPERATION_INSTANCESTATECORRUPTED = "UnsupportedOperation.InstanceStateCorrupted"
+// UNSUPPORTEDOPERATION_INSTANCESTATEENTERRESCUEMODE = "UnsupportedOperation.InstanceStateEnterRescueMode"
+// UNSUPPORTEDOPERATION_INSTANCESTATEEXITRESCUEMODE = "UnsupportedOperation.InstanceStateExitRescueMode"
+// UNSUPPORTEDOPERATION_INSTANCESTATEFREEZING = "UnsupportedOperation.InstanceStateFreezing"
+// UNSUPPORTEDOPERATION_INSTANCESTATEISOLATING = "UnsupportedOperation.InstanceStateIsolating"
+// UNSUPPORTEDOPERATION_INSTANCESTATEPENDING = "UnsupportedOperation.InstanceStatePending"
+// UNSUPPORTEDOPERATION_INSTANCESTATEREBOOTING = "UnsupportedOperation.InstanceStateRebooting"
+// UNSUPPORTEDOPERATION_INSTANCESTATERESCUEMODE = "UnsupportedOperation.InstanceStateRescueMode"
+// UNSUPPORTEDOPERATION_INSTANCESTATERUNNING = "UnsupportedOperation.InstanceStateRunning"
+// UNSUPPORTEDOPERATION_INSTANCESTATESERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateServiceLiveMigrate"
+// UNSUPPORTEDOPERATION_INSTANCESTATESHUTDOWN = "UnsupportedOperation.InstanceStateShutdown"
+// UNSUPPORTEDOPERATION_INSTANCESTATESTARTING = "UnsupportedOperation.InstanceStateStarting"
+// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPED = "UnsupportedOperation.InstanceStateStopped"
+// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPING = "UnsupportedOperation.InstanceStateStopping"
+// UNSUPPORTEDOPERATION_INSTANCESTATETERMINATED = "UnsupportedOperation.InstanceStateTerminated"
+// UNSUPPORTEDOPERATION_INSTANCESTATETERMINATING = "UnsupportedOperation.InstanceStateTerminating"
+func (c *Client) StartInstances(request *StartInstancesRequest) (response *StartInstancesResponse, err error) {
+ return c.StartInstancesWithContext(context.Background(), request)
+}
+
+// StartInstances
+// This API is used to start instances.
+//
+//
+//
+// * You can only perform this operation on instances whose status is `STOPPED`.
+//
+// * The instance status will become `STARTING` when the API is called successfully and `RUNNING` when the instance is successfully started.
+//
+// * Batch operations are supported. The maximum number of instances in each request is 100.
+//
+// error code that may be returned:
+// INTERNALSERVERERROR = "InternalServerError"
+// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported"
+// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed"
+// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// INVALIDPARAMETERVALUE_ZONENOTSUPPORTED = "InvalidParameterValue.ZoneNotSupported"
+// MISSINGPARAMETER = "MissingParameter"
+// MUTEXOPERATION_TASKRUNNING = "MutexOperation.TaskRunning"
+// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress"
+// UNSUPPORTEDOPERATION_INSTANCEREINSTALLFAILED = "UnsupportedOperation.InstanceReinstallFailed"
+// UNSUPPORTEDOPERATION_INSTANCESTATECORRUPTED = "UnsupportedOperation.InstanceStateCorrupted"
+// UNSUPPORTEDOPERATION_INSTANCESTATEENTERRESCUEMODE = "UnsupportedOperation.InstanceStateEnterRescueMode"
+// UNSUPPORTEDOPERATION_INSTANCESTATEEXITRESCUEMODE = "UnsupportedOperation.InstanceStateExitRescueMode"
+// UNSUPPORTEDOPERATION_INSTANCESTATEFREEZING = "UnsupportedOperation.InstanceStateFreezing"
+// UNSUPPORTEDOPERATION_INSTANCESTATEISOLATING = "UnsupportedOperation.InstanceStateIsolating"
+// UNSUPPORTEDOPERATION_INSTANCESTATEPENDING = "UnsupportedOperation.InstanceStatePending"
+// UNSUPPORTEDOPERATION_INSTANCESTATEREBOOTING = "UnsupportedOperation.InstanceStateRebooting"
+// UNSUPPORTEDOPERATION_INSTANCESTATERESCUEMODE = "UnsupportedOperation.InstanceStateRescueMode"
+// UNSUPPORTEDOPERATION_INSTANCESTATERUNNING = "UnsupportedOperation.InstanceStateRunning"
+// UNSUPPORTEDOPERATION_INSTANCESTATESERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateServiceLiveMigrate"
+// UNSUPPORTEDOPERATION_INSTANCESTATESHUTDOWN = "UnsupportedOperation.InstanceStateShutdown"
+// UNSUPPORTEDOPERATION_INSTANCESTATESTARTING = "UnsupportedOperation.InstanceStateStarting"
+// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPED = "UnsupportedOperation.InstanceStateStopped"
+// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPING = "UnsupportedOperation.InstanceStateStopping"
+// UNSUPPORTEDOPERATION_INSTANCESTATETERMINATED = "UnsupportedOperation.InstanceStateTerminated"
+// UNSUPPORTEDOPERATION_INSTANCESTATETERMINATING = "UnsupportedOperation.InstanceStateTerminating"
+func (c *Client) StartInstancesWithContext(ctx context.Context, request *StartInstancesRequest) (response *StartInstancesResponse, err error) {
+ if request == nil {
+ request = NewStartInstancesRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("StartInstances require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewStartInstancesResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewStopInstancesRequest() (request *StopInstancesRequest) {
+ request = &StopInstancesRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("cvm", APIVersion, "StopInstances")
+
+
+ return
+}
+
+func NewStopInstancesResponse() (response *StopInstancesResponse) {
+ response = &StopInstancesResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// StopInstances
+// This API is used to shut down instances.
+//
+//
+//
+// * You can only perform this operation on instances whose status is `RUNNING`.
+//
+// * The instance status will become `STOPPING` when the API is called successfully and `STOPPED` when the instance is successfully shut down.
+//
+// * Forced shutdown is supported. A forced shutdown is similar to switching off the power of a physical computer. It may cause data loss or file system corruption. Be sure to only force shut down a CVM when it cannot be sht down normally.
+//
+// * Batch operations are supported. The maximum number of instances in each request is 100.
+//
+// error code that may be returned:
+// INTERNALSERVERERROR = "InternalServerError"
+// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported"
+// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed"
+// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound"
+// INVALIDPARAMETERCOMBINATION = "InvalidParameterCombination"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// INVALIDPARAMETERVALUE_ZONENOTSUPPORTED = "InvalidParameterValue.ZoneNotSupported"
+// MISSINGPARAMETER = "MissingParameter"
+// MUTEXOPERATION_TASKRUNNING = "MutexOperation.TaskRunning"
+// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress"
+// UNAUTHORIZEDOPERATION_MFAEXPIRED = "UnauthorizedOperation.MFAExpired"
+// UNAUTHORIZEDOPERATION_MFANOTFOUND = "UnauthorizedOperation.MFANotFound"
+// UNSUPPORTEDOPERATION_HIBERNATIONFORNORMALINSTANCE = "UnsupportedOperation.HibernationForNormalInstance"
+// UNSUPPORTEDOPERATION_INSTANCEREINSTALLFAILED = "UnsupportedOperation.InstanceReinstallFailed"
+// UNSUPPORTEDOPERATION_INSTANCESTATEBANNING = "UnsupportedOperation.InstanceStateBanning"
+// UNSUPPORTEDOPERATION_INSTANCESTATECORRUPTED = "UnsupportedOperation.InstanceStateCorrupted"
+// UNSUPPORTEDOPERATION_INSTANCESTATEENTERRESCUEMODE = "UnsupportedOperation.InstanceStateEnterRescueMode"
+// UNSUPPORTEDOPERATION_INSTANCESTATEENTERSERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateEnterServiceLiveMigrate"
+// UNSUPPORTEDOPERATION_INSTANCESTATEEXITRESCUEMODE = "UnsupportedOperation.InstanceStateExitRescueMode"
+// UNSUPPORTEDOPERATION_INSTANCESTATEEXITSERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateExitServiceLiveMigrate"
+// UNSUPPORTEDOPERATION_INSTANCESTATEFREEZING = "UnsupportedOperation.InstanceStateFreezing"
+// UNSUPPORTEDOPERATION_INSTANCESTATEISOLATING = "UnsupportedOperation.InstanceStateIsolating"
+// UNSUPPORTEDOPERATION_INSTANCESTATEPENDING = "UnsupportedOperation.InstanceStatePending"
+// UNSUPPORTEDOPERATION_INSTANCESTATEREBOOTING = "UnsupportedOperation.InstanceStateRebooting"
+// UNSUPPORTEDOPERATION_INSTANCESTATERESCUEMODE = "UnsupportedOperation.InstanceStateRescueMode"
+// UNSUPPORTEDOPERATION_INSTANCESTATESERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateServiceLiveMigrate"
+// UNSUPPORTEDOPERATION_INSTANCESTATESHUTDOWN = "UnsupportedOperation.InstanceStateShutdown"
+// UNSUPPORTEDOPERATION_INSTANCESTATESTARTING = "UnsupportedOperation.InstanceStateStarting"
+// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPED = "UnsupportedOperation.InstanceStateStopped"
+// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPING = "UnsupportedOperation.InstanceStateStopping"
+// UNSUPPORTEDOPERATION_INSTANCESTATETERMINATED = "UnsupportedOperation.InstanceStateTerminated"
+// UNSUPPORTEDOPERATION_INSTANCESTATETERMINATING = "UnsupportedOperation.InstanceStateTerminating"
+// UNSUPPORTEDOPERATION_STOPPEDMODESTOPCHARGING = "UnsupportedOperation.StoppedModeStopCharging"
+func (c *Client) StopInstances(request *StopInstancesRequest) (response *StopInstancesResponse, err error) {
+ return c.StopInstancesWithContext(context.Background(), request)
+}
+
+// StopInstances
+// This API is used to shut down instances.
+//
+//
+//
+// * You can only perform this operation on instances whose status is `RUNNING`.
+//
+// * The instance status will become `STOPPING` when the API is called successfully and `STOPPED` when the instance is successfully shut down.
+//
+// * Forced shutdown is supported. A forced shutdown is similar to switching off the power of a physical computer. It may cause data loss or file system corruption. Be sure to only force shut down a CVM when it cannot be sht down normally.
+//
+// * Batch operations are supported. The maximum number of instances in each request is 100.
+//
+// error code that may be returned:
+// INTERNALSERVERERROR = "InternalServerError"
+// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported"
+// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed"
+// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound"
+// INVALIDPARAMETERCOMBINATION = "InvalidParameterCombination"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// INVALIDPARAMETERVALUE_ZONENOTSUPPORTED = "InvalidParameterValue.ZoneNotSupported"
+// MISSINGPARAMETER = "MissingParameter"
+// MUTEXOPERATION_TASKRUNNING = "MutexOperation.TaskRunning"
+// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress"
+// UNAUTHORIZEDOPERATION_MFAEXPIRED = "UnauthorizedOperation.MFAExpired"
+// UNAUTHORIZEDOPERATION_MFANOTFOUND = "UnauthorizedOperation.MFANotFound"
+// UNSUPPORTEDOPERATION_HIBERNATIONFORNORMALINSTANCE = "UnsupportedOperation.HibernationForNormalInstance"
+// UNSUPPORTEDOPERATION_INSTANCEREINSTALLFAILED = "UnsupportedOperation.InstanceReinstallFailed"
+// UNSUPPORTEDOPERATION_INSTANCESTATEBANNING = "UnsupportedOperation.InstanceStateBanning"
+// UNSUPPORTEDOPERATION_INSTANCESTATECORRUPTED = "UnsupportedOperation.InstanceStateCorrupted"
+// UNSUPPORTEDOPERATION_INSTANCESTATEENTERRESCUEMODE = "UnsupportedOperation.InstanceStateEnterRescueMode"
+// UNSUPPORTEDOPERATION_INSTANCESTATEENTERSERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateEnterServiceLiveMigrate"
+// UNSUPPORTEDOPERATION_INSTANCESTATEEXITRESCUEMODE = "UnsupportedOperation.InstanceStateExitRescueMode"
+// UNSUPPORTEDOPERATION_INSTANCESTATEEXITSERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateExitServiceLiveMigrate"
+// UNSUPPORTEDOPERATION_INSTANCESTATEFREEZING = "UnsupportedOperation.InstanceStateFreezing"
+// UNSUPPORTEDOPERATION_INSTANCESTATEISOLATING = "UnsupportedOperation.InstanceStateIsolating"
+// UNSUPPORTEDOPERATION_INSTANCESTATEPENDING = "UnsupportedOperation.InstanceStatePending"
+// UNSUPPORTEDOPERATION_INSTANCESTATEREBOOTING = "UnsupportedOperation.InstanceStateRebooting"
+// UNSUPPORTEDOPERATION_INSTANCESTATERESCUEMODE = "UnsupportedOperation.InstanceStateRescueMode"
+// UNSUPPORTEDOPERATION_INSTANCESTATESERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateServiceLiveMigrate"
+// UNSUPPORTEDOPERATION_INSTANCESTATESHUTDOWN = "UnsupportedOperation.InstanceStateShutdown"
+// UNSUPPORTEDOPERATION_INSTANCESTATESTARTING = "UnsupportedOperation.InstanceStateStarting"
+// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPED = "UnsupportedOperation.InstanceStateStopped"
+// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPING = "UnsupportedOperation.InstanceStateStopping"
+// UNSUPPORTEDOPERATION_INSTANCESTATETERMINATED = "UnsupportedOperation.InstanceStateTerminated"
+// UNSUPPORTEDOPERATION_INSTANCESTATETERMINATING = "UnsupportedOperation.InstanceStateTerminating"
+// UNSUPPORTEDOPERATION_STOPPEDMODESTOPCHARGING = "UnsupportedOperation.StoppedModeStopCharging"
+func (c *Client) StopInstancesWithContext(ctx context.Context, request *StopInstancesRequest) (response *StopInstancesResponse, err error) {
+ if request == nil {
+ request = NewStopInstancesRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("StopInstances require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewStopInstancesResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewSyncImagesRequest() (request *SyncImagesRequest) {
+ request = &SyncImagesRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("cvm", APIVersion, "SyncImages")
+
+
+ return
+}
+
+func NewSyncImagesResponse() (response *SyncImagesResponse) {
+ response = &SyncImagesResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// SyncImages
+// This API is used to synchronize custom images to other regions.
+//
+//
+//
+// * This API only supports synchronizing one image per call.
+//
+// * This API supports multiple synchronization regions.
+//
+// * A single account can have a maximum of 500 custom images in each region.
+//
+// error code that may be returned:
+// FAILEDOPERATION_INVALIDIMAGESTATE = "FailedOperation.InvalidImageState"
+// IMAGEQUOTALIMITEXCEEDED = "ImageQuotaLimitExceeded"
+// INVALIDIMAGEID_INCORRECTSTATE = "InvalidImageId.IncorrectState"
+// INVALIDIMAGEID_MALFORMED = "InvalidImageId.Malformed"
+// INVALIDIMAGEID_NOTFOUND = "InvalidImageId.NotFound"
+// INVALIDIMAGEID_TOOLARGE = "InvalidImageId.TooLarge"
+// INVALIDIMAGENAME_DUPLICATE = "InvalidImageName.Duplicate"
+// INVALIDPARAMETER_INSTANCEIMAGENOTSUPPORT = "InvalidParameter.InstanceImageNotSupport"
+// INVALIDPARAMETER_INVALIDKMSKEYID = "InvalidParameter.InvalidKmsKeyId"
+// INVALIDPARAMETERVALUE_INVALIDIMAGEID = "InvalidParameterValue.InvalidImageId"
+// INVALIDPARAMETERVALUE_INVALIDIMAGESTATE = "InvalidParameterValue.InvalidImageState"
+// INVALIDPARAMETERVALUE_INVALIDREGION = "InvalidParameterValue.InvalidRegion"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// INVALIDREGION_NOTFOUND = "InvalidRegion.NotFound"
+// INVALIDREGION_UNAVAILABLE = "InvalidRegion.Unavailable"
+// UNSUPPORTEDOPERATION_ENCRYPTEDIMAGESNOTSUPPORTED = "UnsupportedOperation.EncryptedImagesNotSupported"
+// UNSUPPORTEDOPERATION_LOCATIONIMAGENOTSUPPORTED = "UnsupportedOperation.LocationImageNotSupported"
+// UNSUPPORTEDOPERATION_REGION = "UnsupportedOperation.Region"
+// UNSUPPORTEDOPERATION_SYNCENCRYPTIMAGENOTSUPPORT = "UnsupportedOperation.SyncEncryptImageNotSupport"
+func (c *Client) SyncImages(request *SyncImagesRequest) (response *SyncImagesResponse, err error) {
+ return c.SyncImagesWithContext(context.Background(), request)
+}
+
+// SyncImages
+// This API is used to synchronize custom images to other regions.
+//
+//
+//
+// * This API only supports synchronizing one image per call.
+//
+// * This API supports multiple synchronization regions.
+//
+// * A single account can have a maximum of 500 custom images in each region.
+//
+// error code that may be returned:
+// FAILEDOPERATION_INVALIDIMAGESTATE = "FailedOperation.InvalidImageState"
+// IMAGEQUOTALIMITEXCEEDED = "ImageQuotaLimitExceeded"
+// INVALIDIMAGEID_INCORRECTSTATE = "InvalidImageId.IncorrectState"
+// INVALIDIMAGEID_MALFORMED = "InvalidImageId.Malformed"
+// INVALIDIMAGEID_NOTFOUND = "InvalidImageId.NotFound"
+// INVALIDIMAGEID_TOOLARGE = "InvalidImageId.TooLarge"
+// INVALIDIMAGENAME_DUPLICATE = "InvalidImageName.Duplicate"
+// INVALIDPARAMETER_INSTANCEIMAGENOTSUPPORT = "InvalidParameter.InstanceImageNotSupport"
+// INVALIDPARAMETER_INVALIDKMSKEYID = "InvalidParameter.InvalidKmsKeyId"
+// INVALIDPARAMETERVALUE_INVALIDIMAGEID = "InvalidParameterValue.InvalidImageId"
+// INVALIDPARAMETERVALUE_INVALIDIMAGESTATE = "InvalidParameterValue.InvalidImageState"
+// INVALIDPARAMETERVALUE_INVALIDREGION = "InvalidParameterValue.InvalidRegion"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// INVALIDREGION_NOTFOUND = "InvalidRegion.NotFound"
+// INVALIDREGION_UNAVAILABLE = "InvalidRegion.Unavailable"
+// UNSUPPORTEDOPERATION_ENCRYPTEDIMAGESNOTSUPPORTED = "UnsupportedOperation.EncryptedImagesNotSupported"
+// UNSUPPORTEDOPERATION_LOCATIONIMAGENOTSUPPORTED = "UnsupportedOperation.LocationImageNotSupported"
+// UNSUPPORTEDOPERATION_REGION = "UnsupportedOperation.Region"
+// UNSUPPORTEDOPERATION_SYNCENCRYPTIMAGENOTSUPPORT = "UnsupportedOperation.SyncEncryptImageNotSupport"
+func (c *Client) SyncImagesWithContext(ctx context.Context, request *SyncImagesRequest) (response *SyncImagesResponse, err error) {
+ if request == nil {
+ request = NewSyncImagesRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("SyncImages require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewSyncImagesResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewTerminateInstancesRequest() (request *TerminateInstancesRequest) {
+ request = &TerminateInstancesRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("cvm", APIVersion, "TerminateInstances")
+
+
+ return
+}
+
+func NewTerminateInstancesResponse() (response *TerminateInstancesResponse) {
+ response = &TerminateInstancesResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// TerminateInstances
+// This API is used to return instances.
+//
+//
+//
+// * Use this API to return instances that are no longer required.
+//
+// * Pay-as-you-go instances can be returned directly through this API.
+//
+// * When this API is called for the first time, the instance will be moved to the recycle bin. When this API is called for the second time, the instance will be terminated and cannot be recovered.
+//
+// * Batch operations are supported. The allowed maximum number of instances in each request is 100.
+//
+// error code that may be returned:
+// FAILEDOPERATION_INVALIDINSTANCEAPPLICATIONROLE = "FailedOperation.InvalidInstanceApplicationRole"
+// FAILEDOPERATION_INVALIDINSTANCEAPPLICATIONROLEEMR = "FailedOperation.InvalidInstanceApplicationRoleEmr"
+// FAILEDOPERATION_UNRETURNABLE = "FailedOperation.Unreturnable"
+// INTERNALERROR_TRADEUNKNOWNERROR = "InternalError.TradeUnknownError"
+// INTERNALSERVERERROR = "InternalServerError"
+// INVALIDACCOUNT_UNPAIDORDER = "InvalidAccount.UnpaidOrder"
+// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported"
+// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed"
+// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound"
+// INVALIDINSTANCENOTSUPPORTEDPREPAIDINSTANCE = "InvalidInstanceNotSupportedPrepaidInstance"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed"
+// INVALIDPARAMETERVALUE_INVALIDAPPIDFORMAT = "InvalidParameterValue.InvalidAppIdFormat"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// INVALIDPARAMETERVALUE_NOTSUPPORTED = "InvalidParameterValue.NotSupported"
+// LIMITEXCEEDED_USERRETURNQUOTA = "LimitExceeded.UserReturnQuota"
+// MISSINGPARAMETER = "MissingParameter"
+// MUTEXOPERATION_TASKRUNNING = "MutexOperation.TaskRunning"
+// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress"
+// UNAUTHORIZEDOPERATION_INVALIDTOKEN = "UnauthorizedOperation.InvalidToken"
+// UNAUTHORIZEDOPERATION_MFAEXPIRED = "UnauthorizedOperation.MFAExpired"
+// UNAUTHORIZEDOPERATION_MFANOTFOUND = "UnauthorizedOperation.MFANotFound"
+// UNSUPPORTEDOPERATION = "UnsupportedOperation"
+// UNSUPPORTEDOPERATION_INSTANCECHARGETYPE = "UnsupportedOperation.InstanceChargeType"
+// UNSUPPORTEDOPERATION_INSTANCEMIXEDPRICINGMODEL = "UnsupportedOperation.InstanceMixedPricingModel"
+// UNSUPPORTEDOPERATION_INSTANCESTATEBANNING = "UnsupportedOperation.InstanceStateBanning"
+// UNSUPPORTEDOPERATION_INSTANCESTATEENTERRESCUEMODE = "UnsupportedOperation.InstanceStateEnterRescueMode"
+// UNSUPPORTEDOPERATION_INSTANCESTATEENTERSERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateEnterServiceLiveMigrate"
+// UNSUPPORTEDOPERATION_INSTANCESTATEEXITRESCUEMODE = "UnsupportedOperation.InstanceStateExitRescueMode"
+// UNSUPPORTEDOPERATION_INSTANCESTATEEXITSERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateExitServiceLiveMigrate"
+// UNSUPPORTEDOPERATION_INSTANCESTATEFREEZING = "UnsupportedOperation.InstanceStateFreezing"
+// UNSUPPORTEDOPERATION_INSTANCESTATEISOLATING = "UnsupportedOperation.InstanceStateIsolating"
+// UNSUPPORTEDOPERATION_INSTANCESTATELAUNCHFAILED = "UnsupportedOperation.InstanceStateLaunchFailed"
+// UNSUPPORTEDOPERATION_INSTANCESTATEPENDING = "UnsupportedOperation.InstanceStatePending"
+// UNSUPPORTEDOPERATION_INSTANCESTATEREBOOTING = "UnsupportedOperation.InstanceStateRebooting"
+// UNSUPPORTEDOPERATION_INSTANCESTATESTARTING = "UnsupportedOperation.InstanceStateStarting"
+// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPING = "UnsupportedOperation.InstanceStateStopping"
+// UNSUPPORTEDOPERATION_INSTANCESTATETERMINATED = "UnsupportedOperation.InstanceStateTerminated"
+// UNSUPPORTEDOPERATION_INSTANCESTATETERMINATING = "UnsupportedOperation.InstanceStateTerminating"
+// UNSUPPORTEDOPERATION_INSTANCESPROTECTED = "UnsupportedOperation.InstancesProtected"
+// UNSUPPORTEDOPERATION_INVALIDINSTANCESOWNER = "UnsupportedOperation.InvalidInstancesOwner"
+// UNSUPPORTEDOPERATION_REDHATINSTANCETERMINATEUNSUPPORTED = "UnsupportedOperation.RedHatInstanceTerminateUnsupported"
+// UNSUPPORTEDOPERATION_REDHATINSTANCEUNSUPPORTED = "UnsupportedOperation.RedHatInstanceUnsupported"
+// UNSUPPORTEDOPERATION_REGION = "UnsupportedOperation.Region"
+// UNSUPPORTEDOPERATION_SPECIALINSTANCETYPE = "UnsupportedOperation.SpecialInstanceType"
+// UNSUPPORTEDOPERATION_USERLIMITOPERATIONEXCEEDQUOTA = "UnsupportedOperation.UserLimitOperationExceedQuota"
+func (c *Client) TerminateInstances(request *TerminateInstancesRequest) (response *TerminateInstancesResponse, err error) {
+ return c.TerminateInstancesWithContext(context.Background(), request)
+}
+
+// TerminateInstances
+// This API is used to return instances.
+//
+//
+//
+// * Use this API to return instances that are no longer required.
+//
+// * Pay-as-you-go instances can be returned directly through this API.
+//
+// * When this API is called for the first time, the instance will be moved to the recycle bin. When this API is called for the second time, the instance will be terminated and cannot be recovered.
+//
+// * Batch operations are supported. The allowed maximum number of instances in each request is 100.
+//
+// error code that may be returned:
+// FAILEDOPERATION_INVALIDINSTANCEAPPLICATIONROLE = "FailedOperation.InvalidInstanceApplicationRole"
+// FAILEDOPERATION_INVALIDINSTANCEAPPLICATIONROLEEMR = "FailedOperation.InvalidInstanceApplicationRoleEmr"
+// FAILEDOPERATION_UNRETURNABLE = "FailedOperation.Unreturnable"
+// INTERNALERROR_TRADEUNKNOWNERROR = "InternalError.TradeUnknownError"
+// INTERNALSERVERERROR = "InternalServerError"
+// INVALIDACCOUNT_UNPAIDORDER = "InvalidAccount.UnpaidOrder"
+// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported"
+// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed"
+// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound"
+// INVALIDINSTANCENOTSUPPORTEDPREPAIDINSTANCE = "InvalidInstanceNotSupportedPrepaidInstance"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed"
+// INVALIDPARAMETERVALUE_INVALIDAPPIDFORMAT = "InvalidParameterValue.InvalidAppIdFormat"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// INVALIDPARAMETERVALUE_NOTSUPPORTED = "InvalidParameterValue.NotSupported"
+// LIMITEXCEEDED_USERRETURNQUOTA = "LimitExceeded.UserReturnQuota"
+// MISSINGPARAMETER = "MissingParameter"
+// MUTEXOPERATION_TASKRUNNING = "MutexOperation.TaskRunning"
+// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress"
+// UNAUTHORIZEDOPERATION_INVALIDTOKEN = "UnauthorizedOperation.InvalidToken"
+// UNAUTHORIZEDOPERATION_MFAEXPIRED = "UnauthorizedOperation.MFAExpired"
+// UNAUTHORIZEDOPERATION_MFANOTFOUND = "UnauthorizedOperation.MFANotFound"
+// UNSUPPORTEDOPERATION = "UnsupportedOperation"
+// UNSUPPORTEDOPERATION_INSTANCECHARGETYPE = "UnsupportedOperation.InstanceChargeType"
+// UNSUPPORTEDOPERATION_INSTANCEMIXEDPRICINGMODEL = "UnsupportedOperation.InstanceMixedPricingModel"
+// UNSUPPORTEDOPERATION_INSTANCESTATEBANNING = "UnsupportedOperation.InstanceStateBanning"
+// UNSUPPORTEDOPERATION_INSTANCESTATEENTERRESCUEMODE = "UnsupportedOperation.InstanceStateEnterRescueMode"
+// UNSUPPORTEDOPERATION_INSTANCESTATEENTERSERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateEnterServiceLiveMigrate"
+// UNSUPPORTEDOPERATION_INSTANCESTATEEXITRESCUEMODE = "UnsupportedOperation.InstanceStateExitRescueMode"
+// UNSUPPORTEDOPERATION_INSTANCESTATEEXITSERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateExitServiceLiveMigrate"
+// UNSUPPORTEDOPERATION_INSTANCESTATEFREEZING = "UnsupportedOperation.InstanceStateFreezing"
+// UNSUPPORTEDOPERATION_INSTANCESTATEISOLATING = "UnsupportedOperation.InstanceStateIsolating"
+// UNSUPPORTEDOPERATION_INSTANCESTATELAUNCHFAILED = "UnsupportedOperation.InstanceStateLaunchFailed"
+// UNSUPPORTEDOPERATION_INSTANCESTATEPENDING = "UnsupportedOperation.InstanceStatePending"
+// UNSUPPORTEDOPERATION_INSTANCESTATEREBOOTING = "UnsupportedOperation.InstanceStateRebooting"
+// UNSUPPORTEDOPERATION_INSTANCESTATESTARTING = "UnsupportedOperation.InstanceStateStarting"
+// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPING = "UnsupportedOperation.InstanceStateStopping"
+// UNSUPPORTEDOPERATION_INSTANCESTATETERMINATED = "UnsupportedOperation.InstanceStateTerminated"
+// UNSUPPORTEDOPERATION_INSTANCESTATETERMINATING = "UnsupportedOperation.InstanceStateTerminating"
+// UNSUPPORTEDOPERATION_INSTANCESPROTECTED = "UnsupportedOperation.InstancesProtected"
+// UNSUPPORTEDOPERATION_INVALIDINSTANCESOWNER = "UnsupportedOperation.InvalidInstancesOwner"
+// UNSUPPORTEDOPERATION_REDHATINSTANCETERMINATEUNSUPPORTED = "UnsupportedOperation.RedHatInstanceTerminateUnsupported"
+// UNSUPPORTEDOPERATION_REDHATINSTANCEUNSUPPORTED = "UnsupportedOperation.RedHatInstanceUnsupported"
+// UNSUPPORTEDOPERATION_REGION = "UnsupportedOperation.Region"
+// UNSUPPORTEDOPERATION_SPECIALINSTANCETYPE = "UnsupportedOperation.SpecialInstanceType"
+// UNSUPPORTEDOPERATION_USERLIMITOPERATIONEXCEEDQUOTA = "UnsupportedOperation.UserLimitOperationExceedQuota"
+func (c *Client) TerminateInstancesWithContext(ctx context.Context, request *TerminateInstancesRequest) (response *TerminateInstancesResponse, err error) {
+ if request == nil {
+ request = NewTerminateInstancesRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("TerminateInstances require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewTerminateInstancesResponse()
+ err = c.Send(request, response)
+ return
+}
diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go-intl-en/tencentcloud/cvm/v20170312/errors.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go-intl-en/tencentcloud/cvm/v20170312/errors.go
new file mode 100644
index 0000000000..656305c6d3
--- /dev/null
+++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go-intl-en/tencentcloud/cvm/v20170312/errors.go
@@ -0,0 +1,1123 @@
+// Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package v20170312
+
+const (
+ // error codes for specific actions
+
+ // Your account failed the qualification verification.
+ ACCOUNTQUALIFICATIONRESTRICTIONS = "AccountQualificationRestrictions"
+
+ // Role name authentication failed.
+ AUTHFAILURE_CAMROLENAMEAUTHENTICATEFAILED = "AuthFailure.CamRoleNameAuthenticateFailed"
+
+ // ENIs do not support changing subnets.
+ ENINOTALLOWEDCHANGESUBNET = "EniNotAllowedChangeSubnet"
+
+ // The account already exists.
+ FAILEDOPERATION_ACCOUNTALREADYEXISTS = "FailedOperation.AccountAlreadyExists"
+
+ // You cannot share images with yourself.
+ FAILEDOPERATION_ACCOUNTISYOURSELF = "FailedOperation.AccountIsYourSelf"
+
+ // BYOL images cannot be shared.
+ FAILEDOPERATION_BYOLIMAGESHAREFAILED = "FailedOperation.BYOLImageShareFailed"
+
+ // The specified spread placement group does not exist.
+ FAILEDOPERATION_DISASTERRECOVERGROUPNOTFOUND = "FailedOperation.DisasterRecoverGroupNotFound"
+
+ // Failed to obtain the status of TencentCloud Automation Tools for the instance.
+ FAILEDOPERATION_GETINSTANCETATAGENTSTATUSFAILED = "FailedOperation.GetInstanceTATAgentStatusFailed"
+
+ // The tag key contains invalid characters.
+ FAILEDOPERATION_ILLEGALTAGKEY = "FailedOperation.IllegalTagKey"
+
+ // The tag value contains invalid characters.
+ FAILEDOPERATION_ILLEGALTAGVALUE = "FailedOperation.IllegalTagValue"
+
+ // Price query failed.
+ FAILEDOPERATION_INQUIRYPRICEFAILED = "FailedOperation.InquiryPriceFailed"
+
+ // Failed to query the refund: the payment order is not found. Check whether the instance `ins-xxxxxxx` has expired.
+ FAILEDOPERATION_INQUIRYREFUNDPRICEFAILED = "FailedOperation.InquiryRefundPriceFailed"
+
+ // The image is busy. Please try again later.
+ FAILEDOPERATION_INVALIDIMAGESTATE = "FailedOperation.InvalidImageState"
+
+ //
+ FAILEDOPERATION_INVALIDINSTANCEAPPLICATIONROLE = "FailedOperation.InvalidInstanceApplicationRole"
+
+ // The EMR instance `ins-xxxxxxxx` does not support this operation.
+ FAILEDOPERATION_INVALIDINSTANCEAPPLICATIONROLEEMR = "FailedOperation.InvalidInstanceApplicationRoleEmr"
+
+ // No available IPs in the subnet.
+ FAILEDOPERATION_NOAVAILABLEIPADDRESSCOUNTINSUBNET = "FailedOperation.NoAvailableIpAddressCountInSubnet"
+
+ // This instance does not bind an EIP.
+ FAILEDOPERATION_NOTFOUNDEIP = "FailedOperation.NotFoundEIP"
+
+ // You’re using a collaborator account. Please enter a root account.
+ FAILEDOPERATION_NOTMASTERACCOUNT = "FailedOperation.NotMasterAccount"
+
+ // The specified placement group is not empty.
+ FAILEDOPERATION_PLACEMENTSETNOTEMPTY = "FailedOperation.PlacementSetNotEmpty"
+
+ // The configuration or billing mode of the CVM instances purchased during the promotion period cannot be modified.
+ FAILEDOPERATION_PROMOTIONALPERIORESTRICTION = "FailedOperation.PromotionalPerioRestriction"
+
+ // The service is not available in this country/region.
+ FAILEDOPERATION_PROMOTIONALREGIONRESTRICTION = "FailedOperation.PromotionalRegionRestriction"
+
+ // Image sharing failed.
+ FAILEDOPERATION_QIMAGESHAREFAILED = "FailedOperation.QImageShareFailed"
+
+ // Image sharing failed.
+ FAILEDOPERATION_RIMAGESHAREFAILED = "FailedOperation.RImageShareFailed"
+
+ // Security group operation failed.
+ FAILEDOPERATION_SECURITYGROUPACTIONFAILED = "FailedOperation.SecurityGroupActionFailed"
+
+ // The snapshot size is larger than the disk capacity. You need a larger disk space.
+ FAILEDOPERATION_SNAPSHOTSIZELARGERTHANDATASIZE = "FailedOperation.SnapshotSizeLargerThanDataSize"
+
+ // The snapshot size should be larger than the cloud disk capacity.
+ FAILEDOPERATION_SNAPSHOTSIZELESSTHANDATASIZE = "FailedOperation.SnapshotSizeLessThanDataSize"
+
+ // The tag key specified in the request is reserved for the system.
+ FAILEDOPERATION_TAGKEYRESERVED = "FailedOperation.TagKeyReserved"
+
+ // This image is not a Linux&x86_64 image.
+ FAILEDOPERATION_TATAGENTNOTSUPPORT = "FailedOperation.TatAgentNotSupport"
+
+ // The instance is unreturnable.
+ FAILEDOPERATION_UNRETURNABLE = "FailedOperation.Unreturnable"
+
+ // The image quota has been exceeded.
+ IMAGEQUOTALIMITEXCEEDED = "ImageQuotaLimitExceeded"
+
+ // You are trying to create more instances than your remaining quota allows.
+ INSTANCESQUOTALIMITEXCEEDED = "InstancesQuotaLimitExceeded"
+
+ // Internal error.
+ INTERNALERROR = "InternalError"
+
+ // Internal error.
+ INTERNALERROR_TRADEUNKNOWNERROR = "InternalError.TradeUnknownError"
+
+ // Internal error.
+ INTERNALSERVERERROR = "InternalServerError"
+
+ // Insufficient account balance.
+ INVALIDACCOUNT_INSUFFICIENTBALANCE = "InvalidAccount.InsufficientBalance"
+
+ // The account has unpaid orders.
+ INVALIDACCOUNT_UNPAIDORDER = "InvalidAccount.UnpaidOrder"
+
+ // Invalid account ID.
+ INVALIDACCOUNTID_NOTFOUND = "InvalidAccountId.NotFound"
+
+ // You cannot share images with yourself.
+ INVALIDACCOUNTIS_YOURSELF = "InvalidAccountIs.YourSelf"
+
+ // The specified ClientToken exceeds the maximum length of 64 bytes.
+ INVALIDCLIENTTOKEN_TOOLONG = "InvalidClientToken.TooLong"
+
+ // Invalid filter.
+ INVALIDFILTER = "InvalidFilter"
+
+ // [`Filter`](https://intl.cloud.tencent.com/document/api/213/15753?from_cn_redirect=1#Filter)
+ INVALIDFILTERVALUE_LIMITEXCEEDED = "InvalidFilterValue.LimitExceeded"
+
+ // The specified operation on this CDH instance is not support .
+ INVALIDHOST_NOTSUPPORTED = "InvalidHost.NotSupported"
+
+ // Invalid [CDH](https://intl.cloud.tencent.com/document/product/416?from_cn_redirect=1) `ID`. The specified [CDH](https://intl.cloud.tencent.com/document/product/416?from_cn_redirect=1) `ID` has an invalid format. For example, `host-1122` has an invalid `ID` length.
+ INVALIDHOSTID_MALFORMED = "InvalidHostId.Malformed"
+
+ // The specified HostId does not exist, or does not belong to your account.
+ INVALIDHOSTID_NOTFOUND = "InvalidHostId.NotFound"
+
+ // The image is being shared.
+ INVALIDIMAGEID_INSHARED = "InvalidImageId.InShared"
+
+ // Invalid image status.
+ INVALIDIMAGEID_INCORRECTSTATE = "InvalidImageId.IncorrectState"
+
+ // Invalid image ID format.
+ INVALIDIMAGEID_MALFORMED = "InvalidImageId.Malformed"
+
+ // The image cannot be found.
+ INVALIDIMAGEID_NOTFOUND = "InvalidImageId.NotFound"
+
+ // The image size exceeds the limit.
+ INVALIDIMAGEID_TOOLARGE = "InvalidImageId.TooLarge"
+
+ // The specified image name already exists.
+ INVALIDIMAGENAME_DUPLICATE = "InvalidImageName.Duplicate"
+
+ // The operating system type is not supported.
+ INVALIDIMAGEOSTYPE_UNSUPPORTED = "InvalidImageOsType.Unsupported"
+
+ // The operating system version is not supported.
+ INVALIDIMAGEOSVERSION_UNSUPPORTED = "InvalidImageOsVersion.Unsupported"
+
+ // This instance is not supported.
+ INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported"
+
+ // Invalid instance `ID`. The specified instance `ID` has an invalid format. For example, `ins-1122` has an invalid `ID` length.
+ INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed"
+
+ // No instance found.
+ INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound"
+
+ // The specified InstanceName exceeds the maximum length of 60 bytes.
+ INVALIDINSTANCENAME_TOOLONG = "InvalidInstanceName.TooLong"
+
+ // This instance does not meet the [Return Policy](https://intl.cloud.tencent.com/document/product/213/9711?from_cn_redirect=1) for prepaid instances.
+ INVALIDINSTANCENOTSUPPORTEDPREPAIDINSTANCE = "InvalidInstanceNotSupportedPrepaidInstance"
+
+ // This operation cannot be performed due to the current instance status.
+ INVALIDINSTANCESTATE = "InvalidInstanceState"
+
+ // The specified `InstanceType` parameter has an invalid format.
+ INVALIDINSTANCETYPE_MALFORMED = "InvalidInstanceType.Malformed"
+
+ // The number of key pairs exceeds the limit.
+ INVALIDKEYPAIR_LIMITEXCEEDED = "InvalidKeyPair.LimitExceeded"
+
+ // Invalid key pair ID. The specified key pair ID has an invalid format. For example, `skey-1122` has an invalid `ID` length.
+ INVALIDKEYPAIRID_MALFORMED = "InvalidKeyPairId.Malformed"
+
+ // Invalid key pair ID. The specified key pair ID does not exist.
+ INVALIDKEYPAIRID_NOTFOUND = "InvalidKeyPairId.NotFound"
+
+ // Key pair name already exists.
+ INVALIDKEYPAIRNAME_DUPLICATE = "InvalidKeyPairName.Duplicate"
+
+ // The key name cannot be empty.
+ INVALIDKEYPAIRNAMEEMPTY = "InvalidKeyPairNameEmpty"
+
+ // The key name contains invalid characters. Key names can only contain letters, numbers and underscores.
+ INVALIDKEYPAIRNAMEINCLUDEILLEGALCHAR = "InvalidKeyPairNameIncludeIllegalChar"
+
+ // The key name cannot exceed 25 characters.
+ INVALIDKEYPAIRNAMETOOLONG = "InvalidKeyPairNameTooLong"
+
+ // A parameter error occurred.
+ INVALIDPARAMETER = "InvalidParameter"
+
+ // Up to one parameter can be specified.
+ INVALIDPARAMETER_ATMOSTONE = "InvalidParameter.AtMostOne"
+
+ // Automatic snapshot creation is not supported.
+ INVALIDPARAMETER_AUTOSNAPSHOTNOTSUPPORTED = "InvalidParameter.AutoSnapshotNotSupported"
+
+ //
+ INVALIDPARAMETER_CDCNOTSUPPORTED = "InvalidParameter.CdcNotSupported"
+
+ // RootDisk ID should not be passed to DataDiskIds.
+ INVALIDPARAMETER_DATADISKIDCONTAINSROOTDISK = "InvalidParameter.DataDiskIdContainsRootDisk"
+
+ // The specified data disk does not belong to the specified instance.
+ INVALIDPARAMETER_DATADISKNOTBELONGSPECIFIEDINSTANCE = "InvalidParameter.DataDiskNotBelongSpecifiedInstance"
+
+ // Only one system disk snapshot can be included.
+ INVALIDPARAMETER_DUPLICATESYSTEMSNAPSHOTS = "InvalidParameter.DuplicateSystemSnapshots"
+
+ // When specifying the CTCC/CUCC/CMCC public IP address parameter for edge zones, you need to first specify the public IP address parameter for the primary IP address.
+ INVALIDPARAMETER_EDGEZONEMISSINTERNETACCESSIBLE = "InvalidParameter.EdgeZoneMissInternetAccessible"
+
+ // The specified CDH host does not support custom instance specifications.
+ INVALIDPARAMETER_HOSTIDCUSTOMIZEDINSTANCETYPENOTSUPPORT = "InvalidParameter.HostIdCustomizedInstanceTypeNotSupport"
+
+ // The specified CDH host does not support the instance model specifications.
+ INVALIDPARAMETER_HOSTIDINSTANCETYPENOTSUPPORT = "InvalidParameter.HostIdInstanceTypeNotSupport"
+
+ // The specified CDH host does not support standard instance specifications.
+ INVALIDPARAMETER_HOSTIDSTANDARDINSTANCETYPENOTSUPPORT = "InvalidParameter.HostIdStandardInstanceTypeNotSupport"
+
+ // This operation is not supported under the current status of the CVM.
+ INVALIDPARAMETER_HOSTIDSTATUSNOTSUPPORT = "InvalidParameter.HostIdStatusNotSupport"
+
+ // The specified HostName is invalid.
+ INVALIDPARAMETER_HOSTNAMEILLEGAL = "InvalidParameter.HostNameIllegal"
+
+ // Either `ImageIds` or `SnapshotIds` must be specified.
+ INVALIDPARAMETER_IMAGEIDSSNAPSHOTIDSMUSTONE = "InvalidParameter.ImageIdsSnapshotIdsMustOne"
+
+ // This API does not support instance images.
+ INVALIDPARAMETER_INSTANCEIMAGENOTSUPPORT = "InvalidParameter.InstanceImageNotSupport"
+
+ // No CDH host supports the specified instance specifications.
+ INVALIDPARAMETER_INSTANCETYPESUPPORTEDHOSTNOTFOUND = "InvalidParameter.InstanceTypeSupportedHostNotFound"
+
+ // Unable to set the public network bandwidth.
+ INVALIDPARAMETER_INTERNETACCESSIBLENOTSUPPORTED = "InvalidParameter.InternetAccessibleNotSupported"
+
+ // Invalid parameter dependency.
+ INVALIDPARAMETER_INVALIDDEPENDENCE = "InvalidParameter.InvalidDependence"
+
+ // Invalid VPC IP address format.
+ INVALIDPARAMETER_INVALIDIPFORMAT = "InvalidParameter.InvalidIpFormat"
+
+ // The specified KMS key ID is invalid.
+ INVALIDPARAMETER_INVALIDKMSKEYID = "InvalidParameter.InvalidKmsKeyId"
+
+ // `ImageIds` and `Filters` cannot be specified at the same time.
+ INVALIDPARAMETER_INVALIDPARAMETERCOEXISTIMAGEIDSFILTERS = "InvalidParameter.InvalidParameterCoexistImageIdsFilters"
+
+ // Invalid URL.
+ INVALIDPARAMETER_INVALIDPARAMETERURLERROR = "InvalidParameter.InvalidParameterUrlError"
+
+ // The entered TargetOSType is invalid.
+ INVALIDPARAMETER_INVALIDTARGETOSTYPE = "InvalidParameter.InvalidTargetOSType"
+
+ // `CoreCount` and `ThreadPerCore` must be specified at the same time.
+ INVALIDPARAMETER_LACKCORECOUNTORTHREADPERCORE = "InvalidParameter.LackCoreCountOrThreadPerCore"
+
+ // Local data disks cannot be used to create instance images.
+ INVALIDPARAMETER_LOCALDATADISKNOTSUPPORT = "InvalidParameter.LocalDataDiskNotSupport"
+
+ // Only edge zones support this parameter.
+ INVALIDPARAMETER_ONLYSUPPORTFOREDGEZONE = "InvalidParameter.OnlySupportForEdgeZone"
+
+ // Specifying an SSH key will override the original one of the image.
+ INVALIDPARAMETER_PARAMETERCONFLICT = "InvalidParameter.ParameterConflict"
+
+ // Setting login password is not supported.
+ INVALIDPARAMETER_PASSWORDNOTSUPPORTED = "InvalidParameter.PasswordNotSupported"
+
+ // The specified snapshot does not exist.
+ INVALIDPARAMETER_SNAPSHOTNOTFOUND = "InvalidParameter.SnapshotNotFound"
+
+ // This parameter can only be used when the allowlist feature is enabled.
+ INVALIDPARAMETER_SPECIALPARAMETERFORSPECIALACCOUNT = "InvalidParameter.SpecialParameterForSpecialAccount"
+
+ // At least one of the multiple parameters must be passed in.
+ INVALIDPARAMETER_SPECIFYONEPARAMETER = "InvalidParameter.SpecifyOneParameter"
+
+ // Swap disks are not supported.
+ INVALIDPARAMETER_SWAPDISKNOTSUPPORT = "InvalidParameter.SwapDiskNotSupport"
+
+ // The parameter does not contain system disk snapshot.
+ INVALIDPARAMETER_SYSTEMSNAPSHOTNOTFOUND = "InvalidParameter.SystemSnapshotNotFound"
+
+ // The length of parameter exceeds the limit.
+ INVALIDPARAMETER_VALUETOOLARGE = "InvalidParameter.ValueTooLarge"
+
+ // The parameter combination is invalid.
+ INVALIDPARAMETERCOMBINATION = "InvalidParameterCombination"
+
+ // The two specified parameters conflict. An EIP can only be bound to the instance or the specified private IP of the specified ENI.
+ INVALIDPARAMETERCONFLICT = "InvalidParameterConflict"
+
+ // Incorrect parameter value.
+ INVALIDPARAMETERVALUE = "InvalidParameterValue"
+
+ // The number of request parameters are not equal.
+ INVALIDPARAMETERVALUE_AMOUNTNOTEQUAL = "InvalidParameterValue.AmountNotEqual"
+
+ // The shared bandwidth package ID is invalid. Please provide a standard shared bandwidth package ID in the format similar to bwp-xxxxxxxx. In this format, the letter x stands for a lowercase character or a number.
+ INVALIDPARAMETERVALUE_BANDWIDTHPACKAGEIDMALFORMED = "InvalidParameterValue.BandwidthPackageIdMalformed"
+
+ // The specified bandwidth package does not exist.
+ INVALIDPARAMETERVALUE_BANDWIDTHPACKAGEIDNOTFOUND = "InvalidParameterValue.BandwidthPackageIdNotFound"
+
+ // The ISP of the bandwidth package does not match the ISP parameter.
+ INVALIDPARAMETERVALUE_BANDWIDTHPACKAGEISPNOTMATCH = "InvalidParameterValue.BandwidthPackageIspNotMatch"
+
+ // The availability zone of the bandwidth package does not match the specified availability zone.
+ INVALIDPARAMETERVALUE_BANDWIDTHPACKAGEZONENOTMATCH = "InvalidParameterValue.BandwidthPackageZoneNotMatch"
+
+ // Only VPC is supported. The network type of the instance is classic network, which cannot be changed.
+ INVALIDPARAMETERVALUE_BASICNETWORKINSTANCEFAMILY = "InvalidParameterValue.BasicNetworkInstanceFamily"
+
+ // The bucket does not exist.
+ INVALIDPARAMETERVALUE_BUCKETNOTFOUND = "InvalidParameterValue.BucketNotFound"
+
+ // Invalid `CamRoleName`. This parameter must contain only letters, numbers and symbols (`+`, `=`, `,`, `.`, `@`, `_`, `-`).
+ INVALIDPARAMETERVALUE_CAMROLENAMEMALFORMED = "InvalidParameterValue.CamRoleNameMalformed"
+
+ //
+ INVALIDPARAMETERVALUE_CDHONLYLOCALDATADISKRESIZE = "InvalidParameterValue.CdhOnlyLocalDataDiskResize"
+
+ // Corresponding CHC hosts not found.
+ INVALIDPARAMETERVALUE_CHCHOSTSNOTFOUND = "InvalidParameterValue.ChcHostsNotFound"
+
+ // No network is configured for this CHC.
+ INVALIDPARAMETERVALUE_CHCNETWORKEMPTY = "InvalidParameterValue.ChcNetworkEmpty"
+
+ // The minimum capacity of a SSD data disk is 100 GB.
+ INVALIDPARAMETERVALUE_CLOUDSSDDATADISKSIZETOOSMALL = "InvalidParameterValue.CloudSsdDataDiskSizeTooSmall"
+
+ // Invalid number of cores.
+ INVALIDPARAMETERVALUE_CORECOUNTVALUE = "InvalidParameterValue.CoreCountValue"
+
+ //
+ INVALIDPARAMETERVALUE_DEDICATEDCLUSTERNOTSUPPORTEDCHARGETYPE = "InvalidParameterValue.DedicatedClusterNotSupportedChargeType"
+
+ // A deployment VPC already exists.
+ INVALIDPARAMETERVALUE_DEPLOYVPCALREADYEXISTS = "InvalidParameterValue.DeployVpcAlreadyExists"
+
+ // Incorrect placement group ID format.
+ INVALIDPARAMETERVALUE_DISASTERRECOVERGROUPIDMALFORMED = "InvalidParameterValue.DisasterRecoverGroupIdMalformed"
+
+ // Duplicate parameter value.
+ INVALIDPARAMETERVALUE_DUPLICATE = "InvalidParameterValue.Duplicate"
+
+ // Duplicate tags.
+ INVALIDPARAMETERVALUE_DUPLICATETAGS = "InvalidParameterValue.DuplicateTags"
+
+ // The number of requested public IP addresses exceeds the quota of this instance type.
+ INVALIDPARAMETERVALUE_EXTERNALIPQUOTALIMITED = "InvalidParameterValue.ExternalIpQuotaLimited"
+
+ // Non-GPU instances cannot be changed to the GPU instance.
+ INVALIDPARAMETERVALUE_GPUINSTANCEFAMILY = "InvalidParameterValue.GPUInstanceFamily"
+
+ //
+ INVALIDPARAMETERVALUE_HPCCLUSTERIDZONEIDNOTMATCH = "InvalidParameterValue.HpcClusterIdZoneIdNotMatch"
+
+ // Invalid IP format
+ INVALIDPARAMETERVALUE_IPADDRESSMALFORMED = "InvalidParameterValue.IPAddressMalformed"
+
+ // Invalid IPv6 address
+ INVALIDPARAMETERVALUE_IPV6ADDRESSMALFORMED = "InvalidParameterValue.IPv6AddressMalformed"
+
+ // ISO files must be imported by force.
+ INVALIDPARAMETERVALUE_ISOMUSTIMPORTBYFORCE = "InvalidParameterValue.ISOMustImportByForce"
+
+ // The value of HostName is invalid.
+ INVALIDPARAMETERVALUE_ILLEGALHOSTNAME = "InvalidParameterValue.IllegalHostName"
+
+ // Incorrect request parameter format.
+ INVALIDPARAMETERVALUE_INCORRECTFORMAT = "InvalidParameterValue.IncorrectFormat"
+
+ // Invalid instance ID. Please enter a valid ID, such as ins-xxxxxxxx (“x” represents a lower-case letter or a number).
+ INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed"
+
+ // The specified instance type does not exist.
+ INVALIDPARAMETERVALUE_INSTANCETYPENOTFOUND = "InvalidParameterValue.InstanceTypeNotFound"
+
+ // This type of instances cannot be added to the HPC cluster.
+ INVALIDPARAMETERVALUE_INSTANCETYPENOTSUPPORTHPCCLUSTER = "InvalidParameterValue.InstanceTypeNotSupportHpcCluster"
+
+ // The HPC cluster needs to be specified for the high-performance computing instance.
+ INVALIDPARAMETERVALUE_INSTANCETYPEREQUIREDHPCCLUSTER = "InvalidParameterValue.InstanceTypeRequiredHpcCluster"
+
+ // The spot instances are out of stock.
+ INVALIDPARAMETERVALUE_INSUFFICIENTOFFERING = "InvalidParameterValue.InsufficientOffering"
+
+ // The bid is lower than the market price.
+ INVALIDPARAMETERVALUE_INSUFFICIENTPRICE = "InvalidParameterValue.InsufficientPrice"
+
+ // Invalid AppID
+ INVALIDPARAMETERVALUE_INVALIDAPPIDFORMAT = "InvalidParameterValue.InvalidAppIdFormat"
+
+ // Unsupported boot mode.
+ INVALIDPARAMETERVALUE_INVALIDBOOTMODE = "InvalidParameterValue.InvalidBootMode"
+
+ // You don’t have the write permission to the bucket.
+ INVALIDPARAMETERVALUE_INVALIDBUCKETPERMISSIONFOREXPORT = "InvalidParameterValue.InvalidBucketPermissionForExport"
+
+ // The length of `FileNamePrefixList` does not match `ImageIds` or `SnapshotIds`.
+ INVALIDPARAMETERVALUE_INVALIDFILENAMEPREFIXLIST = "InvalidParameterValue.InvalidFileNamePrefixList"
+
+ // Converting to a non-GPU or other type of GPU instance is not supported.
+ INVALIDPARAMETERVALUE_INVALIDGPUFAMILYCHANGE = "InvalidParameterValue.InvalidGPUFamilyChange"
+
+ // Invalid format of image family name
+ INVALIDPARAMETERVALUE_INVALIDIMAGEFAMILY = "InvalidParameterValue.InvalidImageFamily"
+
+ // The specified image does not support the specified instance type.
+ INVALIDPARAMETERVALUE_INVALIDIMAGEFORGIVENINSTANCETYPE = "InvalidParameterValue.InvalidImageForGivenInstanceType"
+
+ // A RAW image cannot be used to create a CVM. Choose another image.
+ INVALIDPARAMETERVALUE_INVALIDIMAGEFORMAT = "InvalidParameterValue.InvalidImageFormat"
+
+ // The image does not support this operation.
+ INVALIDPARAMETERVALUE_INVALIDIMAGEID = "InvalidParameterValue.InvalidImageId"
+
+ // The image cannot be used to reinstall the current instance.
+ INVALIDPARAMETERVALUE_INVALIDIMAGEIDFORRETSETINSTANCE = "InvalidParameterValue.InvalidImageIdForRetsetInstance"
+
+ //
+ INVALIDPARAMETERVALUE_INVALIDIMAGEIDISSHARED = "InvalidParameterValue.InvalidImageIdIsShared"
+
+ // The operating system of the specified image is not available in the current region.
+ INVALIDPARAMETERVALUE_INVALIDIMAGEOSNAME = "InvalidParameterValue.InvalidImageOsName"
+
+ // The image has another ongoing task. Please check and try again later.
+ INVALIDPARAMETERVALUE_INVALIDIMAGESTATE = "InvalidParameterValue.InvalidImageState"
+
+ // The instance configuration is upgraded for free and cannot be downgraded within 3 months.
+ INVALIDPARAMETERVALUE_INVALIDINSTANCESOURCE = "InvalidParameterValue.InvalidInstanceSource"
+
+ // Invalid IP address.
+ INVALIDPARAMETERVALUE_INVALIDIPFORMAT = "InvalidParameterValue.InvalidIpFormat"
+
+ // Incorrect format of instance launch template description.
+ INVALIDPARAMETERVALUE_INVALIDLAUNCHTEMPLATEDESCRIPTION = "InvalidParameterValue.InvalidLaunchTemplateDescription"
+
+ // Incorrect format of instance launch template name.
+ INVALIDPARAMETERVALUE_INVALIDLAUNCHTEMPLATENAME = "InvalidParameterValue.InvalidLaunchTemplateName"
+
+ // Incorrect format of instance launch template version description.
+ INVALIDPARAMETERVALUE_INVALIDLAUNCHTEMPLATEVERSIONDESCRIPTION = "InvalidParameterValue.InvalidLaunchTemplateVersionDescription"
+
+ // Invalid license type.
+ INVALIDPARAMETERVALUE_INVALIDLICENSETYPE = "InvalidParameterValue.InvalidLicenseType"
+
+ // Invalid parameter value.
+ INVALIDPARAMETERVALUE_INVALIDPARAMETERVALUELIMIT = "InvalidParameterValue.InvalidParameterValueLimit"
+
+ // Invalid password. The specified password does not meet the complexity requirements (e.g., too long or too short)
+ INVALIDPARAMETERVALUE_INVALIDPASSWORD = "InvalidParameterValue.InvalidPassword"
+
+ // The Region ID is unavailable.
+ INVALIDPARAMETERVALUE_INVALIDREGION = "InvalidParameterValue.InvalidRegion"
+
+ // Incorrect time format.
+ INVALIDPARAMETERVALUE_INVALIDTIMEFORMAT = "InvalidParameterValue.InvalidTimeFormat"
+
+ // Incorrect UserData format. Use the Base64-encoded format.
+ INVALIDPARAMETERVALUE_INVALIDUSERDATAFORMAT = "InvalidParameterValue.InvalidUserDataFormat"
+
+ // Invalid fuzzy query string
+ INVALIDPARAMETERVALUE_INVALIDVAGUENAME = "InvalidParameterValue.InvalidVagueName"
+
+ // Edge zones do not support this ISP.
+ INVALIDPARAMETERVALUE_ISPNOTSUPPORTFOREDGEZONE = "InvalidParameterValue.IspNotSupportForEdgeZone"
+
+ // Duplicate ISP parameter value specified.
+ INVALIDPARAMETERVALUE_ISPVALUEREPEATED = "InvalidParameterValue.IspValueRepeated"
+
+ // The key does not exist.
+ INVALIDPARAMETERVALUE_KEYPAIRNOTFOUND = "InvalidParameterValue.KeyPairNotFound"
+
+ // The specified key does not support the operation.
+ INVALIDPARAMETERVALUE_KEYPAIRNOTSUPPORTED = "InvalidParameterValue.KeyPairNotSupported"
+
+ // The default launch template version cannot be operated.
+ INVALIDPARAMETERVALUE_LAUNCHTEMPLATEDEFAULTVERSION = "InvalidParameterValue.LaunchTemplateDefaultVersion"
+
+ // Incorrect format of instance launch template ID. Please provide a valid instance launch template ID, similar to lt-xxxxxxxx, where x represents a lowercase character or digit.
+ INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDMALFORMED = "InvalidParameterValue.LaunchTemplateIdMalformed"
+
+ // The instance launch template ID does not exist.
+ INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDNOTEXISTED = "InvalidParameterValue.LaunchTemplateIdNotExisted"
+
+ // The combination of the template and the version ID does not exist.
+ INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDVERNOTEXISTED = "InvalidParameterValue.LaunchTemplateIdVerNotExisted"
+
+ // The specified instance launch template ID doesn't exist.
+ INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDVERSETALREADY = "InvalidParameterValue.LaunchTemplateIdVerSetAlready"
+
+ // The instance launch template is not found.
+ INVALIDPARAMETERVALUE_LAUNCHTEMPLATENOTFOUND = "InvalidParameterValue.LaunchTemplateNotFound"
+
+ // Invalid instance launch template version number.
+ INVALIDPARAMETERVALUE_LAUNCHTEMPLATEVERSION = "InvalidParameterValue.LaunchTemplateVersion"
+
+ // The number of parameter values exceeds the limit.
+ INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+
+ // The parameter value must be a DHCP-enabled VPC.
+ INVALIDPARAMETERVALUE_MUSTDHCPENABLEDVPC = "InvalidParameterValue.MustDhcpEnabledVpc"
+
+ // The subnet is not in the CDC cluster.
+ INVALIDPARAMETERVALUE_NOTCDCSUBNET = "InvalidParameterValue.NotCdcSubnet"
+
+ // The parameter value is required.
+ INVALIDPARAMETERVALUE_NOTEMPTY = "InvalidParameterValue.NotEmpty"
+
+ // Unsupported operation.
+ INVALIDPARAMETERVALUE_NOTSUPPORTED = "InvalidParameterValue.NotSupported"
+
+ // Preheating is not supported on this model.
+ INVALIDPARAMETERVALUE_PREHEATNOTSUPPORTEDINSTANCETYPE = "InvalidParameterValue.PreheatNotSupportedInstanceType"
+
+ // Preheating is not supported in this availability zone.
+ INVALIDPARAMETERVALUE_PREHEATNOTSUPPORTEDZONE = "InvalidParameterValue.PreheatNotSupportedZone"
+
+ //
+ INVALIDPARAMETERVALUE_PREHEATUNAVAILABLEZONES = "InvalidParameterValue.PreheatUnavailableZones"
+
+ // Invalid parameter value: invalid parameter value range.
+ INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range"
+
+ //
+ INVALIDPARAMETERVALUE_REQUIREDLOCATIONIMAGE = "InvalidParameterValue.RequiredLocationImage"
+
+ // Invalid snapshot ID. Provide a snapshot ID in the format of snap-xxxxxxxx, where the letter x refers to lowercase letter or number.
+ INVALIDPARAMETERVALUE_SNAPSHOTIDMALFORMED = "InvalidParameterValue.SnapshotIdMalformed"
+
+ // Invalid subnet ID. Please provide a subnet ID in the format of subnet-xxxxxxxx, where “x” can be a lowercase letter or number.
+ INVALIDPARAMETERVALUE_SUBNETIDMALFORMED = "InvalidParameterValue.SubnetIdMalformed"
+
+ // Creation failed: the subnet does not exist. Please specify another subnet.
+ INVALIDPARAMETERVALUE_SUBNETNOTEXIST = "InvalidParameterValue.SubnetNotExist"
+
+ // The specified tag does not exist
+ INVALIDPARAMETERVALUE_TAGKEYNOTFOUND = "InvalidParameterValue.TagKeyNotFound"
+
+ // Tag quota limit exceeded.
+ INVALIDPARAMETERVALUE_TAGQUOTALIMITEXCEEDED = "InvalidParameterValue.TagQuotaLimitExceeded"
+
+ // Invalid thread count per core.
+ INVALIDPARAMETERVALUE_THREADPERCOREVALUE = "InvalidParameterValue.ThreadPerCoreValue"
+
+ // The parameter value exceeds the maximum limit.
+ INVALIDPARAMETERVALUE_TOOLARGE = "InvalidParameterValue.TooLarge"
+
+ // Invalid parameter value: parameter value is too long.
+ INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong"
+
+ // Invalid UUID.
+ INVALIDPARAMETERVALUE_UUIDMALFORMED = "InvalidParameterValue.UuidMalformed"
+
+ // The VPC ID `xxx` is invalid. Please provide a VPC ID in the format of vpc-xxxxxxxx, where “x” can be a lowercase letter or number.
+ INVALIDPARAMETERVALUE_VPCIDMALFORMED = "InvalidParameterValue.VpcIdMalformed"
+
+ // The specified VpcId doesn't exist.
+ INVALIDPARAMETERVALUE_VPCIDNOTEXIST = "InvalidParameterValue.VpcIdNotExist"
+
+ // The VPC and instance must be in the same availability zone.
+ INVALIDPARAMETERVALUE_VPCIDZONEIDNOTMATCH = "InvalidParameterValue.VpcIdZoneIdNotMatch"
+
+ // This VPC does not support the IPv6 addresses.
+ INVALIDPARAMETERVALUE_VPCNOTSUPPORTIPV6ADDRESS = "InvalidParameterValue.VpcNotSupportIpv6Address"
+
+ // The availability zone does not support this operation.
+ INVALIDPARAMETERVALUE_ZONENOTSUPPORTED = "InvalidParameterValue.ZoneNotSupported"
+
+ // The number of parameter values exceeds the limit.
+ INVALIDPARAMETERVALUELIMIT = "InvalidParameterValueLimit"
+
+ // Invalid parameter value: invalid `Offset`.
+ INVALIDPARAMETERVALUEOFFSET = "InvalidParameterValueOffset"
+
+ // Invalid password. The specified password does not meet the password requirements. For example, the password length does not meet the requirements.
+ INVALIDPASSWORD = "InvalidPassword"
+
+ // Invalid period. Valid values: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24, 36]; unit: month.
+ INVALIDPERIOD = "InvalidPeriod"
+
+ // This operation is not supported for the account.
+ INVALIDPERMISSION = "InvalidPermission"
+
+ // Invalid project ID: the specified project ID does not exist.
+ INVALIDPROJECTID_NOTFOUND = "InvalidProjectId.NotFound"
+
+ // Invalid public key: the specified key already exists.
+ INVALIDPUBLICKEY_DUPLICATE = "InvalidPublicKey.Duplicate"
+
+ // Invalid public key: the specified public key does not meet the `OpenSSH RSA` format requirements.
+ INVALIDPUBLICKEY_MALFORMED = "InvalidPublicKey.Malformed"
+
+ // The region cannot be found.
+ INVALIDREGION_NOTFOUND = "InvalidRegion.NotFound"
+
+ // Currently this region does not support image synchronization.
+ INVALIDREGION_UNAVAILABLE = "InvalidRegion.Unavailable"
+
+ // The specified `security group ID` does not exist.
+ INVALIDSECURITYGROUPID_NOTFOUND = "InvalidSecurityGroupId.NotFound"
+
+ // The specified `security group ID` is in the wrong format. For example, `sg-ide32` has an invalid `instance ID` length.
+ INVALIDSGID_MALFORMED = "InvalidSgId.Malformed"
+
+ // The specified `zone` does not exist.
+ INVALIDZONE_MISMATCHREGION = "InvalidZone.MismatchRegion"
+
+ // An instance can be bound with up to 5 security groups.
+ LIMITEXCEEDED_ASSOCIATEUSGLIMITEXCEEDED = "LimitExceeded.AssociateUSGLimitExceeded"
+
+ // The quota limit for purchasing instances has been reached.
+ LIMITEXCEEDED_CVMINSTANCEQUOTA = "LimitExceeded.CvmInstanceQuota"
+
+ // The CVM ENIs associated with the security group has exceeded the limit.
+ LIMITEXCEEDED_CVMSVIFSPERSECGROUPLIMITEXCEEDED = "LimitExceeded.CvmsVifsPerSecGroupLimitExceeded"
+
+ // The quota of the specified placement group is insufficient.
+ LIMITEXCEEDED_DISASTERRECOVERGROUP = "LimitExceeded.DisasterRecoverGroup"
+
+ // The number of EIPs of an ENI contained in a specific instance has exceeded the maximum allowed EIPs of the target instance type. Please delete some EIPs and try again.
+ LIMITEXCEEDED_EIPNUMLIMIT = "LimitExceeded.EipNumLimit"
+
+ //
+ LIMITEXCEEDED_ENILIMITINSTANCETYPE = "LimitExceeded.EniLimitInstanceType"
+
+ // The number of ENIs on a specified instance exceeds the maximum ENIs allowed for the target instance type. Delete some ENIs and try again.
+ LIMITEXCEEDED_ENINUMLIMIT = "LimitExceeded.EniNumLimit"
+
+ // The number of image export tasks in progress reached the upper limit. Please try again after the running tasks are completed.
+ LIMITEXCEEDED_EXPORTIMAGETASKLIMITEXCEEDED = "LimitExceeded.ExportImageTaskLimitExceeded"
+
+ // Number of IPs on this ENI reached the upper limit.
+ LIMITEXCEEDED_IPV6ADDRESSNUM = "LimitExceeded.IPv6AddressNum"
+
+ // Reached the upper limit of the ENIs for the instance.
+ LIMITEXCEEDED_INSTANCEENINUMLIMIT = "LimitExceeded.InstanceEniNumLimit"
+
+ // You are short of the instance quota.
+ LIMITEXCEEDED_INSTANCEQUOTA = "LimitExceeded.InstanceQuota"
+
+ // Unable to adjust: the target instance type does not support the configured public network bandwidth cap. See [Public Network Bandwidth Cap](https://intl.cloud.tencent.com/document/product/213/12523).
+ LIMITEXCEEDED_INSTANCETYPEBANDWIDTH = "LimitExceeded.InstanceTypeBandwidth"
+
+ // The number of instance launch templates exceeds the limit.
+ LIMITEXCEEDED_LAUNCHTEMPLATEQUOTA = "LimitExceeded.LaunchTemplateQuota"
+
+ // The number of instance launch template versions exceeds the limit.
+ LIMITEXCEEDED_LAUNCHTEMPLATEVERSIONQUOTA = "LimitExceeded.LaunchTemplateVersionQuota"
+
+ // Reached the upper limit for preheating in this availability zone. Remove some snapshots first.
+ LIMITEXCEEDED_PREHEATIMAGESNAPSHOTOUTOFQUOTA = "LimitExceeded.PreheatImageSnapshotOutOfQuota"
+
+ // Your quota for monthly-subscribed instances is used up. Increase your quota and try again.
+ LIMITEXCEEDED_PREPAYQUOTA = "LimitExceeded.PrepayQuota"
+
+ //
+ LIMITEXCEEDED_PREPAYUNDERWRITEQUOTA = "LimitExceeded.PrepayUnderwriteQuota"
+
+ // The number of security groups exceeds the quota limit.
+ LIMITEXCEEDED_SINGLEUSGQUOTA = "LimitExceeded.SingleUSGQuota"
+
+ // The spot instance offerings are out of stock.
+ LIMITEXCEEDED_SPOTQUOTA = "LimitExceeded.SpotQuota"
+
+ // Exceeded the upper limit of resources bound to the tag.
+ LIMITEXCEEDED_TAGRESOURCEQUOTA = "LimitExceeded.TagResourceQuota"
+
+ // Failed to return instances because of the quota limit.
+ LIMITEXCEEDED_USERRETURNQUOTA = "LimitExceeded.UserReturnQuota"
+
+ // You are short of the spot instance quota.
+ LIMITEXCEEDED_USERSPOTQUOTA = "LimitExceeded.UserSpotQuota"
+
+ // Insufficient subnet IPs.
+ LIMITEXCEEDED_VPCSUBNETNUM = "LimitExceeded.VpcSubnetNum"
+
+ // Missing parameter.
+ MISSINGPARAMETER = "MissingParameter"
+
+ // Parameter missing. Provide at least one parameter.
+ MISSINGPARAMETER_ATLEASTONE = "MissingParameter.AtLeastOne"
+
+ // The DPDK instance requires a VPC.
+ MISSINGPARAMETER_DPDKINSTANCETYPEREQUIREDVPC = "MissingParameter.DPDKInstanceTypeRequiredVPC"
+
+ // The instance type must have Cloud Monitor enabled.
+ MISSINGPARAMETER_MONITORSERVICE = "MissingParameter.MonitorService"
+
+ // An identical job is running.
+ MUTEXOPERATION_TASKRUNNING = "MutexOperation.TaskRunning"
+
+ //
+ OPERATIONDENIED_ACCOUNTNOTSUPPORTED = "OperationDenied.AccountNotSupported"
+
+ // A CHC instance without network configured is not allowed for the installation of a cloud image
+ OPERATIONDENIED_CHCINSTALLCLOUDIMAGEWITHOUTDEPLOYNETWORK = "OperationDenied.ChcInstallCloudImageWithoutDeployNetwork"
+
+ // Operation denied: This is a restricted account.
+ OPERATIONDENIED_INNERUSERPROHIBITACTION = "OperationDenied.InnerUserProhibitAction"
+
+ // The instance has an operation in progress. Please try again later.
+ OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress"
+
+ // Bill-by-CVM users are not allowed to apply for edge zone public IP addresses.
+ OPERATIONDENIED_NOTBANDWIDTHSHIFTUPUSERAPPLYEDGEZONEEIP = "OperationDenied.NotBandwidthShiftUpUserApplyEdgeZoneEip"
+
+ // The number of shared images exceeds the quota.
+ OVERQUOTA = "OverQuota"
+
+ // This region does not support importing images.
+ REGIONABILITYLIMIT_UNSUPPORTEDTOIMPORTIMAGE = "RegionAbilityLimit.UnsupportedToImportImage"
+
+ // The resource is in use.
+ RESOURCEINUSE = "ResourceInUse"
+
+ //
+ RESOURCEINUSE_DISKROLLBACKING = "ResourceInUse.DiskRollbacking"
+
+ // The availability zone has been sold out.
+ RESOURCEINSUFFICIENT_AVAILABILITYZONESOLDOUT = "ResourceInsufficient.AvailabilityZoneSoldOut"
+
+ //
+ RESOURCEINSUFFICIENT_CIDRBLOCK = "ResourceInsufficient.CidrBlock"
+
+ // The specified cloud disk has been sold out.
+ RESOURCEINSUFFICIENT_CLOUDDISKSOLDOUT = "ResourceInsufficient.CloudDiskSoldOut"
+
+ // The parameters of cloud disk do not meet the specification.
+ RESOURCEINSUFFICIENT_CLOUDDISKUNAVAILABLE = "ResourceInsufficient.CloudDiskUnavailable"
+
+ // The number of instances exceeded the quota limit of spread placement groups.
+ RESOURCEINSUFFICIENT_DISASTERRECOVERGROUPCVMQUOTA = "ResourceInsufficient.DisasterRecoverGroupCvmQuota"
+
+ //
+ RESOURCEINSUFFICIENT_INSUFFICIENTGROUPQUOTA = "ResourceInsufficient.InsufficientGroupQuota"
+
+ // The specified instance type is insufficient.
+ RESOURCEINSUFFICIENT_SPECIFIEDINSTANCETYPE = "ResourceInsufficient.SpecifiedInstanceType"
+
+ // The instances of the specified types were sold out in the selected AZs.
+ RESOURCEINSUFFICIENT_ZONESOLDOUTFORSPECIFIEDINSTANCE = "ResourceInsufficient.ZoneSoldOutForSpecifiedInstance"
+
+ // The HPC cluster does not exist.
+ RESOURCENOTFOUND_HPCCLUSTER = "ResourceNotFound.HpcCluster"
+
+ // The specified placement group does not exist.
+ RESOURCENOTFOUND_INVALIDPLACEMENTSET = "ResourceNotFound.InvalidPlacementSet"
+
+ // This instance type is not supported in the AZ.
+ RESOURCENOTFOUND_INVALIDZONEINSTANCETYPE = "ResourceNotFound.InvalidZoneInstanceType"
+
+ //
+ RESOURCENOTFOUND_KEYPAIRNOTFOUND = "ResourceNotFound.KeyPairNotFound"
+
+ // No default CBS resources are available.
+ RESOURCENOTFOUND_NODEFAULTCBS = "ResourceNotFound.NoDefaultCbs"
+
+ // No default CBS resources are available.
+ RESOURCENOTFOUND_NODEFAULTCBSWITHREASON = "ResourceNotFound.NoDefaultCbsWithReason"
+
+ // This instance type is unavailable in the availability zone.
+ RESOURCEUNAVAILABLE_INSTANCETYPE = "ResourceUnavailable.InstanceType"
+
+ // The snapshot is being created.
+ RESOURCEUNAVAILABLE_SNAPSHOTCREATING = "ResourceUnavailable.SnapshotCreating"
+
+ // Resources in this availability zone has been sold out.
+ RESOURCESSOLDOUT_AVAILABLEZONE = "ResourcesSoldOut.AvailableZone"
+
+ // The public IP has been sold out.
+ RESOURCESSOLDOUT_EIPINSUFFICIENT = "ResourcesSoldOut.EipInsufficient"
+
+ // The specified instance type is sold out.
+ RESOURCESSOLDOUT_SPECIFIEDINSTANCETYPE = "ResourcesSoldOut.SpecifiedInstanceType"
+
+ // A general error occurred during the security group service API call.
+ SECGROUPACTIONFAILURE = "SecGroupActionFailure"
+
+ //
+ UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
+
+ // The specified image does not belong to the user.
+ UNAUTHORIZEDOPERATION_IMAGENOTBELONGTOACCOUNT = "UnauthorizedOperation.ImageNotBelongToAccount"
+
+ // Check if the token is valid.
+ UNAUTHORIZEDOPERATION_INVALIDTOKEN = "UnauthorizedOperation.InvalidToken"
+
+ // Unauthorized operation. Make sure Multi-Factor Authentication (MFA) is valid.
+ UNAUTHORIZEDOPERATION_MFAEXPIRED = "UnauthorizedOperation.MFAExpired"
+
+ // Unauthorized operation. Make sure Multi-Factor Authentication (MFA) exists.
+ UNAUTHORIZEDOPERATION_MFANOTFOUND = "UnauthorizedOperation.MFANotFound"
+
+ // You’re not authorized for the operation. Please check the CAM policy.
+ UNAUTHORIZEDOPERATION_PERMISSIONDENIED = "UnauthorizedOperation.PermissionDenied"
+
+ // Unknown parameter error.
+ UNKNOWNPARAMETER = "UnknownParameter"
+
+ // Unsupported operation.
+ UNSUPPORTEDOPERATION = "UnsupportedOperation"
+
+ // This operation is currently not supported for ARM machines.
+ UNSUPPORTEDOPERATION_ARMARCHITECTURE = "UnsupportedOperation.ArmArchitecture"
+
+ // The specified instance or network cannot use the bandwidth package.
+ UNSUPPORTEDOPERATION_BANDWIDTHPACKAGEIDNOTSUPPORTED = "UnsupportedOperation.BandwidthPackageIdNotSupported"
+
+ // Only one snapshot can be created in 24 hours.
+ UNSUPPORTEDOPERATION_DISKSNAPCREATETIMETOOOLD = "UnsupportedOperation.DiskSnapCreateTimeTooOld"
+
+ //
+ UNSUPPORTEDOPERATION_EDGEZONEINSTANCE = "UnsupportedOperation.EdgeZoneInstance"
+
+ // The selected edge zone does not support cloud disk operations.
+ UNSUPPORTEDOPERATION_EDGEZONENOTSUPPORTCLOUDDISK = "UnsupportedOperation.EdgeZoneNotSupportCloudDisk"
+
+ // An ENI is bound to the CVM. Please unbind the ENI from the CVM before switching to VPC.
+ UNSUPPORTEDOPERATION_ELASTICNETWORKINTERFACE = "UnsupportedOperation.ElasticNetworkInterface"
+
+ // Encrypted images are not supported.
+ UNSUPPORTEDOPERATION_ENCRYPTEDIMAGESNOTSUPPORTED = "UnsupportedOperation.EncryptedImagesNotSupported"
+
+ // You cannot change the model of a heterogeneous instance.
+ UNSUPPORTEDOPERATION_HETEROGENEOUSCHANGEINSTANCEFAMILY = "UnsupportedOperation.HeterogeneousChangeInstanceFamily"
+
+ // Instances with hibernation disabled are not supported.
+ UNSUPPORTEDOPERATION_HIBERNATIONFORNORMALINSTANCE = "UnsupportedOperation.HibernationForNormalInstance"
+
+ //
+ UNSUPPORTEDOPERATION_HIBERNATIONOSVERSION = "UnsupportedOperation.HibernationOsVersion"
+
+ // IPv6 instances cannot be migrated from Classiclink to VPC.
+ UNSUPPORTEDOPERATION_IPV6NOTSUPPORTVPCMIGRATE = "UnsupportedOperation.IPv6NotSupportVpcMigrate"
+
+ // Failed to export the image: The image is too large.
+ UNSUPPORTEDOPERATION_IMAGETOOLARGEEXPORTUNSUPPORTED = "UnsupportedOperation.ImageTooLargeExportUnsupported"
+
+ // This instance billing mode does not support the operation.
+ UNSUPPORTEDOPERATION_INSTANCECHARGETYPE = "UnsupportedOperation.InstanceChargeType"
+
+ // A mixed payment mode is not supported.
+ UNSUPPORTEDOPERATION_INSTANCEMIXEDPRICINGMODEL = "UnsupportedOperation.InstanceMixedPricingModel"
+
+ // The specified instance does not support operating system switching.
+ UNSUPPORTEDOPERATION_INSTANCEOSCONVERTOSNOTSUPPORT = "UnsupportedOperation.InstanceOsConvertOsNotSupport"
+
+ // The instance `ins-xxxxxx` with the `Xserver windows2012cndatacenterx86_64` operating system does not support this operation.
+ UNSUPPORTEDOPERATION_INSTANCEOSWINDOWS = "UnsupportedOperation.InstanceOsWindows"
+
+ //
+ UNSUPPORTEDOPERATION_INSTANCEREINSTALLFAILED = "UnsupportedOperation.InstanceReinstallFailed"
+
+ // This CVM is blocked. Please submit a ticket.
+ UNSUPPORTEDOPERATION_INSTANCESTATEBANNING = "UnsupportedOperation.InstanceStateBanning"
+
+ // The instances are permanently corrupted, and this operation is not supported.
+ UNSUPPORTEDOPERATION_INSTANCESTATECORRUPTED = "UnsupportedOperation.InstanceStateCorrupted"
+
+ // Instances are entering the rescue mode, and this operation is not supported.
+ UNSUPPORTEDOPERATION_INSTANCESTATEENTERRESCUEMODE = "UnsupportedOperation.InstanceStateEnterRescueMode"
+
+ // The instance `ins-xxxxxx` in the `ENTER_SERVICE_LIVE_MIGRATE` status is not supported.
+ UNSUPPORTEDOPERATION_INSTANCESTATEENTERSERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateEnterServiceLiveMigrate"
+
+ // Instances are exiting from the rescue mode, and this operation is not supported.
+ UNSUPPORTEDOPERATION_INSTANCESTATEEXITRESCUEMODE = "UnsupportedOperation.InstanceStateExitRescueMode"
+
+ // The instance `ins-xxxxxx` in the `EXIT_SERVICE_LIVE_MIGRATE` status is not supported.
+ UNSUPPORTEDOPERATION_INSTANCESTATEEXITSERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateExitServiceLiveMigrate"
+
+ // The operation is not supported for the frozen instances.
+ UNSUPPORTEDOPERATION_INSTANCESTATEFREEZING = "UnsupportedOperation.InstanceStateFreezing"
+
+ // Unable to isolate: the instance is isolated
+ UNSUPPORTEDOPERATION_INSTANCESTATEISOLATING = "UnsupportedOperation.InstanceStateIsolating"
+
+ // The instance is failed to create, so the operation is not supported.
+ UNSUPPORTEDOPERATION_INSTANCESTATELAUNCHFAILED = "UnsupportedOperation.InstanceStateLaunchFailed"
+
+ // The specified operation is not supported for instances that are not in the running state.
+ UNSUPPORTEDOPERATION_INSTANCESTATENOTRUNNING = "UnsupportedOperation.InstanceStateNotRunning"
+
+ // The instances are being created, and this operation is not supported.
+ UNSUPPORTEDOPERATION_INSTANCESTATEPENDING = "UnsupportedOperation.InstanceStatePending"
+
+ // The instances are being restarted, and this operation is not supported.
+ UNSUPPORTEDOPERATION_INSTANCESTATEREBOOTING = "UnsupportedOperation.InstanceStateRebooting"
+
+ // Instances in the rescue mode are not available for this operation.
+ UNSUPPORTEDOPERATION_INSTANCESTATERESCUEMODE = "UnsupportedOperation.InstanceStateRescueMode"
+
+ // Running instances do not support this operation.
+ UNSUPPORTEDOPERATION_INSTANCESTATERUNNING = "UnsupportedOperation.InstanceStateRunning"
+
+ // The instances are being migrated, and this operation is not supported.
+ UNSUPPORTEDOPERATION_INSTANCESTATESERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateServiceLiveMigrate"
+
+ // Isolated instances do not support this operation.
+ UNSUPPORTEDOPERATION_INSTANCESTATESHUTDOWN = "UnsupportedOperation.InstanceStateShutdown"
+
+ // The instance is starting up, and this operation is not supported.
+ UNSUPPORTEDOPERATION_INSTANCESTATESTARTING = "UnsupportedOperation.InstanceStateStarting"
+
+ // The instance has been shut down, and this operation is not supported.
+ UNSUPPORTEDOPERATION_INSTANCESTATESTOPPED = "UnsupportedOperation.InstanceStateStopped"
+
+ // The instance is being shut down, and this operation is not supported.
+ UNSUPPORTEDOPERATION_INSTANCESTATESTOPPING = "UnsupportedOperation.InstanceStateStopping"
+
+ // Terminated instances are not supported.
+ UNSUPPORTEDOPERATION_INSTANCESTATETERMINATED = "UnsupportedOperation.InstanceStateTerminated"
+
+ // The instance is being terminated, and the operation is not supported.
+ UNSUPPORTEDOPERATION_INSTANCESTATETERMINATING = "UnsupportedOperation.InstanceStateTerminating"
+
+ // The instance type does not support setting the `EnableJumboFrame` status.
+ UNSUPPORTEDOPERATION_INSTANCETYPENOTSUPPORTJUMBOFRAME = "UnsupportedOperation.InstanceTypeNotSupportJumboFrame"
+
+ // Modifying Jumbo Frame status without a restart is not supported.
+ UNSUPPORTEDOPERATION_INSTANCESENABLEJUMBOWITHOUTREBOOT = "UnsupportedOperation.InstancesEnableJumboWithoutReboot"
+
+ // The instance is under termination protection and cannot be terminated. Disable the termination protection and try again.
+ UNSUPPORTEDOPERATION_INSTANCESPROTECTED = "UnsupportedOperation.InstancesProtected"
+
+ // Adjusting the data disk is not supported.
+ UNSUPPORTEDOPERATION_INVALIDDATADISK = "UnsupportedOperation.InvalidDataDisk"
+
+ // The specified disk is not supported.
+ UNSUPPORTEDOPERATION_INVALIDDISK = "UnsupportedOperation.InvalidDisk"
+
+ //
+ UNSUPPORTEDOPERATION_INVALIDDISKFASTROLLBACK = "UnsupportedOperation.InvalidDiskFastRollback"
+
+ // The image license type does not match the instance. Select another image.
+ UNSUPPORTEDOPERATION_INVALIDIMAGELICENSETYPEFORRESET = "UnsupportedOperation.InvalidImageLicenseTypeForReset"
+
+ // This operation is not supported for the instance with a termination schedule. Please cancel the scheduled termination time in the instance details page and try again.
+ UNSUPPORTEDOPERATION_INVALIDINSTANCENOTSUPPORTEDPROTECTEDINSTANCE = "UnsupportedOperation.InvalidInstanceNotSupportedProtectedInstance"
+
+ // Instances with swap disks are not supported.
+ UNSUPPORTEDOPERATION_INVALIDINSTANCEWITHSWAPDISK = "UnsupportedOperation.InvalidInstanceWithSwapDisk"
+
+ // The user does not have permissions to operate the current instance.
+ UNSUPPORTEDOPERATION_INVALIDINSTANCESOWNER = "UnsupportedOperation.InvalidInstancesOwner"
+
+ // The current operation is supported only for Tencent Cloud users.
+ UNSUPPORTEDOPERATION_INVALIDPERMISSIONNONINTERNATIONALACCOUNT = "UnsupportedOperation.InvalidPermissionNonInternationalAccount"
+
+ // Encrypted disks are not available in the selected regions.
+ UNSUPPORTEDOPERATION_INVALIDREGIONDISKENCRYPT = "UnsupportedOperation.InvalidRegionDiskEncrypt"
+
+ // Key-pair login is not available to Windows instances.
+ UNSUPPORTEDOPERATION_KEYPAIRUNSUPPORTEDWINDOWS = "UnsupportedOperation.KeyPairUnsupportedWindows"
+
+ // A model whose data disks are all local disks does not support cross-model configuration adjustment.
+ UNSUPPORTEDOPERATION_LOCALDATADISKCHANGEINSTANCEFAMILY = "UnsupportedOperation.LocalDataDiskChangeInstanceFamily"
+
+ // The specified disk is converting to a cloud disk. Try again later.
+ UNSUPPORTEDOPERATION_LOCALDISKMIGRATINGTOCLOUDDISK = "UnsupportedOperation.LocalDiskMigratingToCloudDisk"
+
+ // This request does not support images in this region. Please change to another image.
+ UNSUPPORTEDOPERATION_LOCATIONIMAGENOTSUPPORTED = "UnsupportedOperation.LocationImageNotSupported"
+
+ // Marketplace image instances do not support operating system switching.
+ UNSUPPORTEDOPERATION_MARKETIMAGECONVERTOSUNSUPPORTED = "UnsupportedOperation.MarketImageConvertOSUnsupported"
+
+ // The custom images created with the market images cannot be exported.
+ UNSUPPORTEDOPERATION_MARKETIMAGEEXPORTUNSUPPORTED = "UnsupportedOperation.MarketImageExportUnsupported"
+
+ // Encryption attributes of the system disk cannot be modified.
+ UNSUPPORTEDOPERATION_MODIFYENCRYPTIONNOTSUPPORTED = "UnsupportedOperation.ModifyEncryptionNotSupported"
+
+ // An instance bound with CLB does not support modifying its VPC attributes.
+ UNSUPPORTEDOPERATION_MODIFYVPCWITHCLB = "UnsupportedOperation.ModifyVPCWithCLB"
+
+ // This instance is configured with ClassLink. Please cancel the association and continue.
+ UNSUPPORTEDOPERATION_MODIFYVPCWITHCLASSLINK = "UnsupportedOperation.ModifyVPCWithClassLink"
+
+ // This instance type does not support spot instances.
+ UNSUPPORTEDOPERATION_NOINSTANCETYPESUPPORTSPOT = "UnsupportedOperation.NoInstanceTypeSupportSpot"
+
+ // A physical network is not supported by this instance.
+ UNSUPPORTEDOPERATION_NOVPCNETWORK = "UnsupportedOperation.NoVpcNetwork"
+
+ // Failed to configure the scheduled action for the current instance.
+ UNSUPPORTEDOPERATION_NOTSUPPORTIMPORTINSTANCESACTIONTIMER = "UnsupportedOperation.NotSupportImportInstancesActionTimer"
+
+ // The instance does not support this operation.
+ UNSUPPORTEDOPERATION_NOTSUPPORTINSTANCEIMAGE = "UnsupportedOperation.NotSupportInstanceImage"
+
+ // There are unpaid orders for the instance.
+ UNSUPPORTEDOPERATION_NOTSUPPORTUNPAIDORDER = "UnsupportedOperation.NotSupportUnpaidOrder"
+
+ // Only a prepaid account supports this operation.
+ UNSUPPORTEDOPERATION_ONLYFORPREPAIDACCOUNT = "UnsupportedOperation.OnlyForPrepaidAccount"
+
+ // The original instance type is invalid.
+ UNSUPPORTEDOPERATION_ORIGINALINSTANCETYPEINVALID = "UnsupportedOperation.OriginalInstanceTypeInvalid"
+
+ // Image preheating is not supported under your account.
+ UNSUPPORTEDOPERATION_PREHEATIMAGE = "UnsupportedOperation.PreheatImage"
+
+ // Public images and market images cannot be exported.
+ UNSUPPORTEDOPERATION_PUBLICIMAGEEXPORTUNSUPPORTED = "UnsupportedOperation.PublicImageExportUnsupported"
+
+ // This image does not support instance reinstallation.
+ UNSUPPORTEDOPERATION_RAWLOCALDISKINSREINSTALLTOQCOW2 = "UnsupportedOperation.RawLocalDiskInsReinstalltoQcow2"
+
+ // The RedHat image cannot be exported.
+ UNSUPPORTEDOPERATION_REDHATIMAGEEXPORTUNSUPPORTED = "UnsupportedOperation.RedHatImageExportUnsupported"
+
+ // An instance with an enterprise operating system installed cannot be returned.
+ UNSUPPORTEDOPERATION_REDHATINSTANCETERMINATEUNSUPPORTED = "UnsupportedOperation.RedHatInstanceTerminateUnsupported"
+
+ // The operating system of the instance is RedHat, so this operation is not supported.
+ UNSUPPORTEDOPERATION_REDHATINSTANCEUNSUPPORTED = "UnsupportedOperation.RedHatInstanceUnsupported"
+
+ // The region is unsupported.
+ UNSUPPORTEDOPERATION_REGION = "UnsupportedOperation.Region"
+
+ // Purchasing reserved instances is not supported for the current user.
+ UNSUPPORTEDOPERATION_RESERVEDINSTANCEINVISIBLEFORUSER = "UnsupportedOperation.ReservedInstanceInvisibleForUser"
+
+ // You’ve used up your quota for Reserved Instances.
+ UNSUPPORTEDOPERATION_RESERVEDINSTANCEOUTOFQUATA = "UnsupportedOperation.ReservedInstanceOutofQuata"
+
+ // Shared images cannot be exported.
+ UNSUPPORTEDOPERATION_SHAREDIMAGEEXPORTUNSUPPORTED = "UnsupportedOperation.SharedImageExportUnsupported"
+
+ // This special instance type does not support the operation.
+ UNSUPPORTEDOPERATION_SPECIALINSTANCETYPE = "UnsupportedOperation.SpecialInstanceType"
+
+ // Spot instance is not supported in this region.
+ UNSUPPORTEDOPERATION_SPOTUNSUPPORTEDREGION = "UnsupportedOperation.SpotUnsupportedRegion"
+
+ // The instance does not support the **no charges when shut down** feature.
+ UNSUPPORTEDOPERATION_STOPPEDMODESTOPCHARGING = "UnsupportedOperation.StoppedModeStopCharging"
+
+ // Configuration adjustment of the same type is not supported for instances with no charges when shut down.
+ UNSUPPORTEDOPERATION_STOPPEDMODESTOPCHARGINGSAMEFAMILY = "UnsupportedOperation.StoppedModeStopChargingSameFamily"
+
+ // The specified image does not support synchronization to an encrypted custom image.
+ UNSUPPORTEDOPERATION_SYNCENCRYPTIMAGENOTSUPPORT = "UnsupportedOperation.SyncEncryptImageNotSupport"
+
+ //
+ UNSUPPORTEDOPERATION_SYSTEMDISKTYPE = "UnsupportedOperation.SystemDiskType"
+
+ // The operation is not supported when TencentCloud Automation Tools are offline.
+ UNSUPPORTEDOPERATION_TATAGENTNOTONLINE = "UnsupportedOperation.TatAgentNotOnline"
+
+ // For an underwriting instance, `RenewFlag` can only be set to `NOTIFY_AND_AUTO_RENEW`.
+ UNSUPPORTEDOPERATION_UNDERWRITINGINSTANCETYPEONLYSUPPORTAUTORENEW = "UnsupportedOperation.UnderwritingInstanceTypeOnlySupportAutoRenew"
+
+ //
+ UNSUPPORTEDOPERATION_UNSUPPORTEDARMCHANGEINSTANCEFAMILY = "UnsupportedOperation.UnsupportedARMChangeInstanceFamily"
+
+ // The specified model does not support cross-model configuration adjustment.
+ UNSUPPORTEDOPERATION_UNSUPPORTEDCHANGEINSTANCEFAMILY = "UnsupportedOperation.UnsupportedChangeInstanceFamily"
+
+ // Non-ARM model instances cannot be changed to the ARM model.
+ UNSUPPORTEDOPERATION_UNSUPPORTEDCHANGEINSTANCEFAMILYTOARM = "UnsupportedOperation.UnsupportedChangeInstanceFamilyToARM"
+
+ // Changing to this model type for this instance is not allowed.
+ UNSUPPORTEDOPERATION_UNSUPPORTEDCHANGEINSTANCETOTHISINSTANCEFAMILY = "UnsupportedOperation.UnsupportedChangeInstanceToThisInstanceFamily"
+
+ // This operation is not available for Tencent Cloud International users.
+ UNSUPPORTEDOPERATION_UNSUPPORTEDINTERNATIONALUSER = "UnsupportedOperation.UnsupportedInternationalUser"
+
+ // The specified pool is illegal.
+ UNSUPPORTEDOPERATION_UNSUPPORTEDPOOL = "UnsupportedOperation.UnsupportedPool"
+
+ // The specified user does not support performing operating system switching.
+ UNSUPPORTEDOPERATION_USERCONVERTOSNOTSUPPORT = "UnsupportedOperation.UserConvertOsNotSupport"
+
+ // The quota of user limit operations is insufficient.
+ UNSUPPORTEDOPERATION_USERLIMITOPERATIONEXCEEDQUOTA = "UnsupportedOperation.UserLimitOperationExceedQuota"
+
+ // Windows images cannot be exported.
+ UNSUPPORTEDOPERATION_WINDOWSIMAGEEXPORTUNSUPPORTED = "UnsupportedOperation.WindowsImageExportUnsupported"
+
+ // The VPC IP address is not in the subnet.
+ VPCADDRNOTINSUBNET = "VpcAddrNotInSubNet"
+
+ // The VPC IP address is already occupied.
+ VPCIPISUSED = "VpcIpIsUsed"
+)
diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go-intl-en/tencentcloud/cvm/v20170312/models.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go-intl-en/tencentcloud/cvm/v20170312/models.go
new file mode 100644
index 0000000000..4041bd798f
--- /dev/null
+++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go-intl-en/tencentcloud/cvm/v20170312/models.go
@@ -0,0 +1,8221 @@
+// Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package v20170312
+
+import (
+ tcerr "github.com/tencentcloud/tencentcloud-sdk-go-intl-en/tencentcloud/common/errors"
+ tchttp "github.com/tencentcloud/tencentcloud-sdk-go-intl-en/tencentcloud/common/http"
+ "github.com/tencentcloud/tencentcloud-sdk-go-intl-en/tencentcloud/common/json"
+)
+
+type ActionTimer struct {
+ // Timer action. Valid value: `TerminateInstances`.
+ // Note: This field may return `null`, indicating that no valid values can be obtained.
+ TimerAction *string `json:"TimerAction,omitnil,omitempty" name:"TimerAction"`
+
+ // Action time, which follows the ISO8601 standard and uses UTC time. It must be 5 minutes later than the current time. Format: YYYY-MM-DDThh:mm:ssZ. For example: 2018-05-29T11:26:40Z.
+ // Note: This field may return `null`, indicating that no valid values can be obtained.
+ ActionTime *string `json:"ActionTime,omitnil,omitempty" name:"ActionTime"`
+
+ // Extended data
+ // Note: This field may return `null`, indicating that no valid values can be obtained.
+ Externals *Externals `json:"Externals,omitnil,omitempty" name:"Externals"`
+
+ // Timer ID.
+ ActionTimerId *string `json:"ActionTimerId,omitnil,omitempty" name:"ActionTimerId"`
+
+ // Timer status. Valid values:
+ //
+ // UNDO: Not triggered.
+ // DOING: Triggering.
+ // DONE: Triggered already.
+ Status *string `json:"Status,omitnil,omitempty" name:"Status"`
+
+ // Instance ID corresponding to a timer.
+ InstanceId *string `json:"InstanceId,omitnil,omitempty" name:"InstanceId"`
+}
+
+// Predefined struct for user
+type AllocateHostsRequestParams struct {
+ // Instance location. This parameter is used to specify the attributes of an instance, such as its availability zone and project.
+ Placement *Placement `json:"Placement,omitnil,omitempty" name:"Placement"`
+
+ // A string used to ensure the idempotency of the request.
+ ClientToken *string `json:"ClientToken,omitnil,omitempty" name:"ClientToken"`
+
+ // Configuration of prepaid instances. You can use the parameter to specify the attributes of prepaid instances, such as the subscription period and the auto-renewal plan. This parameter is required for prepaid instances.
+ HostChargePrepaid *ChargePrepaid `json:"HostChargePrepaid,omitnil,omitempty" name:"HostChargePrepaid"`
+
+ // Instance billing model, only monthly or yearly subscription supported. Default value: `PREPAID'.
+ HostChargeType *string `json:"HostChargeType,omitnil,omitempty" name:"HostChargeType"`
+
+ // CDH instance model. Default value: `HS1`.
+ HostType *string `json:"HostType,omitnil,omitempty" name:"HostType"`
+
+ // Quantity of CDH instances purchased. Default value: 1.
+ HostCount *uint64 `json:"HostCount,omitnil,omitempty" name:"HostCount"`
+
+ // Tag description. You can specify the parameter to associate a tag with an instance.
+ TagSpecification []*TagSpecification `json:"TagSpecification,omitnil,omitempty" name:"TagSpecification"`
+}
+
+type AllocateHostsRequest struct {
+ *tchttp.BaseRequest
+
+ // Instance location. This parameter is used to specify the attributes of an instance, such as its availability zone and project.
+ Placement *Placement `json:"Placement,omitnil,omitempty" name:"Placement"`
+
+ // A string used to ensure the idempotency of the request.
+ ClientToken *string `json:"ClientToken,omitnil,omitempty" name:"ClientToken"`
+
+ // Configuration of prepaid instances. You can use the parameter to specify the attributes of prepaid instances, such as the subscription period and the auto-renewal plan. This parameter is required for prepaid instances.
+ HostChargePrepaid *ChargePrepaid `json:"HostChargePrepaid,omitnil,omitempty" name:"HostChargePrepaid"`
+
+ // Instance billing model, only monthly or yearly subscription supported. Default value: `PREPAID'.
+ HostChargeType *string `json:"HostChargeType,omitnil,omitempty" name:"HostChargeType"`
+
+ // CDH instance model. Default value: `HS1`.
+ HostType *string `json:"HostType,omitnil,omitempty" name:"HostType"`
+
+ // Quantity of CDH instances purchased. Default value: 1.
+ HostCount *uint64 `json:"HostCount,omitnil,omitempty" name:"HostCount"`
+
+ // Tag description. You can specify the parameter to associate a tag with an instance.
+ TagSpecification []*TagSpecification `json:"TagSpecification,omitnil,omitempty" name:"TagSpecification"`
+}
+
+func (r *AllocateHostsRequest) ToJsonString() string {
+ b, _ := json.Marshal(r)
+ return string(b)
+}
+
+// FromJsonString It is highly **NOT** recommended to use this function
+// because it has no param check, nor strict type check
+func (r *AllocateHostsRequest) FromJsonString(s string) error {
+ f := make(map[string]interface{})
+ if err := json.Unmarshal([]byte(s), &f); err != nil {
+ return err
+ }
+ delete(f, "Placement")
+ delete(f, "ClientToken")
+ delete(f, "HostChargePrepaid")
+ delete(f, "HostChargeType")
+ delete(f, "HostType")
+ delete(f, "HostCount")
+ delete(f, "TagSpecification")
+ if len(f) > 0 {
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "AllocateHostsRequest has unknown keys!", "")
+ }
+ return json.Unmarshal([]byte(s), &r)
+}
+
+// Predefined struct for user
+type AllocateHostsResponseParams struct {
+ // IDs of created instances
+ HostIdSet []*string `json:"HostIdSet,omitnil,omitempty" name:"HostIdSet"`
+
+ // The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
+ RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"`
+}
+
+type AllocateHostsResponse struct {
+ *tchttp.BaseResponse
+ Response *AllocateHostsResponseParams `json:"Response"`
+}
+
+func (r *AllocateHostsResponse) ToJsonString() string {
+ b, _ := json.Marshal(r)
+ return string(b)
+}
+
+// FromJsonString It is highly **NOT** recommended to use this function
+// because it has no param check, nor strict type check
+func (r *AllocateHostsResponse) FromJsonString(s string) error {
+ return json.Unmarshal([]byte(s), &r)
+}
+
+// Predefined struct for user
+type AssociateInstancesKeyPairsRequestParams struct {
+ // Instance ID(s). The maximum number of instances in each request is 100.
You can obtain the available instance IDs in two ways:
Filter by the availability zone, such as `ap-guangzhou-1`.
Type: String
Optional
Valid values: See Regions and Availability Zones
+ //Filter by the instance name.
Type: String
Optional
+ //Filter by the instance status. For status details, see [InstanceStatus](https://intl.cloud.tencent.com/document/api/213/15753?from_cn_redirect=1#InstanceStatus).
Type: String
Optional
+ //Filter by the device type.
Type: String
Optional
+ //Filter by the unique VPC ID.
Type: String
Optional
+ //Filter by the unique VPC subnet ID.
Type: String
Optional
+ Filters []*Filter `json:"Filters,omitnil,omitempty" name:"Filters"` + + // The offset. Default value: `0`. For more information on `Offset`, see the relevant sections in API [Introduction](https://intl.cloud.tencent.com/document/api/213/15688?from_cn_redirect=1). + Offset *int64 `json:"Offset,omitnil,omitempty" name:"Offset"` + + // The number of returned results. Default value: `20`. Maximum value: `100`. For more information on `Limit`, see the relevant sections in API [Introduction](https://intl.cloud.tencent.com/document/api/213/15688?from_cn_redirect=1). + Limit *int64 `json:"Limit,omitnil,omitempty" name:"Limit"` +} + +type DescribeChcHostsRequest struct { + *tchttp.BaseRequest + + // CHC host ID. Up to 100 instances per request is allowed. `ChcIds` and `Filters` cannot be specified at the same time. + ChcIds []*string `json:"ChcIds,omitnil,omitempty" name:"ChcIds"` + + //Filter by the availability zone, such as `ap-guangzhou-1`.
Type: String
Optional
Valid values: See Regions and Availability Zones
+ //Filter by the instance name.
Type: String
Optional
+ //Filter by the instance status. For status details, see [InstanceStatus](https://intl.cloud.tencent.com/document/api/213/15753?from_cn_redirect=1#InstanceStatus).
Type: String
Optional
+ //Filter by the device type.
Type: String
Optional
+ //Filter by the unique VPC ID.
Type: String
Optional
+ //Filter by the unique VPC subnet ID.
Type: String
Optional
+ Filters []*Filter `json:"Filters,omitnil,omitempty" name:"Filters"` + + // The offset. Default value: `0`. For more information on `Offset`, see the relevant sections in API [Introduction](https://intl.cloud.tencent.com/document/api/213/15688?from_cn_redirect=1). + Offset *int64 `json:"Offset,omitnil,omitempty" name:"Offset"` + + // The number of returned results. Default value: `20`. Maximum value: `100`. For more information on `Limit`, see the relevant sections in API [Introduction](https://intl.cloud.tencent.com/document/api/213/15688?from_cn_redirect=1). + Limit *int64 `json:"Limit,omitnil,omitempty" name:"Limit"` +} + +func (r *DescribeChcHostsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeChcHostsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ChcIds") + delete(f, "Filters") + delete(f, "Offset") + delete(f, "Limit") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeChcHostsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeChcHostsResponseParams struct { + // Number of eligible instances + TotalCount *int64 `json:"TotalCount,omitnil,omitempty" name:"TotalCount"` + + // List of returned instances + ChcHostSet []*ChcHost `json:"ChcHostSet,omitnil,omitempty" name:"ChcHostSet"` + + // The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` +} + +type DescribeChcHostsResponse struct { + *tchttp.BaseResponse + Response *DescribeChcHostsResponseParams `json:"Response"` +} + +func (r *DescribeChcHostsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeChcHostsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeDisasterRecoverGroupQuotaRequestParams struct { + +} + +type DescribeDisasterRecoverGroupQuotaRequest struct { + *tchttp.BaseRequest + +} + +func (r *DescribeDisasterRecoverGroupQuotaRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeDisasterRecoverGroupQuotaRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeDisasterRecoverGroupQuotaRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeDisasterRecoverGroupQuotaResponseParams struct { + // The maximum number of placement groups that can be created. + GroupQuota *int64 `json:"GroupQuota,omitnil,omitempty" name:"GroupQuota"` + + // The number of placement groups that have been created by the current user. + CurrentNum *int64 `json:"CurrentNum,omitnil,omitempty" name:"CurrentNum"` + + // Quota on instances in a physical-machine-type disaster recovery group. + CvmInHostGroupQuota *int64 `json:"CvmInHostGroupQuota,omitnil,omitempty" name:"CvmInHostGroupQuota"` + + // Quota on instances in a switch-type disaster recovery group. + CvmInSwGroupQuota *int64 `json:"CvmInSwGroupQuota,omitnil,omitempty" name:"CvmInSwGroupQuota"` + + // Quota on instances in a rack-type disaster recovery group. + CvmInRackGroupQuota *int64 `json:"CvmInRackGroupQuota,omitnil,omitempty" name:"CvmInRackGroupQuota"` + + // The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` +} + +type DescribeDisasterRecoverGroupQuotaResponse struct { + *tchttp.BaseResponse + Response *DescribeDisasterRecoverGroupQuotaResponseParams `json:"Response"` +} + +func (r *DescribeDisasterRecoverGroupQuotaResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeDisasterRecoverGroupQuotaResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeDisasterRecoverGroupsRequestParams struct { + // ID list of spread placement groups. You can operate up to 10 spread placement groups in each request. + DisasterRecoverGroupIds []*string `json:"DisasterRecoverGroupIds,omitnil,omitempty" name:"DisasterRecoverGroupIds"` + + // Name of a spread placement group. Fuzzy match is supported. + Name *string `json:"Name,omitnil,omitempty" name:"Name"` + + // Offset; default value: 0. For more information on `Offset`, see the corresponding section in API [Introduction](https://intl.cloud.tencent.com/document/product/377). + Offset *int64 `json:"Offset,omitnil,omitempty" name:"Offset"` + + // Number of results returned; default value: 20; maximum: 100. For more information on `Limit`, see the corresponding section in API [Introduction](https://intl.cloud.tencent.com/document/product/377). + Limit *int64 `json:"Limit,omitnil,omitempty" name:"Limit"` + + //Filter by the availability zone, such as `ap-guangzhou-1`.
Type: String
Optional
Valid values: See Regions and Availability Zones
+ //Filter by the project ID. You can query the list of created projects by calling `DescribeProject` or logging in to the [CVM console](https://console.cloud.tencent.com/cvm/index). You can also call `AddProject` to create projects. The project ID is like 1002189.
Type: Integer
Optional
+ //Filter by the CDH instance ID. Format: host-xxxxxxxx.
Type: String
Optional
+ //Filter by the host name.
Type: String
Optional
+ //Filter by the CDH instance status. (`PENDING`: Creating | `LAUNCH_FAILURE`: Failed to create | `RUNNING`: Running | `EXPIRED`: Expired)
Type: String
Optional
+ // Each request can have up to 10 `Filters` and 5 `Filter.Values`. + Filters []*Filter `json:"Filters,omitnil,omitempty" name:"Filters"` + + // Offset; default value: 0. + Offset *uint64 `json:"Offset,omitnil,omitempty" name:"Offset"` + + // Number of results returned; default value: 20; maximum: 100. + Limit *uint64 `json:"Limit,omitnil,omitempty" name:"Limit"` +} + +type DescribeHostsRequest struct { + *tchttp.BaseRequest + + //Filter by the availability zone, such as `ap-guangzhou-1`.
Type: String
Optional
Valid values: See Regions and Availability Zones
+ //Filter by the project ID. You can query the list of created projects by calling `DescribeProject` or logging in to the [CVM console](https://console.cloud.tencent.com/cvm/index). You can also call `AddProject` to create projects. The project ID is like 1002189.
Type: Integer
Optional
+ //Filter by the CDH instance ID. Format: host-xxxxxxxx.
Type: String
Optional
+ //Filter by the host name.
Type: String
Optional
+ //Filter by the CDH instance status. (`PENDING`: Creating | `LAUNCH_FAILURE`: Failed to create | `RUNNING`: Running | `EXPIRED`: Expired)
Type: String
Optional
+ // Each request can have up to 10 `Filters` and 5 `Filter.Values`. + Filters []*Filter `json:"Filters,omitnil,omitempty" name:"Filters"` + + // Offset; default value: 0. + Offset *uint64 `json:"Offset,omitnil,omitempty" name:"Offset"` + + // Number of results returned; default value: 20; maximum: 100. + Limit *uint64 `json:"Limit,omitnil,omitempty" name:"Limit"` +} + +func (r *DescribeHostsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeHostsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "Filters") + delete(f, "Offset") + delete(f, "Limit") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeHostsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeHostsResponseParams struct { + // Total number of CDH instances meeting the query conditions + TotalCount *uint64 `json:"TotalCount,omitnil,omitempty" name:"TotalCount"` + + // Information on CDH instances + HostSet []*HostItem `json:"HostSet,omitnil,omitempty" name:"HostSet"` + + // The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` +} + +type DescribeHostsResponse struct { + *tchttp.BaseResponse + Response *DescribeHostsResponseParams `json:"Response"` +} + +func (r *DescribeHostsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeHostsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeImageFromFamilyRequestParams struct { + // Image family + ImageFamily *string `json:"ImageFamily,omitnil,omitempty" name:"ImageFamily"` +} + +type DescribeImageFromFamilyRequest struct { + *tchttp.BaseRequest + + // Image family + ImageFamily *string `json:"ImageFamily,omitnil,omitempty" name:"ImageFamily"` +} + +func (r *DescribeImageFromFamilyRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeImageFromFamilyRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ImageFamily") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeImageFromFamilyRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeImageFromFamilyResponseParams struct { + // Image information. Null is returned when there is no available image. + // Note: This field may return null, indicating that no valid value is found. + Image *Image `json:"Image,omitnil,omitempty" name:"Image"` + + // The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` +} + +type DescribeImageFromFamilyResponse struct { + *tchttp.BaseResponse + Response *DescribeImageFromFamilyResponseParams `json:"Response"` +} + +func (r *DescribeImageFromFamilyResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeImageFromFamilyResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeImageQuotaRequestParams struct { + +} + +type DescribeImageQuotaRequest struct { + *tchttp.BaseRequest + +} + +func (r *DescribeImageQuotaRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeImageQuotaRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeImageQuotaRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeImageQuotaResponseParams struct { + // The image quota of an account + ImageNumQuota *int64 `json:"ImageNumQuota,omitnil,omitempty" name:"ImageNumQuota"` + + // The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` +} + +type DescribeImageQuotaResponse struct { + *tchttp.BaseResponse + Response *DescribeImageQuotaResponseParams `json:"Response"` +} + +func (r *DescribeImageQuotaResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeImageQuotaResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeImageSharePermissionRequestParams struct { + // The ID of the image to be shared + ImageId *string `json:"ImageId,omitnil,omitempty" name:"ImageId"` +} + +type DescribeImageSharePermissionRequest struct { + *tchttp.BaseRequest + + // The ID of the image to be shared + ImageId *string `json:"ImageId,omitnil,omitempty" name:"ImageId"` +} + +func (r *DescribeImageSharePermissionRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeImageSharePermissionRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ImageId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeImageSharePermissionRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeImageSharePermissionResponseParams struct { + // Information on image sharing. + SharePermissionSet []*SharePermission `json:"SharePermissionSet,omitnil,omitempty" name:"SharePermissionSet"` + + // The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` +} + +type DescribeImageSharePermissionResponse struct { + *tchttp.BaseResponse + Response *DescribeImageSharePermissionResponseParams `json:"Response"` +} + +func (r *DescribeImageSharePermissionResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeImageSharePermissionResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeImagesRequestParams struct { + // List of image IDs, such as `img-gvbnzy6f`. For the format of array-type parameters, see [API Introduction](https://intl.cloud.tencent.com/document/api/213/15688?from_cn_redirect=1). You can obtain the image IDs in two ways:Filter by the image ID.
Type: String
Optional
+ //Filter by the image type.
Type: String
Optional
Options:
`PRIVATE_IMAGE`: Private images (images created by this account)
`PUBLIC_IMAGE`: Public images (Tencent Cloud official images)
`SHARED_IMAGE`: Shared images (images shared by other accounts to this account)
+ //Filter by the image name.
Type: String
Optional
+ //Filter by the image operating system, such as `CentOS`.
Type: String
Optional
+ //Filter by the tag key.
Type: String
Optional
+ //Filter by the tag value.
Type: String
Optional
+ //Filter by the tag key-value pair. Replace “tag-key” with the actual value.
Type: String
Optional
+ Filters []*Filter `json:"Filters,omitnil,omitempty" name:"Filters"` + + // Offset; default value: 0. For more information on `Offset`, see [API Introduction](https://intl.cloud.tencent.com/document/api/213/568?from_cn_redirect=1#.E8.BE.93.E5.85.A5.E5.8F.82.E6.95.B0.E4.B8.8E.E8.BF.94.E5.9B.9E.E5.8F.82.E6.95.B0.E9.87.8A.E4.B9.89). + Offset *uint64 `json:"Offset,omitnil,omitempty" name:"Offset"` + + // Number of results returned; default value: 20; maximum: 100. For more information on `Limit`, see [API Introduction](https://intl.cloud.tencent.com/document/api/213/568?from_cn_redirect=1#.E8.BE.93.E5.85.A5.E5.8F.82.E6.95.B0.E4.B8.8E.E8.BF.94.E5.9B.9E.E5.8F.82.E6.95.B0.E9.87.8A.E4.B9.89). + Limit *uint64 `json:"Limit,omitnil,omitempty" name:"Limit"` + + // Instance type, e.g. `S1.SMALL1` + InstanceType *string `json:"InstanceType,omitnil,omitempty" name:"InstanceType"` +} + +type DescribeImagesRequest struct { + *tchttp.BaseRequest + + // List of image IDs, such as `img-gvbnzy6f`. For the format of array-type parameters, see [API Introduction](https://intl.cloud.tencent.com/document/api/213/15688?from_cn_redirect=1). You can obtain the image IDs in two ways:Filter by the image ID.
Type: String
Optional
+ //Filter by the image type.
Type: String
Optional
Options:
`PRIVATE_IMAGE`: Private images (images created by this account)
`PUBLIC_IMAGE`: Public images (Tencent Cloud official images)
`SHARED_IMAGE`: Shared images (images shared by other accounts to this account)
+ //Filter by the image name.
Type: String
Optional
+ //Filter by the image operating system, such as `CentOS`.
Type: String
Optional
+ //Filter by the tag key.
Type: String
Optional
+ //Filter by the tag value.
Type: String
Optional
+ //Filter by the tag key-value pair. Replace “tag-key” with the actual value.
Type: String
Optional
+ Filters []*Filter `json:"Filters,omitnil,omitempty" name:"Filters"` + + // Offset; default value: 0. For more information on `Offset`, see [API Introduction](https://intl.cloud.tencent.com/document/api/213/568?from_cn_redirect=1#.E8.BE.93.E5.85.A5.E5.8F.82.E6.95.B0.E4.B8.8E.E8.BF.94.E5.9B.9E.E5.8F.82.E6.95.B0.E9.87.8A.E4.B9.89). + Offset *uint64 `json:"Offset,omitnil,omitempty" name:"Offset"` + + // Number of results returned; default value: 20; maximum: 100. For more information on `Limit`, see [API Introduction](https://intl.cloud.tencent.com/document/api/213/568?from_cn_redirect=1#.E8.BE.93.E5.85.A5.E5.8F.82.E6.95.B0.E4.B8.8E.E8.BF.94.E5.9B.9E.E5.8F.82.E6.95.B0.E9.87.8A.E4.B9.89). + Limit *uint64 `json:"Limit,omitnil,omitempty" name:"Limit"` + + // Instance type, e.g. `S1.SMALL1` + InstanceType *string `json:"InstanceType,omitnil,omitempty" name:"InstanceType"` +} + +func (r *DescribeImagesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeImagesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ImageIds") + delete(f, "Filters") + delete(f, "Offset") + delete(f, "Limit") + delete(f, "InstanceType") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeImagesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeImagesResponseParams struct { + // Information on an image, including its state and attributes. + ImageSet []*Image `json:"ImageSet,omitnil,omitempty" name:"ImageSet"` + + // Number of images meeting the filtering conditions. + TotalCount *int64 `json:"TotalCount,omitnil,omitempty" name:"TotalCount"` + + // The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` +} + +type DescribeImagesResponse struct { + *tchttp.BaseResponse + Response *DescribeImagesResponseParams `json:"Response"` +} + +func (r *DescribeImagesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeImagesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeImportImageOsRequestParams struct { + +} + +type DescribeImportImageOsRequest struct { + *tchttp.BaseRequest + +} + +func (r *DescribeImportImageOsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeImportImageOsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeImportImageOsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeImportImageOsResponseParams struct { + // Supported operating system types of imported images. + ImportImageOsListSupported *ImageOsList `json:"ImportImageOsListSupported,omitnil,omitempty" name:"ImportImageOsListSupported"` + + // Supported operating system versions of imported images. + ImportImageOsVersionSet []*OsVersion `json:"ImportImageOsVersionSet,omitnil,omitempty" name:"ImportImageOsVersionSet"` + + // The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` +} + +type DescribeImportImageOsResponse struct { + *tchttp.BaseResponse + Response *DescribeImportImageOsResponseParams `json:"Response"` +} + +func (r *DescribeImportImageOsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeImportImageOsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeInstanceFamilyConfigsRequestParams struct { + +} + +type DescribeInstanceFamilyConfigsRequest struct { + *tchttp.BaseRequest + +} + +func (r *DescribeInstanceFamilyConfigsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeInstanceFamilyConfigsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeInstanceFamilyConfigsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeInstanceFamilyConfigsResponseParams struct { + // List of instance model families + InstanceFamilyConfigSet []*InstanceFamilyConfig `json:"InstanceFamilyConfigSet,omitnil,omitempty" name:"InstanceFamilyConfigSet"` + + // The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` +} + +type DescribeInstanceFamilyConfigsResponse struct { + *tchttp.BaseResponse + Response *DescribeInstanceFamilyConfigsResponseParams `json:"Response"` +} + +func (r *DescribeInstanceFamilyConfigsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeInstanceFamilyConfigsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeInstancesOperationLimitRequestParams struct { + // Query by instance ID(s). You can obtain the instance IDs from the value of `InstanceId` returned by the [DescribeInstances](https://intl.cloud.tencent.com/document/api/213/15728?from_cn_redirect=1) API. For example, instance ID: ins-xxxxxxxx. (For the specific format, refer to section `ids.N` of the API [Introduction](https://intl.cloud.tencent.com/document/api/213/15688?from_cn_redirect=1).) You can query up to 100 instances in each request. + InstanceIds []*string `json:"InstanceIds,omitnil,omitempty" name:"InstanceIds"` + + // Operation on the instance(s). + //Filter by [LaunchTemplateName].
Type: String
Optional
+ // The maximum number of `Filters` in each request is 10. The upper limit for `Filter.Values` is 5. This parameter cannot specify `LaunchTemplateIds` and `Filters` at the same time. + Filters []*Filter `json:"Filters,omitnil,omitempty" name:"Filters"` + + // The offset. Default value: 0. For more information on `Offset`, see the relevant sections in API [Introduction](https://intl.cloud.tencent.com/document/api/213/15688?from_cn_redirect=1). + Offset *int64 `json:"Offset,omitnil,omitempty" name:"Offset"` + + // The number of returned results. Default value: 20. Maximum value: 100. For more information on `Limit`, see the relevant sections in API [Introduction](https://intl.cloud.tencent.com/document/api/213/15688?from_cn_redirect=1). + Limit *int64 `json:"Limit,omitnil,omitempty" name:"Limit"` +} + +type DescribeLaunchTemplatesRequest struct { + *tchttp.BaseRequest + + // Instance launch template ID. ID of one or more instance launch templates. If not specified, all templates of the user will be displayed. + LaunchTemplateIds []*string `json:"LaunchTemplateIds,omitnil,omitempty" name:"LaunchTemplateIds"` + + //Filter by [LaunchTemplateName].
Type: String
Optional
+ // The maximum number of `Filters` in each request is 10. The upper limit for `Filter.Values` is 5. This parameter cannot specify `LaunchTemplateIds` and `Filters` at the same time. + Filters []*Filter `json:"Filters,omitnil,omitempty" name:"Filters"` + + // The offset. Default value: 0. For more information on `Offset`, see the relevant sections in API [Introduction](https://intl.cloud.tencent.com/document/api/213/15688?from_cn_redirect=1). + Offset *int64 `json:"Offset,omitnil,omitempty" name:"Offset"` + + // The number of returned results. Default value: 20. Maximum value: 100. For more information on `Limit`, see the relevant sections in API [Introduction](https://intl.cloud.tencent.com/document/api/213/15688?from_cn_redirect=1). + Limit *int64 `json:"Limit,omitnil,omitempty" name:"Limit"` +} + +func (r *DescribeLaunchTemplatesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeLaunchTemplatesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "LaunchTemplateIds") + delete(f, "Filters") + delete(f, "Offset") + delete(f, "Limit") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeLaunchTemplatesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeLaunchTemplatesResponseParams struct { + // Number of eligible instance templates. + // Note: This field may return `null`, indicating that no valid values can be obtained. + TotalCount *int64 `json:"TotalCount,omitnil,omitempty" name:"TotalCount"` + + // List of instance details + // Note: This field may return `null`, indicating that no valid values can be obtained. + LaunchTemplateSet []*LaunchTemplateInfo `json:"LaunchTemplateSet,omitnil,omitempty" name:"LaunchTemplateSet"` + + // The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` +} + +type DescribeLaunchTemplatesResponse struct { + *tchttp.BaseResponse + Response *DescribeLaunchTemplatesResponseParams `json:"Response"` +} + +func (r *DescribeLaunchTemplatesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeLaunchTemplatesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeRegionsRequestParams struct { + +} + +type DescribeRegionsRequest struct { + *tchttp.BaseRequest + +} + +func (r *DescribeRegionsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeRegionsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeRegionsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeRegionsResponseParams struct { + // Number of regions + TotalCount *uint64 `json:"TotalCount,omitnil,omitempty" name:"TotalCount"` + + // List of regions + RegionSet []*RegionInfo `json:"RegionSet,omitnil,omitempty" name:"RegionSet"` + + // The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` +} + +type DescribeRegionsResponse struct { + *tchttp.BaseResponse + Response *DescribeRegionsResponseParams `json:"Response"` +} + +func (r *DescribeRegionsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeRegionsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeReservedInstancesConfigInfosRequestParams struct { + //Filters by the availability zones in which the Reserved Instances can be purchased, such as ap-guangzhou-1.
Type: String
Required: no
Valid values: please see Availability Zones
+ //Filters by the duration of the Reserved Instance, in seconds. For example, 31536000.
Type: Integer
Unit: second
Required: no
Valid values: 31536000 (1 year) | 94608000 (3 years)
+ //Filters by type of the Reserved Instance, such as `S3.MEDIUM4`.
Type: String
Required: no
Valid values: please see Instance Types
+ //Filters by **payment term**, such as `All Upfront`.
Type: String
Required: no
Valid value: All Upfront
+ //Filters by the platform description (operating system) of the Reserved Instance, such as `linux`.
Type: String
Required: no
Valid value: linux
+ //Filters by Reserved Instance ID, in the form of 650c138f-ae7e-4750-952a-96841d6e9fc1.
Type: String
Required: no
+ // Each request can have up to 10 `Filters` and 5 `Filter.Values`. + Filters []*Filter `json:"Filters,omitnil,omitempty" name:"Filters"` +} + +type DescribeReservedInstancesOfferingsRequest struct { + *tchttp.BaseRequest + + // Dry run. Default value: false. + DryRun *bool `json:"DryRun,omitnil,omitempty" name:"DryRun"` + + // The offset. Default value: 0. For more information on `Offset`, see the relevant sections in API [Introduction](https://intl.cloud.tencent.com/document/api/213/15688?from_cn_redirect=1). + Offset *int64 `json:"Offset,omitnil,omitempty" name:"Offset"` + + // The number of returned results. Default value: 20. Maximum value: 100. For more information on `Limit`, see the relevant sections in API [Introduction](https://intl.cloud.tencent.com/document/api/213/15688?from_cn_redirect=1). + Limit *int64 `json:"Limit,omitnil,omitempty" name:"Limit"` + + // The maximum duration as a filter, + // in seconds. + // Default value: 94608000. + MaxDuration *int64 `json:"MaxDuration,omitnil,omitempty" name:"MaxDuration"` + + // The minimum duration as a filter, + // in seconds. + // Default value: 2592000. + MinDuration *int64 `json:"MinDuration,omitnil,omitempty" name:"MinDuration"` + + //Filters by the availability zones in which the Reserved Instances can be purchased, such as ap-guangzhou-1.
Type: String
Required: no
Valid values: please see Availability Zones
+ //Filters by the duration of the Reserved Instance, in seconds. For example, 31536000.
Type: Integer
Unit: second
Required: no
Valid values: 31536000 (1 year) | 94608000 (3 years)
+ //Filters by type of the Reserved Instance, such as `S3.MEDIUM4`.
Type: String
Required: no
Valid values: please see Instance Types
+ //Filters by **payment term**, such as `All Upfront`.
Type: String
Required: no
Valid value: All Upfront
+ //Filters by the platform description (operating system) of the Reserved Instance, such as `linux`.
Type: String
Required: no
Valid value: linux
+ //Filters by Reserved Instance ID, in the form of 650c138f-ae7e-4750-952a-96841d6e9fc1.
Type: String
Required: no
+ // Each request can have up to 10 `Filters` and 5 `Filter.Values`. + Filters []*Filter `json:"Filters,omitnil,omitempty" name:"Filters"` +} + +func (r *DescribeReservedInstancesOfferingsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeReservedInstancesOfferingsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "DryRun") + delete(f, "Offset") + delete(f, "Limit") + delete(f, "MaxDuration") + delete(f, "MinDuration") + delete(f, "Filters") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeReservedInstancesOfferingsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeReservedInstancesOfferingsResponseParams struct { + // The number of Reserved Instances that meet the condition. + TotalCount *int64 `json:"TotalCount,omitnil,omitempty" name:"TotalCount"` + + // The list of Reserved Instances that meet the condition. + ReservedInstancesOfferingsSet []*ReservedInstancesOffering `json:"ReservedInstancesOfferingsSet,omitnil,omitempty" name:"ReservedInstancesOfferingsSet"` + + // The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` +} + +type DescribeReservedInstancesOfferingsResponse struct { + *tchttp.BaseResponse + Response *DescribeReservedInstancesOfferingsResponseParams `json:"Response"` +} + +func (r *DescribeReservedInstancesOfferingsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeReservedInstancesOfferingsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeReservedInstancesRequestParams struct { + // Trial run. Default value: false. + DryRun *bool `json:"DryRun,omitnil,omitempty" name:"DryRun"` + + // Offset. Default value: 0. For more information on `Offset`, see the relevant section in API [Introduction](https://intl.cloud.tencent.com/document/api/213/15688?from_cn_redirect=1). + Offset *int64 `json:"Offset,omitnil,omitempty" name:"Offset"` + + // Number of returned instances. Default value: 20. Maximum value: 100. For more information on `Limit`, see the relevant section in API [Introduction](https://intl.cloud.tencent.com/document/api/213/15688?from_cn_redirect=1). + Limit *int64 `json:"Limit,omitnil,omitempty" name:"Limit"` + + //Filter by [availability zones] in which reserved instances can be purchased. For example, ap-guangzhou-1.
Type: String.
Required: No.
Valid values: See the availability zone list.
+ //Filter by [validity periods] of reserved instances, which is the instance purchase duration. For example, 31536000.
Type: Integer.
Unit: Second.
Required: No.
Valid values: 31536000 (1 year) | 94608000 (3 years).
+ //Filter by [specifications of reserved instances]. For example, S3.MEDIUM4.
Type: String.
Required: No.
Valid values: See the reserved instance specification list.
+ //Filter by [types of reserved instances]. For example, S3.
Type: String.
Required: No.
Valid values: See the reserved instance type list.
+ //Filter by payment types]. For example, All Upfront (fully prepaid).
Type: String.
Required: No.
Valid values: All Upfront (fully prepaid) | Partial Upfront (partially prepaid) | No Upfront (non-prepaid).
+ //Filter by [platform descriptions] (operating system) of reserved instances. For example, linux.
Type: String.
Required: No.
Valid value: linux.
+ //Filter by [IDs of purchased reserved instances]. For example, 650c138f-ae7e-4750-952a-96841d6e9fc1.
Type: String.
Required: No.
+ //Filter by [statuses of purchased reserved instances]. For example, active.
Type: String.
Required: No.
Valid values: active (created) | pending (waiting to be created) | retired (expired).
+ // Each request can have up to 10 filters, and each filter can have up to 5 values. + Filters []*Filter `json:"Filters,omitnil,omitempty" name:"Filters"` +} + +type DescribeReservedInstancesRequest struct { + *tchttp.BaseRequest + + // Trial run. Default value: false. + DryRun *bool `json:"DryRun,omitnil,omitempty" name:"DryRun"` + + // Offset. Default value: 0. For more information on `Offset`, see the relevant section in API [Introduction](https://intl.cloud.tencent.com/document/api/213/15688?from_cn_redirect=1). + Offset *int64 `json:"Offset,omitnil,omitempty" name:"Offset"` + + // Number of returned instances. Default value: 20. Maximum value: 100. For more information on `Limit`, see the relevant section in API [Introduction](https://intl.cloud.tencent.com/document/api/213/15688?from_cn_redirect=1). + Limit *int64 `json:"Limit,omitnil,omitempty" name:"Limit"` + + //Filter by [availability zones] in which reserved instances can be purchased. For example, ap-guangzhou-1.
Type: String.
Required: No.
Valid values: See the availability zone list.
+ //Filter by [validity periods] of reserved instances, which is the instance purchase duration. For example, 31536000.
Type: Integer.
Unit: Second.
Required: No.
Valid values: 31536000 (1 year) | 94608000 (3 years).
+ //Filter by [specifications of reserved instances]. For example, S3.MEDIUM4.
Type: String.
Required: No.
Valid values: See the reserved instance specification list.
+ //Filter by [types of reserved instances]. For example, S3.
Type: String.
Required: No.
Valid values: See the reserved instance type list.
+ //Filter by payment types]. For example, All Upfront (fully prepaid).
Type: String.
Required: No.
Valid values: All Upfront (fully prepaid) | Partial Upfront (partially prepaid) | No Upfront (non-prepaid).
+ //Filter by [platform descriptions] (operating system) of reserved instances. For example, linux.
Type: String.
Required: No.
Valid value: linux.
+ //Filter by [IDs of purchased reserved instances]. For example, 650c138f-ae7e-4750-952a-96841d6e9fc1.
Type: String.
Required: No.
+ //Filter by [statuses of purchased reserved instances]. For example, active.
Type: String.
Required: No.
Valid values: active (created) | pending (waiting to be created) | retired (expired).
+ // Each request can have up to 10 filters, and each filter can have up to 5 values. + Filters []*Filter `json:"Filters,omitnil,omitempty" name:"Filters"` +} + +func (r *DescribeReservedInstancesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeReservedInstancesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "DryRun") + delete(f, "Offset") + delete(f, "Limit") + delete(f, "Filters") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeReservedInstancesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeReservedInstancesResponseParams struct { + // Number of reserved instances that meet the conditions. + TotalCount *int64 `json:"TotalCount,omitnil,omitempty" name:"TotalCount"` + + // List of reserved instances that meet the conditions. + ReservedInstancesSet []*ReservedInstances `json:"ReservedInstancesSet,omitnil,omitempty" name:"ReservedInstancesSet"` + + // The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` +} + +type DescribeReservedInstancesResponse struct { + *tchttp.BaseResponse + Response *DescribeReservedInstancesResponseParams `json:"Response"` +} + +func (r *DescribeReservedInstancesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeReservedInstancesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeZoneInstanceConfigInfosRequestParams struct { + //按照【私有网络唯一ID】进行过滤。
类型:String
必选:否
//按照【私有子网唯一ID】进行过滤。
类型:String
必选:否
+ //按照【设备SN】进行过滤。
类型:String
必选:否
Filters []*Filter `json:"Filters,omitnil,omitempty" name:"Filters"` // 偏移量,默认为0。关于`Offset`的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/15688)中的相关小节。 @@ -2169,6 +2248,8 @@ type DescribeChcHostsRequest struct { //按照【私有网络唯一ID】进行过滤。
类型:String
必选:否
//按照【私有子网唯一ID】进行过滤。
类型:String
必选:否
+ //按照【设备SN】进行过滤。
类型:String
必选:否
Filters []*Filter `json:"Filters,omitnil,omitempty" name:"Filters"` // 偏移量,默认为0。关于`Offset`的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/15688)中的相关小节。 @@ -2269,11 +2350,16 @@ type DescribeDisasterRecoverGroupQuotaResponseParams struct { CvmInHostGroupQuota *int64 `json:"CvmInHostGroupQuota,omitnil,omitempty" name:"CvmInHostGroupQuota"` // 交换机类型容灾组内实例的配额数。 + // + // Deprecated: CvmInSwGroupQuota is deprecated. CvmInSwGroupQuota *int64 `json:"CvmInSwGroupQuota,omitnil,omitempty" name:"CvmInSwGroupQuota"` // 机架类型容灾组内实例的配额数。 CvmInRackGroupQuota *int64 `json:"CvmInRackGroupQuota,omitnil,omitempty" name:"CvmInRackGroupQuota"` + // 交换机类型容灾组内实例的配额数。 + CvmInSwitchGroupQuota *int64 `json:"CvmInSwitchGroupQuota,omitnil,omitempty" name:"CvmInSwitchGroupQuota"` + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` } @@ -2296,7 +2382,7 @@ func (r *DescribeDisasterRecoverGroupQuotaResponse) FromJsonString(s string) err // Predefined struct for user type DescribeDisasterRecoverGroupsRequestParams struct { - // 分散置放群组ID列表。每次请求允许操作的分散置放群组数量上限是100。 + // 分散置放群组ID列表。每次请求允许操作的分散置放群组数量上限是10。 DisasterRecoverGroupIds []*string `json:"DisasterRecoverGroupIds,omitnil,omitempty" name:"DisasterRecoverGroupIds"` // 分散置放群组名称,支持模糊匹配。 @@ -2307,12 +2393,19 @@ type DescribeDisasterRecoverGroupsRequestParams struct { // 返回数量,默认为20,最大值为100。关于`Limit`的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/15688)中的相关小节。 Limit *int64 `json:"Limit,omitnil,omitempty" name:"Limit"` + + //按照【标签键】进行过滤。
类型:String
必选:否
+ //按照【标签值】进行过滤。
类型:String
必选:否
+ //按照【标签键值对】进行过滤。tag-key使用具体的标签键进行替换。
类型:String
必选:否
+ // 每次请求的`Filters`的上限为10,`Filter.Values`的上限为5。 + Filters []*Filter `json:"Filters,omitnil,omitempty" name:"Filters"` } type DescribeDisasterRecoverGroupsRequest struct { *tchttp.BaseRequest - // 分散置放群组ID列表。每次请求允许操作的分散置放群组数量上限是100。 + // 分散置放群组ID列表。每次请求允许操作的分散置放群组数量上限是10。 DisasterRecoverGroupIds []*string `json:"DisasterRecoverGroupIds,omitnil,omitempty" name:"DisasterRecoverGroupIds"` // 分散置放群组名称,支持模糊匹配。 @@ -2323,6 +2416,13 @@ type DescribeDisasterRecoverGroupsRequest struct { // 返回数量,默认为20,最大值为100。关于`Limit`的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/15688)中的相关小节。 Limit *int64 `json:"Limit,omitnil,omitempty" name:"Limit"` + + //按照【标签键】进行过滤。
类型:String
必选:否
+ //按照【标签值】进行过滤。
类型:String
必选:否
+ //按照【标签键值对】进行过滤。tag-key使用具体的标签键进行替换。
类型:String
必选:否
+ // 每次请求的`Filters`的上限为10,`Filter.Values`的上限为5。 + Filters []*Filter `json:"Filters,omitnil,omitempty" name:"Filters"` } func (r *DescribeDisasterRecoverGroupsRequest) ToJsonString() string { @@ -2341,6 +2441,7 @@ func (r *DescribeDisasterRecoverGroupsRequest) FromJsonString(s string) error { delete(f, "Name") delete(f, "Offset") delete(f, "Limit") + delete(f, "Filters") if len(f) > 0 { return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeDisasterRecoverGroupsRequest has unknown keys!", "") } @@ -2497,6 +2598,12 @@ type DescribeHpcClustersRequestParams struct { // 高性能计算集群对应的业务场景标识,当前只支持CDC。 HpcClusterBusinessId *string `json:"HpcClusterBusinessId,omitnil,omitempty" name:"HpcClusterBusinessId"` + + // 高性能计算集群实例类型 + InstanceType *string `json:"InstanceType,omitnil,omitempty" name:"InstanceType"` + + //按照【标签键】进行过滤。
类型:String
必选:否
按照【标签值】进行过滤。
类型:String
必选:否
按照【标签键值对】进行过滤。tag-key使用具体的标签键进行替换。
类型:String
必选:否
每次请求的`Filters`的上限为10,`Filter.Values`的上限为5。 + Filters []*Filter `json:"Filters,omitnil,omitempty" name:"Filters"` } type DescribeHpcClustersRequest struct { @@ -2522,6 +2629,12 @@ type DescribeHpcClustersRequest struct { // 高性能计算集群对应的业务场景标识,当前只支持CDC。 HpcClusterBusinessId *string `json:"HpcClusterBusinessId,omitnil,omitempty" name:"HpcClusterBusinessId"` + + // 高性能计算集群实例类型 + InstanceType *string `json:"InstanceType,omitnil,omitempty" name:"InstanceType"` + + //按照【标签键】进行过滤。
类型:String
必选:否
按照【标签值】进行过滤。
类型:String
必选:否
按照【标签键值对】进行过滤。tag-key使用具体的标签键进行替换。
类型:String
必选:否
每次请求的`Filters`的上限为10,`Filter.Values`的上限为5。 + Filters []*Filter `json:"Filters,omitnil,omitempty" name:"Filters"` } func (r *DescribeHpcClustersRequest) ToJsonString() string { @@ -2543,6 +2656,8 @@ func (r *DescribeHpcClustersRequest) FromJsonString(s string) error { delete(f, "Limit") delete(f, "HpcClusterType") delete(f, "HpcClusterBusinessId") + delete(f, "InstanceType") + delete(f, "Filters") if len(f) > 0 { return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeHpcClustersRequest has unknown keys!", "") } @@ -2748,7 +2863,7 @@ func (r *DescribeImageSharePermissionResponse) FromJsonString(s string) error { // Predefined struct for user type DescribeImagesRequestParams struct { - // 镜像ID列表 。镜像ID如:`img-gvbnzy6f`。array型参数的格式可以参考[API简介](https://cloud.tencent.com/document/api/213/15688)。镜像ID可以通过如下方式获取:按照【LaunchTemplateName】进行过滤。
类型:String
必选:否
+ //按照【实例启动模板名称】进行过滤。
类型:String
必选:否
+ //按照【标签键】进行过滤。
类型:String
必选:否
+ //按照【标签值】进行过滤。
类型:String
必选:否
+ //按照【标签键值对】进行过滤。tag-key使用具体的标签键进行替换。
类型:String
必选:否
// 每次请求的`Filters`的上限为10,`Filter.Values`的上限为5。参数不支持同时指定`LaunchTemplateIds`和`Filters`。 Filters []*Filter `json:"Filters,omitnil,omitempty" name:"Filters"` @@ -3819,7 +4005,12 @@ type DescribeLaunchTemplatesRequest struct { // 启动模板ID,一个或者多个启动模板ID。若未指定,则显示用户所有模板。 LaunchTemplateIds []*string `json:"LaunchTemplateIds,omitnil,omitempty" name:"LaunchTemplateIds"` - //按照【LaunchTemplateName】进行过滤。
类型:String
必选:否
+ //按照【实例启动模板名称】进行过滤。
类型:String
必选:否
+ //按照【标签键】进行过滤。
类型:String
必选:否
+ //按照【标签值】进行过滤。
类型:String
必选:否
+ //按照【标签键值对】进行过滤。tag-key使用具体的标签键进行替换。
类型:String
必选:否
// 每次请求的`Filters`的上限为10,`Filter.Values`的上限为5。参数不支持同时指定`LaunchTemplateIds`和`Filters`。 Filters []*Filter `json:"Filters,omitnil,omitempty" name:"Filters"` @@ -3855,11 +4046,9 @@ func (r *DescribeLaunchTemplatesRequest) FromJsonString(s string) error { // Predefined struct for user type DescribeLaunchTemplatesResponseParams struct { // 符合条件的实例模板数量。 - // 注意:此字段可能返回 null,表示取不到有效值。 TotalCount *int64 `json:"TotalCount,omitnil,omitempty" name:"TotalCount"` // 实例详细信息列表。 - // 注意:此字段可能返回 null,表示取不到有效值。 LaunchTemplateSet []*LaunchTemplateInfo `json:"LaunchTemplateSet,omitnil,omitempty" name:"LaunchTemplateSet"` // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 @@ -4157,121 +4346,6 @@ func (r *DescribeReservedInstancesOfferingsResponse) FromJsonString(s string) er return json.Unmarshal([]byte(s), &r) } -// Predefined struct for user -type DescribeReservedInstancesRequestParams struct { - // 试运行。默认为 false。 - DryRun *bool `json:"DryRun,omitnil,omitempty" name:"DryRun"` - - // 偏移量,默认为0。关于`Offset`的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/15688)中的相关小节。 - Offset *int64 `json:"Offset,omitnil,omitempty" name:"Offset"` - - // 返回数量,默认为20,最大值为100。关于`Limit`的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/15688)中的相关小节。 - Limit *int64 `json:"Limit,omitnil,omitempty" name:"Limit"` - - //按照预留实例计费可购买的【可用区】进行过滤。形如:ap-guangzhou-1。
类型:String
必选:否
可选项:可用区列表
- //按照预留实例计费【有效期】即预留实例计费购买时长进行过滤。形如:31536000。
类型:Integer
计量单位:秒
必选:否
可选项:31536000 (1年) | 94608000(3年)
- //按照【预留实例规格】进行过滤。形如:S3.MEDIUM4。
类型:String
必选:否
可选项:预留实例规格列表
- //按照【预留实例类型】进行过滤。形如:S3。
类型:String
必选:否
可选项:预留实例类型列表
- //按照【付款类型】进行过滤。形如:All Upfront (全预付)。
类型:String
必选:否
可选项:All Upfront (全预付) | Partial Upfront (部分预付) | No Upfront (零预付)
- //按照预留实例计费的【平台描述】(即操作系统)进行过滤。形如:linux。
类型:String
必选:否
可选项:linux
- //按照已购买【预留实例计费ID】进行过滤。形如:650c138f-ae7e-4750-952a-96841d6e9fc1。
类型:String
必选:否
- //按照已购买【预留实例计费状态】进行过滤。形如:active。
类型:String
必选:否
可选项:active (已创建) | pending (等待被创建) | retired (过期)
- // 每次请求的`Filters`的上限为10,`Filter.Values`的上限为5。 - Filters []*Filter `json:"Filters,omitnil,omitempty" name:"Filters"` -} - -type DescribeReservedInstancesRequest struct { - *tchttp.BaseRequest - - // 试运行。默认为 false。 - DryRun *bool `json:"DryRun,omitnil,omitempty" name:"DryRun"` - - // 偏移量,默认为0。关于`Offset`的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/15688)中的相关小节。 - Offset *int64 `json:"Offset,omitnil,omitempty" name:"Offset"` - - // 返回数量,默认为20,最大值为100。关于`Limit`的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/15688)中的相关小节。 - Limit *int64 `json:"Limit,omitnil,omitempty" name:"Limit"` - - //按照预留实例计费可购买的【可用区】进行过滤。形如:ap-guangzhou-1。
类型:String
必选:否
可选项:可用区列表
- //按照预留实例计费【有效期】即预留实例计费购买时长进行过滤。形如:31536000。
类型:Integer
计量单位:秒
必选:否
可选项:31536000 (1年) | 94608000(3年)
- //按照【预留实例规格】进行过滤。形如:S3.MEDIUM4。
类型:String
必选:否
可选项:预留实例规格列表
- //按照【预留实例类型】进行过滤。形如:S3。
类型:String
必选:否
可选项:预留实例类型列表
- //按照【付款类型】进行过滤。形如:All Upfront (全预付)。
类型:String
必选:否
可选项:All Upfront (全预付) | Partial Upfront (部分预付) | No Upfront (零预付)
- //按照预留实例计费的【平台描述】(即操作系统)进行过滤。形如:linux。
类型:String
必选:否
可选项:linux
- //按照已购买【预留实例计费ID】进行过滤。形如:650c138f-ae7e-4750-952a-96841d6e9fc1。
类型:String
必选:否
- //按照已购买【预留实例计费状态】进行过滤。形如:active。
类型:String
必选:否
可选项:active (已创建) | pending (等待被创建) | retired (过期)
- // 每次请求的`Filters`的上限为10,`Filter.Values`的上限为5。 - Filters []*Filter `json:"Filters,omitnil,omitempty" name:"Filters"` -} - -func (r *DescribeReservedInstancesRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribeReservedInstancesRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "DryRun") - delete(f, "Offset") - delete(f, "Limit") - delete(f, "Filters") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeReservedInstancesRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -// Predefined struct for user -type DescribeReservedInstancesResponseParams struct { - // 符合条件的预留实例计费数量。 - TotalCount *int64 `json:"TotalCount,omitnil,omitempty" name:"TotalCount"` - - // 符合条件的预留实例计费列表。 - ReservedInstancesSet []*ReservedInstances `json:"ReservedInstancesSet,omitnil,omitempty" name:"ReservedInstancesSet"` - - // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` -} - -type DescribeReservedInstancesResponse struct { - *tchttp.BaseResponse - Response *DescribeReservedInstancesResponseParams `json:"Response"` -} - -func (r *DescribeReservedInstancesResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribeReservedInstancesResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - // Predefined struct for user type DescribeTaskInfoRequestParams struct { // 返回数量,默认为20,最大值为100。关于`Limit`的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/15688)中的相关小节。 @@ -4465,7 +4539,6 @@ type DescribeTaskInfoResponseParams struct { TotalCount *int64 `json:"TotalCount,omitnil,omitempty" name:"TotalCount"` // 查询返回的维修任务列表。 - // 注意:此字段可能返回 null,表示取不到有效值。 RepairTaskInfoSet []*RepairTaskInfo `json:"RepairTaskInfoSet,omitnil,omitempty" name:"RepairTaskInfoSet"` // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 @@ -4771,12 +4844,13 @@ type DisasterRecoverGroup struct { CurrentNum *int64 `json:"CurrentNum,omitnil,omitempty" name:"CurrentNum"` // 分散置放群组内,云服务器id列表。 - // 注意:此字段可能返回 null,表示取不到有效值。 InstanceIds []*string `json:"InstanceIds,omitnil,omitempty" name:"InstanceIds"` // 分散置放群组创建时间。 - // 注意:此字段可能返回 null,表示取不到有效值。 CreateTime *string `json:"CreateTime,omitnil,omitempty" name:"CreateTime"` + + // 置放群组关联的标签列表。 + Tags []*Tag `json:"Tags,omitnil,omitempty" name:"Tags"` } type DisasterRecoverGroupQuota struct { @@ -4818,8 +4892,13 @@ type EnterRescueModeRequestParams struct { // 救援模式下系统用户名 Username *string `json:"Username,omitnil,omitempty" name:"Username"` - // 是否强制关机 + // 是否强制关机。本参数已弃用,推荐使用StopType,不可以与参数StopType同时使用。 + // + // Deprecated: ForceStop is deprecated. ForceStop *bool `json:"ForceStop,omitnil,omitempty" name:"ForceStop"` + + // 实例的关闭模式。取值范围: